PHP WebShell
Текущая директория: /opt/BitGoJS/node_modules/@aptos-labs/ts-sdk/dist/esm
Просмотр файла: chunk-GVNK3UMT.mjs.map
{"version":3,"sources":["../../src/internal/object.ts"],"sourcesContent":["import { AptosConfig } from \"../api/aptosConfig\";\nimport { AccountAddressInput, AccountAddress } from \"../core\";\nimport { PaginationArgs, OrderByArg, GetObjectDataQueryResponse, WhereArg } from \"../types\";\nimport { GetObjectDataQuery } from \"../types/generated/operations\";\nimport { GetObjectData } from \"../types/generated/queries\";\nimport { CurrentObjectsBoolExp } from \"../types/generated/types\";\nimport { queryIndexer } from \"./general\";\n\n/**\n * Retrieves the current objects based on specified filtering and pagination options.\n *\n * @param args - The arguments for retrieving object data.\n * @param args.aptosConfig - The configuration settings for Aptos.\n * @param [args.options] - Optional parameters for pagination and filtering.\n * @param [args.options.offset] - The number of items to skip before starting to collect the result set.\n * @param [args.options.limit] - The maximum number of items to return.\n * @param [args.options.orderBy] - The criteria for ordering the results.\n * @param [args.options.where] - The conditions to filter the results.\n * @returns The current objects that match the specified criteria.\n */\nexport async function getObjectData(args: {\n aptosConfig: AptosConfig;\n options?: PaginationArgs & OrderByArg<GetObjectDataQueryResponse[0]> & WhereArg<CurrentObjectsBoolExp>;\n}): Promise<GetObjectDataQueryResponse> {\n const { aptosConfig, options } = args;\n\n const graphqlQuery = {\n query: GetObjectData,\n variables: {\n where_condition: options?.where,\n offset: options?.offset,\n limit: options?.limit,\n order_by: options?.orderBy,\n },\n };\n const data = await queryIndexer<GetObjectDataQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getObjectData\",\n });\n\n return data.current_objects;\n}\n\n/**\n * Retrieves the object data associated with a specific object address.\n * This function allows you to access detailed information about an object in the Aptos blockchain.\n *\n * @param args - The arguments for retrieving object data.\n * @param args.aptosConfig - The configuration for connecting to the Aptos blockchain.\n * @param args.objectAddress - The address of the object whose data is being retrieved.\n * @param args.options - Optional parameters for pagination and ordering of the results.\n */\nexport async function getObjectDataByObjectAddress(args: {\n aptosConfig: AptosConfig;\n objectAddress: AccountAddressInput;\n options?: PaginationArgs & OrderByArg<GetObjectDataQueryResponse[0]>;\n}): Promise<GetObjectDataQueryResponse[0]> {\n const { aptosConfig, objectAddress, options } = args;\n const address = AccountAddress.from(objectAddress).toStringLong();\n\n const whereCondition: { object_address: { _eq: string } } = {\n object_address: { _eq: address },\n };\n return (await getObjectData({ aptosConfig, options: { ...options, where: whereCondition } }))[0];\n}\n"],"mappings":"2HAoBA,eAAsBA,EAAcC,EAGI,CACtC,GAAM,CAAE,YAAAC,EAAa,QAAAC,CAAQ,EAAIF,EAE3BG,EAAe,CACnB,MAAOC,EACP,UAAW,CACT,gBAAiBF,GAAS,MAC1B,OAAQA,GAAS,OACjB,MAAOA,GAAS,MAChB,SAAUA,GAAS,OACrB,CACF,EAOA,OANa,MAAMG,EAAiC,CAClD,YAAAJ,EACA,MAAOE,EACP,aAAc,eAChB,CAAC,GAEW,eACd,CAWA,eAAsBG,EAA6BN,EAIR,CACzC,GAAM,CAAE,YAAAC,EAAa,cAAAM,EAAe,QAAAL,CAAQ,EAAIF,EAG1CQ,EAAsD,CAC1D,eAAgB,CAAE,IAHJC,EAAe,KAAKF,CAAa,EAAE,aAAa,CAG/B,CACjC,EACA,OAAQ,MAAMR,EAAc,CAAE,YAAAE,EAAa,QAAS,CAAE,GAAGC,EAAS,MAAOM,CAAe,CAAE,CAAC,GAAG,CAAC,CACjG","names":["getObjectData","args","aptosConfig","options","graphqlQuery","GetObjectData","queryIndexer","getObjectDataByObjectAddress","objectAddress","whereCondition","AccountAddress"]}Выполнить команду
Для локальной разработки. Не используйте в интернете!