[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-metamask-sign-multichain-evm-transaction":3,"mdc-pvq78z-key":32,"related-repo-metamask-sign-multichain-evm-transaction":4095,"related-org-metamask-sign-multichain-evm-transaction":4196},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":22,"repoUrl":23,"updatedAt":24,"license":25,"forks":22,"topics":26,"repo":27,"sourceUrl":30,"mdContent":31},"sign-multichain-evm-transaction","sign and send EVM transactions","Sign and send EVM transactions using the multichain client's invokeMethod. Covers eth_sendTransaction, personal_sign, eth_signTypedData_v4, scope selection, and RPC routing for read vs sign operations.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},"metamask","MetaMask","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fmetamask.png",[12,16,19],{"name":13,"slug":14,"type":15},"Blockchain","blockchain","tag",{"name":17,"slug":18,"type":15},"Web3","web3",{"name":20,"slug":21,"type":15},"Ethereum","ethereum",2,"https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fmetamask-connect-cursor-plugin","2026-07-16T06:01:58.972575",null,[],{"repoUrl":23,"stars":22,"forks":22,"topics":28,"description":29},[],"Cursor plugin for building dApps with the MetaMask Connect SDK — skills, rules, and agents for EVM, Solana, and multichain integrations","https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fmetamask-connect-cursor-plugin\u002Ftree\u002FHEAD\u002Fskills\u002Fsign-multichain-evm-transaction","---\nname: sign-multichain-evm-transaction\ndescription: Sign and send EVM transactions using the multichain client's invokeMethod. Covers eth_sendTransaction, personal_sign, eth_signTypedData_v4, scope selection, and RPC routing for read vs sign operations.\n---\n# Sign EVM Transactions via Multichain Client\n\n## When to use\n\nUse this skill when:\n- Sending EVM transactions through `invokeMethod` on a multichain client\n- Signing messages with `personal_sign` or `eth_signTypedData_v4`\n- Understanding which methods route to the RPC node vs the wallet\n- Selecting the correct CAIP-2 EVM scope for a target chain\n\n## Workflow\n\n### Step 1: Ensure the client is connected with EVM scopes\n\n```typescript\nimport { createMultichainClient, getInfuraRpcUrls } from '@metamask\u002Fconnect-multichain';\n\nconst client = await createMultichainClient({\n  dapp: { name: 'My DApp', url: window.location.href },\n  api: {\n    supportedNetworks: {\n      ...getInfuraRpcUrls({ infuraApiKey: 'YOUR_INFURA_KEY', caipChainIds: ['eip155:1', 'eip155:137'] }),\n    },\n  },\n});\n\nawait client.connect(\n  ['eip155:1', 'eip155:137'], \u002F\u002F Ethereum mainnet + Polygon\n  [],\n);\n```\n\n### Step 2: Understand RPC routing\n\nThe multichain client routes EVM methods based on type:\n\n| Route | Methods | Transport |\n|-------|---------|-----------|\n| **RPC node** | `eth_call`, `eth_getBalance`, `eth_blockNumber`, `eth_getTransactionReceipt`, `eth_estimateGas`, `eth_getCode`, `eth_getLogs`, `eth_getTransactionCount` | Infura \u002F custom RPC URL from `supportedNetworks` |\n| **Wallet** | `eth_sendTransaction`, `personal_sign`, `eth_signTypedData_v4`, `wallet_switchEthereumChain`, `wallet_addEthereumChain` | MetaMask (extension or MWP) |\n\nThe scope in `invokeMethod` determines which chain the request targets. Use `'eip155:1'` for Ethereum mainnet, `'eip155:137'` for Polygon, etc.\n\n### Step 3: Send a transaction (eth_sendTransaction)\n\n```typescript\nconst txHash = await client.invokeMethod({\n  scope: 'eip155:1',\n  request: {\n    method: 'eth_sendTransaction',\n    params: [{\n      from: '0xYourAddress',\n      to: '0xRecipientAddress',\n      value: '0x2386F26FC10000', \u002F\u002F 0.01 ETH in hex wei\n      gas: '0x5208',            \u002F\u002F 21000 gas\n      \u002F\u002F gasPrice or maxFeePerGas\u002FmaxPriorityFeePerGas optional\n    }],\n  },\n});\n\nconsole.log('Transaction hash:', txHash);\n```\n\n**Estimating gas before sending:**\n\n```typescript\nconst gasEstimate = await client.invokeMethod({\n  scope: 'eip155:1',\n  request: {\n    method: 'eth_estimateGas',\n    params: [{\n      from: '0xYourAddress',\n      to: '0xRecipientAddress',\n      value: '0x2386F26FC10000',\n    }],\n  },\n});\n```\n\n### Step 4: Sign a message (personal_sign)\n\nThe message must be hex-encoded. The signer address is the second parameter.\n\n```typescript\nconst message = '0x' + Buffer.from('Hello MetaMask!').toString('hex');\n\nconst signature = await client.invokeMethod({\n  scope: 'eip155:1',\n  request: {\n    method: 'personal_sign',\n    params: [message, '0xYourAddress'],\n  },\n});\n\nconsole.log('Signature:', signature);\n```\n\n### Step 5: Sign typed data (eth_signTypedData_v4)\n\nPass the signer address as the first parameter and the JSON-stringified typed data as the second.\n\n```typescript\nconst typedData = {\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    Mail: [\n      { name: 'from', type: 'string' },\n      { name: 'to', type: 'string' },\n      { name: 'contents', type: 'string' },\n    ],\n  },\n  primaryType: 'Mail',\n  domain: {\n    name: 'My DApp',\n    version: '1',\n    chainId: 1,\n    verifyingContract: '0xContractAddress',\n  },\n  message: {\n    from: 'Alice',\n    to: 'Bob',\n    contents: 'Hello!',\n  },\n};\n\nconst signature = await client.invokeMethod({\n  scope: 'eip155:1',\n  request: {\n    method: 'eth_signTypedData_v4',\n    params: ['0xYourAddress', JSON.stringify(typedData)],\n  },\n});\n\nconsole.log('Typed data signature:', signature);\n```\n\n### Step 6: Cross-chain scope selection\n\nEach `invokeMethod` call targets a specific chain via its scope. You do not need to \"switch chains\" — just use the appropriate scope.\n\n```typescript\n\u002F\u002F Send on Polygon\nawait client.invokeMethod({\n  scope: 'eip155:137',\n  request: {\n    method: 'eth_sendTransaction',\n    params: [{ from: '0x...', to: '0x...', value: '0xDE0B6B3A7640000' }],\n  },\n});\n\n\u002F\u002F Read balance on Ethereum\nconst ethBalance = await client.invokeMethod({\n  scope: 'eip155:1',\n  request: {\n    method: 'eth_getBalance',\n    params: ['0xYourAddress', 'latest'],\n  },\n});\n\n\u002F\u002F Read balance on Polygon\nconst polyBalance = await client.invokeMethod({\n  scope: 'eip155:137',\n  request: {\n    method: 'eth_getBalance',\n    params: ['0xYourAddress', 'latest'],\n  },\n});\n```\n\n### Step 7: Error handling for signing\n\n```typescript\ntry {\n  const sig = await client.invokeMethod({\n    scope: 'eip155:1',\n    request: {\n      method: 'personal_sign',\n      params: [hexMessage, signerAddress],\n    },\n  });\n} catch (err) {\n  \u002F\u002F Multichain invokeMethod errors are wrapped in RPCInvokeMethodErr (code 53);\n  \u002F\u002F the wallet's original code is on err.rpcCode\n  if (err instanceof RPCInvokeMethodErr && err.rpcCode === 4001) {\n    \u002F\u002F User rejected the signing request\n    return;\n  }\n  throw err;\n}\n```\n\n(Import the class with `import { RPCInvokeMethodErr } from '@metamask\u002Fconnect-multichain';`. Revert reasons \u002F custom error bytes from the wallet are available on `err.rpcData`.)\n\n## Important Notes\n\n- **Scope = chain target:** The `scope` field in `invokeMethod` determines which chain the method executes on. Use `'eip155:\u003Cdecimal-chainId>'` format (e.g., `'eip155:1'`, `'eip155:137'`, `'eip155:42161'`).\n- **No chain switching needed:** Unlike single-chain EVM clients, the multichain client does not require `wallet_switchEthereumChain`. Each call specifies its own scope.\n- **Read vs sign routing:** Read-only methods go to the RPC node (fast, no user prompt). Signing methods go to the wallet (requires user approval in MetaMask).\n- **Hex encoding:** `personal_sign` expects the message as a hex string (`0x...`). `eth_sendTransaction` expects `value`, `gas`, and other numeric fields as hex strings.\n- **`eth_signTypedData_v4`:** The typed data parameter must be a JSON **string**, not an object.\n- **Gas estimation:** Always estimate gas with `eth_estimateGas` before sending if you don't have a reliable gas value. This routes to the RPC node and does not prompt the user.\n- **Connected scopes:** `invokeMethod` will fail if the target scope was not included in the `connect()` call. Ensure you connect with all chains you intend to use.\n",{"data":33,"body":34},{"name":4,"description":6},{"type":35,"children":36},"root",[37,46,53,59,107,113,120,623,629,634,800,828,834,1199,1207,1460,1466,1471,1811,1817,1822,2867,2873,2885,3516,3522,3872,3893,3899,4089],{"type":38,"tag":39,"props":40,"children":42},"element","h1",{"id":41},"sign-evm-transactions-via-multichain-client",[43],{"type":44,"value":45},"text","Sign EVM Transactions via Multichain Client",{"type":38,"tag":47,"props":48,"children":50},"h2",{"id":49},"when-to-use",[51],{"type":44,"value":52},"When to use",{"type":38,"tag":54,"props":55,"children":56},"p",{},[57],{"type":44,"value":58},"Use this skill when:",{"type":38,"tag":60,"props":61,"children":62},"ul",{},[63,78,97,102],{"type":38,"tag":64,"props":65,"children":66},"li",{},[67,69,76],{"type":44,"value":68},"Sending EVM transactions through ",{"type":38,"tag":70,"props":71,"children":73},"code",{"className":72},[],[74],{"type":44,"value":75},"invokeMethod",{"type":44,"value":77}," on a multichain client",{"type":38,"tag":64,"props":79,"children":80},{},[81,83,89,91],{"type":44,"value":82},"Signing messages with ",{"type":38,"tag":70,"props":84,"children":86},{"className":85},[],[87],{"type":44,"value":88},"personal_sign",{"type":44,"value":90}," or ",{"type":38,"tag":70,"props":92,"children":94},{"className":93},[],[95],{"type":44,"value":96},"eth_signTypedData_v4",{"type":38,"tag":64,"props":98,"children":99},{},[100],{"type":44,"value":101},"Understanding which methods route to the RPC node vs the wallet",{"type":38,"tag":64,"props":103,"children":104},{},[105],{"type":44,"value":106},"Selecting the correct CAIP-2 EVM scope for a target chain",{"type":38,"tag":47,"props":108,"children":110},{"id":109},"workflow",[111],{"type":44,"value":112},"Workflow",{"type":38,"tag":114,"props":115,"children":117},"h3",{"id":116},"step-1-ensure-the-client-is-connected-with-evm-scopes",[118],{"type":44,"value":119},"Step 1: Ensure the client is connected with EVM scopes",{"type":38,"tag":121,"props":122,"children":127},"pre",{"className":123,"code":124,"language":125,"meta":126,"style":126},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { createMultichainClient, getInfuraRpcUrls } from '@metamask\u002Fconnect-multichain';\n\nconst client = await createMultichainClient({\n  dapp: { name: 'My DApp', url: window.location.href },\n  api: {\n    supportedNetworks: {\n      ...getInfuraRpcUrls({ infuraApiKey: 'YOUR_INFURA_KEY', caipChainIds: ['eip155:1', 'eip155:137'] }),\n    },\n  },\n});\n\nawait client.connect(\n  ['eip155:1', 'eip155:137'], \u002F\u002F Ethereum mainnet + Polygon\n  [],\n);\n","typescript","",[128],{"type":38,"tag":70,"props":129,"children":130},{"__ignoreMap":126},[131,196,205,245,328,346,363,476,485,494,510,518,546,598,611],{"type":38,"tag":132,"props":133,"children":136},"span",{"class":134,"line":135},"line",1,[137,143,149,155,160,165,170,175,180,186,191],{"type":38,"tag":132,"props":138,"children":140},{"style":139},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[141],{"type":44,"value":142},"import",{"type":38,"tag":132,"props":144,"children":146},{"style":145},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[147],{"type":44,"value":148}," {",{"type":38,"tag":132,"props":150,"children":152},{"style":151},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[153],{"type":44,"value":154}," createMultichainClient",{"type":38,"tag":132,"props":156,"children":157},{"style":145},[158],{"type":44,"value":159},",",{"type":38,"tag":132,"props":161,"children":162},{"style":151},[163],{"type":44,"value":164}," getInfuraRpcUrls",{"type":38,"tag":132,"props":166,"children":167},{"style":145},[168],{"type":44,"value":169}," }",{"type":38,"tag":132,"props":171,"children":172},{"style":139},[173],{"type":44,"value":174}," from",{"type":38,"tag":132,"props":176,"children":177},{"style":145},[178],{"type":44,"value":179}," '",{"type":38,"tag":132,"props":181,"children":183},{"style":182},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[184],{"type":44,"value":185},"@metamask\u002Fconnect-multichain",{"type":38,"tag":132,"props":187,"children":188},{"style":145},[189],{"type":44,"value":190},"'",{"type":38,"tag":132,"props":192,"children":193},{"style":145},[194],{"type":44,"value":195},";\n",{"type":38,"tag":132,"props":197,"children":198},{"class":134,"line":22},[199],{"type":38,"tag":132,"props":200,"children":202},{"emptyLinePlaceholder":201},true,[203],{"type":44,"value":204},"\n",{"type":38,"tag":132,"props":206,"children":208},{"class":134,"line":207},3,[209,215,220,225,230,235,240],{"type":38,"tag":132,"props":210,"children":212},{"style":211},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[213],{"type":44,"value":214},"const",{"type":38,"tag":132,"props":216,"children":217},{"style":151},[218],{"type":44,"value":219}," client ",{"type":38,"tag":132,"props":221,"children":222},{"style":145},[223],{"type":44,"value":224},"=",{"type":38,"tag":132,"props":226,"children":227},{"style":139},[228],{"type":44,"value":229}," await",{"type":38,"tag":132,"props":231,"children":233},{"style":232},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[234],{"type":44,"value":154},{"type":38,"tag":132,"props":236,"children":237},{"style":151},[238],{"type":44,"value":239},"(",{"type":38,"tag":132,"props":241,"children":242},{"style":145},[243],{"type":44,"value":244},"{\n",{"type":38,"tag":132,"props":246,"children":248},{"class":134,"line":247},4,[249,255,260,264,269,273,277,282,286,290,295,299,304,309,314,318,323],{"type":38,"tag":132,"props":250,"children":252},{"style":251},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[253],{"type":44,"value":254},"  dapp",{"type":38,"tag":132,"props":256,"children":257},{"style":145},[258],{"type":44,"value":259},":",{"type":38,"tag":132,"props":261,"children":262},{"style":145},[263],{"type":44,"value":148},{"type":38,"tag":132,"props":265,"children":266},{"style":251},[267],{"type":44,"value":268}," name",{"type":38,"tag":132,"props":270,"children":271},{"style":145},[272],{"type":44,"value":259},{"type":38,"tag":132,"props":274,"children":275},{"style":145},[276],{"type":44,"value":179},{"type":38,"tag":132,"props":278,"children":279},{"style":182},[280],{"type":44,"value":281},"My DApp",{"type":38,"tag":132,"props":283,"children":284},{"style":145},[285],{"type":44,"value":190},{"type":38,"tag":132,"props":287,"children":288},{"style":145},[289],{"type":44,"value":159},{"type":38,"tag":132,"props":291,"children":292},{"style":251},[293],{"type":44,"value":294}," url",{"type":38,"tag":132,"props":296,"children":297},{"style":145},[298],{"type":44,"value":259},{"type":38,"tag":132,"props":300,"children":301},{"style":151},[302],{"type":44,"value":303}," window",{"type":38,"tag":132,"props":305,"children":306},{"style":145},[307],{"type":44,"value":308},".",{"type":38,"tag":132,"props":310,"children":311},{"style":151},[312],{"type":44,"value":313},"location",{"type":38,"tag":132,"props":315,"children":316},{"style":145},[317],{"type":44,"value":308},{"type":38,"tag":132,"props":319,"children":320},{"style":151},[321],{"type":44,"value":322},"href ",{"type":38,"tag":132,"props":324,"children":325},{"style":145},[326],{"type":44,"value":327},"},\n",{"type":38,"tag":132,"props":329,"children":331},{"class":134,"line":330},5,[332,337,341],{"type":38,"tag":132,"props":333,"children":334},{"style":251},[335],{"type":44,"value":336},"  api",{"type":38,"tag":132,"props":338,"children":339},{"style":145},[340],{"type":44,"value":259},{"type":38,"tag":132,"props":342,"children":343},{"style":145},[344],{"type":44,"value":345}," {\n",{"type":38,"tag":132,"props":347,"children":349},{"class":134,"line":348},6,[350,355,359],{"type":38,"tag":132,"props":351,"children":352},{"style":251},[353],{"type":44,"value":354},"    supportedNetworks",{"type":38,"tag":132,"props":356,"children":357},{"style":145},[358],{"type":44,"value":259},{"type":38,"tag":132,"props":360,"children":361},{"style":145},[362],{"type":44,"value":345},{"type":38,"tag":132,"props":364,"children":366},{"class":134,"line":365},7,[367,372,377,381,386,391,395,399,404,408,412,417,421,426,430,435,439,443,447,452,456,461,466,471],{"type":38,"tag":132,"props":368,"children":369},{"style":145},[370],{"type":44,"value":371},"      ...",{"type":38,"tag":132,"props":373,"children":374},{"style":232},[375],{"type":44,"value":376},"getInfuraRpcUrls",{"type":38,"tag":132,"props":378,"children":379},{"style":151},[380],{"type":44,"value":239},{"type":38,"tag":132,"props":382,"children":383},{"style":145},[384],{"type":44,"value":385},"{",{"type":38,"tag":132,"props":387,"children":388},{"style":251},[389],{"type":44,"value":390}," infuraApiKey",{"type":38,"tag":132,"props":392,"children":393},{"style":145},[394],{"type":44,"value":259},{"type":38,"tag":132,"props":396,"children":397},{"style":145},[398],{"type":44,"value":179},{"type":38,"tag":132,"props":400,"children":401},{"style":182},[402],{"type":44,"value":403},"YOUR_INFURA_KEY",{"type":38,"tag":132,"props":405,"children":406},{"style":145},[407],{"type":44,"value":190},{"type":38,"tag":132,"props":409,"children":410},{"style":145},[411],{"type":44,"value":159},{"type":38,"tag":132,"props":413,"children":414},{"style":251},[415],{"type":44,"value":416}," caipChainIds",{"type":38,"tag":132,"props":418,"children":419},{"style":145},[420],{"type":44,"value":259},{"type":38,"tag":132,"props":422,"children":423},{"style":151},[424],{"type":44,"value":425}," [",{"type":38,"tag":132,"props":427,"children":428},{"style":145},[429],{"type":44,"value":190},{"type":38,"tag":132,"props":431,"children":432},{"style":182},[433],{"type":44,"value":434},"eip155:1",{"type":38,"tag":132,"props":436,"children":437},{"style":145},[438],{"type":44,"value":190},{"type":38,"tag":132,"props":440,"children":441},{"style":145},[442],{"type":44,"value":159},{"type":38,"tag":132,"props":444,"children":445},{"style":145},[446],{"type":44,"value":179},{"type":38,"tag":132,"props":448,"children":449},{"style":182},[450],{"type":44,"value":451},"eip155:137",{"type":38,"tag":132,"props":453,"children":454},{"style":145},[455],{"type":44,"value":190},{"type":38,"tag":132,"props":457,"children":458},{"style":151},[459],{"type":44,"value":460},"] ",{"type":38,"tag":132,"props":462,"children":463},{"style":145},[464],{"type":44,"value":465},"}",{"type":38,"tag":132,"props":467,"children":468},{"style":151},[469],{"type":44,"value":470},")",{"type":38,"tag":132,"props":472,"children":473},{"style":145},[474],{"type":44,"value":475},",\n",{"type":38,"tag":132,"props":477,"children":479},{"class":134,"line":478},8,[480],{"type":38,"tag":132,"props":481,"children":482},{"style":145},[483],{"type":44,"value":484},"    },\n",{"type":38,"tag":132,"props":486,"children":488},{"class":134,"line":487},9,[489],{"type":38,"tag":132,"props":490,"children":491},{"style":145},[492],{"type":44,"value":493},"  },\n",{"type":38,"tag":132,"props":495,"children":497},{"class":134,"line":496},10,[498,502,506],{"type":38,"tag":132,"props":499,"children":500},{"style":145},[501],{"type":44,"value":465},{"type":38,"tag":132,"props":503,"children":504},{"style":151},[505],{"type":44,"value":470},{"type":38,"tag":132,"props":507,"children":508},{"style":145},[509],{"type":44,"value":195},{"type":38,"tag":132,"props":511,"children":513},{"class":134,"line":512},11,[514],{"type":38,"tag":132,"props":515,"children":516},{"emptyLinePlaceholder":201},[517],{"type":44,"value":204},{"type":38,"tag":132,"props":519,"children":521},{"class":134,"line":520},12,[522,527,532,536,541],{"type":38,"tag":132,"props":523,"children":524},{"style":139},[525],{"type":44,"value":526},"await",{"type":38,"tag":132,"props":528,"children":529},{"style":151},[530],{"type":44,"value":531}," client",{"type":38,"tag":132,"props":533,"children":534},{"style":145},[535],{"type":44,"value":308},{"type":38,"tag":132,"props":537,"children":538},{"style":232},[539],{"type":44,"value":540},"connect",{"type":38,"tag":132,"props":542,"children":543},{"style":151},[544],{"type":44,"value":545},"(\n",{"type":38,"tag":132,"props":547,"children":549},{"class":134,"line":548},13,[550,555,559,563,567,571,575,579,583,588,592],{"type":38,"tag":132,"props":551,"children":552},{"style":151},[553],{"type":44,"value":554},"  [",{"type":38,"tag":132,"props":556,"children":557},{"style":145},[558],{"type":44,"value":190},{"type":38,"tag":132,"props":560,"children":561},{"style":182},[562],{"type":44,"value":434},{"type":38,"tag":132,"props":564,"children":565},{"style":145},[566],{"type":44,"value":190},{"type":38,"tag":132,"props":568,"children":569},{"style":145},[570],{"type":44,"value":159},{"type":38,"tag":132,"props":572,"children":573},{"style":145},[574],{"type":44,"value":179},{"type":38,"tag":132,"props":576,"children":577},{"style":182},[578],{"type":44,"value":451},{"type":38,"tag":132,"props":580,"children":581},{"style":145},[582],{"type":44,"value":190},{"type":38,"tag":132,"props":584,"children":585},{"style":151},[586],{"type":44,"value":587},"]",{"type":38,"tag":132,"props":589,"children":590},{"style":145},[591],{"type":44,"value":159},{"type":38,"tag":132,"props":593,"children":595},{"style":594},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[596],{"type":44,"value":597}," \u002F\u002F Ethereum mainnet + Polygon\n",{"type":38,"tag":132,"props":599,"children":601},{"class":134,"line":600},14,[602,607],{"type":38,"tag":132,"props":603,"children":604},{"style":151},[605],{"type":44,"value":606},"  []",{"type":38,"tag":132,"props":608,"children":609},{"style":145},[610],{"type":44,"value":475},{"type":38,"tag":132,"props":612,"children":614},{"class":134,"line":613},15,[615,619],{"type":38,"tag":132,"props":616,"children":617},{"style":151},[618],{"type":44,"value":470},{"type":38,"tag":132,"props":620,"children":621},{"style":145},[622],{"type":44,"value":195},{"type":38,"tag":114,"props":624,"children":626},{"id":625},"step-2-understand-rpc-routing",[627],{"type":44,"value":628},"Step 2: Understand RPC routing",{"type":38,"tag":54,"props":630,"children":631},{},[632],{"type":44,"value":633},"The multichain client routes EVM methods based on type:",{"type":38,"tag":635,"props":636,"children":637},"table",{},[638,662],{"type":38,"tag":639,"props":640,"children":641},"thead",{},[642],{"type":38,"tag":643,"props":644,"children":645},"tr",{},[646,652,657],{"type":38,"tag":647,"props":648,"children":649},"th",{},[650],{"type":44,"value":651},"Route",{"type":38,"tag":647,"props":653,"children":654},{},[655],{"type":44,"value":656},"Methods",{"type":38,"tag":647,"props":658,"children":659},{},[660],{"type":44,"value":661},"Transport",{"type":38,"tag":663,"props":664,"children":665},"tbody",{},[666,749],{"type":38,"tag":643,"props":667,"children":668},{},[669,679,738],{"type":38,"tag":670,"props":671,"children":672},"td",{},[673],{"type":38,"tag":674,"props":675,"children":676},"strong",{},[677],{"type":44,"value":678},"RPC node",{"type":38,"tag":670,"props":680,"children":681},{},[682,688,690,696,697,703,704,710,711,717,718,724,725,731,732],{"type":38,"tag":70,"props":683,"children":685},{"className":684},[],[686],{"type":44,"value":687},"eth_call",{"type":44,"value":689},", ",{"type":38,"tag":70,"props":691,"children":693},{"className":692},[],[694],{"type":44,"value":695},"eth_getBalance",{"type":44,"value":689},{"type":38,"tag":70,"props":698,"children":700},{"className":699},[],[701],{"type":44,"value":702},"eth_blockNumber",{"type":44,"value":689},{"type":38,"tag":70,"props":705,"children":707},{"className":706},[],[708],{"type":44,"value":709},"eth_getTransactionReceipt",{"type":44,"value":689},{"type":38,"tag":70,"props":712,"children":714},{"className":713},[],[715],{"type":44,"value":716},"eth_estimateGas",{"type":44,"value":689},{"type":38,"tag":70,"props":719,"children":721},{"className":720},[],[722],{"type":44,"value":723},"eth_getCode",{"type":44,"value":689},{"type":38,"tag":70,"props":726,"children":728},{"className":727},[],[729],{"type":44,"value":730},"eth_getLogs",{"type":44,"value":689},{"type":38,"tag":70,"props":733,"children":735},{"className":734},[],[736],{"type":44,"value":737},"eth_getTransactionCount",{"type":38,"tag":670,"props":739,"children":740},{},[741,743],{"type":44,"value":742},"Infura \u002F custom RPC URL from ",{"type":38,"tag":70,"props":744,"children":746},{"className":745},[],[747],{"type":44,"value":748},"supportedNetworks",{"type":38,"tag":643,"props":750,"children":751},{},[752,760,795],{"type":38,"tag":670,"props":753,"children":754},{},[755],{"type":38,"tag":674,"props":756,"children":757},{},[758],{"type":44,"value":759},"Wallet",{"type":38,"tag":670,"props":761,"children":762},{},[763,769,770,775,776,781,782,788,789],{"type":38,"tag":70,"props":764,"children":766},{"className":765},[],[767],{"type":44,"value":768},"eth_sendTransaction",{"type":44,"value":689},{"type":38,"tag":70,"props":771,"children":773},{"className":772},[],[774],{"type":44,"value":88},{"type":44,"value":689},{"type":38,"tag":70,"props":777,"children":779},{"className":778},[],[780],{"type":44,"value":96},{"type":44,"value":689},{"type":38,"tag":70,"props":783,"children":785},{"className":784},[],[786],{"type":44,"value":787},"wallet_switchEthereumChain",{"type":44,"value":689},{"type":38,"tag":70,"props":790,"children":792},{"className":791},[],[793],{"type":44,"value":794},"wallet_addEthereumChain",{"type":38,"tag":670,"props":796,"children":797},{},[798],{"type":44,"value":799},"MetaMask (extension or MWP)",{"type":38,"tag":54,"props":801,"children":802},{},[803,805,810,812,818,820,826],{"type":44,"value":804},"The scope in ",{"type":38,"tag":70,"props":806,"children":808},{"className":807},[],[809],{"type":44,"value":75},{"type":44,"value":811}," determines which chain the request targets. Use ",{"type":38,"tag":70,"props":813,"children":815},{"className":814},[],[816],{"type":44,"value":817},"'eip155:1'",{"type":44,"value":819}," for Ethereum mainnet, ",{"type":38,"tag":70,"props":821,"children":823},{"className":822},[],[824],{"type":44,"value":825},"'eip155:137'",{"type":44,"value":827}," for Polygon, etc.",{"type":38,"tag":114,"props":829,"children":831},{"id":830},"step-3-send-a-transaction-eth_sendtransaction",[832],{"type":44,"value":833},"Step 3: Send a transaction (eth_sendTransaction)",{"type":38,"tag":121,"props":835,"children":837},{"className":123,"code":836,"language":125,"meta":126,"style":126},"const txHash = await client.invokeMethod({\n  scope: 'eip155:1',\n  request: {\n    method: 'eth_sendTransaction',\n    params: [{\n      from: '0xYourAddress',\n      to: '0xRecipientAddress',\n      value: '0x2386F26FC10000', \u002F\u002F 0.01 ETH in hex wei\n      gas: '0x5208',            \u002F\u002F 21000 gas\n      \u002F\u002F gasPrice or maxFeePerGas\u002FmaxPriorityFeePerGas optional\n    }],\n  },\n});\n\nconsole.log('Transaction hash:', txHash);\n",[838],{"type":38,"tag":70,"props":839,"children":840},{"__ignoreMap":126},[841,881,909,925,953,973,1002,1031,1065,1099,1107,1123,1130,1145,1152],{"type":38,"tag":132,"props":842,"children":843},{"class":134,"line":135},[844,848,853,857,861,865,869,873,877],{"type":38,"tag":132,"props":845,"children":846},{"style":211},[847],{"type":44,"value":214},{"type":38,"tag":132,"props":849,"children":850},{"style":151},[851],{"type":44,"value":852}," txHash ",{"type":38,"tag":132,"props":854,"children":855},{"style":145},[856],{"type":44,"value":224},{"type":38,"tag":132,"props":858,"children":859},{"style":139},[860],{"type":44,"value":229},{"type":38,"tag":132,"props":862,"children":863},{"style":151},[864],{"type":44,"value":531},{"type":38,"tag":132,"props":866,"children":867},{"style":145},[868],{"type":44,"value":308},{"type":38,"tag":132,"props":870,"children":871},{"style":232},[872],{"type":44,"value":75},{"type":38,"tag":132,"props":874,"children":875},{"style":151},[876],{"type":44,"value":239},{"type":38,"tag":132,"props":878,"children":879},{"style":145},[880],{"type":44,"value":244},{"type":38,"tag":132,"props":882,"children":883},{"class":134,"line":22},[884,889,893,897,901,905],{"type":38,"tag":132,"props":885,"children":886},{"style":251},[887],{"type":44,"value":888},"  scope",{"type":38,"tag":132,"props":890,"children":891},{"style":145},[892],{"type":44,"value":259},{"type":38,"tag":132,"props":894,"children":895},{"style":145},[896],{"type":44,"value":179},{"type":38,"tag":132,"props":898,"children":899},{"style":182},[900],{"type":44,"value":434},{"type":38,"tag":132,"props":902,"children":903},{"style":145},[904],{"type":44,"value":190},{"type":38,"tag":132,"props":906,"children":907},{"style":145},[908],{"type":44,"value":475},{"type":38,"tag":132,"props":910,"children":911},{"class":134,"line":207},[912,917,921],{"type":38,"tag":132,"props":913,"children":914},{"style":251},[915],{"type":44,"value":916},"  request",{"type":38,"tag":132,"props":918,"children":919},{"style":145},[920],{"type":44,"value":259},{"type":38,"tag":132,"props":922,"children":923},{"style":145},[924],{"type":44,"value":345},{"type":38,"tag":132,"props":926,"children":927},{"class":134,"line":247},[928,933,937,941,945,949],{"type":38,"tag":132,"props":929,"children":930},{"style":251},[931],{"type":44,"value":932},"    method",{"type":38,"tag":132,"props":934,"children":935},{"style":145},[936],{"type":44,"value":259},{"type":38,"tag":132,"props":938,"children":939},{"style":145},[940],{"type":44,"value":179},{"type":38,"tag":132,"props":942,"children":943},{"style":182},[944],{"type":44,"value":768},{"type":38,"tag":132,"props":946,"children":947},{"style":145},[948],{"type":44,"value":190},{"type":38,"tag":132,"props":950,"children":951},{"style":145},[952],{"type":44,"value":475},{"type":38,"tag":132,"props":954,"children":955},{"class":134,"line":330},[956,961,965,969],{"type":38,"tag":132,"props":957,"children":958},{"style":251},[959],{"type":44,"value":960},"    params",{"type":38,"tag":132,"props":962,"children":963},{"style":145},[964],{"type":44,"value":259},{"type":38,"tag":132,"props":966,"children":967},{"style":151},[968],{"type":44,"value":425},{"type":38,"tag":132,"props":970,"children":971},{"style":145},[972],{"type":44,"value":244},{"type":38,"tag":132,"props":974,"children":975},{"class":134,"line":348},[976,981,985,989,994,998],{"type":38,"tag":132,"props":977,"children":978},{"style":251},[979],{"type":44,"value":980},"      from",{"type":38,"tag":132,"props":982,"children":983},{"style":145},[984],{"type":44,"value":259},{"type":38,"tag":132,"props":986,"children":987},{"style":145},[988],{"type":44,"value":179},{"type":38,"tag":132,"props":990,"children":991},{"style":182},[992],{"type":44,"value":993},"0xYourAddress",{"type":38,"tag":132,"props":995,"children":996},{"style":145},[997],{"type":44,"value":190},{"type":38,"tag":132,"props":999,"children":1000},{"style":145},[1001],{"type":44,"value":475},{"type":38,"tag":132,"props":1003,"children":1004},{"class":134,"line":365},[1005,1010,1014,1018,1023,1027],{"type":38,"tag":132,"props":1006,"children":1007},{"style":251},[1008],{"type":44,"value":1009},"      to",{"type":38,"tag":132,"props":1011,"children":1012},{"style":145},[1013],{"type":44,"value":259},{"type":38,"tag":132,"props":1015,"children":1016},{"style":145},[1017],{"type":44,"value":179},{"type":38,"tag":132,"props":1019,"children":1020},{"style":182},[1021],{"type":44,"value":1022},"0xRecipientAddress",{"type":38,"tag":132,"props":1024,"children":1025},{"style":145},[1026],{"type":44,"value":190},{"type":38,"tag":132,"props":1028,"children":1029},{"style":145},[1030],{"type":44,"value":475},{"type":38,"tag":132,"props":1032,"children":1033},{"class":134,"line":478},[1034,1039,1043,1047,1052,1056,1060],{"type":38,"tag":132,"props":1035,"children":1036},{"style":251},[1037],{"type":44,"value":1038},"      value",{"type":38,"tag":132,"props":1040,"children":1041},{"style":145},[1042],{"type":44,"value":259},{"type":38,"tag":132,"props":1044,"children":1045},{"style":145},[1046],{"type":44,"value":179},{"type":38,"tag":132,"props":1048,"children":1049},{"style":182},[1050],{"type":44,"value":1051},"0x2386F26FC10000",{"type":38,"tag":132,"props":1053,"children":1054},{"style":145},[1055],{"type":44,"value":190},{"type":38,"tag":132,"props":1057,"children":1058},{"style":145},[1059],{"type":44,"value":159},{"type":38,"tag":132,"props":1061,"children":1062},{"style":594},[1063],{"type":44,"value":1064}," \u002F\u002F 0.01 ETH in hex wei\n",{"type":38,"tag":132,"props":1066,"children":1067},{"class":134,"line":487},[1068,1073,1077,1081,1086,1090,1094],{"type":38,"tag":132,"props":1069,"children":1070},{"style":251},[1071],{"type":44,"value":1072},"      gas",{"type":38,"tag":132,"props":1074,"children":1075},{"style":145},[1076],{"type":44,"value":259},{"type":38,"tag":132,"props":1078,"children":1079},{"style":145},[1080],{"type":44,"value":179},{"type":38,"tag":132,"props":1082,"children":1083},{"style":182},[1084],{"type":44,"value":1085},"0x5208",{"type":38,"tag":132,"props":1087,"children":1088},{"style":145},[1089],{"type":44,"value":190},{"type":38,"tag":132,"props":1091,"children":1092},{"style":145},[1093],{"type":44,"value":159},{"type":38,"tag":132,"props":1095,"children":1096},{"style":594},[1097],{"type":44,"value":1098},"            \u002F\u002F 21000 gas\n",{"type":38,"tag":132,"props":1100,"children":1101},{"class":134,"line":496},[1102],{"type":38,"tag":132,"props":1103,"children":1104},{"style":594},[1105],{"type":44,"value":1106},"      \u002F\u002F gasPrice or maxFeePerGas\u002FmaxPriorityFeePerGas optional\n",{"type":38,"tag":132,"props":1108,"children":1109},{"class":134,"line":512},[1110,1115,1119],{"type":38,"tag":132,"props":1111,"children":1112},{"style":145},[1113],{"type":44,"value":1114},"    }",{"type":38,"tag":132,"props":1116,"children":1117},{"style":151},[1118],{"type":44,"value":587},{"type":38,"tag":132,"props":1120,"children":1121},{"style":145},[1122],{"type":44,"value":475},{"type":38,"tag":132,"props":1124,"children":1125},{"class":134,"line":520},[1126],{"type":38,"tag":132,"props":1127,"children":1128},{"style":145},[1129],{"type":44,"value":493},{"type":38,"tag":132,"props":1131,"children":1132},{"class":134,"line":548},[1133,1137,1141],{"type":38,"tag":132,"props":1134,"children":1135},{"style":145},[1136],{"type":44,"value":465},{"type":38,"tag":132,"props":1138,"children":1139},{"style":151},[1140],{"type":44,"value":470},{"type":38,"tag":132,"props":1142,"children":1143},{"style":145},[1144],{"type":44,"value":195},{"type":38,"tag":132,"props":1146,"children":1147},{"class":134,"line":600},[1148],{"type":38,"tag":132,"props":1149,"children":1150},{"emptyLinePlaceholder":201},[1151],{"type":44,"value":204},{"type":38,"tag":132,"props":1153,"children":1154},{"class":134,"line":613},[1155,1160,1164,1169,1173,1177,1182,1186,1190,1195],{"type":38,"tag":132,"props":1156,"children":1157},{"style":151},[1158],{"type":44,"value":1159},"console",{"type":38,"tag":132,"props":1161,"children":1162},{"style":145},[1163],{"type":44,"value":308},{"type":38,"tag":132,"props":1165,"children":1166},{"style":232},[1167],{"type":44,"value":1168},"log",{"type":38,"tag":132,"props":1170,"children":1171},{"style":151},[1172],{"type":44,"value":239},{"type":38,"tag":132,"props":1174,"children":1175},{"style":145},[1176],{"type":44,"value":190},{"type":38,"tag":132,"props":1178,"children":1179},{"style":182},[1180],{"type":44,"value":1181},"Transaction hash:",{"type":38,"tag":132,"props":1183,"children":1184},{"style":145},[1185],{"type":44,"value":190},{"type":38,"tag":132,"props":1187,"children":1188},{"style":145},[1189],{"type":44,"value":159},{"type":38,"tag":132,"props":1191,"children":1192},{"style":151},[1193],{"type":44,"value":1194}," txHash)",{"type":38,"tag":132,"props":1196,"children":1197},{"style":145},[1198],{"type":44,"value":195},{"type":38,"tag":54,"props":1200,"children":1201},{},[1202],{"type":38,"tag":674,"props":1203,"children":1204},{},[1205],{"type":44,"value":1206},"Estimating gas before sending:",{"type":38,"tag":121,"props":1208,"children":1210},{"className":123,"code":1209,"language":125,"meta":126,"style":126},"const gasEstimate = await client.invokeMethod({\n  scope: 'eip155:1',\n  request: {\n    method: 'eth_estimateGas',\n    params: [{\n      from: '0xYourAddress',\n      to: '0xRecipientAddress',\n      value: '0x2386F26FC10000',\n    }],\n  },\n});\n",[1211],{"type":38,"tag":70,"props":1212,"children":1213},{"__ignoreMap":126},[1214,1254,1281,1296,1323,1342,1369,1396,1423,1438,1445],{"type":38,"tag":132,"props":1215,"children":1216},{"class":134,"line":135},[1217,1221,1226,1230,1234,1238,1242,1246,1250],{"type":38,"tag":132,"props":1218,"children":1219},{"style":211},[1220],{"type":44,"value":214},{"type":38,"tag":132,"props":1222,"children":1223},{"style":151},[1224],{"type":44,"value":1225}," gasEstimate ",{"type":38,"tag":132,"props":1227,"children":1228},{"style":145},[1229],{"type":44,"value":224},{"type":38,"tag":132,"props":1231,"children":1232},{"style":139},[1233],{"type":44,"value":229},{"type":38,"tag":132,"props":1235,"children":1236},{"style":151},[1237],{"type":44,"value":531},{"type":38,"tag":132,"props":1239,"children":1240},{"style":145},[1241],{"type":44,"value":308},{"type":38,"tag":132,"props":1243,"children":1244},{"style":232},[1245],{"type":44,"value":75},{"type":38,"tag":132,"props":1247,"children":1248},{"style":151},[1249],{"type":44,"value":239},{"type":38,"tag":132,"props":1251,"children":1252},{"style":145},[1253],{"type":44,"value":244},{"type":38,"tag":132,"props":1255,"children":1256},{"class":134,"line":22},[1257,1261,1265,1269,1273,1277],{"type":38,"tag":132,"props":1258,"children":1259},{"style":251},[1260],{"type":44,"value":888},{"type":38,"tag":132,"props":1262,"children":1263},{"style":145},[1264],{"type":44,"value":259},{"type":38,"tag":132,"props":1266,"children":1267},{"style":145},[1268],{"type":44,"value":179},{"type":38,"tag":132,"props":1270,"children":1271},{"style":182},[1272],{"type":44,"value":434},{"type":38,"tag":132,"props":1274,"children":1275},{"style":145},[1276],{"type":44,"value":190},{"type":38,"tag":132,"props":1278,"children":1279},{"style":145},[1280],{"type":44,"value":475},{"type":38,"tag":132,"props":1282,"children":1283},{"class":134,"line":207},[1284,1288,1292],{"type":38,"tag":132,"props":1285,"children":1286},{"style":251},[1287],{"type":44,"value":916},{"type":38,"tag":132,"props":1289,"children":1290},{"style":145},[1291],{"type":44,"value":259},{"type":38,"tag":132,"props":1293,"children":1294},{"style":145},[1295],{"type":44,"value":345},{"type":38,"tag":132,"props":1297,"children":1298},{"class":134,"line":247},[1299,1303,1307,1311,1315,1319],{"type":38,"tag":132,"props":1300,"children":1301},{"style":251},[1302],{"type":44,"value":932},{"type":38,"tag":132,"props":1304,"children":1305},{"style":145},[1306],{"type":44,"value":259},{"type":38,"tag":132,"props":1308,"children":1309},{"style":145},[1310],{"type":44,"value":179},{"type":38,"tag":132,"props":1312,"children":1313},{"style":182},[1314],{"type":44,"value":716},{"type":38,"tag":132,"props":1316,"children":1317},{"style":145},[1318],{"type":44,"value":190},{"type":38,"tag":132,"props":1320,"children":1321},{"style":145},[1322],{"type":44,"value":475},{"type":38,"tag":132,"props":1324,"children":1325},{"class":134,"line":330},[1326,1330,1334,1338],{"type":38,"tag":132,"props":1327,"children":1328},{"style":251},[1329],{"type":44,"value":960},{"type":38,"tag":132,"props":1331,"children":1332},{"style":145},[1333],{"type":44,"value":259},{"type":38,"tag":132,"props":1335,"children":1336},{"style":151},[1337],{"type":44,"value":425},{"type":38,"tag":132,"props":1339,"children":1340},{"style":145},[1341],{"type":44,"value":244},{"type":38,"tag":132,"props":1343,"children":1344},{"class":134,"line":348},[1345,1349,1353,1357,1361,1365],{"type":38,"tag":132,"props":1346,"children":1347},{"style":251},[1348],{"type":44,"value":980},{"type":38,"tag":132,"props":1350,"children":1351},{"style":145},[1352],{"type":44,"value":259},{"type":38,"tag":132,"props":1354,"children":1355},{"style":145},[1356],{"type":44,"value":179},{"type":38,"tag":132,"props":1358,"children":1359},{"style":182},[1360],{"type":44,"value":993},{"type":38,"tag":132,"props":1362,"children":1363},{"style":145},[1364],{"type":44,"value":190},{"type":38,"tag":132,"props":1366,"children":1367},{"style":145},[1368],{"type":44,"value":475},{"type":38,"tag":132,"props":1370,"children":1371},{"class":134,"line":365},[1372,1376,1380,1384,1388,1392],{"type":38,"tag":132,"props":1373,"children":1374},{"style":251},[1375],{"type":44,"value":1009},{"type":38,"tag":132,"props":1377,"children":1378},{"style":145},[1379],{"type":44,"value":259},{"type":38,"tag":132,"props":1381,"children":1382},{"style":145},[1383],{"type":44,"value":179},{"type":38,"tag":132,"props":1385,"children":1386},{"style":182},[1387],{"type":44,"value":1022},{"type":38,"tag":132,"props":1389,"children":1390},{"style":145},[1391],{"type":44,"value":190},{"type":38,"tag":132,"props":1393,"children":1394},{"style":145},[1395],{"type":44,"value":475},{"type":38,"tag":132,"props":1397,"children":1398},{"class":134,"line":478},[1399,1403,1407,1411,1415,1419],{"type":38,"tag":132,"props":1400,"children":1401},{"style":251},[1402],{"type":44,"value":1038},{"type":38,"tag":132,"props":1404,"children":1405},{"style":145},[1406],{"type":44,"value":259},{"type":38,"tag":132,"props":1408,"children":1409},{"style":145},[1410],{"type":44,"value":179},{"type":38,"tag":132,"props":1412,"children":1413},{"style":182},[1414],{"type":44,"value":1051},{"type":38,"tag":132,"props":1416,"children":1417},{"style":145},[1418],{"type":44,"value":190},{"type":38,"tag":132,"props":1420,"children":1421},{"style":145},[1422],{"type":44,"value":475},{"type":38,"tag":132,"props":1424,"children":1425},{"class":134,"line":487},[1426,1430,1434],{"type":38,"tag":132,"props":1427,"children":1428},{"style":145},[1429],{"type":44,"value":1114},{"type":38,"tag":132,"props":1431,"children":1432},{"style":151},[1433],{"type":44,"value":587},{"type":38,"tag":132,"props":1435,"children":1436},{"style":145},[1437],{"type":44,"value":475},{"type":38,"tag":132,"props":1439,"children":1440},{"class":134,"line":496},[1441],{"type":38,"tag":132,"props":1442,"children":1443},{"style":145},[1444],{"type":44,"value":493},{"type":38,"tag":132,"props":1446,"children":1447},{"class":134,"line":512},[1448,1452,1456],{"type":38,"tag":132,"props":1449,"children":1450},{"style":145},[1451],{"type":44,"value":465},{"type":38,"tag":132,"props":1453,"children":1454},{"style":151},[1455],{"type":44,"value":470},{"type":38,"tag":132,"props":1457,"children":1458},{"style":145},[1459],{"type":44,"value":195},{"type":38,"tag":114,"props":1461,"children":1463},{"id":1462},"step-4-sign-a-message-personal_sign",[1464],{"type":44,"value":1465},"Step 4: Sign a message (personal_sign)",{"type":38,"tag":54,"props":1467,"children":1468},{},[1469],{"type":44,"value":1470},"The message must be hex-encoded. The signer address is the second parameter.",{"type":38,"tag":121,"props":1472,"children":1474},{"className":123,"code":1473,"language":125,"meta":126,"style":126},"const message = '0x' + Buffer.from('Hello MetaMask!').toString('hex');\n\nconst signature = await client.invokeMethod({\n  scope: 'eip155:1',\n  request: {\n    method: 'personal_sign',\n    params: [message, '0xYourAddress'],\n  },\n});\n\nconsole.log('Signature:', signature);\n",[1475],{"type":38,"tag":70,"props":1476,"children":1477},{"__ignoreMap":126},[1478,1581,1588,1628,1655,1670,1697,1737,1744,1759,1766],{"type":38,"tag":132,"props":1479,"children":1480},{"class":134,"line":135},[1481,1485,1490,1494,1498,1503,1507,1512,1517,1521,1526,1530,1534,1539,1543,1547,1551,1556,1560,1564,1569,1573,1577],{"type":38,"tag":132,"props":1482,"children":1483},{"style":211},[1484],{"type":44,"value":214},{"type":38,"tag":132,"props":1486,"children":1487},{"style":151},[1488],{"type":44,"value":1489}," message ",{"type":38,"tag":132,"props":1491,"children":1492},{"style":145},[1493],{"type":44,"value":224},{"type":38,"tag":132,"props":1495,"children":1496},{"style":145},[1497],{"type":44,"value":179},{"type":38,"tag":132,"props":1499,"children":1500},{"style":182},[1501],{"type":44,"value":1502},"0x",{"type":38,"tag":132,"props":1504,"children":1505},{"style":145},[1506],{"type":44,"value":190},{"type":38,"tag":132,"props":1508,"children":1509},{"style":145},[1510],{"type":44,"value":1511}," +",{"type":38,"tag":132,"props":1513,"children":1514},{"style":151},[1515],{"type":44,"value":1516}," Buffer",{"type":38,"tag":132,"props":1518,"children":1519},{"style":145},[1520],{"type":44,"value":308},{"type":38,"tag":132,"props":1522,"children":1523},{"style":232},[1524],{"type":44,"value":1525},"from",{"type":38,"tag":132,"props":1527,"children":1528},{"style":151},[1529],{"type":44,"value":239},{"type":38,"tag":132,"props":1531,"children":1532},{"style":145},[1533],{"type":44,"value":190},{"type":38,"tag":132,"props":1535,"children":1536},{"style":182},[1537],{"type":44,"value":1538},"Hello MetaMask!",{"type":38,"tag":132,"props":1540,"children":1541},{"style":145},[1542],{"type":44,"value":190},{"type":38,"tag":132,"props":1544,"children":1545},{"style":151},[1546],{"type":44,"value":470},{"type":38,"tag":132,"props":1548,"children":1549},{"style":145},[1550],{"type":44,"value":308},{"type":38,"tag":132,"props":1552,"children":1553},{"style":232},[1554],{"type":44,"value":1555},"toString",{"type":38,"tag":132,"props":1557,"children":1558},{"style":151},[1559],{"type":44,"value":239},{"type":38,"tag":132,"props":1561,"children":1562},{"style":145},[1563],{"type":44,"value":190},{"type":38,"tag":132,"props":1565,"children":1566},{"style":182},[1567],{"type":44,"value":1568},"hex",{"type":38,"tag":132,"props":1570,"children":1571},{"style":145},[1572],{"type":44,"value":190},{"type":38,"tag":132,"props":1574,"children":1575},{"style":151},[1576],{"type":44,"value":470},{"type":38,"tag":132,"props":1578,"children":1579},{"style":145},[1580],{"type":44,"value":195},{"type":38,"tag":132,"props":1582,"children":1583},{"class":134,"line":22},[1584],{"type":38,"tag":132,"props":1585,"children":1586},{"emptyLinePlaceholder":201},[1587],{"type":44,"value":204},{"type":38,"tag":132,"props":1589,"children":1590},{"class":134,"line":207},[1591,1595,1600,1604,1608,1612,1616,1620,1624],{"type":38,"tag":132,"props":1592,"children":1593},{"style":211},[1594],{"type":44,"value":214},{"type":38,"tag":132,"props":1596,"children":1597},{"style":151},[1598],{"type":44,"value":1599}," signature ",{"type":38,"tag":132,"props":1601,"children":1602},{"style":145},[1603],{"type":44,"value":224},{"type":38,"tag":132,"props":1605,"children":1606},{"style":139},[1607],{"type":44,"value":229},{"type":38,"tag":132,"props":1609,"children":1610},{"style":151},[1611],{"type":44,"value":531},{"type":38,"tag":132,"props":1613,"children":1614},{"style":145},[1615],{"type":44,"value":308},{"type":38,"tag":132,"props":1617,"children":1618},{"style":232},[1619],{"type":44,"value":75},{"type":38,"tag":132,"props":1621,"children":1622},{"style":151},[1623],{"type":44,"value":239},{"type":38,"tag":132,"props":1625,"children":1626},{"style":145},[1627],{"type":44,"value":244},{"type":38,"tag":132,"props":1629,"children":1630},{"class":134,"line":247},[1631,1635,1639,1643,1647,1651],{"type":38,"tag":132,"props":1632,"children":1633},{"style":251},[1634],{"type":44,"value":888},{"type":38,"tag":132,"props":1636,"children":1637},{"style":145},[1638],{"type":44,"value":259},{"type":38,"tag":132,"props":1640,"children":1641},{"style":145},[1642],{"type":44,"value":179},{"type":38,"tag":132,"props":1644,"children":1645},{"style":182},[1646],{"type":44,"value":434},{"type":38,"tag":132,"props":1648,"children":1649},{"style":145},[1650],{"type":44,"value":190},{"type":38,"tag":132,"props":1652,"children":1653},{"style":145},[1654],{"type":44,"value":475},{"type":38,"tag":132,"props":1656,"children":1657},{"class":134,"line":330},[1658,1662,1666],{"type":38,"tag":132,"props":1659,"children":1660},{"style":251},[1661],{"type":44,"value":916},{"type":38,"tag":132,"props":1663,"children":1664},{"style":145},[1665],{"type":44,"value":259},{"type":38,"tag":132,"props":1667,"children":1668},{"style":145},[1669],{"type":44,"value":345},{"type":38,"tag":132,"props":1671,"children":1672},{"class":134,"line":348},[1673,1677,1681,1685,1689,1693],{"type":38,"tag":132,"props":1674,"children":1675},{"style":251},[1676],{"type":44,"value":932},{"type":38,"tag":132,"props":1678,"children":1679},{"style":145},[1680],{"type":44,"value":259},{"type":38,"tag":132,"props":1682,"children":1683},{"style":145},[1684],{"type":44,"value":179},{"type":38,"tag":132,"props":1686,"children":1687},{"style":182},[1688],{"type":44,"value":88},{"type":38,"tag":132,"props":1690,"children":1691},{"style":145},[1692],{"type":44,"value":190},{"type":38,"tag":132,"props":1694,"children":1695},{"style":145},[1696],{"type":44,"value":475},{"type":38,"tag":132,"props":1698,"children":1699},{"class":134,"line":365},[1700,1704,1708,1713,1717,1721,1725,1729,1733],{"type":38,"tag":132,"props":1701,"children":1702},{"style":251},[1703],{"type":44,"value":960},{"type":38,"tag":132,"props":1705,"children":1706},{"style":145},[1707],{"type":44,"value":259},{"type":38,"tag":132,"props":1709,"children":1710},{"style":151},[1711],{"type":44,"value":1712}," [message",{"type":38,"tag":132,"props":1714,"children":1715},{"style":145},[1716],{"type":44,"value":159},{"type":38,"tag":132,"props":1718,"children":1719},{"style":145},[1720],{"type":44,"value":179},{"type":38,"tag":132,"props":1722,"children":1723},{"style":182},[1724],{"type":44,"value":993},{"type":38,"tag":132,"props":1726,"children":1727},{"style":145},[1728],{"type":44,"value":190},{"type":38,"tag":132,"props":1730,"children":1731},{"style":151},[1732],{"type":44,"value":587},{"type":38,"tag":132,"props":1734,"children":1735},{"style":145},[1736],{"type":44,"value":475},{"type":38,"tag":132,"props":1738,"children":1739},{"class":134,"line":478},[1740],{"type":38,"tag":132,"props":1741,"children":1742},{"style":145},[1743],{"type":44,"value":493},{"type":38,"tag":132,"props":1745,"children":1746},{"class":134,"line":487},[1747,1751,1755],{"type":38,"tag":132,"props":1748,"children":1749},{"style":145},[1750],{"type":44,"value":465},{"type":38,"tag":132,"props":1752,"children":1753},{"style":151},[1754],{"type":44,"value":470},{"type":38,"tag":132,"props":1756,"children":1757},{"style":145},[1758],{"type":44,"value":195},{"type":38,"tag":132,"props":1760,"children":1761},{"class":134,"line":496},[1762],{"type":38,"tag":132,"props":1763,"children":1764},{"emptyLinePlaceholder":201},[1765],{"type":44,"value":204},{"type":38,"tag":132,"props":1767,"children":1768},{"class":134,"line":512},[1769,1773,1777,1781,1785,1789,1794,1798,1802,1807],{"type":38,"tag":132,"props":1770,"children":1771},{"style":151},[1772],{"type":44,"value":1159},{"type":38,"tag":132,"props":1774,"children":1775},{"style":145},[1776],{"type":44,"value":308},{"type":38,"tag":132,"props":1778,"children":1779},{"style":232},[1780],{"type":44,"value":1168},{"type":38,"tag":132,"props":1782,"children":1783},{"style":151},[1784],{"type":44,"value":239},{"type":38,"tag":132,"props":1786,"children":1787},{"style":145},[1788],{"type":44,"value":190},{"type":38,"tag":132,"props":1790,"children":1791},{"style":182},[1792],{"type":44,"value":1793},"Signature:",{"type":38,"tag":132,"props":1795,"children":1796},{"style":145},[1797],{"type":44,"value":190},{"type":38,"tag":132,"props":1799,"children":1800},{"style":145},[1801],{"type":44,"value":159},{"type":38,"tag":132,"props":1803,"children":1804},{"style":151},[1805],{"type":44,"value":1806}," signature)",{"type":38,"tag":132,"props":1808,"children":1809},{"style":145},[1810],{"type":44,"value":195},{"type":38,"tag":114,"props":1812,"children":1814},{"id":1813},"step-5-sign-typed-data-eth_signtypeddata_v4",[1815],{"type":44,"value":1816},"Step 5: Sign typed data (eth_signTypedData_v4)",{"type":38,"tag":54,"props":1818,"children":1819},{},[1820],{"type":44,"value":1821},"Pass the signer address as the first parameter and the JSON-stringified typed data as the second.",{"type":38,"tag":121,"props":1823,"children":1825},{"className":123,"code":1824,"language":125,"meta":126,"style":126},"const typedData = {\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    Mail: [\n      { name: 'from', type: 'string' },\n      { name: 'to', type: 'string' },\n      { name: 'contents', type: 'string' },\n    ],\n  },\n  primaryType: 'Mail',\n  domain: {\n    name: 'My DApp',\n    version: '1',\n    chainId: 1,\n    verifyingContract: '0xContractAddress',\n  },\n  message: {\n    from: 'Alice',\n    to: 'Bob',\n    contents: 'Hello!',\n  },\n};\n\nconst signature = await client.invokeMethod({\n  scope: 'eip155:1',\n  request: {\n    method: 'eth_signTypedData_v4',\n    params: ['0xYourAddress', JSON.stringify(typedData)],\n  },\n});\n\nconsole.log('Typed data signature:', signature);\n",[1826],{"type":38,"tag":70,"props":1827,"children":1828},{"__ignoreMap":126},[1829,1849,1865,1882,1942,1998,2055,2112,2124,2140,2195,2251,2307,2318,2325,2354,2371,2400,2430,2453,2483,2491,2508,2538,2568,2598,2606,2615,2623,2663,2691,2707,2735,2790,2798,2814,2822],{"type":38,"tag":132,"props":1830,"children":1831},{"class":134,"line":135},[1832,1836,1841,1845],{"type":38,"tag":132,"props":1833,"children":1834},{"style":211},[1835],{"type":44,"value":214},{"type":38,"tag":132,"props":1837,"children":1838},{"style":151},[1839],{"type":44,"value":1840}," typedData ",{"type":38,"tag":132,"props":1842,"children":1843},{"style":145},[1844],{"type":44,"value":224},{"type":38,"tag":132,"props":1846,"children":1847},{"style":145},[1848],{"type":44,"value":345},{"type":38,"tag":132,"props":1850,"children":1851},{"class":134,"line":22},[1852,1857,1861],{"type":38,"tag":132,"props":1853,"children":1854},{"style":251},[1855],{"type":44,"value":1856},"  types",{"type":38,"tag":132,"props":1858,"children":1859},{"style":145},[1860],{"type":44,"value":259},{"type":38,"tag":132,"props":1862,"children":1863},{"style":145},[1864],{"type":44,"value":345},{"type":38,"tag":132,"props":1866,"children":1867},{"class":134,"line":207},[1868,1873,1877],{"type":38,"tag":132,"props":1869,"children":1870},{"style":251},[1871],{"type":44,"value":1872},"    EIP712Domain",{"type":38,"tag":132,"props":1874,"children":1875},{"style":145},[1876],{"type":44,"value":259},{"type":38,"tag":132,"props":1878,"children":1879},{"style":151},[1880],{"type":44,"value":1881}," [\n",{"type":38,"tag":132,"props":1883,"children":1884},{"class":134,"line":247},[1885,1890,1894,1898,1902,1907,1911,1915,1920,1924,1928,1933,1937],{"type":38,"tag":132,"props":1886,"children":1887},{"style":145},[1888],{"type":44,"value":1889},"      {",{"type":38,"tag":132,"props":1891,"children":1892},{"style":251},[1893],{"type":44,"value":268},{"type":38,"tag":132,"props":1895,"children":1896},{"style":145},[1897],{"type":44,"value":259},{"type":38,"tag":132,"props":1899,"children":1900},{"style":145},[1901],{"type":44,"value":179},{"type":38,"tag":132,"props":1903,"children":1904},{"style":182},[1905],{"type":44,"value":1906},"name",{"type":38,"tag":132,"props":1908,"children":1909},{"style":145},[1910],{"type":44,"value":190},{"type":38,"tag":132,"props":1912,"children":1913},{"style":145},[1914],{"type":44,"value":159},{"type":38,"tag":132,"props":1916,"children":1917},{"style":251},[1918],{"type":44,"value":1919}," type",{"type":38,"tag":132,"props":1921,"children":1922},{"style":145},[1923],{"type":44,"value":259},{"type":38,"tag":132,"props":1925,"children":1926},{"style":145},[1927],{"type":44,"value":179},{"type":38,"tag":132,"props":1929,"children":1930},{"style":182},[1931],{"type":44,"value":1932},"string",{"type":38,"tag":132,"props":1934,"children":1935},{"style":145},[1936],{"type":44,"value":190},{"type":38,"tag":132,"props":1938,"children":1939},{"style":145},[1940],{"type":44,"value":1941}," },\n",{"type":38,"tag":132,"props":1943,"children":1944},{"class":134,"line":330},[1945,1949,1953,1957,1961,1966,1970,1974,1978,1982,1986,1990,1994],{"type":38,"tag":132,"props":1946,"children":1947},{"style":145},[1948],{"type":44,"value":1889},{"type":38,"tag":132,"props":1950,"children":1951},{"style":251},[1952],{"type":44,"value":268},{"type":38,"tag":132,"props":1954,"children":1955},{"style":145},[1956],{"type":44,"value":259},{"type":38,"tag":132,"props":1958,"children":1959},{"style":145},[1960],{"type":44,"value":179},{"type":38,"tag":132,"props":1962,"children":1963},{"style":182},[1964],{"type":44,"value":1965},"version",{"type":38,"tag":132,"props":1967,"children":1968},{"style":145},[1969],{"type":44,"value":190},{"type":38,"tag":132,"props":1971,"children":1972},{"style":145},[1973],{"type":44,"value":159},{"type":38,"tag":132,"props":1975,"children":1976},{"style":251},[1977],{"type":44,"value":1919},{"type":38,"tag":132,"props":1979,"children":1980},{"style":145},[1981],{"type":44,"value":259},{"type":38,"tag":132,"props":1983,"children":1984},{"style":145},[1985],{"type":44,"value":179},{"type":38,"tag":132,"props":1987,"children":1988},{"style":182},[1989],{"type":44,"value":1932},{"type":38,"tag":132,"props":1991,"children":1992},{"style":145},[1993],{"type":44,"value":190},{"type":38,"tag":132,"props":1995,"children":1996},{"style":145},[1997],{"type":44,"value":1941},{"type":38,"tag":132,"props":1999,"children":2000},{"class":134,"line":348},[2001,2005,2009,2013,2017,2022,2026,2030,2034,2038,2042,2047,2051],{"type":38,"tag":132,"props":2002,"children":2003},{"style":145},[2004],{"type":44,"value":1889},{"type":38,"tag":132,"props":2006,"children":2007},{"style":251},[2008],{"type":44,"value":268},{"type":38,"tag":132,"props":2010,"children":2011},{"style":145},[2012],{"type":44,"value":259},{"type":38,"tag":132,"props":2014,"children":2015},{"style":145},[2016],{"type":44,"value":179},{"type":38,"tag":132,"props":2018,"children":2019},{"style":182},[2020],{"type":44,"value":2021},"chainId",{"type":38,"tag":132,"props":2023,"children":2024},{"style":145},[2025],{"type":44,"value":190},{"type":38,"tag":132,"props":2027,"children":2028},{"style":145},[2029],{"type":44,"value":159},{"type":38,"tag":132,"props":2031,"children":2032},{"style":251},[2033],{"type":44,"value":1919},{"type":38,"tag":132,"props":2035,"children":2036},{"style":145},[2037],{"type":44,"value":259},{"type":38,"tag":132,"props":2039,"children":2040},{"style":145},[2041],{"type":44,"value":179},{"type":38,"tag":132,"props":2043,"children":2044},{"style":182},[2045],{"type":44,"value":2046},"uint256",{"type":38,"tag":132,"props":2048,"children":2049},{"style":145},[2050],{"type":44,"value":190},{"type":38,"tag":132,"props":2052,"children":2053},{"style":145},[2054],{"type":44,"value":1941},{"type":38,"tag":132,"props":2056,"children":2057},{"class":134,"line":365},[2058,2062,2066,2070,2074,2079,2083,2087,2091,2095,2099,2104,2108],{"type":38,"tag":132,"props":2059,"children":2060},{"style":145},[2061],{"type":44,"value":1889},{"type":38,"tag":132,"props":2063,"children":2064},{"style":251},[2065],{"type":44,"value":268},{"type":38,"tag":132,"props":2067,"children":2068},{"style":145},[2069],{"type":44,"value":259},{"type":38,"tag":132,"props":2071,"children":2072},{"style":145},[2073],{"type":44,"value":179},{"type":38,"tag":132,"props":2075,"children":2076},{"style":182},[2077],{"type":44,"value":2078},"verifyingContract",{"type":38,"tag":132,"props":2080,"children":2081},{"style":145},[2082],{"type":44,"value":190},{"type":38,"tag":132,"props":2084,"children":2085},{"style":145},[2086],{"type":44,"value":159},{"type":38,"tag":132,"props":2088,"children":2089},{"style":251},[2090],{"type":44,"value":1919},{"type":38,"tag":132,"props":2092,"children":2093},{"style":145},[2094],{"type":44,"value":259},{"type":38,"tag":132,"props":2096,"children":2097},{"style":145},[2098],{"type":44,"value":179},{"type":38,"tag":132,"props":2100,"children":2101},{"style":182},[2102],{"type":44,"value":2103},"address",{"type":38,"tag":132,"props":2105,"children":2106},{"style":145},[2107],{"type":44,"value":190},{"type":38,"tag":132,"props":2109,"children":2110},{"style":145},[2111],{"type":44,"value":1941},{"type":38,"tag":132,"props":2113,"children":2114},{"class":134,"line":478},[2115,2120],{"type":38,"tag":132,"props":2116,"children":2117},{"style":151},[2118],{"type":44,"value":2119},"    ]",{"type":38,"tag":132,"props":2121,"children":2122},{"style":145},[2123],{"type":44,"value":475},{"type":38,"tag":132,"props":2125,"children":2126},{"class":134,"line":487},[2127,2132,2136],{"type":38,"tag":132,"props":2128,"children":2129},{"style":251},[2130],{"type":44,"value":2131},"    Mail",{"type":38,"tag":132,"props":2133,"children":2134},{"style":145},[2135],{"type":44,"value":259},{"type":38,"tag":132,"props":2137,"children":2138},{"style":151},[2139],{"type":44,"value":1881},{"type":38,"tag":132,"props":2141,"children":2142},{"class":134,"line":496},[2143,2147,2151,2155,2159,2163,2167,2171,2175,2179,2183,2187,2191],{"type":38,"tag":132,"props":2144,"children":2145},{"style":145},[2146],{"type":44,"value":1889},{"type":38,"tag":132,"props":2148,"children":2149},{"style":251},[2150],{"type":44,"value":268},{"type":38,"tag":132,"props":2152,"children":2153},{"style":145},[2154],{"type":44,"value":259},{"type":38,"tag":132,"props":2156,"children":2157},{"style":145},[2158],{"type":44,"value":179},{"type":38,"tag":132,"props":2160,"children":2161},{"style":182},[2162],{"type":44,"value":1525},{"type":38,"tag":132,"props":2164,"children":2165},{"style":145},[2166],{"type":44,"value":190},{"type":38,"tag":132,"props":2168,"children":2169},{"style":145},[2170],{"type":44,"value":159},{"type":38,"tag":132,"props":2172,"children":2173},{"style":251},[2174],{"type":44,"value":1919},{"type":38,"tag":132,"props":2176,"children":2177},{"style":145},[2178],{"type":44,"value":259},{"type":38,"tag":132,"props":2180,"children":2181},{"style":145},[2182],{"type":44,"value":179},{"type":38,"tag":132,"props":2184,"children":2185},{"style":182},[2186],{"type":44,"value":1932},{"type":38,"tag":132,"props":2188,"children":2189},{"style":145},[2190],{"type":44,"value":190},{"type":38,"tag":132,"props":2192,"children":2193},{"style":145},[2194],{"type":44,"value":1941},{"type":38,"tag":132,"props":2196,"children":2197},{"class":134,"line":512},[2198,2202,2206,2210,2214,2219,2223,2227,2231,2235,2239,2243,2247],{"type":38,"tag":132,"props":2199,"children":2200},{"style":145},[2201],{"type":44,"value":1889},{"type":38,"tag":132,"props":2203,"children":2204},{"style":251},[2205],{"type":44,"value":268},{"type":38,"tag":132,"props":2207,"children":2208},{"style":145},[2209],{"type":44,"value":259},{"type":38,"tag":132,"props":2211,"children":2212},{"style":145},[2213],{"type":44,"value":179},{"type":38,"tag":132,"props":2215,"children":2216},{"style":182},[2217],{"type":44,"value":2218},"to",{"type":38,"tag":132,"props":2220,"children":2221},{"style":145},[2222],{"type":44,"value":190},{"type":38,"tag":132,"props":2224,"children":2225},{"style":145},[2226],{"type":44,"value":159},{"type":38,"tag":132,"props":2228,"children":2229},{"style":251},[2230],{"type":44,"value":1919},{"type":38,"tag":132,"props":2232,"children":2233},{"style":145},[2234],{"type":44,"value":259},{"type":38,"tag":132,"props":2236,"children":2237},{"style":145},[2238],{"type":44,"value":179},{"type":38,"tag":132,"props":2240,"children":2241},{"style":182},[2242],{"type":44,"value":1932},{"type":38,"tag":132,"props":2244,"children":2245},{"style":145},[2246],{"type":44,"value":190},{"type":38,"tag":132,"props":2248,"children":2249},{"style":145},[2250],{"type":44,"value":1941},{"type":38,"tag":132,"props":2252,"children":2253},{"class":134,"line":520},[2254,2258,2262,2266,2270,2275,2279,2283,2287,2291,2295,2299,2303],{"type":38,"tag":132,"props":2255,"children":2256},{"style":145},[2257],{"type":44,"value":1889},{"type":38,"tag":132,"props":2259,"children":2260},{"style":251},[2261],{"type":44,"value":268},{"type":38,"tag":132,"props":2263,"children":2264},{"style":145},[2265],{"type":44,"value":259},{"type":38,"tag":132,"props":2267,"children":2268},{"style":145},[2269],{"type":44,"value":179},{"type":38,"tag":132,"props":2271,"children":2272},{"style":182},[2273],{"type":44,"value":2274},"contents",{"type":38,"tag":132,"props":2276,"children":2277},{"style":145},[2278],{"type":44,"value":190},{"type":38,"tag":132,"props":2280,"children":2281},{"style":145},[2282],{"type":44,"value":159},{"type":38,"tag":132,"props":2284,"children":2285},{"style":251},[2286],{"type":44,"value":1919},{"type":38,"tag":132,"props":2288,"children":2289},{"style":145},[2290],{"type":44,"value":259},{"type":38,"tag":132,"props":2292,"children":2293},{"style":145},[2294],{"type":44,"value":179},{"type":38,"tag":132,"props":2296,"children":2297},{"style":182},[2298],{"type":44,"value":1932},{"type":38,"tag":132,"props":2300,"children":2301},{"style":145},[2302],{"type":44,"value":190},{"type":38,"tag":132,"props":2304,"children":2305},{"style":145},[2306],{"type":44,"value":1941},{"type":38,"tag":132,"props":2308,"children":2309},{"class":134,"line":548},[2310,2314],{"type":38,"tag":132,"props":2311,"children":2312},{"style":151},[2313],{"type":44,"value":2119},{"type":38,"tag":132,"props":2315,"children":2316},{"style":145},[2317],{"type":44,"value":475},{"type":38,"tag":132,"props":2319,"children":2320},{"class":134,"line":600},[2321],{"type":38,"tag":132,"props":2322,"children":2323},{"style":145},[2324],{"type":44,"value":493},{"type":38,"tag":132,"props":2326,"children":2327},{"class":134,"line":613},[2328,2333,2337,2341,2346,2350],{"type":38,"tag":132,"props":2329,"children":2330},{"style":251},[2331],{"type":44,"value":2332},"  primaryType",{"type":38,"tag":132,"props":2334,"children":2335},{"style":145},[2336],{"type":44,"value":259},{"type":38,"tag":132,"props":2338,"children":2339},{"style":145},[2340],{"type":44,"value":179},{"type":38,"tag":132,"props":2342,"children":2343},{"style":182},[2344],{"type":44,"value":2345},"Mail",{"type":38,"tag":132,"props":2347,"children":2348},{"style":145},[2349],{"type":44,"value":190},{"type":38,"tag":132,"props":2351,"children":2352},{"style":145},[2353],{"type":44,"value":475},{"type":38,"tag":132,"props":2355,"children":2357},{"class":134,"line":2356},16,[2358,2363,2367],{"type":38,"tag":132,"props":2359,"children":2360},{"style":251},[2361],{"type":44,"value":2362},"  domain",{"type":38,"tag":132,"props":2364,"children":2365},{"style":145},[2366],{"type":44,"value":259},{"type":38,"tag":132,"props":2368,"children":2369},{"style":145},[2370],{"type":44,"value":345},{"type":38,"tag":132,"props":2372,"children":2374},{"class":134,"line":2373},17,[2375,2380,2384,2388,2392,2396],{"type":38,"tag":132,"props":2376,"children":2377},{"style":251},[2378],{"type":44,"value":2379},"    name",{"type":38,"tag":132,"props":2381,"children":2382},{"style":145},[2383],{"type":44,"value":259},{"type":38,"tag":132,"props":2385,"children":2386},{"style":145},[2387],{"type":44,"value":179},{"type":38,"tag":132,"props":2389,"children":2390},{"style":182},[2391],{"type":44,"value":281},{"type":38,"tag":132,"props":2393,"children":2394},{"style":145},[2395],{"type":44,"value":190},{"type":38,"tag":132,"props":2397,"children":2398},{"style":145},[2399],{"type":44,"value":475},{"type":38,"tag":132,"props":2401,"children":2403},{"class":134,"line":2402},18,[2404,2409,2413,2417,2422,2426],{"type":38,"tag":132,"props":2405,"children":2406},{"style":251},[2407],{"type":44,"value":2408},"    version",{"type":38,"tag":132,"props":2410,"children":2411},{"style":145},[2412],{"type":44,"value":259},{"type":38,"tag":132,"props":2414,"children":2415},{"style":145},[2416],{"type":44,"value":179},{"type":38,"tag":132,"props":2418,"children":2419},{"style":182},[2420],{"type":44,"value":2421},"1",{"type":38,"tag":132,"props":2423,"children":2424},{"style":145},[2425],{"type":44,"value":190},{"type":38,"tag":132,"props":2427,"children":2428},{"style":145},[2429],{"type":44,"value":475},{"type":38,"tag":132,"props":2431,"children":2433},{"class":134,"line":2432},19,[2434,2439,2443,2449],{"type":38,"tag":132,"props":2435,"children":2436},{"style":251},[2437],{"type":44,"value":2438},"    chainId",{"type":38,"tag":132,"props":2440,"children":2441},{"style":145},[2442],{"type":44,"value":259},{"type":38,"tag":132,"props":2444,"children":2446},{"style":2445},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[2447],{"type":44,"value":2448}," 1",{"type":38,"tag":132,"props":2450,"children":2451},{"style":145},[2452],{"type":44,"value":475},{"type":38,"tag":132,"props":2454,"children":2456},{"class":134,"line":2455},20,[2457,2462,2466,2470,2475,2479],{"type":38,"tag":132,"props":2458,"children":2459},{"style":251},[2460],{"type":44,"value":2461},"    verifyingContract",{"type":38,"tag":132,"props":2463,"children":2464},{"style":145},[2465],{"type":44,"value":259},{"type":38,"tag":132,"props":2467,"children":2468},{"style":145},[2469],{"type":44,"value":179},{"type":38,"tag":132,"props":2471,"children":2472},{"style":182},[2473],{"type":44,"value":2474},"0xContractAddress",{"type":38,"tag":132,"props":2476,"children":2477},{"style":145},[2478],{"type":44,"value":190},{"type":38,"tag":132,"props":2480,"children":2481},{"style":145},[2482],{"type":44,"value":475},{"type":38,"tag":132,"props":2484,"children":2486},{"class":134,"line":2485},21,[2487],{"type":38,"tag":132,"props":2488,"children":2489},{"style":145},[2490],{"type":44,"value":493},{"type":38,"tag":132,"props":2492,"children":2494},{"class":134,"line":2493},22,[2495,2500,2504],{"type":38,"tag":132,"props":2496,"children":2497},{"style":251},[2498],{"type":44,"value":2499},"  message",{"type":38,"tag":132,"props":2501,"children":2502},{"style":145},[2503],{"type":44,"value":259},{"type":38,"tag":132,"props":2505,"children":2506},{"style":145},[2507],{"type":44,"value":345},{"type":38,"tag":132,"props":2509,"children":2511},{"class":134,"line":2510},23,[2512,2517,2521,2525,2530,2534],{"type":38,"tag":132,"props":2513,"children":2514},{"style":251},[2515],{"type":44,"value":2516},"    from",{"type":38,"tag":132,"props":2518,"children":2519},{"style":145},[2520],{"type":44,"value":259},{"type":38,"tag":132,"props":2522,"children":2523},{"style":145},[2524],{"type":44,"value":179},{"type":38,"tag":132,"props":2526,"children":2527},{"style":182},[2528],{"type":44,"value":2529},"Alice",{"type":38,"tag":132,"props":2531,"children":2532},{"style":145},[2533],{"type":44,"value":190},{"type":38,"tag":132,"props":2535,"children":2536},{"style":145},[2537],{"type":44,"value":475},{"type":38,"tag":132,"props":2539,"children":2541},{"class":134,"line":2540},24,[2542,2547,2551,2555,2560,2564],{"type":38,"tag":132,"props":2543,"children":2544},{"style":251},[2545],{"type":44,"value":2546},"    to",{"type":38,"tag":132,"props":2548,"children":2549},{"style":145},[2550],{"type":44,"value":259},{"type":38,"tag":132,"props":2552,"children":2553},{"style":145},[2554],{"type":44,"value":179},{"type":38,"tag":132,"props":2556,"children":2557},{"style":182},[2558],{"type":44,"value":2559},"Bob",{"type":38,"tag":132,"props":2561,"children":2562},{"style":145},[2563],{"type":44,"value":190},{"type":38,"tag":132,"props":2565,"children":2566},{"style":145},[2567],{"type":44,"value":475},{"type":38,"tag":132,"props":2569,"children":2571},{"class":134,"line":2570},25,[2572,2577,2581,2585,2590,2594],{"type":38,"tag":132,"props":2573,"children":2574},{"style":251},[2575],{"type":44,"value":2576},"    contents",{"type":38,"tag":132,"props":2578,"children":2579},{"style":145},[2580],{"type":44,"value":259},{"type":38,"tag":132,"props":2582,"children":2583},{"style":145},[2584],{"type":44,"value":179},{"type":38,"tag":132,"props":2586,"children":2587},{"style":182},[2588],{"type":44,"value":2589},"Hello!",{"type":38,"tag":132,"props":2591,"children":2592},{"style":145},[2593],{"type":44,"value":190},{"type":38,"tag":132,"props":2595,"children":2596},{"style":145},[2597],{"type":44,"value":475},{"type":38,"tag":132,"props":2599,"children":2601},{"class":134,"line":2600},26,[2602],{"type":38,"tag":132,"props":2603,"children":2604},{"style":145},[2605],{"type":44,"value":493},{"type":38,"tag":132,"props":2607,"children":2609},{"class":134,"line":2608},27,[2610],{"type":38,"tag":132,"props":2611,"children":2612},{"style":145},[2613],{"type":44,"value":2614},"};\n",{"type":38,"tag":132,"props":2616,"children":2618},{"class":134,"line":2617},28,[2619],{"type":38,"tag":132,"props":2620,"children":2621},{"emptyLinePlaceholder":201},[2622],{"type":44,"value":204},{"type":38,"tag":132,"props":2624,"children":2626},{"class":134,"line":2625},29,[2627,2631,2635,2639,2643,2647,2651,2655,2659],{"type":38,"tag":132,"props":2628,"children":2629},{"style":211},[2630],{"type":44,"value":214},{"type":38,"tag":132,"props":2632,"children":2633},{"style":151},[2634],{"type":44,"value":1599},{"type":38,"tag":132,"props":2636,"children":2637},{"style":145},[2638],{"type":44,"value":224},{"type":38,"tag":132,"props":2640,"children":2641},{"style":139},[2642],{"type":44,"value":229},{"type":38,"tag":132,"props":2644,"children":2645},{"style":151},[2646],{"type":44,"value":531},{"type":38,"tag":132,"props":2648,"children":2649},{"style":145},[2650],{"type":44,"value":308},{"type":38,"tag":132,"props":2652,"children":2653},{"style":232},[2654],{"type":44,"value":75},{"type":38,"tag":132,"props":2656,"children":2657},{"style":151},[2658],{"type":44,"value":239},{"type":38,"tag":132,"props":2660,"children":2661},{"style":145},[2662],{"type":44,"value":244},{"type":38,"tag":132,"props":2664,"children":2666},{"class":134,"line":2665},30,[2667,2671,2675,2679,2683,2687],{"type":38,"tag":132,"props":2668,"children":2669},{"style":251},[2670],{"type":44,"value":888},{"type":38,"tag":132,"props":2672,"children":2673},{"style":145},[2674],{"type":44,"value":259},{"type":38,"tag":132,"props":2676,"children":2677},{"style":145},[2678],{"type":44,"value":179},{"type":38,"tag":132,"props":2680,"children":2681},{"style":182},[2682],{"type":44,"value":434},{"type":38,"tag":132,"props":2684,"children":2685},{"style":145},[2686],{"type":44,"value":190},{"type":38,"tag":132,"props":2688,"children":2689},{"style":145},[2690],{"type":44,"value":475},{"type":38,"tag":132,"props":2692,"children":2694},{"class":134,"line":2693},31,[2695,2699,2703],{"type":38,"tag":132,"props":2696,"children":2697},{"style":251},[2698],{"type":44,"value":916},{"type":38,"tag":132,"props":2700,"children":2701},{"style":145},[2702],{"type":44,"value":259},{"type":38,"tag":132,"props":2704,"children":2705},{"style":145},[2706],{"type":44,"value":345},{"type":38,"tag":132,"props":2708,"children":2710},{"class":134,"line":2709},32,[2711,2715,2719,2723,2727,2731],{"type":38,"tag":132,"props":2712,"children":2713},{"style":251},[2714],{"type":44,"value":932},{"type":38,"tag":132,"props":2716,"children":2717},{"style":145},[2718],{"type":44,"value":259},{"type":38,"tag":132,"props":2720,"children":2721},{"style":145},[2722],{"type":44,"value":179},{"type":38,"tag":132,"props":2724,"children":2725},{"style":182},[2726],{"type":44,"value":96},{"type":38,"tag":132,"props":2728,"children":2729},{"style":145},[2730],{"type":44,"value":190},{"type":38,"tag":132,"props":2732,"children":2733},{"style":145},[2734],{"type":44,"value":475},{"type":38,"tag":132,"props":2736,"children":2738},{"class":134,"line":2737},33,[2739,2743,2747,2751,2755,2759,2763,2767,2772,2776,2781,2786],{"type":38,"tag":132,"props":2740,"children":2741},{"style":251},[2742],{"type":44,"value":960},{"type":38,"tag":132,"props":2744,"children":2745},{"style":145},[2746],{"type":44,"value":259},{"type":38,"tag":132,"props":2748,"children":2749},{"style":151},[2750],{"type":44,"value":425},{"type":38,"tag":132,"props":2752,"children":2753},{"style":145},[2754],{"type":44,"value":190},{"type":38,"tag":132,"props":2756,"children":2757},{"style":182},[2758],{"type":44,"value":993},{"type":38,"tag":132,"props":2760,"children":2761},{"style":145},[2762],{"type":44,"value":190},{"type":38,"tag":132,"props":2764,"children":2765},{"style":145},[2766],{"type":44,"value":159},{"type":38,"tag":132,"props":2768,"children":2769},{"style":151},[2770],{"type":44,"value":2771}," JSON",{"type":38,"tag":132,"props":2773,"children":2774},{"style":145},[2775],{"type":44,"value":308},{"type":38,"tag":132,"props":2777,"children":2778},{"style":232},[2779],{"type":44,"value":2780},"stringify",{"type":38,"tag":132,"props":2782,"children":2783},{"style":151},[2784],{"type":44,"value":2785},"(typedData)]",{"type":38,"tag":132,"props":2787,"children":2788},{"style":145},[2789],{"type":44,"value":475},{"type":38,"tag":132,"props":2791,"children":2793},{"class":134,"line":2792},34,[2794],{"type":38,"tag":132,"props":2795,"children":2796},{"style":145},[2797],{"type":44,"value":493},{"type":38,"tag":132,"props":2799,"children":2801},{"class":134,"line":2800},35,[2802,2806,2810],{"type":38,"tag":132,"props":2803,"children":2804},{"style":145},[2805],{"type":44,"value":465},{"type":38,"tag":132,"props":2807,"children":2808},{"style":151},[2809],{"type":44,"value":470},{"type":38,"tag":132,"props":2811,"children":2812},{"style":145},[2813],{"type":44,"value":195},{"type":38,"tag":132,"props":2815,"children":2817},{"class":134,"line":2816},36,[2818],{"type":38,"tag":132,"props":2819,"children":2820},{"emptyLinePlaceholder":201},[2821],{"type":44,"value":204},{"type":38,"tag":132,"props":2823,"children":2825},{"class":134,"line":2824},37,[2826,2830,2834,2838,2842,2846,2851,2855,2859,2863],{"type":38,"tag":132,"props":2827,"children":2828},{"style":151},[2829],{"type":44,"value":1159},{"type":38,"tag":132,"props":2831,"children":2832},{"style":145},[2833],{"type":44,"value":308},{"type":38,"tag":132,"props":2835,"children":2836},{"style":232},[2837],{"type":44,"value":1168},{"type":38,"tag":132,"props":2839,"children":2840},{"style":151},[2841],{"type":44,"value":239},{"type":38,"tag":132,"props":2843,"children":2844},{"style":145},[2845],{"type":44,"value":190},{"type":38,"tag":132,"props":2847,"children":2848},{"style":182},[2849],{"type":44,"value":2850},"Typed data signature:",{"type":38,"tag":132,"props":2852,"children":2853},{"style":145},[2854],{"type":44,"value":190},{"type":38,"tag":132,"props":2856,"children":2857},{"style":145},[2858],{"type":44,"value":159},{"type":38,"tag":132,"props":2860,"children":2861},{"style":151},[2862],{"type":44,"value":1806},{"type":38,"tag":132,"props":2864,"children":2865},{"style":145},[2866],{"type":44,"value":195},{"type":38,"tag":114,"props":2868,"children":2870},{"id":2869},"step-6-cross-chain-scope-selection",[2871],{"type":44,"value":2872},"Step 6: Cross-chain scope selection",{"type":38,"tag":54,"props":2874,"children":2875},{},[2876,2878,2883],{"type":44,"value":2877},"Each ",{"type":38,"tag":70,"props":2879,"children":2881},{"className":2880},[],[2882],{"type":44,"value":75},{"type":44,"value":2884}," call targets a specific chain via its scope. You do not need to \"switch chains\" — just use the appropriate scope.",{"type":38,"tag":121,"props":2886,"children":2888},{"className":123,"code":2887,"language":125,"meta":126,"style":126},"\u002F\u002F Send on Polygon\nawait client.invokeMethod({\n  scope: 'eip155:137',\n  request: {\n    method: 'eth_sendTransaction',\n    params: [{ from: '0x...', to: '0x...', value: '0xDE0B6B3A7640000' }],\n  },\n});\n\n\u002F\u002F Read balance on Ethereum\nconst ethBalance = await client.invokeMethod({\n  scope: 'eip155:1',\n  request: {\n    method: 'eth_getBalance',\n    params: ['0xYourAddress', 'latest'],\n  },\n});\n\n\u002F\u002F Read balance on Polygon\nconst polyBalance = await client.invokeMethod({\n  scope: 'eip155:137',\n  request: {\n    method: 'eth_getBalance',\n    params: ['0xYourAddress', 'latest'],\n  },\n});\n",[2889],{"type":38,"tag":70,"props":2890,"children":2891},{"__ignoreMap":126},[2892,2900,2927,2954,2969,2996,3099,3106,3121,3128,3136,3176,3203,3218,3245,3297,3304,3319,3326,3334,3374,3401,3416,3443,3494,3501],{"type":38,"tag":132,"props":2893,"children":2894},{"class":134,"line":135},[2895],{"type":38,"tag":132,"props":2896,"children":2897},{"style":594},[2898],{"type":44,"value":2899},"\u002F\u002F Send on Polygon\n",{"type":38,"tag":132,"props":2901,"children":2902},{"class":134,"line":22},[2903,2907,2911,2915,2919,2923],{"type":38,"tag":132,"props":2904,"children":2905},{"style":139},[2906],{"type":44,"value":526},{"type":38,"tag":132,"props":2908,"children":2909},{"style":151},[2910],{"type":44,"value":531},{"type":38,"tag":132,"props":2912,"children":2913},{"style":145},[2914],{"type":44,"value":308},{"type":38,"tag":132,"props":2916,"children":2917},{"style":232},[2918],{"type":44,"value":75},{"type":38,"tag":132,"props":2920,"children":2921},{"style":151},[2922],{"type":44,"value":239},{"type":38,"tag":132,"props":2924,"children":2925},{"style":145},[2926],{"type":44,"value":244},{"type":38,"tag":132,"props":2928,"children":2929},{"class":134,"line":207},[2930,2934,2938,2942,2946,2950],{"type":38,"tag":132,"props":2931,"children":2932},{"style":251},[2933],{"type":44,"value":888},{"type":38,"tag":132,"props":2935,"children":2936},{"style":145},[2937],{"type":44,"value":259},{"type":38,"tag":132,"props":2939,"children":2940},{"style":145},[2941],{"type":44,"value":179},{"type":38,"tag":132,"props":2943,"children":2944},{"style":182},[2945],{"type":44,"value":451},{"type":38,"tag":132,"props":2947,"children":2948},{"style":145},[2949],{"type":44,"value":190},{"type":38,"tag":132,"props":2951,"children":2952},{"style":145},[2953],{"type":44,"value":475},{"type":38,"tag":132,"props":2955,"children":2956},{"class":134,"line":247},[2957,2961,2965],{"type":38,"tag":132,"props":2958,"children":2959},{"style":251},[2960],{"type":44,"value":916},{"type":38,"tag":132,"props":2962,"children":2963},{"style":145},[2964],{"type":44,"value":259},{"type":38,"tag":132,"props":2966,"children":2967},{"style":145},[2968],{"type":44,"value":345},{"type":38,"tag":132,"props":2970,"children":2971},{"class":134,"line":330},[2972,2976,2980,2984,2988,2992],{"type":38,"tag":132,"props":2973,"children":2974},{"style":251},[2975],{"type":44,"value":932},{"type":38,"tag":132,"props":2977,"children":2978},{"style":145},[2979],{"type":44,"value":259},{"type":38,"tag":132,"props":2981,"children":2982},{"style":145},[2983],{"type":44,"value":179},{"type":38,"tag":132,"props":2985,"children":2986},{"style":182},[2987],{"type":44,"value":768},{"type":38,"tag":132,"props":2989,"children":2990},{"style":145},[2991],{"type":44,"value":190},{"type":38,"tag":132,"props":2993,"children":2994},{"style":145},[2995],{"type":44,"value":475},{"type":38,"tag":132,"props":2997,"children":2998},{"class":134,"line":348},[2999,3003,3007,3011,3015,3019,3023,3027,3032,3036,3040,3045,3049,3053,3057,3061,3065,3070,3074,3078,3083,3087,3091,3095],{"type":38,"tag":132,"props":3000,"children":3001},{"style":251},[3002],{"type":44,"value":960},{"type":38,"tag":132,"props":3004,"children":3005},{"style":145},[3006],{"type":44,"value":259},{"type":38,"tag":132,"props":3008,"children":3009},{"style":151},[3010],{"type":44,"value":425},{"type":38,"tag":132,"props":3012,"children":3013},{"style":145},[3014],{"type":44,"value":385},{"type":38,"tag":132,"props":3016,"children":3017},{"style":251},[3018],{"type":44,"value":174},{"type":38,"tag":132,"props":3020,"children":3021},{"style":145},[3022],{"type":44,"value":259},{"type":38,"tag":132,"props":3024,"children":3025},{"style":145},[3026],{"type":44,"value":179},{"type":38,"tag":132,"props":3028,"children":3029},{"style":182},[3030],{"type":44,"value":3031},"0x...",{"type":38,"tag":132,"props":3033,"children":3034},{"style":145},[3035],{"type":44,"value":190},{"type":38,"tag":132,"props":3037,"children":3038},{"style":145},[3039],{"type":44,"value":159},{"type":38,"tag":132,"props":3041,"children":3042},{"style":251},[3043],{"type":44,"value":3044}," to",{"type":38,"tag":132,"props":3046,"children":3047},{"style":145},[3048],{"type":44,"value":259},{"type":38,"tag":132,"props":3050,"children":3051},{"style":145},[3052],{"type":44,"value":179},{"type":38,"tag":132,"props":3054,"children":3055},{"style":182},[3056],{"type":44,"value":3031},{"type":38,"tag":132,"props":3058,"children":3059},{"style":145},[3060],{"type":44,"value":190},{"type":38,"tag":132,"props":3062,"children":3063},{"style":145},[3064],{"type":44,"value":159},{"type":38,"tag":132,"props":3066,"children":3067},{"style":251},[3068],{"type":44,"value":3069}," value",{"type":38,"tag":132,"props":3071,"children":3072},{"style":145},[3073],{"type":44,"value":259},{"type":38,"tag":132,"props":3075,"children":3076},{"style":145},[3077],{"type":44,"value":179},{"type":38,"tag":132,"props":3079,"children":3080},{"style":182},[3081],{"type":44,"value":3082},"0xDE0B6B3A7640000",{"type":38,"tag":132,"props":3084,"children":3085},{"style":145},[3086],{"type":44,"value":190},{"type":38,"tag":132,"props":3088,"children":3089},{"style":145},[3090],{"type":44,"value":169},{"type":38,"tag":132,"props":3092,"children":3093},{"style":151},[3094],{"type":44,"value":587},{"type":38,"tag":132,"props":3096,"children":3097},{"style":145},[3098],{"type":44,"value":475},{"type":38,"tag":132,"props":3100,"children":3101},{"class":134,"line":365},[3102],{"type":38,"tag":132,"props":3103,"children":3104},{"style":145},[3105],{"type":44,"value":493},{"type":38,"tag":132,"props":3107,"children":3108},{"class":134,"line":478},[3109,3113,3117],{"type":38,"tag":132,"props":3110,"children":3111},{"style":145},[3112],{"type":44,"value":465},{"type":38,"tag":132,"props":3114,"children":3115},{"style":151},[3116],{"type":44,"value":470},{"type":38,"tag":132,"props":3118,"children":3119},{"style":145},[3120],{"type":44,"value":195},{"type":38,"tag":132,"props":3122,"children":3123},{"class":134,"line":487},[3124],{"type":38,"tag":132,"props":3125,"children":3126},{"emptyLinePlaceholder":201},[3127],{"type":44,"value":204},{"type":38,"tag":132,"props":3129,"children":3130},{"class":134,"line":496},[3131],{"type":38,"tag":132,"props":3132,"children":3133},{"style":594},[3134],{"type":44,"value":3135},"\u002F\u002F Read balance on Ethereum\n",{"type":38,"tag":132,"props":3137,"children":3138},{"class":134,"line":512},[3139,3143,3148,3152,3156,3160,3164,3168,3172],{"type":38,"tag":132,"props":3140,"children":3141},{"style":211},[3142],{"type":44,"value":214},{"type":38,"tag":132,"props":3144,"children":3145},{"style":151},[3146],{"type":44,"value":3147}," ethBalance ",{"type":38,"tag":132,"props":3149,"children":3150},{"style":145},[3151],{"type":44,"value":224},{"type":38,"tag":132,"props":3153,"children":3154},{"style":139},[3155],{"type":44,"value":229},{"type":38,"tag":132,"props":3157,"children":3158},{"style":151},[3159],{"type":44,"value":531},{"type":38,"tag":132,"props":3161,"children":3162},{"style":145},[3163],{"type":44,"value":308},{"type":38,"tag":132,"props":3165,"children":3166},{"style":232},[3167],{"type":44,"value":75},{"type":38,"tag":132,"props":3169,"children":3170},{"style":151},[3171],{"type":44,"value":239},{"type":38,"tag":132,"props":3173,"children":3174},{"style":145},[3175],{"type":44,"value":244},{"type":38,"tag":132,"props":3177,"children":3178},{"class":134,"line":520},[3179,3183,3187,3191,3195,3199],{"type":38,"tag":132,"props":3180,"children":3181},{"style":251},[3182],{"type":44,"value":888},{"type":38,"tag":132,"props":3184,"children":3185},{"style":145},[3186],{"type":44,"value":259},{"type":38,"tag":132,"props":3188,"children":3189},{"style":145},[3190],{"type":44,"value":179},{"type":38,"tag":132,"props":3192,"children":3193},{"style":182},[3194],{"type":44,"value":434},{"type":38,"tag":132,"props":3196,"children":3197},{"style":145},[3198],{"type":44,"value":190},{"type":38,"tag":132,"props":3200,"children":3201},{"style":145},[3202],{"type":44,"value":475},{"type":38,"tag":132,"props":3204,"children":3205},{"class":134,"line":548},[3206,3210,3214],{"type":38,"tag":132,"props":3207,"children":3208},{"style":251},[3209],{"type":44,"value":916},{"type":38,"tag":132,"props":3211,"children":3212},{"style":145},[3213],{"type":44,"value":259},{"type":38,"tag":132,"props":3215,"children":3216},{"style":145},[3217],{"type":44,"value":345},{"type":38,"tag":132,"props":3219,"children":3220},{"class":134,"line":600},[3221,3225,3229,3233,3237,3241],{"type":38,"tag":132,"props":3222,"children":3223},{"style":251},[3224],{"type":44,"value":932},{"type":38,"tag":132,"props":3226,"children":3227},{"style":145},[3228],{"type":44,"value":259},{"type":38,"tag":132,"props":3230,"children":3231},{"style":145},[3232],{"type":44,"value":179},{"type":38,"tag":132,"props":3234,"children":3235},{"style":182},[3236],{"type":44,"value":695},{"type":38,"tag":132,"props":3238,"children":3239},{"style":145},[3240],{"type":44,"value":190},{"type":38,"tag":132,"props":3242,"children":3243},{"style":145},[3244],{"type":44,"value":475},{"type":38,"tag":132,"props":3246,"children":3247},{"class":134,"line":613},[3248,3252,3256,3260,3264,3268,3272,3276,3280,3285,3289,3293],{"type":38,"tag":132,"props":3249,"children":3250},{"style":251},[3251],{"type":44,"value":960},{"type":38,"tag":132,"props":3253,"children":3254},{"style":145},[3255],{"type":44,"value":259},{"type":38,"tag":132,"props":3257,"children":3258},{"style":151},[3259],{"type":44,"value":425},{"type":38,"tag":132,"props":3261,"children":3262},{"style":145},[3263],{"type":44,"value":190},{"type":38,"tag":132,"props":3265,"children":3266},{"style":182},[3267],{"type":44,"value":993},{"type":38,"tag":132,"props":3269,"children":3270},{"style":145},[3271],{"type":44,"value":190},{"type":38,"tag":132,"props":3273,"children":3274},{"style":145},[3275],{"type":44,"value":159},{"type":38,"tag":132,"props":3277,"children":3278},{"style":145},[3279],{"type":44,"value":179},{"type":38,"tag":132,"props":3281,"children":3282},{"style":182},[3283],{"type":44,"value":3284},"latest",{"type":38,"tag":132,"props":3286,"children":3287},{"style":145},[3288],{"type":44,"value":190},{"type":38,"tag":132,"props":3290,"children":3291},{"style":151},[3292],{"type":44,"value":587},{"type":38,"tag":132,"props":3294,"children":3295},{"style":145},[3296],{"type":44,"value":475},{"type":38,"tag":132,"props":3298,"children":3299},{"class":134,"line":2356},[3300],{"type":38,"tag":132,"props":3301,"children":3302},{"style":145},[3303],{"type":44,"value":493},{"type":38,"tag":132,"props":3305,"children":3306},{"class":134,"line":2373},[3307,3311,3315],{"type":38,"tag":132,"props":3308,"children":3309},{"style":145},[3310],{"type":44,"value":465},{"type":38,"tag":132,"props":3312,"children":3313},{"style":151},[3314],{"type":44,"value":470},{"type":38,"tag":132,"props":3316,"children":3317},{"style":145},[3318],{"type":44,"value":195},{"type":38,"tag":132,"props":3320,"children":3321},{"class":134,"line":2402},[3322],{"type":38,"tag":132,"props":3323,"children":3324},{"emptyLinePlaceholder":201},[3325],{"type":44,"value":204},{"type":38,"tag":132,"props":3327,"children":3328},{"class":134,"line":2432},[3329],{"type":38,"tag":132,"props":3330,"children":3331},{"style":594},[3332],{"type":44,"value":3333},"\u002F\u002F Read balance on Polygon\n",{"type":38,"tag":132,"props":3335,"children":3336},{"class":134,"line":2455},[3337,3341,3346,3350,3354,3358,3362,3366,3370],{"type":38,"tag":132,"props":3338,"children":3339},{"style":211},[3340],{"type":44,"value":214},{"type":38,"tag":132,"props":3342,"children":3343},{"style":151},[3344],{"type":44,"value":3345}," polyBalance ",{"type":38,"tag":132,"props":3347,"children":3348},{"style":145},[3349],{"type":44,"value":224},{"type":38,"tag":132,"props":3351,"children":3352},{"style":139},[3353],{"type":44,"value":229},{"type":38,"tag":132,"props":3355,"children":3356},{"style":151},[3357],{"type":44,"value":531},{"type":38,"tag":132,"props":3359,"children":3360},{"style":145},[3361],{"type":44,"value":308},{"type":38,"tag":132,"props":3363,"children":3364},{"style":232},[3365],{"type":44,"value":75},{"type":38,"tag":132,"props":3367,"children":3368},{"style":151},[3369],{"type":44,"value":239},{"type":38,"tag":132,"props":3371,"children":3372},{"style":145},[3373],{"type":44,"value":244},{"type":38,"tag":132,"props":3375,"children":3376},{"class":134,"line":2485},[3377,3381,3385,3389,3393,3397],{"type":38,"tag":132,"props":3378,"children":3379},{"style":251},[3380],{"type":44,"value":888},{"type":38,"tag":132,"props":3382,"children":3383},{"style":145},[3384],{"type":44,"value":259},{"type":38,"tag":132,"props":3386,"children":3387},{"style":145},[3388],{"type":44,"value":179},{"type":38,"tag":132,"props":3390,"children":3391},{"style":182},[3392],{"type":44,"value":451},{"type":38,"tag":132,"props":3394,"children":3395},{"style":145},[3396],{"type":44,"value":190},{"type":38,"tag":132,"props":3398,"children":3399},{"style":145},[3400],{"type":44,"value":475},{"type":38,"tag":132,"props":3402,"children":3403},{"class":134,"line":2493},[3404,3408,3412],{"type":38,"tag":132,"props":3405,"children":3406},{"style":251},[3407],{"type":44,"value":916},{"type":38,"tag":132,"props":3409,"children":3410},{"style":145},[3411],{"type":44,"value":259},{"type":38,"tag":132,"props":3413,"children":3414},{"style":145},[3415],{"type":44,"value":345},{"type":38,"tag":132,"props":3417,"children":3418},{"class":134,"line":2510},[3419,3423,3427,3431,3435,3439],{"type":38,"tag":132,"props":3420,"children":3421},{"style":251},[3422],{"type":44,"value":932},{"type":38,"tag":132,"props":3424,"children":3425},{"style":145},[3426],{"type":44,"value":259},{"type":38,"tag":132,"props":3428,"children":3429},{"style":145},[3430],{"type":44,"value":179},{"type":38,"tag":132,"props":3432,"children":3433},{"style":182},[3434],{"type":44,"value":695},{"type":38,"tag":132,"props":3436,"children":3437},{"style":145},[3438],{"type":44,"value":190},{"type":38,"tag":132,"props":3440,"children":3441},{"style":145},[3442],{"type":44,"value":475},{"type":38,"tag":132,"props":3444,"children":3445},{"class":134,"line":2540},[3446,3450,3454,3458,3462,3466,3470,3474,3478,3482,3486,3490],{"type":38,"tag":132,"props":3447,"children":3448},{"style":251},[3449],{"type":44,"value":960},{"type":38,"tag":132,"props":3451,"children":3452},{"style":145},[3453],{"type":44,"value":259},{"type":38,"tag":132,"props":3455,"children":3456},{"style":151},[3457],{"type":44,"value":425},{"type":38,"tag":132,"props":3459,"children":3460},{"style":145},[3461],{"type":44,"value":190},{"type":38,"tag":132,"props":3463,"children":3464},{"style":182},[3465],{"type":44,"value":993},{"type":38,"tag":132,"props":3467,"children":3468},{"style":145},[3469],{"type":44,"value":190},{"type":38,"tag":132,"props":3471,"children":3472},{"style":145},[3473],{"type":44,"value":159},{"type":38,"tag":132,"props":3475,"children":3476},{"style":145},[3477],{"type":44,"value":179},{"type":38,"tag":132,"props":3479,"children":3480},{"style":182},[3481],{"type":44,"value":3284},{"type":38,"tag":132,"props":3483,"children":3484},{"style":145},[3485],{"type":44,"value":190},{"type":38,"tag":132,"props":3487,"children":3488},{"style":151},[3489],{"type":44,"value":587},{"type":38,"tag":132,"props":3491,"children":3492},{"style":145},[3493],{"type":44,"value":475},{"type":38,"tag":132,"props":3495,"children":3496},{"class":134,"line":2570},[3497],{"type":38,"tag":132,"props":3498,"children":3499},{"style":145},[3500],{"type":44,"value":493},{"type":38,"tag":132,"props":3502,"children":3503},{"class":134,"line":2600},[3504,3508,3512],{"type":38,"tag":132,"props":3505,"children":3506},{"style":145},[3507],{"type":44,"value":465},{"type":38,"tag":132,"props":3509,"children":3510},{"style":151},[3511],{"type":44,"value":470},{"type":38,"tag":132,"props":3513,"children":3514},{"style":145},[3515],{"type":44,"value":195},{"type":38,"tag":114,"props":3517,"children":3519},{"id":3518},"step-7-error-handling-for-signing",[3520],{"type":44,"value":3521},"Step 7: Error handling for signing",{"type":38,"tag":121,"props":3523,"children":3525},{"className":123,"code":3524,"language":125,"meta":126,"style":126},"try {\n  const sig = await client.invokeMethod({\n    scope: 'eip155:1',\n    request: {\n      method: 'personal_sign',\n      params: [hexMessage, signerAddress],\n    },\n  });\n} catch (err) {\n  \u002F\u002F Multichain invokeMethod errors are wrapped in RPCInvokeMethodErr (code 53);\n  \u002F\u002F the wallet's original code is on err.rpcCode\n  if (err instanceof RPCInvokeMethodErr && err.rpcCode === 4001) {\n    \u002F\u002F User rejected the signing request\n    return;\n  }\n  throw err;\n}\n",[3526],{"type":38,"tag":70,"props":3527,"children":3528},{"__ignoreMap":126},[3529,3541,3583,3611,3627,3655,3693,3700,3716,3737,3745,3753,3820,3828,3840,3848,3864],{"type":38,"tag":132,"props":3530,"children":3531},{"class":134,"line":135},[3532,3537],{"type":38,"tag":132,"props":3533,"children":3534},{"style":139},[3535],{"type":44,"value":3536},"try",{"type":38,"tag":132,"props":3538,"children":3539},{"style":145},[3540],{"type":44,"value":345},{"type":38,"tag":132,"props":3542,"children":3543},{"class":134,"line":22},[3544,3549,3554,3559,3563,3567,3571,3575,3579],{"type":38,"tag":132,"props":3545,"children":3546},{"style":211},[3547],{"type":44,"value":3548},"  const",{"type":38,"tag":132,"props":3550,"children":3551},{"style":151},[3552],{"type":44,"value":3553}," sig",{"type":38,"tag":132,"props":3555,"children":3556},{"style":145},[3557],{"type":44,"value":3558}," =",{"type":38,"tag":132,"props":3560,"children":3561},{"style":139},[3562],{"type":44,"value":229},{"type":38,"tag":132,"props":3564,"children":3565},{"style":151},[3566],{"type":44,"value":531},{"type":38,"tag":132,"props":3568,"children":3569},{"style":145},[3570],{"type":44,"value":308},{"type":38,"tag":132,"props":3572,"children":3573},{"style":232},[3574],{"type":44,"value":75},{"type":38,"tag":132,"props":3576,"children":3577},{"style":251},[3578],{"type":44,"value":239},{"type":38,"tag":132,"props":3580,"children":3581},{"style":145},[3582],{"type":44,"value":244},{"type":38,"tag":132,"props":3584,"children":3585},{"class":134,"line":207},[3586,3591,3595,3599,3603,3607],{"type":38,"tag":132,"props":3587,"children":3588},{"style":251},[3589],{"type":44,"value":3590},"    scope",{"type":38,"tag":132,"props":3592,"children":3593},{"style":145},[3594],{"type":44,"value":259},{"type":38,"tag":132,"props":3596,"children":3597},{"style":145},[3598],{"type":44,"value":179},{"type":38,"tag":132,"props":3600,"children":3601},{"style":182},[3602],{"type":44,"value":434},{"type":38,"tag":132,"props":3604,"children":3605},{"style":145},[3606],{"type":44,"value":190},{"type":38,"tag":132,"props":3608,"children":3609},{"style":145},[3610],{"type":44,"value":475},{"type":38,"tag":132,"props":3612,"children":3613},{"class":134,"line":247},[3614,3619,3623],{"type":38,"tag":132,"props":3615,"children":3616},{"style":251},[3617],{"type":44,"value":3618},"    request",{"type":38,"tag":132,"props":3620,"children":3621},{"style":145},[3622],{"type":44,"value":259},{"type":38,"tag":132,"props":3624,"children":3625},{"style":145},[3626],{"type":44,"value":345},{"type":38,"tag":132,"props":3628,"children":3629},{"class":134,"line":330},[3630,3635,3639,3643,3647,3651],{"type":38,"tag":132,"props":3631,"children":3632},{"style":251},[3633],{"type":44,"value":3634},"      method",{"type":38,"tag":132,"props":3636,"children":3637},{"style":145},[3638],{"type":44,"value":259},{"type":38,"tag":132,"props":3640,"children":3641},{"style":145},[3642],{"type":44,"value":179},{"type":38,"tag":132,"props":3644,"children":3645},{"style":182},[3646],{"type":44,"value":88},{"type":38,"tag":132,"props":3648,"children":3649},{"style":145},[3650],{"type":44,"value":190},{"type":38,"tag":132,"props":3652,"children":3653},{"style":145},[3654],{"type":44,"value":475},{"type":38,"tag":132,"props":3656,"children":3657},{"class":134,"line":348},[3658,3663,3667,3671,3676,3680,3685,3689],{"type":38,"tag":132,"props":3659,"children":3660},{"style":251},[3661],{"type":44,"value":3662},"      params",{"type":38,"tag":132,"props":3664,"children":3665},{"style":145},[3666],{"type":44,"value":259},{"type":38,"tag":132,"props":3668,"children":3669},{"style":251},[3670],{"type":44,"value":425},{"type":38,"tag":132,"props":3672,"children":3673},{"style":151},[3674],{"type":44,"value":3675},"hexMessage",{"type":38,"tag":132,"props":3677,"children":3678},{"style":145},[3679],{"type":44,"value":159},{"type":38,"tag":132,"props":3681,"children":3682},{"style":151},[3683],{"type":44,"value":3684}," signerAddress",{"type":38,"tag":132,"props":3686,"children":3687},{"style":251},[3688],{"type":44,"value":587},{"type":38,"tag":132,"props":3690,"children":3691},{"style":145},[3692],{"type":44,"value":475},{"type":38,"tag":132,"props":3694,"children":3695},{"class":134,"line":365},[3696],{"type":38,"tag":132,"props":3697,"children":3698},{"style":145},[3699],{"type":44,"value":484},{"type":38,"tag":132,"props":3701,"children":3702},{"class":134,"line":478},[3703,3708,3712],{"type":38,"tag":132,"props":3704,"children":3705},{"style":145},[3706],{"type":44,"value":3707},"  }",{"type":38,"tag":132,"props":3709,"children":3710},{"style":251},[3711],{"type":44,"value":470},{"type":38,"tag":132,"props":3713,"children":3714},{"style":145},[3715],{"type":44,"value":195},{"type":38,"tag":132,"props":3717,"children":3718},{"class":134,"line":487},[3719,3723,3728,3733],{"type":38,"tag":132,"props":3720,"children":3721},{"style":145},[3722],{"type":44,"value":465},{"type":38,"tag":132,"props":3724,"children":3725},{"style":139},[3726],{"type":44,"value":3727}," catch",{"type":38,"tag":132,"props":3729,"children":3730},{"style":151},[3731],{"type":44,"value":3732}," (err) ",{"type":38,"tag":132,"props":3734,"children":3735},{"style":145},[3736],{"type":44,"value":244},{"type":38,"tag":132,"props":3738,"children":3739},{"class":134,"line":496},[3740],{"type":38,"tag":132,"props":3741,"children":3742},{"style":594},[3743],{"type":44,"value":3744},"  \u002F\u002F Multichain invokeMethod errors are wrapped in RPCInvokeMethodErr (code 53);\n",{"type":38,"tag":132,"props":3746,"children":3747},{"class":134,"line":512},[3748],{"type":38,"tag":132,"props":3749,"children":3750},{"style":594},[3751],{"type":44,"value":3752},"  \u002F\u002F the wallet's original code is on err.rpcCode\n",{"type":38,"tag":132,"props":3754,"children":3755},{"class":134,"line":520},[3756,3761,3766,3771,3776,3782,3787,3792,3796,3801,3806,3811,3816],{"type":38,"tag":132,"props":3757,"children":3758},{"style":139},[3759],{"type":44,"value":3760},"  if",{"type":38,"tag":132,"props":3762,"children":3763},{"style":251},[3764],{"type":44,"value":3765}," (",{"type":38,"tag":132,"props":3767,"children":3768},{"style":151},[3769],{"type":44,"value":3770},"err",{"type":38,"tag":132,"props":3772,"children":3773},{"style":145},[3774],{"type":44,"value":3775}," instanceof",{"type":38,"tag":132,"props":3777,"children":3779},{"style":3778},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[3780],{"type":44,"value":3781}," RPCInvokeMethodErr",{"type":38,"tag":132,"props":3783,"children":3784},{"style":145},[3785],{"type":44,"value":3786}," &&",{"type":38,"tag":132,"props":3788,"children":3789},{"style":151},[3790],{"type":44,"value":3791}," err",{"type":38,"tag":132,"props":3793,"children":3794},{"style":145},[3795],{"type":44,"value":308},{"type":38,"tag":132,"props":3797,"children":3798},{"style":151},[3799],{"type":44,"value":3800},"rpcCode",{"type":38,"tag":132,"props":3802,"children":3803},{"style":145},[3804],{"type":44,"value":3805}," ===",{"type":38,"tag":132,"props":3807,"children":3808},{"style":2445},[3809],{"type":44,"value":3810}," 4001",{"type":38,"tag":132,"props":3812,"children":3813},{"style":251},[3814],{"type":44,"value":3815},") ",{"type":38,"tag":132,"props":3817,"children":3818},{"style":145},[3819],{"type":44,"value":244},{"type":38,"tag":132,"props":3821,"children":3822},{"class":134,"line":548},[3823],{"type":38,"tag":132,"props":3824,"children":3825},{"style":594},[3826],{"type":44,"value":3827},"    \u002F\u002F User rejected the signing request\n",{"type":38,"tag":132,"props":3829,"children":3830},{"class":134,"line":600},[3831,3836],{"type":38,"tag":132,"props":3832,"children":3833},{"style":139},[3834],{"type":44,"value":3835},"    return",{"type":38,"tag":132,"props":3837,"children":3838},{"style":145},[3839],{"type":44,"value":195},{"type":38,"tag":132,"props":3841,"children":3842},{"class":134,"line":613},[3843],{"type":38,"tag":132,"props":3844,"children":3845},{"style":145},[3846],{"type":44,"value":3847},"  }\n",{"type":38,"tag":132,"props":3849,"children":3850},{"class":134,"line":2356},[3851,3856,3860],{"type":38,"tag":132,"props":3852,"children":3853},{"style":139},[3854],{"type":44,"value":3855},"  throw",{"type":38,"tag":132,"props":3857,"children":3858},{"style":151},[3859],{"type":44,"value":3791},{"type":38,"tag":132,"props":3861,"children":3862},{"style":145},[3863],{"type":44,"value":195},{"type":38,"tag":132,"props":3865,"children":3866},{"class":134,"line":2373},[3867],{"type":38,"tag":132,"props":3868,"children":3869},{"style":145},[3870],{"type":44,"value":3871},"}\n",{"type":38,"tag":54,"props":3873,"children":3874},{},[3875,3877,3883,3885,3891],{"type":44,"value":3876},"(Import the class with ",{"type":38,"tag":70,"props":3878,"children":3880},{"className":3879},[],[3881],{"type":44,"value":3882},"import { RPCInvokeMethodErr } from '@metamask\u002Fconnect-multichain';",{"type":44,"value":3884},". Revert reasons \u002F custom error bytes from the wallet are available on ",{"type":38,"tag":70,"props":3886,"children":3888},{"className":3887},[],[3889],{"type":44,"value":3890},"err.rpcData",{"type":44,"value":3892},".)",{"type":38,"tag":47,"props":3894,"children":3896},{"id":3895},"important-notes",[3897],{"type":44,"value":3898},"Important Notes",{"type":38,"tag":60,"props":3900,"children":3901},{},[3902,3955,3972,3982,4028,4048,4065],{"type":38,"tag":64,"props":3903,"children":3904},{},[3905,3910,3912,3918,3920,3925,3927,3933,3935,3940,3941,3946,3947,3953],{"type":38,"tag":674,"props":3906,"children":3907},{},[3908],{"type":44,"value":3909},"Scope = chain target:",{"type":44,"value":3911}," The ",{"type":38,"tag":70,"props":3913,"children":3915},{"className":3914},[],[3916],{"type":44,"value":3917},"scope",{"type":44,"value":3919}," field in ",{"type":38,"tag":70,"props":3921,"children":3923},{"className":3922},[],[3924],{"type":44,"value":75},{"type":44,"value":3926}," determines which chain the method executes on. Use ",{"type":38,"tag":70,"props":3928,"children":3930},{"className":3929},[],[3931],{"type":44,"value":3932},"'eip155:\u003Cdecimal-chainId>'",{"type":44,"value":3934}," format (e.g., ",{"type":38,"tag":70,"props":3936,"children":3938},{"className":3937},[],[3939],{"type":44,"value":817},{"type":44,"value":689},{"type":38,"tag":70,"props":3942,"children":3944},{"className":3943},[],[3945],{"type":44,"value":825},{"type":44,"value":689},{"type":38,"tag":70,"props":3948,"children":3950},{"className":3949},[],[3951],{"type":44,"value":3952},"'eip155:42161'",{"type":44,"value":3954},").",{"type":38,"tag":64,"props":3956,"children":3957},{},[3958,3963,3965,3970],{"type":38,"tag":674,"props":3959,"children":3960},{},[3961],{"type":44,"value":3962},"No chain switching needed:",{"type":44,"value":3964}," Unlike single-chain EVM clients, the multichain client does not require ",{"type":38,"tag":70,"props":3966,"children":3968},{"className":3967},[],[3969],{"type":44,"value":787},{"type":44,"value":3971},". Each call specifies its own scope.",{"type":38,"tag":64,"props":3973,"children":3974},{},[3975,3980],{"type":38,"tag":674,"props":3976,"children":3977},{},[3978],{"type":44,"value":3979},"Read vs sign routing:",{"type":44,"value":3981}," Read-only methods go to the RPC node (fast, no user prompt). Signing methods go to the wallet (requires user approval in MetaMask).",{"type":38,"tag":64,"props":3983,"children":3984},{},[3985,3990,3992,3997,3999,4004,4006,4011,4013,4019,4020,4026],{"type":38,"tag":674,"props":3986,"children":3987},{},[3988],{"type":44,"value":3989},"Hex encoding:",{"type":44,"value":3991}," ",{"type":38,"tag":70,"props":3993,"children":3995},{"className":3994},[],[3996],{"type":44,"value":88},{"type":44,"value":3998}," expects the message as a hex string (",{"type":38,"tag":70,"props":4000,"children":4002},{"className":4001},[],[4003],{"type":44,"value":3031},{"type":44,"value":4005},"). ",{"type":38,"tag":70,"props":4007,"children":4009},{"className":4008},[],[4010],{"type":44,"value":768},{"type":44,"value":4012}," expects ",{"type":38,"tag":70,"props":4014,"children":4016},{"className":4015},[],[4017],{"type":44,"value":4018},"value",{"type":44,"value":689},{"type":38,"tag":70,"props":4021,"children":4023},{"className":4022},[],[4024],{"type":44,"value":4025},"gas",{"type":44,"value":4027},", and other numeric fields as hex strings.",{"type":38,"tag":64,"props":4029,"children":4030},{},[4031,4040,4042,4046],{"type":38,"tag":674,"props":4032,"children":4033},{},[4034,4039],{"type":38,"tag":70,"props":4035,"children":4037},{"className":4036},[],[4038],{"type":44,"value":96},{"type":44,"value":259},{"type":44,"value":4041}," The typed data parameter must be a JSON ",{"type":38,"tag":674,"props":4043,"children":4044},{},[4045],{"type":44,"value":1932},{"type":44,"value":4047},", not an object.",{"type":38,"tag":64,"props":4049,"children":4050},{},[4051,4056,4058,4063],{"type":38,"tag":674,"props":4052,"children":4053},{},[4054],{"type":44,"value":4055},"Gas estimation:",{"type":44,"value":4057}," Always estimate gas with ",{"type":38,"tag":70,"props":4059,"children":4061},{"className":4060},[],[4062],{"type":44,"value":716},{"type":44,"value":4064}," before sending if you don't have a reliable gas value. This routes to the RPC node and does not prompt the user.",{"type":38,"tag":64,"props":4066,"children":4067},{},[4068,4073,4074,4079,4081,4087],{"type":38,"tag":674,"props":4069,"children":4070},{},[4071],{"type":44,"value":4072},"Connected scopes:",{"type":44,"value":3991},{"type":38,"tag":70,"props":4075,"children":4077},{"className":4076},[],[4078],{"type":44,"value":75},{"type":44,"value":4080}," will fail if the target scope was not included in the ",{"type":38,"tag":70,"props":4082,"children":4084},{"className":4083},[],[4085],{"type":44,"value":4086},"connect()",{"type":44,"value":4088}," call. Ensure you connect with all chains you intend to use.",{"type":38,"tag":4090,"props":4091,"children":4092},"style",{},[4093],{"type":44,"value":4094},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":4096,"total":2402},[4097,4112,4124,4136,4150,4167,4181],{"slug":4098,"name":4098,"fn":4099,"description":4100,"org":4101,"tags":4102,"stars":22,"repoUrl":23,"updatedAt":4111},"migrate-from-sdk","migrate MetaMask SDK to connect-evm and connect-solana","Migrate from @metamask\u002Fsdk to @metamask\u002Fconnect-evm, @metamask\u002Fconnect-multichain, and @metamask\u002Fconnect-solana with step-by-step package, API, and configuration changes",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[4103,4104,4107,4110],{"name":20,"slug":21,"type":15},{"name":4105,"slug":4106,"type":15},"Migration","migration",{"name":4108,"slug":4109,"type":15},"SDK","sdk",{"name":17,"slug":18,"type":15},"2026-07-13T06:11:46.427441",{"slug":4113,"name":4113,"fn":4114,"description":4115,"org":4116,"tags":4117,"stars":22,"repoUrl":23,"updatedAt":4123},"migrate-wagmi-metamask-connector","migrate wagmi apps to MetaMask connector","Migrate a wagmi app from @metamask\u002Fsdk to the new @metamask\u002Fconnect-evm connector (wagmi PR",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[4118,4119,4120,4122],{"name":20,"slug":21,"type":15},{"name":4105,"slug":4106,"type":15},{"name":4121,"slug":4121,"type":15},"wagmi",{"name":17,"slug":18,"type":15},"2026-07-13T06:12:23.110706",{"slug":4125,"name":4125,"fn":4126,"description":4127,"org":4128,"tags":4129,"stars":22,"repoUrl":23,"updatedAt":4135},"send-evm-transaction","send EVM transactions with MetaMask","Send ETH and contract transactions with MetaMask using eth_sendTransaction via the EIP-1193 provider, gas estimation, receipt polling, and the connectWith shortcut",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[4130,4133,4134],{"name":4131,"slug":4132,"type":15},"API Development","api-development",{"name":20,"slug":21,"type":15},{"name":17,"slug":18,"type":15},"2026-07-13T06:11:56.866623",{"slug":4137,"name":4137,"fn":4138,"description":4139,"org":4140,"tags":4141,"stars":22,"repoUrl":23,"updatedAt":4149},"send-solana-transaction","send Solana transactions via MetaMask","Build and send a Solana transaction using MetaMask Connect. Covers both the React wallet-adapter approach (sendTransaction) and the vanilla browser approach (signAndSendTransaction wallet-standard feature).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[4142,4145,4148],{"name":4143,"slug":4144,"type":15},"Payments","payments",{"name":4146,"slug":4147,"type":15},"Solana","solana",{"name":17,"slug":18,"type":15},"2026-07-13T06:12:03.942378",{"slug":4151,"name":4151,"fn":4152,"description":4153,"org":4154,"tags":4155,"stars":22,"repoUrl":23,"updatedAt":4166},"setup-evm-browser-app","scaffold EVM browser applications with MetaMask","Scaffold a vanilla JS\u002FTS browser app with MetaMask EVM integration using createEVMClient, EIP-1193 provider event listeners, RPC methods, and chain switching with chainConfiguration fallback",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[4156,4157,4160,4163,4165],{"name":20,"slug":21,"type":15},{"name":4158,"slug":4159,"type":15},"Frontend","frontend",{"name":4161,"slug":4162,"type":15},"JavaScript","javascript",{"name":4164,"slug":125,"type":15},"TypeScript",{"name":17,"slug":18,"type":15},"2026-07-13T06:12:01.334051",{"slug":4168,"name":4168,"fn":4169,"description":4170,"org":4171,"tags":4172,"stars":22,"repoUrl":23,"updatedAt":4180},"setup-evm-react-app","scaffold React apps with MetaMask integration","Scaffold a React app with MetaMask EVM integration using createEVMClient, useState\u002FuseEffect\u002FuseRef patterns, provider.request calls, chain switching, and error handling",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[4173,4174,4175,4176,4179],{"name":4131,"slug":4132,"type":15},{"name":20,"slug":21,"type":15},{"name":4158,"slug":4159,"type":15},{"name":4177,"slug":4178,"type":15},"React","react",{"name":17,"slug":18,"type":15},"2026-07-13T06:11:52.764143",{"slug":4182,"name":4182,"fn":4183,"description":4184,"org":4185,"tags":4186,"stars":22,"repoUrl":23,"updatedAt":4195},"setup-evm-react-native-app","scaffold React Native apps with MetaMask","Scaffold a React Native app with MetaMask EVM integration including required polyfills, metro.config.js shims, import order constraints, mobile deeplinks, and a full component example",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[4187,4188,4191,4194],{"name":20,"slug":21,"type":15},{"name":4189,"slug":4190,"type":15},"Mobile","mobile",{"name":4192,"slug":4193,"type":15},"React Native","react-native",{"name":17,"slug":18,"type":15},"2026-07-13T06:12:11.764689",{"items":4197,"total":2600},[4198,4216,4228,4240,4249,4259,4272,4286,4293,4300,4306,4312],{"slug":4199,"name":4199,"fn":4200,"description":4201,"org":4202,"tags":4203,"stars":4213,"repoUrl":4214,"updatedAt":4215},"smart-accounts-kit","build dApps with MetaMask Smart Accounts","Build dApps with MetaMask Smart Accounts Kit — ERC-4337 smart accounts, delegations, and Advanced Permissions (ERC-7715)",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[4204,4205,4208,4209,4212],{"name":4131,"slug":4132,"type":15},{"name":4206,"slug":4207,"type":15},"Auth","auth",{"name":20,"slug":21,"type":15},{"name":4210,"slug":4211,"type":15},"Permissions","permissions",{"name":17,"slug":18,"type":15},54,"https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fsmart-accounts-kit","2026-07-13T06:11:32.8327",{"slug":4217,"name":4217,"fn":4218,"description":4219,"org":4220,"tags":4221,"stars":4213,"repoUrl":4214,"updatedAt":4227},"x402-payments","build x402 payment flows","Build x402 payment flows using MetaMask Smart Accounts Kit, machine to machine payments over HTTP with ERC-7710 delegations and ERC-7715 Advanced Permissions",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[4222,4223,4224,4225],{"name":4131,"slug":4132,"type":15},{"name":4143,"slug":4144,"type":15},{"name":17,"slug":18,"type":15},{"name":4226,"slug":4226,"type":15},"x402","2026-07-13T06:11:30.877136",{"slug":4229,"name":4229,"fn":4230,"description":4231,"org":4232,"tags":4233,"stars":487,"repoUrl":4238,"updatedAt":4239},"discovery","discover and use services","Use the discovery tools to find and use services through a service matcher. Do not rely on prior knowledge of services, providers, or APIs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[4234,4235],{"name":4131,"slug":4132,"type":15},{"name":4236,"slug":4237,"type":15},"Search","search","https:\u002F\u002Fgithub.com\u002FMetaMask\u002Focap-kernel","2026-07-13T06:12:37.024095",{"slug":8,"name":8,"fn":4241,"description":4242,"org":4243,"tags":4244,"stars":487,"repoUrl":4238,"updatedAt":4248},"interact with MetaMask wallet capabilities","Use the MetaMask tools to request and interact with wallet capabilities from the MetaMask capability vendor.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[4245,4246,4247],{"name":4131,"slug":4132,"type":15},{"name":20,"slug":21,"type":15},{"name":17,"slug":18,"type":15},"2026-07-13T06:12:33.955806",{"slug":4250,"name":4250,"fn":4251,"description":4252,"org":4253,"tags":4254,"stars":487,"repoUrl":4238,"updatedAt":4258},"wallet","manage wallet balances and transactions","Use the wallet tools for all balance, send, and sign operations. Supports both ETH and ERC-20 tokens. The away wallet operates autonomously after setup — the home device does not need to be online.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[4255,4256,4257],{"name":20,"slug":21,"type":15},{"name":4143,"slug":4144,"type":15},{"name":17,"slug":18,"type":15},"2026-07-13T06:12:35.380244",{"slug":4260,"name":4260,"fn":4261,"description":4262,"org":4263,"tags":4264,"stars":365,"repoUrl":4270,"updatedAt":4271},"metamask-connect","integrate MetaMask into dApps","Build dApps that integrate MetaMask via the MetaMask Connect SDK — EVM (@metamask\u002Fconnect-evm), Solana (@metamask\u002Fconnect-solana), and multichain (@metamask\u002Fconnect-multichain), plus the wagmi metaMask() connector. Covers client setup across browser\u002FReact\u002FReact Native, connecting, signing messages, sending transactions, multichain invokeMethod across CAIP-2 scopes, migrating from @metamask\u002Fsdk, and troubleshooting connection\u002Fpolyfill issues.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[4265,4266,4267,4268,4269],{"name":4131,"slug":4132,"type":15},{"name":20,"slug":21,"type":15},{"name":4146,"slug":4147,"type":15},{"name":4121,"slug":4121,"type":15},{"name":17,"slug":18,"type":15},"https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fconnect-monorepo","2026-07-13T06:11:34.445665",{"slug":4273,"name":4273,"fn":4274,"description":4275,"org":4276,"tags":4277,"stars":330,"repoUrl":4284,"updatedAt":4285},"metamask-agent-wallet","manage blockchain wallets and transactions","Use when the user asks anything about blockchain wallets, transactions, signing, token transfers, supported chains, wallet balances, perpetual futures trading, prediction markets, token swaps, cross-chain bridges, market data, token discovery, decoding EVM calldata, DeFi earn\u002Fyield vaults, or authentication via the MetaMask Agentic CLI; also when an HTTP request returns 402 Payment Required (x402) or the agent needs to pay for a paywalled API, endpoint, file, or resource over HTTP. Single entry point for all mm CLI operations.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[4278,4279,4282,4283],{"name":13,"slug":14,"type":15},{"name":4280,"slug":4281,"type":15},"DeFi","defi",{"name":20,"slug":21,"type":15},{"name":17,"slug":18,"type":15},"https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fagent-skills","2026-08-01T05:45:07.976522",{"slug":4098,"name":4098,"fn":4099,"description":4100,"org":4287,"tags":4288,"stars":22,"repoUrl":23,"updatedAt":4111},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[4289,4290,4291,4292],{"name":20,"slug":21,"type":15},{"name":4105,"slug":4106,"type":15},{"name":4108,"slug":4109,"type":15},{"name":17,"slug":18,"type":15},{"slug":4113,"name":4113,"fn":4114,"description":4115,"org":4294,"tags":4295,"stars":22,"repoUrl":23,"updatedAt":4123},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[4296,4297,4298,4299],{"name":20,"slug":21,"type":15},{"name":4105,"slug":4106,"type":15},{"name":4121,"slug":4121,"type":15},{"name":17,"slug":18,"type":15},{"slug":4125,"name":4125,"fn":4126,"description":4127,"org":4301,"tags":4302,"stars":22,"repoUrl":23,"updatedAt":4135},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[4303,4304,4305],{"name":4131,"slug":4132,"type":15},{"name":20,"slug":21,"type":15},{"name":17,"slug":18,"type":15},{"slug":4137,"name":4137,"fn":4138,"description":4139,"org":4307,"tags":4308,"stars":22,"repoUrl":23,"updatedAt":4149},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[4309,4310,4311],{"name":4143,"slug":4144,"type":15},{"name":4146,"slug":4147,"type":15},{"name":17,"slug":18,"type":15},{"slug":4151,"name":4151,"fn":4152,"description":4153,"org":4313,"tags":4314,"stars":22,"repoUrl":23,"updatedAt":4166},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[4315,4316,4317,4318,4319],{"name":20,"slug":21,"type":15},{"name":4158,"slug":4159,"type":15},{"name":4161,"slug":4162,"type":15},{"name":4164,"slug":125,"type":15},{"name":17,"slug":18,"type":15}]