@totemsdk/core 1.0.9 → 1.0.10

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 (144) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +5 -5
  3. package/dist/Streamable.js +54 -31
  4. package/dist/adapters/index.js +18 -8
  5. package/dist/adapters/types.js +19 -8
  6. package/dist/binio.js +5 -1
  7. package/dist/bip39.js +24 -14
  8. package/dist/derive.js +11 -7
  9. package/dist/index.js +130 -22
  10. package/dist/javaStreamables.js +49 -30
  11. package/dist/lease/LeaseMonitor.js +7 -3
  12. package/dist/lease/LeaseStore.js +7 -3
  13. package/dist/lease/WatermarkStore.js +7 -3
  14. package/dist/lease/index.js +13 -4
  15. package/dist/lease-client.js +8 -3
  16. package/dist/minima32.js +22 -13
  17. package/dist/minimaWireSerializer.js +20 -14
  18. package/dist/mmr.js +35 -23
  19. package/dist/mx.js +10 -1
  20. package/dist/params.js +9 -5
  21. package/dist/script.js +12 -7
  22. package/dist/scripts/contract-helpers.js +37 -26
  23. package/dist/scripts/dapp-types.js +11 -6
  24. package/dist/scripts/index.js +38 -4
  25. package/dist/scripts/types.js +26 -12
  26. package/dist/scripts/witness-serializer.js +48 -30
  27. package/dist/transaction.js +55 -46
  28. package/dist/treekey.js +74 -58
  29. package/dist/tx/TransactionLifecycle.js +11 -5
  30. package/dist/tx/TransactionReceiptStore.js +7 -3
  31. package/dist/tx/TransactionService.js +14 -10
  32. package/dist/tx/index.js +11 -3
  33. package/dist/tx/types.js +2 -1
  34. package/dist/util.js +5 -1
  35. package/dist/utils.js +12 -5
  36. package/dist/verify.js +36 -25
  37. package/dist/version.js +5 -2
  38. package/dist/wots.js +94 -64
  39. package/package.json +31 -6
  40. package/src/Streamable.d.ts +0 -268
  41. package/src/Streamable.js +0 -416
  42. package/src/Streamable.ts +0 -567
  43. package/src/__tests__/Streamable.parity.test.ts +0 -422
  44. package/src/__tests__/perAddressDerivation.parity.test.ts +0 -152
  45. package/src/__tests__/roottree-prepare.test.ts +0 -101
  46. package/src/__tests__/wots-parity.test.ts +0 -289
  47. package/src/adapters/index.d.ts +0 -190
  48. package/src/adapters/index.js +0 -117
  49. package/src/adapters/index.ts +0 -301
  50. package/src/adapters/types.ts +0 -235
  51. package/src/addr.oracle.test.ts +0 -25
  52. package/src/address.test.ts +0 -55
  53. package/src/binio.ts +0 -21
  54. package/src/bip39.d.ts +0 -91
  55. package/src/bip39.js +0 -427
  56. package/src/bip39.ts +0 -432
  57. package/src/derive.d.ts +0 -2
  58. package/src/derive.js +0 -13
  59. package/src/derive.ts +0 -11
  60. package/src/index.d.ts +0 -26
  61. package/src/index.js +0 -128
  62. package/src/index.test.ts +0 -5
  63. package/src/index.ts +0 -221
  64. package/src/javaStreamables.d.ts +0 -233
  65. package/src/javaStreamables.js +0 -332
  66. package/src/javaStreamables.ts +0 -403
  67. package/src/lease/LeaseMonitor.d.ts +0 -44
  68. package/src/lease/LeaseMonitor.js +0 -111
  69. package/src/lease/LeaseMonitor.ts +0 -157
  70. package/src/lease/LeaseStore.d.ts +0 -57
  71. package/src/lease/LeaseStore.js +0 -148
  72. package/src/lease/LeaseStore.ts +0 -203
  73. package/src/lease/WatermarkStore.d.ts +0 -61
  74. package/src/lease/WatermarkStore.js +0 -206
  75. package/src/lease/WatermarkStore.ts +0 -270
  76. package/src/lease/index.d.ts +0 -14
  77. package/src/lease/index.js +0 -22
  78. package/src/lease/index.ts +0 -41
  79. package/src/lease-client.d.ts +0 -31
  80. package/src/lease-client.js +0 -44
  81. package/src/lease-client.ts +0 -69
  82. package/src/minima32.d.ts +0 -10
  83. package/src/minima32.js +0 -113
  84. package/src/minima32.test.ts +0 -11
  85. package/src/minima32.ts +0 -127
  86. package/src/minimaWireSerializer.d.ts +0 -189
  87. package/src/minimaWireSerializer.js +0 -311
  88. package/src/minimaWireSerializer.test.ts +0 -466
  89. package/src/minimaWireSerializer.ts +0 -117
  90. package/src/mmr.d.ts +0 -157
  91. package/src/mmr.js +0 -340
  92. package/src/mmr.oracle.test.ts +0 -28
  93. package/src/mmr.ts +0 -429
  94. package/src/mx.test.ts +0 -25
  95. package/src/mx.ts +0 -1
  96. package/src/params.d.ts +0 -29
  97. package/src/params.d.ts.map +0 -1
  98. package/src/params.js +0 -20
  99. package/src/params.js.map +0 -1
  100. package/src/params.ts +0 -44
  101. package/src/script.d.ts +0 -7
  102. package/src/script.js +0 -27
  103. package/src/script.ts +0 -24
  104. package/src/scripts/contract-helpers.ts +0 -609
  105. package/src/scripts/dapp-types.ts +0 -240
  106. package/src/scripts/index.ts +0 -22
  107. package/src/scripts/types.d.ts +0 -81
  108. package/src/scripts/types.js +0 -145
  109. package/src/scripts/types.ts +0 -247
  110. package/src/scripts/witness-serializer.ts +0 -384
  111. package/src/transaction.ts +0 -430
  112. package/src/treekey.d.ts +0 -383
  113. package/src/treekey.js +0 -774
  114. package/src/treekey.parity.test.ts +0 -459
  115. package/src/treekey.ts +0 -975
  116. package/src/tx/TransactionLifecycle.d.ts +0 -55
  117. package/src/tx/TransactionLifecycle.js +0 -188
  118. package/src/tx/TransactionLifecycle.ts +0 -280
  119. package/src/tx/TransactionReceiptStore.d.ts +0 -36
  120. package/src/tx/TransactionReceiptStore.js +0 -89
  121. package/src/tx/TransactionReceiptStore.ts +0 -112
  122. package/src/tx/TransactionService.d.ts +0 -31
  123. package/src/tx/TransactionService.js +0 -140
  124. package/src/tx/TransactionService.ts +0 -252
  125. package/src/tx/index.d.ts +0 -13
  126. package/src/tx/index.js +0 -20
  127. package/src/tx/index.ts +0 -44
  128. package/src/tx/types.d.ts +0 -80
  129. package/src/tx/types.js +0 -6
  130. package/src/tx/types.ts +0 -130
  131. package/src/util.d.ts +0 -1
  132. package/src/util.js +0 -5
  133. package/src/util.ts +0 -1
  134. package/src/utils.d.ts +0 -8
  135. package/src/utils.js +0 -42
  136. package/src/utils.ts +0 -38
  137. package/src/verify.ts +0 -210
  138. package/src/version.ts +0 -13
  139. package/src/wots.d.ts +0 -224
  140. package/src/wots.d.ts.map +0 -1
  141. package/src/wots.js +0 -565
  142. package/src/wots.js.map +0 -1
  143. package/src/wots.ts +0 -651
  144. package/test-vectors.json +0 -45
