@totemsdk/core 1.4.0 → 1.4.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/LICENSE CHANGED
@@ -1,21 +1,202 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 Totem SDK Contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,60 @@
1
+ Totem SDK
2
+ Copyright 2024-2026 Totem SDK Contributors
3
+
4
+ This product includes software and material derived from the projects listed
5
+ below. The notices are provided for attribution and do not modify the Apache
6
+ License, Version 2.0.
7
+
8
+ Minima
9
+ ------
10
+ Minima protocol and application
11
+ https://github.com/minima-global/Minima
12
+ Licensed under the Apache License, Version 2.0.
13
+
14
+ Portions of the Totem SDK core, KISSVM, serialization, transaction and wallet
15
+ surfaces are translated or adapted from Minima's Java implementation. Those
16
+ portions remain subject to the Apache License, Version 2.0 and retain the
17
+ applicable copyright and attribution notices.
18
+
19
+ Bouncy Castle
20
+ -------------
21
+ Legion of the Bouncy Castle Inc.
22
+ https://www.bouncycastle.org/
23
+ Licensed under the Bouncy Castle License (MIT-style).
24
+
25
+ The Winternitz/GMSS-compatible WOTS implementation follows the algorithms and
26
+ behaviour of Bouncy Castle's WinternitzOTSignature, WinternitzOTSVerify and
27
+ GMSSRandom classes.
28
+
29
+ QVAC
30
+ ----
31
+ QVAC SDK
32
+ https://www.npmjs.com/package/@qvac/sdk
33
+ Licensed under the Apache License, Version 2.0.
34
+
35
+ The vendored type surface in packages/qvac/src/vendor/qvac-sdk.d.ts is
36
+ reconstructed from the @qvac/sdk type declarations for build-time use.
37
+
38
+ Protocol Buffers
39
+ ----------------
40
+ Protocol Buffers - Google's data interchange format
41
+ Copyright 2008 Google Inc. All rights reserved.
42
+ https://developers.google.com/protocol-buffers/
43
+ Licensed under the BSD 3-Clause License.
44
+
45
+ The generated file packages/agent-policy/src/generated/google/protobuf/struct.ts
46
+ retains its original BSD 3-Clause header.
47
+
48
+ BIP39
49
+ -----
50
+ BIP39 English word list
51
+ https://github.com/bitcoin/bips/blob/master/bip-0039/english.txt
52
+ Licensed under the MIT License.
53
+
54
+ Contributor Covenant
55
+ --------------------
56
+ Contributor Covenant, version 2.1
57
+ https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
58
+ Licensed under the Creative Commons Attribution 4.0 International License.
59
+
60
+ The Totem SDK Code of Conduct is adapted from Contributor Covenant 2.1.
@@ -14,12 +14,13 @@ export { bytesToHex, hexToBytes, concatBytes } from './bytes.js';
14
14
  export { sha3_256 } from './wasm-sync.js';
15
15
  export { expandPrivateKey, hashChain, derivePKdigest, deriveFullPublicKey, wotsSign, wotsVerify, wotsVerifyDigest, wotsPkFromSig, wotsPublicKeyFromSeed, wotsKeypairFromSeed, } from './wasm-sync.js';
16
16
  export * from './params.js';
17
- export { deriveChainSeedJava, derivePerAddressSeed, deriveRootPrivSeed, writeMiniNumber, writeMiniData, writeMiniString, precomputeTransactionCoinID, } from './wasm-sync.js';
17
+ export { deriveChainSeedJava, derivePerAddressSeed, deriveRootPrivSeed, writeMiniNumber, writeMiniData, writeMiniString, init, initSync, } from './wasm-sync.js';
18
18
  export { createUnifiedChildTreeKey, createUnifiedRootTreeKey, deriveUnifiedAddressPublicKey, verifyTreeSignature, } from './treekey.js';
19
19
  export { mmrRootFromPublicKeys, verifyMMRProof, } from './wasm-sync.js';
20
20
  export { phraseToSeed, generateWordList, validatePhrase, cleanSeedPhrase, } from './bip39.js';
21
21
  export { makeMxAddress, parseMxAddress, wotsAddressFromKeypair, } from './wasm-sync.js';
22
- export { serializeTransaction, computeTransactionDigest, } from './wasm-sync.js';
22
+ export { serializeTransaction, precomputeTransactionCoinID, rollCoinId, minimaTransactionFromJson, } from './transaction-json.js';
23
+ export { serializeTransaction as serializeTransactionWasm, precomputeTransactionCoinID as precomputeTransactionCoinIDWasm, computeTransactionDigest, } from './wasm-sync.js';
23
24
  export { deserializeTransaction } from './transaction.js';
24
25
  export { timingSafeEqual, createChallenge, validateChallenge, } from './wasm-sync.js';
25
26
  export { scriptFromWotsPk } from './script.js';
package/dist/cjs/index.js CHANGED
@@ -21,9 +21,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
21
21
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
22
22
  };
