boing-sdk 0.3.0

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 (186) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +191 -0
  3. package/dist/accessList.d.ts +22 -0
  4. package/dist/accessList.d.ts.map +1 -0
  5. package/dist/accessList.js +45 -0
  6. package/dist/bincode.d.ts +92 -0
  7. package/dist/bincode.d.ts.map +1 -0
  8. package/dist/bincode.js +154 -0
  9. package/dist/callAbi.d.ts +119 -0
  10. package/dist/callAbi.d.ts.map +1 -0
  11. package/dist/callAbi.js +156 -0
  12. package/dist/calldata.d.ts +35 -0
  13. package/dist/calldata.d.ts.map +1 -0
  14. package/dist/calldata.js +93 -0
  15. package/dist/canonicalDeployArtifacts.d.ts +154 -0
  16. package/dist/canonicalDeployArtifacts.d.ts.map +1 -0
  17. package/dist/canonicalDeployArtifacts.js +271 -0
  18. package/dist/canonicalTestnet.d.ts +15 -0
  19. package/dist/canonicalTestnet.d.ts.map +1 -0
  20. package/dist/canonicalTestnet.js +15 -0
  21. package/dist/canonicalTestnetDex.d.ts +17 -0
  22. package/dist/canonicalTestnetDex.d.ts.map +1 -0
  23. package/dist/canonicalTestnetDex.js +17 -0
  24. package/dist/chainIds.d.ts +18 -0
  25. package/dist/chainIds.d.ts.map +1 -0
  26. package/dist/chainIds.js +56 -0
  27. package/dist/client.d.ts +223 -0
  28. package/dist/client.d.ts.map +1 -0
  29. package/dist/client.js +659 -0
  30. package/dist/connectionMonitor.d.ts +47 -0
  31. package/dist/connectionMonitor.d.ts.map +1 -0
  32. package/dist/connectionMonitor.js +93 -0
  33. package/dist/create2.d.ts +94 -0
  34. package/dist/create2.d.ts.map +1 -0
  35. package/dist/create2.js +225 -0
  36. package/dist/dappDeploy.d.ts +100 -0
  37. package/dist/dappDeploy.d.ts.map +1 -0
  38. package/dist/dappDeploy.js +140 -0
  39. package/dist/dappUiHelpers.d.ts +28 -0
  40. package/dist/dappUiHelpers.d.ts.map +1 -0
  41. package/dist/dappUiHelpers.js +69 -0
  42. package/dist/defaultReferenceFungibleSecuredRuntimeBytecodeHex.d.ts +6 -0
  43. package/dist/defaultReferenceFungibleSecuredRuntimeBytecodeHex.d.ts.map +1 -0
  44. package/dist/defaultReferenceFungibleSecuredRuntimeBytecodeHex.js +5 -0
  45. package/dist/defaultReferenceFungibleSecuredTemplateBytecodeHex.d.ts +6 -0
  46. package/dist/defaultReferenceFungibleSecuredTemplateBytecodeHex.d.ts.map +1 -0
  47. package/dist/defaultReferenceFungibleSecuredTemplateBytecodeHex.js +5 -0
  48. package/dist/defaultReferenceFungibleTemplateBytecodeHex.d.ts +6 -0
  49. package/dist/defaultReferenceFungibleTemplateBytecodeHex.d.ts.map +1 -0
  50. package/dist/defaultReferenceFungibleTemplateBytecodeHex.js +5 -0
  51. package/dist/defaultReferenceNftCollectionTemplateBytecodeHex.d.ts +7 -0
  52. package/dist/defaultReferenceNftCollectionTemplateBytecodeHex.d.ts.map +1 -0
  53. package/dist/defaultReferenceNftCollectionTemplateBytecodeHex.js +6 -0
  54. package/dist/dexIntegration.d.ts +61 -0
  55. package/dist/dexIntegration.d.ts.map +1 -0
  56. package/dist/dexIntegration.js +193 -0
  57. package/dist/erc721Logs.d.ts +21 -0
  58. package/dist/erc721Logs.d.ts.map +1 -0
  59. package/dist/erc721Logs.js +69 -0
  60. package/dist/errors.d.ts +60 -0
  61. package/dist/errors.d.ts.map +1 -0
  62. package/dist/errors.js +153 -0
  63. package/dist/hex.d.ts +27 -0
  64. package/dist/hex.d.ts.map +1 -0
  65. package/dist/hex.js +82 -0
  66. package/dist/index.d.ts +83 -0
  67. package/dist/index.d.ts.map +1 -0
  68. package/dist/index.js +78 -0
  69. package/dist/indexerBatch.d.ts +111 -0
  70. package/dist/indexerBatch.d.ts.map +1 -0
  71. package/dist/indexerBatch.js +253 -0
  72. package/dist/indexerGaps.d.ts +50 -0
  73. package/dist/indexerGaps.d.ts.map +1 -0
  74. package/dist/indexerGaps.js +117 -0
  75. package/dist/indexerSync.d.ts +61 -0
  76. package/dist/indexerSync.d.ts.map +1 -0
  77. package/dist/indexerSync.js +100 -0
  78. package/dist/nativeAmm.d.ts +64 -0
  79. package/dist/nativeAmm.d.ts.map +1 -0
  80. package/dist/nativeAmm.js +174 -0
  81. package/dist/nativeAmmLogs.d.ts +48 -0
  82. package/dist/nativeAmmLogs.d.ts.map +1 -0
  83. package/dist/nativeAmmLogs.js +114 -0
  84. package/dist/nativeAmmLpVault.d.ts +94 -0
  85. package/dist/nativeAmmLpVault.d.ts.map +1 -0
  86. package/dist/nativeAmmLpVault.js +205 -0
  87. package/dist/nativeAmmPool.d.ts +124 -0
  88. package/dist/nativeAmmPool.d.ts.map +1 -0
  89. package/dist/nativeAmmPool.js +245 -0
  90. package/dist/nativeContractSubmit.d.ts +26 -0
  91. package/dist/nativeContractSubmit.d.ts.map +1 -0
  92. package/dist/nativeContractSubmit.js +23 -0
  93. package/dist/nativeDexDirectory.d.ts +83 -0
  94. package/dist/nativeDexDirectory.d.ts.map +1 -0
  95. package/dist/nativeDexDirectory.js +147 -0
  96. package/dist/nativeDexDirectoryApi.d.ts +121 -0
  97. package/dist/nativeDexDirectoryApi.d.ts.map +1 -0
  98. package/dist/nativeDexDirectoryApi.js +408 -0
  99. package/dist/nativeDexFactory.d.ts +25 -0
  100. package/dist/nativeDexFactory.d.ts.map +1 -0
  101. package/dist/nativeDexFactory.js +72 -0
  102. package/dist/nativeDexFactoryLogs.d.ts +19 -0
  103. package/dist/nativeDexFactoryLogs.d.ts.map +1 -0
  104. package/dist/nativeDexFactoryLogs.js +61 -0
  105. package/dist/nativeDexFactoryPool.d.ts +61 -0
  106. package/dist/nativeDexFactoryPool.d.ts.map +1 -0
  107. package/dist/nativeDexFactoryPool.js +120 -0
  108. package/dist/nativeDexIndexerStats.d.ts +96 -0
  109. package/dist/nativeDexIndexerStats.d.ts.map +1 -0
  110. package/dist/nativeDexIndexerStats.js +448 -0
  111. package/dist/nativeDexLedgerRouter.d.ts +67 -0
  112. package/dist/nativeDexLedgerRouter.d.ts.map +1 -0
  113. package/dist/nativeDexLedgerRouter.js +108 -0
  114. package/dist/nativeDexLpPositions.d.ts +39 -0
  115. package/dist/nativeDexLpPositions.d.ts.map +1 -0
  116. package/dist/nativeDexLpPositions.js +69 -0
  117. package/dist/nativeDexNftIndexer.d.ts +26 -0
  118. package/dist/nativeDexNftIndexer.d.ts.map +1 -0
  119. package/dist/nativeDexNftIndexer.js +50 -0
  120. package/dist/nativeDexPoolHistory.d.ts +40 -0
  121. package/dist/nativeDexPoolHistory.d.ts.map +1 -0
  122. package/dist/nativeDexPoolHistory.js +110 -0
  123. package/dist/nativeDexReceiptArchive.d.ts +25 -0
  124. package/dist/nativeDexReceiptArchive.d.ts.map +1 -0
  125. package/dist/nativeDexReceiptArchive.js +47 -0
  126. package/dist/nativeDexRouting.d.ts +160 -0
  127. package/dist/nativeDexRouting.d.ts.map +1 -0
  128. package/dist/nativeDexRouting.js +345 -0
  129. package/dist/nativeDexSeamless.d.ts +86 -0
  130. package/dist/nativeDexSeamless.d.ts.map +1 -0
  131. package/dist/nativeDexSeamless.js +131 -0
  132. package/dist/nativeDexSwap2Router.d.ts +45 -0
  133. package/dist/nativeDexSwap2Router.d.ts.map +1 -0
  134. package/dist/nativeDexSwap2Router.js +276 -0
  135. package/dist/nativeLpShareToken.d.ts +54 -0
  136. package/dist/nativeLpShareToken.d.ts.map +1 -0
  137. package/dist/nativeLpShareToken.js +135 -0
  138. package/dist/nativeTokenSecurity.d.ts +59 -0
  139. package/dist/nativeTokenSecurity.d.ts.map +1 -0
  140. package/dist/nativeTokenSecurity.js +59 -0
  141. package/dist/networkProfile.d.ts +8 -0
  142. package/dist/networkProfile.d.ts.map +1 -0
  143. package/dist/networkProfile.js +29 -0
  144. package/dist/newHeadsWs.d.ts +43 -0
  145. package/dist/newHeadsWs.d.ts.map +1 -0
  146. package/dist/newHeadsWs.js +139 -0
  147. package/dist/preflightGate.d.ts +16 -0
  148. package/dist/preflightGate.d.ts.map +1 -0
  149. package/dist/preflightGate.js +29 -0
  150. package/dist/receiptLogs.d.ts +29 -0
  151. package/dist/receiptLogs.d.ts.map +1 -0
  152. package/dist/receiptLogs.js +66 -0
  153. package/dist/referenceFungibleSecuredDeployBytecode.d.ts +54 -0
  154. package/dist/referenceFungibleSecuredDeployBytecode.d.ts.map +1 -0
  155. package/dist/referenceFungibleSecuredDeployBytecode.js +274 -0
  156. package/dist/referenceNft.d.ts +14 -0
  157. package/dist/referenceNft.d.ts.map +1 -0
  158. package/dist/referenceNft.js +34 -0
  159. package/dist/referenceToken.d.ts +14 -0
  160. package/dist/referenceToken.d.ts.map +1 -0
  161. package/dist/referenceToken.js +29 -0
  162. package/dist/retryAfter.d.ts +6 -0
  163. package/dist/retryAfter.d.ts.map +1 -0
  164. package/dist/retryAfter.js +24 -0
  165. package/dist/rpcCapabilities.d.ts +43 -0
  166. package/dist/rpcCapabilities.d.ts.map +1 -0
  167. package/dist/rpcCapabilities.js +159 -0
  168. package/dist/rpcDoctor.d.ts +27 -0
  169. package/dist/rpcDoctor.d.ts.map +1 -0
  170. package/dist/rpcDoctor.js +66 -0
  171. package/dist/rpcSurfaceUi.d.ts +32 -0
  172. package/dist/rpcSurfaceUi.d.ts.map +1 -0
  173. package/dist/rpcSurfaceUi.js +49 -0
  174. package/dist/submitFlow.d.ts +70 -0
  175. package/dist/submitFlow.d.ts.map +1 -0
  176. package/dist/submitFlow.js +121 -0
  177. package/dist/transactionBuilder.d.ts +55 -0
  178. package/dist/transactionBuilder.d.ts.map +1 -0
  179. package/dist/transactionBuilder.js +100 -0
  180. package/dist/types.d.ts +436 -0
  181. package/dist/types.d.ts.map +1 -0
  182. package/dist/types.js +4 -0
  183. package/dist/walletProvider.d.ts +46 -0
  184. package/dist/walletProvider.d.ts.map +1 -0
  185. package/dist/walletProvider.js +126 -0
  186. package/package.json +44 -0
