@subwallet/extension-base 1.1.43-0 → 1.1.44-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/cjs/koni/api/dotsama/transfer.js +9 -9
- package/cjs/koni/api/nft/index.js +1 -1
- package/cjs/koni/api/nft/ordinal_nft/constants.js +1 -5
- package/cjs/koni/api/nft/ordinal_nft/index.js +3 -8
- package/cjs/koni/api/nft/transfer.js +22 -12
- package/cjs/koni/api/nft/unique_network_nft/index.js +10 -9
- package/cjs/koni/background/handlers/Extension.js +1 -1
- package/cjs/packageInfo.js +1 -1
- package/cjs/services/chain-service/constants.js +5 -4
- package/cjs/services/migration-service/scripts/MigrateTransactionHistoryBySymbol.js +63 -0
- package/cjs/services/migration-service/scripts/databases/MigrateAssetSetting.js +21 -19
- package/cjs/services/migration-service/scripts/index.js +6 -4
- package/cjs/services/subscan-service/index.js +80 -18
- package/cjs/services/subscan-service/subscan-chain-map.js +3 -1
- package/koni/api/dotsama/transfer.js +9 -9
- package/koni/api/nft/index.js +2 -2
- package/koni/api/nft/ordinal_nft/constants.d.ts +0 -2
- package/koni/api/nft/ordinal_nft/constants.js +0 -2
- package/koni/api/nft/ordinal_nft/index.d.ts +1 -1
- package/koni/api/nft/ordinal_nft/index.js +3 -8
- package/koni/api/nft/transfer.d.ts +2 -2
- package/koni/api/nft/transfer.js +22 -12
- package/koni/api/nft/unique_network_nft/index.js +10 -9
- package/koni/background/handlers/Extension.js +1 -1
- package/package.json +11 -11
- package/packageInfo.js +1 -1
- package/services/chain-service/constants.d.ts +0 -1
- package/services/chain-service/constants.js +5 -4
- package/services/migration-service/scripts/MigrateTransactionHistoryBySymbol.d.ts +4 -0
- package/services/migration-service/scripts/MigrateTransactionHistoryBySymbol.js +54 -0
- package/services/migration-service/scripts/databases/MigrateAssetSetting.js +21 -19
- package/services/migration-service/scripts/index.js +6 -3
- package/services/subscan-service/index.d.ts +8 -1
- package/services/subscan-service/index.js +79 -18
- package/services/subscan-service/subscan-chain-map.js +3 -1
- package/services/subscan-service/types.d.ts +7 -0
- package/cjs/koni/api/nft/ordinal_nft/utils.js +0 -41
- package/koni/api/nft/ordinal_nft/utils.d.ts +0 -2
- package/koni/api/nft/ordinal_nft/utils.js +0 -33
|
@@ -131,6 +131,8 @@ export const SUBSCAN_BALANCE_CHAIN_MAP = {
|
|
|
131
131
|
vara_network: 'vara',
|
|
132
132
|
bifrost: 'bifrost',
|
|
133
133
|
creditcoin: 'creditcoin',
|
|
134
|
-
joystream: 'joystream'
|
|
134
|
+
joystream: 'joystream',
|
|
135
|
+
manta_network: 'manta',
|
|
136
|
+
continuum_network: 'continuum'
|
|
135
137
|
};
|
|
136
138
|
export const SUBSCAN_BALANCE_CHAIN_MAP_REVERSE = Object.fromEntries(Object.entries(SUBSCAN_BALANCE_CHAIN_MAP).map(([k, v]) => [v, k]));
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export interface SubscanRequest<T> {
|
|
2
2
|
id: number;
|
|
3
3
|
retry: number;
|
|
4
|
+
/** Serve smaller first */
|
|
5
|
+
ordinal: number;
|
|
4
6
|
status: 'pending' | 'running';
|
|
5
7
|
run: () => Promise<any>;
|
|
6
8
|
resolve: (value: any) => T;
|
|
@@ -51,9 +53,13 @@ export interface ExtrinsicItem {
|
|
|
51
53
|
block_timestamp: number;
|
|
52
54
|
extrinsic_index: string;
|
|
53
55
|
call_module_function: string;
|
|
56
|
+
/** Need be called from another api */
|
|
54
57
|
params: string;
|
|
58
|
+
/** Deprecated */
|
|
55
59
|
account_id: string;
|
|
60
|
+
/** Deprecated */
|
|
56
61
|
account_index: string;
|
|
62
|
+
/** Deprecated */
|
|
57
63
|
signature: string;
|
|
58
64
|
call_module: string;
|
|
59
65
|
nonce: number;
|
|
@@ -61,6 +67,7 @@ export interface ExtrinsicItem {
|
|
|
61
67
|
success: boolean;
|
|
62
68
|
fee: string;
|
|
63
69
|
fee_used: string;
|
|
70
|
+
/** Deprecated */
|
|
64
71
|
from_hex: string;
|
|
65
72
|
tip: string;
|
|
66
73
|
finalized: boolean;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.fetchRemarkEvent = exports.fetchExtrinsicParams = void 0;
|
|
7
|
-
var _constants = require("./constants");
|
|
8
|
-
// Copyright 2019-2022 @subwallet/extension-base authors & contributors
|
|
9
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
10
|
-
|
|
11
|
-
const fetchRemarkEvent = async (chain, address) => {
|
|
12
|
-
const params = {
|
|
13
|
-
..._constants.BASE_FETCH_ORDINAL_EVENT_DATA,
|
|
14
|
-
address
|
|
15
|
-
};
|
|
16
|
-
const response = await fetch(_constants.GET_EVENT_LIST_API.replace('{{chain}}', chain), {
|
|
17
|
-
method: 'POST',
|
|
18
|
-
headers: {
|
|
19
|
-
'Content-Type': 'application/json'
|
|
20
|
-
},
|
|
21
|
-
body: JSON.stringify(params)
|
|
22
|
-
});
|
|
23
|
-
const data = await response.json();
|
|
24
|
-
return data.data.events;
|
|
25
|
-
};
|
|
26
|
-
exports.fetchRemarkEvent = fetchRemarkEvent;
|
|
27
|
-
const fetchExtrinsicParams = async (chain, extrinsicIndexes) => {
|
|
28
|
-
const params = {
|
|
29
|
-
extrinsic_index: extrinsicIndexes
|
|
30
|
-
};
|
|
31
|
-
const response = await fetch(_constants.GET_EXTRINSIC_PARAMS_API.replace('{{chain}}', chain), {
|
|
32
|
-
method: 'POST',
|
|
33
|
-
headers: {
|
|
34
|
-
'Content-Type': 'application/json'
|
|
35
|
-
},
|
|
36
|
-
body: JSON.stringify(params)
|
|
37
|
-
});
|
|
38
|
-
const data = await response.json();
|
|
39
|
-
return data.data;
|
|
40
|
-
};
|
|
41
|
-
exports.fetchExtrinsicParams = fetchExtrinsicParams;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const fetchRemarkEvent: (chain: string, address: string) => Promise<import("@subwallet/extension-base/types").SubscanEventBaseItemData[]>;
|
|
2
|
-
export declare const fetchExtrinsicParams: (chain: string, extrinsicIndexes: string[]) => Promise<import("@subwallet/extension-base/types").SubscanExtrinsicParam[]>;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// Copyright 2019-2022 @subwallet/extension-base authors & contributors
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
import { BASE_FETCH_ORDINAL_EVENT_DATA, GET_EVENT_LIST_API, GET_EXTRINSIC_PARAMS_API } from "./constants.js";
|
|
5
|
-
export const fetchRemarkEvent = async (chain, address) => {
|
|
6
|
-
const params = {
|
|
7
|
-
...BASE_FETCH_ORDINAL_EVENT_DATA,
|
|
8
|
-
address
|
|
9
|
-
};
|
|
10
|
-
const response = await fetch(GET_EVENT_LIST_API.replace('{{chain}}', chain), {
|
|
11
|
-
method: 'POST',
|
|
12
|
-
headers: {
|
|
13
|
-
'Content-Type': 'application/json'
|
|
14
|
-
},
|
|
15
|
-
body: JSON.stringify(params)
|
|
16
|
-
});
|
|
17
|
-
const data = await response.json();
|
|
18
|
-
return data.data.events;
|
|
19
|
-
};
|
|
20
|
-
export const fetchExtrinsicParams = async (chain, extrinsicIndexes) => {
|
|
21
|
-
const params = {
|
|
22
|
-
extrinsic_index: extrinsicIndexes
|
|
23
|
-
};
|
|
24
|
-
const response = await fetch(GET_EXTRINSIC_PARAMS_API.replace('{{chain}}', chain), {
|
|
25
|
-
method: 'POST',
|
|
26
|
-
headers: {
|
|
27
|
-
'Content-Type': 'application/json'
|
|
28
|
-
},
|
|
29
|
-
body: JSON.stringify(params)
|
|
30
|
-
});
|
|
31
|
-
const data = await response.json();
|
|
32
|
-
return data.data;
|
|
33
|
-
};
|