23
23
  Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.createChallenge = exports.timingSafeEqual = exports.deserializeTransaction = exports.computeTransactionDigest = exports.serializeTransaction = exports.wotsAddressFromKeypair = exports.parseMxAddress = exports.makeMxAddress = exports.cleanSeedPhrase = exports.validatePhrase = exports.generateWordList = exports.phraseToSeed = exports.verifyMMRProof = exports.mmrRootFromPublicKeys = exports.verifyTreeSignature = exports.deriveUnifiedAddressPublicKey = exports.createUnifiedRootTreeKey = exports.createUnifiedChildTreeKey = exports.precomputeTransactionCoinID = exports.writeMiniString = exports.writeMiniData = exports.writeMiniNumber = exports.deriveRootPrivSeed = exports.derivePerAddressSeed = exports.deriveChainSeedJava = exports.wotsKeypairFromSeed = exports.wotsPublicKeyFromSeed = exports.wotsPkFromSig = exports.wotsVerifyDigest = exports.wotsVerify = exports.wotsSign = exports.deriveFullPublicKey = exports.derivePKdigest = exports.hashChain = exports.expandPrivateKey = exports.sha3_256 = exports.concatBytes = exports.hexToBytes = exports.bytesToHex = exports.TransactionReceiptStore = exports.WatermarkExhaustedError = exports.TransactionLifecycleError = exports.TransactionLifecycle = exports.TransactionService = exports.flatIndexFromLanes = exports.finalizeLease = exports.prepareLease = exports.LeaseMonitor = exports.WatermarkStore = exports.LeaseStore = void 0;
25
- exports.TreeKey = exports.serializeMMREntry = exports.serializeMMRData = exports.serializeMMREntryNumber = exports.createMMREntryNumber = exports.deriveUnifiedChildSeed = exports.indexToMiniDataBytes = exports.javaHashAllObjects = exports.writeHashToStream = exports.serializeMiniNumberONE = exports.serializeMiniNumberZERO = exports.hashObject = exports.deriveChildTreeSeedJava = exports.hashAllObjects = exports.serializeMiniData = exports.serializeMiniNumber = exports.bigIntToByteArray = exports.concat = exports.writeSignatureProof = exports.writeSignature = exports.writeMMREntryNumber = exports.writeMiniByte = exports.verifyDeterministicAddress = exports.deriveAddress = exports.deriveUnifiedAddress = exports.deriveDeterministicAddress = exports.normalizeHex = exports.deriveAddressFromPublicKey = exports.verifyTreeSignatureDetailed = exports.verifySignatureDetailed = exports.verifySignature = exports.buildMinimaCoin = exports.createDefaultTransaction = exports.serializeTokenDescriptor = exports.computeTokenId = exports.serializeTransactionObject = exports.serializeCoin = exports.parseDecimalToMiniNumber = exports.MiniNumber = exports.generateSeedPhrase = exports.convertWordListToSeed = exports.convertStringToSeed = exports.WORD_LIST = exports.addressToRoot = exports.scriptToAddress = exports.toNodeScript = exports.decodeMx = exports.encodeMx = exports.scriptFromWotsPk = exports.validateChallenge = void 0;
26
- exports.MINIMA_CONSTANTS = exports.bytesToUtf8 = exports.utf8ToBytes = exports.hashCanonical = exports.canonicalJson = exports.toHex = exports.wotsSignLegacy = exports.baseWWithChecksum = exports.toWinternitzDigits = exports.prfChainSeed = exports.h = exports.assert32 = exports.u32be = exports.u16be = exports.disableWotsLogger = exports.setWotsLogger = exports.fromHex = exports.hex = exports.F = exports.disableTreeKeyLogger = exports.setTreeKeyLogger = exports.createPerAddressTreeKeyAsync = exports.createPerAddressTreeKey = exports.createUnifiedChildTreeKeyAsync = exports.DEFAULT_LEVELS = exports.DEFAULT_KEYS_PER_LEVEL = exports.getRootPublicKey = exports.deserializeTreeSignature = exports.serializeTreeSignature = exports.TreeKeyNode = void 0;
24
+ exports.minimaTransactionFromJson = exports.rollCoinId = exports.precomputeTransactionCoinID = exports.serializeTransaction = exports.wotsAddressFromKeypair = exports.parseMxAddress = exports.makeMxAddress = exports.cleanSeedPhrase = exports.validatePhrase = exports.generateWordList = exports.phraseToSeed = exports.verifyMMRProof = exports.mmrRootFromPublicKeys = exports.verifyTreeSignature = exports.deriveUnifiedAddressPublicKey = exports.createUnifiedRootTreeKey = exports.createUnifiedChildTreeKey = exports.initSync = exports.init = exports.writeMiniString = exports.writeMiniData = exports.writeMiniNumber = exports.deriveRootPrivSeed = exports.derivePerAddressSeed = exports.deriveChainSeedJava = exports.wotsKeypairFromSeed = exports.wotsPublicKeyFromSeed = exports.wotsPkFromSig = exports.wotsVerifyDigest = exports.wotsVerify = exports.wotsSign = exports.deriveFullPublicKey = exports.derivePKdigest = exports.hashChain = exports.expandPrivateKey = exports.sha3_256 = exports.concatBytes = exports.hexToBytes = exports.bytesToHex = exports.TransactionReceiptStore = exports.WatermarkExhaustedError = exports.TransactionLifecycleError = exports.TransactionLifecycle = exports.TransactionService = exports.flatIndexFromLanes = exports.finalizeLease = exports.prepareLease = exports.LeaseMonitor = exports.WatermarkStore = exports.LeaseStore = void 0;
25
+ exports.indexToMiniDataBytes = exports.javaHashAllObjects = exports.writeHashToStream = exports.serializeMiniNumberONE = exports.serializeMiniNumberZERO = exports.hashObject = exports.deriveChildTreeSeedJava = exports.hashAllObjects = exports.serializeMiniData = exports.serializeMiniNumber = exports.bigIntToByteArray = exports.concat = exports.writeSignatureProof = exports.writeSignature = exports.writeMMREntryNumber = exports.writeMiniByte = exports.verifyDeterministicAddress = exports.deriveAddress = exports.deriveUnifiedAddress = exports.deriveDeterministicAddress = exports.normalizeHex = exports.deriveAddressFromPublicKey = exports.verifyTreeSignatureDetailed = exports.verifySignatureDetailed = exports.verifySignature = exports.buildMinimaCoin = exports.createDefaultTransaction = exports.serializeTokenDescriptor = exports.computeTokenId = exports.serializeTransactionObject = exports.serializeCoin = exports.parseDecimalToMiniNumber = exports.MiniNumber = exports.generateSeedPhrase = exports.convertWordListToSeed = exports.convertStringToSeed = exports.WORD_LIST = exports.addressToRoot = exports.scriptToAddress = exports.toNodeScript = exports.decodeMx = exports.encodeMx = exports.scriptFromWotsPk = exports.validateChallenge = exports.createChallenge = exports.timingSafeEqual = exports.deserializeTransaction = exports.computeTransactionDigest = exports.precomputeTransactionCoinIDWasm = exports.serializeTransactionWasm = void 0;
26
+ exports.MINIMA_CONSTANTS = exports.bytesToUtf8 = exports.utf8ToBytes = exports.hashCanonical = exports.canonicalJson = exports.toHex = exports.wotsSignLegacy = exports.baseWWithChecksum = exports.toWinternitzDigits = exports.prfChainSeed = exports.h = exports.assert32 = exports.u32be = exports.u16be = exports.disableWotsLogger = exports.setWotsLogger = exports.fromHex = exports.hex = exports.F = exports.disableTreeKeyLogger = exports.setTreeKeyLogger = exports.createPerAddressTreeKeyAsync = exports.createPerAddressTreeKey = exports.createUnifiedChildTreeKeyAsync = exports.DEFAULT_LEVELS = exports.DEFAULT_KEYS_PER_LEVEL = exports.getRootPublicKey = exports.deserializeTreeSignature = exports.serializeTreeSignature = exports.TreeKeyNode = exports.TreeKey = exports.serializeMMREntry = exports.serializeMMRData = exports.serializeMMREntryNumber = exports.createMMREntryNumber = exports.deriveUnifiedChildSeed = void 0;
27
27
  exports.mxToHex = mxToHex;