@@ -0,0 +1,119 @@
1
+ /**
2
+ * Minimal **call layout** helpers: encode Boing `ContractCall.calldata` as a reference-style
3
+ * **selector low byte + 32-byte words** without a foreign ABI (no keccak4, no Solidity ABI).
4
+ *
5
+ * Pair with {@link encodeBoingCall} / {@link boingWord*} from `calldata.ts` for full control.
6
+ * See `docs/BOING-REFERENCE-TOKEN.md` and `docs/BOING-REFERENCE-NFT.md` for protocol-defined layouts.
7
+ */
8
+ import { type BoingCalldataWord } from './calldata.js';
9
+ /** Supported 32-byte word kinds for schema-driven encoding. */
10
+ export type BoingAbiParamKind = 'u128' | 'account' | 'bytes32' | 'bool';
11
+ /** Structured argument before encoding to a word. */
12
+ export type BoingAbiArg = {
13
+ kind: 'u128';
14
+ value: bigint;
15
+ } | {
16
+ kind: 'account';
17
+ hex32: string;
18
+ } | {
19
+ kind: 'bytes32';
20
+ hexOrBytes: string | Uint8Array;
21
+ } | {
22
+ kind: 'bool';
23
+ value: boolean;
24
+ };
25
+ export declare function abiArgU128(value: bigint | number | string): BoingAbiArg;
26
+ export declare function abiArgAccount(hex32: string): BoingAbiArg;
27
+ export declare function abiArgBytes32(hexOrBytes: string | Uint8Array): BoingAbiArg;
28
+ export declare function abiArgBool(value: boolean): BoingAbiArg;
29
+ /** Map one structured arg to a 32-byte calldata word. */
30
+ export declare function encodeBoingAbiArgToWord(arg: BoingAbiArg): BoingCalldataWord;
31
+ /**
32
+ * Encode `selectorLowByte` + words from structured args (same result shape as {@link encodeBoingCall}).
33
+ */
34
+ export declare function encodeBoingCallFromAbiArgs(selectorLowByte: number, args: readonly BoingAbiArg[]): Uint8Array;
35
+ /**
36
+ * Encode from a simple param-kind list + runtime values (order must match).
37
+ */
38
+ export declare function encodeBoingCallTyped(selectorLowByte: number, paramKinds: readonly BoingAbiParamKind[], values: readonly unknown[]): Uint8Array;
39
+ /** Descriptor for {@link encodeBoingCallFromDescriptor}. */
40
+ export interface BoingCallDescriptor {
41
+ readonly selector: number;
42
+ readonly params: readonly BoingAbiParamKind[];
43
+ }
44
+ /**
45
+ * Built-in layouts matching **reference** token / NFT docs (selectors + word order).
46
+ * Use {@link encodeBoingCallTyped} or {@link encodeBoingCallFromAbiArgs} for custom contracts.
47
+ */
48
+ export declare const BoingReferenceCallDescriptors: {
49
+ readonly token: {
50
+ readonly transfer: {
51
+ readonly selector: 1;
52
+ readonly params: readonly ["account", "u128"];
53
+ };
54
+ readonly mint_first: {
55
+ readonly selector: 2;
56
+ readonly params: readonly ["account", "u128"];
57
+ };
58
+ };
59
+ readonly nft: {
60
+ readonly owner_of: {
61
+ readonly selector: 3;
62
+ readonly params: readonly ["bytes32"];
63
+ };
64
+ readonly transfer_nft: {
65
+ readonly selector: 4;
66
+ readonly params: readonly ["account", "bytes32"];
67
+ };
68
+ readonly set_metadata_hash: {
69
+ readonly selector: 5;
70
+ readonly params: readonly ["bytes32", "bytes32"];
71
+ };
72
+ };
73
+ /** Native constant-product pool (`docs/NATIVE-AMM-CALLDATA.md`) — three u128 words after selector. */
74
+ readonly nativeAmm: {
75
+ readonly swap: {
76
+ readonly selector: 16;
77
+ readonly params: readonly ["u128", "u128", "u128"];
78
+ };
79
+ readonly add_liquidity: {
80
+ readonly selector: 17;
81
+ readonly params: readonly ["u128", "u128", "u128"];
82
+ };
83
+ readonly remove_liquidity: {
84
+ readonly selector: 18;
85
+ readonly params: readonly ["u128", "u128", "u128"];
86
+ };
87
+ readonly remove_liquidity_to: {
88
+ readonly selector: 22;
89
+ readonly params: readonly ["u128", "u128", "u128", "account", "account"];
90
+ };
91
+ };
92
+ /**
93
+ * Native LP share token (`docs/NATIVE-LP-SHARE-TOKEN.md`) — same word layout as reference fungible
94
+ * for `transfer` / `mint`; `set_minter_once` is one account word.
95
+ */
96
+ readonly lpShare: {
97
+ readonly transfer: {
98
+ readonly selector: 1;
99
+ readonly params: readonly ["account", "u128"];
100
+ };
101
+ readonly mint: {
102
+ readonly selector: 6;
103
+ readonly params: readonly ["account", "u128"];
104
+ };
105
+ readonly set_minter_once: {
106
+ readonly selector: 7;
107
+ readonly params: readonly ["account"];
108
+ };
109
+ };
110
+ /** LP vault `configure` only (`docs/NATIVE-AMM-LP-VAULT.md`). Use `encodeNativeAmmLpVaultDepositAddCalldata` for `deposit_add`. */
111
+ readonly nativeAmmLpVault: {
112
+ readonly configure: {
113
+ readonly selector: 192;
114
+ readonly params: readonly ["account", "account"];
115
+ };
116
+ };
117
+ };
118
+ export declare function encodeBoingCallFromDescriptor(descriptor: BoingCallDescriptor, values: readonly unknown[]): Uint8Array;
119
+ //# sourceMappingURL=callAbi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"callAbi.d.ts","sourceRoot":"","sources":["../src/callAbi.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,KAAK,iBAAiB,EAKvB,MAAM,eAAe,CAAC;AAsBvB,+DAA+D;AAC/D,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;AAExE,qDAAqD;AACrD,MAAM,MAAM,WAAW,GACnB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,UAAU,EAAE,MAAM,GAAG,UAAU,CAAA;CAAE,GACpD;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC;AAErC,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,CAGvE;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CAExD;AAED,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,UAAU,GAAG,WAAW,CAE1E;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,CAEtD;AAED,yDAAyD;AACzD,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,WAAW,GAAG,iBAAiB,CAa3E;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,eAAe,EAAE,MAAM,EACvB,IAAI,EAAE,SAAS,WAAW,EAAE,GAC3B,UAAU,CAGZ;AAsBD;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,MAAM,EACvB,UAAU,EAAE,SAAS,iBAAiB,EAAE,EACxC,MAAM,EAAE,SAAS,OAAO,EAAE,GACzB,UAAU,CAQZ;AAED,4DAA4D;AAC5D,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,SAAS,iBAAiB,EAAE,CAAC;CAC/C;AAED;;;GAGG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;IAyBxC,sGAAsG;;;;;;;;;;;;;;;;;;;IAmBtG;;;OAGG;;;;;;;;;;;;;;;IAeH,mIAAmI;;;;;;;CAO3H,CAAC;AAEX,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,mBAAmB,EAC/B,MAAM,EAAE,SAAS,OAAO,EAAE,GACzB,UAAU,CAEZ"}
@@ -0,0 +1,156 @@
1
+ /**
2
+ * Minimal **call layout** helpers: encode Boing `ContractCall.calldata` as a reference-style
3
+ * **selector low byte + 32-byte words** without a foreign ABI (no keccak4, no Solidity ABI).
4
+ *
5
+ * Pair with {@link encodeBoingCall} / {@link boingWord*} from `calldata.ts` for full control.
6
+ * See `docs/BOING-REFERENCE-TOKEN.md` and `docs/BOING-REFERENCE-NFT.md` for protocol-defined layouts.
7
+ */
8
+ import { boingWordAccount, boingWordFixed, boingWordU128, encodeBoingCall, } from './calldata.js';
9
+ import { SELECTOR_MINT_FIRST, SELECTOR_TRANSFER } from './referenceToken.js';
10
+ import { SELECTOR_OWNER_OF, SELECTOR_SET_METADATA_HASH, SELECTOR_TRANSFER_NFT, } from './referenceNft.js';
11
+ import { SELECTOR_NATIVE_AMM_ADD_LIQUIDITY, SELECTOR_NATIVE_AMM_REMOVE_LIQUIDITY, SELECTOR_NATIVE_AMM_REMOVE_LIQUIDITY_TO, SELECTOR_NATIVE_AMM_SWAP, } from './nativeAmm.js';
12
+ import { SELECTOR_NATIVE_AMM_LP_VAULT_CONFIGURE, } from './nativeAmmLpVault.js';
13
+ import { SELECTOR_LP_SHARE_MINT, SELECTOR_LP_SHARE_SET_MINTER_ONCE, SELECTOR_LP_SHARE_TRANSFER, } from './nativeLpShareToken.js';
14
+ export function abiArgU128(value) {
15
+ const v = typeof value === 'bigint' ? value : BigInt(value);
16
+ return { kind: 'u128', value: v };
17
+ }
18
+ export function abiArgAccount(hex32) {
19
+ return { kind: 'account', hex32 };
20
+ }
21
+ export function abiArgBytes32(hexOrBytes) {
22
+ return { kind: 'bytes32', hexOrBytes };
23
+ }
24
+ export function abiArgBool(value) {
25
+ return { kind: 'bool', value };
26
+ }
27
+ /** Map one structured arg to a 32-byte calldata word. */
28
+ export function encodeBoingAbiArgToWord(arg) {
29
+ switch (arg.kind) {
30
+ case 'u128':
31
+ return boingWordU128(arg.value);
32
+ case 'account':
33
+ return boingWordAccount(arg.hex32);
34
+ case 'bytes32':
35
+ return boingWordFixed(arg.hexOrBytes);
36
+ case 'bool':
37
+ return boingWordU128(arg.value ? 1n : 0n);
38
+ default:
39
+ throw new Error('unhandled BoingAbiArg');
40
+ }
41
+ }
42
+ /**
43
+ * Encode `selectorLowByte` + words from structured args (same result shape as {@link encodeBoingCall}).
44
+ */
45
+ export function encodeBoingCallFromAbiArgs(selectorLowByte, args) {
46
+ const words = args.map(encodeBoingAbiArgToWord);
47
+ return encodeBoingCall(selectorLowByte, words);
48
+ }
49
+ function coerceValue(kind, value) {
50
+ switch (kind) {
51
+ case 'u128':
52
+ return abiArgU128(value);
53
+ case 'account':
54
+ if (typeof value !== 'string')
55
+ throw new TypeError('account arg must be hex string');
56
+ return abiArgAccount(value);
57
+ case 'bytes32':
58
+ if (typeof value !== 'string' && !(value instanceof Uint8Array)) {
59
+ throw new TypeError('bytes32 arg must be hex string or Uint8Array');
60
+ }
61
+ return abiArgBytes32(value);
62
+ case 'bool':
63
+ if (typeof value !== 'boolean')
64
+ throw new TypeError('bool arg must be boolean');
65
+ return abiArgBool(value);
66
+ default:
67
+ throw new Error('unhandled BoingAbiParamKind');
68
+ }
69
+ }
70
+ /**
71
+ * Encode from a simple param-kind list + runtime values (order must match).
72
+ */
73
+ export function encodeBoingCallTyped(selectorLowByte, paramKinds, values) {
74
+ if (paramKinds.length !== values.length) {
75
+ throw new Error(`encodeBoingCallTyped: expected ${paramKinds.length} values, got ${values.length}`);
76
+ }
77
+ const args = paramKinds.map((k, i) => coerceValue(k, values[i]));
78
+ return encodeBoingCallFromAbiArgs(selectorLowByte, args);
79
+ }
80
+ /**
81
+ * Built-in layouts matching **reference** token / NFT docs (selectors + word order).
82
+ * Use {@link encodeBoingCallTyped} or {@link encodeBoingCallFromAbiArgs} for custom contracts.
83
+ */
84
+ export const BoingReferenceCallDescriptors = {
85
+ token: {
86
+ transfer: {
87
+ selector: SELECTOR_TRANSFER,
88
+ params: ['account', 'u128'],
89
+ },
90
+ mint_first: {
91
+ selector: SELECTOR_MINT_FIRST,
92
+ params: ['account', 'u128'],
93
+ },
94
+ },
95
+ nft: {
96
+ owner_of: {
97
+ selector: SELECTOR_OWNER_OF,
98
+ params: ['bytes32'],
99
+ },
100
+ transfer_nft: {
101
+ selector: SELECTOR_TRANSFER_NFT,
102
+ params: ['account', 'bytes32'],
103
+ },
104
+ set_metadata_hash: {
105
+ selector: SELECTOR_SET_METADATA_HASH,
106
+ params: ['bytes32', 'bytes32'],
107
+ },
108
+ },
109
+ /** Native constant-product pool (`docs/NATIVE-AMM-CALLDATA.md`) — three u128 words after selector. */
110
+ nativeAmm: {
111
+ swap: {
112
+ selector: SELECTOR_NATIVE_AMM_SWAP,
113
+ params: ['u128', 'u128', 'u128'],
114
+ },
115
+ add_liquidity: {
116
+ selector: SELECTOR_NATIVE_AMM_ADD_LIQUIDITY,
117
+ params: ['u128', 'u128', 'u128'],
118
+ },
119
+ remove_liquidity: {
120
+ selector: SELECTOR_NATIVE_AMM_REMOVE_LIQUIDITY,
121
+ params: ['u128', 'u128', 'u128'],
122
+ },
123
+ remove_liquidity_to: {
124
+ selector: SELECTOR_NATIVE_AMM_REMOVE_LIQUIDITY_TO,
125
+ params: ['u128', 'u128', 'u128', 'account', 'account'],
126
+ },
127
+ },
128
+ /**
129
+ * Native LP share token (`docs/NATIVE-LP-SHARE-TOKEN.md`) — same word layout as reference fungible
130
+ * for `transfer` / `mint`; `set_minter_once` is one account word.
131
+ */
132
+ lpShare: {
133
+ transfer: {
134
+ selector: SELECTOR_LP_SHARE_TRANSFER,
135
+ params: ['account', 'u128'],
136
+ },
137
+ mint: {
138
+ selector: SELECTOR_LP_SHARE_MINT,
139
+ params: ['account', 'u128'],
140
+ },
141
+ set_minter_once: {
142
+ selector: SELECTOR_LP_SHARE_SET_MINTER_ONCE,
143
+ params: ['account'],
144
+ },
145
+ },
146
+ /** LP vault `configure` only (`docs/NATIVE-AMM-LP-VAULT.md`). Use `encodeNativeAmmLpVaultDepositAddCalldata` for `deposit_add`. */
147
+ nativeAmmLpVault: {
148
+ configure: {
149
+ selector: SELECTOR_NATIVE_AMM_LP_VAULT_CONFIGURE,
150
+ params: ['account', 'account'],
151
+ },
152
+ },
153
+ };
154
+ export function encodeBoingCallFromDescriptor(descriptor, values) {
155
+ return encodeBoingCallTyped(descriptor.selector, descriptor.params, values);
156
+ }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Generic Boing VM **calldata word** helpers (32-byte stack-word style).
3
+ * Reference token/NFT layouts use selector in the **last** byte of the first word; custom contracts may
4
+ * reuse these primitives for consistent SDK ergonomics. See `docs/BOING-REFERENCE-TOKEN.md`.
5
+ */
6
+ /** Exactly 32 bytes — use {@link assertBoingCalldataWord} or `boingWord*` constructors. */
7
+ export type BoingCalldataWord = Uint8Array & {
8
+ readonly __boingCalldataWord?: true;
9
+ };
10
+ /** Ensure `bytes` is exactly 32 bytes for use as a calldata argument word. */
11
+ export declare function assertBoingCalldataWord(bytes: Uint8Array): BoingCalldataWord;
12
+ /** Typed selector word (low byte only; rest zero), for {@link encodeBoingCall} argument lists. */
13
+ export declare function boingWordSelector(lowByte: number): BoingCalldataWord;
14
+ /** Typed u128-in-low-16-bytes word. */
15
+ export declare function boingWordU128(value: bigint): BoingCalldataWord;
16
+ /** Typed 32-byte account / blob word. */
17
+ export declare function boingWordAccount(hexAccount32: string): BoingCalldataWord;
18
+ /** Typed fixed 32-byte word from hex or bytes. */
19
+ export declare function boingWordFixed(hexOrBytes: string | Uint8Array): BoingCalldataWord;
20
+ /**
21
+ * Build calldata: first word is `selectorLowByte` in the **last** byte (reference layout), then each `args` word (32 bytes).
22
+ * For arbitrary trailing bytes (non–word-aligned layouts), use {@link concatCalldata} directly.
23
+ */
24
+ export declare function encodeBoingCall(selectorLowByte: number, args: readonly BoingCalldataWord[]): Uint8Array;
25
+ /** 32-byte word with single-byte selector in the low byte (reference layout). */
26
+ export declare function calldataSelectorLastByte(selector: number): Uint8Array;
27
+ /** 32-byte word: unsigned 128-bit value in the low 16 bytes (big-endian); high 16 bytes zero. */
28
+ export declare function calldataU128BeWord(value: bigint): Uint8Array;
29
+ /** 32-byte word containing a 32-byte Boing `AccountId` (or any 32-byte blob), left-aligned. */
30
+ export declare function calldataAccountIdWord(hexAccount32: string): Uint8Array;
31
+ /** Normalize to a 32-byte calldata word (hex string or `Uint8Array`). */
32
+ export declare function calldataFixedWord32(hexOrBytes: string | Uint8Array): Uint8Array;
33
+ /** Concatenate calldata segments (often 32-byte words). */
34
+ export declare function concatCalldata(parts: Uint8Array[]): Uint8Array;
35
+ //# sourceMappingURL=calldata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calldata.d.ts","sourceRoot":"","sources":["../src/calldata.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,2FAA2F;AAC3F,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG;IAAE,QAAQ,CAAC,mBAAmB,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC;AAErF,8EAA8E;AAC9E,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,UAAU,GAAG,iBAAiB,CAK5E;AAED,kGAAkG;AAClG,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,iBAAiB,CAEpE;AAED,uCAAuC;AACvC,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,iBAAiB,CAE9D;AAED,yCAAyC;AACzC,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,iBAAiB,CAExE;AAED,kDAAkD;AAClD,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,UAAU,GAAG,iBAAiB,CAEjF;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,eAAe,EAAE,MAAM,EACvB,IAAI,EAAE,SAAS,iBAAiB,EAAE,GACjC,UAAU,CAGZ;AAED,iFAAiF;AACjF,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAIrE;AAED,iGAAiG;AACjG,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAa5D;AAED,+FAA+F;AAC/F,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,MAAM,GAAG,UAAU,CAQtE;AAED,yEAAyE;AACzE,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,CAQ/E;AAED,2DAA2D;AAC3D,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,UAAU,CAU9D"}
@@ -0,0 +1,93 @@
1
+ /**
2
+ * Generic Boing VM **calldata word** helpers (32-byte stack-word style).
3
+ * Reference token/NFT layouts use selector in the **last** byte of the first word; custom contracts may
4
+ * reuse these primitives for consistent SDK ergonomics. See `docs/BOING-REFERENCE-TOKEN.md`.
5
+ */
6
+ import { ensureHex, hexToBytes } from './hex.js';
7
+ /** Ensure `bytes` is exactly 32 bytes for use as a calldata argument word. */
8
+ export function assertBoingCalldataWord(bytes) {
9
+ if (bytes.length !== 32) {
10
+ throw new Error(`BoingCalldataWord must be 32 bytes, got ${bytes.length}`);
11
+ }
12
+ return bytes;
13
+ }
14
+ /** Typed selector word (low byte only; rest zero), for {@link encodeBoingCall} argument lists. */
15
+ export function boingWordSelector(lowByte) {
16
+ return assertBoingCalldataWord(calldataSelectorLastByte(lowByte));
17
+ }
18
+ /** Typed u128-in-low-16-bytes word. */
19
+ export function boingWordU128(value) {
20
+ return assertBoingCalldataWord(calldataU128BeWord(value));
21
+ }
22
+ /** Typed 32-byte account / blob word. */
23
+ export function boingWordAccount(hexAccount32) {
24
+ return assertBoingCalldataWord(calldataAccountIdWord(hexAccount32));
25
+ }
26
+ /** Typed fixed 32-byte word from hex or bytes. */
27
+ export function boingWordFixed(hexOrBytes) {
28
+ return assertBoingCalldataWord(calldataFixedWord32(hexOrBytes));
29
+ }
30
+ /**
31
+ * Build calldata: first word is `selectorLowByte` in the **last** byte (reference layout), then each `args` word (32 bytes).
32
+ * For arbitrary trailing bytes (non–word-aligned layouts), use {@link concatCalldata} directly.
33
+ */
34
+ export function encodeBoingCall(selectorLowByte, args) {
35
+ const head = calldataSelectorLastByte(selectorLowByte);
36
+ return concatCalldata([head, ...args]);
37
+ }
38
+ /** 32-byte word with single-byte selector in the low byte (reference layout). */
39
+ export function calldataSelectorLastByte(selector) {
40
+ const w = new Uint8Array(32);
41
+ w[31] = selector & 0xff;
42
+ return w;
43
+ }
44
+ /** 32-byte word: unsigned 128-bit value in the low 16 bytes (big-endian); high 16 bytes zero. */
45
+ export function calldataU128BeWord(value) {
46
+ const w = new Uint8Array(32);
47
+ if (value < 0n || value > (1n << 128n) - 1n) {
48
+ throw new RangeError('value must fit in u128');
49
+ }
50
+ const be = new Uint8Array(16);
51
+ let x = value;
52
+ for (let i = 15; i >= 0; i--) {
53
+ be[i] = Number(x & 0xffn);
54
+ x >>= 8n;
55
+ }
56
+ w.set(be, 16);
57
+ return w;
58
+ }
59
+ /** 32-byte word containing a 32-byte Boing `AccountId` (or any 32-byte blob), left-aligned. */
60
+ export function calldataAccountIdWord(hexAccount32) {
61
+ const b = hexToBytes(ensureHex(hexAccount32));
62
+ if (b.length !== 32) {
63
+ throw new Error('account id must be 32 bytes hex');
64
+ }
65
+ const w = new Uint8Array(32);
66
+ w.set(b);
67
+ return w;
68
+ }
69
+ /** Normalize to a 32-byte calldata word (hex string or `Uint8Array`). */
70
+ export function calldataFixedWord32(hexOrBytes) {
71
+ if (hexOrBytes instanceof Uint8Array) {
72
+ if (hexOrBytes.length !== 32)
73
+ throw new Error('word must be 32 bytes');
74
+ return hexOrBytes;
75
+ }
76
+ const b = hexToBytes(ensureHex(hexOrBytes));
77
+ if (b.length !== 32)
78
+ throw new Error('word must be 32 bytes hex');
79
+ return b;
80
+ }
81
+ /** Concatenate calldata segments (often 32-byte words). */
82
+ export function concatCalldata(parts) {
83
+ let n = 0;
84
+ for (const p of parts)
85
+ n += p.length;
86
+ const out = new Uint8Array(n);
87
+ let o = 0;
88
+ for (const p of parts) {
89
+ out.set(p, o);
90
+ o += p.length;
91
+ }
92
+ return out;
93
+ }
@@ -0,0 +1,154 @@
1
+ /**
2
+ * Versioning + tx-object helpers for **pinned** native Boing deploys (form-parity with EVM apps).
3
+ *
4
+ * See `docs/BOING-CANONICAL-DEPLOY-ARTIFACTS.md`. **Fungible** and **NFT collection** templates ship a
5
+ * pinned default in this package (`DEFAULT_REFERENCE_*`); env vars still override when set.
6
+ */
7
+ import { type NativeTokenSecurityFeaturesInput } from './nativeTokenSecurity.js';
8
+ /** Logical id for the fungible template line item (docs + telemetry). */
9
+ export declare const REFERENCE_FUNGIBLE_TEMPLATE_ARTIFACT_ID: "boing.reference_fungible.v0";
10
+ /** Bump when default pinned hex in this package changes. */
11
+ export declare const REFERENCE_FUNGIBLE_TEMPLATE_VERSION: "1";
12
+ /** Logical id for the secured fungible template (`0xFD` init + runtime toggles). */
13
+ export declare const REFERENCE_FUNGIBLE_SECURED_TEMPLATE_ARTIFACT_ID: "boing.reference_fungible_secured.v0";
14
+ /** Bump when default pinned secured hex in this package changes. */
15
+ export declare const REFERENCE_FUNGIBLE_SECURED_TEMPLATE_VERSION: "1";
16
+ /** Logical id for the NFT collection template. */
17
+ export declare const REFERENCE_NFT_COLLECTION_TEMPLATE_ARTIFACT_ID: "boing.reference_nft_collection.v0";
18
+ /** Matches `reference_nft_collection_template_bytecode()` in `boing-execution` (regenerate via `dump_reference_token_artifacts`). */
19
+ export declare const REFERENCE_NFT_COLLECTION_TEMPLATE_VERSION: "1";
20
+ /** Boing Express / wallet JSON-RPC tx object for `contract_deploy_meta`. */
21
+ export type ContractDeployMetaTxObject = {
22
+ type: 'contract_deploy_meta';
23
+ bytecode: `0x${string}`;
24
+ purpose_category: string;
25
+ asset_name: string;
26
+ asset_symbol: string;
27
+ description_hash?: `0x${string}`;
28
+ };
29
+ /**
30
+ * Normalize hex for wallet RPC payloads (`0x` prefix). Use for deploy bytecode or `description_hash`.
31
+ */
32
+ export declare function ensure0xHex(hex: string): `0x${string}`;
33
+ /**
34
+ * Resolve pinned fungible template bytecode: explicit override → known env keys → embedded default
35
+ * (`DEFAULT_REFERENCE_FUNGIBLE_TEMPLATE_BYTECODE_HEX`).
36
+ */
37
+ export declare function resolveReferenceFungibleTemplateBytecodeHex(opts?: {
38
+ explicitHex?: string | undefined;
39
+ /** Extra env var names to try after `explicitHex` (`globalThis.process.env` when present). */
40
+ extraEnvKeys?: readonly string[];
41
+ }): `0x${string}`;
42
+ /**
43
+ * Resolve pinned **secured** fungible deploy bytecode (`0xFD` init + runtime): explicit → env → embedded default.
44
+ */
45
+ export declare function resolveReferenceFungibleSecuredTemplateBytecodeHex(opts?: {
46
+ explicitHex?: string | undefined;
47
+ extraEnvKeys?: readonly string[];
48
+ }): `0x${string}`;
49
+ /**
50
+ * Resolve pinned **reference NFT collection** template bytecode (explicit → env → embedded default,
51
+ * same pattern as {@link resolveReferenceFungibleTemplateBytecodeHex}).
52
+ */
53
+ export declare function resolveReferenceNftCollectionTemplateBytecodeHex(opts?: {
54
+ explicitHex?: string | undefined;
55
+ extraEnvKeys?: readonly string[];
56
+ }): `0x${string}`;
57
+ /**
58
+ * Build a **`contract_deploy_meta`** object for `boing_sendTransaction` / `boing_signTransaction`.
59
+ */
60
+ export declare function buildContractDeployMetaTx(input: {
61
+ bytecodeHex: string;
62
+ assetName: string;
63
+ assetSymbol: string;
64
+ /** Default `token` matches Express convenience when name/symbol are set. */
65
+ purposeCategory?: string;
66
+ descriptionHashHex?: string;
67
+ }): ContractDeployMetaTxObject;
68
+ export type BuildReferenceFungibleDeployMetaTxInput = {
69
+ assetName: string;
70
+ assetSymbol: string;
71
+ purposeCategory?: string;
72
+ descriptionHashHex?: string;
73
+ /**
74
+ * When set and **`descriptionHashHex`** is omitted, commits wizard security toggles into **`description_hash`**
75
+ * (Blake3 over canonical JSON — see {@link descriptionHashHexFromNativeTokenSecurity}).
76
+ */
77
+ nativeTokenSecurity?: NativeTokenSecurityFeaturesInput;
78
+ /** Override pinned template (advanced); default uses {@link resolveReferenceFungibleTemplateBytecodeHex}. */
79
+ bytecodeHexOverride?: string;
80
+ extraEnvKeys?: readonly string[];
81
+ };
82
+ /**
83
+ * **One call** for wizard-style **Deploy token** on Boing: resolve pinned fungible bytecode + build **`contract_deploy_meta`**.
84
+ * Pass the result to **`boing_sendTransaction`** / **`boing_signTransaction`** (Boing Express).
85
+ */
86
+ export declare function buildReferenceFungibleDeployMetaTx(input: BuildReferenceFungibleDeployMetaTxInput): ContractDeployMetaTxObject;
87
+ export type BuildReferenceFungibleSecuredDeployMetaTxInput = {
88
+ assetName: string;
89
+ assetSymbol: string;
90
+ purposeCategory?: string;
91
+ descriptionHashHex?: string;
92
+ nativeTokenSecurity?: NativeTokenSecurityFeaturesInput;
93
+ /**
94
+ * When `nativeTokenSecurity` is set, deploy bytecode encodes enforcement flags/limits on-chain.
95
+ * Provide **`chainHeight`** from `boing_chainHeight` when **`timelock`** is enabled.
96
+ */
97
+ chainContext?: {
98
+ chainHeight: bigint;
99
+ };
100
+ /**
101
+ * Initial `mint_first` supply (base units) for deriving **`maxWalletPercentage`** → `max_wallet` cap.
102
+ */
103
+ mintFirstTotalSupplyWei?: bigint;
104
+ bytecodeHexOverride?: string;
105
+ extraEnvKeys?: readonly string[];
106
+ };
107
+ /**
108
+ * Same as {@link buildReferenceFungibleDeployMetaTx} but uses the secured fungible template.
109
+ * When **`nativeTokenSecurity`** is passed, bytecode is built so wizard toggles map to on-chain
110
+ * `reference_fungible_secured` init storage (not only `description_hash`). When omitted, uses the
111
+ * pinned default secured template (flags off).
112
+ */
113
+ export declare function buildReferenceFungibleSecuredDeployMetaTx(input: BuildReferenceFungibleSecuredDeployMetaTxInput): ContractDeployMetaTxObject;
114
+ export type BuildReferenceNftCollectionDeployMetaTxInput = {
115
+ collectionName: string;
116
+ collectionSymbol: string;
117
+ purposeCategory?: string;
118
+ descriptionHashHex?: string;
119
+ bytecodeHexOverride?: string;
120
+ extraEnvKeys?: readonly string[];
121
+ };
122
+ /**
123
+ * **One call** for **native NFT collection** deploy meta tx. Bytecode: **`bytecodeHexOverride`** if set,
124
+ * else env keys (see {@link resolveReferenceNftCollectionTemplateBytecodeHex}), else the SDK embedded default.
125
+ */
126
+ export declare function buildReferenceNftCollectionDeployMetaTx(input: BuildReferenceNftCollectionDeployMetaTxInput): ContractDeployMetaTxObject;
127
+ /**
128
+ * Resolve **native constant-product pool** bytecode from override or env (same keys as
129
+ * [examples/native-boing-tutorial](../examples/native-boing-tutorial/) **`BOING_NATIVE_AMM_BYTECODE_HEX`**).
130
+ */
131
+ export declare function resolveNativeConstantProductPoolBytecodeHex(opts?: {
132
+ explicitHex?: string | undefined;
133
+ extraEnvKeys?: readonly string[];
134
+ }): `0x${string}` | undefined;
135
+ export type BuildNativeConstantProductPoolDeployMetaTxInput = {
136
+ /** QA / wallet display name (default: `Native CP Pool`). */
137
+ poolLabel?: string;
138
+ /** QA / wallet symbol (default: `POOL`). */
139
+ poolSymbol?: string;
140
+ /**
141
+ * Mempool QA category for pool bytecode ([NATIVE-AMM-CALLDATA.md](../../docs/NATIVE-AMM-CALLDATA.md)).
142
+ * Default **`dapp`** matches canonical testnet pool deploys.
143
+ */
144
+ purposeCategory?: string;
145
+ descriptionHashHex?: string;
146
+ bytecodeHexOverride?: string;
147
+ extraEnvKeys?: readonly string[];
148
+ };
149
+ /**
150
+ * **One call** for **native CP pool** **`contract_deploy_meta`**: pinned bytecode from env or override,
151
+ * **`purpose_category`** default **`dapp`**, then the same Express shape as token/NFT deploys.
152
+ */
153
+ export declare function buildNativeConstantProductPoolDeployMetaTx(input: BuildNativeConstantProductPoolDeployMetaTxInput): ContractDeployMetaTxObject;
154
+ //# sourceMappingURL=canonicalDeployArtifacts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canonicalDeployArtifacts.d.ts","sourceRoot":"","sources":["../src/canonicalDeployArtifacts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAEL,KAAK,gCAAgC,EACtC,MAAM,0BAA0B,CAAC;AAGlC,yEAAyE;AACzE,eAAO,MAAM,uCAAuC,EAAG,6BAAsC,CAAC;AAE9F,4DAA4D;AAC5D,eAAO,MAAM,mCAAmC,EAAG,GAAY,CAAC;AAEhE,oFAAoF;AACpF,eAAO,MAAM,+CAA+C,EAAG,qCAA8C,CAAC;AAE9G,oEAAoE;AACpE,eAAO,MAAM,2CAA2C,EAAG,GAAY,CAAC;AAExE,kDAAkD;AAClD,eAAO,MAAM,6CAA6C,EAAG,mCAA4C,CAAC;AAE1G,qIAAqI;AACrI,eAAO,MAAM,yCAAyC,EAAG,GAAY,CAAC;AAQtE,4EAA4E;AAC5E,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAA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