UNPKG

blockstack

Version:

The Blockstack Javascript library for authentication, identity, and storage.

2,069 lines (2,068 loc) 524 kB
{ "id": 0, "name": "blockstack.js 21.1.1 Library Reference", "kind": 0, "flags": {}, "children": [ { "id": 1, "name": "AuthScope", "kind": 4, "kindString": "Enumeration", "flags": { "isExported": true }, "comment": { "shortText": "Non-exhaustive list of common permission scopes." }, "children": [ { "id": 4, "name": "email", "kind": 16, "kindString": "Enumeration member", "flags": { "isExported": true }, "comment": { "shortText": "Request the user's email if available." }, "sources": [ { "fileName": "src/auth/authConstants.ts", "line": 33, "character": 7 } ], "defaultValue": "\"email\"" }, { "id": 3, "name": "publish_data", "kind": 16, "kindString": "Enumeration member", "flags": { "isExported": true }, "comment": { "shortText": "Publish data so that other users of the app can discover and interact with the user.\nThe user's files stored on Gaia hub are made visible to others via the `apps` property in the\nuser’s `profile.json` file." }, "sources": [ { "fileName": "src/auth/authConstants.ts", "line": 29, "character": 14 } ], "defaultValue": "\"publish_data\"" }, { "id": 2, "name": "store_write", "kind": 16, "kindString": "Enumeration member", "flags": { "isExported": true }, "comment": { "shortText": "Read and write data to the user's Gaia hub in an app-specific storage bucket.\nThis is the default scope." }, "sources": [ { "fileName": "src/auth/authConstants.ts", "line": 23, "character": 13 } ], "defaultValue": "\"store_write\"" } ], "groups": [ { "title": "Enumeration members", "kind": 16, "children": [ 4, 3, 2 ] } ], "sources": [ { "fileName": "src/auth/authConstants.ts", "line": 18, "character": 27 } ] }, { "id": 889, "name": "AppConfig", "kind": 128, "kindString": "Class", "flags": { "isExported": true }, "comment": { "shortText": "Configuration data for the current app.", "text": "On browser platforms, creating an instance of this\nclass without any arguments will use\n`window.location.origin` as the app domain.\nOn non-browser platforms, you need to\nspecify an app domain as the second argument.\n\n" }, "children": [ { "id": 896, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": { "isExported": true }, "comment": {}, "signatures": [ { "id": 897, "name": "new AppConfig", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "comment": {}, "parameters": [ { "id": 898, "name": "scopes", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "shortText": "permissions this app is requesting" }, "type": { "type": "reference", "name": "Array", "typeArguments": [ { "type": "intrinsic", "name": "string" } ] }, "defaultValue": " DEFAULT_SCOPE.slice()" }, { "id": 899, "name": "appDomain", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "shortText": "the app domain" }, "type": { "type": "intrinsic", "name": "string" }, "defaultValue": " getGlobalObject('location', { returnEmptyObject: true }).origin" }, { "id": 900, "name": "redirectPath", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "shortText": "path on app domain to redirect users to after authentication" }, "type": { "type": "intrinsic", "name": "string" }, "defaultValue": "\"\"" }, { "id": 901, "name": "manifestPath", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "shortText": "path relative to app domain of app's manifest file" }, "type": { "type": "intrinsic", "name": "string" }, "defaultValue": "\"/manifest.json\"" }, { "id": 902, "name": "coreNode", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "shortText": "override the default or user selected core node" }, "type": { "type": "union", "types": [ { "type": "intrinsic", "name": "string" }, { "type": "intrinsic", "name": "null" } ] }, "defaultValue": " null" }, { "id": 903, "name": "authenticatorURL", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "shortText": "the web-based fall back authenticator\n([[DEFAULT_BLOCKSTACK_HOST]])\n" }, "type": { "type": "intrinsic", "name": "string" }, "defaultValue": " DEFAULT_BLOCKSTACK_HOST" } ], "type": { "type": "reference", "name": "AppConfig", "id": 889 } } ], "sources": [ { "fileName": "src/auth/appConfig.ts", "line": 59, "character": 27 } ] }, { "id": 890, "name": "appDomain", "kind": 1024, "kindString": "Property", "flags": { "isExported": true }, "comment": { "shortText": "Blockstack apps are uniquely identified by their app domain." }, "sources": [ { "fileName": "src/auth/appConfig.ts", "line": 20, "character": 11 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 895, "name": "authenticatorURL", "kind": 1024, "kindString": "Property", "flags": { "isExported": true, "isOptional": true }, "comment": { "shortText": "The URL of a web-based Blockstack Authenticator to use in the event\nthe user doesn't have Blockstack installed on their machine. If this\nis not specified, the current default in this library will be used." }, "sources": [ { "fileName": "src/auth/appConfig.ts", "line": 59, "character": 18 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 894, "name": "coreNode", "kind": 1024, "kindString": "Property", "flags": { "isExported": true }, "comment": { "shortText": "The URL of Blockstack core node to use for this app. If this is\n`null`, the core node specified by the user or default core node\nwill be used." }, "sources": [ { "fileName": "src/auth/appConfig.ts", "line": 51, "character": 10 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 893, "name": "manifestPath", "kind": 1024, "kindString": "Property", "flags": { "isExported": true }, "comment": { "shortText": "Path relative to app domain of app's manifest file.", "text": "This file needs to have CORS headers set so that it can be fetched\nfrom any origin. Typically this means return the header `Access-Control-Allow-Origin: *`.\n\n" }, "sources": [ { "fileName": "src/auth/appConfig.ts", "line": 43, "character": 14 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 892, "name": "redirectPath", "kind": 1024, "kindString": "Property", "flags": { "isExported": true }, "comment": { "shortText": "Path on app domain to redirect users to after authentication. The\nauthentication response token will be postpended in a query." }, "sources": [ { "fileName": "src/auth/appConfig.ts", "line": 34, "character": 14 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 891, "name": "scopes", "kind": 1024, "kindString": "Property", "flags": { "isExported": true }, "comment": { "shortText": "An array of string representing permissions requested by the app." }, "sources": [ { "fileName": "src/auth/appConfig.ts", "line": 26, "character": 8 } ], "type": { "type": "reference", "name": "Array", "typeArguments": [ { "type": "union", "types": [ { "type": "reference", "name": "AuthScope", "id": 1 }, { "type": "intrinsic", "name": "string" } ] } ] } }, { "id": 906, "name": "manifestURI", "kind": 2048, "kindString": "Method", "flags": { "isExported": true }, "signatures": [ { "id": 907, "name": "manifestURI", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "The location of the app's manifest file.", "returns": "- URI\n" }, "type": { "type": "intrinsic", "name": "string" } } ], "sources": [ { "fileName": "src/auth/appConfig.ts", "line": 97, "character": 13 } ] }, { "id": 904, "name": "redirectURI", "kind": 2048, "kindString": "Method", "flags": { "isExported": true }, "signatures": [ { "id": 905, "name": "redirectURI", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "The location to which the authenticator should\nredirect the user.", "returns": "- URI\n" }, "type": { "type": "intrinsic", "name": "string" } } ], "sources": [ { "fileName": "src/auth/appConfig.ts", "line": 89, "character": 13 } ] } ], "groups": [ { "title": "Constructors", "kind": 512, "children": [ 896 ] }, { "title": "Properties", "kind": 1024, "children": [ 890, 895, 894, 893, 892, 891 ] }, { "title": "Methods", "kind": 2048, "children": [ 906, 904 ] } ], "sources": [ { "fileName": "src/auth/appConfig.ts", "line": 15, "character": 22 } ] }, { "id": 408, "name": "BlockstackNetwork", "kind": 128, "kindString": "Class", "flags": { "isExported": true }, "comment": { "shortText": "Use the methods in class to build third-party wallets or in DApps that register names." }, "children": [ { "id": 420, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": { "isExported": true }, "signatures": [ { "id": 421, "name": "new BlockstackNetwork", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "parameters": [ { "id": 422, "name": "apiUrl", "kind": 32768, "kindString": "Parameter", "flags": {}, "type": { "type": "intrinsic", "name": "string" } }, { "id": 423, "name": "broadcastServiceUrl", "kind": 32768, "kindString": "Parameter", "flags": {}, "type": { "type": "intrinsic", "name": "string" } }, { "id": 424, "name": "bitcoinAPI", "kind": 32768, "kindString": "Parameter", "flags": {}, "type": { "type": "reference", "name": "BitcoinNetwork" } }, { "id": 425, "name": "network", "kind": 32768, "kindString": "Parameter", "flags": {}, "type": { "type": "reference", "name": "Network" }, "defaultValue": " networks.bitcoin" } ], "type": { "type": "reference", "name": "BlockstackNetwork", "id": 408 } } ], "sources": [ { "fileName": "src/network.ts", "line": 79, "character": 21 } ] }, { "id": 412, "name": "DUST_MINIMUM", "kind": 1024, "kindString": "Property", "flags": { "isExported": true }, "sources": [ { "fileName": "src/network.ts", "line": 71, "character": 14 } ], "type": { "type": "intrinsic", "name": "number" } }, { "id": 419, "name": "MAGIC_BYTES", "kind": 1024, "kindString": "Property", "flags": { "isExported": true }, "sources": [ { "fileName": "src/network.ts", "line": 79, "character": 13 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 409, "name": "blockstackAPIUrl", "kind": 1024, "kindString": "Property", "flags": { "isExported": true }, "sources": [ { "fileName": "src/network.ts", "line": 62, "character": 18 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 410, "name": "broadcastServiceUrl", "kind": 1024, "kindString": "Property", "flags": { "isExported": true }, "sources": [ { "fileName": "src/network.ts", "line": 64, "character": 21 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 418, "name": "btc", "kind": 1024, "kindString": "Property", "flags": { "isExported": true }, "sources": [ { "fileName": "src/network.ts", "line": 77, "character": 5 } ], "type": { "type": "reference", "name": "BitcoinNetwork" } }, { "id": 417, "name": "excludeUtxoSet", "kind": 1024, "kindString": "Property", "flags": { "isExported": true }, "sources": [ { "fileName": "src/network.ts", "line": 75, "character": 16 } ], "type": { "type": "array", "elementType": { "type": "reference", "name": "UTXO", "id": 382 } } }, { "id": 413, "name": "includeUtxoMap", "kind": 1024, "kindString": "Property", "flags": { "isExported": true }, "sources": [ { "fileName": "src/network.ts", "line": 73, "character": 16 } ], "type": { "type": "reflection", "declaration": { "id": 414, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "indexSignature": [ { "id": 415, "name": "__index", "kind": 8192, "kindString": "Index signature", "flags": {}, "parameters": [ { "id": 416, "name": "address", "kind": 32768, "kindString": "Parameter", "flags": {}, "type": { "type": "intrinsic", "name": "string" } } ], "type": { "type": "array", "elementType": { "type": "reference", "name": "UTXO", "id": 382 } } } ], "sources": [ { "fileName": "src/network.ts", "line": 73, "character": 17 } ] } } }, { "id": 499, "name": "broadcastNameRegistration", "kind": 2048, "kindString": "Method", "flags": { "isPrivate": true, "isExported": true }, "signatures": [ { "id": 500, "name": "broadcastNameRegistration", "kind": 4096, "kindString": "Call signature", "flags": { "isPrivate": true }, "comment": { "shortText": "Sends the preorder and registration transactions and zone file\nfor a Blockstack name registration along with the to the transaction\n broadcast service.", "text": "The transaction broadcast:\n\n* immediately broadcasts the preorder transaction\n* broadcasts the register transactions after the preorder transaction\nhas an appropriate number of confirmations\n* broadcasts the zone file to the Atlas network after the register transaction\nhas an appropriate number of confirmations\n\nThis is intended for use in third-party wallets or in DApps that register names.\n", "returns": "Returns a Promise that resolves to an object with a\n`transaction_hash` key containing the transaction hash of the broadcasted transaction.\n\nIn the event of an error, it rejects with:\n* a `RemoteServiceError` if there is a problem\n with the transaction broadcast service\n* `MissingParameterError` if you call the function without a required\n parameter" }, "parameters": [ { "id": 501, "name": "preorderTransaction", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "the hex-encoded, signed preorder transaction generated\nusing the `makePreorder` function" }, "type": { "type": "intrinsic", "name": "string" } }, { "id": 502, "name": "registerTransaction", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "the hex-encoded, signed register transaction generated\nusing the `makeRegister` function" }, "type": { "type": "intrinsic", "name": "string" } }, { "id": 503, "name": "zoneFile", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "the zone file to be broadcast to the Atlas network" }, "type": { "type": "intrinsic", "name": "string" } } ], "type": { "type": "reference", "name": "Promise", "typeArguments": [ { "type": "intrinsic", "name": "any" } ] } } ], "sources": [ { "fileName": "src/network.ts", "line": 815, "character": 27 } ] }, { "id": 486, "name": "broadcastServiceFetchHelper", "kind": 2048, "kindString": "Method", "flags": { "isPrivate": true, "isExported": true }, "signatures": [ { "id": 487, "name": "broadcastServiceFetchHelper", "kind": 4096, "kindString": "Call signature", "flags": { "isPrivate": true }, "comment": { "shortText": "Performs a POST request to the given URL. This is intended for\nuse in third-party wallets or in DApps that register names.", "returns": "Returns a `Promise` that resolves to the object requested.\nIn the event of an error, it rejects with:\n* a `RemoteServiceError` if there is a problem\nwith the transaction broadcast service\n* `MissingParameterError` if you call the function without a required\nparameter\n" }, "parameters": [ { "id": 488, "name": "endpoint", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "the name of" }, "type": { "type": "intrinsic", "name": "string" } }, { "id": 489, "name": "body", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": {}, "type": { "type": "intrinsic", "name": "any" } } ], "type": { "type": "reference", "name": "Promise", "typeArguments": [ { "type": "union", "types": [ { "type": "intrinsic", "name": "any" }, { "type": "reference", "name": "Error" } ] } ] } } ], "sources": [ { "fileName": "src/network.ts", "line": 628, "character": 29 } ] }, { "id": 490, "name": "broadcastTransaction", "kind": 2048, "kindString": "Method", "flags": { "isPrivate": true, "isExported": true }, "signatures": [ { "id": 491, "name": "broadcastTransaction", "kind": 4096, "kindString": "Call signature", "flags": { "isPrivate": true }, "comment": { "shortText": "Broadcasts a signed bitcoin transaction to the network optionally waiting to broadcast the\ntransaction until a second transaction has a certain number of confirmations.", "text": "This is intended for use in third-party wallets or in DApps that register names.\n", "returns": "Returns a Promise that resolves to an object with a\n`transaction_hash` key containing the transaction hash of the broadcasted transaction.\n\nIn the event of an error, it rejects with:\n* a `RemoteServiceError` if there is a problem\n with the transaction broadcast service\n* `MissingParameterError` if you call the function without a required\n parameter" }, "parameters": [ { "id": 492, "name": "transaction", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "the hex-encoded transaction to broadcast" }, "type": { "type": "intrinsic", "name": "string" } }, { "id": 493, "name": "transactionToWatch", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "the hex transaction id of the transaction to watch for\nthe specified number of confirmations before broadcasting the `transaction`" }, "type": { "type": "intrinsic", "name": "string" }, "defaultValue": " null" }, { "id": 494, "name": "confirmations", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "the number of confirmations `transactionToWatch` must have\nbefore broadcasting `transaction`." }, "type": { "type": "intrinsic", "name": "number" }, "defaultValue": "6" } ], "type": { "type": "reference", "name": "Promise", "typeArguments": [ { "type": "intrinsic", "name": "any" } ] } } ], "sources": [ { "fileName": "src/network.ts", "line": 672, "character": 22 } ] }, { "id": 495, "name": "broadcastZoneFile", "kind": 2048, "kindString": "Method", "flags": { "isPrivate": true, "isExported": true }, "signatures": [ { "id": 496, "name": "broadcastZoneFile", "kind": 4096, "kindString": "Call signature", "flags": { "isPrivate": true }, "comment": { "shortText": "Broadcasts a zone file to the Atlas network via the transaction broadcast service.\nThis is intended for use in third-party wallets or in DApps that register names.", "returns": "Returns a Promise that resolves to an object with a\n`transaction_hash` key containing the transaction hash of the broadcasted transaction.\n\nIn the event of an error, it rejects with:\n* a `RemoteServiceError` if there is a problem\n with the transaction broadcast service\n* `MissingParameterError` if you call the function without a required\n parameter" }, "parameters": [ { "id": 497, "name": "zoneFile", "kind": 32768, "kindString": "Parameter", "flags": { "isOptional": true }, "comment": { "text": "the zone file to be broadcast to the Atlas network" }, "type": { "type": "intrinsic", "name": "string" } }, { "id": 498, "name": "transactionToWatch", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "the hex transaction id of the transaction\nto watch for confirmation before broadcasting the zone file to the Atlas network" }, "type": { "type": "intrinsic", "name": "string" }, "defaultValue": " null" } ], "type": { "type": "reference", "name": "Promise", "typeArguments": [ { "type": "intrinsic", "name": "any" } ] } } ], "sources": [ { "fileName": "src/network.ts", "line": 728, "character": 19 } ] }, { "id": 475, "name": "getAccountAt", "kind": 2048, "kindString": "Method", "flags": { "isExported": true }, "signatures": [ { "id": 476, "name": "getAccountAt", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Get the state(s) of an account at a particular block height. This includes the state of the\naccount beginning with this block's transactions, as well as all of the states the account\npassed through when this block was processed (if any).", "text": "This is intended for use in third-party wallets or in DApps that register names.", "returns": "a promise that resolves to an Array of Objects, where each Object encodes\n states of the account at this block.\n" }, "parameters": [ { "id": 477, "name": "address", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "the account's address" }, "type": { "type": "intrinsic", "name": "string" } }, { "id": 478, "name": "blockHeight", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "the block to query" }, "type": { "type": "intrinsic", "name": "number" } } ], "type": { "type": "reference", "name": "Promise", "typeArguments": [ { "type": "array", "elementType": { "type": "intrinsic", "name": "any" } } ] } } ], "sources": [ { "fileName": "src/network.ts", "line": 527, "character": 14 } ] }, { "id": 482, "name": "getAccountBalance", "kind": 2048, "kindString": "Method", "flags": { "isExported": true }, "signatures": [ { "id": 483, "name": "getAccountBalance", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Get the number of tokens owned by an account. If the account does not exist or has no\ntokens of this type, then 0 will be returned.", "text": "This is intended for use in third-party wallets or in DApps that register names.", "returns": "a promise that resolves to a BigInteger that encodes the number of tokens\n held by this account.\n" }, "parameters": [ { "id": 484, "name": "address", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "the account's address" }, "type": { "type": "intrinsic", "name": "string" } }, { "id": 485, "name": "tokenType", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "the type of token to query." }, "type": { "type": "intrinsic", "name": "string" } } ], "type": { "type": "reference", "name": "Promise", "typeArguments": [ { "type": "reference", "name": "BN" } ] } } ], "sources": [ { "fileName": "src/network.ts", "line": 589, "character": 19 } ] }, { "id": 471, "name": "getAccountHistoryPage", "kind": 2048, "kindString": "Method", "flags": { "isExported": true }, "signatures": [ { "id": 472, "name": "getAccountHistoryPage", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Get a page of an account's transaction history. This is intended for use in\nthird-party wallets or in DApps that register names.", "returns": "a promise that resolves to an Array of Objects, where each Object encodes\n states of the account at various block heights (e.g. prior balances, txids, etc)\n" }, "parameters": [ { "id": 473, "name": "address", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "the account's address" }, "type": { "type": "intrinsic", "name": "string" } }, { "id": 474, "name": "page", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "the page number. Page 0 is the most recent transactions" }, "type": { "type": "intrinsic", "name": "number" } } ], "type": { "type": "reference", "name": "Promise", "typeArguments": [ { "type": "array", "elementType": { "type": "intrinsic", "name": "any" } } ] } } ], "sources": [ { "fileName": "src/network.ts", "line": 489, "character": 23 } ] }, { "id": 467, "name": "getAccountStatus", "kind": 2048, "kindString": "Method", "flags": { "isExported": true }, "signatures": [ { "id": 468, "name": "getAccountStatus", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Get the status of an account for a particular token holding. This includes its total number of\nexpenditures and credits, lockup times, last `txid`, and so on.", "text": "This is intended for use in third-party wallets or in DApps that register names.", "returns": "a promise that resolves to an object representing the state of the account\n for this token\n" }, "parameters": [ { "id": 469, "name": "address", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "the account" }, "type": { "type": "intrinsic", "name": "string" } }, { "id": 470, "name": "tokenType", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "the token type to query" }, "type": { "type": "intrinsic", "name": "string" } } ], "type": { "type": "reference", "name": "Promise", "typeArguments": [ { "type": "intrinsic", "name": "any" } ] } } ], "sources": [ { "fileName": "src/network.ts", "line": 459, "character": 18 } ] }, { "id": 479, "name": "getAccountTokens", "kind": 2048, "kindString": "Method", "flags": { "isExported": true }, "signatures": [ { "id": 480, "name": "getAccountTokens", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Get the set of token types that this account owns. This is intended for use\nin third-party wallets or in DApps that register names.", "returns": "a promise that resolves to an Array of Strings, where each item encodes the\n type of token this account holds (excluding the underlying blockchain's tokens)\n" }, "parameters": [ { "id": 481, "name": "address", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "the account's address" }, "type": { "type": "intrinsic", "name": "string" } } ], "type": { "type": "reference", "name": "Promise", "typeArguments": [ { "type": "reference", "name": "AccountTokens", "id": 390 } ] } } ], "sources": [ { "fileName": "src/network.ts", "line": 560, "character": 18 } ] }, { "id": 429, "name": "getDefaultBurnAddress", "kind": 2048, "kindString": "Method", "flags": { "isExported": true }, "signatures": [ { "id": 430, "name": "getDefaultBurnAddress", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "This is intended for use in third-party wallets or in DApps that register names." }, "type": { "type": "intrinsic", "name": "string" } } ], "sources": [ { "fileName": "src/network.ts", "line": 118, "character": 23 } ] }, { "id": 449, "name": "getGracePeriod", "kind": 2048, "kindString": "Method", "flags": { "isExported": true }, "signatures": [ { "id": 450, "name": "getGracePeriod", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "How many blocks can pass between a name expiring and the name being able to be\nre-registered by a different owner. This is intended for\nuse in third-party wallets or in DApps that register names.", "returns": "a promise to the number of blocks\n" }, "parameters": [ { "id": 451, "name": "_fullyQualifiedName", "kind": 32768, "kindString": "Parameter", "flags": { "isOptional": true }, "type": { "type": "intrinsic", "name": "string" } } ], "type": { "type": "reference", "name": "Promise", "typeArguments": [ { "type": "intrinsic", "name": "number" } ] } } ], "sources": [ { "fileName": "src/network.ts", "line": 304, "character": 16 } ] }, { "id": 458, "name": "getNameInfo", "kind": 2048, "kindString": "Method", "flags": { "isExported": true }, "signatures": [ { "id": 459, "name": "getNameInfo", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Get WHOIS-like information for a name, including the address that owns it,\nthe block at which it expires, and the zone file anchored to it (if available).", "text": "This is intended for use in third-party wallets or in DApps that register names.", "returns": "a promise that resolves to the WHOIS-like information\n" }, "parameters": [ { "id": 460, "name": "fullyQualifiedName", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "the name to query. Can be on-chain of off-chain." }, "type": { "type": "intrinsic", "name": "string" } } ], "type": { "type": "reference", "name": "Promise", "typeArguments": [ { "type": "intrinsic", "name": "any" } ] } } ], "sources": [ { "fileName": "src/network.ts", "line": 362, "character": 13 } ] }, { "id": 443, "name": "getNamePrice", "kind": 2048, "kindString": "Method", "flags": { "isExported": true }, "signatures": [ { "id": 444, "name": "getNamePrice", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Get the price of a name. This is intended for\nuse in third-party wallets or in DApps that register names.\nThis is intended for use in third-party wallets or in DApps that register names.", "returns": "a promise to an Object with { units: String, amount: BigInteger }, where\n .units encodes the cryptocurrency units to pay (e.g. BTC, STACKS), and\n .amount encodes the number of units, in the smallest denominiated amount\n (e.g. if .units is BTC, .amount will be satoshis; if .units is STACKS,\n .amount will be microStacks)\n" }, "parameters": [ { "id": 445, "name": "fullyQualifiedName", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "the name to query" }, "type": { "type": "intrinsic", "name": "string" } } ], "type": { "type": "reference", "name": "Promise", "typeArguments": [ { "type": "reference", "name": "PriceInfo", "id": 387 } ] } } ], "sources": [ { "fileName": "src/network.ts", "line": 275, "character": 14 } ] }, { "id": 431, "name": "getNamePriceV1", "kind": 2048, "kindString": "Method", "flags": { "isPrivate": true, "isExported": true }, "signatures": [ { "id": 432, "name": "getNamePriceV1", "kind": 4096, "kindString": "Call signature", "flags": { "isPrivate": true }, "comment": { "shortText": "Get the price of a name via the legacy /v1/prices API endpoint. This is\nintended for use in third-party wallets or in DApps that register names.", "returns": "a promise to an Object with { units: String, amount: BigInteger }" }, "parameters": [ { "id": 433, "name": "fullyQualifiedName", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "the name to query" }, "type": { "type": "intrinsic", "name": "string" } } ], "type": { "type": "reference", "name": "Promise", "typeArguments": [ { "type": "reference", "name": "PriceInfo", "id": 387 } ] } } ], "sources": [ { "fileName": "src/network.ts", "line": 129, "character": 16 } ] }, { "id": 437, "name": "getNamePriceV2", "kind": 2048, "kindString": "Method", "flags": { "isPrivate": true, "isExported": true }, "signatures": [ { "id": 438, "name": "getNamePriceV2", "kind": 4096, "kindString": "Call signature", "flags": { "isPrivate": true }, "comment": { "shortText": "Get the price of a name via the /v2/prices API endpoint. This is intended\nfor use in third-party wallets or in DApps that register names.", "returns": "a promise to an Object with { units: String, amount: BigInteger }" }, "parameters": [ { "id": 439, "name": "fullyQualifiedName", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "the name to query" }, "type": { "type": "intrinsic", "name": "string" } } ], "type": { "type": "reference", "name": "Promise", "typeArguments": [ { "type": "reference", "name": "PriceInfo", "id": 387 } ] } } ], "sources": [ { "fileName": "src/network.ts", "line": 196, "character": 16 } ] }, { "id": 452, "name": "getNamesOwned", "kind": 2048, "kindString": "Method", "flags": { "isExported": true }, "signatures": [ { "id": 453, "name": "getNamesOwned", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Get the names -- both on-chain and off-chain -- owned by an address. This is intended for\nuse in third-party wallets or in DApps that register names.", "returns": "a promise that resolves to a list of names (Strings)\n" }, "parameters": [ { "id": 454, "name": "address", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "the blockchain address (the hash of the owner public key)" }, "type": { "type": "intrinsic", "name": "string" } } ], "type": { "type": "reference", "name": "Promise", "typeArguments": [ { "type": "array", "elementType": { "type": "intrinsic", "name": "string" } } ] } } ], "sources": [ { "fileName": "src/network.ts", "line": 314, "character": 15 } ] }, { "id": 455, "name": "getNamespaceBurnAddress", "kind": 2048, "kindString": "Method", "flags": { "isExported": true }, "signatures": [ { "id": 456, "name": "getNamespaceBurnAddress", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Get the blockchain address to which a name's registration fee must be sent\n(the address will depend on the namespace in which it is registered.)", "text": "This is intended for use in third-party wallets or in DApps that register names.", "returns": "a promise that resolves to an address (String)\n" }, "parameters": [ { "id": 457, "name": "namespace", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "the namespace ID" }, "type": { "type": "intrinsic", "name": "string" } } ], "type": { "type": "reference", "name": "Promise", "typeArguments": [ { "type": "intrinsic", "name": "string" } ] } } ], "sources": [ { "fileName": "src/network.ts", "line": 329, "character": 25 } ] }, { "id": 461, "name": "getNamespaceInfo", "kind": 2048, "kindString": "Method", "flags": { "isExported": true }, "signatures": [ { "id": 462, "name": "getNamespaceInfo", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Get the pricing parameters and creation history of a namespace. This is intended for\nuse in third-party wallets or in DApps that register names.", "returns": "a promise that resolves to the namespace information.\n" }, "parameters": [ { "id": 463, "name": "namespaceID", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "the namespace to query" }, "type": { "type": "intrinsic", "name": "string" } } ], "type": { "type": "reference", "name": "Promise", "typeArguments": [ { "type": "intrinsic", "name": "any" } ] } } ], "sources": [ { "fileName": "src/network.ts", "line": 394, "character": 18 } ] }, { "id": 446, "name": "getNamespacePrice", "kind": 2048, "kindString": "Method", "flags": { "isExported": true }, "signatures": [ { "id": 447, "name": "getNamespacePrice", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Get the price of a namespace. This is intended for use in third-party\nwallets or in DApps that register names.", "returns": "a promise to an Object with { units: String, amount: BigInteger }, where\n .units encodes the cryptocurrency units to pay (e.g. BTC, STACKS), and\n .amount encodes the number of units, in the smallest denominiated amount\n (e.g. if .units is BTC, .amount will be satoshis; if .units is STACKS,\n .amount will be microStacks)\n" }, "parameters": [ { "id": 448, "name": "namespaceID", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "the namespace to query" }, "type": { "type": "intrinsic", "name": "string" } } ], "type": { "type": "reference", "name": "Promise", "typeArguments": [ { "type": "reference", "name": "PriceInfo", "id": 387 } ] } } ], "sources": [ { "fileName": "src/network.ts", "line": 291, "character": 19 } ] }, { "id": 434, "name": "getNamespacePriceV1", "kind": 2048, "kindString": "Method", "flags": { "isPrivate": true, "isExported": true }, "signatures": [ { "id": 435, "name": "getNamespacePriceV1", "kind": 4096, "kindString": "Call signature", "flags": { "isPrivate": true }, "comment": { "shortText": "Get the price of a namespace via the legacy /v1/prices API endpoint. This is intended for\nuse in third-party wallets or in DApps that register names.", "returns": "a promise to an Object with { units: String, amount: BigInteger }" }, "parameters": [ { "id": 436, "name": "namespaceID", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "the namespace to query" }, "type": { "type": "intrinsic", "name": "string" } } ], "type": { "type": "reference", "name": "Promise", "typeArguments": [ { "type": "reference", "name": "PriceInfo", "id": 387 } ] } } ], "sources": [ { "fileName": "src/network.ts", "line": 164, "character": 21 } ] }, { "id": 440, "name": "getNamespacePriceV2", "kind": 2048, "kindString": "Method", "flags": { "isPrivate": true, "isExported": true }, "signatures": [ {