@docknetwork/wallet-sdk-wasm 1.5.9 → 1.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/core/format-utils.js +0 -28
- package/lib/core/format-utils.mjs +1 -24
- package/lib/core/validation.js +1 -24
- package/lib/core/validation.mjs +2 -21
- package/lib/index.js +13 -23
- package/lib/index.mjs +13 -23
- package/lib/rpc-server.js +13 -23
- package/lib/rpc-server.mjs +13 -23
- package/lib/rpc-util.js +14 -0
- package/lib/rpc-util.mjs +14 -0
- package/lib/services/blockchain/index.js +3 -6
- package/lib/services/blockchain/index.mjs +3 -6
- package/lib/services/blockchain/service.js +4 -6
- package/lib/services/blockchain/service.mjs +4 -6
- package/lib/services/credential/bbs-revocation.js +4 -7
- package/lib/services/credential/bbs-revocation.mjs +3 -6
- package/lib/services/credential/bound-check.js +9 -4
- package/lib/services/credential/bound-check.mjs +9 -4
- package/lib/services/credential/index.js +11 -13
- package/lib/services/credential/index.mjs +11 -13
- package/lib/services/credential/service.js +18 -18
- package/lib/services/credential/service.mjs +15 -15
- package/lib/services/credential/utils.js +65 -28
- package/lib/services/credential/utils.mjs +62 -32
- package/lib/services/dids/index.js +11 -14
- package/lib/services/dids/index.mjs +11 -14
- package/lib/services/dids/keypair-utils.js +142 -0
- package/lib/services/dids/keypair-utils.mjs +113 -0
- package/lib/services/dids/service.js +15 -34
- package/lib/services/dids/service.mjs +15 -34
- package/lib/services/edv/index.js +8 -14
- package/lib/services/edv/index.mjs +8 -14
- package/lib/services/edv/service.js +10 -22
- package/lib/services/edv/service.mjs +10 -22
- package/lib/services/index.js +13 -25
- package/lib/services/index.mjs +13 -25
- package/lib/services/relay-service/configs.js +0 -1
- package/lib/services/relay-service/configs.mjs +0 -1
- package/lib/services/relay-service/index.android.js +0 -1
- package/lib/services/relay-service/index.android.mjs +0 -1
- package/lib/services/relay-service/index.ios.js +0 -1
- package/lib/services/relay-service/index.ios.mjs +0 -1
- package/lib/services/relay-service/index.js +0 -1
- package/lib/services/relay-service/index.mjs +0 -1
- package/lib/services/relay-service/service-rpc.js +0 -1
- package/lib/services/relay-service/service-rpc.mjs +0 -1
- package/lib/services/relay-service/service.js +0 -1
- package/lib/services/relay-service/service.mjs +0 -1
- package/lib/services/test-utils.js +0 -44
- package/lib/services/test-utils.mjs +1 -44
- package/lib/services/util-crypto/configs.js +0 -12
- package/lib/services/util-crypto/configs.mjs +0 -12
- package/lib/services/util-crypto/index.android.js +0 -3
- package/lib/services/util-crypto/index.android.mjs +0 -3
- package/lib/services/util-crypto/index.ios.js +0 -3
- package/lib/services/util-crypto/index.ios.mjs +0 -3
- package/lib/services/util-crypto/index.js +4 -7
- package/lib/services/util-crypto/index.mjs +4 -7
- package/lib/services/util-crypto/service-rpc.js +0 -23
- package/lib/services/util-crypto/service-rpc.mjs +0 -23
- package/lib/services/util-crypto/service.js +68 -61
- package/lib/services/util-crypto/service.mjs +50 -59
- package/lib/services/wallet/configs.js +0 -63
- package/lib/services/wallet/configs.mjs +1 -64
- package/lib/services/wallet/index.android.js +0 -1
- package/lib/services/wallet/index.android.mjs +0 -1
- package/lib/services/wallet/index.ios.js +0 -1
- package/lib/services/wallet/index.ios.mjs +0 -1
- package/lib/services/wallet/index.js +2 -12
- package/lib/services/wallet/index.mjs +2 -12
- package/lib/services/wallet/service-rpc.js +0 -77
- package/lib/services/wallet/service-rpc.mjs +0 -77
- package/lib/services/wallet/service.js +1 -215
- package/lib/services/wallet/service.mjs +1 -211
- package/lib/setup-nodejs.js +13 -23
- package/lib/setup-nodejs.mjs +13 -23
- package/lib/setup-tests.js +13 -23
- package/lib/setup-tests.mjs +13 -23
- package/lib/src/core/format-utils.d.ts +0 -5
- package/lib/src/core/format-utils.d.ts.map +1 -1
- package/lib/src/core/validation.d.ts +0 -3
- package/lib/src/core/validation.d.ts.map +1 -1
- package/lib/src/rpc-util.d.ts.map +1 -1
- package/lib/src/services/blockchain/service.d.ts.map +1 -1
- package/lib/src/services/credential/bbs-revocation.d.ts.map +1 -1
- package/lib/src/services/credential/bound-check.d.ts +1 -1
- package/lib/src/services/credential/bound-check.d.ts.map +1 -1
- package/lib/src/services/credential/service.d.ts.map +1 -1
- package/lib/src/services/credential/utils.d.ts +2 -1
- package/lib/src/services/credential/utils.d.ts.map +1 -1
- package/lib/src/services/dids/keypair-utils.d.ts +15 -0
- package/lib/src/services/dids/keypair-utils.d.ts.map +1 -0
- package/lib/src/services/dids/service.d.ts +6 -6
- package/lib/src/services/dids/service.d.ts.map +1 -1
- package/lib/src/services/edv/service.d.ts.map +1 -1
- package/lib/src/services/util-crypto/configs.d.ts +0 -3
- package/lib/src/services/util-crypto/configs.d.ts.map +1 -1
- package/lib/src/services/util-crypto/service.d.ts +3 -8
- package/lib/src/services/util-crypto/service.d.ts.map +1 -1
- package/lib/src/services/wallet/configs.d.ts +13 -0
- package/lib/src/services/wallet/configs.d.ts.map +1 -0
- package/lib/src/services/wallet/service.d.ts +1 -44
- package/lib/src/services/wallet/service.d.ts.map +1 -1
- package/lib/test-utils.js +0 -4
- package/lib/test-utils.mjs +1 -4
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -25
- package/readme.md +0 -61
- package/src/core/format-utils.test.js +1 -28
- package/src/core/format-utils.ts +0 -33
- package/src/core/validation.test.js +1 -33
- package/src/core/validation.ts +1 -25
- package/src/rpc-server.test.js +2 -9
- package/src/rpc-util.js +14 -0
- package/src/services/blockchain/service.ts +1 -0
- package/src/services/credential/bbs-revocation.ts +2 -1
- package/src/services/credential/bound-check.test.ts +6 -6
- package/src/services/credential/bound-check.ts +4 -4
- package/src/services/credential/index.test.js +0 -2
- package/src/services/credential/service.ts +5 -2
- package/src/services/credential/utils.js +65 -23
- package/src/services/dids/index.test.js +8 -19
- package/src/services/dids/keypair-utils.js +111 -0
- package/src/services/dids/service.ts +6 -25
- package/src/services/edv/service.ts +2 -9
- package/src/services/index.js +0 -4
- package/src/services/test-utils.js +0 -29
- package/src/services/util-crypto/configs.ts +0 -12
- package/src/services/util-crypto/index.test.js +6 -83
- package/src/services/util-crypto/service-rpc.js +0 -20
- package/src/services/util-crypto/service.ts +62 -75
- package/src/services/wallet/configs.ts +1 -113
- package/src/services/wallet/index.test.js +0 -159
- package/src/services/wallet/service-rpc.js +1 -88
- package/src/services/wallet/service.ts +0 -258
- package/src/test-utils.js +0 -13
- package/lib/account-357ab05d.js +0 -742
- package/lib/account-399e6053.js +0 -752
- package/lib/core/polkadot-utils.js +0 -119
- package/lib/core/polkadot-utils.mjs +0 -94
- package/lib/core/realm-schemas.js +0 -50
- package/lib/core/realm-schemas.mjs +0 -44
- package/lib/core/subscan.js +0 -75
- package/lib/core/subscan.mjs +0 -64
- package/lib/fixtures.js +0 -56
- package/lib/fixtures.mjs +0 -52
- package/lib/modules/account.js +0 -48
- package/lib/modules/account.mjs +0 -40
- package/lib/modules/accounts.js +0 -49
- package/lib/modules/accounts.mjs +0 -40
- package/lib/modules/data-migration.js +0 -72
- package/lib/modules/data-migration.mjs +0 -68
- package/lib/modules/wallet-backup.js +0 -82
- package/lib/modules/wallet-backup.mjs +0 -71
- package/lib/modules/wallet.js +0 -49
- package/lib/modules/wallet.mjs +0 -40
- package/lib/services/example/configs.js +0 -21
- package/lib/services/example/configs.mjs +0 -13
- package/lib/services/example/index.js +0 -18
- package/lib/services/example/index.mjs +0 -14
- package/lib/services/example/service-rpc.js +0 -25
- package/lib/services/example/service-rpc.mjs +0 -21
- package/lib/services/example/service.js +0 -25
- package/lib/services/example/service.mjs +0 -20
- package/lib/services/keyring/configs.js +0 -70
- package/lib/services/keyring/configs.mjs +0 -61
- package/lib/services/keyring/index.android.js +0 -22
- package/lib/services/keyring/index.android.mjs +0 -18
- package/lib/services/keyring/index.ios.js +0 -22
- package/lib/services/keyring/index.ios.mjs +0 -18
- package/lib/services/keyring/index.js +0 -16
- package/lib/services/keyring/index.mjs +0 -8
- package/lib/services/keyring/service-rpc.js +0 -65
- package/lib/services/keyring/service-rpc.mjs +0 -61
- package/lib/services/keyring/service.js +0 -84
- package/lib/services/keyring/service.mjs +0 -74
- package/lib/services/polkadot/configs.js +0 -17
- package/lib/services/polkadot/configs.mjs +0 -13
- package/lib/services/polkadot/index.android.js +0 -22
- package/lib/services/polkadot/index.android.mjs +0 -18
- package/lib/services/polkadot/index.ios.js +0 -22
- package/lib/services/polkadot/index.ios.mjs +0 -18
- package/lib/services/polkadot/index.js +0 -15
- package/lib/services/polkadot/index.mjs +0 -7
- package/lib/services/polkadot/service-rpc.js +0 -30
- package/lib/services/polkadot/service-rpc.mjs +0 -26
- package/lib/services/polkadot/service.js +0 -28
- package/lib/services/polkadot/service.mjs +0 -23
- package/lib/src/core/polkadot-utils.d.ts +0 -11
- package/lib/src/core/polkadot-utils.d.ts.map +0 -1
- package/lib/src/modules/account.d.ts +0 -60
- package/lib/src/modules/account.d.ts.map +0 -1
- package/lib/src/modules/accounts.d.ts +0 -48
- package/lib/src/modules/accounts.d.ts.map +0 -1
- package/lib/src/modules/data-migration.d.ts +0 -7
- package/lib/src/modules/data-migration.d.ts.map +0 -1
- package/lib/src/modules/wallet-backup.d.ts +0 -12
- package/lib/src/modules/wallet-backup.d.ts.map +0 -1
- package/lib/src/modules/wallet.d.ts +0 -134
- package/lib/src/modules/wallet.d.ts.map +0 -1
- package/lib/src/services/blockchain/index.d.ts +0 -2
- package/lib/src/services/blockchain/index.d.ts.map +0 -1
- package/lib/src/services/example/configs.d.ts +0 -9
- package/lib/src/services/example/configs.d.ts.map +0 -1
- package/lib/src/services/example/service.d.ts +0 -8
- package/lib/src/services/example/service.d.ts.map +0 -1
- package/lib/src/services/keyring/configs.d.ts +0 -39
- package/lib/src/services/keyring/configs.d.ts.map +0 -1
- package/lib/src/services/keyring/index.d.ts +0 -2
- package/lib/src/services/keyring/index.d.ts.map +0 -1
- package/lib/src/services/polkadot/configs.d.ts +0 -8
- package/lib/src/services/polkadot/configs.d.ts.map +0 -1
- package/lib/src/services/polkadot/index.d.ts +0 -2
- package/lib/src/services/polkadot/index.d.ts.map +0 -1
- package/lib/src/services/polkadot/service.d.ts +0 -8
- package/lib/src/services/polkadot/service.d.ts.map +0 -1
- package/lib/src/services/wallet/index.d.ts +0 -2
- package/lib/src/services/wallet/index.d.ts.map +0 -1
- package/lib/test/axiosMocks.js +0 -431
- package/lib/test/axiosMocks.mjs +0 -420
- package/lib/test/setup-test-state.js +0 -81
- package/lib/test/setup-test-state.mjs +0 -73
- package/src/core/polkadot-utils.js +0 -99
- package/src/core/realm-schemas.js +0 -42
- package/src/core/subscan.js +0 -62
- package/src/core/subscan.test.js +0 -56
- package/src/fixtures.js +0 -43
- package/src/modules/account.test.js +0 -56
- package/src/modules/account.ts +0 -128
- package/src/modules/accounts.test.js +0 -63
- package/src/modules/accounts.ts +0 -231
- package/src/modules/data-migration.test.js +0 -61
- package/src/modules/data-migration.ts +0 -86
- package/src/modules/wallet-backup.test.js +0 -24
- package/src/modules/wallet-backup.ts +0 -68
- package/src/modules/wallet.test.js +0 -216
- package/src/modules/wallet.ts +0 -424
- package/src/services/example/configs.js +0 -14
- package/src/services/example/index.js +0 -3
- package/src/services/example/index.test.js +0 -28
- package/src/services/example/service-rpc.js +0 -11
- package/src/services/example/service.ts +0 -18
- package/src/services/keyring/configs.ts +0 -110
- package/src/services/keyring/index.android.js +0 -3
- package/src/services/keyring/index.ios.js +0 -3
- package/src/services/keyring/index.js +0 -1
- package/src/services/keyring/index.test.js +0 -48
- package/src/services/keyring/service-rpc.js +0 -56
- package/src/services/keyring/service.ts +0 -111
- package/src/services/polkadot/configs.ts +0 -13
- package/src/services/polkadot/index.android.js +0 -3
- package/src/services/polkadot/index.ios.js +0 -3
- package/src/services/polkadot/index.js +0 -1
- package/src/services/polkadot/index.test.js +0 -52
- package/src/services/polkadot/service-rpc.js +0 -13
- package/src/services/polkadot/service.ts +0 -21
- package/src/test/axiosMocks.js +0 -20
- package/src/test/fixtures/subscan-failure.json +0 -5
- package/src/test/fixtures/subscan-success.json +0 -370
- package/src/test/fixtures/subscan-too-many-requests.json +0 -9
- package/src/test/setup-test-state.js +0 -35
- package/src/test/test-wallet.test.js +0 -15
package/lib/test/axiosMocks.js
DELETED
|
@@ -1,431 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var axios = require('axios');
|
|
6
|
-
var MockAdapter = require('axios-mock-adapter');
|
|
7
|
-
var core_subscan = require('../core/subscan.js');
|
|
8
|
-
require('axios-retry');
|
|
9
|
-
require('assert');
|
|
10
|
-
require('../core/logger.js');
|
|
11
|
-
require('cwait');
|
|
12
|
-
|
|
13
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
|
-
|
|
15
|
-
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
|
16
|
-
var MockAdapter__default = /*#__PURE__*/_interopDefaultLegacy(MockAdapter);
|
|
17
|
-
|
|
18
|
-
var code$1 = 0;
|
|
19
|
-
var message$1 = "Success";
|
|
20
|
-
var generated_at$1 = 1643065993;
|
|
21
|
-
var data = {
|
|
22
|
-
count: 55,
|
|
23
|
-
transfers: [
|
|
24
|
-
{
|
|
25
|
-
from: "3Dj6YssQkpo1HVJ6Mkxjd25EwZNAeVgKCGtBp5u3RtdWX9y9",
|
|
26
|
-
to: "3EZ85Y5FLEsqzD5xKTyqB9gtvSHFhEVG83d2i6P54SFJNvSF",
|
|
27
|
-
extrinsic_index: "4176898-1",
|
|
28
|
-
success: true,
|
|
29
|
-
hash: "0x8df2969b4e70230efd8c0070c0f126c6cf2bbd6c5386362c91502aed0b18cc46",
|
|
30
|
-
block_num: 4176898,
|
|
31
|
-
block_timestamp: 1638387639,
|
|
32
|
-
module: "balances",
|
|
33
|
-
amount: "8920.915",
|
|
34
|
-
fee: "2085000",
|
|
35
|
-
nonce: 0,
|
|
36
|
-
asset_symbol: "",
|
|
37
|
-
from_account_display: {
|
|
38
|
-
address: "3Dj6YssQkpo1HVJ6Mkxjd25EwZNAeVgKCGtBp5u3RtdWX9y9",
|
|
39
|
-
display: "",
|
|
40
|
-
judgements: null,
|
|
41
|
-
account_index: "",
|
|
42
|
-
identity: false,
|
|
43
|
-
parent: null
|
|
44
|
-
},
|
|
45
|
-
to_account_display: {
|
|
46
|
-
address: "3EZ85Y5FLEsqzD5xKTyqB9gtvSHFhEVG83d2i6P54SFJNvSF",
|
|
47
|
-
display: "",
|
|
48
|
-
judgements: null,
|
|
49
|
-
account_index: "",
|
|
50
|
-
identity: false,
|
|
51
|
-
parent: null
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
from: "3FYAYVDzXT7ceb9vtLSn5JXT4B878q2ho1wBaeRU2qk42WRy",
|
|
56
|
-
to: "3Dj6YssQkpo1HVJ6Mkxjd25EwZNAeVgKCGtBp5u3RtdWX9y9",
|
|
57
|
-
extrinsic_index: "4176087-1",
|
|
58
|
-
success: true,
|
|
59
|
-
hash: "0x8b9a5c1c4c7d9bf180eb5aa1ebe49f2c7e6a4a3d10c1cf78fe9b23caadcad4a5",
|
|
60
|
-
block_num: 4176087,
|
|
61
|
-
block_timestamp: 1638385200,
|
|
62
|
-
module: "balances",
|
|
63
|
-
amount: "8923",
|
|
64
|
-
fee: "2125000",
|
|
65
|
-
nonce: 2759,
|
|
66
|
-
asset_symbol: "",
|
|
67
|
-
from_account_display: {
|
|
68
|
-
address: "3FYAYVDzXT7ceb9vtLSn5JXT4B878q2ho1wBaeRU2qk42WRy",
|
|
69
|
-
display: "",
|
|
70
|
-
judgements: null,
|
|
71
|
-
account_index: "",
|
|
72
|
-
identity: false,
|
|
73
|
-
parent: null
|
|
74
|
-
},
|
|
75
|
-
to_account_display: {
|
|
76
|
-
address: "3Dj6YssQkpo1HVJ6Mkxjd25EwZNAeVgKCGtBp5u3RtdWX9y9",
|
|
77
|
-
display: "",
|
|
78
|
-
judgements: null,
|
|
79
|
-
account_index: "",
|
|
80
|
-
identity: false,
|
|
81
|
-
parent: null
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
from: "3Dj6YssQkpo1HVJ6Mkxjd25EwZNAeVgKCGtBp5u3RtdWX9y9",
|
|
86
|
-
to: "3EZ85Y5FLEsqzD5xKTyqB9gtvSHFhEVG83d2i6P54SFJNvSF",
|
|
87
|
-
extrinsic_index: "4167511-1",
|
|
88
|
-
success: true,
|
|
89
|
-
hash: "0x52f975cc5983e8e11c4a54c8d26ceabd4d7ce42021b5d10912f6051f7f285be4",
|
|
90
|
-
block_num: 4167511,
|
|
91
|
-
block_timestamp: 1638359442,
|
|
92
|
-
module: "balances",
|
|
93
|
-
amount: "7911.915",
|
|
94
|
-
fee: "2085000",
|
|
95
|
-
nonce: 0,
|
|
96
|
-
asset_symbol: "",
|
|
97
|
-
from_account_display: {
|
|
98
|
-
address: "3Dj6YssQkpo1HVJ6Mkxjd25EwZNAeVgKCGtBp5u3RtdWX9y9",
|
|
99
|
-
display: "",
|
|
100
|
-
judgements: null,
|
|
101
|
-
account_index: "",
|
|
102
|
-
identity: false,
|
|
103
|
-
parent: null
|
|
104
|
-
},
|
|
105
|
-
to_account_display: {
|
|
106
|
-
address: "3EZ85Y5FLEsqzD5xKTyqB9gtvSHFhEVG83d2i6P54SFJNvSF",
|
|
107
|
-
display: "",
|
|
108
|
-
judgements: null,
|
|
109
|
-
account_index: "",
|
|
110
|
-
identity: false,
|
|
111
|
-
parent: null
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
from: "3FYAYVDzXT7ceb9vtLSn5JXT4B878q2ho1wBaeRU2qk42WRy",
|
|
116
|
-
to: "3Dj6YssQkpo1HVJ6Mkxjd25EwZNAeVgKCGtBp5u3RtdWX9y9",
|
|
117
|
-
extrinsic_index: "4166794-1",
|
|
118
|
-
success: true,
|
|
119
|
-
hash: "0x40809d9a8d5b0da7f4f49a62f2fab5977b20c8bdef3133df87161013624ef8ca",
|
|
120
|
-
block_num: 4166794,
|
|
121
|
-
block_timestamp: 1638357288,
|
|
122
|
-
module: "balances",
|
|
123
|
-
amount: "7914",
|
|
124
|
-
fee: "2125000",
|
|
125
|
-
nonce: 2754,
|
|
126
|
-
asset_symbol: "",
|
|
127
|
-
from_account_display: {
|
|
128
|
-
address: "3FYAYVDzXT7ceb9vtLSn5JXT4B878q2ho1wBaeRU2qk42WRy",
|
|
129
|
-
display: "",
|
|
130
|
-
judgements: null,
|
|
131
|
-
account_index: "",
|
|
132
|
-
identity: false,
|
|
133
|
-
parent: null
|
|
134
|
-
},
|
|
135
|
-
to_account_display: {
|
|
136
|
-
address: "3Dj6YssQkpo1HVJ6Mkxjd25EwZNAeVgKCGtBp5u3RtdWX9y9",
|
|
137
|
-
display: "",
|
|
138
|
-
judgements: null,
|
|
139
|
-
account_index: "",
|
|
140
|
-
identity: false,
|
|
141
|
-
parent: null
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
from: "3Dj6YssQkpo1HVJ6Mkxjd25EwZNAeVgKCGtBp5u3RtdWX9y9",
|
|
146
|
-
to: "3EZ85Y5FLEsqzD5xKTyqB9gtvSHFhEVG83d2i6P54SFJNvSF",
|
|
147
|
-
extrinsic_index: "4147624-1",
|
|
148
|
-
success: true,
|
|
149
|
-
hash: "0x2aa32f1c54960268c4ca6c86f1a9e13a4d3cb5b6dd557de5669c7e0edbd099cf",
|
|
150
|
-
block_num: 4147624,
|
|
151
|
-
block_timestamp: 1638299757,
|
|
152
|
-
module: "balances",
|
|
153
|
-
amount: "8810.3386",
|
|
154
|
-
fee: "2085000",
|
|
155
|
-
nonce: 0,
|
|
156
|
-
asset_symbol: "",
|
|
157
|
-
from_account_display: {
|
|
158
|
-
address: "3Dj6YssQkpo1HVJ6Mkxjd25EwZNAeVgKCGtBp5u3RtdWX9y9",
|
|
159
|
-
display: "",
|
|
160
|
-
judgements: null,
|
|
161
|
-
account_index: "",
|
|
162
|
-
identity: false,
|
|
163
|
-
parent: null
|
|
164
|
-
},
|
|
165
|
-
to_account_display: {
|
|
166
|
-
address: "3EZ85Y5FLEsqzD5xKTyqB9gtvSHFhEVG83d2i6P54SFJNvSF",
|
|
167
|
-
display: "",
|
|
168
|
-
judgements: null,
|
|
169
|
-
account_index: "",
|
|
170
|
-
identity: false,
|
|
171
|
-
parent: null
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
from: "3FYAYVDzXT7ceb9vtLSn5JXT4B878q2ho1wBaeRU2qk42WRy",
|
|
176
|
-
to: "3Dj6YssQkpo1HVJ6Mkxjd25EwZNAeVgKCGtBp5u3RtdWX9y9",
|
|
177
|
-
extrinsic_index: "4146793-1",
|
|
178
|
-
success: true,
|
|
179
|
-
hash: "0x0cc3a04a654fbb7c6fe169845e98a0f5e801e5dd1a5c348b3734c06a2984d28c",
|
|
180
|
-
block_num: 4146793,
|
|
181
|
-
block_timestamp: 1638297261,
|
|
182
|
-
module: "balances",
|
|
183
|
-
amount: "8812.4236",
|
|
184
|
-
fee: "2125000",
|
|
185
|
-
nonce: 2743,
|
|
186
|
-
asset_symbol: "",
|
|
187
|
-
from_account_display: {
|
|
188
|
-
address: "3FYAYVDzXT7ceb9vtLSn5JXT4B878q2ho1wBaeRU2qk42WRy",
|
|
189
|
-
display: "",
|
|
190
|
-
judgements: null,
|
|
191
|
-
account_index: "",
|
|
192
|
-
identity: false,
|
|
193
|
-
parent: null
|
|
194
|
-
},
|
|
195
|
-
to_account_display: {
|
|
196
|
-
address: "3Dj6YssQkpo1HVJ6Mkxjd25EwZNAeVgKCGtBp5u3RtdWX9y9",
|
|
197
|
-
display: "",
|
|
198
|
-
judgements: null,
|
|
199
|
-
account_index: "",
|
|
200
|
-
identity: false,
|
|
201
|
-
parent: null
|
|
202
|
-
}
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
from: "3Dj6YssQkpo1HVJ6Mkxjd25EwZNAeVgKCGtBp5u3RtdWX9y9",
|
|
206
|
-
to: "3EZ85Y5FLEsqzD5xKTyqB9gtvSHFhEVG83d2i6P54SFJNvSF",
|
|
207
|
-
extrinsic_index: "4145825-1",
|
|
208
|
-
success: true,
|
|
209
|
-
hash: "0x71ec251ac396a9181b1d96d1e6b4371dafd25964be12e4500047164fc4da52ba",
|
|
210
|
-
block_num: 4145825,
|
|
211
|
-
block_timestamp: 1638294357,
|
|
212
|
-
module: "balances",
|
|
213
|
-
amount: "8756.8092",
|
|
214
|
-
fee: "2085000",
|
|
215
|
-
nonce: 0,
|
|
216
|
-
asset_symbol: "",
|
|
217
|
-
from_account_display: {
|
|
218
|
-
address: "3Dj6YssQkpo1HVJ6Mkxjd25EwZNAeVgKCGtBp5u3RtdWX9y9",
|
|
219
|
-
display: "",
|
|
220
|
-
judgements: null,
|
|
221
|
-
account_index: "",
|
|
222
|
-
identity: false,
|
|
223
|
-
parent: null
|
|
224
|
-
},
|
|
225
|
-
to_account_display: {
|
|
226
|
-
address: "3EZ85Y5FLEsqzD5xKTyqB9gtvSHFhEVG83d2i6P54SFJNvSF",
|
|
227
|
-
display: "",
|
|
228
|
-
judgements: null,
|
|
229
|
-
account_index: "",
|
|
230
|
-
identity: false,
|
|
231
|
-
parent: null
|
|
232
|
-
}
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
from: "3FYAYVDzXT7ceb9vtLSn5JXT4B878q2ho1wBaeRU2qk42WRy",
|
|
236
|
-
to: "3Dj6YssQkpo1HVJ6Mkxjd25EwZNAeVgKCGtBp5u3RtdWX9y9",
|
|
237
|
-
extrinsic_index: "4145093-1",
|
|
238
|
-
success: true,
|
|
239
|
-
hash: "0x561f7962d5469980f19e62f6e4382df28429dac09332edc0c1580a67bc665a9d",
|
|
240
|
-
block_num: 4145093,
|
|
241
|
-
block_timestamp: 1638292158,
|
|
242
|
-
module: "balances",
|
|
243
|
-
amount: "8758.8942",
|
|
244
|
-
fee: "2125000",
|
|
245
|
-
nonce: 2742,
|
|
246
|
-
asset_symbol: "",
|
|
247
|
-
from_account_display: {
|
|
248
|
-
address: "3FYAYVDzXT7ceb9vtLSn5JXT4B878q2ho1wBaeRU2qk42WRy",
|
|
249
|
-
display: "",
|
|
250
|
-
judgements: null,
|
|
251
|
-
account_index: "",
|
|
252
|
-
identity: false,
|
|
253
|
-
parent: null
|
|
254
|
-
},
|
|
255
|
-
to_account_display: {
|
|
256
|
-
address: "3Dj6YssQkpo1HVJ6Mkxjd25EwZNAeVgKCGtBp5u3RtdWX9y9",
|
|
257
|
-
display: "",
|
|
258
|
-
judgements: null,
|
|
259
|
-
account_index: "",
|
|
260
|
-
identity: false,
|
|
261
|
-
parent: null
|
|
262
|
-
}
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
from: "3Dj6YssQkpo1HVJ6Mkxjd25EwZNAeVgKCGtBp5u3RtdWX9y9",
|
|
266
|
-
to: "3EZ85Y5FLEsqzD5xKTyqB9gtvSHFhEVG83d2i6P54SFJNvSF",
|
|
267
|
-
extrinsic_index: "4144826-1",
|
|
268
|
-
success: true,
|
|
269
|
-
hash: "0x504a703981d2477e6c521476f71a263f1e104a22ba76c34b701e2507424a3cd5",
|
|
270
|
-
block_num: 4144826,
|
|
271
|
-
block_timestamp: 1638291357,
|
|
272
|
-
module: "balances",
|
|
273
|
-
amount: "8611.394",
|
|
274
|
-
fee: "2085000",
|
|
275
|
-
nonce: 0,
|
|
276
|
-
asset_symbol: "",
|
|
277
|
-
from_account_display: {
|
|
278
|
-
address: "3Dj6YssQkpo1HVJ6Mkxjd25EwZNAeVgKCGtBp5u3RtdWX9y9",
|
|
279
|
-
display: "",
|
|
280
|
-
judgements: null,
|
|
281
|
-
account_index: "",
|
|
282
|
-
identity: false,
|
|
283
|
-
parent: null
|
|
284
|
-
},
|
|
285
|
-
to_account_display: {
|
|
286
|
-
address: "3EZ85Y5FLEsqzD5xKTyqB9gtvSHFhEVG83d2i6P54SFJNvSF",
|
|
287
|
-
display: "",
|
|
288
|
-
judgements: null,
|
|
289
|
-
account_index: "",
|
|
290
|
-
identity: false,
|
|
291
|
-
parent: null
|
|
292
|
-
}
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
from: "3FYAYVDzXT7ceb9vtLSn5JXT4B878q2ho1wBaeRU2qk42WRy",
|
|
296
|
-
to: "3Dj6YssQkpo1HVJ6Mkxjd25EwZNAeVgKCGtBp5u3RtdWX9y9",
|
|
297
|
-
extrinsic_index: "4144192-1",
|
|
298
|
-
success: true,
|
|
299
|
-
hash: "0x0a92325dba27d323c7b128d041d41d92a78c924f39b7c570c4aa14b365db08d9",
|
|
300
|
-
block_num: 4144192,
|
|
301
|
-
block_timestamp: 1638289455,
|
|
302
|
-
module: "balances",
|
|
303
|
-
amount: "8613.479",
|
|
304
|
-
fee: "2125000",
|
|
305
|
-
nonce: 2741,
|
|
306
|
-
asset_symbol: "",
|
|
307
|
-
from_account_display: {
|
|
308
|
-
address: "3FYAYVDzXT7ceb9vtLSn5JXT4B878q2ho1wBaeRU2qk42WRy",
|
|
309
|
-
display: "",
|
|
310
|
-
judgements: null,
|
|
311
|
-
account_index: "",
|
|
312
|
-
identity: false,
|
|
313
|
-
parent: null
|
|
314
|
-
},
|
|
315
|
-
to_account_display: {
|
|
316
|
-
address: "3Dj6YssQkpo1HVJ6Mkxjd25EwZNAeVgKCGtBp5u3RtdWX9y9",
|
|
317
|
-
display: "",
|
|
318
|
-
judgements: null,
|
|
319
|
-
account_index: "",
|
|
320
|
-
identity: false,
|
|
321
|
-
parent: null
|
|
322
|
-
}
|
|
323
|
-
},
|
|
324
|
-
{
|
|
325
|
-
from: "3Dj6YssQkpo1HVJ6Mkxjd25EwZNAeVgKCGtBp5u3RtdWX9y9",
|
|
326
|
-
to: "3EZ85Y5FLEsqzD5xKTyqB9gtvSHFhEVG83d2i6P54SFJNvSF",
|
|
327
|
-
extrinsic_index: "4143626-1",
|
|
328
|
-
success: true,
|
|
329
|
-
hash: "0x2af4f055b3e4cdc02014acdb0e8767a9a1b43a1ba28e9f5b2d95bedc023bbe6f",
|
|
330
|
-
block_num: 4143626,
|
|
331
|
-
block_timestamp: 1638287757,
|
|
332
|
-
module: "balances",
|
|
333
|
-
amount: "8413.915",
|
|
334
|
-
fee: "2085000",
|
|
335
|
-
nonce: 0,
|
|
336
|
-
asset_symbol: "",
|
|
337
|
-
from_account_display: {
|
|
338
|
-
address: "3Dj6YssQkpo1HVJ6Mkxjd25EwZNAeVgKCGtBp5u3RtdWX9y9",
|
|
339
|
-
display: "",
|
|
340
|
-
judgements: null,
|
|
341
|
-
account_index: "",
|
|
342
|
-
identity: false,
|
|
343
|
-
parent: null
|
|
344
|
-
},
|
|
345
|
-
to_account_display: {
|
|
346
|
-
address: "3EZ85Y5FLEsqzD5xKTyqB9gtvSHFhEVG83d2i6P54SFJNvSF",
|
|
347
|
-
display: "",
|
|
348
|
-
judgements: null,
|
|
349
|
-
account_index: "",
|
|
350
|
-
identity: false,
|
|
351
|
-
parent: null
|
|
352
|
-
}
|
|
353
|
-
},
|
|
354
|
-
{
|
|
355
|
-
from: "3FYAYVDzXT7ceb9vtLSn5JXT4B878q2ho1wBaeRU2qk42WRy",
|
|
356
|
-
to: "3Dj6YssQkpo1HVJ6Mkxjd25EwZNAeVgKCGtBp5u3RtdWX9y9",
|
|
357
|
-
extrinsic_index: "4142892-1",
|
|
358
|
-
success: true,
|
|
359
|
-
hash: "0xabf03b38ea4fa6eaddbb3c46438c8fa38c86d248c653c28bb1b15d0fb3e0a19a",
|
|
360
|
-
block_num: 4142892,
|
|
361
|
-
block_timestamp: 1638285555,
|
|
362
|
-
module: "balances",
|
|
363
|
-
amount: "8416",
|
|
364
|
-
fee: "2125000",
|
|
365
|
-
nonce: 2740,
|
|
366
|
-
asset_symbol: "",
|
|
367
|
-
from_account_display: {
|
|
368
|
-
address: "3FYAYVDzXT7ceb9vtLSn5JXT4B878q2ho1wBaeRU2qk42WRy",
|
|
369
|
-
display: "",
|
|
370
|
-
judgements: null,
|
|
371
|
-
account_index: "",
|
|
372
|
-
identity: false,
|
|
373
|
-
parent: null
|
|
374
|
-
},
|
|
375
|
-
to_account_display: {
|
|
376
|
-
address: "3Dj6YssQkpo1HVJ6Mkxjd25EwZNAeVgKCGtBp5u3RtdWX9y9",
|
|
377
|
-
display: "",
|
|
378
|
-
judgements: null,
|
|
379
|
-
account_index: "",
|
|
380
|
-
identity: false,
|
|
381
|
-
parent: null
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
]
|
|
385
|
-
};
|
|
386
|
-
var successData = {
|
|
387
|
-
code: code$1,
|
|
388
|
-
message: message$1,
|
|
389
|
-
generated_at: generated_at$1,
|
|
390
|
-
data: data
|
|
391
|
-
};
|
|
392
|
-
|
|
393
|
-
var code = 10001;
|
|
394
|
-
var message = "Params Error";
|
|
395
|
-
var generated_at = 1643066008;
|
|
396
|
-
var paramsFailure = {
|
|
397
|
-
code: code,
|
|
398
|
-
message: message,
|
|
399
|
-
generated_at: generated_at
|
|
400
|
-
};
|
|
401
|
-
|
|
402
|
-
var status = 429;
|
|
403
|
-
var statusText = "Too Many Requests";
|
|
404
|
-
var response = {
|
|
405
|
-
data: {
|
|
406
|
-
message: "API rate limit exceeded"
|
|
407
|
-
}
|
|
408
|
-
};
|
|
409
|
-
var requestFailure = {
|
|
410
|
-
status: status,
|
|
411
|
-
statusText: statusText,
|
|
412
|
-
response: response
|
|
413
|
-
};
|
|
414
|
-
|
|
415
|
-
const mockAdapter = new MockAdapter__default["default"](axios__default["default"]);
|
|
416
|
-
|
|
417
|
-
function mockSubscanSuccess() {
|
|
418
|
-
mockAdapter.onPost(core_subscan.SUBSCAN_TRANSFER_URL).replyOnce(200, successData);
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
function mockSubscanParamsFailure() {
|
|
422
|
-
mockAdapter.onPost(core_subscan.SUBSCAN_TRANSFER_URL).replyOnce(200, paramsFailure);
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
function mockSubscanRequestFailure() {
|
|
426
|
-
mockAdapter.onPost(core_subscan.SUBSCAN_TRANSFER_URL).replyOnce(429, requestFailure);
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
exports.mockSubscanParamsFailure = mockSubscanParamsFailure;
|
|
430
|
-
exports.mockSubscanRequestFailure = mockSubscanRequestFailure;
|
|
431
|
-
exports.mockSubscanSuccess = mockSubscanSuccess;
|