@sentio/sdk-bundle 3.4.1-rc.1 → 3.4.1-rc.2

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.
Files changed (48) hide show
  1. package/lib/aptos/builtin/0x1.js +2 -2
  2. package/lib/aptos/builtin/0x3.js +3 -3
  3. package/lib/aptos/builtin/0x4.js +3 -3
  4. package/lib/aptos/builtin/index.js +4 -4
  5. package/lib/aptos/ext/index.js +2 -2
  6. package/lib/aptos/index.js +2 -2
  7. package/lib/{chunk-N4CHGUTE.js → chunk-BYI3PJSH.js} +2 -2
  8. package/lib/{chunk-NEJJJYQT.js → chunk-GXMSKHV5.js} +6 -6
  9. package/lib/{chunk-62FLLD6M.js → chunk-HY7P5TE6.js} +6 -6
  10. package/lib/{chunk-HPKXZRIF.js → chunk-JWVPEAG3.js} +5 -5
  11. package/lib/{chunk-6WV47VNX.js → chunk-LHES6DNY.js} +1 -1
  12. package/lib/chunk-LHES6DNY.js.map +1 -0
  13. package/lib/{chunk-7QGEZEHC.js → chunk-MMBJ7C6T.js} +2 -2
  14. package/lib/{chunk-AXPJBLYF.js → chunk-OF6GQIBP.js} +4 -4
  15. package/lib/{chunk-6TX54K65.js → chunk-ROVZFRLR.js} +4 -4
  16. package/lib/{chunk-LMCCOEUH.js → chunk-VBWKCD5Y.js} +4 -4
  17. package/lib/{chunk-5AUMWNTM.js → chunk-W5HNBE7Y.js} +3 -3
  18. package/lib/{chunk-H5QN2DOV.js → chunk-XQVFMCYE.js} +5 -5
  19. package/lib/{chunk-PSG2Y4GW.js → chunk-YM4EG5FX.js} +3 -3
  20. package/lib/{chunk-G6ADAWXI.js → chunk-ZLDJKEYW.js} +30 -12
  21. package/lib/{chunk-G6ADAWXI.js.map → chunk-ZLDJKEYW.js.map} +1 -1
  22. package/lib/iota/builtin/0x1.js +5 -5
  23. package/lib/iota/builtin/0x2.js +6 -6
  24. package/lib/iota/builtin/0x3.js +7 -7
  25. package/lib/iota/builtin/index.js +7 -7
  26. package/lib/iota/ext/index.js +2 -2
  27. package/lib/iota/index.js +4 -4
  28. package/lib/move/index.js +1 -1
  29. package/lib/sui/builtin/0x1.js +5 -5
  30. package/lib/sui/builtin/0x2.js +6 -6
  31. package/lib/sui/builtin/0x3.js +7 -7
  32. package/lib/sui/builtin/index.js +7 -7
  33. package/lib/sui/ext/index.js +2 -2
  34. package/lib/sui/index.js +4 -4
  35. package/lib/testing/index.js +5 -5
  36. package/package.json +2 -2
  37. package/lib/chunk-6WV47VNX.js.map +0 -1
  38. /package/lib/{chunk-N4CHGUTE.js.map → chunk-BYI3PJSH.js.map} +0 -0
  39. /package/lib/{chunk-NEJJJYQT.js.map → chunk-GXMSKHV5.js.map} +0 -0
  40. /package/lib/{chunk-62FLLD6M.js.map → chunk-HY7P5TE6.js.map} +0 -0
  41. /package/lib/{chunk-HPKXZRIF.js.map → chunk-JWVPEAG3.js.map} +0 -0
  42. /package/lib/{chunk-7QGEZEHC.js.map → chunk-MMBJ7C6T.js.map} +0 -0
  43. /package/lib/{chunk-AXPJBLYF.js.map → chunk-OF6GQIBP.js.map} +0 -0
  44. /package/lib/{chunk-6TX54K65.js.map → chunk-ROVZFRLR.js.map} +0 -0
  45. /package/lib/{chunk-LMCCOEUH.js.map → chunk-VBWKCD5Y.js.map} +0 -0
  46. /package/lib/{chunk-5AUMWNTM.js.map → chunk-W5HNBE7Y.js.map} +0 -0
  47. /package/lib/{chunk-H5QN2DOV.js.map → chunk-XQVFMCYE.js.map} +0 -0
  48. /package/lib/{chunk-PSG2Y4GW.js.map → chunk-YM4EG5FX.js.map} +0 -0
