Sfoglia il codice sorgente

added getTokenAccounts

tonyboylehub 11 mesi fa
parent
commit
d1f2a7f267

+ 55 - 0
src/lib/api/aura/das/getTokenAccounts.js

@@ -0,0 +1,55 @@
+const getTokenAccounts = {
+    description: 'Returns the token accounts for a given set of addresses',
+    method: 'getTokenAccounts',
+    params: [
+      {
+          name: 'mint',
+        type: 'string',
+        description: 'Public key of the mint to retrieve',
+        placeholder: 'Public key of the mint',
+      },
+      {
+        name: 'owner',
+      type: 'string',
+      description: 'Owner public key of the token accounts to revtrieve',
+      placeholder: 'Owner public key',
+    },
+    {
+        name: 'limit',
+        type: 'number',
+        description: 'Number of assets to return',
+      },
+      {
+        name: 'page',
+        type: 'number',
+        description: 'The index of the "page" to retrieve.',
+      },
+      {
+        name: 'cursor',
+        type: 'string',
+        description: 'pagination cursor',
+      },
+      {
+        name: 'before',
+        type: 'string',
+        description: 'Retrieve assets before the specified ID',
+      },
+      {
+        name: 'after',
+        type: 'string',
+        description: 'Retrieve assets after the specified ID',
+      },
+      {
+        name: 'options',
+        type: 'object',
+        value: {
+            showZeroBalance: {
+                type: 'boolean',
+                description: 'Show zero balance accounts',
+            }
+        }
+      }
+    ],
+  }
+  
+  export default getTokenAccounts

+ 2 - 0
src/lib/api/aura/methods.js

@@ -7,6 +7,7 @@ import getAssetsByCreator from './das/getAssetsByCreator'
 import getAssetsByGroup from './das/getAssetsByGroup'
 import getAssetsByOwner from './das/getAssetsByOwner'
 import getSignaturesForAsset from './das/getSignaturesForAsset'
+import getTokenAccounts from './das/getTokenAccounts'
 import searchAssets from './das/searchAssest'
 
 
@@ -24,5 +25,6 @@ const apiMethods = {
   getAssetProofBatch: getAssetProofBatch,
   searchAssets: searchAssets,
   getSignaturesForAsset: getSignaturesForAsset,
+  getTokenAccounts: getTokenAccounts,
 }
 export default apiMethods

+ 9 - 0
src/pages/aura/api/v1/das/get-token-accounts.md

@@ -0,0 +1,9 @@
+---
+title: Get Token Accounts
+metaTitle: Get Token Accounts | Aura API
+description: Learn about the Get Token Accounts Aura API Method.
+---
+
+Search and return a list of token accounts based on criteria.
+
+{% apiRenderer method="getTokenAccounts" /%}