@ledgerhq/ledger-key-ring-protocol 0.14.0 → 0.14.1-nightly.20260606030643

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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @ledgerhq/live-wallet
2
2
 
3
+ ## 0.14.1-nightly.20260606030643
4
+
5
+ ### Patch Changes
6
+
7
+ - [#17817](https://github.com/LedgerHQ/ledger-live/pull/17817) [`3e71e65`](https://github.com/LedgerHQ/ledger-live/commit/3e71e6532036db0bbaa5a99650d43801bbfe712b) Thanks [@gre-ledger](https://github.com/gre-ledger)! - Add `ringInitPreservesLedgerSyncMember` SDK e2e scenario covering the trustchain-backend behaviour where deriving a new application id (17, used by wallet-cli `ring init`) must not evict members previously added under another application id (16, used by Ledger Sync). The scenario asserts the Ledger Sync member is preserved after the ring derivation; the committed snapshot is recorded against the fixed backend.
8
+
9
+ `sdkForName` in the scenario harness now accepts an optional `applicationId` so a single scenario can exercise multiple derivation apps from the same device. The recorder captures request bodies at `request:start` (they are already consumed by `response:bypass`), decodes compressed response bodies before storing them, and excludes speculos loopback traffic from the snapshot.
10
+
11
+ - Updated dependencies [[`b14d5cc`](https://github.com/LedgerHQ/ledger-live/commit/b14d5cc29cc75c6be2e565db3d4d0ab400cc56d9), [`ec38133`](https://github.com/LedgerHQ/ledger-live/commit/ec38133ab6b2c18d329e1c78320b7c2a1f80fbfc), [`8c0f5f2`](https://github.com/LedgerHQ/ledger-live/commit/8c0f5f22e66aa6a34a3363a256d3da2d98d07dc9)]:
12
+ - @ledgerhq/live-env@2.38.0-nightly.20260606030643
13
+ - @ledgerhq/errors@6.36.0-nightly.20260606030643
14
+ - @ledgerhq/hw-ledger-key-ring-protocol@0.10.5-nightly.20260606030643
15
+ - @ledgerhq/live-network@2.6.4-nightly.20260606030643
16
+ - @ledgerhq/speculos-transport@0.10.4-nightly.20260606030643
17
+ - @ledgerhq/hw-transport@6.35.4-nightly.20260606030643
18
+ - @ledgerhq/hw-transport-mocker@6.34.4-nightly.20260606030643
19
+
3
20
  ## 0.14.0
4
21
 
5
22
  ### Minor Changes
package/README.md CHANGED
@@ -1,3 +1,58 @@
1
1
  ## ledger key ring protocol
2
2
 
3
3
  Ledger Key Ring Protocol layer.
4
+
5
+ ## Testing the SDK with recorded scenarios
6
+
7
+ The SDK is exercised end-to-end through **scenarios** that are recorded once against
8
+ real infrastructure and then **replayed** deterministically in unit tests — no device
9
+ and no network needed in CI.
10
+
11
+ ### The three pieces
12
+
13
+ - **Scenarios** — `tests/scenarios/*.ts`. Each file exports a
14
+ `scenario(deviceId, options)` function (and optional `recorderConfig`) that drives the
15
+ SDK through a real user flow and asserts the expected behaviour with `expect(...)`. The
16
+ same function is used both to record and to replay, so an assertion failure is caught in
17
+ either mode. See `tests/scenarios/_template.ts` to start a new one.
18
+
19
+ - **Snapshots** — `mocks/scenarios/<slug>.json`. Recorded once per scenario, they capture
20
+ everything needed to replay it deterministically:
21
+ - `apdus` — the device APDU exchanges (replayed via `openTransportReplayer`),
22
+ - `http.transactions` — the trustchain-backend HTTP traffic (request + response),
23
+ - `crypto` — the random bytes / keypairs generated, so the run is reproducible.
24
+
25
+ - **Tests** — `src/__tests__/integration/`:
26
+ - `sdk.test.ts` replays every snapshot: APDUs come from the recorded store, HTTP is
27
+ served by MSW from the recorded transactions, and `crypto` randomness is mocked from
28
+ the recorded outputs. Each request is matched against the snapshot, so a change in SDK
29
+ behaviour (different call, body, or order) fails the test.
30
+ - `mock.sdk.test.ts` runs the same scenarios against the in-memory mock SDK
31
+ (`MOCK=1`), skipping the ones listed as non-mockable.
32
+
33
+ ### Recording / re-recording a snapshot
34
+
35
+ Recording runs the scenario for real — against a Speculos device (Docker) and the staging
36
+ trustchain backend — and writes the snapshot. Prerequisites:
37
+
38
+ - Docker running (Speculos is launched in a container),
39
+ - `COIN_APPS` pointing to a clone of [coin-apps](https://github.com/LedgerHQ/coin-apps)
40
+ (provides the Ledger Sync app loaded into Speculos),
41
+ - network access to staging.
42
+
43
+ ```sh
44
+ COIN_APPS=/path/to/coin-apps pnpm --filter @ledgerhq/ledger-key-ring-protocol e2e
45
+ ```
46
+
47
+ The script only records snapshots that don't exist yet, so to **re-record** one (e.g. after
48
+ a backend change), delete its JSON first:
49
+
50
+ ```sh
51
+ rm mocks/scenarios/<slug>.json
52
+ COIN_APPS=/path/to/coin-apps pnpm --filter @ledgerhq/ledger-key-ring-protocol e2e
53
+ ```
54
+
55
+ Set `RUN_EVEN_IF_SNAPSHOT_EXISTS=1` to run a scenario live without overwriting its snapshot
56
+ (handy to check it still passes against staging). Speculos loopback traffic is filtered out
57
+ of the snapshot, and compressed response bodies are decoded before being stored, so the
58
+ replay can serve them as plain JSON.
@@ -0,0 +1,558 @@
1
+ {
2
+ "apdus": "=> e0050000c40101070201001210da4dccc19144bebb73f7a39c2bbfcaec14010115483046022100a4c2263554e6f583fbc64c661409f9d2b38d7d8c6038e3380a186d16c069d8470221008003dc84fe2d09ae6c8ce9ce77462488a5ddccee85587c6bf197f8ff829a838816046a214554202b7472757374636861696e2d6261636b656e642e6170692e6177732e7374672e6c64672d746563682e636f6d320121332103cb7628e7248ddf9c07da54b979f16bf081fb3d173aac0992ad2a44ef6a388ae2600401000000\n<= 00210121038a24a93fc923663957463c326323553bc120afdcb7c29b01b91e00cfec389c64473045022100a887ee6dd38c97e51cd5d37e5814559224807a97c37521237b2630f48efad597022058af90a1f1518e1ef5430c14d8feaec5cc03a3cb8284aff86f32ddbebe62e0e2000021012103cce710b4ace62a3597e5b9853463b6bbc45a7d198bf7b698dd885c4fedf98f9d473045022100b3f4eb879080a4c01cec256d12360515c1c1e26463d04242af978bab11ea5516022019fc9ed020dc25356ce931ab058d97d495f82d9e2b8c929a4d6e6f7f813ea0209000\n=> e0060000210337247a81006567a291ee1b75e0d0039e102c7bc1c92771645c25a9796551cc20\n<= 9000\n=> e00700004b010101022096826ae7a702799f59a271b59303d87712ec04de21b4c26d582e4d51cc0c54460621030000000000000000000000000000000000000000000000000000000000000000010101\n<= 00104a78491cad32644d17fc0ead4092f8b68131688557b87ee5f114b465ac3157f93121060653a611483dd73a6a9fce7e37b756edbe4132bcf3e3abdc9f088fe4da33a19b9000\n=> e0070100a210a005000102000006210000000000000000000000000000000000000000000000000000000000000000000510000000000000000000000000000000000540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000621000000000000000000000000000000000000000000000000000000000000000000\n<= 00104f98c3e9409ad4467913744487fff2d182600e5660a91128e7bd39bc1293a2a1f20287d74624836d0fa9fe3fa8a6cedc3b36d9fe00bd2959c308fc25505a909c3b7b72cb163645cd6413c00913a03ecc41df8f11736638f76bd968600743ea18247ac061e47711364363afd2044a603a9350032103c67243df1229238e78cf01d9164518c4a3a873c5c19e09546f3b507c4def14340410b200b2bb1e52c6e653189aa8fc39fa3b05210346dd1a08066fe65efc1e2cfdc10d03af3bbe9f431f1d70de58c0ba38ee64c1919000\n=> e007020000\n<= 463044022042e2f466f506fc47ff193389a76ceafd0ff4858c02c1b88e3a94c722195e13c0022063aa7987b6b954eb69dd8adb489c14d06be065a3d3945f023cac197c7a25d6350002023e864bdb590996e9ab6b8644ad775e54db2ae9c9b6dfecfbb9eaf0760cec059000\n=> e00600002103c799a70d38e1ee4f02f1df5b5c49c1f2d46df9426bc5ef04c52ff741b172d889\n<= 9000\n=> e00800004b010101022096826ae7a702799f59a271b59303d87712ec04de21b4c26d582e4d51cc0c54460621038a24a93fc923663957463c326323553bc120afdcb7c29b01b91e00cfec389c64010101\n<= 9000\n=> e0080101b210b005000102000006210346dd1a08066fe65efc1e2cfdc10d03af3bbe9f431f1d70de58c0ba38ee64c1910510b200b2bb1e52c6e653189aa8fc39fa3b0550d1d0c36c7cd53502ba02d542f7a8ed28e3071a9d7acf755478470266732019d663d7a6588bb0798dc371e051a476b7162ad9e77215f7522260ab12c4391489ea99aaee175dfbb5e9764562f154acf92b062103c67243df1229238e78cf01d9164518c4a3a873c5c19e09546f3b507c4def1434\n<= 9000\n=> e00802004803463044022042e2f466f506fc47ff193389a76ceafd0ff4858c02c1b88e3a94c722195e13c0022063aa7987b6b954eb69dd8adb489c14d06be065a3d3945f023cac197c7a25d635\n<= 9000\n=> e00700004b0101010220e29141c8608488497afddfceaff593e9051d065ebd5631548c69ffd943aeb67c0621030000000000000000000000000000000000000000000000000000000000000000010103\n<= 0010d1db9e8705b4722c83df03f4eb53c1de81314e8abecaae35a9b404711ad0375fe178641210b8bb6f0bb9c933460181bf3b7eea37b36221d3a8c184e0bdfea699b52e2f9000\n=> e0070100181516050c8000000080000010800000000600050005000600\n<= 0010772f88cc50f8d05cd74a0e88b72d19888260778c881469d8fce2ff2a9cb98fa02bfae2233dc1fe63fb06622dafb17e78f16f0d75bf3918e32b57a5538d0aa2542bb9df4ed56f24cac5cf0d4785ff00d6925aaa0872b40df48fc6c053d47376ce343c73bba6cee19085a3cd6fb0485cf73fa6032103214266082c1daab7f6e351d2059214b75ca957d76360c2edf05b4e78fb54f6df041008b7100d6b8239ee613de34c90a42a07052102f1e31902fae8ba31ab69361db45dfcd158d60594576c1fcbee4823222e2f1b419000\n=> e00701003f113d04124c65646765722053796e63206d656d6265720621032f89642fabcc1edf2f678cebdf4026f0c8ab354b99ac9127716d7db622fe647c0104ffffffff\n<= 001020f1c17832ad363b81a0e62baf130a7a864435f58db3c5cb896b856d1bfa8cf4de68ecafd09f4f08bab9c8a426bfd103c4a7826df986d55a24d61b7d3e30d8b69365ce37300f33afcb1f5aeb0ae21dc4fea822865f799000\n=> e00701002b1229050005000621032f89642fabcc1edf2f678cebdf4026f0c8ab354b99ac9127716d7db622fe647c0600\n<= 00101ee14ab22dc0df03f99f2f1991f091c38260f3e10fd74bd304b043440c2d4a7874fb64456006f88b37c66a29ca08e7b3712ecbf16391fbe59cb3f372a38569e72fca1e94bd3932fded20364b24521cdffa39e7d99cdc8e906a20fd8416639dc9378db5be519c1ba92dd238632a6d0701e3ed032103dcb22d4217d83350a43695f3b77ec8a0e3d74ba015c8480d4bab70b9424ab6ac04109dc8fe1e68e44a17f85491cdb74203d5862057e746c3ef95858c8d9244edbda97d76abc3875e6b9ac876d0b903142f4aee9d9000\n=> e007020000\n<= 4630440220098c43ee6f370d7b2e7eadcd08a81c64a057747e858c30e56bb0f711ea0971b602203d908e9f073700c374b2e86638589db56fe81e3bbe2812bb0e5b361959f13017000379a81921b58ad7ca456be35ff9d83aea8821492d79e8db3ed96fff8467954d7a9000\n=> e0050000c30101070201001210794a791b9758770647412909f78379281401011547304502207dfbe206111001fd366a6e60ed4332a1a15c5199343fe8b52610f5d325c0e3f0022100871602e3ac5ce7a317dfc3b1ebfb4caa30e4e06f7038e63b72852870053e0dbe16046a214557202b7472757374636861696e2d6261636b656e642e6170692e6177732e7374672e6c64672d746563682e636f6d320121332103cb7628e7248ddf9c07da54b979f16bf081fb3d173aac0992ad2a44ef6a388ae2600401000000\n<= 00210121038a24a93fc923663957463c326323553bc120afdcb7c29b01b91e00cfec389c64473045022100c901d2809334af8159fb091933a1d8c9a0b9d52c1f8e0b50f205b9eb6ebe7bd002204381e221c50c48d3b0fd4411a80bde1a75c81dcb4a1f6b377a244cdd73f5165c000021012103cce710b4ace62a3597e5b9853463b6bbc45a7d198bf7b698dd885c4fedf98f9d46304402207ec59931f536ee39355ca3a13752705f611a6647f6a43c55bb95058f4e85ef97022024c5862a72cae5d77cdf8ee0d82bc574c276e1ff0736e53fd599e43716cc627b9000\n=> e00600002102a71ae657ad6eb2def0b956c23ebe349e7774f2f7c230619d88a7e624d9e9ccf3\n<= 9000\n=> e00800004b010101022096826ae7a702799f59a271b59303d87712ec04de21b4c26d582e4d51cc0c54460621038a24a93fc923663957463c326323553bc120afdcb7c29b01b91e00cfec389c64010101\n<= 9000\n=> e0080101b210b005000102000006210346dd1a08066fe65efc1e2cfdc10d03af3bbe9f431f1d70de58c0ba38ee64c1910510b200b2bb1e52c6e653189aa8fc39fa3b0550d1d0c36c7cd53502ba02d542f7a8ed28e3071a9d7acf755478470266732019d663d7a6588bb0798dc371e051a476b7162ad9e77215f7522260ab12c4391489ea99aaee175dfbb5e9764562f154acf92b062103c67243df1229238e78cf01d9164518c4a3a873c5c19e09546f3b507c4def1434\n<= 9000\n=> e00802004803463044022042e2f466f506fc47ff193389a76ceafd0ff4858c02c1b88e3a94c722195e13c0022063aa7987b6b954eb69dd8adb489c14d06be065a3d3945f023cac197c7a25d635\n<= 9000\n=> e00700004b0101010220e29141c8608488497afddfceaff593e9051d065ebd5631548c69ffd943aeb67c0621030000000000000000000000000000000000000000000000000000000000000000010103\n<= 00108ba1f97aae41a46e6b881fbda4c0698b8131a0a91feca8e92d92dd33b38ade7329e545f2714412615cc092d1d40d4f129790de91c0345c562c8242993e91fe0700629f9000\n=> e0070100181516050c8000000080000011800000000600050005000600\n<= 00100711c5e0f4daa423dd1987ced90f95648260071b35c4c3901162d819a5ebea1a0bdf204ee17887311a583eb94eb5c1efdfeb10dea8fc6517d1391f37a48ccdf90b24404cf2b837fa4ebd68ea28325cbf6b383637bdd1aae826bbbfaaca9273f3f6db15a8215de4a8c32496dbbc4956e4a4da032103186aa28ed2df67c2a4eed0fc4e88b3510025aa0e437ad8f1299e5b8afbf72b3f0410b08fde5ed082cc3c0bebf9afab623ab305210221621a1b9264b790da3c73ffb229e61629c3ed74674f76312ec6b69da60186da9000\n=> e0070100431141041677616c6c65742d636c692072696e67206d656d626572062102b41d8f8b3885a341348dbcd1d0e28ad3cb178e021e1b9eb4d76dbe04bc770c620104ffffffff\n<= 0010500332a9a998097df5e54cef0bb6779f8644ed923f4e78bf1c36f694150339bd598c9f36e74086a207b4ff0ca8dd24f3758f47c8638aec0ed3e6cb86c34cae25a4e05b5a3c056f97102d1a6a285e9d2e72e9e5ceb48e9000\n=> e00701002b122905000500062102b41d8f8b3885a341348dbcd1d0e28ad3cb178e021e1b9eb4d76dbe04bc770c620600\n<= 0010fbc03172d4994a90689049b8937c623c826086a4f3f5fc6d6de5845f13d152604d2f3a3916057bc3a1054525acf6ebf883ff70c35060b679a3d2a192ed26780d1b4b5c6b495af6dc97a74ee86bacbf9dcf773308aae245e559095df0c7c2dc090dd0a1e1e6b342d2ac513fe4dd057954a333032102c8e4c05e1de3497f45a536d895876b83ea8afe01b797fb17a0dee62d59ffc1360410146bba095106f85cbd6ffba974b7286f86208668ffb7ede39ca6e515e05f288644a09b86cca05bdbf579131cedf257c0d55a9000\n=> e007020000\n<= 4730450221008bf42ed729367c4c8e646acb39c9393ea52f4ae80288709e56e48ca48ca044ca0220624f186fe78f72209171eda141ce7d0421ff9d02e2e21d8be35ddaa372c3f2da0102e89cd00bed45c99b451ba07e5d40847f7c6aa439d349ea0794586a13029f30c19000\n",
3
+ "crypto": {
4
+ "randomBytesOutputs": [
5
+ "5707c4cfc01608e5d1beb5a136c8f32c9a5fbdc901d251d620500379e5d875e5",
6
+ "96826ae7a702799f59a271b59303d87712ec04de21b4c26d582e4d51cc0c5446"
7
+ ],
8
+ "randomKeypairOutputs": [
9
+ "ee45cb9cce2e7ce94d4908bdc962a6adcf5ffde33aee38e2374efc195f4c4e7f",
10
+ "ff3f21ea79b7bdd7b2bd4402bdda3081203886adfd635bf12c5c4b7012239d12",
11
+ "36042165a31acaf935e01c27c380432b5e464f1464c8b7066111623d9d146983",
12
+ "d660c17d870661cf423f041c999306f9b05ea0673c47a64c7b49a64298a54c20",
13
+ "3d69bd0e00798b49147b80fcb842dbf4d4d3e34998c9f46178015b4f6fd3a9b8",
14
+ "1243bed5ad201a3f71c719941f06f4b3233120f04cc1ef587bc1f8f33189ccd8",
15
+ "8fd0453838430e183fc70ee2e1aeb004e7007d60209414d8b5f4c192f3afdb69"
16
+ ]
17
+ },
18
+ "http": {
19
+ "transactions": [
20
+ {
21
+ "request": {
22
+ "url": "https://trustchain-backend.api.aws.stg.ldg-tech.com/v1/challenge",
23
+ "method": "GET",
24
+ "headers": {
25
+ "accept": "application/json, text/plain, */*",
26
+ "accept-encoding": "gzip, compress, deflate, br",
27
+ "connection": "close",
28
+ "host": "trustchain-backend.api.aws.stg.ldg-tech.com",
29
+ "user-agent": "axios/1.13.5"
30
+ }
31
+ },
32
+ "response": {
33
+ "status": 200,
34
+ "headers": {
35
+ "cache-control": "no-store, no-cache, max-age=0",
36
+ "connection": "close",
37
+ "content-type": "application/json",
38
+ "date": "Thu, 04 Jun 2026 08:58:51 GMT",
39
+ "expires": "Thu, 01 Jan 1970 00:00:00 GMT",
40
+ "pragma": "no-cache",
41
+ "strict-transport-security": "max-age=31536000; includeSubDomains",
42
+ "transfer-encoding": "chunked"
43
+ },
44
+ "body": "{\"json\":{\"version\":0,\"challenge\":{\"data\":\"da4dccc19144bebb73f7a39c2bbfcaec\",\"expiry\":\"2026-06-04T09:28:52Z\"},\"host\":\"trustchain-backend.api.aws.stg.ldg-tech.com\",\"rp\":[{\"credential\":{\"version\":0,\"curveId\":33,\"signAlgorithm\":1,\"publicKey\":\"03cb7628e7248ddf9c07da54b979f16bf081fb3d173aac0992ad2a44ef6a388ae2\"},\"signature\":\"3046022100a4c2263554e6f583fbc64c661409f9d2b38d7d8c6038e3380a186d16c069d8470221008003dc84fe2d09ae6c8ce9ce77462488a5ddccee85587c6bf197f8ff829a8388\"}],\"protocolVersion\":{\"major\":1,\"minor\":0,\"patch\":0}},\"tlv\":\"0101070201001210da4dccc19144bebb73f7a39c2bbfcaec14010115483046022100a4c2263554e6f583fbc64c661409f9d2b38d7d8c6038e3380a186d16c069d8470221008003dc84fe2d09ae6c8ce9ce77462488a5ddccee85587c6bf197f8ff829a838816046a214554202b7472757374636861696e2d6261636b656e642e6170692e6177732e7374672e6c64672d746563682e636f6d320121332103cb7628e7248ddf9c07da54b979f16bf081fb3d173aac0992ad2a44ef6a388ae2600401000000\"}"
45
+ }
46
+ },
47
+ {
48
+ "request": {
49
+ "url": "https://trustchain-backend.api.aws.stg.ldg-tech.com/v1/authenticate",
50
+ "method": "POST",
51
+ "headers": {
52
+ "accept": "application/json, text/plain, */*",
53
+ "accept-encoding": "gzip, compress, deflate, br",
54
+ "connection": "close",
55
+ "content-length": "1072",
56
+ "content-type": "application/json",
57
+ "host": "trustchain-backend.api.aws.stg.ldg-tech.com",
58
+ "user-agent": "axios/1.13.5"
59
+ },
60
+ "body": "{\"challenge\":{\"version\":0,\"challenge\":{\"data\":\"da4dccc19144bebb73f7a39c2bbfcaec\",\"expiry\":\"2026-06-04T09:28:52Z\"},\"host\":\"trustchain-backend.api.aws.stg.ldg-tech.com\",\"rp\":[{\"credential\":{\"version\":0,\"curveId\":33,\"signAlgorithm\":1,\"publicKey\":\"03cb7628e7248ddf9c07da54b979f16bf081fb3d173aac0992ad2a44ef6a388ae2\"},\"signature\":\"3046022100a4c2263554e6f583fbc64c661409f9d2b38d7d8c6038e3380a186d16c069d8470221008003dc84fe2d09ae6c8ce9ce77462488a5ddccee85587c6bf197f8ff829a8388\"}],\"protocolVersion\":{\"major\":1,\"minor\":0,\"patch\":0}},\"signature\":{\"credential\":{\"version\":0,\"curveId\":33,\"signAlgorithm\":1,\"publicKey\":\"038a24a93fc923663957463c326323553bc120afdcb7c29b01b91e00cfec389c64\"},\"signature\":\"3045022100a887ee6dd38c97e51cd5d37e5814559224807a97c37521237b2630f48efad597022058af90a1f1518e1ef5430c14d8feaec5cc03a3cb8284aff86f32ddbebe62e0e2\",\"attestation\":\"000021012103cce710b4ace62a3597e5b9853463b6bbc45a7d198bf7b698dd885c4fedf98f9d473045022100b3f4eb879080a4c01cec256d12360515c1c1e26463d04242af978bab11ea5516022019fc9ed020dc25356ce931ab058d97d495f82d9e2b8c929a4d6e6f7f813ea020\"}}"
61
+ },
62
+ "response": {
63
+ "status": 200,
64
+ "headers": {
65
+ "cache-control": "no-store, no-cache, max-age=0",
66
+ "connection": "close",
67
+ "content-type": "application/json",
68
+ "date": "Thu, 04 Jun 2026 08:58:52 GMT",
69
+ "expires": "Thu, 01 Jan 1970 00:00:00 GMT",
70
+ "pragma": "no-cache",
71
+ "strict-transport-security": "max-age=31536000; includeSubDomains",
72
+ "transfer-encoding": "chunked"
73
+ },
74
+ "body": "{\"access_token\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJpc3MiOiJ0cnVzdGNoYWluLWJhY2tlbmQuYXBpLmF3cy5zdGcubGRnLXRlY2guY29tIiwic3ViIjoiMDM4YTI0YTkzZmM5MjM2NjM5NTc0NjNjMzI2MzIzNTUzYmMxMjBhZmRjYjdjMjliMDFiOTFlMDBjZmVjMzg5YzY0IiwiYXVkIjpbIkNsb3VkU3luYyIsIkVuY3J5cHRpb25DTEkiLCJ0cnVzdGNoYWluIl0sImV4cCI6MTc4MDU2MzgzMywiaWF0IjoxNzgwNTYzNTMyLCJqdGkiOiJiYTg3Y2QzOS0zNGE2LTQwMGQtYmE4OC1iMWI5MjM0OWU2YmQiLCJwZXJtaXNzaW9ucyI6e30sImRldmljZSI6dHJ1ZSwicmVmcmVzaEV4cGlyYXRpb24iOiIyMDI2LTA2LTA0VDA5OjU4OjUzWiJ9.2V3q9RVz2K3499xc1j9BVuoyiTduqDCUAl3GRDIAhh-FKtjn-Qfhwry0z4ItEgehOfXhLEzbfIoJIsJhVfQ2Wg\",\"permissions\":{}}"
75
+ }
76
+ },
77
+ {
78
+ "request": {
79
+ "url": "https://trustchain-backend.api.aws.stg.ldg-tech.com/v1/trustchains",
80
+ "method": "GET",
81
+ "headers": {
82
+ "accept": "application/json, text/plain, */*",
83
+ "accept-encoding": "gzip, compress, deflate, br",
84
+ "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJpc3MiOiJ0cnVzdGNoYWluLWJhY2tlbmQuYXBpLmF3cy5zdGcubGRnLXRlY2guY29tIiwic3ViIjoiMDM4YTI0YTkzZmM5MjM2NjM5NTc0NjNjMzI2MzIzNTUzYmMxMjBhZmRjYjdjMjliMDFiOTFlMDBjZmVjMzg5YzY0IiwiYXVkIjpbIkNsb3VkU3luYyIsIkVuY3J5cHRpb25DTEkiLCJ0cnVzdGNoYWluIl0sImV4cCI6MTc4MDU2MzgzMywiaWF0IjoxNzgwNTYzNTMyLCJqdGkiOiJiYTg3Y2QzOS0zNGE2LTQwMGQtYmE4OC1iMWI5MjM0OWU2YmQiLCJwZXJtaXNzaW9ucyI6e30sImRldmljZSI6dHJ1ZSwicmVmcmVzaEV4cGlyYXRpb24iOiIyMDI2LTA2LTA0VDA5OjU4OjUzWiJ9.2V3q9RVz2K3499xc1j9BVuoyiTduqDCUAl3GRDIAhh-FKtjn-Qfhwry0z4ItEgehOfXhLEzbfIoJIsJhVfQ2Wg",
85
+ "connection": "close",
86
+ "host": "trustchain-backend.api.aws.stg.ldg-tech.com",
87
+ "user-agent": "axios/1.13.5"
88
+ }
89
+ },
90
+ "response": {
91
+ "status": 200,
92
+ "headers": {
93
+ "cache-control": "no-store, no-cache, max-age=0",
94
+ "connection": "close",
95
+ "content-type": "application/json",
96
+ "date": "Thu, 04 Jun 2026 08:58:52 GMT",
97
+ "expires": "Thu, 01 Jan 1970 00:00:00 GMT",
98
+ "pragma": "no-cache",
99
+ "strict-transport-security": "max-age=31536000; includeSubDomains",
100
+ "transfer-encoding": "chunked"
101
+ },
102
+ "body": "{}"
103
+ }
104
+ },
105
+ {
106
+ "request": {
107
+ "url": "https://trustchain-backend.api.aws.stg.ldg-tech.com/v1/seed",
108
+ "method": "POST",
109
+ "headers": {
110
+ "accept": "application/json, text/plain, */*",
111
+ "accept-encoding": "gzip, compress, deflate, br",
112
+ "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJpc3MiOiJ0cnVzdGNoYWluLWJhY2tlbmQuYXBpLmF3cy5zdGcubGRnLXRlY2guY29tIiwic3ViIjoiMDM4YTI0YTkzZmM5MjM2NjM5NTc0NjNjMzI2MzIzNTUzYmMxMjBhZmRjYjdjMjliMDFiOTFlMDBjZmVjMzg5YzY0IiwiYXVkIjpbIkNsb3VkU3luYyIsIkVuY3J5cHRpb25DTEkiLCJ0cnVzdGNoYWluIl0sImV4cCI6MTc4MDU2MzgzMywiaWF0IjoxNzgwNTYzNTMyLCJqdGkiOiJiYTg3Y2QzOS0zNGE2LTQwMGQtYmE4OC1iMWI5MjM0OWU2YmQiLCJwZXJtaXNzaW9ucyI6e30sImRldmljZSI6dHJ1ZSwicmVmcmVzaEV4cGlyYXRpb24iOiIyMDI2LTA2LTA0VDA5OjU4OjUzWiJ9.2V3q9RVz2K3499xc1j9BVuoyiTduqDCUAl3GRDIAhh-FKtjn-Qfhwry0z4ItEgehOfXhLEzbfIoJIsJhVfQ2Wg",
113
+ "connection": "close",
114
+ "content-length": "652",
115
+ "content-type": "application/json",
116
+ "host": "trustchain-backend.api.aws.stg.ldg-tech.com",
117
+ "user-agent": "axios/1.13.5"
118
+ },
119
+ "body": "\"010101022096826ae7a702799f59a271b59303d87712ec04de21b4c26d582e4d51cc0c54460621038a24a93fc923663957463c326323553bc120afdcb7c29b01b91e00cfec389c6401010110b005000102000006210346dd1a08066fe65efc1e2cfdc10d03af3bbe9f431f1d70de58c0ba38ee64c1910510b200b2bb1e52c6e653189aa8fc39fa3b0550d1d0c36c7cd53502ba02d542f7a8ed28e3071a9d7acf755478470266732019d663d7a6588bb0798dc371e051a476b7162ad9e77215f7522260ab12c4391489ea99aaee175dfbb5e9764562f154acf92b062103c67243df1229238e78cf01d9164518c4a3a873c5c19e09546f3b507c4def143403463044022042e2f466f506fc47ff193389a76ceafd0ff4858c02c1b88e3a94c722195e13c0022063aa7987b6b954eb69dd8adb489c14d06be065a3d3945f023cac197c7a25d635\""
120
+ },
121
+ "response": {
122
+ "status": 204,
123
+ "headers": {
124
+ "cache-control": "no-store, no-cache, max-age=0",
125
+ "connection": "close",
126
+ "date": "Thu, 04 Jun 2026 08:58:52 GMT",
127
+ "expires": "Thu, 01 Jan 1970 00:00:00 GMT",
128
+ "pragma": "no-cache",
129
+ "strict-transport-security": "max-age=31536000; includeSubDomains"
130
+ }
131
+ }
132
+ },
133
+ {
134
+ "request": {
135
+ "url": "https://trustchain-backend.api.aws.stg.ldg-tech.com/v1/refresh",
136
+ "method": "GET",
137
+ "headers": {
138
+ "accept": "application/json, text/plain, */*",
139
+ "accept-encoding": "gzip, compress, deflate, br",
140
+ "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJpc3MiOiJ0cnVzdGNoYWluLWJhY2tlbmQuYXBpLmF3cy5zdGcubGRnLXRlY2guY29tIiwic3ViIjoiMDM4YTI0YTkzZmM5MjM2NjM5NTc0NjNjMzI2MzIzNTUzYmMxMjBhZmRjYjdjMjliMDFiOTFlMDBjZmVjMzg5YzY0IiwiYXVkIjpbIkNsb3VkU3luYyIsIkVuY3J5cHRpb25DTEkiLCJ0cnVzdGNoYWluIl0sImV4cCI6MTc4MDU2MzgzMywiaWF0IjoxNzgwNTYzNTMyLCJqdGkiOiJiYTg3Y2QzOS0zNGE2LTQwMGQtYmE4OC1iMWI5MjM0OWU2YmQiLCJwZXJtaXNzaW9ucyI6e30sImRldmljZSI6dHJ1ZSwicmVmcmVzaEV4cGlyYXRpb24iOiIyMDI2LTA2LTA0VDA5OjU4OjUzWiJ9.2V3q9RVz2K3499xc1j9BVuoyiTduqDCUAl3GRDIAhh-FKtjn-Qfhwry0z4ItEgehOfXhLEzbfIoJIsJhVfQ2Wg",
141
+ "connection": "close",
142
+ "host": "trustchain-backend.api.aws.stg.ldg-tech.com",
143
+ "user-agent": "axios/1.13.5"
144
+ }
145
+ },
146
+ "response": {
147
+ "status": 200,
148
+ "headers": {
149
+ "cache-control": "no-store, no-cache, max-age=0",
150
+ "connection": "close",
151
+ "content-type": "application/json",
152
+ "date": "Thu, 04 Jun 2026 08:58:52 GMT",
153
+ "expires": "Thu, 01 Jan 1970 00:00:00 GMT",
154
+ "pragma": "no-cache",
155
+ "strict-transport-security": "max-age=31536000; includeSubDomains",
156
+ "transfer-encoding": "chunked"
157
+ },
158
+ "body": "{\"access_token\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJpc3MiOiJ0cnVzdGNoYWluLWJhY2tlbmQuYXBpLmF3cy5zdGcubGRnLXRlY2guY29tIiwic3ViIjoiMDM4YTI0YTkzZmM5MjM2NjM5NTc0NjNjMzI2MzIzNTUzYmMxMjBhZmRjYjdjMjliMDFiOTFlMDBjZmVjMzg5YzY0IiwiYXVkIjpbIkNsb3VkU3luYyIsIkVuY3J5cHRpb25DTEkiLCJ0cnVzdGNoYWluIl0sImV4cCI6MTc4MDU2MzgzMywiaWF0IjoxNzgwNTYzNTMyLCJqdGkiOiJlMDJhMDQ5MC04MDk2LTQ3N2ItYjBmOS1kODcyYTkxZGIwODIiLCJwZXJtaXNzaW9ucyI6eyIwMGUyOTE0MWM4NjA4NDg4NDk3YWZkZGZjZWFmZjU5M2U5MDUxZDA2NWViZDU2MzE1NDhjNjlmZmQ5NDNhZWI2N2MiOnsibS8iOiJmZmZmZmZmZiJ9fSwiZGV2aWNlIjp0cnVlLCJyZWZyZXNoRXhwaXJhdGlvbiI6IjIwMjYtMDYtMDRUMDk6NTg6NTNaIn0.G-mrxySbKTALfOkBLj25_EzOCf6RCk2CU-r2K3HgRn1ZU0moMHzrOzqcJSabF4UQEf_asELnrrvAT72CFWCQig\",\"permissions\":{\"00e29141c8608488497afddfceaff593e9051d065ebd5631548c69ffd943aeb67c\":{\"m/\":\"ffffffff\"}}}"
159
+ }
160
+ },
161
+ {
162
+ "request": {
163
+ "url": "https://trustchain-backend.api.aws.stg.ldg-tech.com/v1/trustchains",
164
+ "method": "GET",
165
+ "headers": {
166
+ "accept": "application/json, text/plain, */*",
167
+ "accept-encoding": "gzip, compress, deflate, br",
168
+ "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJpc3MiOiJ0cnVzdGNoYWluLWJhY2tlbmQuYXBpLmF3cy5zdGcubGRnLXRlY2guY29tIiwic3ViIjoiMDM4YTI0YTkzZmM5MjM2NjM5NTc0NjNjMzI2MzIzNTUzYmMxMjBhZmRjYjdjMjliMDFiOTFlMDBjZmVjMzg5YzY0IiwiYXVkIjpbIkNsb3VkU3luYyIsIkVuY3J5cHRpb25DTEkiLCJ0cnVzdGNoYWluIl0sImV4cCI6MTc4MDU2MzgzMywiaWF0IjoxNzgwNTYzNTMyLCJqdGkiOiJlMDJhMDQ5MC04MDk2LTQ3N2ItYjBmOS1kODcyYTkxZGIwODIiLCJwZXJtaXNzaW9ucyI6eyIwMGUyOTE0MWM4NjA4NDg4NDk3YWZkZGZjZWFmZjU5M2U5MDUxZDA2NWViZDU2MzE1NDhjNjlmZmQ5NDNhZWI2N2MiOnsibS8iOiJmZmZmZmZmZiJ9fSwiZGV2aWNlIjp0cnVlLCJyZWZyZXNoRXhwaXJhdGlvbiI6IjIwMjYtMDYtMDRUMDk6NTg6NTNaIn0.G-mrxySbKTALfOkBLj25_EzOCf6RCk2CU-r2K3HgRn1ZU0moMHzrOzqcJSabF4UQEf_asELnrrvAT72CFWCQig",
169
+ "connection": "close",
170
+ "host": "trustchain-backend.api.aws.stg.ldg-tech.com",
171
+ "user-agent": "axios/1.13.5"
172
+ }
173
+ },
174
+ "response": {
175
+ "status": 200,
176
+ "headers": {
177
+ "cache-control": "no-store, no-cache, max-age=0",
178
+ "connection": "close",
179
+ "content-type": "application/json",
180
+ "date": "Thu, 04 Jun 2026 08:58:52 GMT",
181
+ "expires": "Thu, 01 Jan 1970 00:00:00 GMT",
182
+ "pragma": "no-cache",
183
+ "strict-transport-security": "max-age=31536000; includeSubDomains",
184
+ "transfer-encoding": "chunked"
185
+ },
186
+ "body": "{\"00e29141c8608488497afddfceaff593e9051d065ebd5631548c69ffd943aeb67c\":{\"m/\":\"ffffffff\"}}"
187
+ }
188
+ },
189
+ {
190
+ "request": {
191
+ "url": "https://trustchain-backend.api.aws.stg.ldg-tech.com/v1/trustchain/00e29141c8608488497afddfceaff593e9051d065ebd5631548c69ffd943aeb67c",
192
+ "method": "GET",
193
+ "headers": {
194
+ "accept": "application/json, text/plain, */*",
195
+ "accept-encoding": "gzip, compress, deflate, br",
196
+ "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJpc3MiOiJ0cnVzdGNoYWluLWJhY2tlbmQuYXBpLmF3cy5zdGcubGRnLXRlY2guY29tIiwic3ViIjoiMDM4YTI0YTkzZmM5MjM2NjM5NTc0NjNjMzI2MzIzNTUzYmMxMjBhZmRjYjdjMjliMDFiOTFlMDBjZmVjMzg5YzY0IiwiYXVkIjpbIkNsb3VkU3luYyIsIkVuY3J5cHRpb25DTEkiLCJ0cnVzdGNoYWluIl0sImV4cCI6MTc4MDU2MzgzMywiaWF0IjoxNzgwNTYzNTMyLCJqdGkiOiJlMDJhMDQ5MC04MDk2LTQ3N2ItYjBmOS1kODcyYTkxZGIwODIiLCJwZXJtaXNzaW9ucyI6eyIwMGUyOTE0MWM4NjA4NDg4NDk3YWZkZGZjZWFmZjU5M2U5MDUxZDA2NWViZDU2MzE1NDhjNjlmZmQ5NDNhZWI2N2MiOnsibS8iOiJmZmZmZmZmZiJ9fSwiZGV2aWNlIjp0cnVlLCJyZWZyZXNoRXhwaXJhdGlvbiI6IjIwMjYtMDYtMDRUMDk6NTg6NTNaIn0.G-mrxySbKTALfOkBLj25_EzOCf6RCk2CU-r2K3HgRn1ZU0moMHzrOzqcJSabF4UQEf_asELnrrvAT72CFWCQig",
197
+ "connection": "close",
198
+ "host": "trustchain-backend.api.aws.stg.ldg-tech.com",
199
+ "user-agent": "axios/1.13.5"
200
+ }
201
+ },
202
+ "response": {
203
+ "status": 200,
204
+ "headers": {
205
+ "cache-control": "no-store, no-cache, max-age=0",
206
+ "connection": "close",
207
+ "content-type": "application/json",
208
+ "date": "Thu, 04 Jun 2026 08:58:52 GMT",
209
+ "expires": "Thu, 01 Jan 1970 00:00:00 GMT",
210
+ "pragma": "no-cache",
211
+ "strict-transport-security": "max-age=31536000; includeSubDomains",
212
+ "transfer-encoding": "chunked"
213
+ },
214
+ "body": "{\"m/\":\"010101022096826ae7a702799f59a271b59303d87712ec04de21b4c26d582e4d51cc0c54460621038a24a93fc923663957463c326323553bc120afdcb7c29b01b91e00cfec389c6401010110b005000102000006210346dd1a08066fe65efc1e2cfdc10d03af3bbe9f431f1d70de58c0ba38ee64c1910510b200b2bb1e52c6e653189aa8fc39fa3b0550d1d0c36c7cd53502ba02d542f7a8ed28e3071a9d7acf755478470266732019d663d7a6588bb0798dc371e051a476b7162ad9e77215f7522260ab12c4391489ea99aaee175dfbb5e9764562f154acf92b062103c67243df1229238e78cf01d9164518c4a3a873c5c19e09546f3b507c4def143403463044022042e2f466f506fc47ff193389a76ceafd0ff4858c02c1b88e3a94c722195e13c0022063aa7987b6b954eb69dd8adb489c14d06be065a3d3945f023cac197c7a25d635\"}"
215
+ }
216
+ },
217
+ {
218
+ "request": {
219
+ "url": "https://trustchain-backend.api.aws.stg.ldg-tech.com/v1/trustchain/00e29141c8608488497afddfceaff593e9051d065ebd5631548c69ffd943aeb67c/derivation",
220
+ "method": "POST",
221
+ "headers": {
222
+ "accept": "application/json, text/plain, */*",
223
+ "accept-encoding": "gzip, compress, deflate, br",
224
+ "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJpc3MiOiJ0cnVzdGNoYWluLWJhY2tlbmQuYXBpLmF3cy5zdGcubGRnLXRlY2guY29tIiwic3ViIjoiMDM4YTI0YTkzZmM5MjM2NjM5NTc0NjNjMzI2MzIzNTUzYmMxMjBhZmRjYjdjMjliMDFiOTFlMDBjZmVjMzg5YzY0IiwiYXVkIjpbIkNsb3VkU3luYyIsIkVuY3J5cHRpb25DTEkiLCJ0cnVzdGNoYWluIl0sImV4cCI6MTc4MDU2MzgzMywiaWF0IjoxNzgwNTYzNTMyLCJqdGkiOiJlMDJhMDQ5MC04MDk2LTQ3N2ItYjBmOS1kODcyYTkxZGIwODIiLCJwZXJtaXNzaW9ucyI6eyIwMGUyOTE0MWM4NjA4NDg4NDk3YWZkZGZjZWFmZjU5M2U5MDUxZDA2NWViZDU2MzE1NDhjNjlmZmQ5NDNhZWI2N2MiOnsibS8iOiJmZmZmZmZmZiJ9fSwiZGV2aWNlIjp0cnVlLCJyZWZyZXNoRXhwaXJhdGlvbiI6IjIwMjYtMDYtMDRUMDk6NTg6NTNaIn0.G-mrxySbKTALfOkBLj25_EzOCf6RCk2CU-r2K3HgRn1ZU0moMHzrOzqcJSabF4UQEf_asELnrrvAT72CFWCQig",
225
+ "connection": "close",
226
+ "content-length": "1138",
227
+ "content-type": "application/json",
228
+ "host": "trustchain-backend.api.aws.stg.ldg-tech.com",
229
+ "user-agent": "axios/1.13.5"
230
+ },
231
+ "body": "\"0101010220e29141c8608488497afddfceaff593e9051d065ebd5631548c69ffd943aeb67c0621038a24a93fc923663957463c326323553bc120afdcb7c29b01b91e00cfec389c6401010315b8050c800000008000001080000000062102f1e31902fae8ba31ab69361db45dfcd158d60594576c1fcbee4823222e2f1b41051008b7100d6b8239ee613de34c90a42a070550c2341cf5376449d281b96b482475ff997fee3941f57cdf665afc8f29a8be05561819a19420173d2c9b1a5f6a995e25ee2ad1ac01af502cdbb182e1793d21a65883ff52c0bc4668b3bf458b414ecfa368062103214266082c1daab7f6e351d2059214b75ca957d76360c2edf05b4e78fb54f6df113d04124c65646765722053796e63206d656d6265720621032f89642fabcc1edf2f678cebdf4026f0c8ab354b99ac9127716d7db622fe647c0104ffffffff12aa05109dc8fe1e68e44a17f85491cdb74203d5055039ceb70acca2cb2b3682d90d40930a58fc54948e0584d9c45290c9627f760fd40d0bfd13d48a480de9e5e40b46f37b20560d486a5910eec2d1ed6a29fbec3eb206587a6bb3574310424e6e41267c2cd70621032f89642fabcc1edf2f678cebdf4026f0c8ab354b99ac9127716d7db622fe647c062103dcb22d4217d83350a43695f3b77ec8a0e3d74ba015c8480d4bab70b9424ab6ac034630440220098c43ee6f370d7b2e7eadcd08a81c64a057747e858c30e56bb0f711ea0971b602203d908e9f073700c374b2e86638589db56fe81e3bbe2812bb0e5b361959f13017\""
232
+ },
233
+ "response": {
234
+ "status": 204,
235
+ "headers": {
236
+ "cache-control": "no-store, no-cache, max-age=0",
237
+ "connection": "close",
238
+ "date": "Thu, 04 Jun 2026 08:58:54 GMT",
239
+ "expires": "Thu, 01 Jan 1970 00:00:00 GMT",
240
+ "pragma": "no-cache",
241
+ "strict-transport-security": "max-age=31536000; includeSubDomains"
242
+ }
243
+ }
244
+ },
245
+ {
246
+ "request": {
247
+ "url": "https://trustchain-backend.api.aws.stg.ldg-tech.com/v1/challenge",
248
+ "method": "GET",
249
+ "headers": {
250
+ "accept": "application/json, text/plain, */*",
251
+ "accept-encoding": "gzip, compress, deflate, br",
252
+ "connection": "close",
253
+ "host": "trustchain-backend.api.aws.stg.ldg-tech.com",
254
+ "user-agent": "axios/1.13.5"
255
+ }
256
+ },
257
+ "response": {
258
+ "status": 200,
259
+ "headers": {
260
+ "cache-control": "no-store, no-cache, max-age=0",
261
+ "connection": "close",
262
+ "content-type": "application/json",
263
+ "date": "Thu, 04 Jun 2026 08:58:54 GMT",
264
+ "expires": "Thu, 01 Jan 1970 00:00:00 GMT",
265
+ "pragma": "no-cache",
266
+ "strict-transport-security": "max-age=31536000; includeSubDomains",
267
+ "transfer-encoding": "chunked"
268
+ },
269
+ "body": "{\"json\":{\"version\":0,\"challenge\":{\"data\":\"9c39925ffcd58608c52fe39fe4efaef0\",\"expiry\":\"2026-06-04T09:28:55Z\"},\"host\":\"trustchain-backend.api.aws.stg.ldg-tech.com\",\"rp\":[{\"credential\":{\"version\":0,\"curveId\":33,\"signAlgorithm\":1,\"publicKey\":\"03cb7628e7248ddf9c07da54b979f16bf081fb3d173aac0992ad2a44ef6a388ae2\"},\"signature\":\"304402204f0c2f2e243b8be17309284f4fdb4b0cb2a1554bc34768c1da83b850f771163a02202a8378aad350517f60823b841e4a1bb49d01a6f53da108bb7a6f03a2fad2e5df\"}],\"protocolVersion\":{\"major\":1,\"minor\":0,\"patch\":0}},\"tlv\":\"01010702010012109c39925ffcd58608c52fe39fe4efaef01401011546304402204f0c2f2e243b8be17309284f4fdb4b0cb2a1554bc34768c1da83b850f771163a02202a8378aad350517f60823b841e4a1bb49d01a6f53da108bb7a6f03a2fad2e5df16046a214557202b7472757374636861696e2d6261636b656e642e6170692e6177732e7374672e6c64672d746563682e636f6d320121332103cb7628e7248ddf9c07da54b979f16bf081fb3d173aac0992ad2a44ef6a388ae2600401000000\"}"
270
+ }
271
+ },
272
+ {
273
+ "request": {
274
+ "url": "https://trustchain-backend.api.aws.stg.ldg-tech.com/v1/authenticate",
275
+ "method": "POST",
276
+ "headers": {
277
+ "accept": "application/json, text/plain, */*",
278
+ "accept-encoding": "gzip, compress, deflate, br",
279
+ "connection": "close",
280
+ "content-length": "984",
281
+ "content-type": "application/json",
282
+ "host": "trustchain-backend.api.aws.stg.ldg-tech.com",
283
+ "user-agent": "axios/1.13.5"
284
+ },
285
+ "body": "{\"challenge\":{\"version\":0,\"challenge\":{\"data\":\"9c39925ffcd58608c52fe39fe4efaef0\",\"expiry\":\"2026-06-04T09:28:55Z\"},\"host\":\"trustchain-backend.api.aws.stg.ldg-tech.com\",\"rp\":[{\"credential\":{\"version\":0,\"curveId\":33,\"signAlgorithm\":1,\"publicKey\":\"03cb7628e7248ddf9c07da54b979f16bf081fb3d173aac0992ad2a44ef6a388ae2\"},\"signature\":\"304402204f0c2f2e243b8be17309284f4fdb4b0cb2a1554bc34768c1da83b850f771163a02202a8378aad350517f60823b841e4a1bb49d01a6f53da108bb7a6f03a2fad2e5df\"}],\"protocolVersion\":{\"major\":1,\"minor\":0,\"patch\":0}},\"signature\":{\"credential\":{\"version\":0,\"curveId\":33,\"signAlgorithm\":1,\"publicKey\":\"032f89642fabcc1edf2f678cebdf4026f0c8ab354b99ac9127716d7db622fe647c\"},\"signature\":\"30450221009f80695ddf5768d7cab91ba8e4321c41cdce8ed513de91b6aa740cdcdaabce9602204c91455f82c1acca36cd247e2e462c72b439754fa1f07df3109adcff397d1a67\",\"attestation\":\"0242303065323931343163383630383438383439376166646466636561666635393365393035316430363565626435363331353438633639666664393433616562363763\"}}"
286
+ },
287
+ "response": {
288
+ "status": 200,
289
+ "headers": {
290
+ "cache-control": "no-store, no-cache, max-age=0",
291
+ "connection": "close",
292
+ "content-type": "application/json",
293
+ "date": "Thu, 04 Jun 2026 08:58:54 GMT",
294
+ "expires": "Thu, 01 Jan 1970 00:00:00 GMT",
295
+ "pragma": "no-cache",
296
+ "strict-transport-security": "max-age=31536000; includeSubDomains",
297
+ "transfer-encoding": "chunked"
298
+ },
299
+ "body": "{\"access_token\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJpc3MiOiJ0cnVzdGNoYWluLWJhY2tlbmQuYXBpLmF3cy5zdGcubGRnLXRlY2guY29tIiwic3ViIjoiMDMyZjg5NjQyZmFiY2MxZWRmMmY2NzhjZWJkZjQwMjZmMGM4YWIzNTRiOTlhYzkxMjc3MTZkN2RiNjIyZmU2NDdjIiwiYXVkIjpbIkNsb3VkU3luYyIsIkVuY3J5cHRpb25DTEkiLCJ0cnVzdGNoYWluIl0sImV4cCI6MTc4MDU2MzgzNSwiaWF0IjoxNzgwNTYzNTM0LCJqdGkiOiJlYTI0YmYzNS0xNGE5LTRjNDEtODU2MS0zMzU0OWY4ODIzNTAiLCJwZXJtaXNzaW9ucyI6eyIwMGUyOTE0MWM4NjA4NDg4NDk3YWZkZGZjZWFmZjU5M2U5MDUxZDA2NWViZDU2MzE1NDhjNjlmZmQ5NDNhZWI2N2MiOnsibS8wJy8xNicvMCciOiJmZmZmZmZmZiJ9fSwiZGV2aWNlIjpmYWxzZSwicmVmcmVzaEV4cGlyYXRpb24iOiIyMDI2LTA2LTA0VDA5OjU4OjU1WiJ9.zg96h52Eevx6SefRQt5PL9hFeOjPAZ5bJ4hWabfwlK92zoMmXchPVQ8s5zMzKJ-faWSPawr3Hg5QNF3GiOl2Lg\",\"permissions\":{\"00e29141c8608488497afddfceaff593e9051d065ebd5631548c69ffd943aeb67c\":{\"m/0'/16'/0'\":\"ffffffff\"}}}"
300
+ }
301
+ },
302
+ {
303
+ "request": {
304
+ "url": "https://trustchain-backend.api.aws.stg.ldg-tech.com/v1/trustchain/00e29141c8608488497afddfceaff593e9051d065ebd5631548c69ffd943aeb67c",
305
+ "method": "GET",
306
+ "headers": {
307
+ "accept": "application/json, text/plain, */*",
308
+ "accept-encoding": "gzip, compress, deflate, br",
309
+ "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJpc3MiOiJ0cnVzdGNoYWluLWJhY2tlbmQuYXBpLmF3cy5zdGcubGRnLXRlY2guY29tIiwic3ViIjoiMDMyZjg5NjQyZmFiY2MxZWRmMmY2NzhjZWJkZjQwMjZmMGM4YWIzNTRiOTlhYzkxMjc3MTZkN2RiNjIyZmU2NDdjIiwiYXVkIjpbIkNsb3VkU3luYyIsIkVuY3J5cHRpb25DTEkiLCJ0cnVzdGNoYWluIl0sImV4cCI6MTc4MDU2MzgzNSwiaWF0IjoxNzgwNTYzNTM0LCJqdGkiOiJlYTI0YmYzNS0xNGE5LTRjNDEtODU2MS0zMzU0OWY4ODIzNTAiLCJwZXJtaXNzaW9ucyI6eyIwMGUyOTE0MWM4NjA4NDg4NDk3YWZkZGZjZWFmZjU5M2U5MDUxZDA2NWViZDU2MzE1NDhjNjlmZmQ5NDNhZWI2N2MiOnsibS8wJy8xNicvMCciOiJmZmZmZmZmZiJ9fSwiZGV2aWNlIjpmYWxzZSwicmVmcmVzaEV4cGlyYXRpb24iOiIyMDI2LTA2LTA0VDA5OjU4OjU1WiJ9.zg96h52Eevx6SefRQt5PL9hFeOjPAZ5bJ4hWabfwlK92zoMmXchPVQ8s5zMzKJ-faWSPawr3Hg5QNF3GiOl2Lg",
310
+ "connection": "close",
311
+ "host": "trustchain-backend.api.aws.stg.ldg-tech.com",
312
+ "user-agent": "axios/1.13.5"
313
+ }
314
+ },
315
+ "response": {
316
+ "status": 200,
317
+ "headers": {
318
+ "cache-control": "no-store, no-cache, max-age=0",
319
+ "connection": "close",
320
+ "content-type": "application/json",
321
+ "date": "Thu, 04 Jun 2026 08:58:54 GMT",
322
+ "expires": "Thu, 01 Jan 1970 00:00:00 GMT",
323
+ "pragma": "no-cache",
324
+ "strict-transport-security": "max-age=31536000; includeSubDomains",
325
+ "transfer-encoding": "chunked"
326
+ },
327
+ "body": "{\"m/\":\"010101022096826ae7a702799f59a271b59303d87712ec04de21b4c26d582e4d51cc0c54460621038a24a93fc923663957463c326323553bc120afdcb7c29b01b91e00cfec389c6401010110b005000102000006210346dd1a08066fe65efc1e2cfdc10d03af3bbe9f431f1d70de58c0ba38ee64c1910510b200b2bb1e52c6e653189aa8fc39fa3b0550d1d0c36c7cd53502ba02d542f7a8ed28e3071a9d7acf755478470266732019d663d7a6588bb0798dc371e051a476b7162ad9e77215f7522260ab12c4391489ea99aaee175dfbb5e9764562f154acf92b062103c67243df1229238e78cf01d9164518c4a3a873c5c19e09546f3b507c4def143403463044022042e2f466f506fc47ff193389a76ceafd0ff4858c02c1b88e3a94c722195e13c0022063aa7987b6b954eb69dd8adb489c14d06be065a3d3945f023cac197c7a25d635\",\"m/16'\":\"0101010220e29141c8608488497afddfceaff593e9051d065ebd5631548c69ffd943aeb67c0621038a24a93fc923663957463c326323553bc120afdcb7c29b01b91e00cfec389c6401010315b8050c800000008000001080000000062102f1e31902fae8ba31ab69361db45dfcd158d60594576c1fcbee4823222e2f1b41051008b7100d6b8239ee613de34c90a42a070550c2341cf5376449d281b96b482475ff997fee3941f57cdf665afc8f29a8be05561819a19420173d2c9b1a5f6a995e25ee2ad1ac01af502cdbb182e1793d21a65883ff52c0bc4668b3bf458b414ecfa368062103214266082c1daab7f6e351d2059214b75ca957d76360c2edf05b4e78fb54f6df113d04124c65646765722053796e63206d656d6265720621032f89642fabcc1edf2f678cebdf4026f0c8ab354b99ac9127716d7db622fe647c0104ffffffff12aa05109dc8fe1e68e44a17f85491cdb74203d5055039ceb70acca2cb2b3682d90d40930a58fc54948e0584d9c45290c9627f760fd40d0bfd13d48a480de9e5e40b46f37b20560d486a5910eec2d1ed6a29fbec3eb206587a6bb3574310424e6e41267c2cd70621032f89642fabcc1edf2f678cebdf4026f0c8ab354b99ac9127716d7db622fe647c062103dcb22d4217d83350a43695f3b77ec8a0e3d74ba015c8480d4bab70b9424ab6ac034630440220098c43ee6f370d7b2e7eadcd08a81c64a057747e858c30e56bb0f711ea0971b602203d908e9f073700c374b2e86638589db56fe81e3bbe2812bb0e5b361959f13017\"}"
328
+ }
329
+ },
330
+ {
331
+ "request": {
332
+ "url": "https://trustchain-backend.api.aws.stg.ldg-tech.com/v1/challenge",
333
+ "method": "GET",
334
+ "headers": {
335
+ "accept": "application/json, text/plain, */*",
336
+ "accept-encoding": "gzip, compress, deflate, br",
337
+ "connection": "close",
338
+ "host": "trustchain-backend.api.aws.stg.ldg-tech.com",
339
+ "user-agent": "axios/1.13.5"
340
+ }
341
+ },
342
+ "response": {
343
+ "status": 200,
344
+ "headers": {
345
+ "cache-control": "no-store, no-cache, max-age=0",
346
+ "connection": "close",
347
+ "content-type": "application/json",
348
+ "date": "Thu, 04 Jun 2026 08:58:54 GMT",
349
+ "expires": "Thu, 01 Jan 1970 00:00:00 GMT",
350
+ "pragma": "no-cache",
351
+ "strict-transport-security": "max-age=31536000; includeSubDomains",
352
+ "transfer-encoding": "chunked"
353
+ },
354
+ "body": "{\"json\":{\"version\":0,\"challenge\":{\"data\":\"794a791b9758770647412909f7837928\",\"expiry\":\"2026-06-04T09:28:55Z\"},\"host\":\"trustchain-backend.api.aws.stg.ldg-tech.com\",\"rp\":[{\"credential\":{\"version\":0,\"curveId\":33,\"signAlgorithm\":1,\"publicKey\":\"03cb7628e7248ddf9c07da54b979f16bf081fb3d173aac0992ad2a44ef6a388ae2\"},\"signature\":\"304502207dfbe206111001fd366a6e60ed4332a1a15c5199343fe8b52610f5d325c0e3f0022100871602e3ac5ce7a317dfc3b1ebfb4caa30e4e06f7038e63b72852870053e0dbe\"}],\"protocolVersion\":{\"major\":1,\"minor\":0,\"patch\":0}},\"tlv\":\"0101070201001210794a791b9758770647412909f78379281401011547304502207dfbe206111001fd366a6e60ed4332a1a15c5199343fe8b52610f5d325c0e3f0022100871602e3ac5ce7a317dfc3b1ebfb4caa30e4e06f7038e63b72852870053e0dbe16046a214557202b7472757374636861696e2d6261636b656e642e6170692e6177732e7374672e6c64672d746563682e636f6d320121332103cb7628e7248ddf9c07da54b979f16bf081fb3d173aac0992ad2a44ef6a388ae2600401000000\"}"
355
+ }
356
+ },
357
+ {
358
+ "request": {
359
+ "url": "https://trustchain-backend.api.aws.stg.ldg-tech.com/v1/authenticate",
360
+ "method": "POST",
361
+ "headers": {
362
+ "accept": "application/json, text/plain, */*",
363
+ "accept-encoding": "gzip, compress, deflate, br",
364
+ "connection": "close",
365
+ "content-length": "1068",
366
+ "content-type": "application/json",
367
+ "host": "trustchain-backend.api.aws.stg.ldg-tech.com",
368
+ "user-agent": "axios/1.13.5"
369
+ },
370
+ "body": "{\"challenge\":{\"version\":0,\"challenge\":{\"data\":\"794a791b9758770647412909f7837928\",\"expiry\":\"2026-06-04T09:28:55Z\"},\"host\":\"trustchain-backend.api.aws.stg.ldg-tech.com\",\"rp\":[{\"credential\":{\"version\":0,\"curveId\":33,\"signAlgorithm\":1,\"publicKey\":\"03cb7628e7248ddf9c07da54b979f16bf081fb3d173aac0992ad2a44ef6a388ae2\"},\"signature\":\"304502207dfbe206111001fd366a6e60ed4332a1a15c5199343fe8b52610f5d325c0e3f0022100871602e3ac5ce7a317dfc3b1ebfb4caa30e4e06f7038e63b72852870053e0dbe\"}],\"protocolVersion\":{\"major\":1,\"minor\":0,\"patch\":0}},\"signature\":{\"credential\":{\"version\":0,\"curveId\":33,\"signAlgorithm\":1,\"publicKey\":\"038a24a93fc923663957463c326323553bc120afdcb7c29b01b91e00cfec389c64\"},\"signature\":\"3045022100c901d2809334af8159fb091933a1d8c9a0b9d52c1f8e0b50f205b9eb6ebe7bd002204381e221c50c48d3b0fd4411a80bde1a75c81dcb4a1f6b377a244cdd73f5165c\",\"attestation\":\"000021012103cce710b4ace62a3597e5b9853463b6bbc45a7d198bf7b698dd885c4fedf98f9d46304402207ec59931f536ee39355ca3a13752705f611a6647f6a43c55bb95058f4e85ef97022024c5862a72cae5d77cdf8ee0d82bc574c276e1ff0736e53fd599e43716cc627b\"}}"
371
+ },
372
+ "response": {
373
+ "status": 200,
374
+ "headers": {
375
+ "cache-control": "no-store, no-cache, max-age=0",
376
+ "connection": "close",
377
+ "content-type": "application/json",
378
+ "date": "Thu, 04 Jun 2026 08:58:55 GMT",
379
+ "expires": "Thu, 01 Jan 1970 00:00:00 GMT",
380
+ "pragma": "no-cache",
381
+ "strict-transport-security": "max-age=31536000; includeSubDomains",
382
+ "transfer-encoding": "chunked"
383
+ },
384
+ "body": "{\"access_token\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJpc3MiOiJ0cnVzdGNoYWluLWJhY2tlbmQuYXBpLmF3cy5zdGcubGRnLXRlY2guY29tIiwic3ViIjoiMDM4YTI0YTkzZmM5MjM2NjM5NTc0NjNjMzI2MzIzNTUzYmMxMjBhZmRjYjdjMjliMDFiOTFlMDBjZmVjMzg5YzY0IiwiYXVkIjpbIkNsb3VkU3luYyIsIkVuY3J5cHRpb25DTEkiLCJ0cnVzdGNoYWluIl0sImV4cCI6MTc4MDU2MzgzNiwiaWF0IjoxNzgwNTYzNTM1LCJqdGkiOiI2MzE3ZDlmMC05Y2M3LTQyMDEtYTg1MS0xZjk1ZjJkMTY2MWUiLCJwZXJtaXNzaW9ucyI6eyIwMGUyOTE0MWM4NjA4NDg4NDk3YWZkZGZjZWFmZjU5M2U5MDUxZDA2NWViZDU2MzE1NDhjNjlmZmQ5NDNhZWI2N2MiOnsibS8iOiJmZmZmZmZmZiJ9fSwiZGV2aWNlIjp0cnVlLCJyZWZyZXNoRXhwaXJhdGlvbiI6IjIwMjYtMDYtMDRUMDk6NTg6NTZaIn0.TlnrhpYCi_oWZLGu5ZL4N1FVZ8LCjfpPu_u2duczRZnmbmDz7IiKVI9AdlYIUlZCTmKOytEBCZT0iazxJ3fOtw\",\"permissions\":{\"00e29141c8608488497afddfceaff593e9051d065ebd5631548c69ffd943aeb67c\":{\"m/\":\"ffffffff\"}}}"
385
+ }
386
+ },
387
+ {
388
+ "request": {
389
+ "url": "https://trustchain-backend.api.aws.stg.ldg-tech.com/v1/trustchains",
390
+ "method": "GET",
391
+ "headers": {
392
+ "accept": "application/json, text/plain, */*",
393
+ "accept-encoding": "gzip, compress, deflate, br",
394
+ "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJpc3MiOiJ0cnVzdGNoYWluLWJhY2tlbmQuYXBpLmF3cy5zdGcubGRnLXRlY2guY29tIiwic3ViIjoiMDM4YTI0YTkzZmM5MjM2NjM5NTc0NjNjMzI2MzIzNTUzYmMxMjBhZmRjYjdjMjliMDFiOTFlMDBjZmVjMzg5YzY0IiwiYXVkIjpbIkNsb3VkU3luYyIsIkVuY3J5cHRpb25DTEkiLCJ0cnVzdGNoYWluIl0sImV4cCI6MTc4MDU2MzgzNiwiaWF0IjoxNzgwNTYzNTM1LCJqdGkiOiI2MzE3ZDlmMC05Y2M3LTQyMDEtYTg1MS0xZjk1ZjJkMTY2MWUiLCJwZXJtaXNzaW9ucyI6eyIwMGUyOTE0MWM4NjA4NDg4NDk3YWZkZGZjZWFmZjU5M2U5MDUxZDA2NWViZDU2MzE1NDhjNjlmZmQ5NDNhZWI2N2MiOnsibS8iOiJmZmZmZmZmZiJ9fSwiZGV2aWNlIjp0cnVlLCJyZWZyZXNoRXhwaXJhdGlvbiI6IjIwMjYtMDYtMDRUMDk6NTg6NTZaIn0.TlnrhpYCi_oWZLGu5ZL4N1FVZ8LCjfpPu_u2duczRZnmbmDz7IiKVI9AdlYIUlZCTmKOytEBCZT0iazxJ3fOtw",
395
+ "connection": "close",
396
+ "host": "trustchain-backend.api.aws.stg.ldg-tech.com",
397
+ "user-agent": "axios/1.13.5"
398
+ }
399
+ },
400
+ "response": {
401
+ "status": 200,
402
+ "headers": {
403
+ "cache-control": "no-store, no-cache, max-age=0",
404
+ "connection": "close",
405
+ "content-type": "application/json",
406
+ "date": "Thu, 04 Jun 2026 08:58:55 GMT",
407
+ "expires": "Thu, 01 Jan 1970 00:00:00 GMT",
408
+ "pragma": "no-cache",
409
+ "strict-transport-security": "max-age=31536000; includeSubDomains",
410
+ "transfer-encoding": "chunked"
411
+ },
412
+ "body": "{\"00e29141c8608488497afddfceaff593e9051d065ebd5631548c69ffd943aeb67c\":{\"m/\":\"ffffffff\"}}"
413
+ }
414
+ },
415
+ {
416
+ "request": {
417
+ "url": "https://trustchain-backend.api.aws.stg.ldg-tech.com/v1/trustchain/00e29141c8608488497afddfceaff593e9051d065ebd5631548c69ffd943aeb67c",
418
+ "method": "GET",
419
+ "headers": {
420
+ "accept": "application/json, text/plain, */*",
421
+ "accept-encoding": "gzip, compress, deflate, br",
422
+ "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJpc3MiOiJ0cnVzdGNoYWluLWJhY2tlbmQuYXBpLmF3cy5zdGcubGRnLXRlY2guY29tIiwic3ViIjoiMDM4YTI0YTkzZmM5MjM2NjM5NTc0NjNjMzI2MzIzNTUzYmMxMjBhZmRjYjdjMjliMDFiOTFlMDBjZmVjMzg5YzY0IiwiYXVkIjpbIkNsb3VkU3luYyIsIkVuY3J5cHRpb25DTEkiLCJ0cnVzdGNoYWluIl0sImV4cCI6MTc4MDU2MzgzNiwiaWF0IjoxNzgwNTYzNTM1LCJqdGkiOiI2MzE3ZDlmMC05Y2M3LTQyMDEtYTg1MS0xZjk1ZjJkMTY2MWUiLCJwZXJtaXNzaW9ucyI6eyIwMGUyOTE0MWM4NjA4NDg4NDk3YWZkZGZjZWFmZjU5M2U5MDUxZDA2NWViZDU2MzE1NDhjNjlmZmQ5NDNhZWI2N2MiOnsibS8iOiJmZmZmZmZmZiJ9fSwiZGV2aWNlIjp0cnVlLCJyZWZyZXNoRXhwaXJhdGlvbiI6IjIwMjYtMDYtMDRUMDk6NTg6NTZaIn0.TlnrhpYCi_oWZLGu5ZL4N1FVZ8LCjfpPu_u2duczRZnmbmDz7IiKVI9AdlYIUlZCTmKOytEBCZT0iazxJ3fOtw",
423
+ "connection": "close",
424
+ "host": "trustchain-backend.api.aws.stg.ldg-tech.com",
425
+ "user-agent": "axios/1.13.5"
426
+ }
427
+ },
428
+ "response": {
429
+ "status": 200,
430
+ "headers": {
431
+ "cache-control": "no-store, no-cache, max-age=0",
432
+ "connection": "close",
433
+ "content-type": "application/json",
434
+ "date": "Thu, 04 Jun 2026 08:58:55 GMT",
435
+ "expires": "Thu, 01 Jan 1970 00:00:00 GMT",
436
+ "pragma": "no-cache",
437
+ "strict-transport-security": "max-age=31536000; includeSubDomains",
438
+ "transfer-encoding": "chunked"
439
+ },
440
+ "body": "{\"m/\":\"010101022096826ae7a702799f59a271b59303d87712ec04de21b4c26d582e4d51cc0c54460621038a24a93fc923663957463c326323553bc120afdcb7c29b01b91e00cfec389c6401010110b005000102000006210346dd1a08066fe65efc1e2cfdc10d03af3bbe9f431f1d70de58c0ba38ee64c1910510b200b2bb1e52c6e653189aa8fc39fa3b0550d1d0c36c7cd53502ba02d542f7a8ed28e3071a9d7acf755478470266732019d663d7a6588bb0798dc371e051a476b7162ad9e77215f7522260ab12c4391489ea99aaee175dfbb5e9764562f154acf92b062103c67243df1229238e78cf01d9164518c4a3a873c5c19e09546f3b507c4def143403463044022042e2f466f506fc47ff193389a76ceafd0ff4858c02c1b88e3a94c722195e13c0022063aa7987b6b954eb69dd8adb489c14d06be065a3d3945f023cac197c7a25d635\",\"m/16'\":\"0101010220e29141c8608488497afddfceaff593e9051d065ebd5631548c69ffd943aeb67c0621038a24a93fc923663957463c326323553bc120afdcb7c29b01b91e00cfec389c6401010315b8050c800000008000001080000000062102f1e31902fae8ba31ab69361db45dfcd158d60594576c1fcbee4823222e2f1b41051008b7100d6b8239ee613de34c90a42a070550c2341cf5376449d281b96b482475ff997fee3941f57cdf665afc8f29a8be05561819a19420173d2c9b1a5f6a995e25ee2ad1ac01af502cdbb182e1793d21a65883ff52c0bc4668b3bf458b414ecfa368062103214266082c1daab7f6e351d2059214b75ca957d76360c2edf05b4e78fb54f6df113d04124c65646765722053796e63206d656d6265720621032f89642fabcc1edf2f678cebdf4026f0c8ab354b99ac9127716d7db622fe647c0104ffffffff12aa05109dc8fe1e68e44a17f85491cdb74203d5055039ceb70acca2cb2b3682d90d40930a58fc54948e0584d9c45290c9627f760fd40d0bfd13d48a480de9e5e40b46f37b20560d486a5910eec2d1ed6a29fbec3eb206587a6bb3574310424e6e41267c2cd70621032f89642fabcc1edf2f678cebdf4026f0c8ab354b99ac9127716d7db622fe647c062103dcb22d4217d83350a43695f3b77ec8a0e3d74ba015c8480d4bab70b9424ab6ac034630440220098c43ee6f370d7b2e7eadcd08a81c64a057747e858c30e56bb0f711ea0971b602203d908e9f073700c374b2e86638589db56fe81e3bbe2812bb0e5b361959f13017\"}"
441
+ }
442
+ },
443
+ {
444
+ "request": {
445
+ "url": "https://trustchain-backend.api.aws.stg.ldg-tech.com/v1/trustchain/00e29141c8608488497afddfceaff593e9051d065ebd5631548c69ffd943aeb67c/derivation",
446
+ "method": "POST",
447
+ "headers": {
448
+ "accept": "application/json, text/plain, */*",
449
+ "accept-encoding": "gzip, compress, deflate, br",
450
+ "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJpc3MiOiJ0cnVzdGNoYWluLWJhY2tlbmQuYXBpLmF3cy5zdGcubGRnLXRlY2guY29tIiwic3ViIjoiMDM4YTI0YTkzZmM5MjM2NjM5NTc0NjNjMzI2MzIzNTUzYmMxMjBhZmRjYjdjMjliMDFiOTFlMDBjZmVjMzg5YzY0IiwiYXVkIjpbIkNsb3VkU3luYyIsIkVuY3J5cHRpb25DTEkiLCJ0cnVzdGNoYWluIl0sImV4cCI6MTc4MDU2MzgzNiwiaWF0IjoxNzgwNTYzNTM1LCJqdGkiOiI2MzE3ZDlmMC05Y2M3LTQyMDEtYTg1MS0xZjk1ZjJkMTY2MWUiLCJwZXJtaXNzaW9ucyI6eyIwMGUyOTE0MWM4NjA4NDg4NDk3YWZkZGZjZWFmZjU5M2U5MDUxZDA2NWViZDU2MzE1NDhjNjlmZmQ5NDNhZWI2N2MiOnsibS8iOiJmZmZmZmZmZiJ9fSwiZGV2aWNlIjp0cnVlLCJyZWZyZXNoRXhwaXJhdGlvbiI6IjIwMjYtMDYtMDRUMDk6NTg6NTZaIn0.TlnrhpYCi_oWZLGu5ZL4N1FVZ8LCjfpPu_u2duczRZnmbmDz7IiKVI9AdlYIUlZCTmKOytEBCZT0iazxJ3fOtw",
451
+ "connection": "close",
452
+ "content-length": "1148",
453
+ "content-type": "application/json",
454
+ "host": "trustchain-backend.api.aws.stg.ldg-tech.com",
455
+ "user-agent": "axios/1.13.5"
456
+ },
457
+ "body": "\"0101010220e29141c8608488497afddfceaff593e9051d065ebd5631548c69ffd943aeb67c0621038a24a93fc923663957463c326323553bc120afdcb7c29b01b91e00cfec389c6401010315b8050c80000000800000118000000006210221621a1b9264b790da3c73ffb229e61629c3ed74674f76312ec6b69da60186da0510b08fde5ed082cc3c0bebf9afab623ab30550bf5b52682787cad271be6522a74d5e23a69572a9ff291c0dffa7f87cbee36d63bdba29fff02c2f93a4b0542beab3b9015ee206989c073b7d47d478c3399d527965425d2f29f837e541f8145e92d89ab1062103186aa28ed2df67c2a4eed0fc4e88b3510025aa0e437ad8f1299e5b8afbf72b3f1141041677616c6c65742d636c692072696e67206d656d626572062102b41d8f8b3885a341348dbcd1d0e28ad3cb178e021e1b9eb4d76dbe04bc770c620104ffffffff12aa0510146bba095106f85cbd6ffba974b7286f055014a7b64b4088091fdc2508270e5121e0e0759cd38f695b257bb752b00740bb2e3ec5366a00b1f6a6cf29c04a5a6f4bd26f847e02711d15f6afbc6aa765ee9d6eff79aa535f25cf4565db7da95ecd7e81062102b41d8f8b3885a341348dbcd1d0e28ad3cb178e021e1b9eb4d76dbe04bc770c62062102c8e4c05e1de3497f45a536d895876b83ea8afe01b797fb17a0dee62d59ffc136034730450221008bf42ed729367c4c8e646acb39c9393ea52f4ae80288709e56e48ca48ca044ca0220624f186fe78f72209171eda141ce7d0421ff9d02e2e21d8be35ddaa372c3f2da\""
458
+ },
459
+ "response": {
460
+ "status": 204,
461
+ "headers": {
462
+ "cache-control": "no-store, no-cache, max-age=0",
463
+ "connection": "close",
464
+ "date": "Thu, 04 Jun 2026 08:58:56 GMT",
465
+ "expires": "Thu, 01 Jan 1970 00:00:00 GMT",
466
+ "pragma": "no-cache",
467
+ "strict-transport-security": "max-age=31536000; includeSubDomains"
468
+ }
469
+ }
470
+ },
471
+ {
472
+ "request": {
473
+ "url": "https://trustchain-backend.api.aws.stg.ldg-tech.com/v1/challenge",
474
+ "method": "GET",
475
+ "headers": {
476
+ "accept": "application/json, text/plain, */*",
477
+ "accept-encoding": "gzip, compress, deflate, br",
478
+ "connection": "close",
479
+ "host": "trustchain-backend.api.aws.stg.ldg-tech.com",
480
+ "user-agent": "axios/1.13.5"
481
+ }
482
+ },
483
+ "response": {
484
+ "status": 200,
485
+ "headers": {
486
+ "cache-control": "no-store, no-cache, max-age=0",
487
+ "connection": "close",
488
+ "content-type": "application/json",
489
+ "date": "Thu, 04 Jun 2026 08:58:56 GMT",
490
+ "expires": "Thu, 01 Jan 1970 00:00:00 GMT",
491
+ "pragma": "no-cache",
492
+ "strict-transport-security": "max-age=31536000; includeSubDomains",
493
+ "transfer-encoding": "chunked"
494
+ },
495
+ "body": "{\"json\":{\"version\":0,\"challenge\":{\"data\":\"7ffd5d8bf752a46a6e3b8019bdc3faeb\",\"expiry\":\"2026-06-04T09:28:57Z\"},\"host\":\"trustchain-backend.api.aws.stg.ldg-tech.com\",\"rp\":[{\"credential\":{\"version\":0,\"curveId\":33,\"signAlgorithm\":1,\"publicKey\":\"03cb7628e7248ddf9c07da54b979f16bf081fb3d173aac0992ad2a44ef6a388ae2\"},\"signature\":\"3046022100a6554f51aa665b140545d10abfeb5cc84d34294ba6d013a6874195e297be2160022100acf5acef2d7adab7ea6e466f88d914fa43c78d22c3020d3a39a835aef4626e9f\"}],\"protocolVersion\":{\"major\":1,\"minor\":0,\"patch\":0}},\"tlv\":\"01010702010012107ffd5d8bf752a46a6e3b8019bdc3faeb14010115483046022100a6554f51aa665b140545d10abfeb5cc84d34294ba6d013a6874195e297be2160022100acf5acef2d7adab7ea6e466f88d914fa43c78d22c3020d3a39a835aef4626e9f16046a214559202b7472757374636861696e2d6261636b656e642e6170692e6177732e7374672e6c64672d746563682e636f6d320121332103cb7628e7248ddf9c07da54b979f16bf081fb3d173aac0992ad2a44ef6a388ae2600401000000\"}"
496
+ }
497
+ },
498
+ {
499
+ "request": {
500
+ "url": "https://trustchain-backend.api.aws.stg.ldg-tech.com/v1/authenticate",
501
+ "method": "POST",
502
+ "headers": {
503
+ "accept": "application/json, text/plain, */*",
504
+ "accept-encoding": "gzip, compress, deflate, br",
505
+ "connection": "close",
506
+ "content-length": "986",
507
+ "content-type": "application/json",
508
+ "host": "trustchain-backend.api.aws.stg.ldg-tech.com",
509
+ "user-agent": "axios/1.13.5"
510
+ },
511
+ "body": "{\"challenge\":{\"version\":0,\"challenge\":{\"data\":\"7ffd5d8bf752a46a6e3b8019bdc3faeb\",\"expiry\":\"2026-06-04T09:28:57Z\"},\"host\":\"trustchain-backend.api.aws.stg.ldg-tech.com\",\"rp\":[{\"credential\":{\"version\":0,\"curveId\":33,\"signAlgorithm\":1,\"publicKey\":\"03cb7628e7248ddf9c07da54b979f16bf081fb3d173aac0992ad2a44ef6a388ae2\"},\"signature\":\"3046022100a6554f51aa665b140545d10abfeb5cc84d34294ba6d013a6874195e297be2160022100acf5acef2d7adab7ea6e466f88d914fa43c78d22c3020d3a39a835aef4626e9f\"}],\"protocolVersion\":{\"major\":1,\"minor\":0,\"patch\":0}},\"signature\":{\"credential\":{\"version\":0,\"curveId\":33,\"signAlgorithm\":1,\"publicKey\":\"032f89642fabcc1edf2f678cebdf4026f0c8ab354b99ac9127716d7db622fe647c\"},\"signature\":\"3044022031e2588dfc48ff0254ccc6717a0356a2473176d0128ba8570fde6193f4d0c0f50220670ff53374fdb612b4dda524bbc2e1b5127808c0fff65fbe06640b3c10c0882b\",\"attestation\":\"0242303065323931343163383630383438383439376166646466636561666635393365393035316430363565626435363331353438633639666664393433616562363763\"}}"
512
+ },
513
+ "response": {
514
+ "status": 200,
515
+ "headers": {
516
+ "cache-control": "no-store, no-cache, max-age=0",
517
+ "connection": "close",
518
+ "content-type": "application/json",
519
+ "date": "Thu, 04 Jun 2026 08:58:56 GMT",
520
+ "expires": "Thu, 01 Jan 1970 00:00:00 GMT",
521
+ "pragma": "no-cache",
522
+ "strict-transport-security": "max-age=31536000; includeSubDomains",
523
+ "transfer-encoding": "chunked"
524
+ },
525
+ "body": "{\"access_token\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJpc3MiOiJ0cnVzdGNoYWluLWJhY2tlbmQuYXBpLmF3cy5zdGcubGRnLXRlY2guY29tIiwic3ViIjoiMDMyZjg5NjQyZmFiY2MxZWRmMmY2NzhjZWJkZjQwMjZmMGM4YWIzNTRiOTlhYzkxMjc3MTZkN2RiNjIyZmU2NDdjIiwiYXVkIjpbIkNsb3VkU3luYyIsIkVuY3J5cHRpb25DTEkiLCJ0cnVzdGNoYWluIl0sImV4cCI6MTc4MDU2MzgzNywiaWF0IjoxNzgwNTYzNTM2LCJqdGkiOiI5YTMwNzYxNy0xMjZkLTQ2ZmMtYThkMi1lNDUzN2I3YTI5YTQiLCJwZXJtaXNzaW9ucyI6eyIwMGUyOTE0MWM4NjA4NDg4NDk3YWZkZGZjZWFmZjU5M2U5MDUxZDA2NWViZDU2MzE1NDhjNjlmZmQ5NDNhZWI2N2MiOnsibS8wJy8xNicvMCciOiJmZmZmZmZmZiJ9fSwiZGV2aWNlIjpmYWxzZSwicmVmcmVzaEV4cGlyYXRpb24iOiIyMDI2LTA2LTA0VDA5OjU4OjU3WiJ9.i6gDmJ_0g3712IVMhELRYzfu65fgcIbP75VRGkH7y4IXesev8SeE0JVZWI4j7XpXs0Ug0E1G1RLnVkevI5o4oA\",\"permissions\":{\"00e29141c8608488497afddfceaff593e9051d065ebd5631548c69ffd943aeb67c\":{\"m/0'/16'/0'\":\"ffffffff\"}}}"
526
+ }
527
+ },
528
+ {
529
+ "request": {
530
+ "url": "https://trustchain-backend.api.aws.stg.ldg-tech.com/v1/trustchain/00e29141c8608488497afddfceaff593e9051d065ebd5631548c69ffd943aeb67c",
531
+ "method": "GET",
532
+ "headers": {
533
+ "accept": "application/json, text/plain, */*",
534
+ "accept-encoding": "gzip, compress, deflate, br",
535
+ "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJpc3MiOiJ0cnVzdGNoYWluLWJhY2tlbmQuYXBpLmF3cy5zdGcubGRnLXRlY2guY29tIiwic3ViIjoiMDMyZjg5NjQyZmFiY2MxZWRmMmY2NzhjZWJkZjQwMjZmMGM4YWIzNTRiOTlhYzkxMjc3MTZkN2RiNjIyZmU2NDdjIiwiYXVkIjpbIkNsb3VkU3luYyIsIkVuY3J5cHRpb25DTEkiLCJ0cnVzdGNoYWluIl0sImV4cCI6MTc4MDU2MzgzNywiaWF0IjoxNzgwNTYzNTM2LCJqdGkiOiI5YTMwNzYxNy0xMjZkLTQ2ZmMtYThkMi1lNDUzN2I3YTI5YTQiLCJwZXJtaXNzaW9ucyI6eyIwMGUyOTE0MWM4NjA4NDg4NDk3YWZkZGZjZWFmZjU5M2U5MDUxZDA2NWViZDU2MzE1NDhjNjlmZmQ5NDNhZWI2N2MiOnsibS8wJy8xNicvMCciOiJmZmZmZmZmZiJ9fSwiZGV2aWNlIjpmYWxzZSwicmVmcmVzaEV4cGlyYXRpb24iOiIyMDI2LTA2LTA0VDA5OjU4OjU3WiJ9.i6gDmJ_0g3712IVMhELRYzfu65fgcIbP75VRGkH7y4IXesev8SeE0JVZWI4j7XpXs0Ug0E1G1RLnVkevI5o4oA",
536
+ "connection": "close",
537
+ "host": "trustchain-backend.api.aws.stg.ldg-tech.com",
538
+ "user-agent": "axios/1.13.5"
539
+ }
540
+ },
541
+ "response": {
542
+ "status": 200,
543
+ "headers": {
544
+ "cache-control": "no-store, no-cache, max-age=0",
545
+ "connection": "close",
546
+ "content-type": "application/json",
547
+ "date": "Thu, 04 Jun 2026 08:58:57 GMT",
548
+ "expires": "Thu, 01 Jan 1970 00:00:00 GMT",
549
+ "pragma": "no-cache",
550
+ "strict-transport-security": "max-age=31536000; includeSubDomains",
551
+ "transfer-encoding": "chunked"
552
+ },
553
+ "body": "{\"m/\":\"010101022096826ae7a702799f59a271b59303d87712ec04de21b4c26d582e4d51cc0c54460621038a24a93fc923663957463c326323553bc120afdcb7c29b01b91e00cfec389c6401010110b005000102000006210346dd1a08066fe65efc1e2cfdc10d03af3bbe9f431f1d70de58c0ba38ee64c1910510b200b2bb1e52c6e653189aa8fc39fa3b0550d1d0c36c7cd53502ba02d542f7a8ed28e3071a9d7acf755478470266732019d663d7a6588bb0798dc371e051a476b7162ad9e77215f7522260ab12c4391489ea99aaee175dfbb5e9764562f154acf92b062103c67243df1229238e78cf01d9164518c4a3a873c5c19e09546f3b507c4def143403463044022042e2f466f506fc47ff193389a76ceafd0ff4858c02c1b88e3a94c722195e13c0022063aa7987b6b954eb69dd8adb489c14d06be065a3d3945f023cac197c7a25d635\",\"m/16'\":\"0101010220e29141c8608488497afddfceaff593e9051d065ebd5631548c69ffd943aeb67c0621038a24a93fc923663957463c326323553bc120afdcb7c29b01b91e00cfec389c6401010315b8050c800000008000001080000000062102f1e31902fae8ba31ab69361db45dfcd158d60594576c1fcbee4823222e2f1b41051008b7100d6b8239ee613de34c90a42a070550c2341cf5376449d281b96b482475ff997fee3941f57cdf665afc8f29a8be05561819a19420173d2c9b1a5f6a995e25ee2ad1ac01af502cdbb182e1793d21a65883ff52c0bc4668b3bf458b414ecfa368062103214266082c1daab7f6e351d2059214b75ca957d76360c2edf05b4e78fb54f6df113d04124c65646765722053796e63206d656d6265720621032f89642fabcc1edf2f678cebdf4026f0c8ab354b99ac9127716d7db622fe647c0104ffffffff12aa05109dc8fe1e68e44a17f85491cdb74203d5055039ceb70acca2cb2b3682d90d40930a58fc54948e0584d9c45290c9627f760fd40d0bfd13d48a480de9e5e40b46f37b20560d486a5910eec2d1ed6a29fbec3eb206587a6bb3574310424e6e41267c2cd70621032f89642fabcc1edf2f678cebdf4026f0c8ab354b99ac9127716d7db622fe647c062103dcb22d4217d83350a43695f3b77ec8a0e3d74ba015c8480d4bab70b9424ab6ac034630440220098c43ee6f370d7b2e7eadcd08a81c64a057747e858c30e56bb0f711ea0971b602203d908e9f073700c374b2e86638589db56fe81e3bbe2812bb0e5b361959f13017\",\"m/17'\":\"0101010220e29141c8608488497afddfceaff593e9051d065ebd5631548c69ffd943aeb67c0621038a24a93fc923663957463c326323553bc120afdcb7c29b01b91e00cfec389c6401010315b8050c80000000800000118000000006210221621a1b9264b790da3c73ffb229e61629c3ed74674f76312ec6b69da60186da0510b08fde5ed082cc3c0bebf9afab623ab30550bf5b52682787cad271be6522a74d5e23a69572a9ff291c0dffa7f87cbee36d63bdba29fff02c2f93a4b0542beab3b9015ee206989c073b7d47d478c3399d527965425d2f29f837e541f8145e92d89ab1062103186aa28ed2df67c2a4eed0fc4e88b3510025aa0e437ad8f1299e5b8afbf72b3f1141041677616c6c65742d636c692072696e67206d656d626572062102b41d8f8b3885a341348dbcd1d0e28ad3cb178e021e1b9eb4d76dbe04bc770c620104ffffffff12aa0510146bba095106f85cbd6ffba974b7286f055014a7b64b4088091fdc2508270e5121e0e0759cd38f695b257bb752b00740bb2e3ec5366a00b1f6a6cf29c04a5a6f4bd26f847e02711d15f6afbc6aa765ee9d6eff79aa535f25cf4565db7da95ecd7e81062102b41d8f8b3885a341348dbcd1d0e28ad3cb178e021e1b9eb4d76dbe04bc770c62062102c8e4c05e1de3497f45a536d895876b83ea8afe01b797fb17a0dee62d59ffc136034730450221008bf42ed729367c4c8e646acb39c9393ea52f4ae80288709e56e48ca48ca044ca0220624f186fe78f72209171eda141ce7d0421ff9d02e2e21d8be35ddaa372c3f2da\"}"
554
+ }
555
+ }
556
+ ]
557
+ }
558
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/ledger-key-ring-protocol",
3
- "version": "0.14.0",
3
+ "version": "0.14.1-nightly.20260606030643",
4
4
  "description": "Ledger Key Ring Protocol layer",
5
5
  "keywords": [
6
6
  "Ledger"
@@ -60,14 +60,14 @@
60
60
  "isomorphic-ws": "5.0.0",
61
61
  "rxjs": "7.8.2",
62
62
  "ws": "8.18.3",
63
- "@ledgerhq/hw-transport-mocker": "6.34.3",
64
- "@ledgerhq/errors": "6.35.0",
65
- "@ledgerhq/hw-transport": "6.35.3",
66
- "@ledgerhq/hw-ledger-key-ring-protocol": "0.10.4",
67
- "@ledgerhq/live-env": "2.37.0",
68
- "@ledgerhq/live-network": "2.6.3",
69
- "@ledgerhq/speculos-transport": "0.10.3",
63
+ "@ledgerhq/errors": "6.36.0-nightly.20260606030643",
64
+ "@ledgerhq/hw-transport": "6.35.4-nightly.20260606030643",
65
+ "@ledgerhq/hw-transport-mocker": "6.34.4-nightly.20260606030643",
66
+ "@ledgerhq/hw-ledger-key-ring-protocol": "0.10.5-nightly.20260606030643",
67
+ "@ledgerhq/live-env": "2.38.0-nightly.20260606030643",
68
+ "@ledgerhq/live-network": "2.6.4-nightly.20260606030643",
70
69
  "@ledgerhq/logs": "6.17.0",
70
+ "@ledgerhq/speculos-transport": "0.10.4-nightly.20260606030643",
71
71
  "@ledgerhq/types-devices": "^6.31.0"
72
72
  },
73
73
  "devDependencies": {
@@ -14,6 +14,7 @@ const nonMockableScenarios = [
14
14
  "tokenExpires", // can't simulate token expiration
15
15
  "userRefusesAuth", // can't simulate device interaction at the moment
16
16
  "userRefusesRemoveMember", // can't simulate device interaction at the moment
17
+ "ringInitPreservesLedgerSyncMember", // mock SDK does not model per-app member eviction
17
18
  ];
18
19
 
19
20
  const scenarioFolder = path.join(__dirname, "../../../tests/scenarios");
@@ -31,10 +32,14 @@ fs.readdirSync(scenarioFolder).forEach(file => {
31
32
  const withDevice: WithDevice = () => fn => fn(device.transport);
32
33
  const options: ScenarioOptions = {
33
34
  withDevice,
34
- sdkForName: name =>
35
+ sdkForName: (name, opts) =>
35
36
  getSdk(
36
37
  !!getEnv("MOCK"),
37
- { applicationId: 16, name, apiBaseUrl: getEnv("TRUSTCHAIN_API_STAGING") },
38
+ {
39
+ applicationId: opts?.applicationId ?? 16,
40
+ name,
41
+ apiBaseUrl: getEnv("TRUSTCHAIN_API_STAGING"),
42
+ },
38
43
  withDevice,
39
44
  ),
40
45
  pauseRecorder: () => Promise.resolve(), // replayer don't need to pause
@@ -0,0 +1,24 @@
1
+ import { ScenarioOptions } from "../test-helpers/types";
2
+
3
+ // Deriving wallet-cli `ring init` (applicationId 17) must not evict the Ledger
4
+ // Sync soft member (applicationId 16) — see trustchain-backend PR #519.
5
+
6
+ export async function scenario(deviceId: string, { sdkForName }: ScenarioOptions) {
7
+ const sdkSync = sdkForName("Ledger Sync member");
8
+ const syncCreds = await sdkSync.initMemberCredentials();
9
+ const { trustchain: syncTrustchain } = await sdkSync.getOrCreateTrustchain(deviceId, syncCreds);
10
+
11
+ const before = await sdkSync.getMembers(syncTrustchain, syncCreds);
12
+ expect(before.some(m => m.id === syncCreds.pubkey)).toBe(true);
13
+
14
+ const sdkRing = sdkForName("wallet-cli ring member", { applicationId: 17 });
15
+ const ringCreds = await sdkRing.initMemberCredentials();
16
+ await sdkRing.getOrCreateTrustchain(deviceId, ringCreds);
17
+
18
+ // Drop the JWT cached before the ring derivation so the assertion below
19
+ // validates the soft member can still obtain a fresh JWT.
20
+ sdkSync.invalidateJwt();
21
+
22
+ const after = await sdkSync.getMembers(syncTrustchain, syncCreds);
23
+ expect(after.some(m => m.id === syncCreds.pubkey)).toBe(true);
24
+ }
@@ -1,4 +1,5 @@
1
1
  import fsPromises from "fs/promises";
2
+ import zlib from "zlib";
2
3
  import { setupServer } from "msw/node";
3
4
  import { RecordStore } from "@ledgerhq/hw-transport-mocker";
4
5
  import { createSpeculosDevice, releaseSpeculosDevice } from "@ledgerhq/speculos-transport";
@@ -66,9 +67,25 @@ export async function recordTestTrustchainSdk(
66
67
 
67
68
  // listen to network with msw to be able to replay in our future tests
68
69
  const transactions: Transaction[] = [];
70
+ const bodyReads: Array<Promise<void>> = [];
71
+ // The request body is consumed by the time `response:bypass` fires, so we
72
+ // snapshot it from a clone at `request:start` and merge it back by requestId.
73
+ const requestBodies = new Map<string, string>();
69
74
  const server = setupServer();
70
- server.events.on("response:bypass", ({ response, request }) => {
71
- if (request.url.startsWith("http://localhost")) return; // ignore speculos requests
75
+ server.events.on("request:start", ({ request, requestId }) => {
76
+ if (isSpeculosRequest(request.url)) return; // ignore speculos requests
77
+ if (!request.body) return;
78
+ bodyReads.push(
79
+ request
80
+ .clone()
81
+ .text()
82
+ .then(body => {
83
+ requestBodies.set(requestId, body);
84
+ }),
85
+ );
86
+ });
87
+ server.events.on("response:bypass", ({ response, request, requestId }) => {
88
+ if (isSpeculosRequest(request.url)) return; // ignore speculos requests
72
89
  const transaction: Transaction = {
73
90
  request: {
74
91
  url: request.url,
@@ -77,19 +94,30 @@ export async function recordTestTrustchainSdk(
77
94
  },
78
95
  response: {
79
96
  status: response.status,
80
- headers: headersToJson(response.headers),
97
+ // We store the decoded body (`response.text()`), so drop the headers
98
+ // that describe the wire encoding/length: replaying them would make the
99
+ // client try to gunzip plaintext (`incorrect header check`) or truncate.
100
+ headers: headersToJson(response.headers, DECODED_BODY_HEADERS),
81
101
  },
82
102
  };
83
103
  transactions.push(transaction);
84
- if (request.body) {
85
- request.text().then(body => {
86
- transaction.request.body = body;
87
- });
104
+ const requestBody = requestBodies.get(requestId);
105
+ if (requestBody !== undefined) {
106
+ transaction.request.body = requestBody;
107
+ requestBodies.delete(requestId);
88
108
  }
89
109
  if (response.body) {
90
- response.text().then(body => {
91
- transaction.response.body = body;
92
- });
110
+ // `response.text()` on a bypassed response yields the still-encoded bytes
111
+ // (the server's content-encoding), so decode by hand and store plaintext.
112
+ const encoding = response.headers.get("content-encoding")?.toLowerCase();
113
+ bodyReads.push(
114
+ response
115
+ .clone()
116
+ .arrayBuffer()
117
+ .then(buffer => {
118
+ transaction.response.body = decodeBody(Buffer.from(buffer), encoding).toString("utf8");
119
+ }),
120
+ );
93
121
  }
94
122
  });
95
123
 
@@ -115,10 +143,14 @@ export async function recordTestTrustchainSdk(
115
143
  const withDevice: WithDevice = () => fn => fn(device.transport);
116
144
  const options: ScenarioOptions = {
117
145
  withDevice,
118
- sdkForName: name =>
146
+ sdkForName: (name, opts) =>
119
147
  getSdk(
120
148
  !!getEnv("MOCK"),
121
- { applicationId: 16, name, apiBaseUrl: getEnv("TRUSTCHAIN_API_STAGING") },
149
+ {
150
+ applicationId: opts?.applicationId ?? 16,
151
+ name,
152
+ apiBaseUrl: getEnv("TRUSTCHAIN_API_STAGING"),
153
+ },
122
154
  withDevice,
123
155
  ),
124
156
  pauseRecorder: async (milliseconds: number) => {
@@ -142,8 +174,11 @@ export async function recordTestTrustchainSdk(
142
174
  sub.unsubscribe();
143
175
  await Promise.all(buttonClicksPromises);
144
176
  await releaseSpeculosDevice(device.id);
177
+ server.close();
145
178
  }
146
- server.close();
179
+
180
+ // Ensure every request/response body has been captured before serializing.
181
+ await Promise.all(bodyReads);
147
182
 
148
183
  if (file) {
149
184
  const json = {
@@ -151,15 +186,42 @@ export async function recordTestTrustchainSdk(
151
186
  crypto: { randomBytesOutputs, randomKeypairOutputs },
152
187
  http: { transactions },
153
188
  };
154
-
155
- // Write the transactions to the disk.
156
189
  await fsPromises.writeFile(file, JSON.stringify(json, null, 2));
157
190
  }
158
191
  }
159
192
 
160
- function headersToJson(headers) {
193
+ // Speculos runs locally over HTTP (localhost or 127.0.0.1, on a random port).
194
+ // Only trustchain backend traffic is kept in the snapshot, the device APDU
195
+ // exchanges are replayed from the recorded APDU store instead.
196
+ function isSpeculosRequest(url: string): boolean {
197
+ try {
198
+ const { hostname } = new URL(url);
199
+ return hostname === "localhost" || hostname === "127.0.0.1";
200
+ } catch {
201
+ return false;
202
+ }
203
+ }
204
+
205
+ // Headers invalidated by storing the decoded response body in the snapshot.
206
+ const DECODED_BODY_HEADERS = new Set(["content-encoding", "content-length"]);
207
+
208
+ function decodeBody(buffer: Buffer, encoding?: string): Buffer {
209
+ switch (encoding) {
210
+ case "gzip":
211
+ return zlib.gunzipSync(buffer);
212
+ case "br":
213
+ return zlib.brotliDecompressSync(buffer);
214
+ case "deflate":
215
+ return zlib.inflateSync(buffer);
216
+ default:
217
+ return buffer;
218
+ }
219
+ }
220
+
221
+ function headersToJson(headers, exclude?: Set<string>) {
161
222
  const obj: Record<string, string> = {};
162
223
  for (const [key, value] of headers.entries()) {
224
+ if (exclude?.has(key.toLowerCase())) continue;
163
225
  obj[key] = value;
164
226
  }
165
227
  return obj;
@@ -121,10 +121,14 @@ export async function replayTrustchainSdkTests<Json extends JsonShape>(
121
121
 
122
122
  const options: ScenarioOptions = {
123
123
  withDevice,
124
- sdkForName: name =>
124
+ sdkForName: (name, opts) =>
125
125
  getSdk(
126
126
  !!getEnv("MOCK"),
127
- { applicationId: 16, name, apiBaseUrl: getEnv("TRUSTCHAIN_API_STAGING") },
127
+ {
128
+ applicationId: opts?.applicationId ?? 16,
129
+ name,
130
+ apiBaseUrl: getEnv("TRUSTCHAIN_API_STAGING"),
131
+ },
128
132
  withDevice,
129
133
  ),
130
134
  pauseRecorder: () => Promise.resolve(),
@@ -4,9 +4,10 @@ import { TrustchainSDK, WithDevice } from "../../src/types";
4
4
 
5
5
  export type ScenarioOptions = {
6
6
  /**
7
- * easily create a sdk for a given member name
7
+ * easily create a sdk for a given member name.
8
+ * `applicationId` defaults to 16 (Ledger Sync). Pass another value (e.g. 17 for wallet-cli ring) to exercise a different derivation app.
8
9
  */
9
- sdkForName: (name: string) => TrustchainSDK;
10
+ sdkForName: (name: string, opts?: { applicationId?: number }) => TrustchainSDK;
10
11
  /**
11
12
  * pause the recorder (e2e) part for a given amount of time
12
13
  */