@swapkit/toolboxes 4.15.8 → 4.15.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.
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Standard BIP-39 test mnemonic (all-zero index, the "abandon…about" phrase) used
3
+ * across toolbox test suites. Derives to well-known, publicly-documented addresses
4
+ * so test fixtures stay deterministic without requiring a private key file.
5
+ *
6
+ * Do NOT use this phrase for anything other than tests — the resulting keys are
7
+ * known to anyone reading BIP-39 spec examples.
8
+ */
9
+ export declare const TEST_MNEMONIC = "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about";
10
+ /**
11
+ * Captures a plain-object snapshot of an ESM namespace import so it can be
12
+ * re-installed via `mock.module(...)` in `afterAll`.
13
+ *
14
+ * Why this exists: bun's `mock.module` mutates the namespace binding in place.
15
+ * If you spread the namespace inside `afterAll` (e.g. `mock.module("foo", () => ({ ...realFoo }))`),
16
+ * you get the **mocked** version, not the real one, because `realFoo` has already been replaced.
17
+ * Taking the snapshot at module load time (before any `mock.module` runs) captures the
18
+ * genuine exports.
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * import * as realXrpl from "xrpl";
23
+ * const realXrplSnapshot = snapshotModule(realXrpl);
24
+ *
25
+ * mock.module("xrpl", () => ({ ...realXrplSnapshot, Client: MockClient }));
26
+ *
27
+ * afterAll(() => {
28
+ * mock.module("xrpl", () => realXrplSnapshot);
29
+ * });
30
+ * ```
31
+ */
32
+ export declare function snapshotModule<T extends object>(namespace: T): T;
33
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/__tests__/helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,kGACuE,CAAC;AAElG;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,EAAE,SAAS,EAAE,CAAC,GAAG,CAAC,CAEhE"}
package/package.json CHANGED
@@ -33,8 +33,8 @@
33
33
  "@stricahq/bip32ed25519": "1.1.2",
34
34
  "@stricahq/cbors": "~1.0.2",
35
35
  "@stricahq/typhonjs": "~3.0.1",
36
- "@swapkit/helpers": "4.13.5",
37
- "@swapkit/utxo-signer": "2.1.1",
36
+ "@swapkit/helpers": "4.13.7",
37
+ "@swapkit/utxo-signer": "2.1.2",
38
38
  "@ton/crypto": "~3.3.0",
39
39
  "@ton/ton": "~15.4.0",
40
40
  "bignumber.js": "~9.3.1",
@@ -196,5 +196,5 @@
196
196
  "type-check:go": "tsgo"
197
197
  },
198
198
  "type": "module",
199
- "version": "4.15.8"
199
+ "version": "4.15.10"
200
200
  }