@sentio/sdk 2.57.12-rc.j → 2.57.13-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/core/template.d.ts +1 -5
- package/lib/core/template.d.ts.map +1 -1
- package/lib/core/template.js +1 -4
- package/lib/core/template.js.map +1 -1
- package/lib/store/store.d.ts +2 -2
- package/lib/store/store.d.ts.map +1 -1
- package/lib/store/store.js.map +1 -1
- package/package.json +3 -3
- package/src/core/template.ts +1 -6
- package/src/store/store.ts +2 -3
- package/lib/chunk-2F2KNF4Z.js +0 -71905
- package/lib/chunk-2F2KNF4Z.js.map +0 -1
- package/lib/chunk-43HP4DQZ.js +0 -47
- package/lib/chunk-43HP4DQZ.js.map +0 -1
- package/lib/chunk-4HPFNKDX.js +0 -6763
- package/lib/chunk-4HPFNKDX.js.map +0 -1
- package/lib/chunk-4OCWUYSJ.js +0 -898
- package/lib/chunk-4OCWUYSJ.js.map +0 -1
- package/lib/chunk-6UVWNOIX.js +0 -4207
- package/lib/chunk-6UVWNOIX.js.map +0 -1
- package/lib/chunk-73SHERGU.js +0 -23970
- package/lib/chunk-73SHERGU.js.map +0 -1
- package/lib/chunk-742S42NO.js +0 -1323
- package/lib/chunk-742S42NO.js.map +0 -1
- package/lib/chunk-7ECRTQD7.js +0 -26757
- package/lib/chunk-7ECRTQD7.js.map +0 -1
- package/lib/chunk-7IDGS56O.js +0 -5058
- package/lib/chunk-7IDGS56O.js.map +0 -1
- package/lib/chunk-7S6WQ4RL.js +0 -1069
- package/lib/chunk-7S6WQ4RL.js.map +0 -1
- package/lib/chunk-AZFMPZRN.js +0 -3613
- package/lib/chunk-AZFMPZRN.js.map +0 -1
- package/lib/chunk-BZCXYTDE.js +0 -1333
- package/lib/chunk-BZCXYTDE.js.map +0 -1
- package/lib/chunk-E2DS6WZF.js +0 -1690
- package/lib/chunk-E2DS6WZF.js.map +0 -1
- package/lib/chunk-GE6BRIGS.js +0 -1721
- package/lib/chunk-GE6BRIGS.js.map +0 -1
- package/lib/chunk-J3I3VNTV.js +0 -767
- package/lib/chunk-J3I3VNTV.js.map +0 -1
- package/lib/chunk-J3QOJ2RV.js +0 -661
- package/lib/chunk-J3QOJ2RV.js.map +0 -1
- package/lib/chunk-J5UEW4B7.js +0 -1351
- package/lib/chunk-J5UEW4B7.js.map +0 -1
- package/lib/chunk-LPSNAS2G.js +0 -460
- package/lib/chunk-LPSNAS2G.js.map +0 -1
- package/lib/chunk-LR232ZJV.js +0 -2593
- package/lib/chunk-LR232ZJV.js.map +0 -1
- package/lib/chunk-N36N7RXJ.js +0 -653
- package/lib/chunk-N36N7RXJ.js.map +0 -1
- package/lib/chunk-OJG2VJ5T.js +0 -7063
- package/lib/chunk-OJG2VJ5T.js.map +0 -1
- package/lib/chunk-ONBEMKI5.js +0 -323
- package/lib/chunk-ONBEMKI5.js.map +0 -1
- package/lib/chunk-PVX2LIM5.js +0 -205
- package/lib/chunk-PVX2LIM5.js.map +0 -1
- package/lib/chunk-R7PMHHKJ.js +0 -52
- package/lib/chunk-R7PMHHKJ.js.map +0 -1
- package/lib/chunk-RMT2JEWA.js +0 -7740
- package/lib/chunk-RMT2JEWA.js.map +0 -1
- package/lib/chunk-S6MJ3KIL.js +0 -27798
- package/lib/chunk-S6MJ3KIL.js.map +0 -1
- package/lib/chunk-UEFVZL4I.js +0 -199
- package/lib/chunk-UEFVZL4I.js.map +0 -1
- package/lib/chunk-UIBPOKNT.js +0 -945
- package/lib/chunk-UIBPOKNT.js.map +0 -1
- package/lib/chunk-ZR7UHHH2.js +0 -5
- package/lib/chunk-ZR7UHHH2.js.map +0 -1
- package/lib/multipart-parser-SQIYSR67.js +0 -368
- package/lib/multipart-parser-SQIYSR67.js.map +0 -1
- package/src/aptos/builtin/0x1.d.ts +0 -6451
- package/src/aptos/builtin/0x1.d.ts.map +0 -1
- package/src/aptos/builtin/0x1.js +0 -7138
- package/src/aptos/builtin/0x1.js.map +0 -1
- package/src/aptos/builtin/0x3.d.ts +0 -1122
- package/src/aptos/builtin/0x3.d.ts.map +0 -1
- package/src/aptos/builtin/0x3.js +0 -937
- package/src/aptos/builtin/0x3.js.map +0 -1
- package/src/aptos/builtin/0x4.d.ts +0 -551
- package/src/aptos/builtin/0x4.d.ts.map +0 -1
- package/src/aptos/builtin/0x4.js +0 -529
- package/src/aptos/builtin/0x4.js.map +0 -1
- package/src/aptos/builtin/index.d.ts +0 -4
- package/src/aptos/builtin/index.d.ts.map +0 -1
- package/src/aptos/builtin/index.js +0 -7
- package/src/aptos/builtin/index.js.map +0 -1
- package/src/eth/builtin/eacaggregatorproxy.d.ts +0 -5
- package/src/eth/builtin/eacaggregatorproxy.d.ts.map +0 -1
- package/src/eth/builtin/eacaggregatorproxy.js +0 -8
- package/src/eth/builtin/eacaggregatorproxy.js.map +0 -1
- package/src/eth/builtin/erc1155.d.ts +0 -5
- package/src/eth/builtin/erc1155.d.ts.map +0 -1
- package/src/eth/builtin/erc1155.js +0 -8
- package/src/eth/builtin/erc1155.js.map +0 -1
- package/src/eth/builtin/erc20.d.ts +0 -5
- package/src/eth/builtin/erc20.d.ts.map +0 -1
- package/src/eth/builtin/erc20.js +0 -8
- package/src/eth/builtin/erc20.js.map +0 -1
- package/src/eth/builtin/erc20bytes.d.ts +0 -5
- package/src/eth/builtin/erc20bytes.d.ts.map +0 -1
- package/src/eth/builtin/erc20bytes.js +0 -8
- package/src/eth/builtin/erc20bytes.js.map +0 -1
- package/src/eth/builtin/erc721.d.ts +0 -5
- package/src/eth/builtin/erc721.d.ts.map +0 -1
- package/src/eth/builtin/erc721.js +0 -8
- package/src/eth/builtin/erc721.js.map +0 -1
- package/src/eth/builtin/index.d.ts +0 -13
- package/src/eth/builtin/index.d.ts.map +0 -1
- package/src/eth/builtin/index.js +0 -16
- package/src/eth/builtin/index.js.map +0 -1
- package/src/eth/builtin/internal/EACAggregatorProxy.d.ts +0 -50
- package/src/eth/builtin/internal/EACAggregatorProxy.d.ts.map +0 -1
- package/src/eth/builtin/internal/EACAggregatorProxy.js +0 -2
- package/src/eth/builtin/internal/EACAggregatorProxy.js.map +0 -1
- package/src/eth/builtin/internal/ERC1155.d.ts +0 -57
- package/src/eth/builtin/internal/ERC1155.d.ts.map +0 -1
- package/src/eth/builtin/internal/ERC1155.js +0 -2
- package/src/eth/builtin/internal/ERC1155.js.map +0 -1
- package/src/eth/builtin/internal/ERC20.d.ts +0 -41
- package/src/eth/builtin/internal/ERC20.d.ts.map +0 -1
- package/src/eth/builtin/internal/ERC20.js +0 -2
- package/src/eth/builtin/internal/ERC20.js.map +0 -1
- package/src/eth/builtin/internal/ERC20Bytes.d.ts +0 -32
- package/src/eth/builtin/internal/ERC20Bytes.d.ts.map +0 -1
- package/src/eth/builtin/internal/ERC20Bytes.js +0 -2
- package/src/eth/builtin/internal/ERC20Bytes.js.map +0 -1
- package/src/eth/builtin/internal/ERC721.d.ts +0 -43
- package/src/eth/builtin/internal/ERC721.d.ts.map +0 -1
- package/src/eth/builtin/internal/ERC721.js +0 -2
- package/src/eth/builtin/internal/ERC721.js.map +0 -1
- package/src/eth/builtin/internal/WETH9.d.ts +0 -47
- package/src/eth/builtin/internal/WETH9.d.ts.map +0 -1
- package/src/eth/builtin/internal/WETH9.js +0 -2
- package/src/eth/builtin/internal/WETH9.js.map +0 -1
- package/src/eth/builtin/internal/common.d.ts +0 -3
- package/src/eth/builtin/internal/common.d.ts.map +0 -1
- package/src/eth/builtin/internal/common.js +0 -8
- package/src/eth/builtin/internal/common.js.map +0 -1
- package/src/eth/builtin/internal/eacaggregatorproxy-processor.d.ts +0 -373
- package/src/eth/builtin/internal/eacaggregatorproxy-processor.d.ts.map +0 -1
- package/src/eth/builtin/internal/eacaggregatorproxy-processor.js +0 -1355
- package/src/eth/builtin/internal/eacaggregatorproxy-processor.js.map +0 -1
- package/src/eth/builtin/internal/eacaggregatorproxy-test-utils.d.ts +0 -7
- package/src/eth/builtin/internal/eacaggregatorproxy-test-utils.d.ts.map +0 -1
- package/src/eth/builtin/internal/eacaggregatorproxy-test-utils.js +0 -55
- package/src/eth/builtin/internal/eacaggregatorproxy-test-utils.js.map +0 -1
- package/src/eth/builtin/internal/erc1155-processor.d.ts +0 -173
- package/src/eth/builtin/internal/erc1155-processor.d.ts.map +0 -1
- package/src/eth/builtin/internal/erc1155-processor.js +0 -596
- package/src/eth/builtin/internal/erc1155-processor.js.map +0 -1
- package/src/eth/builtin/internal/erc1155-test-utils.d.ts +0 -7
- package/src/eth/builtin/internal/erc1155-test-utils.d.ts.map +0 -1
- package/src/eth/builtin/internal/erc1155-test-utils.js +0 -55
- package/src/eth/builtin/internal/erc1155-test-utils.js.map +0 -1
- package/src/eth/builtin/internal/erc20-processor.d.ts +0 -244
- package/src/eth/builtin/internal/erc20-processor.d.ts.map +0 -1
- package/src/eth/builtin/internal/erc20-processor.js +0 -1109
- package/src/eth/builtin/internal/erc20-processor.js.map +0 -1
- package/src/eth/builtin/internal/erc20-test-utils.d.ts +0 -6
- package/src/eth/builtin/internal/erc20-test-utils.d.ts.map +0 -1
- package/src/eth/builtin/internal/erc20-test-utils.js +0 -44
- package/src/eth/builtin/internal/erc20-test-utils.js.map +0 -1
- package/src/eth/builtin/internal/erc20bytes-processor.d.ts +0 -144
- package/src/eth/builtin/internal/erc20bytes-processor.d.ts.map +0 -1
- package/src/eth/builtin/internal/erc20bytes-processor.js +0 -594
- package/src/eth/builtin/internal/erc20bytes-processor.js.map +0 -1
- package/src/eth/builtin/internal/erc20bytes-test-utils.d.ts +0 -5
- package/src/eth/builtin/internal/erc20bytes-test-utils.d.ts.map +0 -1
- package/src/eth/builtin/internal/erc20bytes-test-utils.js +0 -33
- package/src/eth/builtin/internal/erc20bytes-test-utils.js.map +0 -1
- package/src/eth/builtin/internal/erc721-processor.d.ts +0 -215
- package/src/eth/builtin/internal/erc721-processor.d.ts.map +0 -1
- package/src/eth/builtin/internal/erc721-processor.js +0 -895
- package/src/eth/builtin/internal/erc721-processor.js.map +0 -1
- package/src/eth/builtin/internal/erc721-test-utils.d.ts +0 -6
- package/src/eth/builtin/internal/erc721-test-utils.d.ts.map +0 -1
- package/src/eth/builtin/internal/erc721-test-utils.js +0 -44
- package/src/eth/builtin/internal/erc721-test-utils.js.map +0 -1
- package/src/eth/builtin/internal/factories/EACAggregatorProxy__factory.d.ts +0 -400
- package/src/eth/builtin/internal/factories/EACAggregatorProxy__factory.d.ts.map +0 -1
- package/src/eth/builtin/internal/factories/EACAggregatorProxy__factory.js +0 -524
- package/src/eth/builtin/internal/factories/EACAggregatorProxy__factory.js.map +0 -1
- package/src/eth/builtin/internal/factories/ERC1155__factory.d.ts +0 -251
- package/src/eth/builtin/internal/factories/ERC1155__factory.d.ts.map +0 -1
- package/src/eth/builtin/internal/factories/ERC1155__factory.js +0 -329
- package/src/eth/builtin/internal/factories/ERC1155__factory.js.map +0 -1
- package/src/eth/builtin/internal/factories/ERC20Bytes__factory.d.ts +0 -185
- package/src/eth/builtin/internal/factories/ERC20Bytes__factory.d.ts.map +0 -1
- package/src/eth/builtin/internal/factories/ERC20Bytes__factory.js +0 -251
- package/src/eth/builtin/internal/factories/ERC20Bytes__factory.js.map +0 -1
- package/src/eth/builtin/internal/factories/ERC20__factory.d.ts +0 -303
- package/src/eth/builtin/internal/factories/ERC20__factory.d.ts.map +0 -1
- package/src/eth/builtin/internal/factories/ERC20__factory.js +0 -401
- package/src/eth/builtin/internal/factories/ERC20__factory.js.map +0 -1
- package/src/eth/builtin/internal/factories/ERC721__factory.d.ts +0 -273
- package/src/eth/builtin/internal/factories/ERC721__factory.d.ts.map +0 -1
- package/src/eth/builtin/internal/factories/ERC721__factory.js +0 -361
- package/src/eth/builtin/internal/factories/ERC721__factory.js.map +0 -1
- package/src/eth/builtin/internal/factories/WETH9__factory.d.ts +0 -220
- package/src/eth/builtin/internal/factories/WETH9__factory.d.ts.map +0 -1
- package/src/eth/builtin/internal/factories/WETH9__factory.js +0 -294
- package/src/eth/builtin/internal/factories/WETH9__factory.js.map +0 -1
- package/src/eth/builtin/internal/factories/index.d.ts +0 -7
- package/src/eth/builtin/internal/factories/index.d.ts.map +0 -1
- package/src/eth/builtin/internal/factories/index.js +0 -10
- package/src/eth/builtin/internal/factories/index.js.map +0 -1
- package/src/eth/builtin/internal/index.d.ts +0 -14
- package/src/eth/builtin/internal/index.d.ts.map +0 -1
- package/src/eth/builtin/internal/index.js +0 -8
- package/src/eth/builtin/internal/index.js.map +0 -1
- package/src/eth/builtin/internal/weth9-processor.d.ts +0 -172
- package/src/eth/builtin/internal/weth9-processor.d.ts.map +0 -1
- package/src/eth/builtin/internal/weth9-processor.js +0 -729
- package/src/eth/builtin/internal/weth9-processor.js.map +0 -1
- package/src/eth/builtin/internal/weth9-test-utils.d.ts +0 -7
- package/src/eth/builtin/internal/weth9-test-utils.d.ts.map +0 -1
- package/src/eth/builtin/internal/weth9-test-utils.js +0 -55
- package/src/eth/builtin/internal/weth9-test-utils.js.map +0 -1
- package/src/eth/builtin/weth9.d.ts +0 -5
- package/src/eth/builtin/weth9.d.ts.map +0 -1
- package/src/eth/builtin/weth9.js +0 -8
- package/src/eth/builtin/weth9.js.map +0 -1
- package/src/solana/builtin/index.d.ts +0 -2
- package/src/solana/builtin/index.d.ts.map +0 -1
- package/src/solana/builtin/index.js +0 -2
- package/src/solana/builtin/index.js.map +0 -1
- package/src/solana/builtin/spl-token-processor.d.ts +0 -40
- package/src/solana/builtin/spl-token-processor.d.ts.map +0 -1
- package/src/solana/builtin/spl-token-processor.js +0 -254
- package/src/solana/builtin/spl-token-processor.js.map +0 -1
- package/src/solana/builtin/types.d.ts +0 -428
- package/src/solana/builtin/types.d.ts.map +0 -1
- package/src/solana/builtin/types.js +0 -201
- package/src/solana/builtin/types.js.map +0 -1
- package/src/sui/builtin/0x1.d.ts +0 -114
- package/src/sui/builtin/0x1.d.ts.map +0 -1
- package/src/sui/builtin/0x1.js +0 -159
- package/src/sui/builtin/0x1.js.map +0 -1
- package/src/sui/builtin/0x2.d.ts +0 -1250
- package/src/sui/builtin/0x2.d.ts.map +0 -1
- package/src/sui/builtin/0x2.js +0 -1511
- package/src/sui/builtin/0x2.js.map +0 -1
- package/src/sui/builtin/0x3.d.ts +0 -774
- package/src/sui/builtin/0x3.d.ts.map +0 -1
- package/src/sui/builtin/0x3.js +0 -720
- package/src/sui/builtin/0x3.js.map +0 -1
- package/src/sui/builtin/index.d.ts +0 -4
- package/src/sui/builtin/index.d.ts.map +0 -1
- package/src/sui/builtin/index.js +0 -7
- package/src/sui/builtin/index.js.map +0 -1
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../src/move/filter.ts","../src/move/move-context.ts","../../../node_modules/.pnpm/radash@12.1.0/node_modules/radash/src/string.ts","../../../node_modules/.pnpm/@typemove+move@1.9.0/node_modules/@typemove/move/src/utils.ts","../../../node_modules/.pnpm/@typemove+move@1.9.0/node_modules/@typemove/move/src/types.ts","../../../node_modules/.pnpm/@typemove+move@1.9.0/node_modules/@typemove/move/src/account.ts","../../../node_modules/.pnpm/@typemove+move@1.9.0/node_modules/@typemove/move/src/chain-adapter.ts","../../../node_modules/.pnpm/@typemove+move@1.9.0/node_modules/@typemove/move/src/abstract-move-coder.ts","../../../node_modules/.pnpm/@typemove+move@1.9.0/node_modules/@typemove/move/src/internal-models.ts","../src/move/index.ts"],"sourcesContent":["// TODO extends ArgumentsFilter\nimport {\n Data_AptCall,\n Data_AptResource,\n HandleInterval,\n MoveAccountFetchConfig,\n MoveFetchConfig,\n ProcessResult\n} from '@sentio/protos'\n\nexport interface EventFilter {\n type: string\n account?: string\n eventAccount?: string\n}\n\nexport interface FunctionNameAndCallFilter extends CallFilter {\n function: string\n}\n\nexport interface TransactionFilter {\n includeFailed?: boolean\n publicKeyPrefix?: string\n fromAndToAddress?: { from: string; to: string }\n}\n\n// TODO extends ArgumentsFilter\nexport interface CallFilter extends TransactionFilter {\n typeArguments?: string[]\n}\n\nexport interface ArgumentsFilter {\n arguments?: string[]\n}\n\nexport class EventHandler<T> {\n filters: EventFilter[]\n handlerName: string\n handler: (event: T) => Promise<ProcessResult>\n fetchConfig: MoveFetchConfig\n}\n\nexport class CallHandler<T> {\n filters: FunctionNameAndCallFilter[]\n handlerName: string\n handler: (call: T) => Promise<ProcessResult>\n fetchConfig: MoveFetchConfig\n}\n\nexport class ObjectChangeHandler<T> {\n handlerName: string\n handler: (call: T) => Promise<ProcessResult>\n type: string\n}\n\nexport class ResourceChangeHandler<T> {\n handlerName: string\n handler: (call: T) => Promise<ProcessResult>\n type: string\n}\n\nexport class ResourceIntervalHandler {\n type?: string\n versionInterval?: HandleInterval\n timeIntervalInMinutes?: HandleInterval\n handler: (resource: Data_AptResource) => Promise<ProcessResult>\n handlerName: string\n fetchConfig: MoveAccountFetchConfig\n}\n\nexport class TransactionIntervalHandler {\n versionInterval?: HandleInterval\n timeIntervalInMinutes?: HandleInterval\n handler: (tx: Data_AptCall) => Promise<ProcessResult>\n handlerName: string\n fetchConfig: MoveFetchConfig\n}\n;import(\"node:process\").then((p) => p.stdout.write(\"\"));","import { BaseContext } from '../core/index.js'\nimport { AbstractMoveCoder } from '@typemove/move'\n\nexport abstract class MoveContext<Network, ModuleType, StructType> extends BaseContext {\n address: string\n coder: AbstractMoveCoder<ModuleType, StructType>\n network: Network\n\n abstract getTimestamp(): number\n}\n\nexport abstract class MoveAccountContext<Network, ModuleType, StructType> extends BaseContext {\n address: string\n coder: AbstractMoveCoder<ModuleType, StructType>\n network: Network\n\n abstract getTimestamp(): number\n}\n;import(\"node:process\").then((p) => p.stdout.write(\"\"));","/**\n * Capitalize the first word of the string\n *\n * capitalize('hello') -> 'Hello'\n * capitalize('va va voom') -> 'Va va voom'\n */\nexport const capitalize = (str: string): string => {\n if (!str || str.length === 0) return ''\n const lower = str.toLowerCase()\n return lower.substring(0, 1).toUpperCase() + lower.substring(1, lower.length)\n}\n\n/**\n * Formats the given string in camel case fashion\n *\n * camel('hello world') -> 'helloWorld'\n * camel('va va-VOOM') -> 'vaVaVoom'\n * camel('helloWorld') -> 'helloWorld'\n */\nexport const camel = (str: string): string => {\n const parts =\n str\n ?.replace(/([A-Z])+/g, capitalize)\n ?.split(/(?=[A-Z])|[\\.\\-\\s_]/)\n .map(x => x.toLowerCase()) ?? []\n if (parts.length === 0) return ''\n if (parts.length === 1) return parts[0]\n return parts.reduce((acc, part) => {\n return `${acc}${part.charAt(0).toUpperCase()}${part.slice(1)}`\n })\n}\n\n/**\n * Formats the given string in snake case fashion\n *\n * snake('hello world') -> 'hello_world'\n * snake('va va-VOOM') -> 'va_va_voom'\n * snake('helloWord') -> 'hello_world'\n */\nexport const snake = (\n str: string,\n options?: {\n splitOnNumber?: boolean\n }\n): string => {\n const parts =\n str\n ?.replace(/([A-Z])+/g, capitalize)\n .split(/(?=[A-Z])|[\\.\\-\\s_]/)\n .map(x => x.toLowerCase()) ?? []\n if (parts.length === 0) return ''\n if (parts.length === 1) return parts[0]\n const result = parts.reduce((acc, part) => {\n return `${acc}_${part.toLowerCase()}`\n })\n return options?.splitOnNumber === false\n ? result\n : result.replace(/([A-Za-z]{1}[0-9]{1})/, val => `${val[0]!}_${val[1]!}`)\n}\n\n/**\n * Formats the given string in dash case fashion\n *\n * dash('hello world') -> 'hello-world'\n * dash('va va_VOOM') -> 'va-va-voom'\n * dash('helloWord') -> 'hello-word'\n */\nexport const dash = (str: string): string => {\n const parts =\n str\n ?.replace(/([A-Z])+/g, capitalize)\n ?.split(/(?=[A-Z])|[\\.\\-\\s_]/)\n .map(x => x.toLowerCase()) ?? []\n if (parts.length === 0) return ''\n if (parts.length === 1) return parts[0]\n return parts.reduce((acc, part) => {\n return `${acc}-${part.toLowerCase()}`\n })\n}\n\n/**\n * Formats the given string in pascal case fashion\n *\n * pascal('hello world') -> 'HelloWorld'\n * pascal('va va boom') -> 'VaVaBoom'\n */\nexport const pascal = (str: string): string => {\n const parts = str?.split(/[\\.\\-\\s_]/).map(x => x.toLowerCase()) ?? []\n if (parts.length === 0) return ''\n return parts.map(str => str.charAt(0).toUpperCase() + str.slice(1)).join('')\n}\n\n/**\n * Formats the given string in title case fashion\n *\n * title('hello world') -> 'Hello World'\n * title('va_va_boom') -> 'Va Va Boom'\n * title('root-hook') -> 'Root Hook'\n * title('queryItems') -> 'Query Items'\n */\nexport const title = (str: string | null | undefined): string => {\n if (!str) return ''\n return str\n .split(/(?=[A-Z])|[\\.\\-\\s_]/)\n .map(s => s.trim())\n .filter(s => !!s)\n .map(s => capitalize(s.toLowerCase()))\n .join(' ')\n}\n\n/**\n * template is used to replace data by name in template strings.\n * The default expression looks for {{name}} to identify names.\n *\n * Ex. template('Hello, {{name}}', { name: 'ray' })\n * Ex. template('Hello, <name>', { name: 'ray' }, /<(.+?)>/g)\n */\nexport const template = (\n str: string,\n data: Record<string, any>,\n regex = /\\{\\{(.+?)\\}\\}/g\n) => {\n return Array.from(str.matchAll(regex)).reduce((acc, match) => {\n return acc.replace(match[0], data[match[1]])\n }, str)\n}\n\n/**\n * Trims all prefix and suffix characters from the given\n * string. Like the builtin trim function but accepts\n * other characters you would like to trim and trims\n * multiple characters.\n *\n * ```typescript\n * trim(' hello ') // => 'hello'\n * trim('__hello__', '_') // => 'hello'\n * trim('/repos/:owner/:repo/', '/') // => 'repos/:owner/:repo'\n * trim('222222__hello__1111111', '12_') // => 'hello'\n * ```\n */\nexport const trim = (\n str: string | null | undefined,\n charsToTrim: string = ' '\n) => {\n if (!str) return ''\n const toTrim = charsToTrim.replace(/[\\W]{1}/g, '\\\\$&')\n const regex = new RegExp(`^[${toTrim}]+|[${toTrim}]+$`, 'g')\n return str.replace(regex, '')\n}\n","import { InternalMoveModule, InternalMoveStruct } from './internal-models.js'\nimport { camel as camelRadash } from 'radash'\n\nexport const SPLITTER = '::'\n\nexport const VECTOR_STR = 'vector'\n\nexport function isFrameworkAccount(account: string) {\n const n = parseInt(account, 16)\n if (Number.isNaN(n)) {\n return false\n }\n return n >= 0 && n < 16\n}\n\n// strip any lead 0\nexport function accountTypeString(account: string): string {\n const withoutPrefix = account.toLowerCase().replace(/^(0x)/, '')\n return '0x' + withoutPrefix.replace(/^0*/, '')\n}\n\nconst MOVE_ADDRESS_LENGTH = 32\n\nfunction isHex(value: string): boolean {\n return /^(0x|0X)?[a-fA-F0-9]+$/.test(value)\n}\n\nfunction getHexByteLength(value: string): number {\n return /^(0x|0X)/.test(value) ? (value.length - 2) / 2 : value.length / 2\n}\n\nexport function isValidMoveAddress(value: string): boolean {\n return isHex(value) && getHexByteLength(value) <= MOVE_ADDRESS_LENGTH\n}\n\n// Get full address with 32 bytes\nexport function accountAddressString(account: string): string {\n if (!isValidMoveAddress(account)) {\n throw Error('Not valid move address')\n }\n\n const address = account.toLowerCase().replace(/^(0x)/, '')\n return `0x${address.padStart(MOVE_ADDRESS_LENGTH * 2, '0')}`\n}\n\n// https://github.com/microsoft/TypeScript/issues/2536\nconst KEYWORDS = new Set([\n 'break',\n 'case',\n 'catch',\n 'class',\n 'const',\n 'continue',\n 'debugger',\n 'default',\n 'delete',\n 'do',\n 'else',\n 'enum',\n 'export',\n 'extends',\n 'false',\n 'finally',\n 'for',\n 'function',\n 'if',\n 'import',\n 'in',\n 'instanceof',\n 'new',\n 'null',\n 'return',\n 'super',\n 'switch',\n 'this',\n 'throw',\n 'true',\n 'try',\n 'typeof',\n 'var',\n 'void',\n 'while',\n 'with',\n 'as',\n 'implements',\n 'interface',\n 'let',\n 'package',\n 'private',\n 'protected',\n 'public',\n 'static',\n 'yield',\n 'any',\n 'boolean',\n 'constructor',\n 'declare',\n // 'get',\n 'module',\n // 'require',\n 'number',\n // 'set',\n 'string',\n 'symbol',\n 'type',\n 'from',\n // 'of',\n 'async',\n 'await',\n 'bigint',\n 'object',\n 'volatile',\n 'namespace'\n])\n\nexport function normalizeToJSName(name: string) {\n if (KEYWORDS.has(name)) {\n return name + '$'\n }\n return name\n}\n\nexport function moduleQnameForType(type: string): [string, string] {\n const parts = type.split(SPLITTER).slice(0, 2)\n return [parts[0], parts[1]]\n}\n\nexport function moduleQname(module: { address: string; name: string }): string {\n return accountTypeString(module.address) + SPLITTER + module.name\n}\n\nexport function structQname(module: InternalMoveModule, struct: InternalMoveStruct): string {\n return [accountTypeString(module.address), module.name, struct.name].join(SPLITTER)\n}\n\nexport function upperFirst(str: string): string {\n return str.charAt(0).toUpperCase() + str.slice(1)\n}\n\nexport function camel(str: string): string {\n const base = camelRadash(str)\n return str.endsWith('_') ? base + '_' : base\n}\n","import { accountTypeString, SPLITTER, VECTOR_STR } from './utils.js'\n\nexport type DecodedStruct<B, T> = B & {\n /**\n * decoded data using ABI, undefined if there is decoding error, usually because the ABI/data mismatch\n */\n data_decoded: T\n type_arguments: string[]\n}\n\nexport type NestedDecodedStruct<A, B extends { data: A }, T> = B & {\n data: DecodedStruct<A, T>\n}\n\nexport class TypeDescriptor<T = any> {\n qname: string\n reference: boolean\n mutable: boolean\n typeArgs: TypeDescriptor[]\n\n constructor(symbol: string, typeParams?: TypeDescriptor[]) {\n this.qname = symbol\n this.reference = false\n this.mutable = false\n this.typeArgs = typeParams || []\n }\n\n apply(...typeArgs: TypeDescriptor[]): TypeDescriptor {\n const newObj = this.clone()\n newObj.typeArgs = typeArgs\n return newObj\n }\n\n clone(): this {\n const newObj = new TypeDescriptor(this.qname, this.typeArgs)\n newObj.reference = this.reference\n newObj.mutable = this.mutable\n return newObj as any\n }\n\n // compare qname without consider case for system type\n compareQname(t: TypeDescriptor): boolean {\n let t1 = this.qname\n if (BUILTIN_TYPES_SET.has(this.qname.toLowerCase())) {\n t1 = this.qname.toLowerCase()\n }\n let t2 = t.qname\n if (BUILTIN_TYPES_SET.has(t.qname.toLowerCase())) {\n t2 = t.qname\n }\n return t1 === t2\n }\n\n getSignature(): string {\n if (this.typeArgs.length > 0) {\n return this.qname + '<' + this.typeArgs.map((t) => t.getSignature()).join(', ') + '>'\n }\n return this.qname\n }\n\n // Make U8, U16, etc => u8, u16\n getNormalizedSignature(): string {\n let qname = this.qname\n switch (qname) {\n case 'U8':\n case 'U16':\n case 'U32':\n case 'U64':\n case 'U128':\n case 'U256':\n case 'Vector':\n case 'Bool':\n case 'Address':\n qname = qname.toLowerCase()\n }\n\n if (this.typeArgs.length > 0) {\n return qname + '<' + this.typeArgs.map((t) => t.getNormalizedSignature()).join(', ') + '>'\n }\n return qname\n }\n\n // Replace T0, T1 with more concrete type\n applyTypeArgs(ctx: Map<string, TypeDescriptor>): TypeDescriptor {\n const replace = ctx.get(this.qname)\n if (replace) {\n return replace\n }\n if (ctx.size === 0 || this.typeArgs.length === 0) {\n return this\n }\n\n const typeArgs: TypeDescriptor[] = []\n for (const arg of this.typeArgs) {\n const replace = ctx.get(arg.qname)\n if (replace) {\n typeArgs.push(replace)\n } else {\n typeArgs.push(arg.applyTypeArgs(ctx))\n }\n }\n return new TypeDescriptor(this.qname, typeArgs)\n }\n\n // all depended types including itself, not include system type\n dependedTypes(): string[] {\n if (this.qname.startsWith('&')) {\n console.error('Not expected &')\n return []\n }\n\n if (this.isVector()) {\n return this.typeArgs[0].dependedTypes()\n }\n\n if (BUILTIN_TYPES_SET.has(this.qname.toLowerCase())) {\n return []\n }\n switch (this.qname) {\n case 'signer':\n case '0x1::string::String':\n return []\n }\n\n // Type parameters are not depended\n if (this.qname.indexOf(SPLITTER) == -1) {\n if (this.qname.startsWith('T')) {\n return []\n }\n }\n\n const types = new Set<string>()\n for (const param of this.typeArgs) {\n param.dependedTypes().forEach((t) => types.add(t))\n }\n\n types.add(this.qname)\n\n return Array.from(types)\n }\n\n isVector(): boolean {\n return this.qname.toLowerCase() === VECTOR_STR\n }\n\n existAnyType(): boolean {\n if (this.qname === 'any') {\n return true\n }\n for (const param of this.typeArgs) {\n if (param.existAnyType()) {\n return true\n }\n }\n return false\n }\n\n name(): string {\n const parts = this.qname.split(SPLITTER)\n return parts[parts.length - 1]\n }\n\n module(): string {\n const parts = this.qname.split(SPLITTER)\n return parts[parts.length - 2]\n }\n}\n\nexport function parseMoveType(type: string): TypeDescriptor {\n const stack: TypeDescriptor[] = [new TypeDescriptor('')]\n let buffer = []\n\n if (type === undefined) {\n console.log('')\n }\n\n // xxx:asdf<g1<a,<c,d>>, b, g2<a,b>, e>\n for (let i = 0; i < type.length; i++) {\n const ch = type[i]\n if (ch === ' ') {\n continue\n }\n if (ch === '<') {\n // const symbol = type.slice(symbolStart, i)\n // symbolStart =\n const symbol = buffer.join('')\n buffer = []\n stack[stack.length - 1].qname = symbol\n adjustType(stack[stack.length - 1])\n stack.push(new TypeDescriptor(''))\n continue\n }\n if (ch === '>' || ch === ',') {\n const typeParam = stack.pop()\n if (!typeParam) {\n throw Error('Unexpected stack size')\n }\n if (buffer.length > 0) {\n typeParam.qname = buffer.join('')\n buffer = []\n }\n adjustType(typeParam)\n stack[stack.length - 1].typeArgs.push(typeParam)\n if (ch === ',') {\n stack.push(new TypeDescriptor(''))\n }\n continue\n }\n buffer.push(ch)\n }\n\n if (buffer.length > 0) {\n stack[stack.length - 1].qname = buffer.join('')\n }\n adjustType(stack[stack.length - 1])\n\n const res = stack.pop()\n if (!res || stack.length > 0) {\n throw Error('Unexpected stack size')\n }\n return res\n}\n\nfunction adjustType(type: TypeDescriptor) {\n if (type.qname.startsWith('&')) {\n type.reference = true\n type.qname = type.qname.slice(1)\n }\n if (type.qname.startsWith('mut')) {\n type.mutable = true\n type.qname = type.qname.slice(3)\n }\n const parts = type.qname.split(SPLITTER)\n if (parts.length > 1) {\n const [account, module, name] = parts\n type.qname = [accountTypeString(account), module, name].join(SPLITTER)\n }\n}\n\nexport const ANY_TYPE = new TypeDescriptor<any>('any')\n\nexport function vectorType<T>(t: TypeDescriptor<T> = ANY_TYPE): TypeDescriptor<T[]> {\n return BUILTIN_TYPES.VECTOR_TYPE_ANY.apply(t)\n}\n\nexport const BUILTIN_TYPES = {\n ADDRESS_TYPE: new TypeDescriptor<string>('address'),\n // export const Address = new TypeDescriptor<string>(\"Address\")\n\n VECTOR_TYPE_ANY: new TypeDescriptor<any[]>('vector'),\n VECTOR_TYPE: vectorType,\n\n BOOL_TYPE: new TypeDescriptor<number>('bool'),\n\n U8_TYPE: new TypeDescriptor<number>('u8'),\n // export const U8 = new TypeDescriptor<number>(\"U8\")\n U16_TYPE: new TypeDescriptor<number>('u16'),\n // export const U16 = new TypeDescriptor<number>(\"U16\")\n U32_TYPE: new TypeDescriptor<number>('u32'),\n // export const U32 = new TypeDescriptor<number>(\"U32\")\n U64_TYPE: new TypeDescriptor<number>('u64'),\n // export const U64 = new TypeDescriptor<number>(\"U64\")\n U128_TYPE: new TypeDescriptor<number>('u128'),\n // export const U128 = new TypeDescriptor<number>(\"U128\")\n U256_TYPE: new TypeDescriptor<number>('u256')\n // export const U256 = new TypeDescriptor<number>(\"U256\")\n}\n\nconst BUILTIN_TYPES_SET = new Set(\n Object.values(BUILTIN_TYPES).flatMap((t) => {\n if (typeof t === 'object') {\n return [t.qname.toLowerCase()]\n }\n return []\n })\n)\n\n/**\n *\n * @param matcher\n * @param type\n */\nexport function matchType(matcher: TypeDescriptor, type: TypeDescriptor): boolean {\n if (matcher.qname === 'any') {\n return true\n }\n if (!matcher.compareQname(type)) {\n return false\n }\n for (const [idx, matcherTarg] of matcher.typeArgs.entries()) {\n const targ = type.typeArgs[idx]\n if (!matchType(matcherTarg, targ)) {\n return false\n }\n }\n return true\n}\n","import { moduleQname, moduleQnameForType } from './utils.js'\nimport { InternalMoveModule } from './internal-models.js'\n\nexport class AccountModulesImportInfo {\n // account to module\n imports: Map<string, Set<string>>\n account: string\n moduleName: string\n\n constructor(account: string, tsModuleName: string) {\n this.account = account\n this.moduleName = tsModuleName\n this.imports = new Map<string, Set<string>>()\n }\n\n addImport(account: string, module: string) {\n if (account === this.account) {\n return\n }\n let accountModules = this.imports.get(account)\n if (!accountModules) {\n accountModules = new Set<string>()\n this.imports.set(account, accountModules)\n }\n accountModules.add(module)\n }\n}\n\nexport class AccountRegister {\n accountImports = new Map<string, AccountModulesImportInfo>()\n pendingAccounts = new Set<string>()\n\n register(module: InternalMoveModule, tsModuleName: string): AccountModulesImportInfo {\n const currentModuleFqn = moduleQname(module)\n\n let accountModuleImports = this.accountImports.get(module.address)\n if (!accountModuleImports) {\n accountModuleImports = new AccountModulesImportInfo(module.address, tsModuleName)\n this.accountImports.set(module.address, accountModuleImports)\n // the account has already be processed, delete pending task\n this.pendingAccounts.delete(module.address)\n }\n\n this.registerStruct(module, accountModuleImports)\n this.registerFunctions(module, accountModuleImports)\n\n this.accountImports.set(currentModuleFqn, accountModuleImports)\n return accountModuleImports\n }\n\n private registerFunctions(module: InternalMoveModule, accountModuleImports: AccountModulesImportInfo): void {\n for (const func of module.exposedFunctions) {\n // if (!func.isEntry) {\n // continue\n // }\n for (const param of func.params.concat(func.return)) {\n for (const type of param.dependedTypes()) {\n const [account, module] = moduleQnameForType(type)\n accountModuleImports.addImport(account, module)\n if (!this.accountImports.has(account)) {\n this.pendingAccounts.add(account)\n }\n }\n }\n }\n }\n\n private registerStruct(module: InternalMoveModule, accountModuleImports: AccountModulesImportInfo): void {\n for (const struct of module.structs) {\n for (const field of struct.fields) {\n for (const type of field.type.dependedTypes()) {\n const [account, module] = moduleQnameForType(type)\n accountModuleImports.addImport(account, module)\n if (!this.accountImports.has(account)) {\n this.pendingAccounts.add(account)\n }\n }\n }\n }\n }\n}\n","import { InternalMoveModule, InternalMoveStruct } from './internal-models.js'\nimport { TypeDescriptor } from './types.js'\n\nexport abstract class ChainAdapter<ModuleType, StructType> {\n // endpoint: string\n //\n // constructor(endpoint: string) {\n // this.endpoint = endpoint\n // }\n abstract getChainId(): Promise<string>\n\n abstract fetchModule(account: string, module: string): Promise<ModuleType>\n\n abstract fetchModules(account: string): Promise<ModuleType[]>\n abstract toInternalModules(modules: ModuleType[]): InternalMoveModule[]\n\n // Get all structs that represent Events\n abstract getAllEventStructs(module: InternalMoveModule[]): Map<string, InternalMoveStruct>\n\n // Get the parameters that actually have arguments in runtime\n // Aptos first signer and Sui's last TxContext are no use\n abstract getMeaningfulFunctionParams(params: TypeDescriptor[]): TypeDescriptor[]\n\n abstract getType(base: StructType): string\n abstract getData<T>(base: StructType): any\n}\n","import { accountAddressString, moduleQname, SPLITTER, VECTOR_STR } from './utils.js'\nimport { DecodedStruct, matchType, parseMoveType, TypeDescriptor } from './types.js'\nimport { InternalMoveEnum, InternalMoveFunction, InternalMoveModule, InternalMoveStruct } from './internal-models.js'\n// import { bytesToBigInt } from '../utils/index.js'\nimport { ChainAdapter } from './chain-adapter.js'\n\nexport abstract class AbstractMoveCoder<ModuleType, StructType> {\n protected moduleMapping = new Map<string, InternalMoveModule>()\n protected accounts = new Set<string>()\n private typeMapping = new Map<string, InternalMoveStruct>()\n private enumMapping = new Map<string, InternalMoveEnum>()\n\n private funcMapping = new Map<string, InternalMoveFunction>()\n // network: string\n adapter: ChainAdapter<ModuleType, StructType>\n\n protected constructor(adapter: ChainAdapter<ModuleType, StructType>) {\n this.adapter = adapter\n }\n\n contains(account: string, name: string) {\n return this.moduleMapping.has(moduleQname({ address: account, name }))\n }\n\n abstract load(module: ModuleType, address: string): InternalMoveModule\n\n protected loadInternal(module: InternalMoveModule, address: string) {\n const account = accountAddressString(module.address)\n const declareAccount = accountAddressString(address)\n\n this._loadInternal(module, account)\n if (account !== declareAccount) {\n this._loadInternal(module, declareAccount)\n }\n }\n\n private _loadInternal(module: InternalMoveModule, account: string) {\n if (this.contains(account, module.name)) {\n return\n }\n this.moduleMapping.set(moduleQname({ address: account, name: module.name }), module)\n for (const enumType of module.enums) {\n const key = [account, module.name, enumType.name].join(SPLITTER)\n this.enumMapping.set(key, enumType)\n }\n\n for (const struct of module.structs) {\n // TODO move to util\n const key = [account, module.name, struct.name].join(SPLITTER)\n this.typeMapping.set(key, struct)\n }\n\n for (const func of module.exposedFunctions) {\n // if (!func.isEntry) {\n // continue\n // }\n const key = [account, module.name, func.name].join(SPLITTER)\n this.funcMapping.set(key, func)\n }\n }\n\n protected decodeBigInt(data: any): bigint {\n if (Array.isArray(data)) {\n throw new Error('data is in byte array')\n // Only sui function need this, strange\n // const bytes = data as number[]\n // return bytesToBigInt(new Uint8Array(bytes.slice().reverse()))\n }\n\n return BigInt(data)\n }\n\n private requestMap = new Map<string, Promise<void>>()\n\n async getMoveStruct(type: string): Promise<InternalMoveStruct> {\n const [account_, module, typeName] = type.split(SPLITTER)\n const account = accountAddressString(account_)\n type = [account, module, typeName].join(SPLITTER)\n\n let struct = this.typeMapping.get(type)\n if (struct) {\n return struct\n }\n if (this.accounts.has(account)) {\n throw new Error('Failed to load struct ' + type + ' for imported account')\n }\n let resp = this.requestMap.get(account)\n if (!resp) {\n resp = this.adapter.fetchModules(account).then((modules) => {\n for (const m of modules) {\n this.load(m, account)\n }\n })\n this.requestMap.set(account, resp)\n }\n await resp\n struct = this.typeMapping.get(type)\n if (struct) {\n return struct\n }\n throw new Error('Failed to load function ' + type + ' type are not imported anywhere')\n }\n\n async maybeGetMoveEnum(type: string): Promise<InternalMoveEnum | undefined> {\n const [account_, module, typeName] = type.split(SPLITTER)\n const account = accountAddressString(account_)\n type = [account, module, typeName].join(SPLITTER)\n\n let enumType = this.enumMapping.get(type)\n if (enumType) {\n return enumType\n }\n if (this.accounts.has(account)) {\n return undefined\n }\n let resp = this.requestMap.get(account)\n if (!resp) {\n resp = this.adapter.fetchModules(account).then((modules) => {\n for (const m of modules) {\n this.load(m, account)\n }\n })\n this.requestMap.set(account, resp)\n }\n await resp\n enumType = this.enumMapping.get(type)\n if (enumType) {\n return enumType\n }\n return undefined\n }\n\n async getMoveFunction(type: string): Promise<InternalMoveFunction> {\n const [account_, module, typeName] = type.split(SPLITTER)\n const account = accountAddressString(account_)\n type = [account, module, typeName].join(SPLITTER)\n\n let func = this.funcMapping.get(type)\n if (func) {\n return func\n }\n if (this.accounts.has(account)) {\n throw new Error('Failed to load function ' + type + ' for imported account')\n }\n let resp = this.requestMap.get(account)\n if (!resp) {\n resp = this.adapter\n .fetchModules(account)\n .then((modules) => {\n for (const m of modules) {\n this.load(m, account)\n }\n })\n .catch((e) => {\n this.requestMap.delete(account)\n })\n this.requestMap.set(account, resp)\n }\n await resp\n func = this.funcMapping.get(type)\n if (func) {\n return func\n }\n throw new Error('Failed to load function ' + type + ' type are not imported anywhere')\n }\n\n protected async decode<T>(data: any, type: TypeDescriptor<T>): Promise<T> {\n // process simple type\n if (type.reference) {\n return data\n }\n switch (type.qname) {\n case 'signer': // TODO check this, aptos only\n case 'address':\n case 'Address':\n case '0x1::string::String':\n case 'bool':\n case 'Bool':\n case 'u8':\n case 'U8':\n case 'u16':\n case 'U16':\n case 'u32':\n case 'U32':\n return data\n case 'u64':\n case 'U64':\n case 'u128':\n case 'U128':\n case 'u256':\n case 'U256':\n return this.decodeBigInt(data) as any\n }\n\n // process vector\n if (type.qname.toLowerCase() === VECTOR_STR) {\n // vector<u8> as hex string\n if (type.typeArgs[0].qname === 'u8' || type.typeArgs[0].qname === 'U8') {\n return data\n }\n\n const res = []\n for (const entry of data) {\n res.push(await this.decode(entry, type.typeArgs[0]))\n }\n return res as any\n }\n\n // try enum type first\n const enumType = await this.maybeGetMoveEnum(type.qname)\n if (enumType) {\n return data\n }\n\n // Process complex type\n const struct = await this.getMoveStruct(type.qname)\n\n const typeCtx = new Map<string, TypeDescriptor>()\n for (const [idx, typeArg] of type.typeArgs.entries()) {\n typeCtx.set('T' + idx, typeArg)\n }\n\n const typedData: any = {}\n\n for (const field of struct.fields) {\n let filedType = field.type\n filedType = filedType.applyTypeArgs(typeCtx)\n const fieldValue = this.adapter.getData(data)[field.name]\n const value = await this.decode(fieldValue, filedType)\n typedData[field.name] = value\n }\n return typedData\n }\n\n async decodeArray(entries: any[], types: TypeDescriptor[], strict = true): Promise<any[]> {\n const entriesDecoded: any[] = []\n for (const [idx, arg] of entries.entries()) {\n // TODO consider apply payload.type_arguments, but this might be hard since we don't code gen for them\n const argType = types[idx]\n try {\n if (!strict && arg === undefined) {\n entriesDecoded.push(arg)\n } else {\n entriesDecoded.push(await this.decode(arg, argType))\n }\n } catch (e) {\n throw Error('Decoding error for ' + JSON.stringify(arg) + 'using type' + argType + e.toString())\n }\n }\n return entriesDecoded\n }\n\n public encode(data: any): any {\n if (data === undefined || data === null) {\n return undefined\n }\n if (typeof data === 'bigint') {\n return data.toString()\n }\n if (Array.isArray(data)) {\n return this.encodeArray(data)\n }\n for (const [key, value] of Object.entries(data)) {\n if (!value) {\n continue\n }\n if (typeof value === 'bigint') {\n data[key] = value.toString()\n }\n }\n return data\n }\n\n encodeArray(entriesDecoded: any[]): any[] {\n const entries: any[] = []\n for (const [idx, arg] of entriesDecoded.entries()) {\n entries.push(this.encode(arg))\n }\n return entries\n }\n\n async decodeCallResult(res: any[], func: string): Promise<any[]> {\n const f = await this.getMoveFunction(func)\n return this.decodeArray(res, f.return)\n }\n\n async filterAndDecodeStruct<T, ST extends StructType>(\n typeMatcher: TypeDescriptor<T>,\n structsWithTags: ST[]\n ): Promise<DecodedStruct<ST, T>[]> {\n if (!structsWithTags) {\n return [] as any\n }\n // const typeMatcherDescriptor = parseMoveType(typeMatcher)\n const results: DecodedStruct<ST, T>[] = []\n for (const resource of structsWithTags) {\n const resourceType = this.adapter.getType(resource)\n const resourceTypeDescriptor = parseMoveType(resourceType)\n if (!matchType(typeMatcher, resourceTypeDescriptor)) {\n continue\n }\n\n const result = await this.decodedStruct<T, ST>(resource)\n if (result) {\n results.push(result)\n } else {\n console.error('decoding error')\n }\n }\n return results\n }\n\n protected async decodedStruct<T, ST extends StructType>(typeStruct: ST): Promise<DecodedStruct<ST, T> | undefined> {\n const typeDescriptor = parseMoveType(this.adapter.getType(typeStruct))\n const typeArguments = typeDescriptor.typeArgs.map((t) => t.getSignature())\n\n let dataTyped = undefined\n try {\n dataTyped = await this.decode(typeStruct, typeDescriptor)\n } catch (e) {\n throw Error('Decoding error for struct' + JSON.stringify(typeStruct) + e.toString())\n // return undefined\n }\n return {\n ...typeStruct,\n data_decoded: dataTyped,\n type_arguments: typeArguments\n }\n }\n\n public async decodeType<T, ST>(typeStruct: ST, type: TypeDescriptor<T>): Promise<T | undefined> {\n if (typeStruct === null || typeStruct == undefined) {\n return typeStruct as any\n }\n if (typeof typeStruct === 'object') {\n if ('type' in typeStruct) {\n const typeInStruct = parseMoveType((typeStruct.type as any).toString() || '')\n if (!matchType(type, typeInStruct)) {\n return undefined\n }\n }\n }\n\n return await this.decode(typeStruct, type)\n }\n}\n","import { TypeDescriptor } from './types.js'\n\nexport interface InternalMoveModule {\n address: string\n name: string\n exposedFunctions: InternalMoveFunction[]\n structs: InternalMoveStruct[]\n enums: InternalMoveEnum[]\n}\n\nexport interface InternalMoveFunction {\n name: string\n visibility: InternalMoveFunctionVisibility\n isEntry: boolean\n isView?: boolean\n typeParams: InternalMoveTypeParam[]\n params: TypeDescriptor[]\n return: TypeDescriptor[]\n}\n\nexport interface InternalMoveStruct {\n name: string\n isNative: boolean\n isEvent: boolean\n abilities: string[]\n typeParams: InternalMoveTypeParam[]\n fields: InternalMoveStructField[]\n}\n\nexport interface InternalMoveEnum {\n name: string\n abilities: string[]\n typeParams: InternalMoveTypeParam[]\n variants: {\n [key: string]: InternalMoveStructField[]\n }\n}\n\nexport interface InternalMoveStructField {\n name: string\n type: TypeDescriptor\n}\n\nexport enum InternalMoveFunctionVisibility {\n PRIVATE = 'private',\n PUBLIC = 'public',\n FRIEND = 'friend'\n}\n\nexport type InternalMoveTypeParam = {\n constraints: string[]\n}\n","export * from './filter.js'\nexport * from './move-context.js'\n\nexport * from '@typemove/move'\n\nexport { MoveFetchConfig } from '@sentio/protos'\n;import(\"node:process\").then((p) => p.stdout.write(\"\"));"],"mappings":";;;;;;;;;AAmCO,IAAM,eAAN,MAAsB;AAAA,EAnC7B,OAmC6B;AAAA;AAAA;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,cAAN,MAAqB;AAAA,EA1C5B,OA0C4B;AAAA;AAAA;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,sBAAN,MAA6B;AAAA,EAjDpC,OAiDoC;AAAA;AAAA;AAAA,EAClC;AAAA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