[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-aptos-ts-sdk-view-and-query":3,"mdc-3b4fq0-key":38,"related-org-aptos-ts-sdk-view-and-query":2632,"related-repo-aptos-ts-sdk-view-and-query":2790},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":26,"repoUrl":27,"updatedAt":28,"license":29,"forks":30,"topics":31,"repo":33,"sourceUrl":36,"mdContent":37},"ts-sdk-view-and-query","query on-chain data with Aptos SDK","How to read on-chain data in @aptos-labs\u002Fts-sdk: view(), getBalance(), getAccountInfo(), getAccountResources(), getAccountModules(), getResource(). Triggers on: 'aptos.view', 'getBalance', 'getAccountInfo', 'getAccountResources', 'SDK query', 'view function TypeScript'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"aptos","Aptos Labs","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Faptos.png","aptos-labs",[13,17,20,23],{"name":14,"slug":15,"type":16},"Blockchain","blockchain","tag",{"name":18,"slug":19,"type":16},"TypeScript","typescript",{"name":21,"slug":22,"type":16},"API Development","api-development",{"name":24,"slug":25,"type":16},"SDK","sdk",18,"https:\u002F\u002Fgithub.com\u002Faptos-labs\u002Faptos-agent-skills","2026-07-12T08:07:27.663074","MIT",8,[32,15],"agent-skills",{"repoUrl":27,"stars":26,"forks":30,"topics":34,"description":35},[32,15],"AI skills for building secure, modern Aptos dApps — Move contracts, TypeScript SDK, and frontend integration for Claude Code, Cursor, and Copilot.","https:\u002F\u002Fgithub.com\u002Faptos-labs\u002Faptos-agent-skills\u002Ftree\u002FHEAD\u002Fskills\u002Fsdk\u002Ftypescript\u002Fts-sdk-view-and-query","---\nname: ts-sdk-view-and-query\ndescription:\n  \"How to read on-chain data in @aptos-labs\u002Fts-sdk: view(), getBalance(), getAccountInfo(), getAccountResources(),\n  getAccountModules(), getResource(). Triggers on: 'aptos.view', 'getBalance', 'getAccountInfo', 'getAccountResources',\n  'SDK query', 'view function TypeScript'.\"\nlicense: MIT\nmetadata:\n  author: aptos-labs\n  version: \"1.0\"\n  category: sdk\n  tags: [\"typescript\", \"sdk\", \"view\", \"balance\", \"account\", \"resources\", \"query\"]\n  priority: high\n---\n\n# TypeScript SDK: View and Query\n\n## Purpose\n\nGuide **read-only** access to chain data in `@aptos-labs\u002Fts-sdk`: view functions, balance, account info, resources, and\nmodules.\n\n## ALWAYS\n\n1. **Use `aptos.getBalance({ accountAddress })` for APT balance** – not deprecated `getAccountCoinAmount` \u002F\n   `getAccountAPTAmount`.\n2. **Use `aptos.view()` for Move view functions** – pass `function`, `functionArguments`, and optional `typeArguments`.\n3. **Use `bigint` for u128\u002Fu256 view return values** – cast `result[0]` to `BigInt(...)` when the Move function returns\n   u128\u002Fu256.\n4. **Pass address as string or AccountAddress** – SDK accepts `AccountAddressInput` (string or `AccountAddress`).\n\n## NEVER\n\n1. **Do not use deprecated `getAccountCoinAmount` or `getAccountAPTAmount`** – use `getBalance()`.\n2. **Do not use `number` for u128\u002Fu256** – precision loss; use `bigint`.\n3. **Do not assume view returns are always strings** – types vary (number, bigint, string, boolean, array).\n\n---\n\n## getBalance (APT)\n\n```typescript\nconst balance = await aptos.getBalance({\n  accountAddress: account.accountAddress\n});\n\u002F\u002F balance is bigint in octas (1 APT = 100_000_000 octas)\nconst apt = balance \u002F 100_000_000n;\nconst remainder = balance % 100_000_000n;\nconsole.log(`${apt}.${remainder.toString().padStart(8, \"0\")} APT`);\n```\n\n---\n\n## getAccountInfo\n\n```typescript\nconst accountInfo = await aptos.getAccountInfo({\n  accountAddress: \"0x1\"\n});\n\u002F\u002F accountInfo: { sequence_number, authentication_key, ... }\n```\n\n---\n\n## view() – Move view functions\n\n```typescript\n\u002F\u002F No type arguments\nconst result = await aptos.view({\n  payload: {\n    function: `${MODULE_ADDRESS}::counter::get_count`,\n    functionArguments: [accountAddress]\n  }\n});\nconst count = Number(result[0]);\n\n\u002F\u002F With type arguments (e.g. coin type)\nconst balanceResult = await aptos.view({\n  payload: {\n    function: \"0x1::coin::balance\",\n    typeArguments: [\"0x1::aptos_coin::AptosCoin\"],\n    functionArguments: [accountAddress]\n  }\n});\nconst coinBalance = BigInt(balanceResult[0] as string);\n\n\u002F\u002F Multiple return values\n\u002F\u002F Move: public fun get_listing(addr): (address, u64, bool)\nconst [seller, price, isActive] = await aptos.view({\n  payload: {\n    function: `${MODULE_ADDRESS}::marketplace::get_listing`,\n    functionArguments: [listingAddress]\n  }\n});\nconst listing = {\n  seller: seller as string,\n  price: BigInt(price as string),\n  isActive: isActive as boolean\n};\n```\n\n---\n\n## getAccountResources\n\n```typescript\nconst resources = await aptos.getAccountResources({\n  accountAddress: account.accountAddress\n});\n\u002F\u002F resources: Array\u003CMoveResource>\nconst counterResource = resources.find((r) => r.type === `${MODULE_ADDRESS}::counter::Counter`);\n```\n\n---\n\n## getAccountResource (single type)\n\n```typescript\nconst resource = await aptos.getAccountResource({\n  accountAddress: account.accountAddress,\n  resourceType: `${MODULE_ADDRESS}::counter::Counter`\n});\n\u002F\u002F resource.data has the struct fields\nconst value = (resource?.data as { value: number })?.value;\n```\n\n---\n\n## getAccountModules\n\n```typescript\nconst modules = await aptos.getAccountModules({\n  accountAddress: modulePublisherAddress\n});\n\u002F\u002F modules: MoveModuleBytecode[] (ABI, bytecode)\n```\n\n---\n\n## getModule (single module by name)\n\n```typescript\nconst module = await aptos.getModule({\n  accountAddress: modulePublisherAddress,\n  moduleName: \"counter\"\n});\n```\n\n---\n\n## Pagination (resources \u002F modules)\n\nUse cursor-based options when available:\n\n```typescript\nconst { resources, cursor } = await aptos.getAccountResourcesPage({\n  accountAddress: account.accountAddress,\n  options: { limit: 10, cursor: nextCursor }\n});\n```\n\n---\n\n## Type handling for view results\n\n| Move return type | TypeScript       | Example                                    |\n| ---------------- | ---------------- | ------------------------------------------ |\n| u8..u64          | number or bigint | `Number(result[0])` or `BigInt(result[0])` |\n| u128, u256       | bigint           | `BigInt(result[0] as string)`              |\n| address          | string           | `result[0] as string`                      |\n| bool             | boolean          | `result[0] as boolean`                     |\n| vector\u003CT>        | array            | `result[0] as T[]`                         |\n\n---\n\n## Common mistakes\n\n| Mistake                                   | Correct approach                                              |\n| ----------------------------------------- | ------------------------------------------------------------- |\n| Using getAccountCoinAmount                | Use `aptos.getBalance({ accountAddress })`                    |\n| Using number for u128                     | Use `BigInt(result[0] as string)`                             |\n| Forgetting typeArguments for generic view | Add `typeArguments: [coinType]` when Move function is generic |\n\n---\n\n## References\n\n- SDK: `src\u002Finternal\u002Fview.ts`, `src\u002Fapi\u002Faccount.ts`, balance\u002FgetBalance in internal\n- Pattern: [TYPESCRIPT_SDK.md](..\u002F..\u002F..\u002F..\u002Fpatterns\u002Ffullstack\u002FTYPESCRIPT_SDK.md)\n- Related: [ts-sdk-client](..\u002Fts-sdk-client\u002FSKILL.md), [ts-sdk-types](..\u002Fts-sdk-types\u002FSKILL.md),\n  [use-ts-sdk](..\u002Fuse-ts-sdk\u002FSKILL.md)\n",{"data":39,"body":49},{"name":4,"description":6,"license":29,"metadata":40},{"author":11,"version":41,"category":25,"tags":42,"priority":48},"1.0",[19,25,43,44,45,46,47],"view","balance","account","resources","query","high",{"type":50,"children":51},"root",[52,61,68,91,97,235,241,307,311,317,648,651,657,752,755,761,1504,1507,1513,1707,1710,1716,1924,1927,1933,2019,2022,2028,2136,2139,2145,2150,2309,2312,2318,2470,2473,2479,2556,2559,2565,2626],{"type":53,"tag":54,"props":55,"children":57},"element","h1",{"id":56},"typescript-sdk-view-and-query",[58],{"type":59,"value":60},"text","TypeScript SDK: View and Query",{"type":53,"tag":62,"props":63,"children":65},"h2",{"id":64},"purpose",[66],{"type":59,"value":67},"Purpose",{"type":53,"tag":69,"props":70,"children":71},"p",{},[72,74,80,82,89],{"type":59,"value":73},"Guide ",{"type":53,"tag":75,"props":76,"children":77},"strong",{},[78],{"type":59,"value":79},"read-only",{"type":59,"value":81}," access to chain data in ",{"type":53,"tag":83,"props":84,"children":86},"code",{"className":85},[],[87],{"type":59,"value":88},"@aptos-labs\u002Fts-sdk",{"type":59,"value":90},": view functions, balance, account info, resources, and\nmodules.",{"type":53,"tag":62,"props":92,"children":94},{"id":93},"always",[95],{"type":59,"value":96},"ALWAYS",{"type":53,"tag":98,"props":99,"children":100},"ol",{},[101,136,176,209],{"type":53,"tag":102,"props":103,"children":104},"li",{},[105,118,120,126,128,134],{"type":53,"tag":75,"props":106,"children":107},{},[108,110,116],{"type":59,"value":109},"Use ",{"type":53,"tag":83,"props":111,"children":113},{"className":112},[],[114],{"type":59,"value":115},"aptos.getBalance({ accountAddress })",{"type":59,"value":117}," for APT balance",{"type":59,"value":119}," – not deprecated ",{"type":53,"tag":83,"props":121,"children":123},{"className":122},[],[124],{"type":59,"value":125},"getAccountCoinAmount",{"type":59,"value":127}," \u002F\n",{"type":53,"tag":83,"props":129,"children":131},{"className":130},[],[132],{"type":59,"value":133},"getAccountAPTAmount",{"type":59,"value":135},".",{"type":53,"tag":102,"props":137,"children":138},{},[139,151,153,159,161,167,169,175],{"type":53,"tag":75,"props":140,"children":141},{},[142,143,149],{"type":59,"value":109},{"type":53,"tag":83,"props":144,"children":146},{"className":145},[],[147],{"type":59,"value":148},"aptos.view()",{"type":59,"value":150}," for Move view functions",{"type":59,"value":152}," – pass ",{"type":53,"tag":83,"props":154,"children":156},{"className":155},[],[157],{"type":59,"value":158},"function",{"type":59,"value":160},", ",{"type":53,"tag":83,"props":162,"children":164},{"className":163},[],[165],{"type":59,"value":166},"functionArguments",{"type":59,"value":168},", and optional ",{"type":53,"tag":83,"props":170,"children":172},{"className":171},[],[173],{"type":59,"value":174},"typeArguments",{"type":59,"value":135},{"type":53,"tag":102,"props":177,"children":178},{},[179,191,193,199,201,207],{"type":53,"tag":75,"props":180,"children":181},{},[182,183,189],{"type":59,"value":109},{"type":53,"tag":83,"props":184,"children":186},{"className":185},[],[187],{"type":59,"value":188},"bigint",{"type":59,"value":190}," for u128\u002Fu256 view return values",{"type":59,"value":192}," – cast ",{"type":53,"tag":83,"props":194,"children":196},{"className":195},[],[197],{"type":59,"value":198},"result[0]",{"type":59,"value":200}," to ",{"type":53,"tag":83,"props":202,"children":204},{"className":203},[],[205],{"type":59,"value":206},"BigInt(...)",{"type":59,"value":208}," when the Move function returns\nu128\u002Fu256.",{"type":53,"tag":102,"props":210,"children":211},{},[212,217,219,225,227,233],{"type":53,"tag":75,"props":213,"children":214},{},[215],{"type":59,"value":216},"Pass address as string or AccountAddress",{"type":59,"value":218}," – SDK accepts ",{"type":53,"tag":83,"props":220,"children":222},{"className":221},[],[223],{"type":59,"value":224},"AccountAddressInput",{"type":59,"value":226}," (string or ",{"type":53,"tag":83,"props":228,"children":230},{"className":229},[],[231],{"type":59,"value":232},"AccountAddress",{"type":59,"value":234},").",{"type":53,"tag":62,"props":236,"children":238},{"id":237},"never",[239],{"type":59,"value":240},"NEVER",{"type":53,"tag":98,"props":242,"children":243},{},[244,273,297],{"type":53,"tag":102,"props":245,"children":246},{},[247,264,266,272],{"type":53,"tag":75,"props":248,"children":249},{},[250,252,257,259],{"type":59,"value":251},"Do not use deprecated ",{"type":53,"tag":83,"props":253,"children":255},{"className":254},[],[256],{"type":59,"value":125},{"type":59,"value":258}," or ",{"type":53,"tag":83,"props":260,"children":262},{"className":261},[],[263],{"type":59,"value":133},{"type":59,"value":265}," – use ",{"type":53,"tag":83,"props":267,"children":269},{"className":268},[],[270],{"type":59,"value":271},"getBalance()",{"type":59,"value":135},{"type":53,"tag":102,"props":274,"children":275},{},[276,289,291,296],{"type":53,"tag":75,"props":277,"children":278},{},[279,281,287],{"type":59,"value":280},"Do not use ",{"type":53,"tag":83,"props":282,"children":284},{"className":283},[],[285],{"type":59,"value":286},"number",{"type":59,"value":288}," for u128\u002Fu256",{"type":59,"value":290}," – precision loss; use ",{"type":53,"tag":83,"props":292,"children":294},{"className":293},[],[295],{"type":59,"value":188},{"type":59,"value":135},{"type":53,"tag":102,"props":298,"children":299},{},[300,305],{"type":53,"tag":75,"props":301,"children":302},{},[303],{"type":59,"value":304},"Do not assume view returns are always strings",{"type":59,"value":306}," – types vary (number, bigint, string, boolean, array).",{"type":53,"tag":308,"props":309,"children":310},"hr",{},[],{"type":53,"tag":62,"props":312,"children":314},{"id":313},"getbalance-apt",[315],{"type":59,"value":316},"getBalance (APT)",{"type":53,"tag":318,"props":319,"children":323},"pre",{"className":320,"code":321,"language":19,"meta":322,"style":322},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","const balance = await aptos.getBalance({\n  accountAddress: account.accountAddress\n});\n\u002F\u002F balance is bigint in octas (1 APT = 100_000_000 octas)\nconst apt = balance \u002F 100_000_000n;\nconst remainder = balance % 100_000_000n;\nconsole.log(`${apt}.${remainder.toString().padStart(8, \"0\")} APT`);\n","",[324],{"type":53,"tag":83,"props":325,"children":326},{"__ignoreMap":322},[327,382,411,430,440,481,519],{"type":53,"tag":328,"props":329,"children":332},"span",{"class":330,"line":331},"line",1,[333,339,345,351,357,362,366,372,377],{"type":53,"tag":328,"props":334,"children":336},{"style":335},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[337],{"type":59,"value":338},"const",{"type":53,"tag":328,"props":340,"children":342},{"style":341},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[343],{"type":59,"value":344}," balance ",{"type":53,"tag":328,"props":346,"children":348},{"style":347},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[349],{"type":59,"value":350},"=",{"type":53,"tag":328,"props":352,"children":354},{"style":353},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[355],{"type":59,"value":356}," await",{"type":53,"tag":328,"props":358,"children":359},{"style":341},[360],{"type":59,"value":361}," aptos",{"type":53,"tag":328,"props":363,"children":364},{"style":347},[365],{"type":59,"value":135},{"type":53,"tag":328,"props":367,"children":369},{"style":368},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[370],{"type":59,"value":371},"getBalance",{"type":53,"tag":328,"props":373,"children":374},{"style":341},[375],{"type":59,"value":376},"(",{"type":53,"tag":328,"props":378,"children":379},{"style":347},[380],{"type":59,"value":381},"{\n",{"type":53,"tag":328,"props":383,"children":385},{"class":330,"line":384},2,[386,392,397,402,406],{"type":53,"tag":328,"props":387,"children":389},{"style":388},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[390],{"type":59,"value":391},"  accountAddress",{"type":53,"tag":328,"props":393,"children":394},{"style":347},[395],{"type":59,"value":396},":",{"type":53,"tag":328,"props":398,"children":399},{"style":341},[400],{"type":59,"value":401}," account",{"type":53,"tag":328,"props":403,"children":404},{"style":347},[405],{"type":59,"value":135},{"type":53,"tag":328,"props":407,"children":408},{"style":341},[409],{"type":59,"value":410},"accountAddress\n",{"type":53,"tag":328,"props":412,"children":414},{"class":330,"line":413},3,[415,420,425],{"type":53,"tag":328,"props":416,"children":417},{"style":347},[418],{"type":59,"value":419},"}",{"type":53,"tag":328,"props":421,"children":422},{"style":341},[423],{"type":59,"value":424},")",{"type":53,"tag":328,"props":426,"children":427},{"style":347},[428],{"type":59,"value":429},";\n",{"type":53,"tag":328,"props":431,"children":433},{"class":330,"line":432},4,[434],{"type":53,"tag":328,"props":435,"children":437},{"style":436},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[438],{"type":59,"value":439},"\u002F\u002F balance is bigint in octas (1 APT = 100_000_000 octas)\n",{"type":53,"tag":328,"props":441,"children":443},{"class":330,"line":442},5,[444,448,453,457,461,466,472,477],{"type":53,"tag":328,"props":445,"children":446},{"style":335},[447],{"type":59,"value":338},{"type":53,"tag":328,"props":449,"children":450},{"style":341},[451],{"type":59,"value":452}," apt ",{"type":53,"tag":328,"props":454,"children":455},{"style":347},[456],{"type":59,"value":350},{"type":53,"tag":328,"props":458,"children":459},{"style":341},[460],{"type":59,"value":344},{"type":53,"tag":328,"props":462,"children":463},{"style":347},[464],{"type":59,"value":465},"\u002F",{"type":53,"tag":328,"props":467,"children":469},{"style":468},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[470],{"type":59,"value":471}," 100_000_000",{"type":53,"tag":328,"props":473,"children":474},{"style":335},[475],{"type":59,"value":476},"n",{"type":53,"tag":328,"props":478,"children":479},{"style":347},[480],{"type":59,"value":429},{"type":53,"tag":328,"props":482,"children":484},{"class":330,"line":483},6,[485,489,494,498,502,507,511,515],{"type":53,"tag":328,"props":486,"children":487},{"style":335},[488],{"type":59,"value":338},{"type":53,"tag":328,"props":490,"children":491},{"style":341},[492],{"type":59,"value":493}," remainder ",{"type":53,"tag":328,"props":495,"children":496},{"style":347},[497],{"type":59,"value":350},{"type":53,"tag":328,"props":499,"children":500},{"style":341},[501],{"type":59,"value":344},{"type":53,"tag":328,"props":503,"children":504},{"style":347},[505],{"type":59,"value":506},"%",{"type":53,"tag":328,"props":508,"children":509},{"style":468},[510],{"type":59,"value":471},{"type":53,"tag":328,"props":512,"children":513},{"style":335},[514],{"type":59,"value":476},{"type":53,"tag":328,"props":516,"children":517},{"style":347},[518],{"type":59,"value":429},{"type":53,"tag":328,"props":520,"children":522},{"class":330,"line":521},7,[523,528,532,537,541,546,551,555,560,565,570,574,579,584,588,593,597,602,607,612,617,622,626,630,635,640,644],{"type":53,"tag":328,"props":524,"children":525},{"style":341},[526],{"type":59,"value":527},"console",{"type":53,"tag":328,"props":529,"children":530},{"style":347},[531],{"type":59,"value":135},{"type":53,"tag":328,"props":533,"children":534},{"style":368},[535],{"type":59,"value":536},"log",{"type":53,"tag":328,"props":538,"children":539},{"style":341},[540],{"type":59,"value":376},{"type":53,"tag":328,"props":542,"children":543},{"style":347},[544],{"type":59,"value":545},"`${",{"type":53,"tag":328,"props":547,"children":548},{"style":341},[549],{"type":59,"value":550},"apt",{"type":53,"tag":328,"props":552,"children":553},{"style":347},[554],{"type":59,"value":419},{"type":53,"tag":328,"props":556,"children":558},{"style":557},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[559],{"type":59,"value":135},{"type":53,"tag":328,"props":561,"children":562},{"style":347},[563],{"type":59,"value":564},"${",{"type":53,"tag":328,"props":566,"children":567},{"style":341},[568],{"type":59,"value":569},"remainder",{"type":53,"tag":328,"props":571,"children":572},{"style":347},[573],{"type":59,"value":135},{"type":53,"tag":328,"props":575,"children":576},{"style":368},[577],{"type":59,"value":578},"toString",{"type":53,"tag":328,"props":580,"children":581},{"style":341},[582],{"type":59,"value":583},"()",{"type":53,"tag":328,"props":585,"children":586},{"style":347},[587],{"type":59,"value":135},{"type":53,"tag":328,"props":589,"children":590},{"style":368},[591],{"type":59,"value":592},"padStart",{"type":53,"tag":328,"props":594,"children":595},{"style":341},[596],{"type":59,"value":376},{"type":53,"tag":328,"props":598,"children":599},{"style":468},[600],{"type":59,"value":601},"8",{"type":53,"tag":328,"props":603,"children":604},{"style":347},[605],{"type":59,"value":606},",",{"type":53,"tag":328,"props":608,"children":609},{"style":347},[610],{"type":59,"value":611}," \"",{"type":53,"tag":328,"props":613,"children":614},{"style":557},[615],{"type":59,"value":616},"0",{"type":53,"tag":328,"props":618,"children":619},{"style":347},[620],{"type":59,"value":621},"\"",{"type":53,"tag":328,"props":623,"children":624},{"style":341},[625],{"type":59,"value":424},{"type":53,"tag":328,"props":627,"children":628},{"style":347},[629],{"type":59,"value":419},{"type":53,"tag":328,"props":631,"children":632},{"style":557},[633],{"type":59,"value":634}," APT",{"type":53,"tag":328,"props":636,"children":637},{"style":347},[638],{"type":59,"value":639},"`",{"type":53,"tag":328,"props":641,"children":642},{"style":341},[643],{"type":59,"value":424},{"type":53,"tag":328,"props":645,"children":646},{"style":347},[647],{"type":59,"value":429},{"type":53,"tag":308,"props":649,"children":650},{},[],{"type":53,"tag":62,"props":652,"children":654},{"id":653},"getaccountinfo",[655],{"type":59,"value":656},"getAccountInfo",{"type":53,"tag":318,"props":658,"children":660},{"className":320,"code":659,"language":19,"meta":322,"style":322},"const accountInfo = await aptos.getAccountInfo({\n  accountAddress: \"0x1\"\n});\n\u002F\u002F accountInfo: { sequence_number, authentication_key, ... }\n",[661],{"type":53,"tag":83,"props":662,"children":663},{"__ignoreMap":322},[664,704,729,744],{"type":53,"tag":328,"props":665,"children":666},{"class":330,"line":331},[667,671,676,680,684,688,692,696,700],{"type":53,"tag":328,"props":668,"children":669},{"style":335},[670],{"type":59,"value":338},{"type":53,"tag":328,"props":672,"children":673},{"style":341},[674],{"type":59,"value":675}," accountInfo ",{"type":53,"tag":328,"props":677,"children":678},{"style":347},[679],{"type":59,"value":350},{"type":53,"tag":328,"props":681,"children":682},{"style":353},[683],{"type":59,"value":356},{"type":53,"tag":328,"props":685,"children":686},{"style":341},[687],{"type":59,"value":361},{"type":53,"tag":328,"props":689,"children":690},{"style":347},[691],{"type":59,"value":135},{"type":53,"tag":328,"props":693,"children":694},{"style":368},[695],{"type":59,"value":656},{"type":53,"tag":328,"props":697,"children":698},{"style":341},[699],{"type":59,"value":376},{"type":53,"tag":328,"props":701,"children":702},{"style":347},[703],{"type":59,"value":381},{"type":53,"tag":328,"props":705,"children":706},{"class":330,"line":384},[707,711,715,719,724],{"type":53,"tag":328,"props":708,"children":709},{"style":388},[710],{"type":59,"value":391},{"type":53,"tag":328,"props":712,"children":713},{"style":347},[714],{"type":59,"value":396},{"type":53,"tag":328,"props":716,"children":717},{"style":347},[718],{"type":59,"value":611},{"type":53,"tag":328,"props":720,"children":721},{"style":557},[722],{"type":59,"value":723},"0x1",{"type":53,"tag":328,"props":725,"children":726},{"style":347},[727],{"type":59,"value":728},"\"\n",{"type":53,"tag":328,"props":730,"children":731},{"class":330,"line":413},[732,736,740],{"type":53,"tag":328,"props":733,"children":734},{"style":347},[735],{"type":59,"value":419},{"type":53,"tag":328,"props":737,"children":738},{"style":341},[739],{"type":59,"value":424},{"type":53,"tag":328,"props":741,"children":742},{"style":347},[743],{"type":59,"value":429},{"type":53,"tag":328,"props":745,"children":746},{"class":330,"line":432},[747],{"type":53,"tag":328,"props":748,"children":749},{"style":436},[750],{"type":59,"value":751},"\u002F\u002F accountInfo: { sequence_number, authentication_key, ... }\n",{"type":53,"tag":308,"props":753,"children":754},{},[],{"type":53,"tag":62,"props":756,"children":758},{"id":757},"view-move-view-functions",[759],{"type":59,"value":760},"view() – Move view functions",{"type":53,"tag":318,"props":762,"children":764},{"className":320,"code":763,"language":19,"meta":322,"style":322},"\u002F\u002F No type arguments\nconst result = await aptos.view({\n  payload: {\n    function: `${MODULE_ADDRESS}::counter::get_count`,\n    functionArguments: [accountAddress]\n  }\n});\nconst count = Number(result[0]);\n\n\u002F\u002F With type arguments (e.g. coin type)\nconst balanceResult = await aptos.view({\n  payload: {\n    function: \"0x1::coin::balance\",\n    typeArguments: [\"0x1::aptos_coin::AptosCoin\"],\n    functionArguments: [accountAddress]\n  }\n});\nconst coinBalance = BigInt(balanceResult[0] as string);\n\n\u002F\u002F Multiple return values\n\u002F\u002F Move: public fun get_listing(addr): (address, u64, bool)\nconst [seller, price, isActive] = await aptos.view({\n  payload: {\n    function: `${MODULE_ADDRESS}::marketplace::get_listing`,\n    functionArguments: [listingAddress]\n  }\n});\nconst listing = {\n  seller: seller as string,\n  price: BigInt(price as string),\n  isActive: isActive as boolean\n};\n",[765],{"type":53,"tag":83,"props":766,"children":767},{"__ignoreMap":322},[768,776,816,833,873,890,898,913,952,962,971,1012,1028,1057,1097,1113,1121,1137,1191,1199,1208,1217,1285,1301,1338,1355,1363,1379,1400,1430,1468,1495],{"type":53,"tag":328,"props":769,"children":770},{"class":330,"line":331},[771],{"type":53,"tag":328,"props":772,"children":773},{"style":436},[774],{"type":59,"value":775},"\u002F\u002F No type arguments\n",{"type":53,"tag":328,"props":777,"children":778},{"class":330,"line":384},[779,783,788,792,796,800,804,808,812],{"type":53,"tag":328,"props":780,"children":781},{"style":335},[782],{"type":59,"value":338},{"type":53,"tag":328,"props":784,"children":785},{"style":341},[786],{"type":59,"value":787}," result ",{"type":53,"tag":328,"props":789,"children":790},{"style":347},[791],{"type":59,"value":350},{"type":53,"tag":328,"props":793,"children":794},{"style":353},[795],{"type":59,"value":356},{"type":53,"tag":328,"props":797,"children":798},{"style":341},[799],{"type":59,"value":361},{"type":53,"tag":328,"props":801,"children":802},{"style":347},[803],{"type":59,"value":135},{"type":53,"tag":328,"props":805,"children":806},{"style":368},[807],{"type":59,"value":43},{"type":53,"tag":328,"props":809,"children":810},{"style":341},[811],{"type":59,"value":376},{"type":53,"tag":328,"props":813,"children":814},{"style":347},[815],{"type":59,"value":381},{"type":53,"tag":328,"props":817,"children":818},{"class":330,"line":413},[819,824,828],{"type":53,"tag":328,"props":820,"children":821},{"style":388},[822],{"type":59,"value":823},"  payload",{"type":53,"tag":328,"props":825,"children":826},{"style":347},[827],{"type":59,"value":396},{"type":53,"tag":328,"props":829,"children":830},{"style":347},[831],{"type":59,"value":832}," {\n",{"type":53,"tag":328,"props":834,"children":835},{"class":330,"line":432},[836,841,845,850,855,859,864,868],{"type":53,"tag":328,"props":837,"children":838},{"style":388},[839],{"type":59,"value":840},"    function",{"type":53,"tag":328,"props":842,"children":843},{"style":347},[844],{"type":59,"value":396},{"type":53,"tag":328,"props":846,"children":847},{"style":347},[848],{"type":59,"value":849}," `${",{"type":53,"tag":328,"props":851,"children":852},{"style":341},[853],{"type":59,"value":854},"MODULE_ADDRESS",{"type":53,"tag":328,"props":856,"children":857},{"style":347},[858],{"type":59,"value":419},{"type":53,"tag":328,"props":860,"children":861},{"style":557},[862],{"type":59,"value":863},"::counter::get_count",{"type":53,"tag":328,"props":865,"children":866},{"style":347},[867],{"type":59,"value":639},{"type":53,"tag":328,"props":869,"children":870},{"style":347},[871],{"type":59,"value":872},",\n",{"type":53,"tag":328,"props":874,"children":875},{"class":330,"line":442},[876,881,885],{"type":53,"tag":328,"props":877,"children":878},{"style":388},[879],{"type":59,"value":880},"    functionArguments",{"type":53,"tag":328,"props":882,"children":883},{"style":347},[884],{"type":59,"value":396},{"type":53,"tag":328,"props":886,"children":887},{"style":341},[888],{"type":59,"value":889}," [accountAddress]\n",{"type":53,"tag":328,"props":891,"children":892},{"class":330,"line":483},[893],{"type":53,"tag":328,"props":894,"children":895},{"style":347},[896],{"type":59,"value":897},"  }\n",{"type":53,"tag":328,"props":899,"children":900},{"class":330,"line":521},[901,905,909],{"type":53,"tag":328,"props":902,"children":903},{"style":347},[904],{"type":59,"value":419},{"type":53,"tag":328,"props":906,"children":907},{"style":341},[908],{"type":59,"value":424},{"type":53,"tag":328,"props":910,"children":911},{"style":347},[912],{"type":59,"value":429},{"type":53,"tag":328,"props":914,"children":915},{"class":330,"line":30},[916,920,925,929,934,939,943,948],{"type":53,"tag":328,"props":917,"children":918},{"style":335},[919],{"type":59,"value":338},{"type":53,"tag":328,"props":921,"children":922},{"style":341},[923],{"type":59,"value":924}," count ",{"type":53,"tag":328,"props":926,"children":927},{"style":347},[928],{"type":59,"value":350},{"type":53,"tag":328,"props":930,"children":931},{"style":368},[932],{"type":59,"value":933}," Number",{"type":53,"tag":328,"props":935,"children":936},{"style":341},[937],{"type":59,"value":938},"(result[",{"type":53,"tag":328,"props":940,"children":941},{"style":468},[942],{"type":59,"value":616},{"type":53,"tag":328,"props":944,"children":945},{"style":341},[946],{"type":59,"value":947},"])",{"type":53,"tag":328,"props":949,"children":950},{"style":347},[951],{"type":59,"value":429},{"type":53,"tag":328,"props":953,"children":955},{"class":330,"line":954},9,[956],{"type":53,"tag":328,"props":957,"children":959},{"emptyLinePlaceholder":958},true,[960],{"type":59,"value":961},"\n",{"type":53,"tag":328,"props":963,"children":965},{"class":330,"line":964},10,[966],{"type":53,"tag":328,"props":967,"children":968},{"style":436},[969],{"type":59,"value":970},"\u002F\u002F With type arguments (e.g. coin type)\n",{"type":53,"tag":328,"props":972,"children":974},{"class":330,"line":973},11,[975,979,984,988,992,996,1000,1004,1008],{"type":53,"tag":328,"props":976,"children":977},{"style":335},[978],{"type":59,"value":338},{"type":53,"tag":328,"props":980,"children":981},{"style":341},[982],{"type":59,"value":983}," balanceResult ",{"type":53,"tag":328,"props":985,"children":986},{"style":347},[987],{"type":59,"value":350},{"type":53,"tag":328,"props":989,"children":990},{"style":353},[991],{"type":59,"value":356},{"type":53,"tag":328,"props":993,"children":994},{"style":341},[995],{"type":59,"value":361},{"type":53,"tag":328,"props":997,"children":998},{"style":347},[999],{"type":59,"value":135},{"type":53,"tag":328,"props":1001,"children":1002},{"style":368},[1003],{"type":59,"value":43},{"type":53,"tag":328,"props":1005,"children":1006},{"style":341},[1007],{"type":59,"value":376},{"type":53,"tag":328,"props":1009,"children":1010},{"style":347},[1011],{"type":59,"value":381},{"type":53,"tag":328,"props":1013,"children":1015},{"class":330,"line":1014},12,[1016,1020,1024],{"type":53,"tag":328,"props":1017,"children":1018},{"style":388},[1019],{"type":59,"value":823},{"type":53,"tag":328,"props":1021,"children":1022},{"style":347},[1023],{"type":59,"value":396},{"type":53,"tag":328,"props":1025,"children":1026},{"style":347},[1027],{"type":59,"value":832},{"type":53,"tag":328,"props":1029,"children":1031},{"class":330,"line":1030},13,[1032,1036,1040,1044,1049,1053],{"type":53,"tag":328,"props":1033,"children":1034},{"style":388},[1035],{"type":59,"value":840},{"type":53,"tag":328,"props":1037,"children":1038},{"style":347},[1039],{"type":59,"value":396},{"type":53,"tag":328,"props":1041,"children":1042},{"style":347},[1043],{"type":59,"value":611},{"type":53,"tag":328,"props":1045,"children":1046},{"style":557},[1047],{"type":59,"value":1048},"0x1::coin::balance",{"type":53,"tag":328,"props":1050,"children":1051},{"style":347},[1052],{"type":59,"value":621},{"type":53,"tag":328,"props":1054,"children":1055},{"style":347},[1056],{"type":59,"value":872},{"type":53,"tag":328,"props":1058,"children":1060},{"class":330,"line":1059},14,[1061,1066,1070,1075,1079,1084,1088,1093],{"type":53,"tag":328,"props":1062,"children":1063},{"style":388},[1064],{"type":59,"value":1065},"    typeArguments",{"type":53,"tag":328,"props":1067,"children":1068},{"style":347},[1069],{"type":59,"value":396},{"type":53,"tag":328,"props":1071,"children":1072},{"style":341},[1073],{"type":59,"value":1074}," [",{"type":53,"tag":328,"props":1076,"children":1077},{"style":347},[1078],{"type":59,"value":621},{"type":53,"tag":328,"props":1080,"children":1081},{"style":557},[1082],{"type":59,"value":1083},"0x1::aptos_coin::AptosCoin",{"type":53,"tag":328,"props":1085,"children":1086},{"style":347},[1087],{"type":59,"value":621},{"type":53,"tag":328,"props":1089,"children":1090},{"style":341},[1091],{"type":59,"value":1092},"]",{"type":53,"tag":328,"props":1094,"children":1095},{"style":347},[1096],{"type":59,"value":872},{"type":53,"tag":328,"props":1098,"children":1100},{"class":330,"line":1099},15,[1101,1105,1109],{"type":53,"tag":328,"props":1102,"children":1103},{"style":388},[1104],{"type":59,"value":880},{"type":53,"tag":328,"props":1106,"children":1107},{"style":347},[1108],{"type":59,"value":396},{"type":53,"tag":328,"props":1110,"children":1111},{"style":341},[1112],{"type":59,"value":889},{"type":53,"tag":328,"props":1114,"children":1116},{"class":330,"line":1115},16,[1117],{"type":53,"tag":328,"props":1118,"children":1119},{"style":347},[1120],{"type":59,"value":897},{"type":53,"tag":328,"props":1122,"children":1124},{"class":330,"line":1123},17,[1125,1129,1133],{"type":53,"tag":328,"props":1126,"children":1127},{"style":347},[1128],{"type":59,"value":419},{"type":53,"tag":328,"props":1130,"children":1131},{"style":341},[1132],{"type":59,"value":424},{"type":53,"tag":328,"props":1134,"children":1135},{"style":347},[1136],{"type":59,"value":429},{"type":53,"tag":328,"props":1138,"children":1139},{"class":330,"line":26},[1140,1144,1149,1153,1158,1163,1167,1172,1177,1183,1187],{"type":53,"tag":328,"props":1141,"children":1142},{"style":335},[1143],{"type":59,"value":338},{"type":53,"tag":328,"props":1145,"children":1146},{"style":341},[1147],{"type":59,"value":1148}," coinBalance ",{"type":53,"tag":328,"props":1150,"children":1151},{"style":347},[1152],{"type":59,"value":350},{"type":53,"tag":328,"props":1154,"children":1155},{"style":368},[1156],{"type":59,"value":1157}," BigInt",{"type":53,"tag":328,"props":1159,"children":1160},{"style":341},[1161],{"type":59,"value":1162},"(balanceResult[",{"type":53,"tag":328,"props":1164,"children":1165},{"style":468},[1166],{"type":59,"value":616},{"type":53,"tag":328,"props":1168,"children":1169},{"style":341},[1170],{"type":59,"value":1171},"] ",{"type":53,"tag":328,"props":1173,"children":1174},{"style":353},[1175],{"type":59,"value":1176},"as",{"type":53,"tag":328,"props":1178,"children":1180},{"style":1179},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[1181],{"type":59,"value":1182}," string",{"type":53,"tag":328,"props":1184,"children":1185},{"style":341},[1186],{"type":59,"value":424},{"type":53,"tag":328,"props":1188,"children":1189},{"style":347},[1190],{"type":59,"value":429},{"type":53,"tag":328,"props":1192,"children":1194},{"class":330,"line":1193},19,[1195],{"type":53,"tag":328,"props":1196,"children":1197},{"emptyLinePlaceholder":958},[1198],{"type":59,"value":961},{"type":53,"tag":328,"props":1200,"children":1202},{"class":330,"line":1201},20,[1203],{"type":53,"tag":328,"props":1204,"children":1205},{"style":436},[1206],{"type":59,"value":1207},"\u002F\u002F Multiple return values\n",{"type":53,"tag":328,"props":1209,"children":1211},{"class":330,"line":1210},21,[1212],{"type":53,"tag":328,"props":1213,"children":1214},{"style":436},[1215],{"type":59,"value":1216},"\u002F\u002F Move: public fun get_listing(addr): (address, u64, bool)\n",{"type":53,"tag":328,"props":1218,"children":1220},{"class":330,"line":1219},22,[1221,1225,1229,1234,1238,1243,1247,1252,1256,1261,1265,1269,1273,1277,1281],{"type":53,"tag":328,"props":1222,"children":1223},{"style":335},[1224],{"type":59,"value":338},{"type":53,"tag":328,"props":1226,"children":1227},{"style":347},[1228],{"type":59,"value":1074},{"type":53,"tag":328,"props":1230,"children":1231},{"style":341},[1232],{"type":59,"value":1233},"seller",{"type":53,"tag":328,"props":1235,"children":1236},{"style":347},[1237],{"type":59,"value":606},{"type":53,"tag":328,"props":1239,"children":1240},{"style":341},[1241],{"type":59,"value":1242}," price",{"type":53,"tag":328,"props":1244,"children":1245},{"style":347},[1246],{"type":59,"value":606},{"type":53,"tag":328,"props":1248,"children":1249},{"style":341},[1250],{"type":59,"value":1251}," isActive",{"type":53,"tag":328,"props":1253,"children":1254},{"style":347},[1255],{"type":59,"value":1092},{"type":53,"tag":328,"props":1257,"children":1258},{"style":347},[1259],{"type":59,"value":1260}," =",{"type":53,"tag":328,"props":1262,"children":1263},{"style":353},[1264],{"type":59,"value":356},{"type":53,"tag":328,"props":1266,"children":1267},{"style":341},[1268],{"type":59,"value":361},{"type":53,"tag":328,"props":1270,"children":1271},{"style":347},[1272],{"type":59,"value":135},{"type":53,"tag":328,"props":1274,"children":1275},{"style":368},[1276],{"type":59,"value":43},{"type":53,"tag":328,"props":1278,"children":1279},{"style":341},[1280],{"type":59,"value":376},{"type":53,"tag":328,"props":1282,"children":1283},{"style":347},[1284],{"type":59,"value":381},{"type":53,"tag":328,"props":1286,"children":1288},{"class":330,"line":1287},23,[1289,1293,1297],{"type":53,"tag":328,"props":1290,"children":1291},{"style":388},[1292],{"type":59,"value":823},{"type":53,"tag":328,"props":1294,"children":1295},{"style":347},[1296],{"type":59,"value":396},{"type":53,"tag":328,"props":1298,"children":1299},{"style":347},[1300],{"type":59,"value":832},{"type":53,"tag":328,"props":1302,"children":1304},{"class":330,"line":1303},24,[1305,1309,1313,1317,1321,1325,1330,1334],{"type":53,"tag":328,"props":1306,"children":1307},{"style":388},[1308],{"type":59,"value":840},{"type":53,"tag":328,"props":1310,"children":1311},{"style":347},[1312],{"type":59,"value":396},{"type":53,"tag":328,"props":1314,"children":1315},{"style":347},[1316],{"type":59,"value":849},{"type":53,"tag":328,"props":1318,"children":1319},{"style":341},[1320],{"type":59,"value":854},{"type":53,"tag":328,"props":1322,"children":1323},{"style":347},[1324],{"type":59,"value":419},{"type":53,"tag":328,"props":1326,"children":1327},{"style":557},[1328],{"type":59,"value":1329},"::marketplace::get_listing",{"type":53,"tag":328,"props":1331,"children":1332},{"style":347},[1333],{"type":59,"value":639},{"type":53,"tag":328,"props":1335,"children":1336},{"style":347},[1337],{"type":59,"value":872},{"type":53,"tag":328,"props":1339,"children":1341},{"class":330,"line":1340},25,[1342,1346,1350],{"type":53,"tag":328,"props":1343,"children":1344},{"style":388},[1345],{"type":59,"value":880},{"type":53,"tag":328,"props":1347,"children":1348},{"style":347},[1349],{"type":59,"value":396},{"type":53,"tag":328,"props":1351,"children":1352},{"style":341},[1353],{"type":59,"value":1354}," [listingAddress]\n",{"type":53,"tag":328,"props":1356,"children":1358},{"class":330,"line":1357},26,[1359],{"type":53,"tag":328,"props":1360,"children":1361},{"style":347},[1362],{"type":59,"value":897},{"type":53,"tag":328,"props":1364,"children":1366},{"class":330,"line":1365},27,[1367,1371,1375],{"type":53,"tag":328,"props":1368,"children":1369},{"style":347},[1370],{"type":59,"value":419},{"type":53,"tag":328,"props":1372,"children":1373},{"style":341},[1374],{"type":59,"value":424},{"type":53,"tag":328,"props":1376,"children":1377},{"style":347},[1378],{"type":59,"value":429},{"type":53,"tag":328,"props":1380,"children":1382},{"class":330,"line":1381},28,[1383,1387,1392,1396],{"type":53,"tag":328,"props":1384,"children":1385},{"style":335},[1386],{"type":59,"value":338},{"type":53,"tag":328,"props":1388,"children":1389},{"style":341},[1390],{"type":59,"value":1391}," listing ",{"type":53,"tag":328,"props":1393,"children":1394},{"style":347},[1395],{"type":59,"value":350},{"type":53,"tag":328,"props":1397,"children":1398},{"style":347},[1399],{"type":59,"value":832},{"type":53,"tag":328,"props":1401,"children":1403},{"class":330,"line":1402},29,[1404,1409,1413,1418,1422,1426],{"type":53,"tag":328,"props":1405,"children":1406},{"style":388},[1407],{"type":59,"value":1408},"  seller",{"type":53,"tag":328,"props":1410,"children":1411},{"style":347},[1412],{"type":59,"value":396},{"type":53,"tag":328,"props":1414,"children":1415},{"style":341},[1416],{"type":59,"value":1417}," seller ",{"type":53,"tag":328,"props":1419,"children":1420},{"style":353},[1421],{"type":59,"value":1176},{"type":53,"tag":328,"props":1423,"children":1424},{"style":1179},[1425],{"type":59,"value":1182},{"type":53,"tag":328,"props":1427,"children":1428},{"style":347},[1429],{"type":59,"value":872},{"type":53,"tag":328,"props":1431,"children":1433},{"class":330,"line":1432},30,[1434,1439,1443,1447,1452,1456,1460,1464],{"type":53,"tag":328,"props":1435,"children":1436},{"style":388},[1437],{"type":59,"value":1438},"  price",{"type":53,"tag":328,"props":1440,"children":1441},{"style":347},[1442],{"type":59,"value":396},{"type":53,"tag":328,"props":1444,"children":1445},{"style":368},[1446],{"type":59,"value":1157},{"type":53,"tag":328,"props":1448,"children":1449},{"style":341},[1450],{"type":59,"value":1451},"(price ",{"type":53,"tag":328,"props":1453,"children":1454},{"style":353},[1455],{"type":59,"value":1176},{"type":53,"tag":328,"props":1457,"children":1458},{"style":1179},[1459],{"type":59,"value":1182},{"type":53,"tag":328,"props":1461,"children":1462},{"style":341},[1463],{"type":59,"value":424},{"type":53,"tag":328,"props":1465,"children":1466},{"style":347},[1467],{"type":59,"value":872},{"type":53,"tag":328,"props":1469,"children":1471},{"class":330,"line":1470},31,[1472,1477,1481,1486,1490],{"type":53,"tag":328,"props":1473,"children":1474},{"style":388},[1475],{"type":59,"value":1476},"  isActive",{"type":53,"tag":328,"props":1478,"children":1479},{"style":347},[1480],{"type":59,"value":396},{"type":53,"tag":328,"props":1482,"children":1483},{"style":341},[1484],{"type":59,"value":1485}," isActive ",{"type":53,"tag":328,"props":1487,"children":1488},{"style":353},[1489],{"type":59,"value":1176},{"type":53,"tag":328,"props":1491,"children":1492},{"style":1179},[1493],{"type":59,"value":1494}," boolean\n",{"type":53,"tag":328,"props":1496,"children":1498},{"class":330,"line":1497},32,[1499],{"type":53,"tag":328,"props":1500,"children":1501},{"style":347},[1502],{"type":59,"value":1503},"};\n",{"type":53,"tag":308,"props":1505,"children":1506},{},[],{"type":53,"tag":62,"props":1508,"children":1510},{"id":1509},"getaccountresources",[1511],{"type":59,"value":1512},"getAccountResources",{"type":53,"tag":318,"props":1514,"children":1516},{"className":320,"code":1515,"language":19,"meta":322,"style":322},"const resources = await aptos.getAccountResources({\n  accountAddress: account.accountAddress\n});\n\u002F\u002F resources: Array\u003CMoveResource>\nconst counterResource = resources.find((r) => r.type === `${MODULE_ADDRESS}::counter::Counter`);\n",[1517],{"type":53,"tag":83,"props":1518,"children":1519},{"__ignoreMap":322},[1520,1560,1583,1598,1606],{"type":53,"tag":328,"props":1521,"children":1522},{"class":330,"line":331},[1523,1527,1532,1536,1540,1544,1548,1552,1556],{"type":53,"tag":328,"props":1524,"children":1525},{"style":335},[1526],{"type":59,"value":338},{"type":53,"tag":328,"props":1528,"children":1529},{"style":341},[1530],{"type":59,"value":1531}," resources ",{"type":53,"tag":328,"props":1533,"children":1534},{"style":347},[1535],{"type":59,"value":350},{"type":53,"tag":328,"props":1537,"children":1538},{"style":353},[1539],{"type":59,"value":356},{"type":53,"tag":328,"props":1541,"children":1542},{"style":341},[1543],{"type":59,"value":361},{"type":53,"tag":328,"props":1545,"children":1546},{"style":347},[1547],{"type":59,"value":135},{"type":53,"tag":328,"props":1549,"children":1550},{"style":368},[1551],{"type":59,"value":1512},{"type":53,"tag":328,"props":1553,"children":1554},{"style":341},[1555],{"type":59,"value":376},{"type":53,"tag":328,"props":1557,"children":1558},{"style":347},[1559],{"type":59,"value":381},{"type":53,"tag":328,"props":1561,"children":1562},{"class":330,"line":384},[1563,1567,1571,1575,1579],{"type":53,"tag":328,"props":1564,"children":1565},{"style":388},[1566],{"type":59,"value":391},{"type":53,"tag":328,"props":1568,"children":1569},{"style":347},[1570],{"type":59,"value":396},{"type":53,"tag":328,"props":1572,"children":1573},{"style":341},[1574],{"type":59,"value":401},{"type":53,"tag":328,"props":1576,"children":1577},{"style":347},[1578],{"type":59,"value":135},{"type":53,"tag":328,"props":1580,"children":1581},{"style":341},[1582],{"type":59,"value":410},{"type":53,"tag":328,"props":1584,"children":1585},{"class":330,"line":413},[1586,1590,1594],{"type":53,"tag":328,"props":1587,"children":1588},{"style":347},[1589],{"type":59,"value":419},{"type":53,"tag":328,"props":1591,"children":1592},{"style":341},[1593],{"type":59,"value":424},{"type":53,"tag":328,"props":1595,"children":1596},{"style":347},[1597],{"type":59,"value":429},{"type":53,"tag":328,"props":1599,"children":1600},{"class":330,"line":432},[1601],{"type":53,"tag":328,"props":1602,"children":1603},{"style":436},[1604],{"type":59,"value":1605},"\u002F\u002F resources: Array\u003CMoveResource>\n",{"type":53,"tag":328,"props":1607,"children":1608},{"class":330,"line":442},[1609,1613,1618,1622,1627,1631,1636,1640,1644,1650,1654,1659,1664,1668,1673,1678,1682,1686,1690,1695,1699,1703],{"type":53,"tag":328,"props":1610,"children":1611},{"style":335},[1612],{"type":59,"value":338},{"type":53,"tag":328,"props":1614,"children":1615},{"style":341},[1616],{"type":59,"value":1617}," counterResource ",{"type":53,"tag":328,"props":1619,"children":1620},{"style":347},[1621],{"type":59,"value":350},{"type":53,"tag":328,"props":1623,"children":1624},{"style":341},[1625],{"type":59,"value":1626}," resources",{"type":53,"tag":328,"props":1628,"children":1629},{"style":347},[1630],{"type":59,"value":135},{"type":53,"tag":328,"props":1632,"children":1633},{"style":368},[1634],{"type":59,"value":1635},"find",{"type":53,"tag":328,"props":1637,"children":1638},{"style":341},[1639],{"type":59,"value":376},{"type":53,"tag":328,"props":1641,"children":1642},{"style":347},[1643],{"type":59,"value":376},{"type":53,"tag":328,"props":1645,"children":1647},{"style":1646},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[1648],{"type":59,"value":1649},"r",{"type":53,"tag":328,"props":1651,"children":1652},{"style":347},[1653],{"type":59,"value":424},{"type":53,"tag":328,"props":1655,"children":1656},{"style":335},[1657],{"type":59,"value":1658}," =>",{"type":53,"tag":328,"props":1660,"children":1661},{"style":341},[1662],{"type":59,"value":1663}," r",{"type":53,"tag":328,"props":1665,"children":1666},{"style":347},[1667],{"type":59,"value":135},{"type":53,"tag":328,"props":1669,"children":1670},{"style":341},[1671],{"type":59,"value":1672},"type ",{"type":53,"tag":328,"props":1674,"children":1675},{"style":347},[1676],{"type":59,"value":1677},"===",{"type":53,"tag":328,"props":1679,"children":1680},{"style":347},[1681],{"type":59,"value":849},{"type":53,"tag":328,"props":1683,"children":1684},{"style":341},[1685],{"type":59,"value":854},{"type":53,"tag":328,"props":1687,"children":1688},{"style":347},[1689],{"type":59,"value":419},{"type":53,"tag":328,"props":1691,"children":1692},{"style":557},[1693],{"type":59,"value":1694},"::counter::Counter",{"type":53,"tag":328,"props":1696,"children":1697},{"style":347},[1698],{"type":59,"value":639},{"type":53,"tag":328,"props":1700,"children":1701},{"style":341},[1702],{"type":59,"value":424},{"type":53,"tag":328,"props":1704,"children":1705},{"style":347},[1706],{"type":59,"value":429},{"type":53,"tag":308,"props":1708,"children":1709},{},[],{"type":53,"tag":62,"props":1711,"children":1713},{"id":1712},"getaccountresource-single-type",[1714],{"type":59,"value":1715},"getAccountResource (single type)",{"type":53,"tag":318,"props":1717,"children":1719},{"className":320,"code":1718,"language":19,"meta":322,"style":322},"const resource = await aptos.getAccountResource({\n  accountAddress: account.accountAddress,\n  resourceType: `${MODULE_ADDRESS}::counter::Counter`\n});\n\u002F\u002F resource.data has the struct fields\nconst value = (resource?.data as { value: number })?.value;\n",[1720],{"type":53,"tag":83,"props":1721,"children":1722},{"__ignoreMap":322},[1723,1764,1792,1825,1840,1848],{"type":53,"tag":328,"props":1724,"children":1725},{"class":330,"line":331},[1726,1730,1735,1739,1743,1747,1751,1756,1760],{"type":53,"tag":328,"props":1727,"children":1728},{"style":335},[1729],{"type":59,"value":338},{"type":53,"tag":328,"props":1731,"children":1732},{"style":341},[1733],{"type":59,"value":1734}," resource ",{"type":53,"tag":328,"props":1736,"children":1737},{"style":347},[1738],{"type":59,"value":350},{"type":53,"tag":328,"props":1740,"children":1741},{"style":353},[1742],{"type":59,"value":356},{"type":53,"tag":328,"props":1744,"children":1745},{"style":341},[1746],{"type":59,"value":361},{"type":53,"tag":328,"props":1748,"children":1749},{"style":347},[1750],{"type":59,"value":135},{"type":53,"tag":328,"props":1752,"children":1753},{"style":368},[1754],{"type":59,"value":1755},"getAccountResource",{"type":53,"tag":328,"props":1757,"children":1758},{"style":341},[1759],{"type":59,"value":376},{"type":53,"tag":328,"props":1761,"children":1762},{"style":347},[1763],{"type":59,"value":381},{"type":53,"tag":328,"props":1765,"children":1766},{"class":330,"line":384},[1767,1771,1775,1779,1783,1788],{"type":53,"tag":328,"props":1768,"children":1769},{"style":388},[1770],{"type":59,"value":391},{"type":53,"tag":328,"props":1772,"children":1773},{"style":347},[1774],{"type":59,"value":396},{"type":53,"tag":328,"props":1776,"children":1777},{"style":341},[1778],{"type":59,"value":401},{"type":53,"tag":328,"props":1780,"children":1781},{"style":347},[1782],{"type":59,"value":135},{"type":53,"tag":328,"props":1784,"children":1785},{"style":341},[1786],{"type":59,"value":1787},"accountAddress",{"type":53,"tag":328,"props":1789,"children":1790},{"style":347},[1791],{"type":59,"value":872},{"type":53,"tag":328,"props":1793,"children":1794},{"class":330,"line":413},[1795,1800,1804,1808,1812,1816,1820],{"type":53,"tag":328,"props":1796,"children":1797},{"style":388},[1798],{"type":59,"value":1799},"  resourceType",{"type":53,"tag":328,"props":1801,"children":1802},{"style":347},[1803],{"type":59,"value":396},{"type":53,"tag":328,"props":1805,"children":1806},{"style":347},[1807],{"type":59,"value":849},{"type":53,"tag":328,"props":1809,"children":1810},{"style":341},[1811],{"type":59,"value":854},{"type":53,"tag":328,"props":1813,"children":1814},{"style":347},[1815],{"type":59,"value":419},{"type":53,"tag":328,"props":1817,"children":1818},{"style":557},[1819],{"type":59,"value":1694},{"type":53,"tag":328,"props":1821,"children":1822},{"style":347},[1823],{"type":59,"value":1824},"`\n",{"type":53,"tag":328,"props":1826,"children":1827},{"class":330,"line":432},[1828,1832,1836],{"type":53,"tag":328,"props":1829,"children":1830},{"style":347},[1831],{"type":59,"value":419},{"type":53,"tag":328,"props":1833,"children":1834},{"style":341},[1835],{"type":59,"value":424},{"type":53,"tag":328,"props":1837,"children":1838},{"style":347},[1839],{"type":59,"value":429},{"type":53,"tag":328,"props":1841,"children":1842},{"class":330,"line":442},[1843],{"type":53,"tag":328,"props":1844,"children":1845},{"style":436},[1846],{"type":59,"value":1847},"\u002F\u002F resource.data has the struct fields\n",{"type":53,"tag":328,"props":1849,"children":1850},{"class":330,"line":483},[1851,1855,1860,1864,1869,1874,1879,1883,1888,1893,1897,1902,1907,1911,1915,1920],{"type":53,"tag":328,"props":1852,"children":1853},{"style":335},[1854],{"type":59,"value":338},{"type":53,"tag":328,"props":1856,"children":1857},{"style":341},[1858],{"type":59,"value":1859}," value ",{"type":53,"tag":328,"props":1861,"children":1862},{"style":347},[1863],{"type":59,"value":350},{"type":53,"tag":328,"props":1865,"children":1866},{"style":341},[1867],{"type":59,"value":1868}," (resource",{"type":53,"tag":328,"props":1870,"children":1871},{"style":347},[1872],{"type":59,"value":1873},"?.",{"type":53,"tag":328,"props":1875,"children":1876},{"style":341},[1877],{"type":59,"value":1878},"data ",{"type":53,"tag":328,"props":1880,"children":1881},{"style":353},[1882],{"type":59,"value":1176},{"type":53,"tag":328,"props":1884,"children":1885},{"style":347},[1886],{"type":59,"value":1887}," {",{"type":53,"tag":328,"props":1889,"children":1890},{"style":388},[1891],{"type":59,"value":1892}," value",{"type":53,"tag":328,"props":1894,"children":1895},{"style":347},[1896],{"type":59,"value":396},{"type":53,"tag":328,"props":1898,"children":1899},{"style":1179},[1900],{"type":59,"value":1901}," number",{"type":53,"tag":328,"props":1903,"children":1904},{"style":347},[1905],{"type":59,"value":1906}," }",{"type":53,"tag":328,"props":1908,"children":1909},{"style":341},[1910],{"type":59,"value":424},{"type":53,"tag":328,"props":1912,"children":1913},{"style":347},[1914],{"type":59,"value":1873},{"type":53,"tag":328,"props":1916,"children":1917},{"style":341},[1918],{"type":59,"value":1919},"value",{"type":53,"tag":328,"props":1921,"children":1922},{"style":347},[1923],{"type":59,"value":429},{"type":53,"tag":308,"props":1925,"children":1926},{},[],{"type":53,"tag":62,"props":1928,"children":1930},{"id":1929},"getaccountmodules",[1931],{"type":59,"value":1932},"getAccountModules",{"type":53,"tag":318,"props":1934,"children":1936},{"className":320,"code":1935,"language":19,"meta":322,"style":322},"const modules = await aptos.getAccountModules({\n  accountAddress: modulePublisherAddress\n});\n\u002F\u002F modules: MoveModuleBytecode[] (ABI, bytecode)\n",[1937],{"type":53,"tag":83,"props":1938,"children":1939},{"__ignoreMap":322},[1940,1980,1996,2011],{"type":53,"tag":328,"props":1941,"children":1942},{"class":330,"line":331},[1943,1947,1952,1956,1960,1964,1968,1972,1976],{"type":53,"tag":328,"props":1944,"children":1945},{"style":335},[1946],{"type":59,"value":338},{"type":53,"tag":328,"props":1948,"children":1949},{"style":341},[1950],{"type":59,"value":1951}," modules ",{"type":53,"tag":328,"props":1953,"children":1954},{"style":347},[1955],{"type":59,"value":350},{"type":53,"tag":328,"props":1957,"children":1958},{"style":353},[1959],{"type":59,"value":356},{"type":53,"tag":328,"props":1961,"children":1962},{"style":341},[1963],{"type":59,"value":361},{"type":53,"tag":328,"props":1965,"children":1966},{"style":347},[1967],{"type":59,"value":135},{"type":53,"tag":328,"props":1969,"children":1970},{"style":368},[1971],{"type":59,"value":1932},{"type":53,"tag":328,"props":1973,"children":1974},{"style":341},[1975],{"type":59,"value":376},{"type":53,"tag":328,"props":1977,"children":1978},{"style":347},[1979],{"type":59,"value":381},{"type":53,"tag":328,"props":1981,"children":1982},{"class":330,"line":384},[1983,1987,1991],{"type":53,"tag":328,"props":1984,"children":1985},{"style":388},[1986],{"type":59,"value":391},{"type":53,"tag":328,"props":1988,"children":1989},{"style":347},[1990],{"type":59,"value":396},{"type":53,"tag":328,"props":1992,"children":1993},{"style":341},[1994],{"type":59,"value":1995}," modulePublisherAddress\n",{"type":53,"tag":328,"props":1997,"children":1998},{"class":330,"line":413},[1999,2003,2007],{"type":53,"tag":328,"props":2000,"children":2001},{"style":347},[2002],{"type":59,"value":419},{"type":53,"tag":328,"props":2004,"children":2005},{"style":341},[2006],{"type":59,"value":424},{"type":53,"tag":328,"props":2008,"children":2009},{"style":347},[2010],{"type":59,"value":429},{"type":53,"tag":328,"props":2012,"children":2013},{"class":330,"line":432},[2014],{"type":53,"tag":328,"props":2015,"children":2016},{"style":436},[2017],{"type":59,"value":2018},"\u002F\u002F modules: MoveModuleBytecode[] (ABI, bytecode)\n",{"type":53,"tag":308,"props":2020,"children":2021},{},[],{"type":53,"tag":62,"props":2023,"children":2025},{"id":2024},"getmodule-single-module-by-name",[2026],{"type":59,"value":2027},"getModule (single module by name)",{"type":53,"tag":318,"props":2029,"children":2031},{"className":320,"code":2030,"language":19,"meta":322,"style":322},"const module = await aptos.getModule({\n  accountAddress: modulePublisherAddress,\n  moduleName: \"counter\"\n});\n",[2032],{"type":53,"tag":83,"props":2033,"children":2034},{"__ignoreMap":322},[2035,2076,2096,2121],{"type":53,"tag":328,"props":2036,"children":2037},{"class":330,"line":331},[2038,2042,2047,2051,2055,2059,2063,2068,2072],{"type":53,"tag":328,"props":2039,"children":2040},{"style":335},[2041],{"type":59,"value":338},{"type":53,"tag":328,"props":2043,"children":2044},{"style":341},[2045],{"type":59,"value":2046}," module ",{"type":53,"tag":328,"props":2048,"children":2049},{"style":347},[2050],{"type":59,"value":350},{"type":53,"tag":328,"props":2052,"children":2053},{"style":353},[2054],{"type":59,"value":356},{"type":53,"tag":328,"props":2056,"children":2057},{"style":341},[2058],{"type":59,"value":361},{"type":53,"tag":328,"props":2060,"children":2061},{"style":347},[2062],{"type":59,"value":135},{"type":53,"tag":328,"props":2064,"children":2065},{"style":368},[2066],{"type":59,"value":2067},"getModule",{"type":53,"tag":328,"props":2069,"children":2070},{"style":341},[2071],{"type":59,"value":376},{"type":53,"tag":328,"props":2073,"children":2074},{"style":347},[2075],{"type":59,"value":381},{"type":53,"tag":328,"props":2077,"children":2078},{"class":330,"line":384},[2079,2083,2087,2092],{"type":53,"tag":328,"props":2080,"children":2081},{"style":388},[2082],{"type":59,"value":391},{"type":53,"tag":328,"props":2084,"children":2085},{"style":347},[2086],{"type":59,"value":396},{"type":53,"tag":328,"props":2088,"children":2089},{"style":341},[2090],{"type":59,"value":2091}," modulePublisherAddress",{"type":53,"tag":328,"props":2093,"children":2094},{"style":347},[2095],{"type":59,"value":872},{"type":53,"tag":328,"props":2097,"children":2098},{"class":330,"line":413},[2099,2104,2108,2112,2117],{"type":53,"tag":328,"props":2100,"children":2101},{"style":388},[2102],{"type":59,"value":2103},"  moduleName",{"type":53,"tag":328,"props":2105,"children":2106},{"style":347},[2107],{"type":59,"value":396},{"type":53,"tag":328,"props":2109,"children":2110},{"style":347},[2111],{"type":59,"value":611},{"type":53,"tag":328,"props":2113,"children":2114},{"style":557},[2115],{"type":59,"value":2116},"counter",{"type":53,"tag":328,"props":2118,"children":2119},{"style":347},[2120],{"type":59,"value":728},{"type":53,"tag":328,"props":2122,"children":2123},{"class":330,"line":432},[2124,2128,2132],{"type":53,"tag":328,"props":2125,"children":2126},{"style":347},[2127],{"type":59,"value":419},{"type":53,"tag":328,"props":2129,"children":2130},{"style":341},[2131],{"type":59,"value":424},{"type":53,"tag":328,"props":2133,"children":2134},{"style":347},[2135],{"type":59,"value":429},{"type":53,"tag":308,"props":2137,"children":2138},{},[],{"type":53,"tag":62,"props":2140,"children":2142},{"id":2141},"pagination-resources-modules",[2143],{"type":59,"value":2144},"Pagination (resources \u002F modules)",{"type":53,"tag":69,"props":2146,"children":2147},{},[2148],{"type":59,"value":2149},"Use cursor-based options when available:",{"type":53,"tag":318,"props":2151,"children":2153},{"className":320,"code":2152,"language":19,"meta":322,"style":322},"const { resources, cursor } = await aptos.getAccountResourcesPage({\n  accountAddress: account.accountAddress,\n  options: { limit: 10, cursor: nextCursor }\n});\n",[2154],{"type":53,"tag":83,"props":2155,"children":2156},{"__ignoreMap":322},[2157,2214,2241,2294],{"type":53,"tag":328,"props":2158,"children":2159},{"class":330,"line":331},[2160,2164,2168,2172,2176,2181,2185,2189,2193,2197,2201,2206,2210],{"type":53,"tag":328,"props":2161,"children":2162},{"style":335},[2163],{"type":59,"value":338},{"type":53,"tag":328,"props":2165,"children":2166},{"style":347},[2167],{"type":59,"value":1887},{"type":53,"tag":328,"props":2169,"children":2170},{"style":341},[2171],{"type":59,"value":1626},{"type":53,"tag":328,"props":2173,"children":2174},{"style":347},[2175],{"type":59,"value":606},{"type":53,"tag":328,"props":2177,"children":2178},{"style":341},[2179],{"type":59,"value":2180}," cursor ",{"type":53,"tag":328,"props":2182,"children":2183},{"style":347},[2184],{"type":59,"value":419},{"type":53,"tag":328,"props":2186,"children":2187},{"style":347},[2188],{"type":59,"value":1260},{"type":53,"tag":328,"props":2190,"children":2191},{"style":353},[2192],{"type":59,"value":356},{"type":53,"tag":328,"props":2194,"children":2195},{"style":341},[2196],{"type":59,"value":361},{"type":53,"tag":328,"props":2198,"children":2199},{"style":347},[2200],{"type":59,"value":135},{"type":53,"tag":328,"props":2202,"children":2203},{"style":368},[2204],{"type":59,"value":2205},"getAccountResourcesPage",{"type":53,"tag":328,"props":2207,"children":2208},{"style":341},[2209],{"type":59,"value":376},{"type":53,"tag":328,"props":2211,"children":2212},{"style":347},[2213],{"type":59,"value":381},{"type":53,"tag":328,"props":2215,"children":2216},{"class":330,"line":384},[2217,2221,2225,2229,2233,2237],{"type":53,"tag":328,"props":2218,"children":2219},{"style":388},[2220],{"type":59,"value":391},{"type":53,"tag":328,"props":2222,"children":2223},{"style":347},[2224],{"type":59,"value":396},{"type":53,"tag":328,"props":2226,"children":2227},{"style":341},[2228],{"type":59,"value":401},{"type":53,"tag":328,"props":2230,"children":2231},{"style":347},[2232],{"type":59,"value":135},{"type":53,"tag":328,"props":2234,"children":2235},{"style":341},[2236],{"type":59,"value":1787},{"type":53,"tag":328,"props":2238,"children":2239},{"style":347},[2240],{"type":59,"value":872},{"type":53,"tag":328,"props":2242,"children":2243},{"class":330,"line":413},[2244,2249,2253,2257,2262,2266,2271,2275,2280,2284,2289],{"type":53,"tag":328,"props":2245,"children":2246},{"style":388},[2247],{"type":59,"value":2248},"  options",{"type":53,"tag":328,"props":2250,"children":2251},{"style":347},[2252],{"type":59,"value":396},{"type":53,"tag":328,"props":2254,"children":2255},{"style":347},[2256],{"type":59,"value":1887},{"type":53,"tag":328,"props":2258,"children":2259},{"style":388},[2260],{"type":59,"value":2261}," limit",{"type":53,"tag":328,"props":2263,"children":2264},{"style":347},[2265],{"type":59,"value":396},{"type":53,"tag":328,"props":2267,"children":2268},{"style":468},[2269],{"type":59,"value":2270}," 10",{"type":53,"tag":328,"props":2272,"children":2273},{"style":347},[2274],{"type":59,"value":606},{"type":53,"tag":328,"props":2276,"children":2277},{"style":388},[2278],{"type":59,"value":2279}," cursor",{"type":53,"tag":328,"props":2281,"children":2282},{"style":347},[2283],{"type":59,"value":396},{"type":53,"tag":328,"props":2285,"children":2286},{"style":341},[2287],{"type":59,"value":2288}," nextCursor ",{"type":53,"tag":328,"props":2290,"children":2291},{"style":347},[2292],{"type":59,"value":2293},"}\n",{"type":53,"tag":328,"props":2295,"children":2296},{"class":330,"line":432},[2297,2301,2305],{"type":53,"tag":328,"props":2298,"children":2299},{"style":347},[2300],{"type":59,"value":419},{"type":53,"tag":328,"props":2302,"children":2303},{"style":341},[2304],{"type":59,"value":424},{"type":53,"tag":328,"props":2306,"children":2307},{"style":347},[2308],{"type":59,"value":429},{"type":53,"tag":308,"props":2310,"children":2311},{},[],{"type":53,"tag":62,"props":2313,"children":2315},{"id":2314},"type-handling-for-view-results",[2316],{"type":59,"value":2317},"Type handling for view results",{"type":53,"tag":2319,"props":2320,"children":2321},"table",{},[2322,2345],{"type":53,"tag":2323,"props":2324,"children":2325},"thead",{},[2326],{"type":53,"tag":2327,"props":2328,"children":2329},"tr",{},[2330,2336,2340],{"type":53,"tag":2331,"props":2332,"children":2333},"th",{},[2334],{"type":59,"value":2335},"Move return type",{"type":53,"tag":2331,"props":2337,"children":2338},{},[2339],{"type":59,"value":18},{"type":53,"tag":2331,"props":2341,"children":2342},{},[2343],{"type":59,"value":2344},"Example",{"type":53,"tag":2346,"props":2347,"children":2348},"tbody",{},[2349,2379,2400,2422,2444],{"type":53,"tag":2327,"props":2350,"children":2351},{},[2352,2358,2363],{"type":53,"tag":2353,"props":2354,"children":2355},"td",{},[2356],{"type":59,"value":2357},"u8..u64",{"type":53,"tag":2353,"props":2359,"children":2360},{},[2361],{"type":59,"value":2362},"number or bigint",{"type":53,"tag":2353,"props":2364,"children":2365},{},[2366,2372,2373],{"type":53,"tag":83,"props":2367,"children":2369},{"className":2368},[],[2370],{"type":59,"value":2371},"Number(result[0])",{"type":59,"value":258},{"type":53,"tag":83,"props":2374,"children":2376},{"className":2375},[],[2377],{"type":59,"value":2378},"BigInt(result[0])",{"type":53,"tag":2327,"props":2380,"children":2381},{},[2382,2387,2391],{"type":53,"tag":2353,"props":2383,"children":2384},{},[2385],{"type":59,"value":2386},"u128, u256",{"type":53,"tag":2353,"props":2388,"children":2389},{},[2390],{"type":59,"value":188},{"type":53,"tag":2353,"props":2392,"children":2393},{},[2394],{"type":53,"tag":83,"props":2395,"children":2397},{"className":2396},[],[2398],{"type":59,"value":2399},"BigInt(result[0] as string)",{"type":53,"tag":2327,"props":2401,"children":2402},{},[2403,2408,2413],{"type":53,"tag":2353,"props":2404,"children":2405},{},[2406],{"type":59,"value":2407},"address",{"type":53,"tag":2353,"props":2409,"children":2410},{},[2411],{"type":59,"value":2412},"string",{"type":53,"tag":2353,"props":2414,"children":2415},{},[2416],{"type":53,"tag":83,"props":2417,"children":2419},{"className":2418},[],[2420],{"type":59,"value":2421},"result[0] as string",{"type":53,"tag":2327,"props":2423,"children":2424},{},[2425,2430,2435],{"type":53,"tag":2353,"props":2426,"children":2427},{},[2428],{"type":59,"value":2429},"bool",{"type":53,"tag":2353,"props":2431,"children":2432},{},[2433],{"type":59,"value":2434},"boolean",{"type":53,"tag":2353,"props":2436,"children":2437},{},[2438],{"type":53,"tag":83,"props":2439,"children":2441},{"className":2440},[],[2442],{"type":59,"value":2443},"result[0] as boolean",{"type":53,"tag":2327,"props":2445,"children":2446},{},[2447,2456,2461],{"type":53,"tag":2353,"props":2448,"children":2449},{},[2450,2452],{"type":59,"value":2451},"vector",{"type":53,"tag":2453,"props":2454,"children":2455},"t",{},[],{"type":53,"tag":2353,"props":2457,"children":2458},{},[2459],{"type":59,"value":2460},"array",{"type":53,"tag":2353,"props":2462,"children":2463},{},[2464],{"type":53,"tag":83,"props":2465,"children":2467},{"className":2466},[],[2468],{"type":59,"value":2469},"result[0] as T[]",{"type":53,"tag":308,"props":2471,"children":2472},{},[],{"type":53,"tag":62,"props":2474,"children":2476},{"id":2475},"common-mistakes",[2477],{"type":59,"value":2478},"Common mistakes",{"type":53,"tag":2319,"props":2480,"children":2481},{},[2482,2498],{"type":53,"tag":2323,"props":2483,"children":2484},{},[2485],{"type":53,"tag":2327,"props":2486,"children":2487},{},[2488,2493],{"type":53,"tag":2331,"props":2489,"children":2490},{},[2491],{"type":59,"value":2492},"Mistake",{"type":53,"tag":2331,"props":2494,"children":2495},{},[2496],{"type":59,"value":2497},"Correct approach",{"type":53,"tag":2346,"props":2499,"children":2500},{},[2501,2518,2535],{"type":53,"tag":2327,"props":2502,"children":2503},{},[2504,2509],{"type":53,"tag":2353,"props":2505,"children":2506},{},[2507],{"type":59,"value":2508},"Using getAccountCoinAmount",{"type":53,"tag":2353,"props":2510,"children":2511},{},[2512,2513],{"type":59,"value":109},{"type":53,"tag":83,"props":2514,"children":2516},{"className":2515},[],[2517],{"type":59,"value":115},{"type":53,"tag":2327,"props":2519,"children":2520},{},[2521,2526],{"type":53,"tag":2353,"props":2522,"children":2523},{},[2524],{"type":59,"value":2525},"Using number for u128",{"type":53,"tag":2353,"props":2527,"children":2528},{},[2529,2530],{"type":59,"value":109},{"type":53,"tag":83,"props":2531,"children":2533},{"className":2532},[],[2534],{"type":59,"value":2399},{"type":53,"tag":2327,"props":2536,"children":2537},{},[2538,2543],{"type":53,"tag":2353,"props":2539,"children":2540},{},[2541],{"type":59,"value":2542},"Forgetting typeArguments for generic view",{"type":53,"tag":2353,"props":2544,"children":2545},{},[2546,2548,2554],{"type":59,"value":2547},"Add ",{"type":53,"tag":83,"props":2549,"children":2551},{"className":2550},[],[2552],{"type":59,"value":2553},"typeArguments: [coinType]",{"type":59,"value":2555}," when Move function is generic",{"type":53,"tag":308,"props":2557,"children":2558},{},[],{"type":53,"tag":62,"props":2560,"children":2562},{"id":2561},"references",[2563],{"type":59,"value":2564},"References",{"type":53,"tag":2566,"props":2567,"children":2568},"ul",{},[2569,2589,2601],{"type":53,"tag":102,"props":2570,"children":2571},{},[2572,2574,2580,2581,2587],{"type":59,"value":2573},"SDK: ",{"type":53,"tag":83,"props":2575,"children":2577},{"className":2576},[],[2578],{"type":59,"value":2579},"src\u002Finternal\u002Fview.ts",{"type":59,"value":160},{"type":53,"tag":83,"props":2582,"children":2584},{"className":2583},[],[2585],{"type":59,"value":2586},"src\u002Fapi\u002Faccount.ts",{"type":59,"value":2588},", balance\u002FgetBalance in internal",{"type":53,"tag":102,"props":2590,"children":2591},{},[2592,2594],{"type":59,"value":2593},"Pattern: ",{"type":53,"tag":2595,"props":2596,"children":2598},"a",{"href":2597},"..\u002F..\u002F..\u002F..\u002Fpatterns\u002Ffullstack\u002FTYPESCRIPT_SDK.md",[2599],{"type":59,"value":2600},"TYPESCRIPT_SDK.md",{"type":53,"tag":102,"props":2602,"children":2603},{},[2604,2606,2612,2613,2619,2620],{"type":59,"value":2605},"Related: ",{"type":53,"tag":2595,"props":2607,"children":2609},{"href":2608},"..\u002Fts-sdk-client\u002FSKILL.md",[2610],{"type":59,"value":2611},"ts-sdk-client",{"type":59,"value":160},{"type":53,"tag":2595,"props":2614,"children":2616},{"href":2615},"..\u002Fts-sdk-types\u002FSKILL.md",[2617],{"type":59,"value":2618},"ts-sdk-types",{"type":59,"value":872},{"type":53,"tag":2595,"props":2621,"children":2623},{"href":2622},"..\u002Fuse-ts-sdk\u002FSKILL.md",[2624],{"type":59,"value":2625},"use-ts-sdk",{"type":53,"tag":2627,"props":2628,"children":2629},"style",{},[2630],{"type":59,"value":2631},"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":2633,"total":1303},[2634,2648,2665,2679,2693,2707,2721,2736,2748,2761,2771,2780],{"slug":2635,"name":2635,"fn":2636,"description":2637,"org":2638,"tags":2639,"stars":26,"repoUrl":27,"updatedAt":2647},"analyze-gas-optimization","optimize Aptos Move contracts for gas","Analyze and optimize Aptos Move contracts for gas efficiency, identifying expensive operations and suggesting optimizations. Triggers on: 'optimize gas', 'reduce gas costs', 'gas analysis', 'make contract cheaper', 'gas efficiency', 'analyze gas usage', 'reduce transaction costs'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2640,2641,2644],{"name":14,"slug":15,"type":16},{"name":2642,"slug":2643,"type":16},"Performance","performance",{"name":2645,"slug":2646,"type":16},"Smart Contracts","smart-contracts","2026-07-12T08:07:14.117466",{"slug":2649,"name":2649,"fn":2650,"description":2651,"org":2652,"tags":2653,"stars":26,"repoUrl":27,"updatedAt":2664},"create-aptos-project","scaffold new Aptos dApp projects","Scaffolds new Aptos projects using npx create-aptos-dapp. Supports fullstack (Vite or Next.js) and contract-only templates with network selection and optional API key. Triggers on: 'build app', 'create app', 'make app', 'new app', 'build dApp', 'create dApp', 'new dApp', 'build project', 'new project', 'create project', 'scaffold', 'start project', 'set up project', 'build me a', 'I want to build', 'make me a', 'help me build'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2654,2657,2658,2661],{"name":2655,"slug":2656,"type":16},"Next.js","next-js",{"name":18,"slug":19,"type":16},{"name":2659,"slug":2660,"type":16},"Vite","vite",{"name":2662,"slug":2663,"type":16},"Web3","web3","2026-07-12T08:07:30.595111",{"slug":2666,"name":2666,"fn":2667,"description":2668,"org":2669,"tags":2670,"stars":26,"repoUrl":27,"updatedAt":2678},"deploy-contracts","deploy Move contracts to Aptos networks","Safely deploys Move contracts to Aptos networks (devnet, testnet, mainnet) with pre-deployment verification. Triggers on: 'deploy contract', 'publish to testnet', 'deploy to mainnet', 'how to deploy', 'publish module', 'deployment checklist', 'deploy to devnet'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2671,2674,2677],{"name":2672,"slug":2673,"type":16},"Deployment","deployment",{"name":2675,"slug":2676,"type":16},"Engineering","engineering",{"name":2645,"slug":2646,"type":16},"2026-07-12T08:07:16.798352",{"slug":2680,"name":2680,"fn":2681,"description":2682,"org":2683,"tags":2684,"stars":26,"repoUrl":27,"updatedAt":2692},"generate-tests","generate test suites for Move contracts","Creates comprehensive test suites for Move contracts with 100% coverage requirement. Triggers on: 'generate tests', 'create tests', 'write test suite', 'test this contract', 'how to test', 'add test coverage', 'write unit tests'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2685,2686,2689],{"name":2675,"slug":2676,"type":16},{"name":2687,"slug":2688,"type":16},"QA","qa",{"name":2690,"slug":2691,"type":16},"Testing","testing","2026-07-12T08:07:18.0205",{"slug":2694,"name":2694,"fn":2695,"description":2696,"org":2697,"tags":2698,"stars":26,"repoUrl":27,"updatedAt":2706},"modernize-move","modernize Move V1 contracts to V2","Detects and modernizes outdated Move V1 syntax, patterns, and APIs to Move V2+. Use when upgrading legacy contracts, migrating to modern syntax, or converting old patterns to current best practices. NOT for writing new contracts (use write-contracts) or fixing bugs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2699,2702,2703],{"name":2700,"slug":2701,"type":16},"Code Analysis","code-analysis",{"name":2675,"slug":2676,"type":16},{"name":2704,"slug":2705,"type":16},"Migration","migration","2026-07-12T08:07:10.226223",{"slug":2708,"name":2708,"fn":2709,"description":2710,"org":2711,"tags":2712,"stars":26,"repoUrl":27,"updatedAt":2720},"search-aptos-examples","search Aptos reference implementations","Searches aptos-core and daily-move for reference implementations before writing contracts. Triggers on: 'search examples', 'find example', 'check aptos-core', 'is there an example', 'reference implementation', 'how does aptos implement', 'similar contract', 'daily-move'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2713,2714,2717],{"name":14,"slug":15,"type":16},{"name":2715,"slug":2716,"type":16},"Documentation","documentation",{"name":2718,"slug":2719,"type":16},"Search","search","2026-07-12T08:07:15.382039",{"slug":2722,"name":2722,"fn":2723,"description":2724,"org":2725,"tags":2726,"stars":26,"repoUrl":27,"updatedAt":2735},"security-audit","audit Move smart contracts for security","Audits Move contracts for security vulnerabilities before deployment using 7-category checklist. Triggers on: 'audit contract', 'security check', 'review security', 'check for vulnerabilities', 'security audit', 'is this secure', 'find security issues'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2727,2730,2731,2734],{"name":2728,"slug":2729,"type":16},"Audit","audit",{"name":2700,"slug":2701,"type":16},{"name":2732,"slug":2733,"type":16},"Security","security",{"name":2645,"slug":2646,"type":16},"2026-07-12T08:07:11.680215",{"slug":2737,"name":2737,"fn":2738,"description":2739,"org":2740,"tags":2741,"stars":26,"repoUrl":27,"updatedAt":2747},"smoothsend-gasless","sponsor gas fees for Aptos dApps","How to sponsor gas fees for Aptos dApp users using SmoothSend. Paid commercial service: free on testnet, credit-based on mainnet. Covers 3-line wallet adapter integration (transactionSubmitter), Script Composer for fee-in-token stablecoin transfers. Triggers on: 'gasless', 'sponsor gas', 'users pay no APT', 'transactionSubmitter', 'SmoothSend', 'fee payer', 'pay gas for users', 'no gas required'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2742,2743,2746],{"name":21,"slug":22,"type":16},{"name":2744,"slug":2745,"type":16},"Payments","payments",{"name":2662,"slug":2663,"type":16},"2026-07-12T08:07:31.843242",{"slug":2749,"name":2749,"fn":2750,"description":2751,"org":2752,"tags":2753,"stars":26,"repoUrl":27,"updatedAt":2760},"ts-sdk-account","manage Aptos accounts with TS SDK","How to create and use Account (signer) in @aptos-labs\u002Fts-sdk. Covers Account.generate(), fromPrivateKey(), fromDerivationPath(), Ed25519 vs SingleKey vs MultiKey vs Keyless, serialization (fromHex\u002FtoHex). Triggers on: 'Account.generate', 'Account.fromPrivateKey', 'Ed25519PrivateKey', 'SDK account', 'mnemonic', 'SingleKeyAccount', 'KeylessAccount'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2754,2757,2758,2759],{"name":2755,"slug":2756,"type":16},"Auth","auth",{"name":14,"slug":15,"type":16},{"name":24,"slug":25,"type":16},{"name":18,"slug":19,"type":16},"2026-07-12T08:07:29.297415",{"slug":2762,"name":2762,"fn":2763,"description":2764,"org":2765,"tags":2766,"stars":26,"repoUrl":27,"updatedAt":2770},"ts-sdk-address","manage AccountAddress in Aptos TypeScript SDK","How to create and use AccountAddress in @aptos-labs\u002Fts-sdk. Covers address format (AIP-40), from\u002FfromString\u002FfromStrict, special addresses, LONG vs SHORT form, and derived addresses (object, resource, token, user-derived). Triggers on: 'AccountAddress', 'AccountAddress.from', 'AIP-40', 'derived address', 'createObjectAddress', 'createResourceAddress', 'createTokenAddress'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2767,2768,2769],{"name":14,"slug":15,"type":16},{"name":24,"slug":25,"type":16},{"name":18,"slug":19,"type":16},"2026-07-12T08:07:26.430378",{"slug":2611,"name":2611,"fn":2772,"description":2773,"org":2774,"tags":2775,"stars":26,"repoUrl":27,"updatedAt":2779},"configure Aptos SDK clients","How to create and configure the Aptos client (Aptos, AptosConfig) in @aptos-labs\u002Fts-sdk. Covers Network, fullnode\u002Findexer\u002Ffaucet URLs, singleton pattern, and Bun compatibility. Triggers on: 'Aptos client', 'AptosConfig', 'SDK client', 'client setup', 'new Aptos(', 'Network.TESTNET', 'Network.MAINNET'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2776,2777,2778],{"name":21,"slug":22,"type":16},{"name":24,"slug":25,"type":16},{"name":18,"slug":19,"type":16},"2026-07-12T08:07:21.933342",{"slug":2781,"name":2781,"fn":2782,"description":2783,"org":2784,"tags":2785,"stars":26,"repoUrl":27,"updatedAt":2789},"ts-sdk-transactions","manage Aptos blockchain transactions","How to build, sign, submit, and simulate transactions in @aptos-labs\u002Fts-sdk. Covers build.simple(), signAndSubmitTransaction(), waitForTransaction(), simulate, sponsored (fee payer), and multi-agent. Triggers on: 'build.simple', 'signAndSubmitTransaction', 'transaction.build', 'waitForTransaction', 'signAsFeePayer', 'SDK transaction', 'sponsored transaction', 'multi-agent transaction'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2786,2787,2788],{"name":21,"slug":22,"type":16},{"name":18,"slug":19,"type":16},{"name":2662,"slug":2663,"type":16},"2026-07-12T08:07:23.774257",{"items":2791,"total":1123},[2792,2798,2805,2811,2817,2823,2829],{"slug":2635,"name":2635,"fn":2636,"description":2637,"org":2793,"tags":2794,"stars":26,"repoUrl":27,"updatedAt":2647},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2795,2796,2797],{"name":14,"slug":15,"type":16},{"name":2642,"slug":2643,"type":16},{"name":2645,"slug":2646,"type":16},{"slug":2649,"name":2649,"fn":2650,"description":2651,"org":2799,"tags":2800,"stars":26,"repoUrl":27,"updatedAt":2664},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2801,2802,2803,2804],{"name":2655,"slug":2656,"type":16},{"name":18,"slug":19,"type":16},{"name":2659,"slug":2660,"type":16},{"name":2662,"slug":2663,"type":16},{"slug":2666,"name":2666,"fn":2667,"description":2668,"org":2806,"tags":2807,"stars":26,"repoUrl":27,"updatedAt":2678},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2808,2809,2810],{"name":2672,"slug":2673,"type":16},{"name":2675,"slug":2676,"type":16},{"name":2645,"slug":2646,"type":16},{"slug":2680,"name":2680,"fn":2681,"description":2682,"org":2812,"tags":2813,"stars":26,"repoUrl":27,"updatedAt":2692},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2814,2815,2816],{"name":2675,"slug":2676,"type":16},{"name":2687,"slug":2688,"type":16},{"name":2690,"slug":2691,"type":16},{"slug":2694,"name":2694,"fn":2695,"description":2696,"org":2818,"tags":2819,"stars":26,"repoUrl":27,"updatedAt":2706},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2820,2821,2822],{"name":2700,"slug":2701,"type":16},{"name":2675,"slug":2676,"type":16},{"name":2704,"slug":2705,"type":16},{"slug":2708,"name":2708,"fn":2709,"description":2710,"org":2824,"tags":2825,"stars":26,"repoUrl":27,"updatedAt":2720},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2826,2827,2828],{"name":14,"slug":15,"type":16},{"name":2715,"slug":2716,"type":16},{"name":2718,"slug":2719,"type":16},{"slug":2722,"name":2722,"fn":2723,"description":2724,"org":2830,"tags":2831,"stars":26,"repoUrl":27,"updatedAt":2735},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2832,2833,2834,2835],{"name":2728,"slug":2729,"type":16},{"name":2700,"slug":2701,"type":16},{"name":2732,"slug":2733,"type":16},{"name":2645,"slug":2646,"type":16}]