@ledgerhq/live-common 21.26.2 → 21.29.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/lib/__tests__/currencies.js +1 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.synced.unit.test.js +27 -26
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.synced.unit.test.js.map +1 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.syncing.integration.test.js +9 -7
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.syncing.integration.test.js.map +1 -1
- package/lib/apps/support.d.ts.map +1 -1
- package/lib/apps/support.js +2 -1
- package/lib/apps/support.js.map +1 -1
- package/lib/bridge/jsHelpers.js +1 -1
- package/lib/bridge/jsHelpers.js.map +1 -1
- package/lib/data/icons/react/index.d.ts +1 -0
- package/lib/data/icons/react/index.d.ts.map +1 -1
- package/lib/data/icons/react/index.js +4 -2
- package/lib/data/icons/react/index.js.map +1 -1
- package/lib/data/icons/react/sol.js +3 -3
- package/lib/data/icons/react/sol.js.map +1 -1
- package/lib/data/icons/react/tyc.d.ts +8 -0
- package/lib/data/icons/react/tyc.d.ts.map +1 -0
- package/lib/data/icons/react/tyc.js +33 -0
- package/lib/data/icons/react/tyc.js.map +1 -0
- package/lib/data/icons/reactNative/index.d.ts +1 -0
- package/lib/data/icons/reactNative/index.d.ts.map +1 -1
- package/lib/data/icons/reactNative/index.js +4 -2
- package/lib/data/icons/reactNative/index.js.map +1 -1
- package/lib/data/icons/reactNative/sol.js +3 -3
- package/lib/data/icons/reactNative/sol.js.map +1 -1
- package/lib/data/icons/reactNative/tyc.d.ts +8 -0
- package/lib/data/icons/reactNative/tyc.d.ts.map +1 -0
- package/lib/data/icons/reactNative/tyc.js +34 -0
- package/lib/data/icons/reactNative/tyc.js.map +1 -0
- package/lib/env.d.ts +15 -6
- package/lib/env.d.ts.map +1 -1
- package/lib/env.js +11 -2
- package/lib/env.js.map +1 -1
- package/lib/env.react.d.ts +1 -1
- package/lib/env.react.d.ts.map +1 -1
- package/lib/exchange/hw-app-exchange/Exchange.d.ts +12 -15
- package/lib/exchange/hw-app-exchange/Exchange.d.ts.map +1 -1
- package/lib/exchange/hw-app-exchange/Exchange.js +4 -13
- package/lib/exchange/hw-app-exchange/Exchange.js.map +1 -1
- package/lib/exchange/index.d.ts.map +1 -1
- package/lib/exchange/index.js +9 -2
- package/lib/exchange/index.js.map +1 -1
- package/lib/exchange/platform/completeExchange.d.ts +6 -0
- package/lib/exchange/platform/completeExchange.d.ts.map +1 -0
- package/lib/exchange/platform/completeExchange.js +24 -0
- package/lib/exchange/platform/completeExchange.js.map +1 -0
- package/lib/exchange/platform/serialization.d.ts +4 -0
- package/lib/exchange/platform/serialization.d.ts.map +1 -0
- package/lib/exchange/platform/serialization.js +57 -0
- package/lib/exchange/platform/serialization.js.map +1 -0
- package/lib/exchange/{swap → platform}/startExchange.d.ts +0 -0
- package/lib/exchange/platform/startExchange.d.ts.map +1 -0
- package/lib/exchange/{swap → platform}/startExchange.js +3 -3
- package/lib/exchange/platform/startExchange.js.map +1 -0
- package/lib/exchange/platform/transfer/completeExchange.d.ts +5 -0
- package/lib/exchange/platform/transfer/completeExchange.d.ts.map +1 -0
- package/lib/exchange/platform/transfer/completeExchange.js +198 -0
- package/lib/exchange/platform/transfer/completeExchange.js.map +1 -0
- package/lib/exchange/platform/transfer/index.d.ts +5 -0
- package/lib/exchange/platform/transfer/index.d.ts.map +1 -0
- package/lib/exchange/platform/transfer/index.js +49 -0
- package/lib/exchange/platform/transfer/index.js.map +1 -0
- package/lib/exchange/platform/types.d.ts +59 -0
- package/lib/exchange/platform/types.d.ts.map +1 -0
- package/lib/exchange/platform/types.js +3 -0
- package/lib/exchange/platform/types.js.map +1 -0
- package/lib/exchange/sell/checkSignatureAndPrepare.js +1 -2
- package/lib/exchange/sell/checkSignatureAndPrepare.js.map +1 -1
- package/lib/exchange/sell/getTransactionId.js +1 -2
- package/lib/exchange/sell/getTransactionId.js.map +1 -1
- package/lib/exchange/sell/index.d.ts +6 -0
- package/lib/exchange/sell/index.d.ts.map +1 -1
- package/lib/exchange/sell/index.js +3 -3
- package/lib/exchange/sell/index.js.map +1 -1
- package/lib/exchange/swap/completeExchange.d.ts +2 -13
- package/lib/exchange/swap/completeExchange.d.ts.map +1 -1
- package/lib/exchange/swap/completeExchange.js +2 -4
- package/lib/exchange/swap/completeExchange.js.map +1 -1
- package/lib/exchange/swap/hooks/usePickDefaultAccount.d.ts.map +1 -1
- package/lib/exchange/swap/hooks/usePickDefaultAccount.js +4 -9
- package/lib/exchange/swap/hooks/usePickDefaultAccount.js.map +1 -1
- package/lib/exchange/swap/initSwap.d.ts.map +1 -1
- package/lib/exchange/swap/initSwap.js +3 -4
- package/lib/exchange/swap/initSwap.js.map +1 -1
- package/lib/exchange/swap/types.d.ts +0 -12
- package/lib/exchange/swap/types.d.ts.map +1 -1
- package/lib/exchange/swap/utils/index.d.ts +6 -1
- package/lib/exchange/swap/utils/index.d.ts.map +1 -1
- package/lib/exchange/swap/utils/index.js +8 -1
- package/lib/exchange/swap/utils/index.js.map +1 -1
- package/lib/exchange/swap/utils/index.test.js +27 -0
- package/lib/exchange/swap/utils/index.test.js.map +1 -1
- package/lib/exchange/testCurrencyConfig/data/coins.d.ts +8 -0
- package/lib/exchange/testCurrencyConfig/data/coins.d.ts.map +1 -0
- package/lib/exchange/testCurrencyConfig/data/coins.js +21 -0
- package/lib/exchange/testCurrencyConfig/data/coins.js.map +1 -0
- package/lib/exchange/testCurrencyConfig/index.d.ts +8 -0
- package/lib/exchange/testCurrencyConfig/index.d.ts.map +1 -0
- package/lib/exchange/testCurrencyConfig/index.js +68 -0
- package/lib/exchange/testCurrencyConfig/index.js.map +1 -0
- package/lib/families/algorand/api/algodv2.d.ts +2 -1
- package/lib/families/algorand/api/algodv2.d.ts.map +1 -1
- package/lib/families/algorand/api/algodv2.js +2 -2
- package/lib/families/algorand/api/algodv2.js.map +1 -1
- package/lib/families/algorand/js-broadcast.js +1 -1
- package/lib/families/algorand/js-broadcast.js.map +1 -1
- package/lib/families/algorand/js-signOperation.d.ts.map +1 -1
- package/lib/families/algorand/js-signOperation.js +1 -1
- package/lib/families/algorand/js-signOperation.js.map +1 -1
- package/lib/families/bitcoin/wallet-btc/wallet.d.ts.map +1 -1
- package/lib/families/bitcoin/wallet-btc/wallet.js +8 -2
- package/lib/families/bitcoin/wallet-btc/wallet.js.map +1 -1
- package/lib/families/bitcoin/wallet-btc/xpub.js +1 -1
- package/lib/families/bitcoin/wallet-btc/xpub.js.map +1 -1
- package/lib/families/ethereum/datasets/ethereum.scanAccounts.1.js +1 -1
- package/lib/families/ethereum/datasets/ethereum.scanAccounts.1.js.map +1 -1
- package/lib/families/ethereum/nft.integration.test.js +1 -36
- package/lib/families/ethereum/nft.integration.test.js.map +1 -1
- package/lib/families/ethereum/specs.d.ts.map +1 -1
- package/lib/families/ethereum/specs.js +2 -0
- package/lib/families/ethereum/specs.js.map +1 -1
- package/lib/families/ethereum/synchronisation.d.ts.map +1 -1
- package/lib/families/ethereum/synchronisation.js +2 -7
- package/lib/families/ethereum/synchronisation.js.map +1 -1
- package/lib/families/solana/api/chain/index.d.ts.map +1 -1
- package/lib/families/solana/api/chain/index.js +3 -1
- package/lib/families/solana/api/chain/index.js.map +1 -1
- package/lib/families/tezos/datasets/tezos.scanAccounts.1.js +1 -1
- package/lib/families/tezos/datasets/tezos.scanAccounts.1.js.map +1 -1
- package/lib/hw/actions/app.d.ts +3 -0
- package/lib/hw/actions/app.d.ts.map +1 -1
- package/lib/hw/actions/app.js +7 -1
- package/lib/hw/actions/app.js.map +1 -1
- package/lib/hw/actions/completeExchange.d.ts +1 -0
- package/lib/hw/actions/completeExchange.d.ts.map +1 -1
- package/lib/hw/actions/completeExchange.js +4 -3
- package/lib/hw/actions/completeExchange.js.map +1 -1
- package/lib/hw/connectApp.d.ts +5 -0
- package/lib/hw/connectApp.d.ts.map +1 -1
- package/lib/hw/connectApp.js +37 -26
- package/lib/hw/connectApp.js.map +1 -1
- package/lib/market/MarketDataProvider.d.ts +26 -0
- package/lib/market/MarketDataProvider.d.ts.map +1 -0
- package/lib/market/MarketDataProvider.js +339 -0
- package/lib/market/MarketDataProvider.js.map +1 -0
- package/lib/market/api/api.d.ts +15 -0
- package/lib/market/api/api.d.ts.map +1 -0
- package/lib/market/api/api.js +261 -0
- package/lib/market/api/api.js.map +1 -0
- package/lib/market/api/api.mock.d.ts +15 -0
- package/lib/market/api/api.mock.d.ts.map +1 -0
- package/lib/market/api/api.mock.js +454 -0
- package/lib/market/api/api.mock.js.map +1 -0
- package/lib/market/types.d.ts +83 -0
- package/lib/market/types.d.ts.map +1 -0
- package/lib/market/types.js +3 -0
- package/lib/market/types.js.map +1 -0
- package/lib/market/utils/countervalueFormatter.d.ts +8 -0
- package/lib/market/utils/countervalueFormatter.d.ts.map +1 -0
- package/lib/market/utils/countervalueFormatter.js +18 -0
- package/lib/market/utils/countervalueFormatter.js.map +1 -0
- package/lib/market/utils/rangeDataTable.d.ts +10 -0
- package/lib/market/utils/rangeDataTable.d.ts.map +1 -0
- package/lib/market/utils/rangeDataTable.js +36 -0
- package/lib/market/utils/rangeDataTable.js.map +1 -0
- package/lib/nft/support.d.ts.map +1 -1
- package/lib/nft/support.js +1 -1
- package/lib/nft/support.js.map +1 -1
- package/lib/platform/PlatformAppProvider/api/api.mock.d.ts.map +1 -1
- package/lib/platform/PlatformAppProvider/api/api.mock.js +27 -0
- package/lib/platform/PlatformAppProvider/api/api.mock.js.map +1 -1
- package/package.json +17 -17
- package/src/__tests__/__snapshots__/all.libcore.ts.snap +221 -212
- package/src/__tests__/currencies.ts +1 -1
- package/src/__tests__/families/bitcoin/wallet-btc/xpub.synced.unit.test.ts +26 -25
- package/src/__tests__/families/bitcoin/wallet-btc/xpub.syncing.integration.test.ts +2 -0
- package/src/apps/support.ts +1 -0
- package/src/bridge/jsHelpers.ts +1 -1
- package/src/data/icons/react/index.tsx +1 -0
- package/src/data/icons/react/sol.tsx +1 -1
- package/src/data/icons/react/tyc.tsx +12 -0
- package/src/data/icons/reactNative/index.tsx +1 -0
- package/src/data/icons/reactNative/sol.tsx +1 -1
- package/src/data/icons/reactNative/tyc.tsx +13 -0
- package/src/data/icons/svg/SOL.svg +8 -1
- package/src/data/icons/svg/TYC.svg +6 -0
- package/src/env.ts +11 -2
- package/src/exchange/hw-app-exchange/Exchange.ts +22 -18
- package/src/exchange/index.ts +19 -1
- package/src/exchange/platform/completeExchange.ts +42 -0
- package/src/exchange/platform/serialization.ts +78 -0
- package/src/exchange/{swap → platform}/startExchange.ts +6 -2
- package/src/exchange/platform/transfer/completeExchange.ts +187 -0
- package/src/exchange/platform/transfer/index.ts +66 -0
- package/src/exchange/platform/types.ts +76 -0
- package/src/exchange/sell/checkSignatureAndPrepare.ts +2 -2
- package/src/exchange/sell/getTransactionId.ts +2 -2
- package/src/exchange/sell/index.ts +1 -1
- package/src/exchange/swap/completeExchange.ts +41 -50
- package/src/exchange/swap/hooks/usePickDefaultAccount.ts +4 -9
- package/src/exchange/swap/initSwap.ts +4 -7
- package/src/exchange/swap/types.ts +1 -14
- package/src/exchange/swap/utils/index.test.ts +44 -1
- package/src/exchange/swap/utils/index.ts +12 -1
- package/src/exchange/testCurrencyConfig/data/coins.ts +20 -0
- package/src/exchange/testCurrencyConfig/index.ts +24 -0
- package/src/families/algorand/api/algodv2.ts +2 -2
- package/src/families/algorand/js-broadcast.ts +1 -1
- package/src/families/algorand/js-signOperation.ts +8 -3
- package/src/families/bitcoin/wallet-btc/wallet.ts +6 -2
- package/src/families/bitcoin/wallet-btc/xpub.ts +1 -1
- package/src/families/ethereum/datasets/ethereum.scanAccounts.1.ts +43 -43
- package/src/families/ethereum/nft.integration.test.ts +1 -18
- package/src/families/ethereum/specs.ts +2 -0
- package/src/families/ethereum/synchronisation.ts +1 -6
- package/src/families/solana/api/chain/index.ts +6 -2
- package/src/families/tezos/datasets/tezos.scanAccounts.1.ts +39 -39
- package/src/hw/actions/app.ts +17 -1
- package/src/hw/actions/completeExchange.ts +9 -3
- package/src/hw/connectApp.ts +53 -31
- package/src/market/MarketDataProvider.tsx +440 -0
- package/src/market/api/api.mock.ts +374 -0
- package/src/market/api/api.ts +227 -0
- package/src/market/types.ts +92 -0
- package/src/market/utils/countervalueFormatter.ts +24 -0
- package/src/market/utils/rangeDataTable.ts +40 -0
- package/src/nft/support.ts +1 -3
- package/src/platform/PlatformAppProvider/api/api.mock.ts +27 -0
- package/lib/exchange/swap/startExchange.d.ts.map +0 -1
- package/lib/exchange/swap/startExchange.js.map +0 -1
- package/lib/families/ethereum/versions.d.ts +0 -2
- package/lib/families/ethereum/versions.d.ts.map +0 -1
- package/lib/families/ethereum/versions.js +0 -5
- package/lib/families/ethereum/versions.js.map +0 -1
- package/src/families/ethereum/versions.ts +0 -1
|
@@ -66,7 +66,7 @@ test("sort by marketcap", () => {
|
|
|
66
66
|
"ethereum",
|
|
67
67
|
"ethereum/erc20/0x_project",
|
|
68
68
|
"ethereum/erc20/holotoken",
|
|
69
|
-
"ethereum/erc20/
|
|
69
|
+
"ethereum/erc20/xstable_protocol",
|
|
70
70
|
"ethereum/erc20/hydro_protocol",
|
|
71
71
|
"ethereum/erc20/xensor",
|
|
72
72
|
"polygon/erc20/holotoken",
|
|
@@ -7,21 +7,21 @@ import { zipObject } from "lodash";
|
|
|
7
7
|
import { DerivationModes } from "../../../../families/bitcoin/wallet-btc/types";
|
|
8
8
|
import BitcoinLikeStorage from "../../../../families/bitcoin/wallet-btc/storage";
|
|
9
9
|
import BitcoinLikeExplorer from "../../../../families/bitcoin/wallet-btc/explorer";
|
|
10
|
-
import Crypto from "../../../../families/bitcoin/wallet-btc/crypto/
|
|
10
|
+
import Crypto from "../../../../families/bitcoin/wallet-btc/crypto/bitcoincash";
|
|
11
11
|
import Xpub from "../../../../families/bitcoin/wallet-btc/xpub";
|
|
12
12
|
|
|
13
13
|
describe("synced xpub utilites functions", () => {
|
|
14
14
|
const explorer = new BitcoinLikeExplorer({
|
|
15
|
-
explorerURI: "https://explorers.api.vault.ledger.com/blockchain/v3/
|
|
15
|
+
explorerURI: "https://explorers.api.vault.ledger.com/blockchain/v3/bch",
|
|
16
16
|
explorerVersion: "v3",
|
|
17
17
|
});
|
|
18
18
|
const crypto = new Crypto({
|
|
19
|
-
network: coininfo.
|
|
19
|
+
network: coininfo.bitcoincash.main.toBitcoinJS(),
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
-
describe("xpub
|
|
22
|
+
describe("xpub xpub6BvNdfGcyMB9Usq88ibXUt3KhbaEJVLFMbhTSNNfTm8Qf1sX9inTv3xL6pA6KofW4WF9GpdxwGDoYRwRDjHEir3Av23m2wHb7AqhxJ9ohE8 Legacy", () => {
|
|
23
23
|
const xpubraw =
|
|
24
|
-
"
|
|
24
|
+
"xpub6BvNdfGcyMB9Usq88ibXUt3KhbaEJVLFMbhTSNNfTm8Qf1sX9inTv3xL6pA6KofW4WF9GpdxwGDoYRwRDjHEir3Av23m2wHb7AqhxJ9ohE8";
|
|
25
25
|
// const truthDump = path.join(__dirname, 'data', 'sync', `${xpubraw}.json`);
|
|
26
26
|
const storage = new BitcoinLikeStorage();
|
|
27
27
|
const xpub = new Xpub({
|
|
@@ -34,16 +34,16 @@ describe("synced xpub utilites functions", () => {
|
|
|
34
34
|
|
|
35
35
|
beforeAll(async () => {
|
|
36
36
|
await xpub.sync();
|
|
37
|
-
},
|
|
37
|
+
}, 120000);
|
|
38
38
|
|
|
39
39
|
it("should compute accounts/addresses/balances correctly", async () => {
|
|
40
40
|
const addresses = await xpub.getXpubAddresses();
|
|
41
|
-
expect(addresses.length).toEqual(
|
|
41
|
+
expect(addresses.length).toEqual(16);
|
|
42
42
|
|
|
43
|
-
expect((await xpub.getAccountAddresses(0)).length).toEqual(
|
|
43
|
+
expect((await xpub.getAccountAddresses(0)).length).toEqual(7);
|
|
44
44
|
|
|
45
|
-
expect((await xpub.getXpubBalance()).toNumber()).toEqual(
|
|
46
|
-
expect((await xpub.getAccountBalance(0)).toNumber()).toEqual(
|
|
45
|
+
expect((await xpub.getXpubBalance()).toNumber()).toEqual(360615);
|
|
46
|
+
expect((await xpub.getAccountBalance(0)).toNumber()).toEqual(10000);
|
|
47
47
|
const addressesBalances = await Promise.all(
|
|
48
48
|
addresses.map((address) => xpub.getAddressBalance(address))
|
|
49
49
|
);
|
|
@@ -53,21 +53,22 @@ describe("synced xpub utilites functions", () => {
|
|
|
53
53
|
addressesBalances.map((balance) => balance.toNumber())
|
|
54
54
|
)
|
|
55
55
|
).toEqual({
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
56
|
+
"bitcoincash:qp2ujnlxjmkwtc299zwat3vt7j0jgltwls3q5avzsj": 0,
|
|
57
|
+
"bitcoincash:qp62d8j6ng0jhenc97dnnyn6qev24vykev5pea7jd3": 0,
|
|
58
|
+
"bitcoincash:qp64rlh8jf82kxsvh2rhjr8wnltt3vu5ccna7zygun": 0,
|
|
59
|
+
"bitcoincash:qpguw9mwet4aamye4texdrvje5wj7twhss5agzwzwa": 0,
|
|
60
|
+
"bitcoincash:qpvezzthl2075alur9y53tqsqcm3z8t4rgq6vcalun": 0,
|
|
61
|
+
"bitcoincash:qq3ch5aymjxvlt2q646gxtnrqeq45h269yt7l2yl0k": 350615,
|
|
62
|
+
"bitcoincash:qq6u57s2nc5zuywmwrw9tnkjvvw5rzs40vk6q5jjaz": 10000,
|
|
63
|
+
"bitcoincash:qqk8v7daqpl2fe4qezw5uzhueqxrj9eahvnhz2v39e": 0,
|
|
64
|
+
"bitcoincash:qqu0nek90hahl0sezqz8cf8yc7hmqvgseykqyp3awm": 0,
|
|
65
|
+
"bitcoincash:qqufmrqunkr3avkswhn378fjhwl3ueawag9e3htc49": 0,
|
|
66
|
+
"bitcoincash:qrkmvwx8y4lprh8xzz0fhnrmqpqvpssqnqle8lds8k": 0,
|
|
67
|
+
"bitcoincash:qzadqth7znrc7e5s5p40kadpu4lj9lkahvja522rh2": 0,
|
|
68
|
+
"bitcoincash:qzgah58nthe50jau20y67s4zq9u0xqvxeyqrv2aewk": 0,
|
|
69
|
+
"bitcoincash:qzj2q6yrxmxedffsz2rvpy067pcdvwhy9gcyhsne48": 0,
|
|
70
|
+
"bitcoincash:qzjgtadhd6j96a9mvlt5cj2ewgljyjzrlq4nplva5l": 0,
|
|
71
|
+
"bitcoincash:qzmwszdjh6h9crvk65zlravhal50rnwtfu6pacsdsn": 0,
|
|
71
72
|
});
|
|
72
73
|
});
|
|
73
74
|
});
|
|
@@ -62,6 +62,7 @@ describe("xpub integration sync", () => {
|
|
|
62
62
|
coin: "dgb",
|
|
63
63
|
explorerVersion: "v3",
|
|
64
64
|
},
|
|
65
|
+
/*
|
|
65
66
|
{
|
|
66
67
|
xpub: "xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz", // 3000ms
|
|
67
68
|
derivationMode: DerivationModes.LEGACY,
|
|
@@ -71,6 +72,7 @@ describe("xpub integration sync", () => {
|
|
|
71
72
|
coin: "btc",
|
|
72
73
|
explorerVersion: "v3",
|
|
73
74
|
},
|
|
75
|
+
*/
|
|
74
76
|
{
|
|
75
77
|
xpub: "xpub6D4waFVPfPCpRvPkQd9A6n65z3hTp6TvkjnBHG5j2MCKytMuadKgfTUHqwRH77GQqCKTTsUXSZzGYxMGpWpJBdYAYVH75x7yMnwJvra1BUJ", // 5400ms
|
|
76
78
|
derivationMode: DerivationModes.LEGACY,
|
package/src/apps/support.ts
CHANGED
package/src/bridge/jsHelpers.ts
CHANGED
|
@@ -100,7 +100,7 @@ Operation[] {
|
|
|
100
100
|
// return existins when there is no real new operations
|
|
101
101
|
if (newOps.length === 0) return existing;
|
|
102
102
|
// edge case, existing can be empty. return the sorted list.
|
|
103
|
-
if (existing.length === 0) return
|
|
103
|
+
if (existing.length === 0) return Object.values(newOpsIds);
|
|
104
104
|
// building up merging the ops
|
|
105
105
|
const all: Operation[] = [];
|
|
106
106
|
|
|
@@ -383,6 +383,7 @@ export { default as trig } from "./trig";
|
|
|
383
383
|
export { default as trtl } from "./trtl";
|
|
384
384
|
export { default as trx } from "./trx";
|
|
385
385
|
export { default as tusd } from "./tusd";
|
|
386
|
+
export { default as tyc } from "./tyc";
|
|
386
387
|
export { default as tzc } from "./tzc";
|
|
387
388
|
export { default as ubq } from "./ubq";
|
|
388
389
|
export { default as uma } from "./uma";
|
|
@@ -6,7 +6,7 @@ interface Props {
|
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
function sol({size, color = "currentColor"}: Props) {
|
|
9
|
-
return <svg width={size} height={size} viewBox="0 0 24 24"><path d="M2.41,7.77H18.09a.51.51,0,0,0,.37-.16l3.43-3.67a.4.4,0,0,0-.3-.67H5.91a.51.51,0,0,0-.37.16L2.11,7.1A.4.4,0,0,0,2.41,7.77Z" /><path d="M2.41,20.77H18.09a.51.51,0,0,0,.37-.16l3.43-3.67a.4.4,0,0,0-.3-.67H5.91a.51.51,0,0,0-.37.16L2.11,20.1A.4.4,0,0,0,2.41,20.77Z" /><path d="M21.59,14.27H5.91a.51.51,0,0,1-.37-.16L2.11,10.44a.4.4,0,0,1,.3-.67H18.09a.51.51,0,0,1,.37.16l3.43,3.67A.4.4,0,0,1,21.59,14.27Z" /></svg>;
|
|
9
|
+
return <svg width={size} height={size} viewBox="0 0 24 24"><path fill={color} d="M2.41,7.77H18.09a.51.51,0,0,0,.37-.16l3.43-3.67a.4.4,0,0,0-.3-.67H5.91a.51.51,0,0,0-.37.16L2.11,7.1A.4.4,0,0,0,2.41,7.77Z" /><path fill={color} d="M2.41,20.77H18.09a.51.51,0,0,0,.37-.16l3.43-3.67a.4.4,0,0,0-.3-.67H5.91a.51.51,0,0,0-.37.16L2.11,20.1A.4.4,0,0,0,2.41,20.77Z" /><path fill={color} d="M21.59,14.27H5.91a.51.51,0,0,1-.37-.16L2.11,10.44a.4.4,0,0,1,.3-.67H18.09a.51.51,0,0,1,.37.16l3.43,3.67A.4.4,0,0,1,21.59,14.27Z" /></svg>;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export default sol;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
interface Props {
|
|
4
|
+
size: number;
|
|
5
|
+
color?: string;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
function tyc({size, color = "currentColor"}: Props) {
|
|
9
|
+
return <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 12.1L15.7 10.7L15.9 10.6L16.7 9.1L13.9 10.2L12 11L8.7 9.7L7.3 9.1L8.1 10.6L8.2 10.7L12 12.1Z" fill={color} /><path d="M12 9.2L6.1 6.9L6.9 8.3L12 10.3L17.1 8.3L17.9 6.9L12 9.2Z" fill={color} /><path d="M12.3 17.1L13.1 16.8L13.9 12L12.3 12.7V17.1Z" fill={color} /><path d="M10.9 16.8L11.7 17.1V12.7L10.1 12L10.9 16.8Z" fill={color} /></svg>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default tyc;
|
|
@@ -383,6 +383,7 @@ export { default as trig } from "./trig";
|
|
|
383
383
|
export { default as trtl } from "./trtl";
|
|
384
384
|
export { default as trx } from "./trx";
|
|
385
385
|
export { default as tusd } from "./tusd";
|
|
386
|
+
export { default as tyc } from "./tyc";
|
|
386
387
|
export { default as tzc } from "./tzc";
|
|
387
388
|
export { default as ubq } from "./ubq";
|
|
388
389
|
export { default as uma } from "./uma";
|
|
@@ -7,7 +7,7 @@ interface Props {
|
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
function sol({ size, color }: Props) {
|
|
10
|
-
return <Svg width={size} height={size} viewBox="0 0 24 24"><Path d="M2.41,7.77H18.09a.51.51,0,0,0,.37-.16l3.43-3.67a.4.4,0,0,0-.3-.67H5.91a.51.51,0,0,0-.37.16L2.11,7.1A.4.4,0,0,0,2.41,7.77Z" /><Path d="M2.41,20.77H18.09a.51.51,0,0,0,.37-.16l3.43-3.67a.4.4,0,0,0-.3-.67H5.91a.51.51,0,0,0-.37.16L2.11,20.1A.4.4,0,0,0,2.41,20.77Z" /><Path d="M21.59,14.27H5.91a.51.51,0,0,1-.37-.16L2.11,10.44a.4.4,0,0,1,.3-.67H18.09a.51.51,0,0,1,.37.16l3.43,3.67A.4.4,0,0,1,21.59,14.27Z" /></Svg>;
|
|
10
|
+
return <Svg width={size} height={size} viewBox="0 0 24 24"><Path fill={color} d="M2.41,7.77H18.09a.51.51,0,0,0,.37-.16l3.43-3.67a.4.4,0,0,0-.3-.67H5.91a.51.51,0,0,0-.37.16L2.11,7.1A.4.4,0,0,0,2.41,7.77Z" /><Path fill={color} d="M2.41,20.77H18.09a.51.51,0,0,0,.37-.16l3.43-3.67a.4.4,0,0,0-.3-.67H5.91a.51.51,0,0,0-.37.16L2.11,20.1A.4.4,0,0,0,2.41,20.77Z" /><Path fill={color} d="M21.59,14.27H5.91a.51.51,0,0,1-.37-.16L2.11,10.44a.4.4,0,0,1,.3-.67H18.09a.51.51,0,0,1,.37.16l3.43,3.67A.4.4,0,0,1,21.59,14.27Z" /></Svg>;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export default sol;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import Svg, { Path } from "react-native-svg";
|
|
4
|
+
interface Props {
|
|
5
|
+
size: number;
|
|
6
|
+
color: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
function tyc({ size, color }: Props) {
|
|
10
|
+
return <Svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><Path d="M12 12.1L15.7 10.7L15.9 10.6L16.7 9.1L13.9 10.2L12 11L8.7 9.7L7.3 9.1L8.1 10.6L8.2 10.7L12 12.1Z" fill={color} /><Path d="M12 9.2L6.1 6.9L6.9 8.3L12 10.3L17.1 8.3L17.9 6.9L12 9.2Z" fill={color} /><Path d="M12.3 17.1L13.1 16.8L13.9 12L12.3 12.7V17.1Z" fill={color} /><Path d="M10.9 16.8L11.7 17.1V12.7L10.1 12L10.9 16.8Z" fill={color} /></Svg>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default tyc;
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
<svg width="24" height="24" viewBox="0 0 24 24"
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24">
|
|
2
|
+
<path fill="#000000"
|
|
3
|
+
d="M2.41,7.77H18.09a.51.51,0,0,0,.37-.16l3.43-3.67a.4.4,0,0,0-.3-.67H5.91a.51.51,0,0,0-.37.16L2.11,7.1A.4.4,0,0,0,2.41,7.77Z" />
|
|
4
|
+
<path fill="#000000"
|
|
5
|
+
d="M2.41,20.77H18.09a.51.51,0,0,0,.37-.16l3.43-3.67a.4.4,0,0,0-.3-.67H5.91a.51.51,0,0,0-.37.16L2.11,20.1A.4.4,0,0,0,2.41,20.77Z" />
|
|
6
|
+
<path fill="#000000"
|
|
7
|
+
d="M21.59,14.27H5.91a.51.51,0,0,1-.37-.16L2.11,10.44a.4.4,0,0,1,.3-.67H18.09a.51.51,0,0,1,.37.16l3.43,3.67A.4.4,0,0,1,21.59,14.27Z" />
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M12 12.1L15.7 10.7L15.9 10.6L16.7 9.1L13.9 10.2L12 11L8.7 9.7L7.3 9.1L8.1 10.6L8.2 10.7L12 12.1Z" fill="#005B9F"/>
|
|
3
|
+
<path d="M12 9.2L6.1 6.9L6.9 8.3L12 10.3L17.1 8.3L17.9 6.9L12 9.2Z" fill="#005B9F"/>
|
|
4
|
+
<path d="M12.3 17.1L13.1 16.8L13.9 12L12.3 12.7V17.1Z" fill="#005B9F"/>
|
|
5
|
+
<path d="M10.9 16.8L11.7 17.1V12.7L10.1 12L10.9 16.8Z" fill="#005B9F"/>
|
|
6
|
+
</svg>
|
package/src/env.ts
CHANGED
|
@@ -371,10 +371,14 @@ const envDefinitions = {
|
|
|
371
371
|
parser: stringParser,
|
|
372
372
|
desc: "mock the server response for the exchange KYC check, options are 'open', 'pending', 'closed' or 'approved'.",
|
|
373
373
|
},
|
|
374
|
-
|
|
374
|
+
/**
|
|
375
|
+
* Note: the mocked cryptoassets config and test partner are signed with the
|
|
376
|
+
* Ledger test private key
|
|
377
|
+
*/
|
|
378
|
+
MOCK_EXCHANGE_TEST_CONFIG: {
|
|
375
379
|
def: false,
|
|
376
380
|
parser: boolParser,
|
|
377
|
-
desc: "
|
|
381
|
+
desc: "mock the cryptoassets config and test partner (in the context of app-exchange)",
|
|
378
382
|
},
|
|
379
383
|
NFT_CURRENCIES: {
|
|
380
384
|
def: "ethereum",
|
|
@@ -531,6 +535,11 @@ const envDefinitions = {
|
|
|
531
535
|
parser: intParser,
|
|
532
536
|
desc: "version used for the platform api",
|
|
533
537
|
},
|
|
538
|
+
MARKET_API_URL: {
|
|
539
|
+
def: "https://proxycg.api.live.ledger.com/api/v3",
|
|
540
|
+
parser: stringParser,
|
|
541
|
+
desc: "Market data api",
|
|
542
|
+
},
|
|
534
543
|
};
|
|
535
544
|
|
|
536
545
|
const getDefinition = (name: string): EnvDef<any> | null | undefined =>
|
|
@@ -2,17 +2,18 @@ import Transport from "@ledgerhq/hw-transport";
|
|
|
2
2
|
import { BigNumber } from "bignumber.js";
|
|
3
3
|
import { TransportStatusError } from "@ledgerhq/errors";
|
|
4
4
|
import invariant from "invariant";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
|
|
6
|
+
export const enum RateTypes {
|
|
7
|
+
Fixed = 0x00,
|
|
8
|
+
Floating = 0x01,
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const enum ExchangeTypes {
|
|
12
|
+
Swap = 0x00,
|
|
13
|
+
Sell = 0x01,
|
|
14
|
+
Fund = 0x02,
|
|
15
|
+
}
|
|
16
|
+
|
|
16
17
|
const START_NEW_TRANSACTION_COMMAND = 0x03;
|
|
17
18
|
const SET_PARTNER_KEY_COMMAND = 0x04;
|
|
18
19
|
const CHECK_PARTNER_COMMAND = 0x05;
|
|
@@ -34,8 +35,8 @@ const maybeThrowProtocolError = (result: Buffer): void => {
|
|
|
34
35
|
|
|
35
36
|
export default class Exchange {
|
|
36
37
|
transport: Transport;
|
|
37
|
-
transactionType:
|
|
38
|
-
transactionRate:
|
|
38
|
+
transactionType: ExchangeTypes;
|
|
39
|
+
transactionRate: RateTypes;
|
|
39
40
|
allowedStatuses: Array<number> = [
|
|
40
41
|
0x9000, 0x6a80, 0x6a81, 0x6a82, 0x6a83, 0x6a84, 0x6a85, 0x6e00, 0x6d00,
|
|
41
42
|
0x9d1a,
|
|
@@ -43,11 +44,11 @@ export default class Exchange {
|
|
|
43
44
|
|
|
44
45
|
constructor(
|
|
45
46
|
transport: Transport,
|
|
46
|
-
transactionType:
|
|
47
|
-
transactionRate?:
|
|
47
|
+
transactionType: ExchangeTypes,
|
|
48
|
+
transactionRate?: RateTypes
|
|
48
49
|
) {
|
|
49
50
|
this.transactionType = transactionType;
|
|
50
|
-
this.transactionRate = transactionRate ||
|
|
51
|
+
this.transactionRate = transactionRate || RateTypes.Fixed;
|
|
51
52
|
this.transport = transport;
|
|
52
53
|
}
|
|
53
54
|
|
|
@@ -62,7 +63,10 @@ export default class Exchange {
|
|
|
62
63
|
);
|
|
63
64
|
maybeThrowProtocolError(result);
|
|
64
65
|
|
|
65
|
-
if (
|
|
66
|
+
if (
|
|
67
|
+
this.transactionType === ExchangeTypes.Sell ||
|
|
68
|
+
this.transactionType === ExchangeTypes.Fund
|
|
69
|
+
) {
|
|
66
70
|
return result.subarray(0, 32).toString("base64");
|
|
67
71
|
}
|
|
68
72
|
|
|
@@ -147,7 +151,7 @@ export default class Exchange {
|
|
|
147
151
|
]);
|
|
148
152
|
const result: Buffer = await this.transport.send(
|
|
149
153
|
0xe0,
|
|
150
|
-
this.transactionType ===
|
|
154
|
+
this.transactionType === ExchangeTypes.Swap
|
|
151
155
|
? CHECK_PAYOUT_ADDRESS
|
|
152
156
|
: CHECK_ASSET_IN,
|
|
153
157
|
this.transactionRate,
|
package/src/exchange/index.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { valid, gte } from "semver";
|
|
2
2
|
import type { CryptoCurrency, TokenCurrency } from "../types/currencies";
|
|
3
|
-
import { findExchangeCurrencyConfig } from "@ledgerhq/cryptoassets";
|
|
3
|
+
import { findExchangeCurrencyConfig as findProdExchangeCurrencyConfig } from "@ledgerhq/cryptoassets";
|
|
4
|
+
import { getEnv } from "../env";
|
|
5
|
+
import { findTestExchangeCurrencyConfig } from "./testCurrencyConfig";
|
|
4
6
|
// Minimum version of a currency app which has exchange capabilities, meaning it can be used
|
|
5
7
|
// for sell/swap, and do silent signing.
|
|
6
8
|
const exchangeSupportAppVersions = {
|
|
@@ -20,6 +22,22 @@ const exchangeSupportAppVersions = {
|
|
|
20
22
|
zcash: "1.5.0",
|
|
21
23
|
zencash: "1.5.0",
|
|
22
24
|
};
|
|
25
|
+
|
|
26
|
+
const findExchangeCurrencyConfig = (
|
|
27
|
+
id: string
|
|
28
|
+
):
|
|
29
|
+
| {
|
|
30
|
+
config: string;
|
|
31
|
+
|
|
32
|
+
signature: string;
|
|
33
|
+
}
|
|
34
|
+
| null
|
|
35
|
+
| undefined => {
|
|
36
|
+
return getEnv("MOCK_EXCHANGE_TEST_CONFIG")
|
|
37
|
+
? findTestExchangeCurrencyConfig(id)
|
|
38
|
+
: findProdExchangeCurrencyConfig(id);
|
|
39
|
+
};
|
|
40
|
+
|
|
23
41
|
export type ExchangeCurrencyNameAndSignature = {
|
|
24
42
|
config: Buffer;
|
|
25
43
|
signature: Buffer;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
|
|
3
|
+
import type {
|
|
4
|
+
CompleteExchangeInputFund,
|
|
5
|
+
CompleteExchangeInputSell,
|
|
6
|
+
CompleteExchangeInputSwap,
|
|
7
|
+
CompleteExchangeRequestEvent,
|
|
8
|
+
} from "./types";
|
|
9
|
+
|
|
10
|
+
import completeExchangeSwap from "../swap/completeExchange";
|
|
11
|
+
import completeExchangeTransfer from "./transfer/completeExchange";
|
|
12
|
+
|
|
13
|
+
import { ExchangeTypes } from "../hw-app-exchange/Exchange";
|
|
14
|
+
|
|
15
|
+
type CompleteExchangeInput =
|
|
16
|
+
| CompleteExchangeInputSell
|
|
17
|
+
| CompleteExchangeInputSwap
|
|
18
|
+
| CompleteExchangeInputFund;
|
|
19
|
+
|
|
20
|
+
const completeExchange = (
|
|
21
|
+
input: CompleteExchangeInput
|
|
22
|
+
): Observable<CompleteExchangeRequestEvent> => {
|
|
23
|
+
switch (input.exchangeType) {
|
|
24
|
+
case ExchangeTypes.Swap:
|
|
25
|
+
if (!input.exchange.toAccount) {
|
|
26
|
+
throw new Error("'toAccount' requested for Swap exchange");
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return completeExchangeSwap(input);
|
|
30
|
+
|
|
31
|
+
case ExchangeTypes.Sell:
|
|
32
|
+
return completeExchangeTransfer(input);
|
|
33
|
+
|
|
34
|
+
case ExchangeTypes.Fund:
|
|
35
|
+
return completeExchangeTransfer(input);
|
|
36
|
+
|
|
37
|
+
default:
|
|
38
|
+
throw new Error("exchangeType not handled");
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default completeExchange;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
Exchange,
|
|
3
|
+
ExchangeRaw,
|
|
4
|
+
ExchangeSell,
|
|
5
|
+
ExchangeSellRaw,
|
|
6
|
+
ExchangeSwap,
|
|
7
|
+
ExchangeSwapRaw,
|
|
8
|
+
} from "./types";
|
|
9
|
+
import {
|
|
10
|
+
fromAccountLikeRaw,
|
|
11
|
+
fromAccountRaw,
|
|
12
|
+
toAccountLikeRaw,
|
|
13
|
+
toAccountRaw,
|
|
14
|
+
} from "../../account";
|
|
15
|
+
|
|
16
|
+
const isExchangeSwapRaw = (
|
|
17
|
+
exchangeRaw: ExchangeSwapRaw | ExchangeSellRaw
|
|
18
|
+
): exchangeRaw is ExchangeSwapRaw => {
|
|
19
|
+
return (exchangeRaw as ExchangeSwapRaw).toAccount !== undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const isExchangeSwap = (
|
|
23
|
+
exchange: ExchangeSwap | ExchangeSell
|
|
24
|
+
): exchange is ExchangeSwap => {
|
|
25
|
+
return (exchange as ExchangeSwap).toAccount !== undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const fromExchangeRaw = (exchangeRaw: ExchangeRaw): Exchange => {
|
|
29
|
+
const fromAccount = fromAccountLikeRaw(exchangeRaw.fromAccount);
|
|
30
|
+
const fromParentAccount = exchangeRaw.fromParentAccount
|
|
31
|
+
? fromAccountRaw(exchangeRaw.fromParentAccount)
|
|
32
|
+
: null;
|
|
33
|
+
|
|
34
|
+
if (!isExchangeSwapRaw(exchangeRaw)) {
|
|
35
|
+
return {
|
|
36
|
+
fromAccount,
|
|
37
|
+
fromParentAccount,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const toAccount = fromAccountLikeRaw(exchangeRaw.toAccount);
|
|
42
|
+
const toParentAccount = exchangeRaw.toParentAccount
|
|
43
|
+
? fromAccountRaw(exchangeRaw.toParentAccount)
|
|
44
|
+
: null;
|
|
45
|
+
|
|
46
|
+
return {
|
|
47
|
+
fromAccount,
|
|
48
|
+
fromParentAccount,
|
|
49
|
+
toAccount,
|
|
50
|
+
toParentAccount,
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export const toExchangeRaw = (exchange: Exchange): ExchangeRaw => {
|
|
55
|
+
const fromAccount = toAccountLikeRaw(exchange.fromAccount);
|
|
56
|
+
const fromParentAccount = exchange.fromParentAccount
|
|
57
|
+
? toAccountRaw(exchange.fromParentAccount)
|
|
58
|
+
: null;
|
|
59
|
+
|
|
60
|
+
if (!isExchangeSwap(exchange)) {
|
|
61
|
+
return {
|
|
62
|
+
fromAccount,
|
|
63
|
+
fromParentAccount,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const toAccount = toAccountLikeRaw(exchange.toAccount);
|
|
68
|
+
const toParentAccount = exchange.toParentAccount
|
|
69
|
+
? toAccountRaw(exchange.toParentAccount)
|
|
70
|
+
: null;
|
|
71
|
+
|
|
72
|
+
return {
|
|
73
|
+
fromAccount,
|
|
74
|
+
fromParentAccount,
|
|
75
|
+
toAccount,
|
|
76
|
+
toParentAccount,
|
|
77
|
+
};
|
|
78
|
+
};
|
|
@@ -23,8 +23,12 @@ const startExchange = (
|
|
|
23
23
|
await withDevicePromise(deviceId, async (transport) => {
|
|
24
24
|
log("exchange", `attempt to connect to ${deviceId}`);
|
|
25
25
|
if (unsubscribed) return;
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Note: `transactionRate` is not needed at this stage. It is only used
|
|
28
|
+
* at the `completeExchange` step
|
|
29
|
+
*/
|
|
30
|
+
const exchange = new Exchange(transport, exchangeType);
|
|
31
|
+
const nonce: string = await exchange.startNewTransaction();
|
|
28
32
|
o.next({
|
|
29
33
|
type: "start-exchange-result",
|
|
30
34
|
nonce,
|