package/src/treekey.d.ts DELETED
@@ -1,383 +0,0 @@
1
- /**
2
- * TreeKey/TreeKeyNode Implementation matching Minima's TreeKey.java and TreeKeyNode.java
3
- *
4
- * This implements the hierarchical key tree structure where:
5
- * - Each TreeKeyNode contains 64 Winternitz keys
6
- * - The node's PUBLIC KEY = MMR root of all 64 Winternitz public keys
7
- * - Signatures include the Winternitz leaf pubkey + signature + MMR proof
8
- *
9
- * Default structure: 3 levels x 64 keys = 64^3 = 262,144 one-time signatures
10
- */
11
- import { MMRProof, Bytes } from './mmr';
12
- import type { LoggerAdapter } from './adapters';
13
- /**
14
- * Enable TreeKey debug logging with a custom logger
15
- * Use this for parity testing to capture wallet init intermediate values
16
- *
17
- * WARNING: Debug logging outputs sensitive cryptographic material including
18
- * seeds and private key derivation. NEVER enable in production builds.
19
- * This is intended for development/testing parity verification only.
20
- */
21
- export declare function setTreeKeyLogger(logger: LoggerAdapter): void;
22
- /**
23
- * Disable TreeKey debug logging
24
- */
25
- export declare function disableTreeKeyLogger(): void;
26
- /**
27
- * Check if TreeKey debug logging is enabled
28
- */
29
- export declare function isTreeKeyDebugEnabled(): boolean;
30
- export declare const DEFAULT_KEYS_PER_LEVEL = 64;
31
- export declare const DEFAULT_LEVELS = 3;
32
- /**
33
- * Progress callback for key generation
34
- */
35
- export interface KeyGenProgress {
36
- phase: 'wots_keys' | 'mmr_build' | 'address_derive' | 'complete';
37
- current: number;
38
- total: number;
39
- message: string;
40
- }
41
- export type ProgressCallback = (progress: KeyGenProgress) => void;
42
- /**
43
- * SignatureProof structure matching Minima's SignatureProof.java
44
- *
45
- * Contains:
46
- * - leafPubkey: The 32-byte WOTS public key DIGEST (SHA3-256 of full L×32 key)
47
- * - signature: The 1088-byte Winternitz signature (L×32 bytes)
48
- * - mmrProof: Proof linking the leaf pubkey to the tree node's root
49
- *
50
- * CRITICAL FIX (January 2026): Java's Winternitz.getPublicKey() returns a 32-byte digest!
51
- *
52
- * From BouncyCastle WinternitzOTSignature.getPublicKey() (lines 103-121):
53
- * byte[] buf = new byte[keysize * mdsize]; // Full 1088 bytes (34×32)
54
- * // ... hash each chain 255 times into buf ...
55
- * messDigestOTS.update(buf, 0, buf.length); // Hash the full key
56
- * byte[] tmp = new byte[mdsize]; // 32 bytes
57
- * messDigestOTS.doFinal(tmp, 0); // SHA3-256
58
- * return tmp; // Returns 32-byte DIGEST!
59
- *
60
- * Similarly, WinternitzOTSVerify.Verify() recovers the full key then hashes to 32 bytes.
61
- * Winternitz.verify() then compares the 32-byte recovered digest to mPublicKey (32 bytes).
62
- *
63
- * Previous bug: We stored 1088-byte full keys, Java expected 32-byte digests → always failed.
64
- */
65
- export interface SignatureProof {
66
- leafPubkey: Bytes;
67
- signature: Bytes;
68
- mmrProof: MMRProof;
69
- }
70
- /**
71
- * Full Signature structure matching Minima's Signature.java
72
- *
73
- * For a 3-level tree, contains 3 SignatureProofs:
74
- * - Level 0: Signs level 1's root public key
75
- * - Level 1: Signs level 2's root public key
76
- * - Level 2: Signs the actual data
77
- */
78
- export interface TreeSignature {
79
- proofs: SignatureProof[];
80
- }
81
- /**
82
- * Compute root public key from a Winternitz signature proof
83
- * Matches SignatureProof.getRootPublicKey() in Java
84
- */
85
- export declare function getRootPublicKey(proof: SignatureProof): Bytes;
86
- /**
87
- * TreeKeyNode - One node in the key tree containing 64 Winternitz keys
88
- *
89
- * Matches TreeKeyNode.java (see attached_assets/TreeKeyNode_1767574401422.java):
90
- *
91
- * Key generation (lines 44-62):
92
- * - Creates 64 Winternitz keys from a deterministic seed
93
- * - For each key: MiniData pubkey = wots.getPublicKey() returns 32-byte DIGEST
94
- * - Adds to MMR: MMRData.CreateMMRDataLeafNode(pubkey, MiniNumber.ZERO)
95
- * - Public key = MMR root (mPublicKey = mTree.getRoot().getData())
96
- *
97
- * MMR leaf construction (see MMRData.java lines 30-36):
98
- * MMRData.CreateMMRDataLeafNode(pubkeyDigest, MiniNumber.ZERO)
99
- * → hash = Crypto.hashAllObjects(MiniNumber.ZERO, zData, zSumValue)
100
- * → Serialization: [0x00,0x01,0x00] + [4-byte-len + pubkey] + [0x00,0x01,0x00]
101
- *
102
- * MMR parent construction (see MMRData.java lines 38-50):
103
- * MMRData.CreateMMRDataParentNode(left, right)
104
- * → hash = Crypto.hashAllObjects(MiniNumber.ONE, left.data, right.data, sumValue)
105
- *
106
- * IMPORTANT: Minima NEVER stores the 1088-byte full WOTS public key.
107
- * Only the 32-byte digest is stored and used for MMR construction.
108
- */
109
- export declare class TreeKeyNode {
110
- private seed;
111
- private childSeed;
112
- private keysPerLevel;
113
- private publicKeyDigests;
114
- private mmrTree;
115
- private rootPubkey;
116
- private childCache;
117
- constructor(privateSeed: Bytes, keysPerLevel?: number);
118
- /**
119
- * Async factory method for TreeKeyNode with progress reporting
120
- * Yields to event loop every few keys to keep UI responsive
121
- */
122
- static createWithProgress(privateSeed: Bytes, keysPerLevel?: number, onProgress?: ProgressCallback): Promise<TreeKeyNode>;
123
- /**
124
- * Get the public key for this tree node (MMR root of all 64 Winternitz keys)
125
- */
126
- getPublicKey(): Bytes;
127
- /**
128
- * Get the full Winternitz public key at a specific index (0-63)
129
- * Returns the full L×32 byte public key (1088 bytes), derived on-demand
130
- *
131
- * NOTE: This is only used for local signature verification in tests.
132
- * Java's Winternitz.getPublicKey() returns a 32-byte digest, not this.
133
- * For production code, use getWOTSPublicKeyDigest() instead.
134
- *
135
- * @deprecated Use getWOTSPublicKeyDigest() for Minima compatibility
136
- */
137
- getWOTSPublicKey(index: number): Bytes;
138
- /**
139
- * Get the Winternitz public key digest at a specific index (0-63)
140
- * Returns the 32-byte SHA3 hash of the full public key
141
- */
142
- getWOTSPublicKeyDigest(index: number): Bytes;
143
- /**
144
- * Get the MMR proof for a specific key index
145
- */
146
- getProof(keyIndex: number): MMRProof;
147
- /**
148
- * Sign data with a specific key from this node
149
- * Returns a SignatureProof containing the 32-byte leaf pubkey DIGEST, signature, and MMR proof
150
- *
151
- * CRITICAL: Java's WinternitzOTSignature.getSignature() ALWAYS hashes the message first,
152
- * regardless of input length. From BouncyCastle WinternitzOTSignature.java lines 137-138:
153
- * messDigestOTS.update(message, 0, message.length);
154
- * messDigestOTS.doFinal(hash, 0);
155
- *
156
- * We MUST always hash to match Java verification, which also always hashes.
157
- *
158
- * CRITICAL FIX (January 2026): leafPubkey is the 32-byte WOTS public key DIGEST.
159
- * Java's Winternitz.getPublicKey() returns SHA3-256(full_key) = 32 bytes!
160
- * Previous bug: We stored 1088-byte full keys, Java expected 32-byte digests → verification failed.
161
- */
162
- sign(keyIndex: number, data: Bytes): SignatureProof;
163
- /**
164
- * Create a child TreeKeyNode at the specified index
165
- * Matches TreeKeyNode.java getChild()
166
- *
167
- * PERFORMANCE FIX: Child nodes are now cached to avoid regenerating
168
- * 64 WOTS keys on every getChild() call. This is critical for address
169
- * derivation performance where getChild() is called 64 times.
170
- */
171
- getChild(childIndex: number): TreeKeyNode;
172
- }
173
- /**
174
- * TreeKey - Full hierarchical key tree with multiple levels
175
- *
176
- * Matches TreeKey.java:
177
- * - Default: 3 levels x 64 keys = 262,144 one-time signatures
178
- * - Tracks usage count to determine which key to use
179
- * - Produces multi-level signatures
180
- */
181
- export declare class TreeKey {
182
- private privateSeed;
183
- private levels;
184
- private keysPerLevel;
185
- private root;
186
- private publicKey;
187
- private uses;
188
- /**
189
- * Parent-child signature cache for efficiency
190
- * Key format: "l1" for root->level1, "l1,l2" for level1->level2
191
- * Value: SignatureProof for parent signing child's pubkey
192
- */
193
- private parentChildSigCache;
194
- constructor(privateSeed: Bytes, keysPerLevel?: number, levels?: number);
195
- /**
196
- * Async factory method for TreeKey with progress reporting
197
- * Reports progress as the root TreeKeyNode generates its 64 signing keys
198
- */
199
- static createWithProgress(privateSeed: Bytes, keysPerLevel?: number, levels?: number, onProgress?: ProgressCallback): Promise<TreeKey>;
200
- /**
201
- * Get the root TreeKeyNode (for internal use)
202
- */
203
- getRootNode(): TreeKeyNode;
204
- /**
205
- * Get the root public key (for watermark tracking)
206
- */
207
- getRootPublicKey(): Bytes;
208
- /**
209
- * Get the wallet's public key (root of the key tree)
210
- */
211
- getPublicKey(): Bytes;
212
- /**
213
- * Get the maximum number of signatures this tree can produce
214
- */
215
- getMaxUses(): number;
216
- /**
217
- * Get current usage count
218
- */
219
- getUses(): number;
220
- /**
221
- * Set the usage counter (for resuming from a known state)
222
- */
223
- setUses(uses: number): void;
224
- /**
225
- * Generate cache key for parent-child signature
226
- * @param path - Array of indices leading to the child (e.g., [l1] or [l1, l2])
227
- */
228
- private getCacheKey;
229
- /**
230
- * Check if a parent-child signature is cached
231
- * @param path - Array of indices (e.g., [l1] for root->level1)
232
- */
233
- hasParentChildSig(path: number[]): boolean;
234
- /**
235
- * Get a cached parent-child signature
236
- * @param path - Array of indices (e.g., [l1] for root->level1)
237
- */
238
- getParentChildSig(path: number[]): SignatureProof | undefined;
239
- /**
240
- * Cache a parent-child signature for reuse
241
- * This allows the same signature to be reused across multiple signing operations
242
- *
243
- * @param path - Array of indices leading to the child (e.g., [l1] or [l1, l2])
244
- * @param sig - SignatureProof from parent signing child's public key
245
- */
246
- setParentChildSig(path: number[], sig: SignatureProof): void;
247
- /**
248
- * Get all cached parent-child signatures (for serialization/persistence)
249
- */
250
- getCachedSignatures(): Map<string, SignatureProof>;
251
- /**
252
- * Restore cached signatures (for hydrating from persistence)
253
- */
254
- restoreCachedSignatures(cache: Map<string, SignatureProof>): void;
255
- /**
256
- * Convert a usage number to the path through the tree
257
- * Matches TreeKey.java baseConversion()
258
- *
259
- * For uses=0: [0,0,0]
260
- * For uses=1: [0,0,1]
261
- * For uses=64: [0,1,0]
262
- * etc.
263
- */
264
- private baseConversion;
265
- /**
266
- * Sign data with the current key and increment usage
267
- *
268
- * Matches TreeKey.java sign():
269
- * - Determines path through tree based on usage count
270
- * - Each level's key signs the next level's root public key
271
- * - Final level signs the actual data
272
- *
273
- * CRITICAL FIX (January 2026): Build proofs bottom-up to sign child's getRootPublicKey()
274
- *
275
- * Java's TreeKey.verify() verifies non-leaf signatures against childsig.getRootPublicKey(),
276
- * which is the 32-byte MMR root computed from the NEXT proof's leafPubkey + MMRproof.
277
- *
278
- * Uses parent-child signature caching for efficiency:
279
- * - Parent-child signatures are cached and reused
280
- * - Only the final data signature is computed fresh each time
281
- */
282
- sign(data: Bytes): TreeSignature;
283
- /**
284
- * Get the public key for a level-1 address (single index)
285
- * This is the MMR root of the level-1 TreeKeyNode's 64 Winternitz keys.
286
- *
287
- * Use this for wallet addresses where each address = one level-1 node.
288
- *
289
- * @param l1 - Level 1 index (0-63, corresponds to wallet address index)
290
- * @returns 32-byte MMR root public key for SIGNEDBY scripts
291
- */
292
- getAddressPublicKey(l1: number): Bytes;
293
- /**
294
- * Get the public key for a specific signing key at tree index (l1, l2)
295
- * This navigates to the level-2 node for signing operations.
296
- *
297
- * @param l1 - Level 1 index (address)
298
- * @param l2 - Level 2 index (signing key within address)
299
- * @returns 32-byte MMR root public key of level-2 node
300
- */
301
- getSigningNodePublicKey(l1: number, l2: number): Bytes;
302
- }
303
- /**
304
- * Verify a tree signature against expected public key and data
305
- *
306
- * Matches TreeKey.java verify():
307
- * - First proof's computed root must match expected public key
308
- * - Each intermediate proof must sign the next level's root
309
- * - Final proof must verify against the actual data
310
- */
311
- export declare function verifyTreeSignature(expectedPubkey: Bytes, data: Bytes, signature: TreeSignature): boolean;
312
- /**
313
- * Serialize a TreeSignature to bytes
314
- *
315
- * Uses Streamable.writeSignature() for byte-exact compatibility
316
- * with Java's Signature.writeDataStream().
317
- */
318
- export declare function serializeTreeSignature(sig: TreeSignature): Bytes;
319
- /**
320
- * Deserialize a TreeSignature from bytes
321
- *
322
- * Matches Java's Signature.readDataStream():
323
- * - Number of proofs: MiniNumber format
324
- * - Each SignatureProof: MiniData(pubkey) + MiniData(signature) + MMRProof
325
- */
326
- export declare function deserializeTreeSignature(data: Bytes): TreeSignature;
327
- /**
328
- * ============================================================================
329
- * PER-ADDRESS TREEKEY FACTORY
330
- * ============================================================================
331
- *
332
- * Minima Wallet.createNewKey() creates independent TreeKeys per address:
333
- * MiniData modifier = new MiniData(new BigInteger(Integer.toString(numkeys)));
334
- * MiniData privseed = Crypto.getInstance().hashObjects(baseSeed, modifier);
335
- * TreeKey treekey = TreeKey.createDefault(privseed);
336
- *
337
- * Each address gets its own TreeKey with:
338
- * - Unique seed derived from baseSeed + addressIndex
339
- * - Size=64, depth=3 (matching TreeKey.createDefault)
340
- * - 4096 one-time signatures per address (64×64)
341
- *
342
- * Total wallet capacity: 64 addresses × 4096 signatures = 262,144 signatures
343
- * ============================================================================
344
- */
345
- /**
346
- * Create a per-address TreeKey matching Minima Wallet.createNewKey()
347
- *
348
- * @param baseSeed - 32-byte wallet base seed (from mnemonic)
349
- * @param addressIndex - Address index (0-63)
350
- * @returns TreeKey for this address with size=64, depth=3
351
- */
352
- export declare function createPerAddressTreeKey(baseSeed: Bytes, addressIndex: number): TreeKey;
353
- /**
354
- * Async version with progress reporting for UI
355
- *
356
- * @param baseSeed - 32-byte wallet base seed
357
- * @param addressIndex - Address index (0-63)
358
- * @param onProgress - Optional progress callback
359
- * @returns Promise resolving to TreeKey for this address
360
- */
361
- export declare function createPerAddressTreeKeyAsync(baseSeed: Bytes, addressIndex: number, onProgress?: ProgressCallback): Promise<TreeKey>;
362
- /**
363
- * Derive address public key from base seed and address index
364
- *
365
- * This is the fast path for getting an address public key without
366
- * needing to construct the full TreeKey. Useful for address derivation
367
- * during wallet initialization.
368
- *
369
- * @param baseSeed - 32-byte wallet base seed
370
- * @param addressIndex - Address index (0-63)
371
- * @returns 32-byte address public key (MMR root of per-address TreeKey)
372
- */
373
- export declare function deriveAddressPublicKey(baseSeed: Bytes, addressIndex: number): Bytes;
374
- /**
375
- * Get the address public key from a per-address TreeKey
376
- *
377
- * In the per-address architecture, each address has its own TreeKey,
378
- * and the address public key is simply the TreeKey's root public key.
379
- *
380
- * @param treeKey - Per-address TreeKey
381
- * @returns 32-byte address public key (TreeKey root)
382
- */
383
- export declare function getPerAddressPublicKey(treeKey: TreeKey): Bytes;