---
title: /custodianSignTypedData
slug: custodiansigntypeddata
createdAt: 2024-01-09T12:30:00.561Z
---

{
  "id": "OY75r-gYh_VyGQj6abqM5",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "http://1.1.1.1/custodianSignTypedData",
    "servers": [
      {
        "url": "http://1.1.1.1/custodianSignTypedData"
      }
    ],
    "name": "",
    "description": "<ul>\n<li>\n<p>custodianSignTypedData (for MetaMask only) - request that the custodian perform a signature according to EIP-712</p>\n</li>\n<li>\n<p>return - status of an approval request</p>\n</li>\n</ul>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "required",
          "name": "account_id",
          "type": "integer",
          "example": 1,
          "description": "<p>Id for request, can be found using getBulletins</p>",
          "default": 1
        },
        {
          "kind": "required",
          "name": "coin_type",
          "type": "string",
          "example": "ETH",
          "description": "<p>an EVM coin symbol derived from the provided chain ID sent in the payload (if no chain ID provided, the default EVM network is ETH)</p>",
          "default": "ETH"
        },
        {
          "kind": "required",
          "name": "payload",
          "type": "object",
          "example": "",
          "description": "Json containing the fields \"types\", \"primaryType\", \"domain\", \"message\"",
          "default": "{\n  \"domain\": {\n    \"chainId\": 5,\n    \"name\": \"Test\",\n    \"verifyingContract\": \"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC\",\n    \"version\": \"1\"\n  },\n  \"message\": {\n    \"contents\": \"\",\n    \"to\": {\n      \"name\": \"bob\",\n      \"wallet\": \"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC\"\n    }\n  },\n  \"primaryType\": \"Message\",\n  \"types\": {\n    \"EIP712Domain\": [\n      {\"name\": \"name\", \"type\": \"string\"},\n      {\"name\": \"version\", \"type\": \"string\"},\n      {\"name\": \"chainId\", \"type\": \"uint256\"},\n      {\"name\": \"verifyingContract\", \"type\": \"address\"}\n    ],\n    \"Message\": [\n      {\"name\": \"contents\", \"type\": \"string\"},\n      {\"name\": \"to\", \"type\": \"Person\"}\n    ],\n    \"Person\": [\n      {\"name\": \"name\", \"type\": \"string\"},\n      {\"name\": \"wallet\", \"type\": \"address\"}\n    ]\n  }\n}\n",
          "schema": []
        },
        {
          "kind": "required",
          "name": "eip712_encoding_version",
          "type": "string",
          "example": "v4",
          "description": "<p>represents the version of 'signTypedData' being used, either v3 or v4</p>",
          "default": "v4"
        },
        {
          "kind": "optional",
          "name": "specific_from_address",
          "type": "string",
          "example": "0xE4Fd4d9190075de22826DdeC437594d27fb549Ab",
          "description": "a deposit address to sign with",
          "default": "0xE4Fd4d9190075de22826DdeC437594d27fb549Ab"
        }
      ],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "Request data for signing Ethereum typed data.",
          "customType": "custodianSignTypedDataRequest",
          "schema": [
            {
              "name": "FunctionData",
              "kind": "optional",
              "type": "object",
              "description": "Contains the function-specific data.",
              "example": "",
              "schema": [
                {
                  "name": "AccountId",
                  "kind": "optional",
                  "type": "integer",
                  "description": "The ID of the user's account.",
                  "example": 1,
                  "default": 1
                },
                {
                  "name": "CoinType",
                  "kind": "optional",
                  "type": "string",
                  "description": "The type of cryptocurrency (e.g., ETH).",
                  "example": "ETH",
                  "default": "ETH"
                },
                {
                  "name": "DataToSign",
                  "kind": "optional",
                  "type": "object",
                  "description": "Data to be signed using EIP-712 encoding.",
                  "example": "",
                  "schema": [
                    {
                      "name": "EIP712EncodingVersion",
                      "kind": "optional",
                      "type": "string",
                      "description": "The EIP-712 encoding version.",
                      "example": "v4",
                      "default": "v4"
                    },
                    {
                      "name": "Payload",
                      "kind": "optional",
                      "type": "object",
                      "description": "The payload data for EIP-712 encoding.",
                      "example": "",
                      "schema": [
                        {
                          "name": "domain",
                          "kind": "optional",
                          "type": "object",
                          "description": "The domain data.",
                          "example": "",
                          "schema": [
                            {
                              "name": "chainId",
                              "kind": "optional",
                              "type": "integer",
                              "description": "The chain ID.",
                              "example": 5,
                              "default": 5
                            },
                            {
                              "name": "name",
                              "kind": "optional",
                              "type": "string",
                              "description": "The name.",
                              "example": "Test",
                              "default": "Test"
                            },
                            {
                              "name": "verifyingContract",
                              "kind": "optional",
                              "type": "string",
                              "description": "The verifying contract address.",
                              "example": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC",
                              "default": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC"
                            },
                            {
                              "name": "version",
                              "kind": "optional",
                              "type": "string",
                              "description": "The version.",
                              "example": "1",
                              "default": "1"
                            }
                          ]
                        },
                        {
                          "name": "message",
                          "kind": "optional",
                          "type": "object",
                          "description": "The message data.",
                          "example": "",
                          "schema": [
                            {
                              "name": "contents",
                              "kind": "optional",
                              "type": "string",
                              "description": "The contents of the message.",
                              "example": "",
                              "default": ""
                            },
                            {
                              "name": "to",
                              "kind": "optional",
                              "type": "object",
                              "description": "The recipient's data.",
                              "example": "",
                              "schema": [
                                {
                                  "name": "name",
                                  "kind": "optional",
                                  "type": "string",
                                  "description": "The name of the recipient.",
                                  "example": "bob",
                                  "default": "bob"
                                },
                                {
                                  "name": "wallet",
                                  "kind": "optional",
                                  "type": "string",
                                  "description": "The wallet address of the recipient.",
                                  "example": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC",
                                  "default": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name": "primaryType",
                          "kind": "optional",
                          "type": "string",
                          "description": "The primary type.",
                          "example": "Message",
                          "default": "Message"
                        },
                        {
                          "name": "types",
                          "kind": "optional",
                          "type": "object",
                          "description": "Data types for EIP-712 encoding.",
                          "example": "",
                          "schema": [
                            {
                              "name": "EIP712Domain",
                              "kind": "optional",
                              "type": "array",
                              "description": "Data type for EIP712Domain.",
                              "example": "",
                              "itemType": "object",
                              "customType": "object[]",
                              "schema": [
                                {
                                  "name": "name",
                                  "kind": "optional",
                                  "type": "string",
                                  "description": "The name.",
                                  "example": "name",
                                  "default": "name"
                                },
                                {
                                  "name": "type",
                                  "kind": "optional",
                                  "type": "string",
                                  "description": "The data type.",
                                  "example": "string",
                                  "default": "string"
                                }
                              ]
                            },
                            {
                              "name": "Message",
                              "kind": "optional",
                              "type": "array",
                              "description": "Data type for Message.",
                              "example": "",
                              "itemType": "object",
                              "customType": "object[]",
                              "schema": [
                                {
                                  "name": "name",
                                  "kind": "optional",
                                  "type": "string",
                                  "description": "The name.",
                                  "example": "contents",
                                  "default": "contents"
                                },
                                {
                                  "name": "type",
                                  "kind": "optional",
                                  "type": "string",
                                  "description": "The data type.",
                                  "example": "string",
                                  "default": "string"
                                }
                              ]
                            },
                            {
                              "name": "Person",
                              "kind": "optional",
                              "type": "array",
                              "description": "Data type for Person.",
                              "example": "",
                              "itemType": "object",
                              "customType": "object[]",
                              "schema": [
                                {
                                  "name": "name",
                                  "kind": "optional",
                                  "type": "string",
                                  "description": "The name.",
                                  "example": "name",
                                  "default": "name"
                                },
                                {
                                  "name": "type",
                                  "kind": "optional",
                                  "type": "string",
                                  "description": "The data type.",
                                  "example": "string",
                                  "default": "string"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name": "SpecificFromAddress",
                  "kind": "optional",
                  "type": "string",
                  "description": "The source address for the signature.",
                  "example": "0xE4Fd4d9190075de22826DdeC437594d27fb549Ab",
                  "default": "0xE4Fd4d9190075de22826DdeC437594d27fb549Ab"
                }
              ]
            },
            {
              "name": "Meta",
              "kind": "optional",
              "type": "object",
              "modelRef": "#/components/schemas/MetaTokencustodianSignTypedData",
              "customType": "MetaTokencustodianSignTypedData",
              "schema": [
                {
                  "name": "FunctionName",
                  "kind": "optional",
                  "type": "string",
                  "description": "The Function to be called",
                  "example": "custodianSignTypedData",
                  "default": "custodianSignTypedData"
                },
                {
                  "name": "RandomData",
                  "kind": "optional",
                  "type": "string",
                  "description": "Random Data",
                  "example": "288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229",
                  "default": "288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229"
                },
                {
                  "name": "Destination",
                  "kind": "optional",
                  "type": "string",
                  "description": "Id of the server",
                  "example": "",
                  "default": "b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea"
                },
                {
                  "name": "Time",
                  "kind": "optional",
                  "type": "string",
                  "description": "UTC Time of execution",
                  "example": "2021-02-07T18:37:46.948Z",
                  "default": "2021-02-07T18:37:46.948Z"
                },
                {
                  "name": "Source",
                  "kind": "optional",
                  "type": "string",
                  "description": "User public key",
                  "example": "",
                  "default": "048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99"
                },
                {
                  "name": "AccessToken",
                  "kind": "optional",
                  "type": "string",
                  "description": "Token used for authentication purposes",
                  "example": "51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087",
                  "default": "51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087"
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/custodianSignTypedDataRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "success",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "customType": "custodianSignTypedDataResponse",
            "schema": [
              {
                "name": "FunctionData",
                "kind": "optional",
                "type": "object",
                "example": "",
                "schema": [
                  {
                    "name": "ApprovalRequestStatus",
                    "kind": "optional",
                    "type": "integer",
                    "description": "Status of the approval request",
                    "example": 3,
                    "default": 3
                  },
                  {
                    "name": "EIP712EncodingVersion",
                    "kind": "optional",
                    "type": "string",
                    "description": "The encoding version for EIP712 standard",
                    "example": "v4",
                    "default": "v4"
                  },
                  {
                    "name": "Payload",
                    "kind": "optional",
                    "type": "object",
                    "description": "Payload for the function execution",
                    "example": "",
                    "schema": [
                      {
                        "name": "domain",
                        "kind": "optional",
                        "type": "object",
                        "description": "EIP712 domain data",
                        "example": "{\"chainId\":5,\"name\":\"Test\",\"verifyingContract\":\"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC\",\"version\":\"1\"}",
                        "schema": [
                          {
                            "name": "chainId",
                            "kind": "optional",
                            "type": "integer",
                            "description": "Chain ID for the domain",
                            "example": 5,
                            "default": 5
                          },
                          {
                            "name": "name",
                            "kind": "optional",
                            "type": "string",
                            "description": "Name of the domain",
                            "example": "Test",
                            "default": "Test"
                          },
                          {
                            "name": "verifyingContract",
                            "kind": "optional",
                            "type": "string",
                            "description": "Address of the contract being verified",
                            "example": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC",
                            "default": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC"
                          },
                          {
                            "name": "version",
                            "kind": "optional",
                            "type": "string",
                            "description": "Version of the domain",
                            "example": "1",
                            "default": "1"
                          }
                        ]
                      },
                      {
                        "name": "message",
                        "kind": "optional",
                        "type": "object",
                        "description": "Message data",
                        "example": "{\"contents\":\"Hello World\",\"to\":{\"name\":\"bob\",\"wallet\":\"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC\"}}",
                        "schema": [
                          {
                            "name": "contents",
                            "kind": "optional",
                            "type": "string",
                            "description": "Contents of the message",
                            "example": "Hello World",
                            "default": "Hello World"
                          },
                          {
                            "name": "to",
                            "kind": "optional",
                            "type": "object",
                            "description": "Recipient of the message",
                            "example": "",
                            "schema": [
                              {
                                "name": "name",
                                "kind": "optional",
                                "type": "string",
                                "description": "Name of the recipient",
                                "example": "bob",
                                "default": "bob"
                              },
                              {
                                "name": "wallet",
                                "kind": "optional",
                                "type": "string",
                                "description": "Wallet address of the recipient",
                                "example": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC",
                                "default": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC"
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "name": "primaryType",
                        "kind": "optional",
                        "type": "string",
                        "description": "The primary type for EIP712 standard",
                        "example": "Message",
                        "default": "Message"
                      },
                      {
                        "name": "types",
                        "kind": "optional",
                        "type": "object",
                        "description": "Types for EIP712 standard",
                        "example": "",
                        "schema": [
                          {
                            "name": "EIP712Domain",
                            "kind": "optional",
                            "type": "array",
                            "description": "Type definition for EIP712 domain",
                            "example": "",
                            "itemType": "object",
                            "customType": "object[]",
                            "schema": [
                              {
                                "name": "name",
                                "kind": "optional",
                                "type": "string",
                                "description": "Name of the field",
                                "example": "name",
                                "default": "name"
                              },
                              {
                                "name": "type",
                                "kind": "optional",
                                "type": "string",
                                "description": "Type of the field",
                                "example": "string",
                                "default": "string"
                              }
                            ]
                          },
                          {
                            "name": "Message",
                            "kind": "optional",
                            "type": "array",
                            "description": "Type definition for the message",
                            "example": "",
                            "itemType": "object",
                            "customType": "object[]",
                            "schema": [
                              {
                                "name": "name",
                                "kind": "optional",
                                "type": "string",
                                "description": "Name of the field",
                                "example": "contents",
                                "default": "contents"
                              },
                              {
                                "name": "type",
                                "kind": "optional",
                                "type": "string",
                                "description": "Type of the field",
                                "example": "string",
                                "default": "string"
                              }
                            ]
                          },
                          {
                            "name": "Person",
                            "kind": "optional",
                            "type": "array",
                            "example": "",
                            "itemType": "object",
                            "customType": "object[]",
                            "schema": [
                              {
                                "name": "name",
                                "kind": "optional",
                                "type": "string",
                                "description": "The name of the property.",
                                "example": "name",
                                "default": "name"
                              },
                              {
                                "name": "type",
                                "kind": "optional",
                                "type": "string",
                                "description": "The type of the property.",
                                "example": "string",
                                "default": "string"
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                ]
              },
              {
                "name": "Meta",
                "kind": "optional",
                "type": "object",
                "modelRef": "#/components/schemas/MetaResponse",
                "customType": "MetaResponse",
                "schema": [
                  {
                    "name": "AccessToken",
                    "kind": "optional",
                    "type": "string",
                    "description": "The new access token generated after this operation",
                    "example": "a3e816b5bc04302d99da94705ec2309a4a63fe10d6aed3c5f6fc9e7ff27c6be6",
                    "default": "a3e816b5bc04302d99da94705ec2309a4a63fe10d6aed3c5f6fc9e7ff27c6be6"
                  },
                  {
                    "name": "Destination",
                    "kind": "optional",
                    "type": "string",
                    "description": "Id of the server",
                    "example": "042c671aeb148d9b2bb4918399c4c925f3764248c5ab2d5194ab0f32664132834692699a75e7fafb5af35f183b7d8a68bdc3b3e6ebfaff8ab555b9a3caf8090622",
                    "default": "042c671aeb148d9b2bb4918399c4c925f3764248c5ab2d5194ab0f32664132834692699a75e7fafb5af35f183b7d8a68bdc3b3e6ebfaff8ab555b9a3caf8090622"
                  },
                  {
                    "name": "Source",
                    "kind": "optional",
                    "type": "string",
                    "description": "User public key",
                    "example": "df4b76a23067a9d782d09a7372ed526ec713cf6d771fac4dbdb9610f7af36d570a157eed76986b8e85afde12888d10d10bef461399e490f3d7e4db44cde1b6e355",
                    "default": "df4b76a23067a9d782d09a7372ed526ec713cf6d771fac4dbdb9610f7af36d570a157eed76986b8e85afde12888d10d10bef461399e490f3d7e4db44cde1b6e355"
                  },
                  {
                    "name": "Time",
                    "kind": "optional",
                    "type": "string",
                    "description": "UTC Time of execution",
                    "example": "2021-02-14 09:58:52.320",
                    "default": "2021-02-14 09:58:52.320"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/custodianSignTypedDataResponse",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url 'http://1.1.1.1/custodianSignTypedData?account_id=1&coin_type=ETH&payload=%22{%5Cn%20%20%5C%22domain%5C%22%3A%20{%5Cn%20%20%20%20%5C%22chainId%5C%22%3A%205%2C%5Cn%20%20%20%20%5C%22name%5C%22%3A%20%5C%22Test%5C%22%2C%5Cn%20%20%20%20%5C%22verifyingContract%5C%22%3A%20%5C%220xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC%5C%22%2C%5Cn%20%20%20%20%5C%22version%5C%22%3A%20%5C%221%5C%22%5Cn%20%20}%2C%5Cn%20%20%5C%22message%5C%22%3A%20{%5Cn%20%20%20%20%5C%22contents%5C%22%3A%20%5C%22%5C%22%2C%5Cn%20%20%20%20%5C%22to%5C%22%3A%20{%5Cn%20%20%20%20%20%20%5C%22name%5C%22%3A%20%5C%22bob%5C%22%2C%5Cn%20%20%20%20%20%20%5C%22wallet%5C%22%3A%20%5C%220xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC%5C%22%5Cn%20%20%20%20}%5Cn%20%20}%2C%5Cn%20%20%5C%22primaryType%5C%22%3A%20%5C%22Message%5C%22%2C%5Cn%20%20%5C%22types%5C%22%3A%20{%5Cn%20%20%20%20%5C%22EIP712Domain%5C%22%3A%20[%5Cn%20%20%20%20%20%20{%5C%22name%5C%22%3A%20%5C%22name%5C%22%2C%20%5C%22type%5C%22%3A%20%5C%22string%5C%22}%2C%5Cn%20%20%20%20%20%20{%5C%22name%5C%22%3A%20%5C%22version%5C%22%2C%20%5C%22type%5C%22%3A%20%5C%22string%5C%22}%2C%5Cn%20%20%20%20%20%20{%5C%22name%5C%22%3A%20%5C%22chainId%5C%22%2C%20%5C%22type%5C%22%3A%20%5C%22uint256%5C%22}%2C%5Cn%20%20%20%20%20%20{%5C%22name%5C%22%3A%20%5C%22verifyingContract%5C%22%2C%20%5C%22type%5C%22%3A%20%5C%22address%5C%22}%5Cn%20%20%20%20]%2C%5Cn%20%20%20%20%5C%22Message%5C%22%3A%20[%5Cn%20%20%20%20%20%20{%5C%22name%5C%22%3A%20%5C%22contents%5C%22%2C%20%5C%22type%5C%22%3A%20%5C%22string%5C%22}%2C%5Cn%20%20%20%20%20%20{%5C%22name%5C%22%3A%20%5C%22to%5C%22%2C%20%5C%22type%5C%22%3A%20%5C%22Person%5C%22}%5Cn%20%20%20%20]%2C%5Cn%20%20%20%20%5C%22Person%5C%22%3A%20[%5Cn%20%20%20%20%20%20{%5C%22name%5C%22%3A%20%5C%22name%5C%22%2C%20%5C%22type%5C%22%3A%20%5C%22string%5C%22}%2C%5Cn%20%20%20%20%20%20{%5C%22name%5C%22%3A%20%5C%22wallet%5C%22%2C%20%5C%22type%5C%22%3A%20%5C%22address%5C%22}%5Cn%20%20%20%20]%5Cn%20%20}%5Cn}%5Cn%22&eip712_encoding_version=v4&specific_from_address=0xE4Fd4d9190075de22826DdeC437594d27fb549Ab' \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"FunctionData\": {\n     \"AccountId\": 1,\n     \"CoinType\": \"ETH\",\n     \"DataToSign\": {\n     \"EIP712EncodingVersion\": \"v4\",\n     \"Payload\": {\n     \"domain\": {\n     \"chainId\": 5,\n     \"name\": \"Test\",\n     \"verifyingContract\": \"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC\",\n     \"version\": \"1\"\n     },\n     \"message\": {\n     \"to\": {\n     \"name\": \"bob\",\n     \"wallet\": \"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC\"\n     }\n     },\n     \"primaryType\": \"Message\",\n     \"types\": {\n     \"EIP712Domain\": [\n     {\n     \"name\": \"name\",\n     \"type\": \"string\"\n     }\n     ],\n     \"Message\": [\n     {\n     \"name\": \"contents\",\n     \"type\": \"string\"\n     }\n     ],\n     \"Person\": [\n     {\n     \"name\": \"name\",\n     \"type\": \"string\"\n     }\n     ]\n     }\n     }\n     },\n     \"SpecificFromAddress\": \"0xE4Fd4d9190075de22826DdeC437594d27fb549Ab\"\n     },\n     \"Meta\": {\n     \"FunctionName\": \"custodianSignTypedData\",\n     \"RandomData\": \"288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229\",\n     \"Destination\": \"b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea\",\n     \"Time\": \"2021-02-07T18:37:46.948Z\",\n     \"Source\": \"048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99\",\n     \"AccessToken\": \"51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087\"\n     }\n     }'"
        },
        {
          "id": "example-1-javascript",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"FunctionData\": {\n      \"AccountId\": 1,\n      \"CoinType\": \"ETH\",\n      \"DataToSign\": {\n         \"EIP712EncodingVersion\": \"v4\",\n         \"Payload\": {\n            \"domain\": {\n               \"chainId\": 5,\n               \"name\": \"Test\",\n               \"verifyingContract\": \"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC\",\n               \"version\": \"1\"\n            },\n            \"message\": {\n               \"to\": {\n                  \"name\": \"bob\",\n                  \"wallet\": \"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC\"\n               }\n            },\n            \"primaryType\": \"Message\",\n            \"types\": {\n               \"EIP712Domain\": [\n                  {\n                     \"name\": \"name\",\n                     \"type\": \"string\"\n                  }\n               ],\n               \"Message\": [\n                  {\n                     \"name\": \"contents\",\n                     \"type\": \"string\"\n                  }\n               ],\n               \"Person\": [\n                  {\n                     \"name\": \"name\",\n                     \"type\": \"string\"\n                  }\n               ]\n            }\n         }\n      },\n      \"SpecificFromAddress\": \"0xE4Fd4d9190075de22826DdeC437594d27fb549Ab\"\n   },\n   \"Meta\": {\n      \"FunctionName\": \"custodianSignTypedData\",\n      \"RandomData\": \"288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229\",\n      \"Destination\": \"b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea\",\n      \"Time\": \"2021-02-07T18:37:46.948Z\",\n      \"Source\": \"048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99\",\n      \"AccessToken\": \"51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087\"\n   }\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"http://1.1.1.1/custodianSignTypedData?account_id=1&coin_type=ETH&payload=\\\"{\\\\n  \\\\\\\"domain\\\\\\\": {\\\\n    \\\\\\\"chainId\\\\\\\": 5,\\\\n    \\\\\\\"name\\\\\\\": \\\\\\\"Test\\\\\\\",\\\\n    \\\\\\\"verifyingContract\\\\\\\": \\\\\\\"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC\\\\\\\",\\\\n    \\\\\\\"version\\\\\\\": \\\\\\\"1\\\\\\\"\\\\n  },\\\\n  \\\\\\\"message\\\\\\\": {\\\\n    \\\\\\\"contents\\\\\\\": \\\\\\\"\\\\\\\",\\\\n    \\\\\\\"to\\\\\\\": {\\\\n      \\\\\\\"name\\\\\\\": \\\\\\\"bob\\\\\\\",\\\\n      \\\\\\\"wallet\\\\\\\": \\\\\\\"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC\\\\\\\"\\\\n    }\\\\n  },\\\\n  \\\\\\\"primaryType\\\\\\\": \\\\\\\"Message\\\\\\\",\\\\n  \\\\\\\"types\\\\\\\": {\\\\n    \\\\\\\"EIP712Domain\\\\\\\": [\\\\n      {\\\\\\\"name\\\\\\\": \\\\\\\"name\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"string\\\\\\\"},\\\\n      {\\\\\\\"name\\\\\\\": \\\\\\\"version\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"string\\\\\\\"},\\\\n      {\\\\\\\"name\\\\\\\": \\\\\\\"chainId\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"uint256\\\\\\\"},\\\\n      {\\\\\\\"name\\\\\\\": \\\\\\\"verifyingContract\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"address\\\\\\\"}\\\\n    ],\\\\n    \\\\\\\"Message\\\\\\\": [\\\\n      {\\\\\\\"name\\\\\\\": \\\\\\\"contents\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"string\\\\\\\"},\\\\n      {\\\\\\\"name\\\\\\\": \\\\\\\"to\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"Person\\\\\\\"}\\\\n    ],\\\\n    \\\\\\\"Person\\\\\\\": [\\\\n      {\\\\\\\"name\\\\\\\": \\\\\\\"name\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"string\\\\\\\"},\\\\n      {\\\\\\\"name\\\\\\\": \\\\\\\"wallet\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"address\\\\\\\"}\\\\n    ]\\\\n  }\\\\n}\\\\n\\\"&eip712_encoding_version=v4&specific_from_address=0xE4Fd4d9190075de22826DdeC437594d27fb549Ab\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"http://1.1.1.1/custodianSignTypedData?account_id=1&coin_type=ETH&payload=\\\"{\\n  \\\\\"domain\\\\\": {\\n    \\\\\"chainId\\\\\": 5,\\n    \\\\\"name\\\\\": \\\\\"Test\\\\\",\\n    \\\\\"verifyingContract\\\\\": \\\\\"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC\\\\\",\\n    \\\\\"version\\\\\": \\\\\"1\\\\\"\\n  },\\n  \\\\\"message\\\\\": {\\n    \\\\\"contents\\\\\": \\\\\"\\\\\",\\n    \\\\\"to\\\\\": {\\n      \\\\\"name\\\\\": \\\\\"bob\\\\\",\\n      \\\\\"wallet\\\\\": \\\\\"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC\\\\\"\\n    }\\n  },\\n  \\\\\"primaryType\\\\\": \\\\\"Message\\\\\",\\n  \\\\\"types\\\\\": {\\n    \\\\\"EIP712Domain\\\\\": [\\n      {\\\\\"name\\\\\": \\\\\"name\\\\\", \\\\\"type\\\\\": \\\\\"string\\\\\"},\\n      {\\\\\"name\\\\\": \\\\\"version\\\\\", \\\\\"type\\\\\": \\\\\"string\\\\\"},\\n      {\\\\\"name\\\\\": \\\\\"chainId\\\\\", \\\\\"type\\\\\": \\\\\"uint256\\\\\"},\\n      {\\\\\"name\\\\\": \\\\\"verifyingContract\\\\\", \\\\\"type\\\\\": \\\\\"address\\\\\"}\\n    ],\\n    \\\\\"Message\\\\\": [\\n      {\\\\\"name\\\\\": \\\\\"contents\\\\\", \\\\\"type\\\\\": \\\\\"string\\\\\"},\\n      {\\\\\"name\\\\\": \\\\\"to\\\\\", \\\\\"type\\\\\": \\\\\"Person\\\\\"}\\n    ],\\n    \\\\\"Person\\\\\": [\\n      {\\\\\"name\\\\\": \\\\\"name\\\\\", \\\\\"type\\\\\": \\\\\"string\\\\\"},\\n      {\\\\\"name\\\\\": \\\\\"wallet\\\\\", \\\\\"type\\\\\": \\\\\"address\\\\\"}\\n    ]\\n  }\\n}\\n\\\"&eip712_encoding_version=v4&specific_from_address=0xE4Fd4d9190075de22826DdeC437594d27fb549Ab\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"FunctionData\": {\n      \"AccountId\": 1,\n      \"CoinType\": \"ETH\",\n      \"DataToSign\": {\n         \"EIP712EncodingVersion\": \"v4\",\n         \"Payload\": {\n            \"domain\": {\n               \"chainId\": 5,\n               \"name\": \"Test\",\n               \"verifyingContract\": \"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC\",\n               \"version\": \"1\"\n            },\n            \"message\": {\n               \"to\": {\n                  \"name\": \"bob\",\n                  \"wallet\": \"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC\"\n               }\n            },\n            \"primaryType\": \"Message\",\n            \"types\": {\n               \"EIP712Domain\": [\n                  {\n                     \"name\": \"name\",\n                     \"type\": \"string\"\n                  }\n               ],\n               \"Message\": [\n                  {\n                     \"name\": \"contents\",\n                     \"type\": \"string\"\n                  }\n               ],\n               \"Person\": [\n                  {\n                     \"name\": \"name\",\n                     \"type\": \"string\"\n                  }\n               ]\n            }\n         }\n      },\n      \"SpecificFromAddress\": \"0xE4Fd4d9190075de22826DdeC437594d27fb549Ab\"\n   },\n   \"Meta\": {\n      \"FunctionName\": \"custodianSignTypedData\",\n      \"RandomData\": \"288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229\",\n      \"Destination\": \"b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea\",\n      \"Time\": \"2021-02-07T18:37:46.948Z\",\n      \"Source\": \"048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99\",\n      \"AccessToken\": \"51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087\"\n   }\n})\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"http://1.1.1.1/custodianSignTypedData?account_id=1&coin_type=ETH&payload=\\\"{\\\\n  \\\\\\\"domain\\\\\\\": {\\\\n    \\\\\\\"chainId\\\\\\\": 5,\\\\n    \\\\\\\"name\\\\\\\": \\\\\\\"Test\\\\\\\",\\\\n    \\\\\\\"verifyingContract\\\\\\\": \\\\\\\"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC\\\\\\\",\\\\n    \\\\\\\"version\\\\\\\": \\\\\\\"1\\\\\\\"\\\\n  },\\\\n  \\\\\\\"message\\\\\\\": {\\\\n    \\\\\\\"contents\\\\\\\": \\\\\\\"\\\\\\\",\\\\n    \\\\\\\"to\\\\\\\": {\\\\n      \\\\\\\"name\\\\\\\": \\\\\\\"bob\\\\\\\",\\\\n      \\\\\\\"wallet\\\\\\\": \\\\\\\"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC\\\\\\\"\\\\n    }\\\\n  },\\\\n  \\\\\\\"primaryType\\\\\\\": \\\\\\\"Message\\\\\\\",\\\\n  \\\\\\\"types\\\\\\\": {\\\\n    \\\\\\\"EIP712Domain\\\\\\\": [\\\\n      {\\\\\\\"name\\\\\\\": \\\\\\\"name\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"string\\\\\\\"},\\\\n      {\\\\\\\"name\\\\\\\": \\\\\\\"version\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"string\\\\\\\"},\\\\n      {\\\\\\\"name\\\\\\\": \\\\\\\"chainId\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"uint256\\\\\\\"},\\\\n      {\\\\\\\"name\\\\\\\": \\\\\\\"verifyingContract\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"address\\\\\\\"}\\\\n    ],\\\\n    \\\\\\\"Message\\\\\\\": [\\\\n      {\\\\\\\"name\\\\\\\": \\\\\\\"contents\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"string\\\\\\\"},\\\\n      {\\\\\\\"name\\\\\\\": \\\\\\\"to\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"Person\\\\\\\"}\\\\n    ],\\\\n    \\\\\\\"Person\\\\\\\": [\\\\n      {\\\\\\\"name\\\\\\\": \\\\\\\"name\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"string\\\\\\\"},\\\\n      {\\\\\\\"name\\\\\\\": \\\\\\\"wallet\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"address\\\\\\\"}\\\\n    ]\\\\n  }\\\\n}\\\\n\\\"&eip712_encoding_version=v4&specific_from_address=0xE4Fd4d9190075de22826DdeC437594d27fb549Ab\"\n\npayload = json.dumps({\n   \"FunctionData\": {\n      \"AccountId\": 1,\n      \"CoinType\": \"ETH\",\n      \"DataToSign\": {\n         \"EIP712EncodingVersion\": \"v4\",\n         \"Payload\": {\n            \"domain\": {\n               \"chainId\": 5,\n               \"name\": \"Test\",\n               \"verifyingContract\": \"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC\",\n               \"version\": \"1\"\n            },\n            \"message\": {\n               \"to\": {\n                  \"name\": \"bob\",\n                  \"wallet\": \"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC\"\n               }\n            },\n            \"primaryType\": \"Message\",\n            \"types\": {\n               \"EIP712Domain\": [\n                  {\n                     \"name\": \"name\",\n                     \"type\": \"string\"\n                  }\n               ],\n               \"Message\": [\n                  {\n                     \"name\": \"contents\",\n                     \"type\": \"string\"\n                  }\n               ],\n               \"Person\": [\n                  {\n                     \"name\": \"name\",\n                     \"type\": \"string\"\n                  }\n               ]\n            }\n         }\n      },\n      \"SpecificFromAddress\": \"0xE4Fd4d9190075de22826DdeC437594d27fb549Ab\"\n   },\n   \"Meta\": {\n      \"FunctionName\": \"custodianSignTypedData\",\n      \"RandomData\": \"288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229\",\n      \"Destination\": \"b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea\",\n      \"Time\": \"2021-02-07T18:37:46.948Z\",\n      \"Source\": \"048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99\",\n      \"AccessToken\": \"51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087\"\n   }\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// success\n{\n  \"FunctionData\": {\n    \"ApprovalRequestStatus\": 3,\n    \"EIP712EncodingVersion\": \"v4\",\n    \"Payload\": {\n      \"domain\": {\n        \"chainId\": 5,\n        \"name\": \"Test\",\n        \"verifyingContract\": \"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC\",\n        \"version\": \"1\"\n      },\n      \"message\": {\n        \"contents\": \"Hello World\",\n        \"to\": {\n          \"name\": \"bob\",\n          \"wallet\": \"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC\"\n        }\n      },\n      \"primaryType\": \"Message\",\n      \"types\": {\n        \"EIP712Domain\": [\n          {\n            \"name\": \"name\",\n            \"type\": \"string\"\n          }\n        ],\n        \"Message\": [\n          {\n            \"name\": \"contents\",\n            \"type\": \"string\"\n          }\n        ],\n        \"Person\": [\n          {\n            \"name\": \"name\",\n            \"type\": \"string\"\n          }\n        ]\n      }\n    }\n  },\n  \"Meta\": {\n    \"AccessToken\": \"a3e816b5bc04302d99da94705ec2309a4a63fe10d6aed3c5f6fc9e7ff27c6be6\",\n    \"Destination\": \"042c671aeb148d9b2bb4918399c4c925f3764248c5ab2d5194ab0f32664132834692699a75e7fafb5af35f183b7d8a68bdc3b3e6ebfaff8ab555b9a3caf8090622\",\n    \"Source\": \"df4b76a23067a9d782d09a7372ed526ec713cf6d771fac4dbdb9610f7af36d570a157eed76986b8e85afde12888d10d10bef461399e490f3d7e4db44cde1b6e355\",\n    \"Time\": \"2021-02-14 09:58:52.320\"\n  }\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "id": "KsHDf9WKgy-n5y46Geynk",
      "type": "bulleted-list",
      "children": [
        {
          "id": "NENVu0WvsmFD1hy6W7ncI",
          "type": "list-item",
          "children": [
            {
              "id": "Sm9H5wPSyWG7qn4BA-J7-",
              "type": "list-item-child",
              "children": [
                {
                  "text": "custodianSignTypedData (for MetaMask only) - request that the custodian perform a signature according to EIP-712",
                  "id": "WoErdVEbkyka_DOA7vIzS"
                }
              ]
            }
          ]
        },
        {
          "id": "IHEnmJ9mifxoPVQqjoMFm",
          "type": "list-item",
          "children": [
            {
              "id": "rOFbBTq-S-E-VOl6Wk6IN",
              "type": "list-item-child",
              "children": [
                {
                  "text": "return - status of an approval request",
                  "id": "1NyLiD4RnpX0Q0zu8ubtc"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}