@ledgerhq/coin-solana 0.35.0-nightly.8 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +28 -80
- package/lib/__fixtures__/solana-spl-epjfwdd5aufqssqem2qn1xzybapc8g4weggkzwytdt1v.json +50 -0
- package/lib/__tests__/fixtures/helpers.fixture.d.ts +138 -0
- package/lib/__tests__/fixtures/helpers.fixture.d.ts.map +1 -0
- package/lib/__tests__/fixtures/helpers.fixture.js +124 -0
- package/lib/__tests__/fixtures/helpers.fixture.js.map +1 -0
- package/lib/__tests__/scan-accounts.test.d.ts +2 -0
- package/lib/__tests__/scan-accounts.test.d.ts.map +1 -0
- package/lib/__tests__/scan-accounts.test.js +426 -0
- package/lib/__tests__/scan-accounts.test.js.map +1 -0
- package/lib/__tests__/unit/hw-signMessage.unit.test.d.ts +2 -0
- package/lib/__tests__/unit/hw-signMessage.unit.test.d.ts.map +1 -0
- package/lib/__tests__/unit/hw-signMessage.unit.test.js +91 -0
- package/lib/__tests__/unit/hw-signMessage.unit.test.js.map +1 -0
- package/lib/__tests__/unit/nftResolvers.unit.test.d.ts +2 -0
- package/lib/__tests__/unit/nftResolvers.unit.test.d.ts.map +1 -0
- package/lib/__tests__/unit/nftResolvers.unit.test.js +147 -0
- package/lib/__tests__/unit/nftResolvers.unit.test.js.map +1 -0
- package/lib/__tests__/unit/utils.unit.test.d.ts +2 -0
- package/lib/__tests__/unit/utils.unit.test.d.ts.map +1 -0
- package/lib/__tests__/unit/utils.unit.test.js +16 -0
- package/lib/__tests__/unit/utils.unit.test.js.map +1 -0
- package/lib/__tests__/unit/validator-app.unit.test.d.ts +2 -0
- package/lib/__tests__/unit/validator-app.unit.test.d.ts.map +1 -0
- package/lib/__tests__/unit/validator-app.unit.test.js +169 -0
- package/lib/__tests__/unit/validator-app.unit.test.js.map +1 -0
- package/lib/bridge.integration.test.d.ts +4 -0
- package/lib/bridge.integration.test.d.ts.map +1 -0
- package/lib/bridge.integration.test.js +870 -0
- package/lib/bridge.integration.test.js.map +1 -0
- package/lib/buildTransaction.test.d.ts +2 -0
- package/lib/buildTransaction.test.d.ts.map +1 -0
- package/lib/buildTransaction.test.js +164 -0
- package/lib/buildTransaction.test.js.map +1 -0
- package/lib/cryptoAssetsStore.test.d.ts +2 -0
- package/lib/cryptoAssetsStore.test.d.ts.map +1 -0
- package/lib/cryptoAssetsStore.test.js +15 -0
- package/lib/cryptoAssetsStore.test.js.map +1 -0
- package/lib/network/chain/account/parser.d.ts +1 -1
- package/lib/network/chain/account/stake.d.ts +23 -23
- package/lib/network/chain/account/token.d.ts +7 -7
- package/lib/network/chain/instruction/stake/types.d.ts +8 -8
- package/lib/network/chain/instruction/system/types.d.ts +10 -10
- package/lib/network/chain/web3.integration.test.d.ts +2 -0
- package/lib/network/chain/web3.integration.test.d.ts.map +1 -0
- package/lib/network/chain/web3.integration.test.js +70 -0
- package/lib/network/chain/web3.integration.test.js.map +1 -0
- package/lib/offchainMessage/format.unit.test.d.ts +2 -0
- package/lib/offchainMessage/format.unit.test.d.ts.map +1 -0
- package/lib/offchainMessage/format.unit.test.js +124 -0
- package/lib/offchainMessage/format.unit.test.js.map +1 -0
- package/lib/preload.test.d.ts +2 -0
- package/lib/preload.test.d.ts.map +1 -0
- package/lib/preload.test.js +9 -0
- package/lib/preload.test.js.map +1 -0
- package/lib/prepareTransaction.d.ts.map +1 -1
- package/lib/prepareTransaction.js +0 -4
- package/lib/prepareTransaction.js.map +1 -1
- package/lib/prepareTransaction.test.d.ts +2 -0
- package/lib/prepareTransaction.test.d.ts.map +1 -0
- package/lib/prepareTransaction.test.js +139 -0
- package/lib/prepareTransaction.test.js.map +1 -0
- package/lib/signOperation.d.ts.map +1 -1
- package/lib/signOperation.js +0 -2
- package/lib/signOperation.js.map +1 -1
- package/lib/signOperation.test.d.ts +3 -0
- package/lib/signOperation.test.d.ts.map +1 -0
- package/lib/signOperation.test.js +139 -0
- package/lib/signOperation.test.js.map +1 -0
- package/lib/signer.d.ts +0 -1
- package/lib/signer.d.ts.map +1 -1
- package/lib/signer.js.map +1 -1
- package/lib/tests/preload.fixtures.d.ts +5 -0
- package/lib/tests/preload.fixtures.d.ts.map +1 -0
- package/lib/tests/preload.fixtures.js +28 -0
- package/lib/tests/preload.fixtures.js.map +1 -0
- package/lib/tests/preload.unit.test.d.ts +2 -0
- package/lib/tests/preload.unit.test.d.ts.map +1 -0
- package/lib/tests/preload.unit.test.js +175 -0
- package/lib/tests/preload.unit.test.js.map +1 -0
- package/lib/tests/stakes-bridge.unit.test.d.ts +2 -0
- package/lib/tests/stakes-bridge.unit.test.d.ts.map +1 -0
- package/lib/tests/stakes-bridge.unit.test.js +166 -0
- package/lib/tests/stakes-bridge.unit.test.js.map +1 -0
- package/lib/tests/test-onchain-data.fixture.d.ts +20 -0
- package/lib/tests/test-onchain-data.fixture.d.ts.map +1 -0
- package/lib/tests/test-onchain-data.fixture.js +34 -0
- package/lib/tests/test-onchain-data.fixture.js.map +1 -0
- package/lib/tests/tokens-bridge.unit.test.d.ts +2 -0
- package/lib/tests/tokens-bridge.unit.test.d.ts.map +1 -0
- package/lib/tests/tokens-bridge.unit.test.js +615 -0
- package/lib/tests/tokens-bridge.unit.test.js.map +1 -0
- package/lib/tx-fees.js +0 -2
- package/lib/tx-fees.js.map +1 -1
- package/lib/types.d.ts +1 -2
- package/lib/types.d.ts.map +1 -1
- package/lib-es/__fixtures__/solana-spl-epjfwdd5aufqssqem2qn1xzybapc8g4weggkzwytdt1v.json +50 -0
- package/lib-es/__tests__/fixtures/helpers.fixture.d.ts +138 -0
- package/lib-es/__tests__/fixtures/helpers.fixture.d.ts.map +1 -0
- package/lib-es/__tests__/fixtures/helpers.fixture.js +110 -0
- package/lib-es/__tests__/fixtures/helpers.fixture.js.map +1 -0
- package/lib-es/__tests__/scan-accounts.test.d.ts +2 -0
- package/lib-es/__tests__/scan-accounts.test.d.ts.map +1 -0
- package/lib-es/__tests__/scan-accounts.test.js +398 -0
- package/lib-es/__tests__/scan-accounts.test.js.map +1 -0
- package/lib-es/__tests__/unit/hw-signMessage.unit.test.d.ts +2 -0
- package/lib-es/__tests__/unit/hw-signMessage.unit.test.d.ts.map +1 -0
- package/lib-es/__tests__/unit/hw-signMessage.unit.test.js +86 -0
- package/lib-es/__tests__/unit/hw-signMessage.unit.test.js.map +1 -0
- package/lib-es/__tests__/unit/nftResolvers.unit.test.d.ts +2 -0
- package/lib-es/__tests__/unit/nftResolvers.unit.test.d.ts.map +1 -0
- package/lib-es/__tests__/unit/nftResolvers.unit.test.js +142 -0
- package/lib-es/__tests__/unit/nftResolvers.unit.test.js.map +1 -0
- package/lib-es/__tests__/unit/utils.unit.test.d.ts +2 -0
- package/lib-es/__tests__/unit/utils.unit.test.d.ts.map +1 -0
- package/lib-es/__tests__/unit/utils.unit.test.js +14 -0
- package/lib-es/__tests__/unit/utils.unit.test.js.map +1 -0
- package/lib-es/__tests__/unit/validator-app.unit.test.d.ts +2 -0
- package/lib-es/__tests__/unit/validator-app.unit.test.d.ts.map +1 -0
- package/lib-es/__tests__/unit/validator-app.unit.test.js +144 -0
- package/lib-es/__tests__/unit/validator-app.unit.test.js.map +1 -0
- package/lib-es/bridge.integration.test.d.ts +4 -0
- package/lib-es/bridge.integration.test.d.ts.map +1 -0
- package/lib-es/bridge.integration.test.js +864 -0
- package/lib-es/bridge.integration.test.js.map +1 -0
- package/lib-es/buildTransaction.test.d.ts +2 -0
- package/lib-es/buildTransaction.test.d.ts.map +1 -0
- package/lib-es/buildTransaction.test.js +162 -0
- package/lib-es/buildTransaction.test.js.map +1 -0
- package/lib-es/cryptoAssetsStore.test.d.ts +2 -0
- package/lib-es/cryptoAssetsStore.test.d.ts.map +1 -0
- package/lib-es/cryptoAssetsStore.test.js +13 -0
- package/lib-es/cryptoAssetsStore.test.js.map +1 -0
- package/lib-es/network/chain/account/parser.d.ts +1 -1
- package/lib-es/network/chain/account/stake.d.ts +23 -23
- package/lib-es/network/chain/account/token.d.ts +7 -7
- package/lib-es/network/chain/instruction/stake/types.d.ts +8 -8
- package/lib-es/network/chain/instruction/system/types.d.ts +10 -10
- package/lib-es/network/chain/web3.integration.test.d.ts +2 -0
- package/lib-es/network/chain/web3.integration.test.d.ts.map +1 -0
- package/lib-es/network/chain/web3.integration.test.js +68 -0
- package/lib-es/network/chain/web3.integration.test.js.map +1 -0
- package/lib-es/offchainMessage/format.unit.test.d.ts +2 -0
- package/lib-es/offchainMessage/format.unit.test.d.ts.map +1 -0
- package/lib-es/offchainMessage/format.unit.test.js +122 -0
- package/lib-es/offchainMessage/format.unit.test.js.map +1 -0
- package/lib-es/preload.test.d.ts +2 -0
- package/lib-es/preload.test.d.ts.map +1 -0
- package/lib-es/preload.test.js +7 -0
- package/lib-es/preload.test.js.map +1 -0
- package/lib-es/prepareTransaction.d.ts.map +1 -1
- package/lib-es/prepareTransaction.js +0 -4
- package/lib-es/prepareTransaction.js.map +1 -1
- package/lib-es/prepareTransaction.test.d.ts +2 -0
- package/lib-es/prepareTransaction.test.d.ts.map +1 -0
- package/lib-es/prepareTransaction.test.js +134 -0
- package/lib-es/prepareTransaction.test.js.map +1 -0
- package/lib-es/signOperation.d.ts.map +1 -1
- package/lib-es/signOperation.js +0 -2
- package/lib-es/signOperation.js.map +1 -1
- package/lib-es/signOperation.test.d.ts +3 -0
- package/lib-es/signOperation.test.d.ts.map +1 -0
- package/lib-es/signOperation.test.js +135 -0
- package/lib-es/signOperation.test.js.map +1 -0
- package/lib-es/signer.d.ts +0 -1
- package/lib-es/signer.d.ts.map +1 -1
- package/lib-es/signer.js.map +1 -1
- package/lib-es/tests/preload.fixtures.d.ts +5 -0
- package/lib-es/tests/preload.fixtures.d.ts.map +1 -0
- package/lib-es/tests/preload.fixtures.js +25 -0
- package/lib-es/tests/preload.fixtures.js.map +1 -0
- package/lib-es/tests/preload.unit.test.d.ts +2 -0
- package/lib-es/tests/preload.unit.test.d.ts.map +1 -0
- package/lib-es/tests/preload.unit.test.js +147 -0
- package/lib-es/tests/preload.unit.test.js.map +1 -0
- package/lib-es/tests/stakes-bridge.unit.test.d.ts +2 -0
- package/lib-es/tests/stakes-bridge.unit.test.d.ts.map +1 -0
- package/lib-es/tests/stakes-bridge.unit.test.js +161 -0
- package/lib-es/tests/stakes-bridge.unit.test.js.map +1 -0
- package/lib-es/tests/test-onchain-data.fixture.d.ts +20 -0
- package/lib-es/tests/test-onchain-data.fixture.d.ts.map +1 -0
- package/lib-es/tests/test-onchain-data.fixture.js +28 -0
- package/lib-es/tests/test-onchain-data.fixture.js.map +1 -0
- package/lib-es/tests/tokens-bridge.unit.test.d.ts +2 -0
- package/lib-es/tests/tokens-bridge.unit.test.d.ts.map +1 -0
- package/lib-es/tests/tokens-bridge.unit.test.js +610 -0
- package/lib-es/tests/tokens-bridge.unit.test.js.map +1 -0
- package/lib-es/tx-fees.js +0 -2
- package/lib-es/tx-fees.js.map +1 -1
- package/lib-es/types.d.ts +1 -2
- package/lib-es/types.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/prepareTransaction.ts +0 -4
- package/src/signOperation.ts +0 -2
- package/src/signer.ts +0 -1
- package/src/tests/preload.fixtures.ts +1 -1
- package/src/tx-fees.ts +0 -2
- package/src/types.ts +1 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
> @ledgerhq/coin-solana@0.35.0
|
|
2
|
+
> @ledgerhq/coin-solana@0.35.0 build /home/runner/work/ledger-live/ledger-live/libs/coin-modules/coin-solana
|
|
3
3
|
> tsc --outDir lib --module commonjs --moduleResolution node10 && tsc -m ES6 --outDir lib-es
|
|
4
4
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,109 +1,57 @@
|
|
|
1
1
|
# @ledgerhq/coin-solana
|
|
2
2
|
|
|
3
|
-
## 0.35.0
|
|
3
|
+
## 0.35.0
|
|
4
4
|
|
|
5
|
-
###
|
|
6
|
-
|
|
7
|
-
- Updated dependencies [[`c96d73f`](https://github.com/LedgerHQ/ledger-live/commit/c96d73fed0a75a9c208f78d51c34b742703a7dda)]:
|
|
8
|
-
- @ledgerhq/coin-framework@6.7.0-nightly.8
|
|
9
|
-
|
|
10
|
-
## 0.35.0-nightly.7
|
|
11
|
-
|
|
12
|
-
### Patch Changes
|
|
13
|
-
|
|
14
|
-
- Updated dependencies [[`b4ceaff`](https://github.com/LedgerHQ/ledger-live/commit/b4ceaff2ecf68d8a14e09801c76ab0b014c45286), [`f392f69`](https://github.com/LedgerHQ/ledger-live/commit/f392f6912f445cc2f7cf4dfcfd030fa3da76f736), [`cbc0648`](https://github.com/LedgerHQ/ledger-live/commit/cbc064885d8e0459e40d327a2e5389204b3ec705)]:
|
|
15
|
-
- @ledgerhq/cryptoassets@13.31.0-nightly.7
|
|
16
|
-
- @ledgerhq/types-live@6.87.0-nightly.5
|
|
17
|
-
- @ledgerhq/live-env@2.19.0-nightly.2
|
|
18
|
-
- @ledgerhq/coin-framework@6.7.0-nightly.7
|
|
19
|
-
- @ledgerhq/live-network@2.0.20-nightly.3
|
|
20
|
-
|
|
21
|
-
## 0.35.0-nightly.6
|
|
22
|
-
|
|
23
|
-
### Patch Changes
|
|
24
|
-
|
|
25
|
-
- Updated dependencies [[`51995e9`](https://github.com/LedgerHQ/ledger-live/commit/51995e96a9e1fafe14c7cbe45ce0b1ec8ebd106b)]:
|
|
26
|
-
- @ledgerhq/types-live@6.87.0-nightly.4
|
|
27
|
-
- @ledgerhq/coin-framework@6.7.0-nightly.6
|
|
28
|
-
- @ledgerhq/cryptoassets@13.31.0-nightly.6
|
|
29
|
-
|
|
30
|
-
## 0.35.0-nightly.5
|
|
31
|
-
|
|
32
|
-
### Patch Changes
|
|
33
|
-
|
|
34
|
-
- Updated dependencies [[`cadf2e1`](https://github.com/LedgerHQ/ledger-live/commit/cadf2e1dfb09248d3f77d96f94ae774425dbca75)]:
|
|
35
|
-
- @ledgerhq/live-env@2.19.0-nightly.1
|
|
36
|
-
- @ledgerhq/coin-framework@6.7.0-nightly.5
|
|
37
|
-
- @ledgerhq/cryptoassets@13.31.0-nightly.5
|
|
38
|
-
- @ledgerhq/live-network@2.0.20-nightly.2
|
|
39
|
-
|
|
40
|
-
## 0.35.0-nightly.4
|
|
41
|
-
|
|
42
|
-
### Patch Changes
|
|
5
|
+
### Minor Changes
|
|
43
6
|
|
|
44
|
-
-
|
|
45
|
-
- @ledgerhq/types-live@6.87.0-nightly.3
|
|
46
|
-
- @ledgerhq/errors@6.27.0-nightly.0
|
|
47
|
-
- @ledgerhq/coin-framework@6.7.0-nightly.4
|
|
48
|
-
- @ledgerhq/cryptoassets@13.31.0-nightly.4
|
|
49
|
-
- @ledgerhq/devices@8.6.2-nightly.0
|
|
50
|
-
- @ledgerhq/live-network@2.0.20-nightly.1
|
|
7
|
+
- [#12186](https://github.com/LedgerHQ/ledger-live/pull/12186) [`a9aacdb`](https://github.com/LedgerHQ/ledger-live/commit/a9aacdb330700f0a294833f7d77de17f179229b2) Thanks [@gre-ledger](https://github.com/gre-ledger)! - Remove deprecated `findTokenByTicker` function and related internal state. This function was ambiguous when multiple tokens shared the same ticker across different blockchains. Use `findTokenById` or `findTokenByAddressInCurrency` instead for more precise token lookup.
|
|
51
8
|
|
|
52
|
-
|
|
9
|
+
- [#12015](https://github.com/LedgerHQ/ledger-live/pull/12015) [`03af552`](https://github.com/LedgerHQ/ledger-live/commit/03af552b621e19e31747a65b1870dfe8d3bb005b) Thanks [@Justkant](https://github.com/Justkant)! - feat: new signRawTransaction to support any XRP transaction with wallet-api
|
|
53
10
|
|
|
54
|
-
|
|
11
|
+
- [#12196](https://github.com/LedgerHQ/ledger-live/pull/12196) [`565da80`](https://github.com/LedgerHQ/ledger-live/commit/565da807b1ebbfc830fd0e47b3d8856f88d410a6) Thanks [@gre-ledger](https://github.com/gre-ledger)! - Remove deprecated getTokenById and hasTokenId functions
|
|
55
12
|
|
|
56
|
-
- [#
|
|
13
|
+
- [#12096](https://github.com/LedgerHQ/ledger-live/pull/12096) [`bc6e500`](https://github.com/LedgerHQ/ledger-live/commit/bc6e500bfd0f47bfbee2fdbe65f9a42e02793255) Thanks [@francois-guerin-ledger](https://github.com/francois-guerin-ledger)! - fix(coin-solana) do not reject unknown SPL 2022 extensions
|
|
57
14
|
|
|
58
15
|
### Patch Changes
|
|
59
16
|
|
|
60
|
-
- Updated dependencies [[`8645f01`](https://github.com/LedgerHQ/ledger-live/commit/8645f016191d29a55f6b0ca6e4b1d1909fd35445)]:
|
|
61
|
-
- @ledgerhq/
|
|
62
|
-
- @ledgerhq/
|
|
63
|
-
- @ledgerhq/
|
|
17
|
+
- Updated dependencies [[`ea16f59`](https://github.com/LedgerHQ/ledger-live/commit/ea16f592e85019a1b77287a7f2b975c6fcffc74c), [`b88faa1`](https://github.com/LedgerHQ/ledger-live/commit/b88faa18e2f5cd309b54fc3157a44db606846cc5), [`cfe65ca`](https://github.com/LedgerHQ/ledger-live/commit/cfe65cafa268be4e53197ee163ce78f28ed72592), [`a9aacdb`](https://github.com/LedgerHQ/ledger-live/commit/a9aacdb330700f0a294833f7d77de17f179229b2), [`3979c07`](https://github.com/LedgerHQ/ledger-live/commit/3979c0715e4f54165c89d00ebe1441e064e1a110), [`f1f3845`](https://github.com/LedgerHQ/ledger-live/commit/f1f3845942e4cbce9c585dc65f6170ddbc319f19), [`c6a676f`](https://github.com/LedgerHQ/ledger-live/commit/c6a676ff80581ac19b896adf44d54812983b72da), [`b5fc1bd`](https://github.com/LedgerHQ/ledger-live/commit/b5fc1bd28fff091241905fec5ff8dc8af4c99b79), [`03af552`](https://github.com/LedgerHQ/ledger-live/commit/03af552b621e19e31747a65b1870dfe8d3bb005b), [`89ac0ed`](https://github.com/LedgerHQ/ledger-live/commit/89ac0eddc145dcf5c7cf240aa8be4301372c8f33), [`565da80`](https://github.com/LedgerHQ/ledger-live/commit/565da807b1ebbfc830fd0e47b3d8856f88d410a6), [`8645f01`](https://github.com/LedgerHQ/ledger-live/commit/8645f016191d29a55f6b0ca6e4b1d1909fd35445), [`1d9860c`](https://github.com/LedgerHQ/ledger-live/commit/1d9860cd1688131d391579955b40c6710b667db8), [`d2b12e7`](https://github.com/LedgerHQ/ledger-live/commit/d2b12e70bba9e772d078d1fe4d9c537b8d316a87), [`db25e21`](https://github.com/LedgerHQ/ledger-live/commit/db25e212b87dea426b153c6f1d988cead63c8c46), [`c8dbf40`](https://github.com/LedgerHQ/ledger-live/commit/c8dbf402268359e225a94782420111e786f875fa), [`cab7d97`](https://github.com/LedgerHQ/ledger-live/commit/cab7d9794e7babb8220c6d339fb08e618e3d4202)]:
|
|
18
|
+
- @ledgerhq/cryptoassets@13.31.0
|
|
19
|
+
- @ledgerhq/types-live@6.87.0
|
|
20
|
+
- @ledgerhq/coin-framework@6.7.0
|
|
21
|
+
- @ledgerhq/live-env@2.19.0
|
|
22
|
+
- @ledgerhq/types-cryptoassets@7.29.0
|
|
23
|
+
- @ledgerhq/live-network@2.0.20
|
|
64
24
|
|
|
65
|
-
## 0.35.0-
|
|
66
|
-
|
|
67
|
-
### Minor Changes
|
|
68
|
-
|
|
69
|
-
- [#12196](https://github.com/LedgerHQ/ledger-live/pull/12196) [`565da80`](https://github.com/LedgerHQ/ledger-live/commit/565da807b1ebbfc830fd0e47b3d8856f88d410a6) Thanks [@gre-ledger](https://github.com/gre-ledger)! - Remove deprecated getTokenById and hasTokenId functions
|
|
25
|
+
## 0.35.0-next.1
|
|
70
26
|
|
|
71
27
|
### Patch Changes
|
|
72
28
|
|
|
73
|
-
- Updated dependencies [[`
|
|
74
|
-
- @ledgerhq/
|
|
75
|
-
- @ledgerhq/
|
|
29
|
+
- Updated dependencies [[`b88faa1`](https://github.com/LedgerHQ/ledger-live/commit/b88faa18e2f5cd309b54fc3157a44db606846cc5)]:
|
|
30
|
+
- @ledgerhq/types-live@6.87.0-next.1
|
|
31
|
+
- @ledgerhq/coin-framework@6.7.0-next.1
|
|
32
|
+
- @ledgerhq/cryptoassets@13.31.0-next.1
|
|
76
33
|
|
|
77
|
-
## 0.35.0-
|
|
34
|
+
## 0.35.0-next.0
|
|
78
35
|
|
|
79
36
|
### Minor Changes
|
|
80
37
|
|
|
81
38
|
- [#12186](https://github.com/LedgerHQ/ledger-live/pull/12186) [`a9aacdb`](https://github.com/LedgerHQ/ledger-live/commit/a9aacdb330700f0a294833f7d77de17f179229b2) Thanks [@gre-ledger](https://github.com/gre-ledger)! - Remove deprecated `findTokenByTicker` function and related internal state. This function was ambiguous when multiple tokens shared the same ticker across different blockchains. Use `findTokenById` or `findTokenByAddressInCurrency` instead for more precise token lookup.
|
|
82
39
|
|
|
83
|
-
### Patch Changes
|
|
84
|
-
|
|
85
|
-
- Updated dependencies [[`ea16f59`](https://github.com/LedgerHQ/ledger-live/commit/ea16f592e85019a1b77287a7f2b975c6fcffc74c), [`a9aacdb`](https://github.com/LedgerHQ/ledger-live/commit/a9aacdb330700f0a294833f7d77de17f179229b2), [`f1f3845`](https://github.com/LedgerHQ/ledger-live/commit/f1f3845942e4cbce9c585dc65f6170ddbc319f19), [`89ac0ed`](https://github.com/LedgerHQ/ledger-live/commit/89ac0eddc145dcf5c7cf240aa8be4301372c8f33), [`db25e21`](https://github.com/LedgerHQ/ledger-live/commit/db25e212b87dea426b153c6f1d988cead63c8c46)]:
|
|
86
|
-
- @ledgerhq/cryptoassets@13.31.0-nightly.1
|
|
87
|
-
- @ledgerhq/types-live@6.87.0-nightly.1
|
|
88
|
-
- @ledgerhq/live-env@2.19.0-nightly.0
|
|
89
|
-
- @ledgerhq/coin-framework@6.7.0-nightly.1
|
|
90
|
-
- @ledgerhq/live-network@2.0.20-nightly.0
|
|
91
|
-
|
|
92
|
-
## 0.35.0-nightly.0
|
|
93
|
-
|
|
94
|
-
### Minor Changes
|
|
95
|
-
|
|
96
40
|
- [#12015](https://github.com/LedgerHQ/ledger-live/pull/12015) [`03af552`](https://github.com/LedgerHQ/ledger-live/commit/03af552b621e19e31747a65b1870dfe8d3bb005b) Thanks [@Justkant](https://github.com/Justkant)! - feat: new signRawTransaction to support any XRP transaction with wallet-api
|
|
97
41
|
|
|
42
|
+
- [#12196](https://github.com/LedgerHQ/ledger-live/pull/12196) [`565da80`](https://github.com/LedgerHQ/ledger-live/commit/565da807b1ebbfc830fd0e47b3d8856f88d410a6) Thanks [@gre-ledger](https://github.com/gre-ledger)! - Remove deprecated getTokenById and hasTokenId functions
|
|
43
|
+
|
|
98
44
|
- [#12096](https://github.com/LedgerHQ/ledger-live/pull/12096) [`bc6e500`](https://github.com/LedgerHQ/ledger-live/commit/bc6e500bfd0f47bfbee2fdbe65f9a42e02793255) Thanks [@francois-guerin-ledger](https://github.com/francois-guerin-ledger)! - fix(coin-solana) do not reject unknown SPL 2022 extensions
|
|
99
45
|
|
|
100
46
|
### Patch Changes
|
|
101
47
|
|
|
102
|
-
- Updated dependencies [[`cfe65ca`](https://github.com/LedgerHQ/ledger-live/commit/cfe65cafa268be4e53197ee163ce78f28ed72592), [`b5fc1bd`](https://github.com/LedgerHQ/ledger-live/commit/b5fc1bd28fff091241905fec5ff8dc8af4c99b79), [`03af552`](https://github.com/LedgerHQ/ledger-live/commit/03af552b621e19e31747a65b1870dfe8d3bb005b), [`d2b12e7`](https://github.com/LedgerHQ/ledger-live/commit/d2b12e70bba9e772d078d1fe4d9c537b8d316a87), [`cab7d97`](https://github.com/LedgerHQ/ledger-live/commit/cab7d9794e7babb8220c6d339fb08e618e3d4202)]:
|
|
103
|
-
- @ledgerhq/cryptoassets@13.31.0-
|
|
104
|
-
- @ledgerhq/types-live@6.87.0-
|
|
105
|
-
- @ledgerhq/coin-framework@6.7.0-
|
|
106
|
-
- @ledgerhq/
|
|
48
|
+
- Updated dependencies [[`ea16f59`](https://github.com/LedgerHQ/ledger-live/commit/ea16f592e85019a1b77287a7f2b975c6fcffc74c), [`cfe65ca`](https://github.com/LedgerHQ/ledger-live/commit/cfe65cafa268be4e53197ee163ce78f28ed72592), [`a9aacdb`](https://github.com/LedgerHQ/ledger-live/commit/a9aacdb330700f0a294833f7d77de17f179229b2), [`3979c07`](https://github.com/LedgerHQ/ledger-live/commit/3979c0715e4f54165c89d00ebe1441e064e1a110), [`f1f3845`](https://github.com/LedgerHQ/ledger-live/commit/f1f3845942e4cbce9c585dc65f6170ddbc319f19), [`c6a676f`](https://github.com/LedgerHQ/ledger-live/commit/c6a676ff80581ac19b896adf44d54812983b72da), [`b5fc1bd`](https://github.com/LedgerHQ/ledger-live/commit/b5fc1bd28fff091241905fec5ff8dc8af4c99b79), [`03af552`](https://github.com/LedgerHQ/ledger-live/commit/03af552b621e19e31747a65b1870dfe8d3bb005b), [`89ac0ed`](https://github.com/LedgerHQ/ledger-live/commit/89ac0eddc145dcf5c7cf240aa8be4301372c8f33), [`565da80`](https://github.com/LedgerHQ/ledger-live/commit/565da807b1ebbfc830fd0e47b3d8856f88d410a6), [`8645f01`](https://github.com/LedgerHQ/ledger-live/commit/8645f016191d29a55f6b0ca6e4b1d1909fd35445), [`1d9860c`](https://github.com/LedgerHQ/ledger-live/commit/1d9860cd1688131d391579955b40c6710b667db8), [`d2b12e7`](https://github.com/LedgerHQ/ledger-live/commit/d2b12e70bba9e772d078d1fe4d9c537b8d316a87), [`db25e21`](https://github.com/LedgerHQ/ledger-live/commit/db25e212b87dea426b153c6f1d988cead63c8c46), [`c8dbf40`](https://github.com/LedgerHQ/ledger-live/commit/c8dbf402268359e225a94782420111e786f875fa), [`cab7d97`](https://github.com/LedgerHQ/ledger-live/commit/cab7d9794e7babb8220c6d339fb08e618e3d4202)]:
|
|
49
|
+
- @ledgerhq/cryptoassets@13.31.0-next.0
|
|
50
|
+
- @ledgerhq/types-live@6.87.0-next.0
|
|
51
|
+
- @ledgerhq/coin-framework@6.7.0-next.0
|
|
52
|
+
- @ledgerhq/live-env@2.19.0-next.0
|
|
53
|
+
- @ledgerhq/types-cryptoassets@7.29.0-next.0
|
|
54
|
+
- @ledgerhq/live-network@2.0.20-next.0
|
|
107
55
|
|
|
108
56
|
## 0.34.1
|
|
109
57
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "TokenCurrency",
|
|
3
|
+
"id": "solana/spl/epjfwdd5aufqssqem2qn1xzybapc8g4weggkzwytdt1v",
|
|
4
|
+
"contractAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
|
|
5
|
+
"parentCurrency": {
|
|
6
|
+
"type": "CryptoCurrency",
|
|
7
|
+
"id": "solana",
|
|
8
|
+
"coinType": 501,
|
|
9
|
+
"name": "Solana",
|
|
10
|
+
"managerAppName": "Solana",
|
|
11
|
+
"ticker": "SOL",
|
|
12
|
+
"scheme": "solana",
|
|
13
|
+
"color": "#000",
|
|
14
|
+
"family": "solana",
|
|
15
|
+
"units": [
|
|
16
|
+
{
|
|
17
|
+
"name": "SOL",
|
|
18
|
+
"code": "SOL",
|
|
19
|
+
"magnitude": 9
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "lamports",
|
|
23
|
+
"code": "lamports",
|
|
24
|
+
"magnitude": 0
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"explorerViews": [
|
|
28
|
+
{
|
|
29
|
+
"address": "https://explorer.solana.com/address/$address",
|
|
30
|
+
"tx": "https://explorer.solana.com/tx/$hash"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"address": "https://solanabeach.io/address/$address",
|
|
34
|
+
"tx": "https://solanabeach.io/transaction/$hash"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"keywords": ["sol", "solana"]
|
|
38
|
+
},
|
|
39
|
+
"name": "USD Coin",
|
|
40
|
+
"tokenType": "spl",
|
|
41
|
+
"ticker": "USDC",
|
|
42
|
+
"disableCountervalue": false,
|
|
43
|
+
"units": [
|
|
44
|
+
{
|
|
45
|
+
"name": "USD Coin",
|
|
46
|
+
"code": "USDC",
|
|
47
|
+
"magnitude": 6
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { AccountInfo, ParsedAccountData, ParsedTransactionMeta, ParsedTransactionWithMeta, PublicKey } from "@solana/web3.js";
|
|
2
|
+
import BigNumber from "bignumber.js";
|
|
3
|
+
import { Transaction } from "../../types";
|
|
4
|
+
import { TokenAccountExtensions } from "../../network/chain/account/tokenExtensions";
|
|
5
|
+
export declare function publicKeyOf(str: string): PublicKey;
|
|
6
|
+
export declare function parsedAccountInfo({ lamports, owner, program, info, executable, type, }: {
|
|
7
|
+
lamports?: number;
|
|
8
|
+
program: "stake" | "sysvar" | "spl-token" | "spl-token-2022";
|
|
9
|
+
owner?: PublicKey;
|
|
10
|
+
info?: unknown;
|
|
11
|
+
executable?: boolean;
|
|
12
|
+
type: "account" | "delegated" | "stakeHistory";
|
|
13
|
+
}): AccountInfo<ParsedAccountData>;
|
|
14
|
+
export declare function parsedStakeInfo({ stakingCredit, authorized, delegation, }: {
|
|
15
|
+
stakingCredit: number;
|
|
16
|
+
authorized: {
|
|
17
|
+
staker: PublicKey;
|
|
18
|
+
withdrawer: PublicKey;
|
|
19
|
+
};
|
|
20
|
+
delegation: {
|
|
21
|
+
activationEpoch: string;
|
|
22
|
+
deactivationEpoch: string;
|
|
23
|
+
stake: string;
|
|
24
|
+
};
|
|
25
|
+
}): {
|
|
26
|
+
meta: {
|
|
27
|
+
rentExemptReserve: BigNumber;
|
|
28
|
+
authorized: {
|
|
29
|
+
staker: PublicKey;
|
|
30
|
+
withdrawer: PublicKey;
|
|
31
|
+
};
|
|
32
|
+
lockup: {
|
|
33
|
+
custodian: PublicKey;
|
|
34
|
+
epoch: number;
|
|
35
|
+
unixTimestamp: number;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
stake: {
|
|
39
|
+
creditsObserved: number;
|
|
40
|
+
delegation: {
|
|
41
|
+
voter: PublicKey;
|
|
42
|
+
warmupCooldownRate: number;
|
|
43
|
+
activationEpoch: string;
|
|
44
|
+
deactivationEpoch: string;
|
|
45
|
+
stake: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export declare function parsedHistoryInfo({ minEpoch, history, }: {
|
|
50
|
+
minEpoch: number;
|
|
51
|
+
history: Array<{
|
|
52
|
+
activating: number;
|
|
53
|
+
deactivating: number;
|
|
54
|
+
effective: number;
|
|
55
|
+
}>;
|
|
56
|
+
}): {
|
|
57
|
+
epoch: number;
|
|
58
|
+
stakeHistory: {
|
|
59
|
+
activating: number;
|
|
60
|
+
deactivating: number;
|
|
61
|
+
effective: number;
|
|
62
|
+
};
|
|
63
|
+
}[];
|
|
64
|
+
export declare function parsedTokenInfo({ state, owner, mint, isNative, amount, decimals, extensions, }: {
|
|
65
|
+
state?: "initialized" | "uninitialized" | "frozen";
|
|
66
|
+
owner?: PublicKey;
|
|
67
|
+
mint?: PublicKey;
|
|
68
|
+
isNative?: boolean;
|
|
69
|
+
amount?: number;
|
|
70
|
+
decimals?: number;
|
|
71
|
+
extensions?: TokenAccountExtensions;
|
|
72
|
+
}): {
|
|
73
|
+
isNative: boolean;
|
|
74
|
+
owner: PublicKey;
|
|
75
|
+
mint: PublicKey;
|
|
76
|
+
state: "initialized" | "frozen" | "uninitialized";
|
|
77
|
+
extensions: ({
|
|
78
|
+
extension: "immutableOwner";
|
|
79
|
+
} | {
|
|
80
|
+
extension: "memoTransfer";
|
|
81
|
+
state: {
|
|
82
|
+
requireIncomingTransferMemos: boolean;
|
|
83
|
+
};
|
|
84
|
+
} | {
|
|
85
|
+
extension: "transferFeeAmount";
|
|
86
|
+
state: {
|
|
87
|
+
withheldAmount: number;
|
|
88
|
+
};
|
|
89
|
+
} | {
|
|
90
|
+
extension: "cpiGuard";
|
|
91
|
+
state: {
|
|
92
|
+
lockCpi: boolean;
|
|
93
|
+
};
|
|
94
|
+
} | {
|
|
95
|
+
extension: "nonTransferableAccount";
|
|
96
|
+
} | {
|
|
97
|
+
extension: "confidentialTransferFeeAmount";
|
|
98
|
+
state: {
|
|
99
|
+
withheldAmount: string;
|
|
100
|
+
};
|
|
101
|
+
} | {
|
|
102
|
+
extension: "transferHookAccount";
|
|
103
|
+
state: {
|
|
104
|
+
transferring: boolean;
|
|
105
|
+
};
|
|
106
|
+
} | {
|
|
107
|
+
extension: string;
|
|
108
|
+
state?: any;
|
|
109
|
+
})[];
|
|
110
|
+
tokenAmount: {
|
|
111
|
+
amount: string;
|
|
112
|
+
decimals: number;
|
|
113
|
+
uiAmount: number;
|
|
114
|
+
uiAmountString: string;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
export declare function parsedTransaction({ slot, meta, signature, blockTime, }: {
|
|
118
|
+
slot?: number;
|
|
119
|
+
meta?: ParsedTransactionMeta;
|
|
120
|
+
signature: string;
|
|
121
|
+
blockTime?: Date;
|
|
122
|
+
}): ParsedTransactionWithMeta;
|
|
123
|
+
export declare function epochInfo({ epoch }: {
|
|
124
|
+
epoch: number;
|
|
125
|
+
}): {
|
|
126
|
+
absoluteSlot: number;
|
|
127
|
+
blockHeight: number;
|
|
128
|
+
epoch: number;
|
|
129
|
+
slotIndex: number;
|
|
130
|
+
slotsInEpoch: number;
|
|
131
|
+
transactionCount: number;
|
|
132
|
+
};
|
|
133
|
+
export declare function transaction(options?: {
|
|
134
|
+
kind?: Transaction["model"]["kind"];
|
|
135
|
+
subAccountId?: string;
|
|
136
|
+
raw?: string;
|
|
137
|
+
}): Transaction;
|
|
138
|
+
//# sourceMappingURL=helpers.fixture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.fixture.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/helpers.fixture.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,EACzB,SAAS,EACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,OAAO,EAAE,WAAW,EAAE,MA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,KAAK,EACL,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,UAAU,GACX,EAAE;IACD,KAAK,CAAC,EAAE,aAAa,GAAG,eAAe,GAAG,QAAQ,CAAC;IACnD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,sBAAsB,CAAC;CACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBA;AAED,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,SAAS,GACV,EAAE;IACD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,qBAAqB,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB,GAAG,yBAAyB,CAU5B;AAED,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE;;;;;;;EASrD;AAED,wBAAgB,WAAW,CAAC,OAAO,CAAC,EAAE;IACpC,IAAI,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,GAAG,WAAW,CAuBd"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.transaction = exports.epochInfo = exports.parsedTransaction = exports.parsedTokenInfo = exports.parsedHistoryInfo = exports.parsedStakeInfo = exports.parsedAccountInfo = exports.publicKeyOf = void 0;
|
|
7
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
8
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
9
|
+
const uuid_1 = require("uuid");
|
|
10
|
+
const seed = (0, uuid_1.v4)();
|
|
11
|
+
function publicKeyOf(str) {
|
|
12
|
+
return new web3_js_1.PublicKey((0, uuid_1.parse)((0, uuid_1.v5)(str, seed)));
|
|
13
|
+
}
|
|
14
|
+
exports.publicKeyOf = publicKeyOf;
|
|
15
|
+
function parsedAccountInfo({ lamports, owner, program, info, executable, type, }) {
|
|
16
|
+
return {
|
|
17
|
+
executable: executable ?? false,
|
|
18
|
+
owner: owner ?? publicKeyOf("owner"),
|
|
19
|
+
lamports: lamports ?? 20,
|
|
20
|
+
data: {
|
|
21
|
+
program,
|
|
22
|
+
parsed: { info, type },
|
|
23
|
+
space: 200,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
exports.parsedAccountInfo = parsedAccountInfo;
|
|
28
|
+
function parsedStakeInfo({ stakingCredit, authorized, delegation, }) {
|
|
29
|
+
return {
|
|
30
|
+
meta: {
|
|
31
|
+
rentExemptReserve: new bignumber_js_1.default(33000),
|
|
32
|
+
authorized,
|
|
33
|
+
lockup: {
|
|
34
|
+
custodian: publicKeyOf(""),
|
|
35
|
+
epoch: 0,
|
|
36
|
+
unixTimestamp: 0,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
stake: {
|
|
40
|
+
creditsObserved: stakingCredit,
|
|
41
|
+
delegation: { ...delegation, voter: publicKeyOf("voter"), warmupCooldownRate: 0.25 },
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
exports.parsedStakeInfo = parsedStakeInfo;
|
|
46
|
+
function parsedHistoryInfo({ minEpoch, history, }) {
|
|
47
|
+
return history.map((entry, index) => ({
|
|
48
|
+
epoch: minEpoch + index,
|
|
49
|
+
stakeHistory: {
|
|
50
|
+
activating: entry.activating,
|
|
51
|
+
deactivating: entry.deactivating,
|
|
52
|
+
effective: entry.effective,
|
|
53
|
+
},
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
exports.parsedHistoryInfo = parsedHistoryInfo;
|
|
57
|
+
function parsedTokenInfo({ state, owner, mint, isNative, amount, decimals, extensions, }) {
|
|
58
|
+
const amountOrDefault = amount ?? 2000;
|
|
59
|
+
const decimalsOrDefault = decimals ?? 3;
|
|
60
|
+
const uiAmount = amountOrDefault / 10 ** decimalsOrDefault;
|
|
61
|
+
return {
|
|
62
|
+
isNative: !!isNative,
|
|
63
|
+
owner: owner ?? publicKeyOf("owner"),
|
|
64
|
+
mint: mint ?? publicKeyOf("mint"),
|
|
65
|
+
state: state ?? "initialized",
|
|
66
|
+
extensions: extensions ?? [],
|
|
67
|
+
tokenAmount: {
|
|
68
|
+
amount: amountOrDefault.toString(),
|
|
69
|
+
decimals: decimalsOrDefault,
|
|
70
|
+
uiAmount,
|
|
71
|
+
uiAmountString: uiAmount.toFixed(decimalsOrDefault),
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
exports.parsedTokenInfo = parsedTokenInfo;
|
|
76
|
+
function parsedTransaction({ slot, meta, signature, blockTime, }) {
|
|
77
|
+
return {
|
|
78
|
+
blockTime: blockTime ? Math.floor(blockTime.getTime() / 1000) : NaN,
|
|
79
|
+
slot: slot ?? 0,
|
|
80
|
+
meta: meta ?? null,
|
|
81
|
+
transaction: {
|
|
82
|
+
signatures: [signature],
|
|
83
|
+
message: { accountKeys: [], instructions: [], recentBlockhash: "" },
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
exports.parsedTransaction = parsedTransaction;
|
|
88
|
+
function epochInfo({ epoch }) {
|
|
89
|
+
return {
|
|
90
|
+
absoluteSlot: 166598,
|
|
91
|
+
blockHeight: 166500,
|
|
92
|
+
epoch,
|
|
93
|
+
slotIndex: 2790,
|
|
94
|
+
slotsInEpoch: 8192,
|
|
95
|
+
transactionCount: 22661093,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
exports.epochInfo = epochInfo;
|
|
99
|
+
function transaction(options) {
|
|
100
|
+
const kind = options?.kind ?? "transfer";
|
|
101
|
+
return {
|
|
102
|
+
family: "solana",
|
|
103
|
+
amount: new bignumber_js_1.default(0),
|
|
104
|
+
recipient: "",
|
|
105
|
+
model: {
|
|
106
|
+
kind,
|
|
107
|
+
uiState: { subAccountId: options?.subAccountId },
|
|
108
|
+
commandDescriptor: {
|
|
109
|
+
command: {
|
|
110
|
+
kind,
|
|
111
|
+
sender: "Hj69wRzkrFuf1Nby4yzPEFHdsmQdMoVYjvDKZSLjZFEp",
|
|
112
|
+
recipient: "DwRL6XkPAtM1bfuySJKZGn2t9WeG25RC39isAu2nwak4",
|
|
113
|
+
amount: 0,
|
|
114
|
+
},
|
|
115
|
+
fee: 0,
|
|
116
|
+
warnings: {},
|
|
117
|
+
errors: {},
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
raw: options?.raw ?? "",
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
exports.transaction = transaction;
|
|
124
|
+
//# sourceMappingURL=helpers.fixture.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.fixture.js","sourceRoot":"","sources":["../../../src/__tests__/fixtures/helpers.fixture.ts"],"names":[],"mappings":";;;;;;AAAA,6CAMyB;AACzB,gEAAqC;AACrC,+BAAqC;AAIrC,MAAM,IAAI,GAAG,IAAA,SAAE,GAAE,CAAC;AAElB,SAAgB,WAAW,CAAC,GAAW;IACrC,OAAO,IAAI,mBAAS,CAAC,IAAA,YAAK,EAAC,IAAA,SAAE,EAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AAC7C,CAAC;AAFD,kCAEC;AAED,SAAgB,iBAAiB,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AAM;QACpB,WAAW,EAAE,MAAM;QACnB,KAAK;QACL,SAAS,EAAE,IAAI;QACf,YAAY,EAAE,IAAI;QAClB,gBAAgB,EAAE,QAAQ;KAC3B,CAAC;AACJ,CAAC;AATD,8BASC;AAED,SAAgB,WAAW,CAAC,OAI3B;IACC,MAAM,IAAI,GAAG,OAAO,EAAE,IAAI,IAAI,UAAU,CAAC;IACzC,OAAO;QACL,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE,IAAI,sBAAS,CAAC,CAAC,CAAC;QACxB,SAAS,EAAE,EAAE;QACb,KAAK,EAAE;YACL,IAAI;YACJ,OAAO,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE;YAChD,iBAAiB,EAAE;gBACjB,OAAO,EAAE;oBACP,IAAI;oBACJ,MAAM,EAAE,8CAA8C;oBACtD,SAAS,EAAE,8CAA8C;oBACzD,MAAM,EAAE,CAAC;iBACV;gBACD,GAAG,EAAE,CAAC;gBACN,QAAQ,EAAE,EAAE;gBACZ,MAAM,EAAE,EAAE;aACX;SACF;QACD,GAAG,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE;KACE,CAAC;AAC9B,CAAC;AA3BD,kCA2BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scan-accounts.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/scan-accounts.test.ts"],"names":[],"mappings":""}
|