@@ -109,13 +109,13 @@ import {
109
109
  version,
110
110
  vesting,
111
111
  voting
112
- } from "../../chunk-G6ADAWXI.js";
112
+ } from "../../chunk-ZLDJKEYW.js";
113
113
  import "../../chunk-742S42NO.js";
114
114
  import "../../chunk-7IDGS56O.js";
115
115
  import "../../chunk-XTERRIL3.js";
116
116
  import "../../chunk-KW57KIJX.js";
117
117
  import "../../chunk-PTCFP6V6.js";
118
- import "../../chunk-6WV47VNX.js";
118
+ import "../../chunk-LHES6DNY.js";
119
119
  import "../../chunk-WYM4IYMI.js";
120
120
  import "../../chunk-EZWWCMDA.js";
121
121
  import "../../chunk-ZR7UHHH2.js";
@@ -6,14 +6,14 @@ import {
6
6
  token_coin_swap,
7
7
  token_event_store,
8
8
  token_transfers
9
- } from "../../chunk-PSG2Y4GW.js";
10
- import "../../chunk-G6ADAWXI.js";
9
+ } from "../../chunk-YM4EG5FX.js";
10
+ import "../../chunk-ZLDJKEYW.js";
11
11
  import "../../chunk-742S42NO.js";
12
12
  import "../../chunk-7IDGS56O.js";
13
13
  import "../../chunk-XTERRIL3.js";
14
14
  import "../../chunk-KW57KIJX.js";
15
15
  import "../../chunk-PTCFP6V6.js";
16
- import "../../chunk-6WV47VNX.js";
16
+ import "../../chunk-LHES6DNY.js";
17
17
  import "../../chunk-WYM4IYMI.js";
18
18
  import "../../chunk-EZWWCMDA.js";
19
19
  import "../../chunk-ZR7UHHH2.js";
@@ -6,14 +6,14 @@ import {
6
6
  property_map,
7
7
  royalty,
8
8
  token
9
- } from "../../chunk-5AUMWNTM.js";
10
- import "../../chunk-G6ADAWXI.js";
9
+ } from "../../chunk-W5HNBE7Y.js";
10
+ import "../../chunk-ZLDJKEYW.js";
11
11
  import "../../chunk-742S42NO.js";
12
12
  import "../../chunk-7IDGS56O.js";
13
13
  import "../../chunk-XTERRIL3.js";
14
14
  import "../../chunk-KW57KIJX.js";
15
15
  import "../../chunk-PTCFP6V6.js";
16
- import "../../chunk-6WV47VNX.js";
16
+ import "../../chunk-LHES6DNY.js";
17
17
  import "../../chunk-WYM4IYMI.js";
18
18
  import "../../chunk-EZWWCMDA.js";
19
19
  import "../../chunk-ZR7UHHH2.js";
@@ -1,19 +1,19 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
2
  import {
3
3
  x3_exports
4
- } from "../../chunk-PSG2Y4GW.js";
4
+ } from "../../chunk-YM4EG5FX.js";
5
5
  import {
6
6
  x4_exports
7
- } from "../../chunk-5AUMWNTM.js";
7
+ } from "../../chunk-W5HNBE7Y.js";
8
8
  import {
9
9
  x1_exports
10
- } from "../../chunk-G6ADAWXI.js";
10
+ } from "../../chunk-ZLDJKEYW.js";
11
11
  import "../../chunk-742S42NO.js";
12
12
  import "../../chunk-7IDGS56O.js";
13
13
  import "../../chunk-XTERRIL3.js";
14
14
  import "../../chunk-KW57KIJX.js";
15
15
  import "../../chunk-PTCFP6V6.js";
16
- import "../../chunk-6WV47VNX.js";
16
+ import "../../chunk-LHES6DNY.js";
17
17
  import "../../chunk-WYM4IYMI.js";
