PHP WebShell
Текущая директория: /opt/BitGoJS/node_modules/@aptos-labs/ts-sdk/dist/esm
Просмотр файла: chunk-U6OCK6T4.mjs.map
{"version":3,"sources":["../../src/api/object.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AnyNumber, GetObjectDataQueryResponse, OrderByArg, PaginationArgs } from \"../types\";\nimport { AccountAddressInput } from \"../core\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { ProcessorType } from \"../utils\";\nimport { waitForIndexerOnVersion } from \"./utils\";\nimport { getObjectDataByObjectAddress } from \"../internal/object\";\n\n/**\n * A class to query all `Object` related queries on Aptos.\n */\nexport class AptosObject {\n /**\n * Creates an instance of the Aptos client with the provided configuration.\n * This allows interaction with the Aptos blockchain using the specified settings.\n *\n * @param config - The configuration settings for the Aptos client.\n * @param config.network - The network to connect to (e.g., mainnet, testnet).\n * @param config.nodeUrl - The URL of the Aptos node to connect to.\n * @param config.faucetUrl - The URL of the faucet for funding accounts (optional).\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a configuration for the Aptos client\n * const config = new AptosConfig({\n * network: Network.TESTNET, // Specify the desired network\n * nodeUrl: \"https://testnet.aptos.dev\", // Replace with your node URL\n * });\n *\n * // Create an instance of the Aptos client\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client created successfully\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n */\n constructor(readonly config: AptosConfig) {}\n\n /**\n * Fetches the object data based on the specified object address.\n *\n * @param args.objectAddress - The object address to retrieve data for.\n * @param args.minimumLedgerVersion - Optional minimum ledger version to wait for.\n * @param args.options - Optional configuration options for pagination and ordering.\n *\n * @returns The object data corresponding to the provided address.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching object data by object address\n * const objectData = await aptos.getObjectDataByObjectAddress({\n * objectAddress: \"0x1\", // replace with a real object address\n * });\n *\n * console.log(objectData);\n * }\n * runExample().catch(console.error);\n * ```\n */\n async getObjectDataByObjectAddress(args: {\n objectAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & OrderByArg<GetObjectDataQueryResponse[0]>;\n }): Promise<GetObjectDataQueryResponse[0]> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.OBJECT_PROCESSOR,\n });\n return getObjectDataByObjectAddress({\n aptosConfig: this.config,\n ...args,\n });\n }\n}\n"],"mappings":"kFAaO,IAAMA,EAAN,KAAkB,CA6BvB,YAAqBC,EAAqB,CAArB,YAAAA,CAAsB,CA6B3C,MAAM,6BAA6BC,EAIQ,CACzC,aAAMC,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBD,EAAK,qBAC3B,iCACF,CAAC,EACME,EAA6B,CAClC,YAAa,KAAK,OAClB,GAAGF,CACL,CAAC,CACH,CACF","names":["AptosObject","config","args","waitForIndexerOnVersion","getObjectDataByObjectAddress"]}Выполнить команду
Для локальной разработки. Не используйте в интернете!