@pioneer-platform/pioneer-types 8.4.0 → 8.5.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/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @pioneer-platform/pioneer-types
2
2
 
3
+ ## 8.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Automated minor version bump for all packages
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @pioneer-platform/pioneer-types@8.5.0
13
+
14
+ ## 8.4.1
15
+
16
+ ### Patch Changes
17
+
18
+ - Automated patch version bump for all packages
19
+ - Updated dependencies
20
+ - @pioneer-platform/pioneer-types@8.4.1
21
+
3
22
  ## 8.4.0
4
23
 
5
24
  ### Minor Changes
package/lib/pioneer.d.ts CHANGED
@@ -350,3 +350,45 @@ export interface SendToAddress {
350
350
  memo?: string;
351
351
  noBroadcast?: boolean;
352
352
  }
353
+ export declare enum Chain {
354
+ Arbitrum = "ARB",
355
+ Avalanche = "AVAX",
356
+ Base = "BASE",
357
+ BinanceSmartChain = "BSC",
358
+ Bitcoin = "BTC",
359
+ BitcoinCash = "BCH",
360
+ Cosmos = "GAIA",
361
+ Dash = "DASH",
362
+ Digibyte = "DGB",
363
+ Dogecoin = "DOGE",
364
+ EOS = "EOS",
365
+ Ethereum = "ETH",
366
+ Kujira = "KUJI",
367
+ Litecoin = "LTC",
368
+ Mayachain = "MAYA",
369
+ Optimism = "OP",
370
+ Osmosis = "OSMO",
371
+ Polygon = "MATIC",
372
+ Ripple = "XRP",
373
+ THORChain = "THOR",
374
+ Zcash = "ZEC"
375
+ }
376
+ export declare function getChainEnumValue(chainStr: string): Chain;
377
+ export declare enum WalletOption {
378
+ 'KEYSTORE' = "KEYSTORE",
379
+ 'KEEPKEY' = "KEEPKEY",
380
+ 'XDEFI' = "XDEFI",
381
+ 'METAMASK' = "METAMASK",
382
+ 'METAMASK_SHAPESHIFT' = "METAMASK_SHAPESHIFT",
383
+ 'COINBASE_WEB' = "COINBASE_WEB",
384
+ 'TREZOR' = "TREZOR",
385
+ 'TRUSTWALLET_WEB' = "TRUSTWALLET_WEB",
386
+ 'LEDGER' = "LEDGER",
387
+ 'KEPLR' = "KEPLR",
388
+ 'OKX' = "OKX",
389
+ 'BRAVE' = "BRAVE",
390
+ 'WALLETCONNECT' = "WALLETCONNECT"
391
+ }
392
+ export type EVMWalletOptions = WalletOption.BRAVE | WalletOption.METAMASK | WalletOption.TRUSTWALLET_WEB | WalletOption.COINBASE_WEB;
393
+ export declare const EVMChainList: Chain[];
394
+ export declare const availableChainsByWallet: any;
package/lib/pioneer.js CHANGED
@@ -3,8 +3,10 @@
3
3
  Pioneer Types
4
4
 
5
5
  */
6
+ var _a;
6
7
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.HDWALLETS = void 0;
8
+ exports.availableChainsByWallet = exports.EVMChainList = exports.WalletOption = exports.Chain = exports.HDWALLETS = void 0;
9
+ exports.getChainEnumValue = getChainEnumValue;
8
10
  var HDWALLETS;
9
11
  (function (HDWALLETS) {
10
12
  HDWALLETS[HDWALLETS["pioneer"] = 0] = "pioneer";
@@ -13,3 +15,210 @@ var HDWALLETS;
13
15
  HDWALLETS[HDWALLETS["ledger"] = 3] = "ledger";
14
16
  HDWALLETS[HDWALLETS["metamask"] = 4] = "metamask";
15
17
  })(HDWALLETS || (exports.HDWALLETS = HDWALLETS = {}));