18
18
  import "../../chunk-EZWWCMDA.js";
19
19
  import "../../chunk-ZR7UHHH2.js";
@@ -11,13 +11,13 @@ import {
11
11
  isWhiteListToken,
12
12
  tokenTokenValueInUsd,
13
13
  whitelistTokens
14
- } from "../../chunk-G6ADAWXI.js";
14
+ } from "../../chunk-ZLDJKEYW.js";
15
15
  import "../../chunk-742S42NO.js";
16
16
  import "../../chunk-7IDGS56O.js";
17
17
  import "../../chunk-XTERRIL3.js";
18
18
  import "../../chunk-KW57KIJX.js";
19
19
  import "../../chunk-PTCFP6V6.js";
20
- import "../../chunk-6WV47VNX.js";
20
+ import "../../chunk-LHES6DNY.js";
21
21
  import "../../chunk-WYM4IYMI.js";
22
22
  import "../../chunk-EZWWCMDA.js";
23
23
  import "../../chunk-ZR7UHHH2.js";
@@ -18,7 +18,7 @@ import {
18
18
  RichAptosClientWithContext,
19
19
  defaultMoveCoder,
20
20
  defaultMoveCoderForClient
21
- } from "../chunk-G6ADAWXI.js";
21
+ } from "../chunk-ZLDJKEYW.js";
22
22
  import "../chunk-742S42NO.js";
23
23
  import "../chunk-7IDGS56O.js";
24
24
  import "../chunk-XTERRIL3.js";
@@ -26,7 +26,7 @@ import "../chunk-KW57KIJX.js";
26
26
  import "../chunk-PTCFP6V6.js";
27
27
  import {
28
28
  BUILTIN_TYPES
29
- } from "../chunk-6WV47VNX.js";
29
+ } from "../chunk-LHES6DNY.js";
30
30
  import "../chunk-WYM4IYMI.js";
31
31
  import "../chunk-EZWWCMDA.js";
32
32
  import "../chunk-ZR7UHHH2.js";
