[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-metamask-sign-solana-message":3,"mdc-yc6xna-key":32,"related-repo-metamask-sign-solana-message":3129,"related-org-metamask-sign-solana-message":3230},{"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-solana-message","sign Solana messages with MetaMask","Sign an arbitrary message on Solana using MetaMask Connect. Covers both the React wallet-adapter approach (useWallet) and the vanilla browser approach (wallet-standard features).",{"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},"Auth","auth","tag",{"name":17,"slug":18,"type":15},"Web3","web3",{"name":20,"slug":21,"type":15},"Solana","solana",2,"https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fmetamask-connect-cursor-plugin","2026-07-13T06:11:55.369437",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-solana-message","---\nname: sign-solana-message\ndescription: Sign an arbitrary message on Solana using MetaMask Connect. Covers both the React wallet-adapter approach (useWallet) and the vanilla browser approach (wallet-standard features).\n---\n# Sign Solana Message with MetaMask\n\n## When to use\n\nUse this skill when:\n- Signing an arbitrary message on Solana with MetaMask Connect\n- Implementing sign-in-with-Solana or message verification flows\n- Using `useWallet().signMessage` in a React app\n- Using the `solana:signMessage` wallet-standard feature in a vanilla browser app\n\n## Workflow\n\n### Step 1: Encode the message\n\nSolana message signing requires a `Uint8Array`. Use `TextEncoder` to convert a string:\n\n```typescript\nconst message = new TextEncoder().encode('Sign this message to verify your identity');\n```\n\n### Step 2a: Sign with React wallet-adapter (useWallet)\n\n**Prerequisites:** `createSolanaClient` has been awaited before rendering, `WalletProvider` is configured with `wallets={[]}`, and the user is connected. See the `setup-solana-react-app` skill.\n\n```tsx\nimport { useWallet } from '@solana\u002Fwallet-adapter-react';\n\nfunction SignMessageButton() {\n  const { signMessage, publicKey, connected } = useWallet();\n\n  const handleSign = async () => {\n    if (!signMessage || !publicKey) {\n      console.error('Wallet does not support signMessage or is not connected');\n      return;\n    }\n\n    try {\n      const message = new TextEncoder().encode('Hello from MetaMask on Solana!');\n      const signature = await signMessage(message);\n      console.log('Signature (bytes):', signature);\n      console.log('Signature (hex):', Buffer.from(signature).toString('hex'));\n      console.log('Signer:', publicKey.toBase58());\n    } catch (err: any) {\n      if (err.code === 4001) {\n        console.log('User rejected the signature request');\n        return;\n      }\n      console.error('signMessage failed:', err);\n    }\n  };\n\n  return (\n    \u003Cbutton onClick={handleSign} disabled={!connected || !signMessage}>\n      Sign Message\n    \u003C\u002Fbutton>\n  );\n}\n```\n\n### Step 2b: Sign with vanilla browser (wallet-standard feature)\n\n**Prerequisites:** `createSolanaClient` has been called and the wallet is connected via `standard:connect`. See the `setup-solana-browser-app` skill.\n\n```typescript\nimport { createSolanaClient } from '@metamask\u002Fconnect-solana';\n\nconst solanaClient = await createSolanaClient({\n  dapp: { name: 'My DApp', url: window.location.href },\n});\n\nconst wallet = solanaClient.getWallet();\n\n\u002F\u002F Connect first\nconst connectFeature = wallet.features['standard:connect'];\nconst { accounts } = await connectFeature.connect();\nconst account = accounts[0];\n\n\u002F\u002F Sign the message\nconst signMessageFeature = wallet.features['solana:signMessage'];\n\ntry {\n  const message = new TextEncoder().encode('Hello from MetaMask on Solana!');\n\n  const [{ signature }] = await signMessageFeature.signMessage({\n    account,\n    message,\n  });\n\n  console.log('Signature (hex):', Buffer.from(signature).toString('hex'));\n  console.log('Signer:', account.address);\n} catch (err: any) {\n  if (err.code === 4001) {\n    console.log('User rejected the signature request');\n  } else {\n    console.error('signMessage failed:', err);\n  }\n}\n```\n\n### Step 3: Verify the signature (optional)\n\nUse `tweetnacl` or `@noble\u002Fed25519` to verify the signature off-chain:\n\n```typescript\nimport nacl from 'tweetnacl';\n\nconst message = new TextEncoder().encode('Hello from MetaMask on Solana!');\nconst isValid = nacl.sign.detached.verify(\n  message,\n  signature, \u002F\u002F Uint8Array from signMessage\n  publicKey.toBytes(), \u002F\u002F Uint8Array of the signer's public key\n);\nconsole.log('Signature valid:', isValid);\n```\n\n### Step 4: Error handling\n\nHandle these common error scenarios:\n\n| Error | Cause | Action |\n|-------|-------|--------|\n| Code `4001` | User rejected the request in MetaMask | Show retry UI, do not treat as app error |\n| `signMessage` is `undefined` | Wallet does not support message signing | Check `signMessage` exists before calling |\n| `publicKey` is `null` | Wallet not connected | Prompt user to connect first |\n| Network error | MetaMask Mobile connection interrupted | Retry or reconnect |\n\n```typescript\ntry {\n  const signature = await signMessage(message);\n} catch (err: any) {\n  switch (err.code) {\n    case 4001:\n      \u002F\u002F User rejected — show retry button\n      break;\n    case -32002:\n      \u002F\u002F Request already pending — wait for user to act in MetaMask\n      break;\n    default:\n      console.error('Unexpected error:', err);\n  }\n}\n```\n\n## Important Notes\n\n- **Messages must be `Uint8Array`** — use `new TextEncoder().encode(string)` to convert. Do not pass raw strings to `signMessage`.\n- **`signMessage` may be `undefined`** — always check that `signMessage` exists on the wallet adapter before calling it. Not all wallets support arbitrary message signing.\n- **The signature is Ed25519** — Solana uses Ed25519 signatures. The returned `Uint8Array` is 64 bytes.\n- **User rejection is code `4001`** — handle it gracefully with a retry option. Do not log it as an error.\n- **Wallet name is `\"MetaMask\"`** — case-sensitive, used to identify the MetaMask wallet in the adapter list.\n- **Solana networks** — mainnet, devnet, and testnet scopes are all modeled by the SDK; non-mainnet availability depends on the connected MetaMask build\u002Fversion, so handle connection errors rather than assuming a cluster is present.\n",{"data":33,"body":34},{"name":4,"description":6},{"type":35,"children":36},"root",[37,46,53,59,101,107,114,135,226,232,275,1271,1277,1307,2274,2280,2301,2575,2581,2586,2725,3000,3006,3123],{"type":38,"tag":39,"props":40,"children":42},"element","h1",{"id":41},"sign-solana-message-with-metamask",[43],{"type":44,"value":45},"text","Sign Solana Message with MetaMask",{"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,69,74,88],{"type":38,"tag":64,"props":65,"children":66},"li",{},[67],{"type":44,"value":68},"Signing an arbitrary message on Solana with MetaMask Connect",{"type":38,"tag":64,"props":70,"children":71},{},[72],{"type":44,"value":73},"Implementing sign-in-with-Solana or message verification flows",{"type":38,"tag":64,"props":75,"children":76},{},[77,79,86],{"type":44,"value":78},"Using ",{"type":38,"tag":80,"props":81,"children":83},"code",{"className":82},[],[84],{"type":44,"value":85},"useWallet().signMessage",{"type":44,"value":87}," in a React app",{"type":38,"tag":64,"props":89,"children":90},{},[91,93,99],{"type":44,"value":92},"Using the ",{"type":38,"tag":80,"props":94,"children":96},{"className":95},[],[97],{"type":44,"value":98},"solana:signMessage",{"type":44,"value":100}," wallet-standard feature in a vanilla browser app",{"type":38,"tag":47,"props":102,"children":104},{"id":103},"workflow",[105],{"type":44,"value":106},"Workflow",{"type":38,"tag":108,"props":109,"children":111},"h3",{"id":110},"step-1-encode-the-message",[112],{"type":44,"value":113},"Step 1: Encode the message",{"type":38,"tag":54,"props":115,"children":116},{},[117,119,125,127,133],{"type":44,"value":118},"Solana message signing requires a ",{"type":38,"tag":80,"props":120,"children":122},{"className":121},[],[123],{"type":44,"value":124},"Uint8Array",{"type":44,"value":126},". Use ",{"type":38,"tag":80,"props":128,"children":130},{"className":129},[],[131],{"type":44,"value":132},"TextEncoder",{"type":44,"value":134}," to convert a string:",{"type":38,"tag":136,"props":137,"children":142},"pre",{"className":138,"code":139,"language":140,"meta":141,"style":141},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","const message = new TextEncoder().encode('Sign this message to verify your identity');\n","typescript","",[143],{"type":38,"tag":80,"props":144,"children":145},{"__ignoreMap":141},[146],{"type":38,"tag":147,"props":148,"children":151},"span",{"class":149,"line":150},"line",1,[152,158,164,170,175,181,186,191,196,201,206,212,216,221],{"type":38,"tag":147,"props":153,"children":155},{"style":154},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[156],{"type":44,"value":157},"const",{"type":38,"tag":147,"props":159,"children":161},{"style":160},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[162],{"type":44,"value":163}," message ",{"type":38,"tag":147,"props":165,"children":167},{"style":166},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[168],{"type":44,"value":169},"=",{"type":38,"tag":147,"props":171,"children":172},{"style":166},[173],{"type":44,"value":174}," new",{"type":38,"tag":147,"props":176,"children":178},{"style":177},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[179],{"type":44,"value":180}," TextEncoder",{"type":38,"tag":147,"props":182,"children":183},{"style":160},[184],{"type":44,"value":185},"()",{"type":38,"tag":147,"props":187,"children":188},{"style":166},[189],{"type":44,"value":190},".",{"type":38,"tag":147,"props":192,"children":193},{"style":177},[194],{"type":44,"value":195},"encode",{"type":38,"tag":147,"props":197,"children":198},{"style":160},[199],{"type":44,"value":200},"(",{"type":38,"tag":147,"props":202,"children":203},{"style":166},[204],{"type":44,"value":205},"'",{"type":38,"tag":147,"props":207,"children":209},{"style":208},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[210],{"type":44,"value":211},"Sign this message to verify your identity",{"type":38,"tag":147,"props":213,"children":214},{"style":166},[215],{"type":44,"value":205},{"type":38,"tag":147,"props":217,"children":218},{"style":160},[219],{"type":44,"value":220},")",{"type":38,"tag":147,"props":222,"children":223},{"style":166},[224],{"type":44,"value":225},";\n",{"type":38,"tag":108,"props":227,"children":229},{"id":228},"step-2a-sign-with-react-wallet-adapter-usewallet",[230],{"type":44,"value":231},"Step 2a: Sign with React wallet-adapter (useWallet)",{"type":38,"tag":54,"props":233,"children":234},{},[235,241,243,249,251,257,259,265,267,273],{"type":38,"tag":236,"props":237,"children":238},"strong",{},[239],{"type":44,"value":240},"Prerequisites:",{"type":44,"value":242}," ",{"type":38,"tag":80,"props":244,"children":246},{"className":245},[],[247],{"type":44,"value":248},"createSolanaClient",{"type":44,"value":250}," has been awaited before rendering, ",{"type":38,"tag":80,"props":252,"children":254},{"className":253},[],[255],{"type":44,"value":256},"WalletProvider",{"type":44,"value":258}," is configured with ",{"type":38,"tag":80,"props":260,"children":262},{"className":261},[],[263],{"type":44,"value":264},"wallets={[]}",{"type":44,"value":266},", and the user is connected. See the ",{"type":38,"tag":80,"props":268,"children":270},{"className":269},[],[271],{"type":44,"value":272},"setup-solana-react-app",{"type":44,"value":274}," skill.",{"type":38,"tag":136,"props":276,"children":280},{"className":277,"code":278,"language":279,"meta":141,"style":141},"language-tsx shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { useWallet } from '@solana\u002Fwallet-adapter-react';\n\nfunction SignMessageButton() {\n  const { signMessage, publicKey, connected } = useWallet();\n\n  const handleSign = async () => {\n    if (!signMessage || !publicKey) {\n      console.error('Wallet does not support signMessage or is not connected');\n      return;\n    }\n\n    try {\n      const message = new TextEncoder().encode('Hello from MetaMask on Solana!');\n      const signature = await signMessage(message);\n      console.log('Signature (bytes):', signature);\n      console.log('Signature (hex):', Buffer.from(signature).toString('hex'));\n      console.log('Signer:', publicKey.toBase58());\n    } catch (err: any) {\n      if (err.code === 4001) {\n        console.log('User rejected the signature request');\n        return;\n      }\n      console.error('signMessage failed:', err);\n    }\n  };\n\n  return (\n    \u003Cbutton onClick={handleSign} disabled={!connected || !signMessage}>\n      Sign Message\n    \u003C\u002Fbutton>\n  );\n}\n","tsx",[281],{"type":38,"tag":80,"props":282,"children":283},{"__ignoreMap":141},[284,331,340,363,422,430,466,515,558,571,580,588,601,664,707,757,856,915,958,1002,1044,1057,1066,1116,1124,1133,1141,1155,1222,1231,1249,1262],{"type":38,"tag":147,"props":285,"children":286},{"class":149,"line":150},[287,293,298,303,308,313,318,323,327],{"type":38,"tag":147,"props":288,"children":290},{"style":289},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[291],{"type":44,"value":292},"import",{"type":38,"tag":147,"props":294,"children":295},{"style":166},[296],{"type":44,"value":297}," {",{"type":38,"tag":147,"props":299,"children":300},{"style":160},[301],{"type":44,"value":302}," useWallet",{"type":38,"tag":147,"props":304,"children":305},{"style":166},[306],{"type":44,"value":307}," }",{"type":38,"tag":147,"props":309,"children":310},{"style":289},[311],{"type":44,"value":312}," from",{"type":38,"tag":147,"props":314,"children":315},{"style":166},[316],{"type":44,"value":317}," '",{"type":38,"tag":147,"props":319,"children":320},{"style":208},[321],{"type":44,"value":322},"@solana\u002Fwallet-adapter-react",{"type":38,"tag":147,"props":324,"children":325},{"style":166},[326],{"type":44,"value":205},{"type":38,"tag":147,"props":328,"children":329},{"style":166},[330],{"type":44,"value":225},{"type":38,"tag":147,"props":332,"children":333},{"class":149,"line":22},[334],{"type":38,"tag":147,"props":335,"children":337},{"emptyLinePlaceholder":336},true,[338],{"type":44,"value":339},"\n",{"type":38,"tag":147,"props":341,"children":343},{"class":149,"line":342},3,[344,349,354,358],{"type":38,"tag":147,"props":345,"children":346},{"style":154},[347],{"type":44,"value":348},"function",{"type":38,"tag":147,"props":350,"children":351},{"style":177},[352],{"type":44,"value":353}," SignMessageButton",{"type":38,"tag":147,"props":355,"children":356},{"style":166},[357],{"type":44,"value":185},{"type":38,"tag":147,"props":359,"children":360},{"style":166},[361],{"type":44,"value":362}," {\n",{"type":38,"tag":147,"props":364,"children":366},{"class":149,"line":365},4,[367,372,376,381,386,391,395,400,404,409,413,418],{"type":38,"tag":147,"props":368,"children":369},{"style":154},[370],{"type":44,"value":371},"  const",{"type":38,"tag":147,"props":373,"children":374},{"style":166},[375],{"type":44,"value":297},{"type":38,"tag":147,"props":377,"children":378},{"style":160},[379],{"type":44,"value":380}," signMessage",{"type":38,"tag":147,"props":382,"children":383},{"style":166},[384],{"type":44,"value":385},",",{"type":38,"tag":147,"props":387,"children":388},{"style":160},[389],{"type":44,"value":390}," publicKey",{"type":38,"tag":147,"props":392,"children":393},{"style":166},[394],{"type":44,"value":385},{"type":38,"tag":147,"props":396,"children":397},{"style":160},[398],{"type":44,"value":399}," connected",{"type":38,"tag":147,"props":401,"children":402},{"style":166},[403],{"type":44,"value":307},{"type":38,"tag":147,"props":405,"children":406},{"style":166},[407],{"type":44,"value":408}," =",{"type":38,"tag":147,"props":410,"children":411},{"style":177},[412],{"type":44,"value":302},{"type":38,"tag":147,"props":414,"children":416},{"style":415},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[417],{"type":44,"value":185},{"type":38,"tag":147,"props":419,"children":420},{"style":166},[421],{"type":44,"value":225},{"type":38,"tag":147,"props":423,"children":425},{"class":149,"line":424},5,[426],{"type":38,"tag":147,"props":427,"children":428},{"emptyLinePlaceholder":336},[429],{"type":44,"value":339},{"type":38,"tag":147,"props":431,"children":433},{"class":149,"line":432},6,[434,438,443,447,452,457,462],{"type":38,"tag":147,"props":435,"children":436},{"style":154},[437],{"type":44,"value":371},{"type":38,"tag":147,"props":439,"children":440},{"style":160},[441],{"type":44,"value":442}," handleSign",{"type":38,"tag":147,"props":444,"children":445},{"style":166},[446],{"type":44,"value":408},{"type":38,"tag":147,"props":448,"children":449},{"style":154},[450],{"type":44,"value":451}," async",{"type":38,"tag":147,"props":453,"children":454},{"style":166},[455],{"type":44,"value":456}," ()",{"type":38,"tag":147,"props":458,"children":459},{"style":154},[460],{"type":44,"value":461}," =>",{"type":38,"tag":147,"props":463,"children":464},{"style":166},[465],{"type":44,"value":362},{"type":38,"tag":147,"props":467,"children":469},{"class":149,"line":468},7,[470,475,480,485,490,495,500,505,510],{"type":38,"tag":147,"props":471,"children":472},{"style":289},[473],{"type":44,"value":474},"    if",{"type":38,"tag":147,"props":476,"children":477},{"style":415},[478],{"type":44,"value":479}," (",{"type":38,"tag":147,"props":481,"children":482},{"style":166},[483],{"type":44,"value":484},"!",{"type":38,"tag":147,"props":486,"children":487},{"style":160},[488],{"type":44,"value":489},"signMessage",{"type":38,"tag":147,"props":491,"children":492},{"style":166},[493],{"type":44,"value":494}," ||",{"type":38,"tag":147,"props":496,"children":497},{"style":166},[498],{"type":44,"value":499}," !",{"type":38,"tag":147,"props":501,"children":502},{"style":160},[503],{"type":44,"value":504},"publicKey",{"type":38,"tag":147,"props":506,"children":507},{"style":415},[508],{"type":44,"value":509},") ",{"type":38,"tag":147,"props":511,"children":512},{"style":166},[513],{"type":44,"value":514},"{\n",{"type":38,"tag":147,"props":516,"children":518},{"class":149,"line":517},8,[519,524,528,533,537,541,546,550,554],{"type":38,"tag":147,"props":520,"children":521},{"style":160},[522],{"type":44,"value":523},"      console",{"type":38,"tag":147,"props":525,"children":526},{"style":166},[527],{"type":44,"value":190},{"type":38,"tag":147,"props":529,"children":530},{"style":177},[531],{"type":44,"value":532},"error",{"type":38,"tag":147,"props":534,"children":535},{"style":415},[536],{"type":44,"value":200},{"type":38,"tag":147,"props":538,"children":539},{"style":166},[540],{"type":44,"value":205},{"type":38,"tag":147,"props":542,"children":543},{"style":208},[544],{"type":44,"value":545},"Wallet does not support signMessage or is not connected",{"type":38,"tag":147,"props":547,"children":548},{"style":166},[549],{"type":44,"value":205},{"type":38,"tag":147,"props":551,"children":552},{"style":415},[553],{"type":44,"value":220},{"type":38,"tag":147,"props":555,"children":556},{"style":166},[557],{"type":44,"value":225},{"type":38,"tag":147,"props":559,"children":561},{"class":149,"line":560},9,[562,567],{"type":38,"tag":147,"props":563,"children":564},{"style":289},[565],{"type":44,"value":566},"      return",{"type":38,"tag":147,"props":568,"children":569},{"style":166},[570],{"type":44,"value":225},{"type":38,"tag":147,"props":572,"children":574},{"class":149,"line":573},10,[575],{"type":38,"tag":147,"props":576,"children":577},{"style":166},[578],{"type":44,"value":579},"    }\n",{"type":38,"tag":147,"props":581,"children":583},{"class":149,"line":582},11,[584],{"type":38,"tag":147,"props":585,"children":586},{"emptyLinePlaceholder":336},[587],{"type":44,"value":339},{"type":38,"tag":147,"props":589,"children":591},{"class":149,"line":590},12,[592,597],{"type":38,"tag":147,"props":593,"children":594},{"style":289},[595],{"type":44,"value":596},"    try",{"type":38,"tag":147,"props":598,"children":599},{"style":166},[600],{"type":44,"value":362},{"type":38,"tag":147,"props":602,"children":604},{"class":149,"line":603},13,[605,610,615,619,623,627,631,635,639,643,647,652,656,660],{"type":38,"tag":147,"props":606,"children":607},{"style":154},[608],{"type":44,"value":609},"      const",{"type":38,"tag":147,"props":611,"children":612},{"style":160},[613],{"type":44,"value":614}," message",{"type":38,"tag":147,"props":616,"children":617},{"style":166},[618],{"type":44,"value":408},{"type":38,"tag":147,"props":620,"children":621},{"style":166},[622],{"type":44,"value":174},{"type":38,"tag":147,"props":624,"children":625},{"style":177},[626],{"type":44,"value":180},{"type":38,"tag":147,"props":628,"children":629},{"style":415},[630],{"type":44,"value":185},{"type":38,"tag":147,"props":632,"children":633},{"style":166},[634],{"type":44,"value":190},{"type":38,"tag":147,"props":636,"children":637},{"style":177},[638],{"type":44,"value":195},{"type":38,"tag":147,"props":640,"children":641},{"style":415},[642],{"type":44,"value":200},{"type":38,"tag":147,"props":644,"children":645},{"style":166},[646],{"type":44,"value":205},{"type":38,"tag":147,"props":648,"children":649},{"style":208},[650],{"type":44,"value":651},"Hello from MetaMask on Solana!",{"type":38,"tag":147,"props":653,"children":654},{"style":166},[655],{"type":44,"value":205},{"type":38,"tag":147,"props":657,"children":658},{"style":415},[659],{"type":44,"value":220},{"type":38,"tag":147,"props":661,"children":662},{"style":166},[663],{"type":44,"value":225},{"type":38,"tag":147,"props":665,"children":667},{"class":149,"line":666},14,[668,672,677,681,686,690,694,699,703],{"type":38,"tag":147,"props":669,"children":670},{"style":154},[671],{"type":44,"value":609},{"type":38,"tag":147,"props":673,"children":674},{"style":160},[675],{"type":44,"value":676}," signature",{"type":38,"tag":147,"props":678,"children":679},{"style":166},[680],{"type":44,"value":408},{"type":38,"tag":147,"props":682,"children":683},{"style":289},[684],{"type":44,"value":685}," await",{"type":38,"tag":147,"props":687,"children":688},{"style":177},[689],{"type":44,"value":380},{"type":38,"tag":147,"props":691,"children":692},{"style":415},[693],{"type":44,"value":200},{"type":38,"tag":147,"props":695,"children":696},{"style":160},[697],{"type":44,"value":698},"message",{"type":38,"tag":147,"props":700,"children":701},{"style":415},[702],{"type":44,"value":220},{"type":38,"tag":147,"props":704,"children":705},{"style":166},[706],{"type":44,"value":225},{"type":38,"tag":147,"props":708,"children":710},{"class":149,"line":709},15,[711,715,719,724,728,732,737,741,745,749,753],{"type":38,"tag":147,"props":712,"children":713},{"style":160},[714],{"type":44,"value":523},{"type":38,"tag":147,"props":716,"children":717},{"style":166},[718],{"type":44,"value":190},{"type":38,"tag":147,"props":720,"children":721},{"style":177},[722],{"type":44,"value":723},"log",{"type":38,"tag":147,"props":725,"children":726},{"style":415},[727],{"type":44,"value":200},{"type":38,"tag":147,"props":729,"children":730},{"style":166},[731],{"type":44,"value":205},{"type":38,"tag":147,"props":733,"children":734},{"style":208},[735],{"type":44,"value":736},"Signature (bytes):",{"type":38,"tag":147,"props":738,"children":739},{"style":166},[740],{"type":44,"value":205},{"type":38,"tag":147,"props":742,"children":743},{"style":166},[744],{"type":44,"value":385},{"type":38,"tag":147,"props":746,"children":747},{"style":160},[748],{"type":44,"value":676},{"type":38,"tag":147,"props":750,"children":751},{"style":415},[752],{"type":44,"value":220},{"type":38,"tag":147,"props":754,"children":755},{"style":166},[756],{"type":44,"value":225},{"type":38,"tag":147,"props":758,"children":760},{"class":149,"line":759},16,[761,765,769,773,777,781,786,790,794,799,803,808,812,817,821,825,830,834,838,843,847,852],{"type":38,"tag":147,"props":762,"children":763},{"style":160},[764],{"type":44,"value":523},{"type":38,"tag":147,"props":766,"children":767},{"style":166},[768],{"type":44,"value":190},{"type":38,"tag":147,"props":770,"children":771},{"style":177},[772],{"type":44,"value":723},{"type":38,"tag":147,"props":774,"children":775},{"style":415},[776],{"type":44,"value":200},{"type":38,"tag":147,"props":778,"children":779},{"style":166},[780],{"type":44,"value":205},{"type":38,"tag":147,"props":782,"children":783},{"style":208},[784],{"type":44,"value":785},"Signature (hex):",{"type":38,"tag":147,"props":787,"children":788},{"style":166},[789],{"type":44,"value":205},{"type":38,"tag":147,"props":791,"children":792},{"style":166},[793],{"type":44,"value":385},{"type":38,"tag":147,"props":795,"children":796},{"style":160},[797],{"type":44,"value":798}," Buffer",{"type":38,"tag":147,"props":800,"children":801},{"style":166},[802],{"type":44,"value":190},{"type":38,"tag":147,"props":804,"children":805},{"style":177},[806],{"type":44,"value":807},"from",{"type":38,"tag":147,"props":809,"children":810},{"style":415},[811],{"type":44,"value":200},{"type":38,"tag":147,"props":813,"children":814},{"style":160},[815],{"type":44,"value":816},"signature",{"type":38,"tag":147,"props":818,"children":819},{"style":415},[820],{"type":44,"value":220},{"type":38,"tag":147,"props":822,"children":823},{"style":166},[824],{"type":44,"value":190},{"type":38,"tag":147,"props":826,"children":827},{"style":177},[828],{"type":44,"value":829},"toString",{"type":38,"tag":147,"props":831,"children":832},{"style":415},[833],{"type":44,"value":200},{"type":38,"tag":147,"props":835,"children":836},{"style":166},[837],{"type":44,"value":205},{"type":38,"tag":147,"props":839,"children":840},{"style":208},[841],{"type":44,"value":842},"hex",{"type":38,"tag":147,"props":844,"children":845},{"style":166},[846],{"type":44,"value":205},{"type":38,"tag":147,"props":848,"children":849},{"style":415},[850],{"type":44,"value":851},"))",{"type":38,"tag":147,"props":853,"children":854},{"style":166},[855],{"type":44,"value":225},{"type":38,"tag":147,"props":857,"children":859},{"class":149,"line":858},17,[860,864,868,872,876,880,885,889,893,897,901,906,911],{"type":38,"tag":147,"props":861,"children":862},{"style":160},[863],{"type":44,"value":523},{"type":38,"tag":147,"props":865,"children":866},{"style":166},[867],{"type":44,"value":190},{"type":38,"tag":147,"props":869,"children":870},{"style":177},[871],{"type":44,"value":723},{"type":38,"tag":147,"props":873,"children":874},{"style":415},[875],{"type":44,"value":200},{"type":38,"tag":147,"props":877,"children":878},{"style":166},[879],{"type":44,"value":205},{"type":38,"tag":147,"props":881,"children":882},{"style":208},[883],{"type":44,"value":884},"Signer:",{"type":38,"tag":147,"props":886,"children":887},{"style":166},[888],{"type":44,"value":205},{"type":38,"tag":147,"props":890,"children":891},{"style":166},[892],{"type":44,"value":385},{"type":38,"tag":147,"props":894,"children":895},{"style":160},[896],{"type":44,"value":390},{"type":38,"tag":147,"props":898,"children":899},{"style":166},[900],{"type":44,"value":190},{"type":38,"tag":147,"props":902,"children":903},{"style":177},[904],{"type":44,"value":905},"toBase58",{"type":38,"tag":147,"props":907,"children":908},{"style":415},[909],{"type":44,"value":910},"())",{"type":38,"tag":147,"props":912,"children":913},{"style":166},[914],{"type":44,"value":225},{"type":38,"tag":147,"props":916,"children":918},{"class":149,"line":917},18,[919,924,929,933,939,944,950,954],{"type":38,"tag":147,"props":920,"children":921},{"style":166},[922],{"type":44,"value":923},"    }",{"type":38,"tag":147,"props":925,"children":926},{"style":289},[927],{"type":44,"value":928}," catch",{"type":38,"tag":147,"props":930,"children":931},{"style":166},[932],{"type":44,"value":479},{"type":38,"tag":147,"props":934,"children":936},{"style":935},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[937],{"type":44,"value":938},"err",{"type":38,"tag":147,"props":940,"children":941},{"style":166},[942],{"type":44,"value":943},":",{"type":38,"tag":147,"props":945,"children":947},{"style":946},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[948],{"type":44,"value":949}," any",{"type":38,"tag":147,"props":951,"children":952},{"style":166},[953],{"type":44,"value":220},{"type":38,"tag":147,"props":955,"children":956},{"style":166},[957],{"type":44,"value":362},{"type":38,"tag":147,"props":959,"children":961},{"class":149,"line":960},19,[962,967,971,975,979,983,988,994,998],{"type":38,"tag":147,"props":963,"children":964},{"style":289},[965],{"type":44,"value":966},"      if",{"type":38,"tag":147,"props":968,"children":969},{"style":415},[970],{"type":44,"value":479},{"type":38,"tag":147,"props":972,"children":973},{"style":160},[974],{"type":44,"value":938},{"type":38,"tag":147,"props":976,"children":977},{"style":166},[978],{"type":44,"value":190},{"type":38,"tag":147,"props":980,"children":981},{"style":160},[982],{"type":44,"value":80},{"type":38,"tag":147,"props":984,"children":985},{"style":166},[986],{"type":44,"value":987}," ===",{"type":38,"tag":147,"props":989,"children":991},{"style":990},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[992],{"type":44,"value":993}," 4001",{"type":38,"tag":147,"props":995,"children":996},{"style":415},[997],{"type":44,"value":509},{"type":38,"tag":147,"props":999,"children":1000},{"style":166},[1001],{"type":44,"value":514},{"type":38,"tag":147,"props":1003,"children":1005},{"class":149,"line":1004},20,[1006,1011,1015,1019,1023,1027,1032,1036,1040],{"type":38,"tag":147,"props":1007,"children":1008},{"style":160},[1009],{"type":44,"value":1010},"        console",{"type":38,"tag":147,"props":1012,"children":1013},{"style":166},[1014],{"type":44,"value":190},{"type":38,"tag":147,"props":1016,"children":1017},{"style":177},[1018],{"type":44,"value":723},{"type":38,"tag":147,"props":1020,"children":1021},{"style":415},[1022],{"type":44,"value":200},{"type":38,"tag":147,"props":1024,"children":1025},{"style":166},[1026],{"type":44,"value":205},{"type":38,"tag":147,"props":1028,"children":1029},{"style":208},[1030],{"type":44,"value":1031},"User rejected the signature request",{"type":38,"tag":147,"props":1033,"children":1034},{"style":166},[1035],{"type":44,"value":205},{"type":38,"tag":147,"props":1037,"children":1038},{"style":415},[1039],{"type":44,"value":220},{"type":38,"tag":147,"props":1041,"children":1042},{"style":166},[1043],{"type":44,"value":225},{"type":38,"tag":147,"props":1045,"children":1047},{"class":149,"line":1046},21,[1048,1053],{"type":38,"tag":147,"props":1049,"children":1050},{"style":289},[1051],{"type":44,"value":1052},"        return",{"type":38,"tag":147,"props":1054,"children":1055},{"style":166},[1056],{"type":44,"value":225},{"type":38,"tag":147,"props":1058,"children":1060},{"class":149,"line":1059},22,[1061],{"type":38,"tag":147,"props":1062,"children":1063},{"style":166},[1064],{"type":44,"value":1065},"      }\n",{"type":38,"tag":147,"props":1067,"children":1069},{"class":149,"line":1068},23,[1070,1074,1078,1082,1086,1090,1095,1099,1103,1108,1112],{"type":38,"tag":147,"props":1071,"children":1072},{"style":160},[1073],{"type":44,"value":523},{"type":38,"tag":147,"props":1075,"children":1076},{"style":166},[1077],{"type":44,"value":190},{"type":38,"tag":147,"props":1079,"children":1080},{"style":177},[1081],{"type":44,"value":532},{"type":38,"tag":147,"props":1083,"children":1084},{"style":415},[1085],{"type":44,"value":200},{"type":38,"tag":147,"props":1087,"children":1088},{"style":166},[1089],{"type":44,"value":205},{"type":38,"tag":147,"props":1091,"children":1092},{"style":208},[1093],{"type":44,"value":1094},"signMessage failed:",{"type":38,"tag":147,"props":1096,"children":1097},{"style":166},[1098],{"type":44,"value":205},{"type":38,"tag":147,"props":1100,"children":1101},{"style":166},[1102],{"type":44,"value":385},{"type":38,"tag":147,"props":1104,"children":1105},{"style":160},[1106],{"type":44,"value":1107}," err",{"type":38,"tag":147,"props":1109,"children":1110},{"style":415},[1111],{"type":44,"value":220},{"type":38,"tag":147,"props":1113,"children":1114},{"style":166},[1115],{"type":44,"value":225},{"type":38,"tag":147,"props":1117,"children":1119},{"class":149,"line":1118},24,[1120],{"type":38,"tag":147,"props":1121,"children":1122},{"style":166},[1123],{"type":44,"value":579},{"type":38,"tag":147,"props":1125,"children":1127},{"class":149,"line":1126},25,[1128],{"type":38,"tag":147,"props":1129,"children":1130},{"style":166},[1131],{"type":44,"value":1132},"  };\n",{"type":38,"tag":147,"props":1134,"children":1136},{"class":149,"line":1135},26,[1137],{"type":38,"tag":147,"props":1138,"children":1139},{"emptyLinePlaceholder":336},[1140],{"type":44,"value":339},{"type":38,"tag":147,"props":1142,"children":1144},{"class":149,"line":1143},27,[1145,1150],{"type":38,"tag":147,"props":1146,"children":1147},{"style":289},[1148],{"type":44,"value":1149},"  return",{"type":38,"tag":147,"props":1151,"children":1152},{"style":415},[1153],{"type":44,"value":1154}," (\n",{"type":38,"tag":147,"props":1156,"children":1158},{"class":149,"line":1157},28,[1159,1164,1169,1174,1179,1184,1189,1194,1199,1204,1209,1213,1217],{"type":38,"tag":147,"props":1160,"children":1161},{"style":166},[1162],{"type":44,"value":1163},"    \u003C",{"type":38,"tag":147,"props":1165,"children":1166},{"style":415},[1167],{"type":44,"value":1168},"button",{"type":38,"tag":147,"props":1170,"children":1171},{"style":154},[1172],{"type":44,"value":1173}," onClick",{"type":38,"tag":147,"props":1175,"children":1176},{"style":166},[1177],{"type":44,"value":1178},"={",{"type":38,"tag":147,"props":1180,"children":1181},{"style":160},[1182],{"type":44,"value":1183},"handleSign",{"type":38,"tag":147,"props":1185,"children":1186},{"style":166},[1187],{"type":44,"value":1188},"} ",{"type":38,"tag":147,"props":1190,"children":1191},{"style":154},[1192],{"type":44,"value":1193},"disabled",{"type":38,"tag":147,"props":1195,"children":1196},{"style":166},[1197],{"type":44,"value":1198},"={!",{"type":38,"tag":147,"props":1200,"children":1201},{"style":160},[1202],{"type":44,"value":1203},"connected ",{"type":38,"tag":147,"props":1205,"children":1206},{"style":166},[1207],{"type":44,"value":1208},"||",{"type":38,"tag":147,"props":1210,"children":1211},{"style":166},[1212],{"type":44,"value":499},{"type":38,"tag":147,"props":1214,"children":1215},{"style":160},[1216],{"type":44,"value":489},{"type":38,"tag":147,"props":1218,"children":1219},{"style":166},[1220],{"type":44,"value":1221},"}>\n",{"type":38,"tag":147,"props":1223,"children":1225},{"class":149,"line":1224},29,[1226],{"type":38,"tag":147,"props":1227,"children":1228},{"style":160},[1229],{"type":44,"value":1230},"      Sign Message\n",{"type":38,"tag":147,"props":1232,"children":1234},{"class":149,"line":1233},30,[1235,1240,1244],{"type":38,"tag":147,"props":1236,"children":1237},{"style":166},[1238],{"type":44,"value":1239},"    \u003C\u002F",{"type":38,"tag":147,"props":1241,"children":1242},{"style":415},[1243],{"type":44,"value":1168},{"type":38,"tag":147,"props":1245,"children":1246},{"style":166},[1247],{"type":44,"value":1248},">\n",{"type":38,"tag":147,"props":1250,"children":1252},{"class":149,"line":1251},31,[1253,1258],{"type":38,"tag":147,"props":1254,"children":1255},{"style":415},[1256],{"type":44,"value":1257},"  )",{"type":38,"tag":147,"props":1259,"children":1260},{"style":166},[1261],{"type":44,"value":225},{"type":38,"tag":147,"props":1263,"children":1265},{"class":149,"line":1264},32,[1266],{"type":38,"tag":147,"props":1267,"children":1268},{"style":166},[1269],{"type":44,"value":1270},"}\n",{"type":38,"tag":108,"props":1272,"children":1274},{"id":1273},"step-2b-sign-with-vanilla-browser-wallet-standard-feature",[1275],{"type":44,"value":1276},"Step 2b: Sign with vanilla browser (wallet-standard feature)",{"type":38,"tag":54,"props":1278,"children":1279},{},[1280,1284,1285,1290,1292,1298,1300,1306],{"type":38,"tag":236,"props":1281,"children":1282},{},[1283],{"type":44,"value":240},{"type":44,"value":242},{"type":38,"tag":80,"props":1286,"children":1288},{"className":1287},[],[1289],{"type":44,"value":248},{"type":44,"value":1291}," has been called and the wallet is connected via ",{"type":38,"tag":80,"props":1293,"children":1295},{"className":1294},[],[1296],{"type":44,"value":1297},"standard:connect",{"type":44,"value":1299},". See the ",{"type":38,"tag":80,"props":1301,"children":1303},{"className":1302},[],[1304],{"type":44,"value":1305},"setup-solana-browser-app",{"type":44,"value":274},{"type":38,"tag":136,"props":1308,"children":1310},{"className":138,"code":1309,"language":140,"meta":141,"style":141},"import { createSolanaClient } from '@metamask\u002Fconnect-solana';\n\nconst solanaClient = await createSolanaClient({\n  dapp: { name: 'My DApp', url: window.location.href },\n});\n\nconst wallet = solanaClient.getWallet();\n\n\u002F\u002F Connect first\nconst connectFeature = wallet.features['standard:connect'];\nconst { accounts } = await connectFeature.connect();\nconst account = accounts[0];\n\n\u002F\u002F Sign the message\nconst signMessageFeature = wallet.features['solana:signMessage'];\n\ntry {\n  const message = new TextEncoder().encode('Hello from MetaMask on Solana!');\n\n  const [{ signature }] = await signMessageFeature.signMessage({\n    account,\n    message,\n  });\n\n  console.log('Signature (hex):', Buffer.from(signature).toString('hex'));\n  console.log('Signer:', account.address);\n} catch (err: any) {\n  if (err.code === 4001) {\n    console.log('User rejected the signature request');\n  } else {\n    console.error('signMessage failed:', err);\n  }\n}\n",[1311],{"type":38,"tag":80,"props":1312,"children":1313},{"__ignoreMap":141},[1314,1355,1362,1394,1473,1489,1496,1534,1541,1550,1601,1651,1685,1692,1700,1748,1755,1767,1826,1833,1883,1896,1908,1924,1931,2023,2080,2115,2155,2195,2211,2258,2266],{"type":38,"tag":147,"props":1315,"children":1316},{"class":149,"line":150},[1317,1321,1325,1330,1334,1338,1342,1347,1351],{"type":38,"tag":147,"props":1318,"children":1319},{"style":289},[1320],{"type":44,"value":292},{"type":38,"tag":147,"props":1322,"children":1323},{"style":166},[1324],{"type":44,"value":297},{"type":38,"tag":147,"props":1326,"children":1327},{"style":160},[1328],{"type":44,"value":1329}," createSolanaClient",{"type":38,"tag":147,"props":1331,"children":1332},{"style":166},[1333],{"type":44,"value":307},{"type":38,"tag":147,"props":1335,"children":1336},{"style":289},[1337],{"type":44,"value":312},{"type":38,"tag":147,"props":1339,"children":1340},{"style":166},[1341],{"type":44,"value":317},{"type":38,"tag":147,"props":1343,"children":1344},{"style":208},[1345],{"type":44,"value":1346},"@metamask\u002Fconnect-solana",{"type":38,"tag":147,"props":1348,"children":1349},{"style":166},[1350],{"type":44,"value":205},{"type":38,"tag":147,"props":1352,"children":1353},{"style":166},[1354],{"type":44,"value":225},{"type":38,"tag":147,"props":1356,"children":1357},{"class":149,"line":22},[1358],{"type":38,"tag":147,"props":1359,"children":1360},{"emptyLinePlaceholder":336},[1361],{"type":44,"value":339},{"type":38,"tag":147,"props":1363,"children":1364},{"class":149,"line":342},[1365,1369,1374,1378,1382,1386,1390],{"type":38,"tag":147,"props":1366,"children":1367},{"style":154},[1368],{"type":44,"value":157},{"type":38,"tag":147,"props":1370,"children":1371},{"style":160},[1372],{"type":44,"value":1373}," solanaClient ",{"type":38,"tag":147,"props":1375,"children":1376},{"style":166},[1377],{"type":44,"value":169},{"type":38,"tag":147,"props":1379,"children":1380},{"style":289},[1381],{"type":44,"value":685},{"type":38,"tag":147,"props":1383,"children":1384},{"style":177},[1385],{"type":44,"value":1329},{"type":38,"tag":147,"props":1387,"children":1388},{"style":160},[1389],{"type":44,"value":200},{"type":38,"tag":147,"props":1391,"children":1392},{"style":166},[1393],{"type":44,"value":514},{"type":38,"tag":147,"props":1395,"children":1396},{"class":149,"line":365},[1397,1402,1406,1410,1415,1419,1423,1428,1432,1436,1441,1445,1450,1454,1459,1463,1468],{"type":38,"tag":147,"props":1398,"children":1399},{"style":415},[1400],{"type":44,"value":1401},"  dapp",{"type":38,"tag":147,"props":1403,"children":1404},{"style":166},[1405],{"type":44,"value":943},{"type":38,"tag":147,"props":1407,"children":1408},{"style":166},[1409],{"type":44,"value":297},{"type":38,"tag":147,"props":1411,"children":1412},{"style":415},[1413],{"type":44,"value":1414}," name",{"type":38,"tag":147,"props":1416,"children":1417},{"style":166},[1418],{"type":44,"value":943},{"type":38,"tag":147,"props":1420,"children":1421},{"style":166},[1422],{"type":44,"value":317},{"type":38,"tag":147,"props":1424,"children":1425},{"style":208},[1426],{"type":44,"value":1427},"My DApp",{"type":38,"tag":147,"props":1429,"children":1430},{"style":166},[1431],{"type":44,"value":205},{"type":38,"tag":147,"props":1433,"children":1434},{"style":166},[1435],{"type":44,"value":385},{"type":38,"tag":147,"props":1437,"children":1438},{"style":415},[1439],{"type":44,"value":1440}," url",{"type":38,"tag":147,"props":1442,"children":1443},{"style":166},[1444],{"type":44,"value":943},{"type":38,"tag":147,"props":1446,"children":1447},{"style":160},[1448],{"type":44,"value":1449}," window",{"type":38,"tag":147,"props":1451,"children":1452},{"style":166},[1453],{"type":44,"value":190},{"type":38,"tag":147,"props":1455,"children":1456},{"style":160},[1457],{"type":44,"value":1458},"location",{"type":38,"tag":147,"props":1460,"children":1461},{"style":166},[1462],{"type":44,"value":190},{"type":38,"tag":147,"props":1464,"children":1465},{"style":160},[1466],{"type":44,"value":1467},"href ",{"type":38,"tag":147,"props":1469,"children":1470},{"style":166},[1471],{"type":44,"value":1472},"},\n",{"type":38,"tag":147,"props":1474,"children":1475},{"class":149,"line":424},[1476,1481,1485],{"type":38,"tag":147,"props":1477,"children":1478},{"style":166},[1479],{"type":44,"value":1480},"}",{"type":38,"tag":147,"props":1482,"children":1483},{"style":160},[1484],{"type":44,"value":220},{"type":38,"tag":147,"props":1486,"children":1487},{"style":166},[1488],{"type":44,"value":225},{"type":38,"tag":147,"props":1490,"children":1491},{"class":149,"line":432},[1492],{"type":38,"tag":147,"props":1493,"children":1494},{"emptyLinePlaceholder":336},[1495],{"type":44,"value":339},{"type":38,"tag":147,"props":1497,"children":1498},{"class":149,"line":468},[1499,1503,1508,1512,1517,1521,1526,1530],{"type":38,"tag":147,"props":1500,"children":1501},{"style":154},[1502],{"type":44,"value":157},{"type":38,"tag":147,"props":1504,"children":1505},{"style":160},[1506],{"type":44,"value":1507}," wallet ",{"type":38,"tag":147,"props":1509,"children":1510},{"style":166},[1511],{"type":44,"value":169},{"type":38,"tag":147,"props":1513,"children":1514},{"style":160},[1515],{"type":44,"value":1516}," solanaClient",{"type":38,"tag":147,"props":1518,"children":1519},{"style":166},[1520],{"type":44,"value":190},{"type":38,"tag":147,"props":1522,"children":1523},{"style":177},[1524],{"type":44,"value":1525},"getWallet",{"type":38,"tag":147,"props":1527,"children":1528},{"style":160},[1529],{"type":44,"value":185},{"type":38,"tag":147,"props":1531,"children":1532},{"style":166},[1533],{"type":44,"value":225},{"type":38,"tag":147,"props":1535,"children":1536},{"class":149,"line":517},[1537],{"type":38,"tag":147,"props":1538,"children":1539},{"emptyLinePlaceholder":336},[1540],{"type":44,"value":339},{"type":38,"tag":147,"props":1542,"children":1543},{"class":149,"line":560},[1544],{"type":38,"tag":147,"props":1545,"children":1547},{"style":1546},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[1548],{"type":44,"value":1549},"\u002F\u002F Connect first\n",{"type":38,"tag":147,"props":1551,"children":1552},{"class":149,"line":573},[1553,1557,1562,1566,1571,1575,1580,1584,1588,1592,1597],{"type":38,"tag":147,"props":1554,"children":1555},{"style":154},[1556],{"type":44,"value":157},{"type":38,"tag":147,"props":1558,"children":1559},{"style":160},[1560],{"type":44,"value":1561}," connectFeature ",{"type":38,"tag":147,"props":1563,"children":1564},{"style":166},[1565],{"type":44,"value":169},{"type":38,"tag":147,"props":1567,"children":1568},{"style":160},[1569],{"type":44,"value":1570}," wallet",{"type":38,"tag":147,"props":1572,"children":1573},{"style":166},[1574],{"type":44,"value":190},{"type":38,"tag":147,"props":1576,"children":1577},{"style":160},[1578],{"type":44,"value":1579},"features[",{"type":38,"tag":147,"props":1581,"children":1582},{"style":166},[1583],{"type":44,"value":205},{"type":38,"tag":147,"props":1585,"children":1586},{"style":208},[1587],{"type":44,"value":1297},{"type":38,"tag":147,"props":1589,"children":1590},{"style":166},[1591],{"type":44,"value":205},{"type":38,"tag":147,"props":1593,"children":1594},{"style":160},[1595],{"type":44,"value":1596},"]",{"type":38,"tag":147,"props":1598,"children":1599},{"style":166},[1600],{"type":44,"value":225},{"type":38,"tag":147,"props":1602,"children":1603},{"class":149,"line":582},[1604,1608,1612,1617,1621,1625,1629,1634,1638,1643,1647],{"type":38,"tag":147,"props":1605,"children":1606},{"style":154},[1607],{"type":44,"value":157},{"type":38,"tag":147,"props":1609,"children":1610},{"style":166},[1611],{"type":44,"value":297},{"type":38,"tag":147,"props":1613,"children":1614},{"style":160},[1615],{"type":44,"value":1616}," accounts ",{"type":38,"tag":147,"props":1618,"children":1619},{"style":166},[1620],{"type":44,"value":1480},{"type":38,"tag":147,"props":1622,"children":1623},{"style":166},[1624],{"type":44,"value":408},{"type":38,"tag":147,"props":1626,"children":1627},{"style":289},[1628],{"type":44,"value":685},{"type":38,"tag":147,"props":1630,"children":1631},{"style":160},[1632],{"type":44,"value":1633}," connectFeature",{"type":38,"tag":147,"props":1635,"children":1636},{"style":166},[1637],{"type":44,"value":190},{"type":38,"tag":147,"props":1639,"children":1640},{"style":177},[1641],{"type":44,"value":1642},"connect",{"type":38,"tag":147,"props":1644,"children":1645},{"style":160},[1646],{"type":44,"value":185},{"type":38,"tag":147,"props":1648,"children":1649},{"style":166},[1650],{"type":44,"value":225},{"type":38,"tag":147,"props":1652,"children":1653},{"class":149,"line":590},[1654,1658,1663,1667,1672,1677,1681],{"type":38,"tag":147,"props":1655,"children":1656},{"style":154},[1657],{"type":44,"value":157},{"type":38,"tag":147,"props":1659,"children":1660},{"style":160},[1661],{"type":44,"value":1662}," account ",{"type":38,"tag":147,"props":1664,"children":1665},{"style":166},[1666],{"type":44,"value":169},{"type":38,"tag":147,"props":1668,"children":1669},{"style":160},[1670],{"type":44,"value":1671}," accounts[",{"type":38,"tag":147,"props":1673,"children":1674},{"style":990},[1675],{"type":44,"value":1676},"0",{"type":38,"tag":147,"props":1678,"children":1679},{"style":160},[1680],{"type":44,"value":1596},{"type":38,"tag":147,"props":1682,"children":1683},{"style":166},[1684],{"type":44,"value":225},{"type":38,"tag":147,"props":1686,"children":1687},{"class":149,"line":603},[1688],{"type":38,"tag":147,"props":1689,"children":1690},{"emptyLinePlaceholder":336},[1691],{"type":44,"value":339},{"type":38,"tag":147,"props":1693,"children":1694},{"class":149,"line":666},[1695],{"type":38,"tag":147,"props":1696,"children":1697},{"style":1546},[1698],{"type":44,"value":1699},"\u002F\u002F Sign the message\n",{"type":38,"tag":147,"props":1701,"children":1702},{"class":149,"line":709},[1703,1707,1712,1716,1720,1724,1728,1732,1736,1740,1744],{"type":38,"tag":147,"props":1704,"children":1705},{"style":154},[1706],{"type":44,"value":157},{"type":38,"tag":147,"props":1708,"children":1709},{"style":160},[1710],{"type":44,"value":1711}," signMessageFeature ",{"type":38,"tag":147,"props":1713,"children":1714},{"style":166},[1715],{"type":44,"value":169},{"type":38,"tag":147,"props":1717,"children":1718},{"style":160},[1719],{"type":44,"value":1570},{"type":38,"tag":147,"props":1721,"children":1722},{"style":166},[1723],{"type":44,"value":190},{"type":38,"tag":147,"props":1725,"children":1726},{"style":160},[1727],{"type":44,"value":1579},{"type":38,"tag":147,"props":1729,"children":1730},{"style":166},[1731],{"type":44,"value":205},{"type":38,"tag":147,"props":1733,"children":1734},{"style":208},[1735],{"type":44,"value":98},{"type":38,"tag":147,"props":1737,"children":1738},{"style":166},[1739],{"type":44,"value":205},{"type":38,"tag":147,"props":1741,"children":1742},{"style":160},[1743],{"type":44,"value":1596},{"type":38,"tag":147,"props":1745,"children":1746},{"style":166},[1747],{"type":44,"value":225},{"type":38,"tag":147,"props":1749,"children":1750},{"class":149,"line":759},[1751],{"type":38,"tag":147,"props":1752,"children":1753},{"emptyLinePlaceholder":336},[1754],{"type":44,"value":339},{"type":38,"tag":147,"props":1756,"children":1757},{"class":149,"line":858},[1758,1763],{"type":38,"tag":147,"props":1759,"children":1760},{"style":289},[1761],{"type":44,"value":1762},"try",{"type":38,"tag":147,"props":1764,"children":1765},{"style":166},[1766],{"type":44,"value":362},{"type":38,"tag":147,"props":1768,"children":1769},{"class":149,"line":917},[1770,1774,1778,1782,1786,1790,1794,1798,1802,1806,1810,1814,1818,1822],{"type":38,"tag":147,"props":1771,"children":1772},{"style":154},[1773],{"type":44,"value":371},{"type":38,"tag":147,"props":1775,"children":1776},{"style":160},[1777],{"type":44,"value":614},{"type":38,"tag":147,"props":1779,"children":1780},{"style":166},[1781],{"type":44,"value":408},{"type":38,"tag":147,"props":1783,"children":1784},{"style":166},[1785],{"type":44,"value":174},{"type":38,"tag":147,"props":1787,"children":1788},{"style":177},[1789],{"type":44,"value":180},{"type":38,"tag":147,"props":1791,"children":1792},{"style":415},[1793],{"type":44,"value":185},{"type":38,"tag":147,"props":1795,"children":1796},{"style":166},[1797],{"type":44,"value":190},{"type":38,"tag":147,"props":1799,"children":1800},{"style":177},[1801],{"type":44,"value":195},{"type":38,"tag":147,"props":1803,"children":1804},{"style":415},[1805],{"type":44,"value":200},{"type":38,"tag":147,"props":1807,"children":1808},{"style":166},[1809],{"type":44,"value":205},{"type":38,"tag":147,"props":1811,"children":1812},{"style":208},[1813],{"type":44,"value":651},{"type":38,"tag":147,"props":1815,"children":1816},{"style":166},[1817],{"type":44,"value":205},{"type":38,"tag":147,"props":1819,"children":1820},{"style":415},[1821],{"type":44,"value":220},{"type":38,"tag":147,"props":1823,"children":1824},{"style":166},[1825],{"type":44,"value":225},{"type":38,"tag":147,"props":1827,"children":1828},{"class":149,"line":960},[1829],{"type":38,"tag":147,"props":1830,"children":1831},{"emptyLinePlaceholder":336},[1832],{"type":44,"value":339},{"type":38,"tag":147,"props":1834,"children":1835},{"class":149,"line":1004},[1836,1840,1845,1849,1854,1858,1862,1867,1871,1875,1879],{"type":38,"tag":147,"props":1837,"children":1838},{"style":154},[1839],{"type":44,"value":371},{"type":38,"tag":147,"props":1841,"children":1842},{"style":166},[1843],{"type":44,"value":1844}," [{",{"type":38,"tag":147,"props":1846,"children":1847},{"style":160},[1848],{"type":44,"value":676},{"type":38,"tag":147,"props":1850,"children":1851},{"style":166},[1852],{"type":44,"value":1853}," }]",{"type":38,"tag":147,"props":1855,"children":1856},{"style":166},[1857],{"type":44,"value":408},{"type":38,"tag":147,"props":1859,"children":1860},{"style":289},[1861],{"type":44,"value":685},{"type":38,"tag":147,"props":1863,"children":1864},{"style":160},[1865],{"type":44,"value":1866}," signMessageFeature",{"type":38,"tag":147,"props":1868,"children":1869},{"style":166},[1870],{"type":44,"value":190},{"type":38,"tag":147,"props":1872,"children":1873},{"style":177},[1874],{"type":44,"value":489},{"type":38,"tag":147,"props":1876,"children":1877},{"style":415},[1878],{"type":44,"value":200},{"type":38,"tag":147,"props":1880,"children":1881},{"style":166},[1882],{"type":44,"value":514},{"type":38,"tag":147,"props":1884,"children":1885},{"class":149,"line":1046},[1886,1891],{"type":38,"tag":147,"props":1887,"children":1888},{"style":160},[1889],{"type":44,"value":1890},"    account",{"type":38,"tag":147,"props":1892,"children":1893},{"style":166},[1894],{"type":44,"value":1895},",\n",{"type":38,"tag":147,"props":1897,"children":1898},{"class":149,"line":1059},[1899,1904],{"type":38,"tag":147,"props":1900,"children":1901},{"style":160},[1902],{"type":44,"value":1903},"    message",{"type":38,"tag":147,"props":1905,"children":1906},{"style":166},[1907],{"type":44,"value":1895},{"type":38,"tag":147,"props":1909,"children":1910},{"class":149,"line":1068},[1911,1916,1920],{"type":38,"tag":147,"props":1912,"children":1913},{"style":166},[1914],{"type":44,"value":1915},"  }",{"type":38,"tag":147,"props":1917,"children":1918},{"style":415},[1919],{"type":44,"value":220},{"type":38,"tag":147,"props":1921,"children":1922},{"style":166},[1923],{"type":44,"value":225},{"type":38,"tag":147,"props":1925,"children":1926},{"class":149,"line":1118},[1927],{"type":38,"tag":147,"props":1928,"children":1929},{"emptyLinePlaceholder":336},[1930],{"type":44,"value":339},{"type":38,"tag":147,"props":1932,"children":1933},{"class":149,"line":1126},[1934,1939,1943,1947,1951,1955,1959,1963,1967,1971,1975,1979,1983,1987,1991,1995,1999,2003,2007,2011,2015,2019],{"type":38,"tag":147,"props":1935,"children":1936},{"style":160},[1937],{"type":44,"value":1938},"  console",{"type":38,"tag":147,"props":1940,"children":1941},{"style":166},[1942],{"type":44,"value":190},{"type":38,"tag":147,"props":1944,"children":1945},{"style":177},[1946],{"type":44,"value":723},{"type":38,"tag":147,"props":1948,"children":1949},{"style":415},[1950],{"type":44,"value":200},{"type":38,"tag":147,"props":1952,"children":1953},{"style":166},[1954],{"type":44,"value":205},{"type":38,"tag":147,"props":1956,"children":1957},{"style":208},[1958],{"type":44,"value":785},{"type":38,"tag":147,"props":1960,"children":1961},{"style":166},[1962],{"type":44,"value":205},{"type":38,"tag":147,"props":1964,"children":1965},{"style":166},[1966],{"type":44,"value":385},{"type":38,"tag":147,"props":1968,"children":1969},{"style":160},[1970],{"type":44,"value":798},{"type":38,"tag":147,"props":1972,"children":1973},{"style":166},[1974],{"type":44,"value":190},{"type":38,"tag":147,"props":1976,"children":1977},{"style":177},[1978],{"type":44,"value":807},{"type":38,"tag":147,"props":1980,"children":1981},{"style":415},[1982],{"type":44,"value":200},{"type":38,"tag":147,"props":1984,"children":1985},{"style":160},[1986],{"type":44,"value":816},{"type":38,"tag":147,"props":1988,"children":1989},{"style":415},[1990],{"type":44,"value":220},{"type":38,"tag":147,"props":1992,"children":1993},{"style":166},[1994],{"type":44,"value":190},{"type":38,"tag":147,"props":1996,"children":1997},{"style":177},[1998],{"type":44,"value":829},{"type":38,"tag":147,"props":2000,"children":2001},{"style":415},[2002],{"type":44,"value":200},{"type":38,"tag":147,"props":2004,"children":2005},{"style":166},[2006],{"type":44,"value":205},{"type":38,"tag":147,"props":2008,"children":2009},{"style":208},[2010],{"type":44,"value":842},{"type":38,"tag":147,"props":2012,"children":2013},{"style":166},[2014],{"type":44,"value":205},{"type":38,"tag":147,"props":2016,"children":2017},{"style":415},[2018],{"type":44,"value":851},{"type":38,"tag":147,"props":2020,"children":2021},{"style":166},[2022],{"type":44,"value":225},{"type":38,"tag":147,"props":2024,"children":2025},{"class":149,"line":1135},[2026,2030,2034,2038,2042,2046,2050,2054,2058,2063,2067,2072,2076],{"type":38,"tag":147,"props":2027,"children":2028},{"style":160},[2029],{"type":44,"value":1938},{"type":38,"tag":147,"props":2031,"children":2032},{"style":166},[2033],{"type":44,"value":190},{"type":38,"tag":147,"props":2035,"children":2036},{"style":177},[2037],{"type":44,"value":723},{"type":38,"tag":147,"props":2039,"children":2040},{"style":415},[2041],{"type":44,"value":200},{"type":38,"tag":147,"props":2043,"children":2044},{"style":166},[2045],{"type":44,"value":205},{"type":38,"tag":147,"props":2047,"children":2048},{"style":208},[2049],{"type":44,"value":884},{"type":38,"tag":147,"props":2051,"children":2052},{"style":166},[2053],{"type":44,"value":205},{"type":38,"tag":147,"props":2055,"children":2056},{"style":166},[2057],{"type":44,"value":385},{"type":38,"tag":147,"props":2059,"children":2060},{"style":160},[2061],{"type":44,"value":2062}," account",{"type":38,"tag":147,"props":2064,"children":2065},{"style":166},[2066],{"type":44,"value":190},{"type":38,"tag":147,"props":2068,"children":2069},{"style":160},[2070],{"type":44,"value":2071},"address",{"type":38,"tag":147,"props":2073,"children":2074},{"style":415},[2075],{"type":44,"value":220},{"type":38,"tag":147,"props":2077,"children":2078},{"style":166},[2079],{"type":44,"value":225},{"type":38,"tag":147,"props":2081,"children":2082},{"class":149,"line":1143},[2083,2087,2091,2095,2099,2103,2107,2111],{"type":38,"tag":147,"props":2084,"children":2085},{"style":166},[2086],{"type":44,"value":1480},{"type":38,"tag":147,"props":2088,"children":2089},{"style":289},[2090],{"type":44,"value":928},{"type":38,"tag":147,"props":2092,"children":2093},{"style":166},[2094],{"type":44,"value":479},{"type":38,"tag":147,"props":2096,"children":2097},{"style":935},[2098],{"type":44,"value":938},{"type":38,"tag":147,"props":2100,"children":2101},{"style":166},[2102],{"type":44,"value":943},{"type":38,"tag":147,"props":2104,"children":2105},{"style":946},[2106],{"type":44,"value":949},{"type":38,"tag":147,"props":2108,"children":2109},{"style":166},[2110],{"type":44,"value":220},{"type":38,"tag":147,"props":2112,"children":2113},{"style":166},[2114],{"type":44,"value":362},{"type":38,"tag":147,"props":2116,"children":2117},{"class":149,"line":1157},[2118,2123,2127,2131,2135,2139,2143,2147,2151],{"type":38,"tag":147,"props":2119,"children":2120},{"style":289},[2121],{"type":44,"value":2122},"  if",{"type":38,"tag":147,"props":2124,"children":2125},{"style":415},[2126],{"type":44,"value":479},{"type":38,"tag":147,"props":2128,"children":2129},{"style":160},[2130],{"type":44,"value":938},{"type":38,"tag":147,"props":2132,"children":2133},{"style":166},[2134],{"type":44,"value":190},{"type":38,"tag":147,"props":2136,"children":2137},{"style":160},[2138],{"type":44,"value":80},{"type":38,"tag":147,"props":2140,"children":2141},{"style":166},[2142],{"type":44,"value":987},{"type":38,"tag":147,"props":2144,"children":2145},{"style":990},[2146],{"type":44,"value":993},{"type":38,"tag":147,"props":2148,"children":2149},{"style":415},[2150],{"type":44,"value":509},{"type":38,"tag":147,"props":2152,"children":2153},{"style":166},[2154],{"type":44,"value":514},{"type":38,"tag":147,"props":2156,"children":2157},{"class":149,"line":1224},[2158,2163,2167,2171,2175,2179,2183,2187,2191],{"type":38,"tag":147,"props":2159,"children":2160},{"style":160},[2161],{"type":44,"value":2162},"    console",{"type":38,"tag":147,"props":2164,"children":2165},{"style":166},[2166],{"type":44,"value":190},{"type":38,"tag":147,"props":2168,"children":2169},{"style":177},[2170],{"type":44,"value":723},{"type":38,"tag":147,"props":2172,"children":2173},{"style":415},[2174],{"type":44,"value":200},{"type":38,"tag":147,"props":2176,"children":2177},{"style":166},[2178],{"type":44,"value":205},{"type":38,"tag":147,"props":2180,"children":2181},{"style":208},[2182],{"type":44,"value":1031},{"type":38,"tag":147,"props":2184,"children":2185},{"style":166},[2186],{"type":44,"value":205},{"type":38,"tag":147,"props":2188,"children":2189},{"style":415},[2190],{"type":44,"value":220},{"type":38,"tag":147,"props":2192,"children":2193},{"style":166},[2194],{"type":44,"value":225},{"type":38,"tag":147,"props":2196,"children":2197},{"class":149,"line":1233},[2198,2202,2207],{"type":38,"tag":147,"props":2199,"children":2200},{"style":166},[2201],{"type":44,"value":1915},{"type":38,"tag":147,"props":2203,"children":2204},{"style":289},[2205],{"type":44,"value":2206}," else",{"type":38,"tag":147,"props":2208,"children":2209},{"style":166},[2210],{"type":44,"value":362},{"type":38,"tag":147,"props":2212,"children":2213},{"class":149,"line":1251},[2214,2218,2222,2226,2230,2234,2238,2242,2246,2250,2254],{"type":38,"tag":147,"props":2215,"children":2216},{"style":160},[2217],{"type":44,"value":2162},{"type":38,"tag":147,"props":2219,"children":2220},{"style":166},[2221],{"type":44,"value":190},{"type":38,"tag":147,"props":2223,"children":2224},{"style":177},[2225],{"type":44,"value":532},{"type":38,"tag":147,"props":2227,"children":2228},{"style":415},[2229],{"type":44,"value":200},{"type":38,"tag":147,"props":2231,"children":2232},{"style":166},[2233],{"type":44,"value":205},{"type":38,"tag":147,"props":2235,"children":2236},{"style":208},[2237],{"type":44,"value":1094},{"type":38,"tag":147,"props":2239,"children":2240},{"style":166},[2241],{"type":44,"value":205},{"type":38,"tag":147,"props":2243,"children":2244},{"style":166},[2245],{"type":44,"value":385},{"type":38,"tag":147,"props":2247,"children":2248},{"style":160},[2249],{"type":44,"value":1107},{"type":38,"tag":147,"props":2251,"children":2252},{"style":415},[2253],{"type":44,"value":220},{"type":38,"tag":147,"props":2255,"children":2256},{"style":166},[2257],{"type":44,"value":225},{"type":38,"tag":147,"props":2259,"children":2260},{"class":149,"line":1264},[2261],{"type":38,"tag":147,"props":2262,"children":2263},{"style":166},[2264],{"type":44,"value":2265},"  }\n",{"type":38,"tag":147,"props":2267,"children":2269},{"class":149,"line":2268},33,[2270],{"type":38,"tag":147,"props":2271,"children":2272},{"style":166},[2273],{"type":44,"value":1270},{"type":38,"tag":108,"props":2275,"children":2277},{"id":2276},"step-3-verify-the-signature-optional",[2278],{"type":44,"value":2279},"Step 3: Verify the signature (optional)",{"type":38,"tag":54,"props":2281,"children":2282},{},[2283,2285,2291,2293,2299],{"type":44,"value":2284},"Use ",{"type":38,"tag":80,"props":2286,"children":2288},{"className":2287},[],[2289],{"type":44,"value":2290},"tweetnacl",{"type":44,"value":2292}," or ",{"type":38,"tag":80,"props":2294,"children":2296},{"className":2295},[],[2297],{"type":44,"value":2298},"@noble\u002Fed25519",{"type":44,"value":2300}," to verify the signature off-chain:",{"type":38,"tag":136,"props":2302,"children":2304},{"className":138,"code":2303,"language":140,"meta":141,"style":141},"import nacl from 'tweetnacl';\n\nconst message = new TextEncoder().encode('Hello from MetaMask on Solana!');\nconst isValid = nacl.sign.detached.verify(\n  message,\n  signature, \u002F\u002F Uint8Array from signMessage\n  publicKey.toBytes(), \u002F\u002F Uint8Array of the signer's public key\n);\nconsole.log('Signature valid:', isValid);\n",[2305],{"type":38,"tag":80,"props":2306,"children":2307},{"__ignoreMap":141},[2308,2340,2347,2406,2459,2471,2488,2518,2529],{"type":38,"tag":147,"props":2309,"children":2310},{"class":149,"line":150},[2311,2315,2320,2324,2328,2332,2336],{"type":38,"tag":147,"props":2312,"children":2313},{"style":289},[2314],{"type":44,"value":292},{"type":38,"tag":147,"props":2316,"children":2317},{"style":160},[2318],{"type":44,"value":2319}," nacl ",{"type":38,"tag":147,"props":2321,"children":2322},{"style":289},[2323],{"type":44,"value":807},{"type":38,"tag":147,"props":2325,"children":2326},{"style":166},[2327],{"type":44,"value":317},{"type":38,"tag":147,"props":2329,"children":2330},{"style":208},[2331],{"type":44,"value":2290},{"type":38,"tag":147,"props":2333,"children":2334},{"style":166},[2335],{"type":44,"value":205},{"type":38,"tag":147,"props":2337,"children":2338},{"style":166},[2339],{"type":44,"value":225},{"type":38,"tag":147,"props":2341,"children":2342},{"class":149,"line":22},[2343],{"type":38,"tag":147,"props":2344,"children":2345},{"emptyLinePlaceholder":336},[2346],{"type":44,"value":339},{"type":38,"tag":147,"props":2348,"children":2349},{"class":149,"line":342},[2350,2354,2358,2362,2366,2370,2374,2378,2382,2386,2390,2394,2398,2402],{"type":38,"tag":147,"props":2351,"children":2352},{"style":154},[2353],{"type":44,"value":157},{"type":38,"tag":147,"props":2355,"children":2356},{"style":160},[2357],{"type":44,"value":163},{"type":38,"tag":147,"props":2359,"children":2360},{"style":166},[2361],{"type":44,"value":169},{"type":38,"tag":147,"props":2363,"children":2364},{"style":166},[2365],{"type":44,"value":174},{"type":38,"tag":147,"props":2367,"children":2368},{"style":177},[2369],{"type":44,"value":180},{"type":38,"tag":147,"props":2371,"children":2372},{"style":160},[2373],{"type":44,"value":185},{"type":38,"tag":147,"props":2375,"children":2376},{"style":166},[2377],{"type":44,"value":190},{"type":38,"tag":147,"props":2379,"children":2380},{"style":177},[2381],{"type":44,"value":195},{"type":38,"tag":147,"props":2383,"children":2384},{"style":160},[2385],{"type":44,"value":200},{"type":38,"tag":147,"props":2387,"children":2388},{"style":166},[2389],{"type":44,"value":205},{"type":38,"tag":147,"props":2391,"children":2392},{"style":208},[2393],{"type":44,"value":651},{"type":38,"tag":147,"props":2395,"children":2396},{"style":166},[2397],{"type":44,"value":205},{"type":38,"tag":147,"props":2399,"children":2400},{"style":160},[2401],{"type":44,"value":220},{"type":38,"tag":147,"props":2403,"children":2404},{"style":166},[2405],{"type":44,"value":225},{"type":38,"tag":147,"props":2407,"children":2408},{"class":149,"line":365},[2409,2413,2418,2422,2427,2431,2436,2440,2445,2449,2454],{"type":38,"tag":147,"props":2410,"children":2411},{"style":154},[2412],{"type":44,"value":157},{"type":38,"tag":147,"props":2414,"children":2415},{"style":160},[2416],{"type":44,"value":2417}," isValid ",{"type":38,"tag":147,"props":2419,"children":2420},{"style":166},[2421],{"type":44,"value":169},{"type":38,"tag":147,"props":2423,"children":2424},{"style":160},[2425],{"type":44,"value":2426}," nacl",{"type":38,"tag":147,"props":2428,"children":2429},{"style":166},[2430],{"type":44,"value":190},{"type":38,"tag":147,"props":2432,"children":2433},{"style":160},[2434],{"type":44,"value":2435},"sign",{"type":38,"tag":147,"props":2437,"children":2438},{"style":166},[2439],{"type":44,"value":190},{"type":38,"tag":147,"props":2441,"children":2442},{"style":160},[2443],{"type":44,"value":2444},"detached",{"type":38,"tag":147,"props":2446,"children":2447},{"style":166},[2448],{"type":44,"value":190},{"type":38,"tag":147,"props":2450,"children":2451},{"style":177},[2452],{"type":44,"value":2453},"verify",{"type":38,"tag":147,"props":2455,"children":2456},{"style":160},[2457],{"type":44,"value":2458},"(\n",{"type":38,"tag":147,"props":2460,"children":2461},{"class":149,"line":424},[2462,2467],{"type":38,"tag":147,"props":2463,"children":2464},{"style":160},[2465],{"type":44,"value":2466},"  message",{"type":38,"tag":147,"props":2468,"children":2469},{"style":166},[2470],{"type":44,"value":1895},{"type":38,"tag":147,"props":2472,"children":2473},{"class":149,"line":432},[2474,2479,2483],{"type":38,"tag":147,"props":2475,"children":2476},{"style":160},[2477],{"type":44,"value":2478},"  signature",{"type":38,"tag":147,"props":2480,"children":2481},{"style":166},[2482],{"type":44,"value":385},{"type":38,"tag":147,"props":2484,"children":2485},{"style":1546},[2486],{"type":44,"value":2487}," \u002F\u002F Uint8Array from signMessage\n",{"type":38,"tag":147,"props":2489,"children":2490},{"class":149,"line":468},[2491,2496,2500,2505,2509,2513],{"type":38,"tag":147,"props":2492,"children":2493},{"style":160},[2494],{"type":44,"value":2495},"  publicKey",{"type":38,"tag":147,"props":2497,"children":2498},{"style":166},[2499],{"type":44,"value":190},{"type":38,"tag":147,"props":2501,"children":2502},{"style":177},[2503],{"type":44,"value":2504},"toBytes",{"type":38,"tag":147,"props":2506,"children":2507},{"style":160},[2508],{"type":44,"value":185},{"type":38,"tag":147,"props":2510,"children":2511},{"style":166},[2512],{"type":44,"value":385},{"type":38,"tag":147,"props":2514,"children":2515},{"style":1546},[2516],{"type":44,"value":2517}," \u002F\u002F Uint8Array of the signer's public key\n",{"type":38,"tag":147,"props":2519,"children":2520},{"class":149,"line":517},[2521,2525],{"type":38,"tag":147,"props":2522,"children":2523},{"style":160},[2524],{"type":44,"value":220},{"type":38,"tag":147,"props":2526,"children":2527},{"style":166},[2528],{"type":44,"value":225},{"type":38,"tag":147,"props":2530,"children":2531},{"class":149,"line":560},[2532,2537,2541,2545,2549,2553,2558,2562,2566,2571],{"type":38,"tag":147,"props":2533,"children":2534},{"style":160},[2535],{"type":44,"value":2536},"console",{"type":38,"tag":147,"props":2538,"children":2539},{"style":166},[2540],{"type":44,"value":190},{"type":38,"tag":147,"props":2542,"children":2543},{"style":177},[2544],{"type":44,"value":723},{"type":38,"tag":147,"props":2546,"children":2547},{"style":160},[2548],{"type":44,"value":200},{"type":38,"tag":147,"props":2550,"children":2551},{"style":166},[2552],{"type":44,"value":205},{"type":38,"tag":147,"props":2554,"children":2555},{"style":208},[2556],{"type":44,"value":2557},"Signature valid:",{"type":38,"tag":147,"props":2559,"children":2560},{"style":166},[2561],{"type":44,"value":205},{"type":38,"tag":147,"props":2563,"children":2564},{"style":166},[2565],{"type":44,"value":385},{"type":38,"tag":147,"props":2567,"children":2568},{"style":160},[2569],{"type":44,"value":2570}," isValid)",{"type":38,"tag":147,"props":2572,"children":2573},{"style":166},[2574],{"type":44,"value":225},{"type":38,"tag":108,"props":2576,"children":2578},{"id":2577},"step-4-error-handling",[2579],{"type":44,"value":2580},"Step 4: Error handling",{"type":38,"tag":54,"props":2582,"children":2583},{},[2584],{"type":44,"value":2585},"Handle these common error scenarios:",{"type":38,"tag":2587,"props":2588,"children":2589},"table",{},[2590,2614],{"type":38,"tag":2591,"props":2592,"children":2593},"thead",{},[2594],{"type":38,"tag":2595,"props":2596,"children":2597},"tr",{},[2598,2604,2609],{"type":38,"tag":2599,"props":2600,"children":2601},"th",{},[2602],{"type":44,"value":2603},"Error",{"type":38,"tag":2599,"props":2605,"children":2606},{},[2607],{"type":44,"value":2608},"Cause",{"type":38,"tag":2599,"props":2610,"children":2611},{},[2612],{"type":44,"value":2613},"Action",{"type":38,"tag":2615,"props":2616,"children":2617},"tbody",{},[2618,2643,2679,2707],{"type":38,"tag":2595,"props":2619,"children":2620},{},[2621,2633,2638],{"type":38,"tag":2622,"props":2623,"children":2624},"td",{},[2625,2627],{"type":44,"value":2626},"Code ",{"type":38,"tag":80,"props":2628,"children":2630},{"className":2629},[],[2631],{"type":44,"value":2632},"4001",{"type":38,"tag":2622,"props":2634,"children":2635},{},[2636],{"type":44,"value":2637},"User rejected the request in MetaMask",{"type":38,"tag":2622,"props":2639,"children":2640},{},[2641],{"type":44,"value":2642},"Show retry UI, do not treat as app error",{"type":38,"tag":2595,"props":2644,"children":2645},{},[2646,2662,2667],{"type":38,"tag":2622,"props":2647,"children":2648},{},[2649,2654,2656],{"type":38,"tag":80,"props":2650,"children":2652},{"className":2651},[],[2653],{"type":44,"value":489},{"type":44,"value":2655}," is ",{"type":38,"tag":80,"props":2657,"children":2659},{"className":2658},[],[2660],{"type":44,"value":2661},"undefined",{"type":38,"tag":2622,"props":2663,"children":2664},{},[2665],{"type":44,"value":2666},"Wallet does not support message signing",{"type":38,"tag":2622,"props":2668,"children":2669},{},[2670,2672,2677],{"type":44,"value":2671},"Check ",{"type":38,"tag":80,"props":2673,"children":2675},{"className":2674},[],[2676],{"type":44,"value":489},{"type":44,"value":2678}," exists before calling",{"type":38,"tag":2595,"props":2680,"children":2681},{},[2682,2697,2702],{"type":38,"tag":2622,"props":2683,"children":2684},{},[2685,2690,2691],{"type":38,"tag":80,"props":2686,"children":2688},{"className":2687},[],[2689],{"type":44,"value":504},{"type":44,"value":2655},{"type":38,"tag":80,"props":2692,"children":2694},{"className":2693},[],[2695],{"type":44,"value":2696},"null",{"type":38,"tag":2622,"props":2698,"children":2699},{},[2700],{"type":44,"value":2701},"Wallet not connected",{"type":38,"tag":2622,"props":2703,"children":2704},{},[2705],{"type":44,"value":2706},"Prompt user to connect first",{"type":38,"tag":2595,"props":2708,"children":2709},{},[2710,2715,2720],{"type":38,"tag":2622,"props":2711,"children":2712},{},[2713],{"type":44,"value":2714},"Network error",{"type":38,"tag":2622,"props":2716,"children":2717},{},[2718],{"type":44,"value":2719},"MetaMask Mobile connection interrupted",{"type":38,"tag":2622,"props":2721,"children":2722},{},[2723],{"type":44,"value":2724},"Retry or reconnect",{"type":38,"tag":136,"props":2726,"children":2728},{"className":138,"code":2727,"language":140,"meta":141,"style":141},"try {\n  const signature = await signMessage(message);\n} catch (err: any) {\n  switch (err.code) {\n    case 4001:\n      \u002F\u002F User rejected — show retry button\n      break;\n    case -32002:\n      \u002F\u002F Request already pending — wait for user to act in MetaMask\n      break;\n    default:\n      console.error('Unexpected error:', err);\n  }\n}\n",[2729],{"type":38,"tag":80,"props":2730,"children":2731},{"__ignoreMap":141},[2732,2743,2782,2817,2849,2866,2874,2886,2907,2915,2926,2938,2986,2993],{"type":38,"tag":147,"props":2733,"children":2734},{"class":149,"line":150},[2735,2739],{"type":38,"tag":147,"props":2736,"children":2737},{"style":289},[2738],{"type":44,"value":1762},{"type":38,"tag":147,"props":2740,"children":2741},{"style":166},[2742],{"type":44,"value":362},{"type":38,"tag":147,"props":2744,"children":2745},{"class":149,"line":22},[2746,2750,2754,2758,2762,2766,2770,2774,2778],{"type":38,"tag":147,"props":2747,"children":2748},{"style":154},[2749],{"type":44,"value":371},{"type":38,"tag":147,"props":2751,"children":2752},{"style":160},[2753],{"type":44,"value":676},{"type":38,"tag":147,"props":2755,"children":2756},{"style":166},[2757],{"type":44,"value":408},{"type":38,"tag":147,"props":2759,"children":2760},{"style":289},[2761],{"type":44,"value":685},{"type":38,"tag":147,"props":2763,"children":2764},{"style":177},[2765],{"type":44,"value":380},{"type":38,"tag":147,"props":2767,"children":2768},{"style":415},[2769],{"type":44,"value":200},{"type":38,"tag":147,"props":2771,"children":2772},{"style":160},[2773],{"type":44,"value":698},{"type":38,"tag":147,"props":2775,"children":2776},{"style":415},[2777],{"type":44,"value":220},{"type":38,"tag":147,"props":2779,"children":2780},{"style":166},[2781],{"type":44,"value":225},{"type":38,"tag":147,"props":2783,"children":2784},{"class":149,"line":342},[2785,2789,2793,2797,2801,2805,2809,2813],{"type":38,"tag":147,"props":2786,"children":2787},{"style":166},[2788],{"type":44,"value":1480},{"type":38,"tag":147,"props":2790,"children":2791},{"style":289},[2792],{"type":44,"value":928},{"type":38,"tag":147,"props":2794,"children":2795},{"style":166},[2796],{"type":44,"value":479},{"type":38,"tag":147,"props":2798,"children":2799},{"style":935},[2800],{"type":44,"value":938},{"type":38,"tag":147,"props":2802,"children":2803},{"style":166},[2804],{"type":44,"value":943},{"type":38,"tag":147,"props":2806,"children":2807},{"style":946},[2808],{"type":44,"value":949},{"type":38,"tag":147,"props":2810,"children":2811},{"style":166},[2812],{"type":44,"value":220},{"type":38,"tag":147,"props":2814,"children":2815},{"style":166},[2816],{"type":44,"value":362},{"type":38,"tag":147,"props":2818,"children":2819},{"class":149,"line":365},[2820,2825,2829,2833,2837,2841,2845],{"type":38,"tag":147,"props":2821,"children":2822},{"style":289},[2823],{"type":44,"value":2824},"  switch",{"type":38,"tag":147,"props":2826,"children":2827},{"style":415},[2828],{"type":44,"value":479},{"type":38,"tag":147,"props":2830,"children":2831},{"style":160},[2832],{"type":44,"value":938},{"type":38,"tag":147,"props":2834,"children":2835},{"style":166},[2836],{"type":44,"value":190},{"type":38,"tag":147,"props":2838,"children":2839},{"style":160},[2840],{"type":44,"value":80},{"type":38,"tag":147,"props":2842,"children":2843},{"style":415},[2844],{"type":44,"value":509},{"type":38,"tag":147,"props":2846,"children":2847},{"style":166},[2848],{"type":44,"value":514},{"type":38,"tag":147,"props":2850,"children":2851},{"class":149,"line":424},[2852,2857,2861],{"type":38,"tag":147,"props":2853,"children":2854},{"style":289},[2855],{"type":44,"value":2856},"    case",{"type":38,"tag":147,"props":2858,"children":2859},{"style":990},[2860],{"type":44,"value":993},{"type":38,"tag":147,"props":2862,"children":2863},{"style":166},[2864],{"type":44,"value":2865},":\n",{"type":38,"tag":147,"props":2867,"children":2868},{"class":149,"line":432},[2869],{"type":38,"tag":147,"props":2870,"children":2871},{"style":1546},[2872],{"type":44,"value":2873},"      \u002F\u002F User rejected — show retry button\n",{"type":38,"tag":147,"props":2875,"children":2876},{"class":149,"line":468},[2877,2882],{"type":38,"tag":147,"props":2878,"children":2879},{"style":289},[2880],{"type":44,"value":2881},"      break",{"type":38,"tag":147,"props":2883,"children":2884},{"style":166},[2885],{"type":44,"value":225},{"type":38,"tag":147,"props":2887,"children":2888},{"class":149,"line":517},[2889,2893,2898,2903],{"type":38,"tag":147,"props":2890,"children":2891},{"style":289},[2892],{"type":44,"value":2856},{"type":38,"tag":147,"props":2894,"children":2895},{"style":166},[2896],{"type":44,"value":2897}," -",{"type":38,"tag":147,"props":2899,"children":2900},{"style":990},[2901],{"type":44,"value":2902},"32002",{"type":38,"tag":147,"props":2904,"children":2905},{"style":166},[2906],{"type":44,"value":2865},{"type":38,"tag":147,"props":2908,"children":2909},{"class":149,"line":560},[2910],{"type":38,"tag":147,"props":2911,"children":2912},{"style":1546},[2913],{"type":44,"value":2914},"      \u002F\u002F Request already pending — wait for user to act in MetaMask\n",{"type":38,"tag":147,"props":2916,"children":2917},{"class":149,"line":573},[2918,2922],{"type":38,"tag":147,"props":2919,"children":2920},{"style":289},[2921],{"type":44,"value":2881},{"type":38,"tag":147,"props":2923,"children":2924},{"style":166},[2925],{"type":44,"value":225},{"type":38,"tag":147,"props":2927,"children":2928},{"class":149,"line":582},[2929,2934],{"type":38,"tag":147,"props":2930,"children":2931},{"style":289},[2932],{"type":44,"value":2933},"    default",{"type":38,"tag":147,"props":2935,"children":2936},{"style":166},[2937],{"type":44,"value":2865},{"type":38,"tag":147,"props":2939,"children":2940},{"class":149,"line":590},[2941,2945,2949,2953,2957,2961,2966,2970,2974,2978,2982],{"type":38,"tag":147,"props":2942,"children":2943},{"style":160},[2944],{"type":44,"value":523},{"type":38,"tag":147,"props":2946,"children":2947},{"style":166},[2948],{"type":44,"value":190},{"type":38,"tag":147,"props":2950,"children":2951},{"style":177},[2952],{"type":44,"value":532},{"type":38,"tag":147,"props":2954,"children":2955},{"style":415},[2956],{"type":44,"value":200},{"type":38,"tag":147,"props":2958,"children":2959},{"style":166},[2960],{"type":44,"value":205},{"type":38,"tag":147,"props":2962,"children":2963},{"style":208},[2964],{"type":44,"value":2965},"Unexpected error:",{"type":38,"tag":147,"props":2967,"children":2968},{"style":166},[2969],{"type":44,"value":205},{"type":38,"tag":147,"props":2971,"children":2972},{"style":166},[2973],{"type":44,"value":385},{"type":38,"tag":147,"props":2975,"children":2976},{"style":160},[2977],{"type":44,"value":1107},{"type":38,"tag":147,"props":2979,"children":2980},{"style":415},[2981],{"type":44,"value":220},{"type":38,"tag":147,"props":2983,"children":2984},{"style":166},[2985],{"type":44,"value":225},{"type":38,"tag":147,"props":2987,"children":2988},{"class":149,"line":603},[2989],{"type":38,"tag":147,"props":2990,"children":2991},{"style":166},[2992],{"type":44,"value":2265},{"type":38,"tag":147,"props":2994,"children":2995},{"class":149,"line":666},[2996],{"type":38,"tag":147,"props":2997,"children":2998},{"style":166},[2999],{"type":44,"value":1270},{"type":38,"tag":47,"props":3001,"children":3003},{"id":3002},"important-notes",[3004],{"type":44,"value":3005},"Important Notes",{"type":38,"tag":60,"props":3007,"children":3008},{},[3009,3038,3065,3082,3097,3113],{"type":38,"tag":64,"props":3010,"children":3011},{},[3012,3022,3024,3030,3032,3037],{"type":38,"tag":236,"props":3013,"children":3014},{},[3015,3017],{"type":44,"value":3016},"Messages must be ",{"type":38,"tag":80,"props":3018,"children":3020},{"className":3019},[],[3021],{"type":44,"value":124},{"type":44,"value":3023}," — use ",{"type":38,"tag":80,"props":3025,"children":3027},{"className":3026},[],[3028],{"type":44,"value":3029},"new TextEncoder().encode(string)",{"type":44,"value":3031}," to convert. Do not pass raw strings to ",{"type":38,"tag":80,"props":3033,"children":3035},{"className":3034},[],[3036],{"type":44,"value":489},{"type":44,"value":190},{"type":38,"tag":64,"props":3039,"children":3040},{},[3041,3056,3058,3063],{"type":38,"tag":236,"props":3042,"children":3043},{},[3044,3049,3051],{"type":38,"tag":80,"props":3045,"children":3047},{"className":3046},[],[3048],{"type":44,"value":489},{"type":44,"value":3050}," may be ",{"type":38,"tag":80,"props":3052,"children":3054},{"className":3053},[],[3055],{"type":44,"value":2661},{"type":44,"value":3057}," — always check that ",{"type":38,"tag":80,"props":3059,"children":3061},{"className":3060},[],[3062],{"type":44,"value":489},{"type":44,"value":3064}," exists on the wallet adapter before calling it. Not all wallets support arbitrary message signing.",{"type":38,"tag":64,"props":3066,"children":3067},{},[3068,3073,3075,3080],{"type":38,"tag":236,"props":3069,"children":3070},{},[3071],{"type":44,"value":3072},"The signature is Ed25519",{"type":44,"value":3074}," — Solana uses Ed25519 signatures. The returned ",{"type":38,"tag":80,"props":3076,"children":3078},{"className":3077},[],[3079],{"type":44,"value":124},{"type":44,"value":3081}," is 64 bytes.",{"type":38,"tag":64,"props":3083,"children":3084},{},[3085,3095],{"type":38,"tag":236,"props":3086,"children":3087},{},[3088,3090],{"type":44,"value":3089},"User rejection is code ",{"type":38,"tag":80,"props":3091,"children":3093},{"className":3092},[],[3094],{"type":44,"value":2632},{"type":44,"value":3096}," — handle it gracefully with a retry option. Do not log it as an error.",{"type":38,"tag":64,"props":3098,"children":3099},{},[3100,3111],{"type":38,"tag":236,"props":3101,"children":3102},{},[3103,3105],{"type":44,"value":3104},"Wallet name is ",{"type":38,"tag":80,"props":3106,"children":3108},{"className":3107},[],[3109],{"type":44,"value":3110},"\"MetaMask\"",{"type":44,"value":3112}," — case-sensitive, used to identify the MetaMask wallet in the adapter list.",{"type":38,"tag":64,"props":3114,"children":3115},{},[3116,3121],{"type":38,"tag":236,"props":3117,"children":3118},{},[3119],{"type":44,"value":3120},"Solana networks",{"type":44,"value":3122}," — mainnet, devnet, and testnet scopes are all modeled by the SDK; non-mainnet availability depends on the connected MetaMask build\u002Fversion, so handle connection errors rather than assuming a cluster is present.",{"type":38,"tag":3124,"props":3125,"children":3126},"style",{},[3127],{"type":44,"value":3128},"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":3130,"total":917},[3131,3148,3160,3172,3184,3201,3215],{"slug":3132,"name":3132,"fn":3133,"description":3134,"org":3135,"tags":3136,"stars":22,"repoUrl":23,"updatedAt":3147},"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},[3137,3140,3143,3146],{"name":3138,"slug":3139,"type":15},"Ethereum","ethereum",{"name":3141,"slug":3142,"type":15},"Migration","migration",{"name":3144,"slug":3145,"type":15},"SDK","sdk",{"name":17,"slug":18,"type":15},"2026-07-13T06:11:46.427441",{"slug":3149,"name":3149,"fn":3150,"description":3151,"org":3152,"tags":3153,"stars":22,"repoUrl":23,"updatedAt":3159},"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},[3154,3155,3156,3158],{"name":3138,"slug":3139,"type":15},{"name":3141,"slug":3142,"type":15},{"name":3157,"slug":3157,"type":15},"wagmi",{"name":17,"slug":18,"type":15},"2026-07-13T06:12:23.110706",{"slug":3161,"name":3161,"fn":3162,"description":3163,"org":3164,"tags":3165,"stars":22,"repoUrl":23,"updatedAt":3171},"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},[3166,3169,3170],{"name":3167,"slug":3168,"type":15},"API Development","api-development",{"name":3138,"slug":3139,"type":15},{"name":17,"slug":18,"type":15},"2026-07-13T06:11:56.866623",{"slug":3173,"name":3173,"fn":3174,"description":3175,"org":3176,"tags":3177,"stars":22,"repoUrl":23,"updatedAt":3183},"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},[3178,3181,3182],{"name":3179,"slug":3180,"type":15},"Payments","payments",{"name":20,"slug":21,"type":15},{"name":17,"slug":18,"type":15},"2026-07-13T06:12:03.942378",{"slug":3185,"name":3185,"fn":3186,"description":3187,"org":3188,"tags":3189,"stars":22,"repoUrl":23,"updatedAt":3200},"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},[3190,3191,3194,3197,3199],{"name":3138,"slug":3139,"type":15},{"name":3192,"slug":3193,"type":15},"Frontend","frontend",{"name":3195,"slug":3196,"type":15},"JavaScript","javascript",{"name":3198,"slug":140,"type":15},"TypeScript",{"name":17,"slug":18,"type":15},"2026-07-13T06:12:01.334051",{"slug":3202,"name":3202,"fn":3203,"description":3204,"org":3205,"tags":3206,"stars":22,"repoUrl":23,"updatedAt":3214},"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},[3207,3208,3209,3210,3213],{"name":3167,"slug":3168,"type":15},{"name":3138,"slug":3139,"type":15},{"name":3192,"slug":3193,"type":15},{"name":3211,"slug":3212,"type":15},"React","react",{"name":17,"slug":18,"type":15},"2026-07-13T06:11:52.764143",{"slug":3216,"name":3216,"fn":3217,"description":3218,"org":3219,"tags":3220,"stars":22,"repoUrl":23,"updatedAt":3229},"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},[3221,3222,3225,3228],{"name":3138,"slug":3139,"type":15},{"name":3223,"slug":3224,"type":15},"Mobile","mobile",{"name":3226,"slug":3227,"type":15},"React Native","react-native",{"name":17,"slug":18,"type":15},"2026-07-13T06:12:11.764689",{"items":3231,"total":1135},[3232,3248,3260,3272,3281,3291,3304,3320,3327,3334,3340,3346],{"slug":3233,"name":3233,"fn":3234,"description":3235,"org":3236,"tags":3237,"stars":3245,"repoUrl":3246,"updatedAt":3247},"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},[3238,3239,3240,3241,3244],{"name":3167,"slug":3168,"type":15},{"name":13,"slug":14,"type":15},{"name":3138,"slug":3139,"type":15},{"name":3242,"slug":3243,"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":3249,"name":3249,"fn":3250,"description":3251,"org":3252,"tags":3253,"stars":3245,"repoUrl":3246,"updatedAt":3259},"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},[3254,3255,3256,3257],{"name":3167,"slug":3168,"type":15},{"name":3179,"slug":3180,"type":15},{"name":17,"slug":18,"type":15},{"name":3258,"slug":3258,"type":15},"x402","2026-07-13T06:11:30.877136",{"slug":3261,"name":3261,"fn":3262,"description":3263,"org":3264,"tags":3265,"stars":560,"repoUrl":3270,"updatedAt":3271},"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},[3266,3267],{"name":3167,"slug":3168,"type":15},{"name":3268,"slug":3269,"type":15},"Search","search","https:\u002F\u002Fgithub.com\u002FMetaMask\u002Focap-kernel","2026-07-13T06:12:37.024095",{"slug":8,"name":8,"fn":3273,"description":3274,"org":3275,"tags":3276,"stars":560,"repoUrl":3270,"updatedAt":3280},"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},[3277,3278,3279],{"name":3167,"slug":3168,"type":15},{"name":3138,"slug":3139,"type":15},{"name":17,"slug":18,"type":15},"2026-07-13T06:12:33.955806",{"slug":3282,"name":3282,"fn":3283,"description":3284,"org":3285,"tags":3286,"stars":560,"repoUrl":3270,"updatedAt":3290},"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},[3287,3288,3289],{"name":3138,"slug":3139,"type":15},{"name":3179,"slug":3180,"type":15},{"name":17,"slug":18,"type":15},"2026-07-13T06:12:35.380244",{"slug":3292,"name":3292,"fn":3293,"description":3294,"org":3295,"tags":3296,"stars":468,"repoUrl":3302,"updatedAt":3303},"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},[3297,3298,3299,3300,3301],{"name":3167,"slug":3168,"type":15},{"name":3138,"slug":3139,"type":15},{"name":20,"slug":21,"type":15},{"name":3157,"slug":3157,"type":15},{"name":17,"slug":18,"type":15},"https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fconnect-monorepo","2026-07-13T06:11:34.445665",{"slug":3305,"name":3305,"fn":3306,"description":3307,"org":3308,"tags":3309,"stars":424,"repoUrl":3318,"updatedAt":3319},"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},[3310,3313,3316,3317],{"name":3311,"slug":3312,"type":15},"Blockchain","blockchain",{"name":3314,"slug":3315,"type":15},"DeFi","defi",{"name":3138,"slug":3139,"type":15},{"name":17,"slug":18,"type":15},"https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fagent-skills","2026-08-01T05:45:07.976522",{"slug":3132,"name":3132,"fn":3133,"description":3134,"org":3321,"tags":3322,"stars":22,"repoUrl":23,"updatedAt":3147},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3323,3324,3325,3326],{"name":3138,"slug":3139,"type":15},{"name":3141,"slug":3142,"type":15},{"name":3144,"slug":3145,"type":15},{"name":17,"slug":18,"type":15},{"slug":3149,"name":3149,"fn":3150,"description":3151,"org":3328,"tags":3329,"stars":22,"repoUrl":23,"updatedAt":3159},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3330,3331,3332,3333],{"name":3138,"slug":3139,"type":15},{"name":3141,"slug":3142,"type":15},{"name":3157,"slug":3157,"type":15},{"name":17,"slug":18,"type":15},{"slug":3161,"name":3161,"fn":3162,"description":3163,"org":3335,"tags":3336,"stars":22,"repoUrl":23,"updatedAt":3171},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3337,3338,3339],{"name":3167,"slug":3168,"type":15},{"name":3138,"slug":3139,"type":15},{"name":17,"slug":18,"type":15},{"slug":3173,"name":3173,"fn":3174,"description":3175,"org":3341,"tags":3342,"stars":22,"repoUrl":23,"updatedAt":3183},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3343,3344,3345],{"name":3179,"slug":3180,"type":15},{"name":20,"slug":21,"type":15},{"name":17,"slug":18,"type":15},{"slug":3185,"name":3185,"fn":3186,"description":3187,"org":3347,"tags":3348,"stars":22,"repoUrl":23,"updatedAt":3200},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3349,3350,3351,3352,3353],{"name":3138,"slug":3139,"type":15},{"name":3192,"slug":3193,"type":15},{"name":3195,"slug":3196,"type":15},{"name":3198,"slug":140,"type":15},{"name":17,"slug":18,"type":15}]