@sentio/sdk 0.1.12 → 0.1.13
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/dist/chainmap.d.ts +82 -0
- package/dist/chainmap.js +96 -0
- package/dist/chainmap.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export declare const CHAIN_MAP: {
|
|
2
|
+
'SOL:mainnet': string;
|
|
3
|
+
'SOL:devnet': string;
|
|
4
|
+
'SOL:testnet': string;
|
|
5
|
+
0: string;
|
|
6
|
+
1: string;
|
|
7
|
+
2: string;
|
|
8
|
+
3: string;
|
|
9
|
+
4: string;
|
|
10
|
+
5: string;
|
|
11
|
+
6: string;
|
|
12
|
+
8: string;
|
|
13
|
+
10: string;
|
|
14
|
+
19: string;
|
|
15
|
+
20: string;
|
|
16
|
+
25: string;
|
|
17
|
+
30: string;
|
|
18
|
+
40: string;
|
|
19
|
+
50: string;
|
|
20
|
+
52: string;
|
|
21
|
+
55: string;
|
|
22
|
+
56: string;
|
|
23
|
+
57: string;
|
|
24
|
+
60: string;
|
|
25
|
+
61: string;
|
|
26
|
+
63: string;
|
|
27
|
+
66: string;
|
|
28
|
+
70: string;
|
|
29
|
+
82: string;
|
|
30
|
+
88: string;
|
|
31
|
+
100: string;
|
|
32
|
+
106: string;
|
|
33
|
+
108: string;
|
|
34
|
+
122: string;
|
|
35
|
+
128: string;
|
|
36
|
+
137: string;
|
|
37
|
+
200: string;
|
|
38
|
+
212: string;
|
|
39
|
+
246: string;
|
|
40
|
+
250: string;
|
|
41
|
+
269: string;
|
|
42
|
+
288: string;
|
|
43
|
+
321: string;
|
|
44
|
+
336: string;
|
|
45
|
+
361: string;
|
|
46
|
+
416: string;
|
|
47
|
+
534: string;
|
|
48
|
+
592: string;
|
|
49
|
+
820: string;
|
|
50
|
+
888: string;
|
|
51
|
+
1088: string;
|
|
52
|
+
1246: string;
|
|
53
|
+
1284: string;
|
|
54
|
+
1285: string;
|
|
55
|
+
2018: string;
|
|
56
|
+
2020: string;
|
|
57
|
+
2222: string;
|
|
58
|
+
2612: string;
|
|
59
|
+
4181: string;
|
|
60
|
+
4689: string;
|
|
61
|
+
5050: string;
|
|
62
|
+
5551: string;
|
|
63
|
+
7777: string;
|
|
64
|
+
8217: string;
|
|
65
|
+
9001: string;
|
|
66
|
+
10000: string;
|
|
67
|
+
103090: string;
|
|
68
|
+
32659: string;
|
|
69
|
+
42161: string;
|
|
70
|
+
42220: string;
|
|
71
|
+
42262: string;
|
|
72
|
+
43114: string;
|
|
73
|
+
71402: string;
|
|
74
|
+
200625: string;
|
|
75
|
+
333999: string;
|
|
76
|
+
11155111: string;
|
|
77
|
+
1313161554: string;
|
|
78
|
+
1666600000: string;
|
|
79
|
+
11297108109: string;
|
|
80
|
+
836542336838601: string;
|
|
81
|
+
};
|
|
82
|
+
export declare function getChainName(chainId: string): string;
|
package/dist/chainmap.js
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// copy from https://github.com/DefiLlama/chainlist/blob/main/constants/chainIds.js
|
|
3
|
+
// and https://besu.hyperledger.org/en/stable/Concepts/NetworkID-And-ChainID/
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.getChainName = exports.CHAIN_MAP = void 0;
|
|
6
|
+
exports.CHAIN_MAP = {
|
|
7
|
+
'SOL:mainnet': 'solana',
|
|
8
|
+
'SOL:devnet': 'solana-dev',
|
|
9
|
+
'SOL:testnet': 'solana-test',
|
|
10
|
+
0: 'kardia',
|
|
11
|
+
1: 'ethereum',
|
|
12
|
+
2: 'expanse',
|
|
13
|
+
3: 'ropsten',
|
|
14
|
+
4: 'rinkeby',
|
|
15
|
+
5: 'goerli',
|
|
16
|
+
6: 'kotti',
|
|
17
|
+
8: 'ubiq',
|
|
18
|
+
10: 'optimism',
|
|
19
|
+
19: 'songbird',
|
|
20
|
+
20: 'elastos',
|
|
21
|
+
25: 'cronos',
|
|
22
|
+
30: 'rsk',
|
|
23
|
+
40: 'telos',
|
|
24
|
+
50: 'xdc',
|
|
25
|
+
52: 'csc',
|
|
26
|
+
55: 'zyx',
|
|
27
|
+
56: 'binance',
|
|
28
|
+
57: 'syscoin',
|
|
29
|
+
60: 'gochain',
|
|
30
|
+
61: 'ethclassic',
|
|
31
|
+
63: 'mordor',
|
|
32
|
+
66: 'okexchain',
|
|
33
|
+
70: 'hoo',
|
|
34
|
+
82: 'meter',
|
|
35
|
+
88: 'tomochain',
|
|
36
|
+
100: 'xdai',
|
|
37
|
+
106: 'velas',
|
|
38
|
+
108: 'thundercore',
|
|
39
|
+
122: 'fuse',
|
|
40
|
+
128: 'heco',
|
|
41
|
+
137: 'polygon',
|
|
42
|
+
200: 'xdaiarb',
|
|
43
|
+
212: 'astor',
|
|
44
|
+
246: 'energyweb',
|
|
45
|
+
250: 'fantom',
|
|
46
|
+
269: 'hpb',
|
|
47
|
+
288: 'boba',
|
|
48
|
+
321: 'kucoin',
|
|
49
|
+
336: 'shiden',
|
|
50
|
+
361: 'theta',
|
|
51
|
+
416: 'sx',
|
|
52
|
+
534: 'candle',
|
|
53
|
+
592: 'astar',
|
|
54
|
+
820: 'callisto',
|
|
55
|
+
888: 'wanchain',
|
|
56
|
+
1088: 'metis',
|
|
57
|
+
1246: 'omchain',
|
|
58
|
+
1284: 'moonbeam',
|
|
59
|
+
1285: 'moonriver',
|
|
60
|
+
2018: 'dev',
|
|
61
|
+
2020: 'ronin',
|
|
62
|
+
2222: 'kava',
|
|
63
|
+
2612: 'ezchain',
|
|
64
|
+
4181: 'phi',
|
|
65
|
+
4689: 'iotex',
|
|
66
|
+
5050: 'xlc',
|
|
67
|
+
5551: 'nahmii',
|
|
68
|
+
7777: 'nmactest',
|
|
69
|
+
8217: 'klaytn',
|
|
70
|
+
9001: 'evmos',
|
|
71
|
+
10000: 'smartbch',
|
|
72
|
+
103090: 'crystaleum',
|
|
73
|
+
32659: 'fusion',
|
|
74
|
+
42161: 'arbitrum',
|
|
75
|
+
42220: 'celo',
|
|
76
|
+
42262: 'oasis',
|
|
77
|
+
43114: 'avalanche',
|
|
78
|
+
71402: 'godwoken',
|
|
79
|
+
200625: 'akroma',
|
|
80
|
+
333999: 'polis',
|
|
81
|
+
11155111: 'sepolia',
|
|
82
|
+
1313161554: 'aurora',
|
|
83
|
+
1666600000: 'harmony',
|
|
84
|
+
11297108109: 'palm',
|
|
85
|
+
836542336838601: 'curio',
|
|
86
|
+
};
|
|
87
|
+
function getChainName(chainId) {
|
|
88
|
+
// @ts-ignore
|
|
89
|
+
const name = exports.CHAIN_MAP[chainId];
|
|
90
|
+
if (name) {
|
|
91
|
+
return name;
|
|
92
|
+
}
|
|
93
|
+
return chainId;
|
|
94
|
+
}
|
|
95
|
+
exports.getChainName = getChainName;
|
|
96
|
+
//# sourceMappingURL=chainmap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chainmap.js","sourceRoot":"","sources":["../src/chainmap.ts"],"names":[],"mappings":";AAAA,mFAAmF;AACnF,6EAA6E;;;AAEhE,QAAA,SAAS,GAAG;IACvB,aAAa,EAAE,QAAQ;IACvB,YAAY,EAAE,YAAY;IAC1B,aAAa,EAAE,aAAa;IAC5B,CAAC,EAAE,QAAQ;IACX,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,SAAS;IACZ,CAAC,EAAE,SAAS;IACZ,CAAC,EAAE,SAAS;IACZ,CAAC,EAAE,QAAQ;IACX,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,MAAM;IACT,EAAE,EAAE,UAAU;IACd,EAAE,EAAE,UAAU;IACd,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,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AM,EAAE,QAAQ;IAChB,MAAM,EAAE,OAAO;IACf,QAAQ,EAAE,SAAS;IACnB,UAAU,EAAE,QAAQ;IACpB,UAAU,EAAE,SAAS;IACrB,WAAW,EAAE,MAAM;IACnB,eAAe,EAAE,OAAO;CACzB,CAAA;AAED,SAAgB,YAAY,CAAC,OAAe;IAC1C,aAAa;IACb,MAAM,IAAI,GAAG,iBAAS,CAAC,OAAO,CAAC,CAAA;IAC/B,IAAI,IAAI,EAAE;QACR,OAAO,IAAI,CAAA;KACZ;IACD,OAAO,OAAO,CAAA;AAChB,CAAC;AAPD,oCAOC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,4 +5,5 @@ export { Counter, Meter, Histogram } from './meter';
|
|
|
5
5
|
export { getProvider, setProvider, DummyProvider } from './provider';
|
|
6
6
|
export { SolanaBaseProcessor } from './solana-processor';
|
|
7
7
|
export { ContractNamer } from './contract-namer';
|
|
8
|
+
export { getChainName } from './chainmap';
|
|
8
9
|
export * from './gen/processor/protos/processor';
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.ContractNamer = exports.SolanaBaseProcessor = exports.DummyProvider = exports.setProvider = exports.getProvider = exports.Histogram = exports.Meter = exports.Counter = exports.ProcessorServiceImpl = exports.SolanaContext = exports.ContractWrapper = exports.Context = exports.BaseProcessor = void 0;
|
|
17
|
+
exports.getChainName = exports.ContractNamer = exports.SolanaBaseProcessor = exports.DummyProvider = exports.setProvider = exports.getProvider = exports.Histogram = exports.Meter = exports.Counter = exports.ProcessorServiceImpl = exports.SolanaContext = exports.ContractWrapper = exports.Context = exports.BaseProcessor = void 0;
|
|
18
18
|
var base_processor_1 = require("./base-processor");
|
|
19
19
|
Object.defineProperty(exports, "BaseProcessor", { enumerable: true, get: function () { return base_processor_1.BaseProcessor; } });
|
|
20
20
|
var context_1 = require("./context");
|
|
@@ -35,5 +35,7 @@ var solana_processor_1 = require("./solana-processor");
|
|
|
35
35
|
Object.defineProperty(exports, "SolanaBaseProcessor", { enumerable: true, get: function () { return solana_processor_1.SolanaBaseProcessor; } });
|
|
36
36
|
var contract_namer_1 = require("./contract-namer");
|
|
37
37
|
Object.defineProperty(exports, "ContractNamer", { enumerable: true, get: function () { return contract_namer_1.ContractNamer; } });
|
|
38
|
+
var chainmap_1 = require("./chainmap");
|
|
39
|
+
Object.defineProperty(exports, "getChainName", { enumerable: true, get: function () { return chainmap_1.getChainName; } });
|
|
38
40
|
__exportStar(require("./gen/processor/protos/processor"), exports);
|
|
39
41
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mDAAgD;AAAvC,+GAAA,aAAa,OAAA;AACtB,qCAAmE;AAA1D,kGAAA,OAAO,OAAA;AAAE,0GAAA,eAAe,OAAA;AAAE,wGAAA,aAAa,OAAA;AAChD,qCAAgD;AAAvC,+GAAA,oBAAoB,OAAA;AAC7B,iCAAmD;AAA1C,gGAAA,OAAO,OAAA;AAAE,8FAAA,KAAK,OAAA;AAAE,kGAAA,SAAS,OAAA;AAClC,uCAAoE;AAA3D,uGAAA,WAAW,OAAA;AAAE,uGAAA,WAAW,OAAA;AAAE,yGAAA,aAAa,OAAA;AAChD,uDAAwD;AAA/C,uHAAA,mBAAmB,OAAA;AAC5B,mDAAgD;AAAvC,+GAAA,aAAa,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mDAAgD;AAAvC,+GAAA,aAAa,OAAA;AACtB,qCAAmE;AAA1D,kGAAA,OAAO,OAAA;AAAE,0GAAA,eAAe,OAAA;AAAE,wGAAA,aAAa,OAAA;AAChD,qCAAgD;AAAvC,+GAAA,oBAAoB,OAAA;AAC7B,iCAAmD;AAA1C,gGAAA,OAAO,OAAA;AAAE,8FAAA,KAAK,OAAA;AAAE,kGAAA,SAAS,OAAA;AAClC,uCAAoE;AAA3D,uGAAA,WAAW,OAAA;AAAE,uGAAA,WAAW,OAAA;AAAE,yGAAA,aAAa,OAAA;AAChD,uDAAwD;AAA/C,uHAAA,mBAAmB,OAAA;AAC5B,mDAAgD;AAAvC,+GAAA,aAAa,OAAA;AACtB,uCAAyC;AAAhC,wGAAA,YAAY,OAAA;AAErB,mEAAgD"}
|
package/package.json
CHANGED
|
@@ -18,12 +18,13 @@
|
|
|
18
18
|
"processor": "./dist/processor.js",
|
|
19
19
|
"sentio": "./dist/cli/cli.js"
|
|
20
20
|
},
|
|
21
|
-
"version": "0.1.
|
|
21
|
+
"version": "0.1.13",
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@ethersproject/providers": "^5.6.7",
|
|
24
24
|
"@project-serum/anchor": "^0.25.0",
|
|
25
25
|
"@solana/web3.js": "^1.47.3",
|
|
26
26
|
"@typechain/ethers-v5": "^10.0.0",
|
|
27
|
+
"@types/node-fetch": "^2.6.2",
|
|
27
28
|
"bn.js": "^5.2.1",
|
|
28
29
|
"bs58": "^5.0.0",
|
|
29
30
|
"command-line-args": "^5.2.1",
|
|
@@ -54,7 +55,6 @@
|
|
|
54
55
|
"@types/mkdirp": "^1.0.2",
|
|
55
56
|
"@types/mocha": "^9.1.1",
|
|
56
57
|
"@types/node": "^18.0.4",
|
|
57
|
-
"@types/node-fetch": "^2.6.2",
|
|
58
58
|
"chai": "^4.3.6",
|
|
59
59
|
"mocha": "^10.0.0",
|
|
60
60
|
"ts-mocha": "^10.0.0",
|