28
28
  // Version information for bundle duplication detection
29
29
  __exportStar(require("./version.js"), exports);
@@ -79,7 +79,8 @@ Object.defineProperty(exports, "deriveRootPrivSeed", { enumerable: true, get: fu
79
79
  Object.defineProperty(exports, "writeMiniNumber", { enumerable: true, get: function () { return wasm_sync_js_4.writeMiniNumber; } });
80
80
  Object.defineProperty(exports, "writeMiniData", { enumerable: true, get: function () { return wasm_sync_js_4.writeMiniData; } });
81
81
  Object.defineProperty(exports, "writeMiniString", { enumerable: true, get: function () { return wasm_sync_js_4.writeMiniString; } });
82
- Object.defineProperty(exports, "precomputeTransactionCoinID", { enumerable: true, get: function () { return wasm_sync_js_4.precomputeTransactionCoinID; } });
82
+ Object.defineProperty(exports, "init", { enumerable: true, get: function () { return wasm_sync_js_4.init; } });
83
+ Object.defineProperty(exports, "initSync", { enumerable: true, get: function () { return wasm_sync_js_4.initSync; } });
83
84
  // TreeKey/TreeKeyNode — WASM-backed
84
85
  // createUnifiedChildTreeKey / createUnifiedRootTreeKey come from the TS
85
86
  // implementation (returning a full TreeKey object with setUses/sign/getPublicKey)
@@ -110,8 +111,17 @@ Object.defineProperty(exports, "makeMxAddress", { enumerable: true, get: functio
110
111
  Object.defineProperty(exports, "parseMxAddress", { enumerable: true, get: function () { return wasm_sync_js_6.parseMxAddress; } });
111
112
  Object.defineProperty(exports, "wotsAddressFromKeypair", { enumerable: true, get: function () { return wasm_sync_js_6.wotsAddressFromKeypair; } });
112
113
  // Transaction Serialization & Digest
114
+ // Public names route through the TypeScript implementation. The WASM bindings
115
+ // remain available explicitly for parity tests and legacy callers that
116
+ // intentionally want the byte-level WASM surface.
117
+ var transaction_json_js_1 = require("./transaction-json.js");
118
+ Object.defineProperty(exports, "serializeTransaction", { enumerable: true, get: function () { return transaction_json_js_1.serializeTransaction; } });
119
+ Object.defineProperty(exports, "precomputeTransactionCoinID", { enumerable: true, get: function () { return transaction_json_js_1.precomputeTransactionCoinID; } });
120
+ Object.defineProperty(exports, "rollCoinId", { enumerable: true, get: function () { return transaction_json_js_1.rollCoinId; } });
121
+ Object.defineProperty(exports, "minimaTransactionFromJson", { enumerable: true, get: function () { return transaction_json_js_1.minimaTransactionFromJson; } });
113
122
  var wasm_sync_js_7 = require("./wasm-sync.js");
114
- Object.defineProperty(exports, "serializeTransaction", { enumerable: true, get: function () { return wasm_sync_js_7.serializeTransaction; } });
123
+ Object.defineProperty(exports, "serializeTransactionWasm", { enumerable: true, get: function () { return wasm_sync_js_7.serializeTransaction; } });
124
+ Object.defineProperty(exports, "precomputeTransactionCoinIDWasm", { enumerable: true, get: function () { return wasm_sync_js_7.precomputeTransactionCoinID; } });
115
125
  Object.defineProperty(exports, "computeTransactionDigest", { enumerable: true, get: function () { return wasm_sync_js_7.computeTransactionDigest; } });
116
126
  // Transaction deserialization (byte-exact inverse of the TS serializer)
117
127
  var transaction_js_1 = require("./transaction.js");
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Compatibility adapters for the legacy JSON transaction surface.
3
+ *
4
+ * The WASM bindings are retained as `*Wasm` exports, but the public
5
+ * `serializeTransaction` / `precomputeTransactionCoinID` names route through
6
+ * the TypeScript implementation. This avoids the WASM serializer crash on
7
+ * token+state outputs and the incorrect coin-ID precompute semantics.
8
+ */
9
+ import { bytesToHex } from './Streamable.js';
10
+ import { type MinimaTransaction } from './transaction.js';
11
+ /** Convert the legacy JSON transaction shape into the TS object shape. */
12
+ export declare function minimaTransactionFromJson(json: string): MinimaTransaction;
13
+ /** Public serializer: accepts the TS object or the legacy JSON string. */
14
+ export declare function serializeTransaction(tx: MinimaTransaction | string): Uint8Array;
15
+ /** Coin-ID rollover: SHA3(MiniData(coinId) || MiniNumber(index)). */
16
+ export declare function rollCoinId(coinId: Uint8Array, outputIndex?: number): Uint8Array;
17
+ export declare function precomputeTransactionCoinID(tx: MinimaTransaction): void;
18
+ export declare function precomputeTransactionCoinID(tx: Uint8Array | string, outputIndex?: number): Uint8Array;
19
+ export { bytesToHex };
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+ /**
3
+ * Compatibility adapters for the legacy JSON transaction surface.
4
+ *
5
+ * The WASM bindings are retained as `*Wasm` exports, but the public
6
+ * `serializeTransaction` / `precomputeTransactionCoinID` names route through
7
+ * the TypeScript implementation. This avoids the WASM serializer crash on
8
+ * token+state outputs and the incorrect coin-ID precompute semantics.
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.bytesToHex = void 0;
12
+ exports.minimaTransactionFromJson = minimaTransactionFromJson;
13
+ exports.serializeTransaction = serializeTransaction;
14
+ exports.rollCoinId = rollCoinId;
15
+ exports.precomputeTransactionCoinID = precomputeTransactionCoinID;
16
+ const Streamable_js_1 = require("./Streamable.js");
17
+ Object.defineProperty(exports, "bytesToHex", { enumerable: true, get: function () { return Streamable_js_1.bytesToHex; } });
18
+ const transaction_js_1 = require("./transaction.js");
19
+ const Streamable_js_2 = require("./Streamable.js");
20
+ const wasm_sync_js_1 = require("./wasm-sync.js");
21
+ function bytes(value) {
22
+ if (!value || value === '0x')
23
+ return new Uint8Array([0]);
24
+ return (0, Streamable_js_1.hexToBytes)(value);
25
+ }
26
+ function evenHex(value) {
27
+ const raw = value.trim().replace(/^0x/i, '');
28
+ return '0x' + (raw.length % 2 === 0 ? raw : `0${raw}`);
29
+ }
30
+ function stateVariables(input) {
31
+ return (input ?? []).map((sv) => {
32
+ const rawType = (sv.svtype ?? sv.type ?? '').toLowerCase();
33
+ if (rawType === 'bool' || rawType === 'boolean') {
34
+ return { port: sv.port, type: 'bool', value: sv.data === 'true' || sv.data === '1' || sv.data === '01' };
35
+ }
36
+ if (rawType === 'number')
37
+ return { port: sv.port, type: 'number', value: sv.data };
38
+ if (rawType === 'string')
39
+ return { port: sv.port, type: 'string', value: sv.data };
40
+ return { port: sv.port, type: 'hex', value: evenHex(sv.data) };
41
+ });
42
+ }
43
+ function token(input) {
44
+ if (!input)
45
+ return null;
46
+ const parsed = (0, transaction_js_1.parseDecimalToMiniNumber)(input.totalamount ?? '0');
47
+ return {
48
+ coinId: bytes(input.coinid),
49
+ scale: Number(input.scale ?? 0),
50
+ totalAmount: parsed.unscaledValue,
51
+ totalAmountScale: parsed.scale,
52
+ name: new TextEncoder().encode(input.name ?? ''),
53
+ script: bytes(input.script),
54
+ created: BigInt(input.created ?? '0'),
55
+ };
56
+ }
57
+ function coin(input) {
58
+ return {
59
+ coinId: bytes(input.coinid),
60
+ address: bytes(input.address),
61
+ amount: input.amount,
62
+ tokenId: bytes(input.tokenid),
63
+ token: token(input.token),
64
+ storeState: input.storestate ?? false,
65
+ state: stateVariables(input.state),
66
+ mmrEntryNumber: BigInt(input.mmrentry ?? '0'),
67
+ spent: input.spent ?? false,
68
+ created: BigInt(input.created ?? '0'),
69
+ };
70
+ }
71
+ /** Convert the legacy JSON transaction shape into the TS object shape. */
72
+ function minimaTransactionFromJson(json) {
73
+ const parsed = JSON.parse(json);
74
+ return {
75
+ inputs: (parsed.inputs ?? []).map(coin),
76
+ outputs: (parsed.outputs ?? []).map(coin),
77
+ state: stateVariables(parsed.state),
78
+ linkHash: bytes(parsed.linkhash ?? '0x00'),
79
+ };
80
+ }
81
+ /** Public serializer: accepts the TS object or the legacy JSON string. */
82
+ function serializeTransaction(tx) {
83
+ const value = typeof tx === 'string' ? minimaTransactionFromJson(tx) : tx;
84
+ return (0, transaction_js_1.serializeTransaction)(value);
85
+ }
86
+ /** Coin-ID rollover: SHA3(MiniData(coinId) || MiniNumber(index)). */
87
+ function rollCoinId(coinId, outputIndex = 0) {
88
+ return (0, wasm_sync_js_1.sha3_256)((0, Streamable_js_2.concat)((0, Streamable_js_2.writeMiniData)(coinId), (0, Streamable_js_2.writeMiniNumber)(BigInt(outputIndex), 0)));
89
+ }
90
+ function precomputeTransactionCoinID(tx, outputIndex = 0) {
91
+ if (typeof tx === 'object' && !(tx instanceof Uint8Array)) {
92
+ (0, transaction_js_1.precomputeTransactionCoinID)(tx);
93
+ return;
94
+ }
95
+ if (typeof tx === 'string') {
96
+ const value = minimaTransactionFromJson(tx);
97
+ (0, transaction_js_1.precomputeTransactionCoinID)(value);
98
+ return value.outputs[outputIndex]?.coinId ?? new Uint8Array();
99
+ }
100
+ // Legacy callers pass either a 32-byte input coin ID (rollover) or serialized
101
+ // transaction bytes (output coin ID). Prefer the transaction interpretation,
102
+ // but fall back to coin-ID rollover for a bare 32-byte value.
103
+ try {
104
+ const value = (0, transaction_js_1.deserializeTransaction)(tx);
105
+ if (value.inputs.length > 0) {
106
+ (0, transaction_js_1.precomputeTransactionCoinID)(value);
107
+ return value.outputs[outputIndex]?.coinId ?? new Uint8Array();
108
+ }
109
+ }
110
+ catch {
111
+ // not a serialized transaction
112
+ }
113
+ return rollCoinId(tx, outputIndex);
114
+ }
@@ -69,3 +69,13 @@ export declare function wotsKeypairFromSeed(seed: Uint8Array, index: number): {
69
69
  index: number;
70
70
  pk: Uint8Array;
71
71
  };
72
+ /**
73
+ * Compatibility initializer for the synchronous bridge.
74
+ *
75
+ * The CJS/sync build has already instantiated WASM at module load; this exists
76
+ * so the public ESM and CJS APIs expose the same `init()` contract. The ESM
77
+ * build rewrites this module to `wasm-async.js`, where init is the real
78
+ * wasm-bindgen initializer.
79
+ */
80
+ export declare function init(): Promise<void>;
81
+ export declare function initSync(): void;
@@ -16,6 +16,8 @@ exports.createChallenge = createChallenge;
16
16
  exports.validateChallenge = validateChallenge;
17
17
  exports.writeMiniNumber = writeMiniNumber;
18
18
  exports.wotsKeypairFromSeed = wotsKeypairFromSeed;
19
+ exports.init = init;
20
+ exports.initSync = initSync;
19
21
  // The bundler target initializes WASM synchronously at import time.
20
22
  // The nodejs target uses require() which is also synchronous.
21
23
  // Both targets export functions that are ready to call immediately.
@@ -102,3 +104,17 @@ function wotsKeypairFromSeed(seed, index) {
102
104
  const pk = (0, core_wasm_1.derive_pk_digest_wasm)(seed, index);
103
105
  return { seed, index, pk };
104
106
  }
107
+ /**
108
+ * Compatibility initializer for the synchronous bridge.
109
+ *
110
+ * The CJS/sync build has already instantiated WASM at module load; this exists
111
+ * so the public ESM and CJS APIs expose the same `init()` contract. The ESM
112
+ * build rewrites this module to `wasm-async.js`, where init is the real
113
+ * wasm-bindgen initializer.
114
+ */
115
+ async function init() {
116
+ // no-op: the synchronous bridge is initialized at import time
117
+ }
118
+ function initSync() {
119
+ // no-op: the synchronous bridge is initialized at import time
120
+ }
package/dist/index.d.ts CHANGED
@@ -14,12 +14,13 @@ export { bytesToHex, hexToBytes, concatBytes } from './bytes.js';
14
14
  export { sha3_256 } from './wasm-sync.js';
15
15
  export { expandPrivateKey, hashChain, derivePKdigest, deriveFullPublicKey, wotsSign, wotsVerify, wotsVerifyDigest, wotsPkFromSig, wotsPublicKeyFromSeed, wotsKeypairFromSeed, } from './wasm-sync.js';
16
16
  export * from './params.js';
17
- export { deriveChainSeedJava, derivePerAddressSeed, deriveRootPrivSeed, writeMiniNumber, writeMiniData, writeMiniString, precomputeTransactionCoinID, } from './wasm-sync.js';
17
+ export { deriveChainSeedJava, derivePerAddressSeed, deriveRootPrivSeed, writeMiniNumber, writeMiniData, writeMiniString, init, initSync, } from './wasm-sync.js';
18
18
  export { createUnifiedChildTreeKey, createUnifiedRootTreeKey, deriveUnifiedAddressPublicKey, verifyTreeSignature, } from './treekey.js';
19
19
  export { mmrRootFromPublicKeys, verifyMMRProof, } from './wasm-sync.js';
20
20
  export { phraseToSeed, generateWordList, validatePhrase, cleanSeedPhrase, } from './bip39.js';
21
21
  export { makeMxAddress, parseMxAddress, wotsAddressFromKeypair, } from './wasm-sync.js';
22
- export { serializeTransaction, computeTransactionDigest, } from './wasm-sync.js';
22
+ export { serializeTransaction, precomputeTransactionCoinID, rollCoinId, minimaTransactionFromJson, } from './transaction-json.js';
23
+ export { serializeTransaction as serializeTransactionWasm, precomputeTransactionCoinID as precomputeTransactionCoinIDWasm, computeTransactionDigest, } from './wasm-sync.js';
23
24
  export { deserializeTransaction } from './transaction.js';
24
25
  export { timingSafeEqual, createChallenge, validateChallenge, } from './wasm-sync.js';
25
26
  export { scriptFromWotsPk } from './script.js';
package/dist/index.js CHANGED
@@ -27,7 +27,7 @@ export { expandPrivateKey, hashChain, derivePKdigest, deriveFullPublicKey, wotsS
27
27
  // WOTS Params (from params.ts — constants, no crypto)
28
28
  export * from './params.js';
29
29
  // Java-Compatible Serialization
30
- export { deriveChainSeedJava, derivePerAddressSeed, deriveRootPrivSeed, writeMiniNumber, writeMiniData, writeMiniString, precomputeTransactionCoinID, } from './wasm-async.js';
30
+ export { deriveChainSeedJava, derivePerAddressSeed, deriveRootPrivSeed, writeMiniNumber, writeMiniData, writeMiniString, init, initSync, } from './wasm-async.js';
31
31
  // TreeKey/TreeKeyNode — WASM-backed
32
32
  // createUnifiedChildTreeKey / createUnifiedRootTreeKey come from the TS
33
33
  // implementation (returning a full TreeKey object with setUses/sign/getPublicKey)
@@ -45,7 +45,11 @@ export { phraseToSeed, generateWordList, validatePhrase, cleanSeedPhrase, } from
45
45
  // Address Derivation
46
46
  export { makeMxAddress, parseMxAddress, wotsAddressFromKeypair, } from './wasm-async.js';
47
47
  // Transaction Serialization & Digest
48
- export { serializeTransaction, computeTransactionDigest, } from './wasm-async.js';
48
+ // Public names route through the TypeScript implementation. The WASM bindings
49
+ // remain available explicitly for parity tests and legacy callers that
50
+ // intentionally want the byte-level WASM surface.
51
+ export { serializeTransaction, precomputeTransactionCoinID, rollCoinId, minimaTransactionFromJson, } from './transaction-json.js';
52
+ export { serializeTransaction as serializeTransactionWasm, precomputeTransactionCoinID as precomputeTransactionCoinIDWasm, computeTransactionDigest, } from './wasm-async.js';
49
53
  // Transaction deserialization (byte-exact inverse of the TS serializer)
50
54
  export { deserializeTransaction } from './transaction.js';
51
55
  // Verification
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Compatibility adapters for the legacy JSON transaction surface.
3
+ *
4
+ * The WASM bindings are retained as `*Wasm` exports, but the public
5
+ * `serializeTransaction` / `precomputeTransactionCoinID` names route through
6
+ * the TypeScript implementation. This avoids the WASM serializer crash on
7
+ * token+state outputs and the incorrect coin-ID precompute semantics.
8
+ */
9
+ import { bytesToHex } from './Streamable.js';
10
+ import { type MinimaTransaction } from './transaction.js';
11
+ /** Convert the legacy JSON transaction shape into the TS object shape. */
12
+ export declare function minimaTransactionFromJson(json: string): MinimaTransaction;
13
+ /** Public serializer: accepts the TS object or the legacy JSON string. */
14
+ export declare function serializeTransaction(tx: MinimaTransaction | string): Uint8Array;
15
+ /** Coin-ID rollover: SHA3(MiniData(coinId) || MiniNumber(index)). */
16
+ export declare function rollCoinId(coinId: Uint8Array, outputIndex?: number): Uint8Array;
17
+ export declare function precomputeTransactionCoinID(tx: MinimaTransaction): void;
18
+ export declare function precomputeTransactionCoinID(tx: Uint8Array | string, outputIndex?: number): Uint8Array;
19
+ export { bytesToHex };
@@ -0,0 +1,107 @@
1
+ /**
2
+ * Compatibility adapters for the legacy JSON transaction surface.
3
+ *
4
+ * The WASM bindings are retained as `*Wasm` exports, but the public
5
+ * `serializeTransaction` / `precomputeTransactionCoinID` names route through
6
+ * the TypeScript implementation. This avoids the WASM serializer crash on
7
+ * token+state outputs and the incorrect coin-ID precompute semantics.
8
+ */
9
+ import { hexToBytes, bytesToHex } from './Streamable.js';
10
+ import { deserializeTransaction, parseDecimalToMiniNumber, precomputeTransactionCoinID as precomputeObject, serializeTransaction as serializeObject, } from './transaction.js';
11
+ import { writeMiniData, writeMiniNumber, concat } from './Streamable.js';
12
+ import { sha3_256 } from './wasm-async.js';
13
+ function bytes(value) {
14
+ if (!value || value === '0x')
15
+ return new Uint8Array([0]);
16
+ return hexToBytes(value);
17
+ }
18
+ function evenHex(value) {
19
+ const raw = value.trim().replace(/^0x/i, '');
20
+ return '0x' + (raw.length % 2 === 0 ? raw : `0${raw}`);
21
+ }
22
+ function stateVariables(input) {
23
+ return (input ?? []).map((sv) => {
24
+ const rawType = (sv.svtype ?? sv.type ?? '').toLowerCase();
25
+ if (rawType === 'bool' || rawType === 'boolean') {
26
+ return { port: sv.port, type: 'bool', value: sv.data === 'true' || sv.data === '1' || sv.data === '01' };
27
+ }
28
+ if (rawType === 'number')
29
+ return { port: sv.port, type: 'number', value: sv.data };
30
+ if (rawType === 'string')
31
+ return { port: sv.port, type: 'string', value: sv.data };
32
+ return { port: sv.port, type: 'hex', value: evenHex(sv.data) };
33
+ });
34
+ }
35
+ function token(input) {
36
+ if (!input)
37
+ return null;
38
+ const parsed = parseDecimalToMiniNumber(input.totalamount ?? '0');
39
+ return {
40
+ coinId: bytes(input.coinid),
41
+ scale: Number(input.scale ?? 0),
42
+ totalAmount: parsed.unscaledValue,
43
+ totalAmountScale: parsed.scale,
44
+ name: new TextEncoder().encode(input.name ?? ''),
45
+ script: bytes(input.script),
46
+ created: BigInt(input.created ?? '0'),
47
+ };
48
+ }
49
+ function coin(input) {
50
+ return {
51
+ coinId: bytes(input.coinid),
52
+ address: bytes(input.address),
53
+ amount: input.amount,
54
+ tokenId: bytes(input.tokenid),
55
+ token: token(input.token),
56
+ storeState: input.storestate ?? false,
57
+ state: stateVariables(input.state),
58
+ mmrEntryNumber: BigInt(input.mmrentry ?? '0'),
59
+ spent: input.spent ?? false,
60
+ created: BigInt(input.created ?? '0'),
61
+ };
62
+ }
63
+ /** Convert the legacy JSON transaction shape into the TS object shape. */
64
+ export function minimaTransactionFromJson(json) {
65
+ const parsed = JSON.parse(json);
66
+ return {
67
+ inputs: (parsed.inputs ?? []).map(coin),
68
+ outputs: (parsed.outputs ?? []).map(coin),
69
+ state: stateVariables(parsed.state),
70
+ linkHash: bytes(parsed.linkhash ?? '0x00'),
71
+ };
72
+ }
73
+ /** Public serializer: accepts the TS object or the legacy JSON string. */
74
+ export function serializeTransaction(tx) {
75
+ const value = typeof tx === 'string' ? minimaTransactionFromJson(tx) : tx;
76
+ return serializeObject(value);
77
+ }
78
+ /** Coin-ID rollover: SHA3(MiniData(coinId) || MiniNumber(index)). */
79
+ export function rollCoinId(coinId, outputIndex = 0) {
80
+ return sha3_256(concat(writeMiniData(coinId), writeMiniNumber(BigInt(outputIndex), 0)));
81
+ }
82
+ export function precomputeTransactionCoinID(tx, outputIndex = 0) {
83
+ if (typeof tx === 'object' && !(tx instanceof Uint8Array)) {
84
+ precomputeObject(tx);
85
+ return;
86
+ }
87
+ if (typeof tx === 'string') {
88
+ const value = minimaTransactionFromJson(tx);
89
+ precomputeObject(value);
90
+ return value.outputs[outputIndex]?.coinId ?? new Uint8Array();
91
+ }
92
+ // Legacy callers pass either a 32-byte input coin ID (rollover) or serialized
93
+ // transaction bytes (output coin ID). Prefer the transaction interpretation,
94
+ // but fall back to coin-ID rollover for a bare 32-byte value.
95
+ try {
96
+ const value = deserializeTransaction(tx);
97
+ if (value.inputs.length > 0) {
98
+ precomputeObject(value);
99
+ return value.outputs[outputIndex]?.coinId ?? new Uint8Array();
100
+ }
101
+ }
102
+ catch {
103
+ // not a serialized transaction
104
+ }
105
+ return rollCoinId(tx, outputIndex);
106
+ }
107
+ export { bytesToHex };
@@ -69,3 +69,13 @@ export declare function wotsKeypairFromSeed(seed: Uint8Array, index: number): {
69
69
  index: number;
70
70
  pk: Uint8Array;
71
71
  };
72
+ /**
73
+ * Compatibility initializer for the synchronous bridge.
74
+ *
75
+ * The CJS/sync build has already instantiated WASM at module load; this exists
76
+ * so the public ESM and CJS APIs expose the same `init()` contract. The ESM
77
+ * build rewrites this module to `wasm-async.js`, where init is the real
78
+ * wasm-bindgen initializer.
79
+ */
80
+ export declare function init(): Promise<void>;
81
+ export declare function initSync(): void;
package/dist/wasm-sync.js CHANGED
@@ -94,3 +94,17 @@ export function wotsKeypairFromSeed(seed, index) {
94
94
  const pk = derive_pk_digest_wasm(seed, index);
95
95
  return { seed, index, pk };
96
96
  }
97
+ /**
98
+ * Compatibility initializer for the synchronous bridge.
99
+ *
100
+ * The CJS/sync build has already instantiated WASM at module load; this exists
101
+ * so the public ESM and CJS APIs expose the same `init()` contract. The ESM
102
+ * build rewrites this module to `wasm-async.js`, where init is the real
103
+ * wasm-bindgen initializer.
104
+ */
105
+ export async function init() {
106
+ // no-op: the synchronous bridge is initialized at import time
107
+ }
108
+ export function initSync() {
109
+ // no-op: the synchronous bridge is initialized at import time
110
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@totemsdk/core",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Core cryptographic primitives for Totem SDK — backed by Rust/WASM",
5
5
  "type": "module",
6
6
  "main": "dist/cjs/index.js",
@@ -158,11 +158,12 @@
158
158
  "files": [
159
159
  "dist",
160
160
  "README.md",
161
- "LICENSE"
161
+ "LICENSE",
162
+ "NOTICE"
162
163
  ],
163
164
  "dependencies": {
164
165
  "@noble/hashes": "^1.8.0",
165
- "@totemsdk/core-wasm": "^1.0.2"
166
+ "@totemsdk/core-wasm": "^1.0.4"
166
167
  },
167
168
  "engines": {
168
169
  "node": ">=16.0.0"
@@ -177,7 +178,7 @@
177
178
  "publishConfig": {
178
179
  "access": "public"
179
180
  },
180
- "license": "MIT",
181
+ "license": "Apache-2.0",
181
182
  "author": "Totem SDK",
182
183
  "homepage": "https://docs.totem.ing",
183
184
  "bugs": {