18
+ // Chain and Wallet types
19
+ var Chain;
20
+ (function (Chain) {
21
+ Chain["Arbitrum"] = "ARB";
22
+ Chain["Avalanche"] = "AVAX";
23
+ Chain["Base"] = "BASE";
24
+ Chain["BinanceSmartChain"] = "BSC";
25
+ Chain["Bitcoin"] = "BTC";
26
+ Chain["BitcoinCash"] = "BCH";
27
+ Chain["Cosmos"] = "GAIA";
28
+ Chain["Dash"] = "DASH";
29
+ Chain["Digibyte"] = "DGB";
30
+ Chain["Dogecoin"] = "DOGE";
31
+ Chain["EOS"] = "EOS";
32
+ Chain["Ethereum"] = "ETH";
33
+ Chain["Kujira"] = "KUJI";
34
+ Chain["Litecoin"] = "LTC";
35
+ Chain["Mayachain"] = "MAYA";
36
+ Chain["Optimism"] = "OP";
37
+ Chain["Osmosis"] = "OSMO";
38
+ Chain["Polygon"] = "MATIC";
39
+ Chain["Ripple"] = "XRP";
40
+ Chain["THORChain"] = "THOR";
41
+ Chain["Zcash"] = "ZEC";
42
+ })(Chain || (exports.Chain = Chain = {}));
43
+ function getChainEnumValue(chainStr) {
44
+ switch (chainStr) {
45
+ case 'ARB':
46
+ return Chain.Arbitrum;
47
+ case 'AVAX':
48
+ return Chain.Avalanche;
49
+ case 'BASE':
50
+ return Chain.Base;
51
+ case 'BSC':
52
+ return Chain.BinanceSmartChain;
53
+ case 'BTC':
54
+ return Chain.Bitcoin;
55
+ case 'BCH':
56
+ return Chain.BitcoinCash;
57
+ case 'GAIA':
58
+ return Chain.Cosmos;
59
+ case 'DASH':
60
+ return Chain.Dash;
61
+ case 'DGB':
62
+ return Chain.Digibyte;
63
+ case 'DOGE':
64
+ return Chain.Dogecoin;
65
+ case 'EOS':
66
+ return Chain.EOS;
67
+ case 'ETH':
68
+ return Chain.Ethereum;
69
+ case 'KUJI':
70
+ return Chain.Kujira;
71
+ case 'LTC':
72
+ return Chain.Litecoin;
73
+ case 'MAYA':
74
+ return Chain.Mayachain;
75
+ case 'OP':
76
+ return Chain.Optimism;
77
+ case 'OSMO':
78
+ return Chain.Osmosis;
79
+ case 'MATIC':
80
+ return Chain.Polygon;
81
+ case 'XRP':
82
+ return Chain.Ripple;
83
+ case 'THOR':
84
+ return Chain.THORChain;
85
+ case 'ZEC':
86
+ return Chain.Zcash;
87
+ default:
88
+ throw new Error("Unknown chain string: ".concat(chainStr));
89
+ }
90
+ }
91
+ var WalletOption;
92
+ (function (WalletOption) {
93
+ WalletOption["KEYSTORE"] = "KEYSTORE";
94
+ WalletOption["KEEPKEY"] = "KEEPKEY";
95
+ WalletOption["XDEFI"] = "XDEFI";
96
+ WalletOption["METAMASK"] = "METAMASK";
97
+ WalletOption["METAMASK_SHAPESHIFT"] = "METAMASK_SHAPESHIFT";
98
+ WalletOption["COINBASE_WEB"] = "COINBASE_WEB";
99
+ WalletOption["TREZOR"] = "TREZOR";
100
+ WalletOption["TRUSTWALLET_WEB"] = "TRUSTWALLET_WEB";
101
+ WalletOption["LEDGER"] = "LEDGER";
102
+ WalletOption["KEPLR"] = "KEPLR";
103
+ WalletOption["OKX"] = "OKX";
104
+ WalletOption["BRAVE"] = "BRAVE";
105
+ WalletOption["WALLETCONNECT"] = "WALLETCONNECT";
106
+ })(WalletOption || (exports.WalletOption = WalletOption = {}));
107
+ // EVM chains list
108
+ exports.EVMChainList = [
109
+ Chain.Arbitrum,
110
+ Chain.Avalanche,
111
+ Chain.Base,
112
+ Chain.BinanceSmartChain,
113
+ Chain.Ethereum,
114
+ Chain.Optimism,
115
+ Chain.Polygon,
116
+ ];
117
+ // Support Array
118
+ var AllChainsSupported = [
119
+ Chain.Arbitrum,
120
+ Chain.Avalanche,
121
+ Chain.BinanceSmartChain,
122
+ Chain.Bitcoin,
123
+ Chain.BitcoinCash,
124
+ Chain.Cosmos,
125
+ Chain.Osmosis,
126
+ Chain.Ripple,
127
+ Chain.Dogecoin,
128
+ Chain.Dash,
129
+ Chain.Ethereum,
130
+ Chain.Litecoin,
131
+ Chain.Optimism,
132
+ Chain.Polygon,
133
+ Chain.THORChain,
134
+ ];
135
+ exports.availableChainsByWallet = (_a = {},
136
+ _a[WalletOption.BRAVE] = exports.EVMChainList,
137
+ _a[WalletOption.COINBASE_WEB] = exports.EVMChainList,
138
+ _a[WalletOption.KEPLR] = [Chain.Cosmos],
139
+ _a[WalletOption.KEYSTORE] = [
140
+ Chain.Arbitrum,
141
+ Chain.Base,
142
+ Chain.Avalanche,
143
+ Chain.BinanceSmartChain,
144
+ Chain.Bitcoin,
145
+ Chain.BitcoinCash,
146
+ Chain.Cosmos,
147
+ Chain.Dogecoin,
148
+ Chain.Ethereum,
149
+ Chain.Litecoin,
150
+ Chain.Optimism,
151
+ Chain.Polygon,
152
+ Chain.THORChain,
153
+ ],
154
+ _a[WalletOption.LEDGER] = AllChainsSupported,
155
+ _a[WalletOption.TREZOR] = [
156
+ Chain.Bitcoin,
157
+ Chain.BitcoinCash,
158
+ Chain.Litecoin,
159
+ Chain.Dogecoin,
160
+ Chain.Ethereum,
161
+ ],
162
+ _a[WalletOption.KEEPKEY] = [
163
+ Chain.Arbitrum,
164
+ Chain.Avalanche,
165
+ Chain.Base,
166
+ Chain.BinanceSmartChain,
167
+ Chain.Bitcoin,
168
+ Chain.BitcoinCash,
169
+ Chain.Cosmos,
170
+ Chain.Osmosis,
171
+ Chain.Ripple,
172
+ Chain.Dogecoin,
173
+ Chain.Dash,
174
+ Chain.Mayachain,
175
+ Chain.Ethereum,
176
+ Chain.Litecoin,
177
+ Chain.Optimism,
178
+ Chain.Polygon,
179
+ Chain.THORChain,
180
+ ],
181
+ _a[WalletOption.METAMASK_SHAPESHIFT] = [
182
+ Chain.Arbitrum,
183
+ Chain.Avalanche,
184
+ Chain.BinanceSmartChain,
185
+ Chain.Bitcoin,
186
+ Chain.BitcoinCash,
187
+ Chain.Cosmos,
188
+ Chain.Dogecoin,
189
+ Chain.Ethereum,
190
+ Chain.Litecoin,
191
+ Chain.Optimism,
192
+ Chain.Polygon,
193
+ Chain.THORChain,
194
+ ],
195
+ _a[WalletOption.METAMASK] = exports.EVMChainList,
196
+ _a[WalletOption.TRUSTWALLET_WEB] = exports.EVMChainList,
197
+ _a[WalletOption.XDEFI] = [
198
+ Chain.Arbitrum,
199
+ Chain.Avalanche,
200
+ Chain.BinanceSmartChain,
201
+ Chain.Bitcoin,
202
+ Chain.BitcoinCash,
203
+ Chain.Cosmos,
204
+ Chain.Ripple,
205
+ Chain.Dogecoin,
206
+ Chain.Ethereum,
207
+ Chain.Litecoin,
208
+ Chain.Optimism,
209
+ Chain.Polygon,
210
+ Chain.THORChain,
211
+ ],
212
+ _a[WalletOption.WALLETCONNECT] = [
213
+ Chain.Ethereum,
214
+ // Chain.BinanceSmartChain,
215
+ // Chain.Avalanche,
216
+ ],
217
+ _a[WalletOption.OKX] = [
218
+ Chain.Ethereum,
219
+ Chain.Avalanche,
220
+ Chain.BinanceSmartChain,
221
+ Chain.Bitcoin,
222
+ Chain.Cosmos,
223
+ ],
224
+ _a);
package/package.json CHANGED
@@ -1,18 +1,8 @@
1
1
  {
2
2
  "name": "@pioneer-platform/pioneer-types",
3
- "version": "8.4.0",
3
+ "version": "8.5.0",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
- "dependencies": {
7
- "@pioneer-platform/pioneer-types": "^8.4.0"
8
- },
9
- "devDependencies": {
10
- "@types/jest": "^25.2.3",
11
- "@types/node": "^18.16.0",
12
- "@types/source-map-support": "^0.5.3",
13
- "typescript": "^5.0.4"
14
- },
15
- "gitHead": "aeae28273014ab69b42f22abec159c6693a56c40",
16
6
  "scripts": {
17
7
  "npm": "pnpm i",
18
8
  "npm-update": "pnpm update",
@@ -28,5 +18,15 @@
28
18
  "test:watch": "jest --coverage --watchAll",
29
19
  "view:coverage": "serve coverage/lcov-report",
30
20
  "clean": "rm -rf coverage src/**/*.js src/**/*.map lib node_modules"
31
- }
21
+ },
22
+ "dependencies": {
23
+ "@pioneer-platform/pioneer-types": "^8.5.0"
24
+ },
25
+ "devDependencies": {
26
+ "@types/jest": "^25.2.3",
27
+ "@types/node": "^18.16.0",
28
+ "@types/source-map-support": "^0.5.3",
29
+ "typescript": "^5.0.4"
30
+ },
31
+ "gitHead": "aeae28273014ab69b42f22abec159c6693a56c40"
32
32
  }