@@ -31,7 +31,7 @@ import {
31
31
  import {
32
32
  SPLITTER,
33
33
  accountTypeString
34
- } from "./chunk-6WV47VNX.js";
34
+ } from "./chunk-LHES6DNY.js";
35
35
  import {
36
36
  Hash,
37
37
  abytes,
@@ -6341,4 +6341,4 @@ export {
6341
6341
  getPrice,
6342
6342
  calculateValueInUsd
6343
6343
  };
6344
- //# sourceMappingURL=chunk-N4CHGUTE.js.map
6344
+ //# sourceMappingURL=chunk-BYI3PJSH.js.map
@@ -1,10 +1,10 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
2
  import {
3
3
  loadAllTypes as loadAllTypes2
4
- } from "./chunk-HPKXZRIF.js";
4
+ } from "./chunk-JWVPEAG3.js";
5
5
  import {
6
6
  loadAllTypes
7
- } from "./chunk-6TX54K65.js";
7
+ } from "./chunk-ROVZFRLR.js";
8
8
  import {
9
9
  IotaBaseProcessor,
10
10
  ZERO_ADDRESS,
@@ -17,14 +17,14 @@ import {
17
17
  transactionArgumentOrPureU64,
18
18
  transactionArgumentOrPureU8,
19
19
  transactionArgumentOrVec
20
- } from "./chunk-LMCCOEUH.js";
20
+ } from "./chunk-VBWKCD5Y.js";
21
21
  import {
22
22
  IotaNetwork,
23
23
  Transaction
24
- } from "./chunk-N4CHGUTE.js";
24
+ } from "./chunk-BYI3PJSH.js";
25
25
  import {
26
26
  TypeDescriptor
27
- } from "./chunk-6WV47VNX.js";
27
+ } from "./chunk-LHES6DNY.js";
28
28
  import {
29
29
  __export,
30
30
  __name
@@ -7647,4 +7647,4 @@ export {
7647
7647
  loadAllTypes3 as loadAllTypes,
7648
7648
  x3_exports
7649
7649
  };
7650
- //# sourceMappingURL=chunk-NEJJJYQT.js.map
7650
+ //# sourceMappingURL=chunk-GXMSKHV5.js.map
@@ -1,10 +1,10 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
2
  import {
3
3
  loadAllTypes as loadAllTypes2
4
- } from "./chunk-H5QN2DOV.js";
4
+ } from "./chunk-XQVFMCYE.js";
5
5
  import {
6
6
  loadAllTypes
7
- } from "./chunk-AXPJBLYF.js";
7
+ } from "./chunk-OF6GQIBP.js";
8
8
  import {
9
9
  SuiBaseProcessor,
10
10
  ZERO_ADDRESS2 as ZERO_ADDRESS,
@@ -18,14 +18,14 @@ import {
18
18
  transactionArgumentOrPureU642 as transactionArgumentOrPureU64,
19
19
  transactionArgumentOrPureU82 as transactionArgumentOrPureU8,
20
20
  transactionArgumentOrVec2 as transactionArgumentOrVec
21
- } from "./chunk-LMCCOEUH.js";
21
+ } from "./chunk-VBWKCD5Y.js";
22
22
  import {
23
23
  SuiNetwork,
24
24
  Transaction
25
- } from "./chunk-7QGEZEHC.js";
25
+ } from "./chunk-MMBJ7C6T.js";
26
26
  import {
27
27
  TypeDescriptor
28
- } from "./chunk-6WV47VNX.js";
28
+ } from "./chunk-LHES6DNY.js";
29
29
  import {
30
30
  __export,
31
31
  __name
@@ -7632,4 +7632,4 @@ export {
7632
7632
  loadAllTypes3 as loadAllTypes,
7633
7633
  x3_exports
7634
7634
  };
7635
- //# sourceMappingURL=chunk-62FLLD6M.js.map
7635
+ //# sourceMappingURL=chunk-HY7P5TE6.js.map
@@ -1,7 +1,7 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
2
  import {
3
3
  loadAllTypes
4
- } from "./chunk-6TX54K65.js";
4
+ } from "./chunk-ROVZFRLR.js";
5
5
  import {
6
6
  IotaBaseProcessor,
7
7
  ZERO_ADDRESS,
@@ -18,15 +18,15 @@ import {
18
18
  transactionArgumentOrPureU64,
19
19
  transactionArgumentOrPureU8,
20
20
  transactionArgumentOrVec
21
- } from "./chunk-LMCCOEUH.js";
21
+ } from "./chunk-VBWKCD5Y.js";
22
22
  import {
23
23
  IotaNetwork,
24
24
  Transaction
25
- } from "./chunk-N4CHGUTE.js";
25
+ } from "./chunk-BYI3PJSH.js";
26
26
  import {
27
27
  ANY_TYPE,
28
28
  TypeDescriptor
29
- } from "./chunk-6WV47VNX.js";
29
+ } from "./chunk-LHES6DNY.js";
30
30
  import {
31
31
  __export,
32
32
  __name
@@ -20594,4 +20594,4 @@ export {
20594
20594
  loadAllTypes2 as loadAllTypes,
20595
20595
  x2_exports
20596
20596
  };
20597
- //# sourceMappingURL=chunk-HPKXZRIF.js.map
20597
+ //# sourceMappingURL=chunk-JWVPEAG3.js.map
@@ -909,4 +909,4 @@ export {
909
909
  MoveContext,
910
910
  MoveAccountContext
911
911
  };
912
- //# sourceMappingURL=chunk-6WV47VNX.js.map
912
+ //# sourceMappingURL=chunk-LHES6DNY.js.map
@@ -0,0 +1 @@
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.13.4/node_modules/@typemove/move/src/utils.ts","../../../node_modules/.pnpm/@typemove+move@1.13.4/node_modules/@typemove/move/src/types.ts","../../../node_modules/.pnpm/@typemove+move@1.13.4/node_modules/@typemove/move/src/account.ts","../../../node_modules/.pnpm/@typemove+move@1.13.4/node_modules/@typemove/move/src/chain-adapter.ts","../../../node_modules/.pnpm/@typemove+move@1.13.4/node_modules/@typemove/move/src/abstract-move-coder.ts","../../../node_modules/.pnpm/@typemove+move@1.13.4/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 partitionHandler?: (event: T) => Promise<string | undefined>\n}\n\nexport class CallHandler<T> {\n filters: FunctionNameAndCallFilter[]\n handlerName: string\n handler: (call: T) => Promise<ProcessResult>\n fetchConfig: MoveFetchConfig\n partitionHandler?: (call: T) => Promise<string | undefined>\n}\n\nexport class ObjectChangeHandler<T> {\n handlerName: string\n handler: (call: T) => Promise<ProcessResult>\n type: string | string[]\n}\n\nexport class ResourceChangeHandler<T> {\n handlerName: string\n handler: (call: T) => Promise<ProcessResult>\n type: string | string[]\n partitionHandler?: (call: T) => Promise<string | undefined>\n}\n\nexport class ResourceIntervalHandler {\n type?: string | string[]\n versionInterval?: HandleInterval\n timeIntervalInMinutes?: HandleInterval\n handler: (resource: Data_AptResource) => Promise<ProcessResult>\n handlerName: string\n fetchConfig: MoveAccountFetchConfig\n partitionHandler?: (resource: Data_AptResource) => Promise<string | undefined>\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 partitionHandler?: (tx: Data_AptCall) => Promise<string | undefined>\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 'arguments'\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 // Handle closure/lambda types: |&mut T1|T2 or |T1, T2|T3\n if (this.qname.startsWith('|')) {\n // Closure types are function types, not module dependencies\n // The actual type dependencies are in the typeArgs if any\n const types = new Set<string>()\n for (const param of this.typeArgs) {\n param.dependedTypes().forEach((t) => types.add(t))\n }\n return Array.from(types)\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 { accountTypeString, 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 = module.address\n const declareAccount = accountTypeString(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 = accountTypeString(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 = accountTypeString(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 = accountTypeString(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 type = typeInStruct\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;AAAA,EACA;AACF;AAEO,IAAM,cAAN,MAAqB;AAAA,EA3C5B,OA2C4B;AAAA;AAAA;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,sBAAN,MAA6B;AAAA,EAnDpC,OAmDoC;AAAA;AAAA;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,wBAAN,MAA+B;AAAA,EAzDtC,OAyDsC;AAAA;AAAA;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,0BAAN,MAA8B;AAAA,EAhErC,OAgEqC;AAAA;AAAA;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,6BAAN,MAAiC;AAAA,EA1ExC,OA0EwC;AAAA;AAAA;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACC,OAAO,cAAc,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,MAAM,EAAE,CAAC;;;AC/E/C,IAAe,cAAf,cAAoE,YAAY;AAAA,EAHvF,OAGuF;AAAA;AAAA;AAAA,EACrF;AAAA,EACA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AAK,MAAM;MACrB,OAAO;AACL,gBAAQ,MAAM,gBAAgB;MAChC;IACF;AACA,WAAO;EACT;EAEU,MAAM,cAAwC,YAAc;AACpE,UAAM,iBAAiB,cAAc,KAAK,QAAQ,QAAQ,UAAU,CAAC;AACrE,UAAM,gBAAgB,eAAe,SAAS,IAAI,CAAC,MAAM,EAAE,aAAY,CAAE;AAEzE,QAAI,YAAY;AAChB,QAAI;AACF,kBAAY,MAAM,KAAK,OAAO,YAAY,cAAc;IAC1D,SAAS,GAAG;AACV,YAAM,MAAM,8BAA8B,KAAK,UAAU,UAAU,IAAI,EAAE,SAAQ,CAAE;IAErF;AACA,WAAO;MACL,GAAG;MACH,cAAc;MACd,gBAAgB;;EAEpB;EAEO,MAAM,WAAkB,YAAgB,MAAuB;AACpE,QAAI,eAAe,QAAQ,cAAc,QAAW;AAClD,aAAO;IACT;AACA,QAAI,OAAO,eAAe,UAAU;AAClC,UAAI,UAAU,YAAY;AACxB,cAAM,eAAe,cAAe,WAAW,KAAa,SAAQ,KAAM,EAAE;AAC5E,YAAI,CAAC,UAAU,MAAM,YAAY,GAAG;AAClC,iBAAO;QACT;AACA,eAAO;MACT;IACF;AAEA,WAAO,MAAM,KAAK,OAAO,YAAY,IAAI;EAC3C;;;;AC9SF,IAAY;CAAZ,SAAYC,iCAA8B;AACxC,EAAAA,gCAAA,SAAA,IAAA;AACA,EAAAA,gCAAA,QAAA,IAAA;AACA,EAAAA,gCAAA,QAAA,IAAA;AACF,GAJY,mCAAA,iCAA8B,CAAA,EAAA;;;ACrCzC,OAAO,cAAc,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,MAAM,EAAE,CAAC;","names":["camel","replace","types","module","InternalMoveFunctionVisibility"]}
@@ -31,7 +31,7 @@ import {
31
31
  import {
32
32
  SPLITTER,
33
33
  accountTypeString
34
- } from "./chunk-6WV47VNX.js";
34
+ } from "./chunk-LHES6DNY.js";
35
35
  import {
36
36
  __name
37
37
  } from "./chunk-R7PMHHKJ.js";
@@ -8279,4 +8279,4 @@ export {
8279
8279
  @noble/hashes/utils.js:
8280
8280
  (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
8281
8281
  */
8282
- //# sourceMappingURL=chunk-7QGEZEHC.js.map
8282
+ //# sourceMappingURL=chunk-MMBJ7C6T.js.map
@@ -13,15 +13,15 @@ import {
13
13
  transactionArgumentOrPureU642 as transactionArgumentOrPureU64,
14
14
  transactionArgumentOrPureU82 as transactionArgumentOrPureU8,
15
15
  transactionArgumentOrVec2 as transactionArgumentOrVec
16
- } from "./chunk-LMCCOEUH.js";
16
+ } from "./chunk-VBWKCD5Y.js";
17
17
  import {
18
18
  SuiNetwork,
19
19
  Transaction
20
- } from "./chunk-7QGEZEHC.js";
20
+ } from "./chunk-MMBJ7C6T.js";
21
21
  import {
22
22
  ANY_TYPE,
23
23
  TypeDescriptor
24
- } from "./chunk-6WV47VNX.js";
24
+ } from "./chunk-LHES6DNY.js";
25
25
  import {
26
26
  __export,
27
27
  __name
@@ -6747,4 +6747,4 @@ export {
6747
6747
  loadAllTypes,
6748
6748
  x1_exports
6749
6749
  };
6750
- //# sourceMappingURL=chunk-AXPJBLYF.js.map
6750
+ //# sourceMappingURL=chunk-OF6GQIBP.js.map
@@ -13,15 +13,15 @@ import {
13
13
  transactionArgumentOrPureU64,
14
14
  transactionArgumentOrPureU8,
15
15
  transactionArgumentOrVec
16
- } from "./chunk-LMCCOEUH.js";
16
+ } from "./chunk-VBWKCD5Y.js";
17
17
  import {
18
18
  IotaNetwork,
19
19
  Transaction
20
- } from "./chunk-N4CHGUTE.js";
20
+ } from "./chunk-BYI3PJSH.js";
21
21
  import {
22
22
  ANY_TYPE,
23
23
  TypeDescriptor
24
- } from "./chunk-6WV47VNX.js";
24
+ } from "./chunk-LHES6DNY.js";
25
25
  import {
26
26
  __export,
27
27
  __name
@@ -4891,4 +4891,4 @@ export {
4891
4891
  loadAllTypes,
4892
4892
  x1_exports
4893
4893
  };
4894
- //# sourceMappingURL=chunk-6TX54K65.js.map
4894
+ //# sourceMappingURL=chunk-ROVZFRLR.js.map
@@ -7,7 +7,7 @@ import {
7
7
  normalizeSuiAddress,
8
8
  normalizeSuiObjectId,
9
9
  suiBcs
10
- } from "./chunk-7QGEZEHC.js";
10
+ } from "./chunk-MMBJ7C6T.js";
11
11
  import {
12
12
  IotaClient,
13
13
  IotaNetwork,
@@ -16,7 +16,7 @@ import {
16
16
  iotaBcs,
17
17
  normalizeIotaAddress,
18
18
  normalizeIotaObjectId
19
- } from "./chunk-N4CHGUTE.js";
19
+ } from "./chunk-BYI3PJSH.js";
20
20
  import {
21
21
  HandlerRegister
22
22
  } from "./chunk-PTCFP6V6.js";
@@ -33,7 +33,7 @@ import {
33
33
  accountTypeString,
34
34
  moduleQname,
35
35
  parseMoveType
36
- } from "./chunk-6WV47VNX.js";
36
+ } from "./chunk-LHES6DNY.js";
37
37
  import {
38
38
  getHandlerName,
39
39
  proxyProcessor
@@ -3475,4 +3475,4 @@ export {
3475
3475
  SuiPlugin,
3476
3476
  IotaPlugin
3477
3477
  };
3478
- //# sourceMappingURL=chunk-LMCCOEUH.js.map
3478
+ //# sourceMappingURL=chunk-VBWKCD5Y.js.map
@@ -5,10 +5,10 @@ import {
5
5
  defaultMoveCoder,
6
6
  defaultMoveCoderForClient,
7
7
  loadAllTypes
8
- } from "./chunk-G6ADAWXI.js";
8
+ } from "./chunk-ZLDJKEYW.js";
9
9
  import {
10
10
  TypeDescriptor
11
- } from "./chunk-6WV47VNX.js";
11
+ } from "./chunk-LHES6DNY.js";
12
12
  import {
13
13
  __export,
14
14
  __name
@@ -1402,4 +1402,4 @@ export {
1402
1402
  loadAllTypes2 as loadAllTypes,
1403
1403
  x4_exports
1404
1404
  };
1405
- //# sourceMappingURL=chunk-5AUMWNTM.js.map
1405
+ //# sourceMappingURL=chunk-W5HNBE7Y.js.map
@@ -1,7 +1,7 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
2
  import {
3
3
  loadAllTypes
4
- } from "./chunk-AXPJBLYF.js";
4
+ } from "./chunk-OF6GQIBP.js";
5
5
  import {
6
6
  SuiBaseProcessor,
7
7
  ZERO_ADDRESS2 as ZERO_ADDRESS,
@@ -18,15 +18,15 @@ import {
18
18
  transactionArgumentOrPureU642 as transactionArgumentOrPureU64,
19
19
  transactionArgumentOrPureU82 as transactionArgumentOrPureU8,
20
20
  transactionArgumentOrVec2 as transactionArgumentOrVec
21
- } from "./chunk-LMCCOEUH.js";
21
+ } from "./chunk-VBWKCD5Y.js";
22
22
  import {
23
23
  SuiNetwork,
24
24
  Transaction
25
- } from "./chunk-7QGEZEHC.js";
25
+ } from "./chunk-MMBJ7C6T.js";
26
26
  import {
27
27
  ANY_TYPE,
28
28
  TypeDescriptor
29
- } from "./chunk-6WV47VNX.js";
29
+ } from "./chunk-LHES6DNY.js";
30
30
  import {
31
31
  __export,
32
32
  __name
@@ -20410,4 +20410,4 @@ export {
20410
20410
  loadAllTypes2 as loadAllTypes,
20411
20411
  x2_exports
20412
20412
  };
20413
- //# sourceMappingURL=chunk-H5QN2DOV.js.map
20413
+ //# sourceMappingURL=chunk-XQVFMCYE.js.map
@@ -5,11 +5,11 @@ import {
5
5
  defaultMoveCoder,
6
6
  defaultMoveCoderForClient,
7
7
  loadAllTypes
8
- } from "./chunk-G6ADAWXI.js";
8
+ } from "./chunk-ZLDJKEYW.js";
9
9
  import {
10
10
  ANY_TYPE,
11
11
  TypeDescriptor
12
- } from "./chunk-6WV47VNX.js";
12
+ } from "./chunk-LHES6DNY.js";
13
13
  import {
14
14
  __export,
15
15
  __name
@@ -1794,4 +1794,4 @@ export {
1794
1794
  loadAllTypes2 as loadAllTypes,
1795
1795
  x3_exports
1796
1796
  };
1797
- //# sourceMappingURL=chunk-PSG2Y4GW.js.map
1797
+ //# sourceMappingURL=chunk-YM4EG5FX.js.map