@cityofzion/bs-neo3 1.10.5 → 1.10.6
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/BSNeo3.d.ts +1 -0
- package/dist/BSNeo3.js +1 -0
- package/dist/constants/BSNeo3Constants.d.ts +1 -0
- package/dist/constants/BSNeo3Constants.js +2 -0
- package/dist/helpers/BSNeo3Helper.d.ts +6 -1
- package/dist/helpers/BSNeo3Helper.js +2 -2
- package/package.json +2 -2
- /package/dist/assets/tokens/{common.json → native.json} +0 -0
package/dist/BSNeo3.d.ts
CHANGED
package/dist/BSNeo3.js
CHANGED
|
@@ -186,6 +186,7 @@ class BSNeo3 {
|
|
|
186
186
|
exports.BSNeo3 = BSNeo3;
|
|
187
187
|
_BSNeo3_instances = new WeakSet(), _BSNeo3_setTokens = function _BSNeo3_setTokens(network) {
|
|
188
188
|
const tokens = BSNeo3Helper_1.BSNeo3Helper.getTokens(network);
|
|
189
|
+
this.nativeTokens = BSNeo3Constants_1.BSNeo3Constants.NATIVE_ASSETS;
|
|
189
190
|
this.tokens = tokens;
|
|
190
191
|
this.feeToken = tokens.find(token => token.symbol === 'GAS');
|
|
191
192
|
this.burnToken = tokens.find(token => token.symbol === 'NEO');
|
|
@@ -6,6 +6,7 @@ var _a;
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.BSNeo3Constants = void 0;
|
|
8
8
|
const mainnet_json_1 = __importDefault(require("../assets/tokens/mainnet.json"));
|
|
9
|
+
const native_json_1 = __importDefault(require("../assets/tokens/native.json"));
|
|
9
10
|
class BSNeo3Constants {
|
|
10
11
|
}
|
|
11
12
|
exports.BSNeo3Constants = BSNeo3Constants;
|
|
@@ -57,3 +58,4 @@ BSNeo3Constants.ALL_NETWORKS = [..._a.MAINNET_NETWORKS, ..._a.TESTNET_NETWORKS];
|
|
|
57
58
|
BSNeo3Constants.DEFAULT_NETWORK = _a.MAINNET_NETWORKS[0];
|
|
58
59
|
BSNeo3Constants.NEO_NS_HASH = '0x50ac1c37690cc2cfc594472833cf57505d5f46de';
|
|
59
60
|
BSNeo3Constants.DEFAULT_BIP44_DERIVATION_PATH = "m/44'/888'/0'/0/?";
|
|
61
|
+
BSNeo3Constants.NATIVE_ASSETS = native_json_1.default;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { Network } from '@cityofzion/blockchain-service';
|
|
2
2
|
import { BSNeo3NetworkId } from '../constants/BSNeo3Constants';
|
|
3
3
|
export declare class BSNeo3Helper {
|
|
4
|
-
static getTokens(network: Network<BSNeo3NetworkId>):
|
|
4
|
+
static getTokens(network: Network<BSNeo3NetworkId>): {
|
|
5
|
+
symbol: string;
|
|
6
|
+
name: string;
|
|
7
|
+
hash: string;
|
|
8
|
+
decimals: number;
|
|
9
|
+
}[];
|
|
5
10
|
static getRpcList(network: Network<BSNeo3NetworkId>): string[];
|
|
6
11
|
static isMainnet(network: Network<BSNeo3NetworkId>): boolean;
|
|
7
12
|
static isCustomNet(network: Network<BSNeo3NetworkId>): boolean;
|
|
@@ -4,13 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.BSNeo3Helper = void 0;
|
|
7
|
-
const
|
|
7
|
+
const native_json_1 = __importDefault(require("../assets/tokens/native.json"));
|
|
8
8
|
const BSNeo3Constants_1 = require("../constants/BSNeo3Constants");
|
|
9
9
|
class BSNeo3Helper {
|
|
10
10
|
static getTokens(network) {
|
|
11
11
|
var _a;
|
|
12
12
|
const extraTokens = (_a = BSNeo3Constants_1.BSNeo3Constants.EXTRA_TOKENS_BY_NETWORK_ID[network.id]) !== null && _a !== void 0 ? _a : [];
|
|
13
|
-
return [...extraTokens, ...
|
|
13
|
+
return [...extraTokens, ...native_json_1.default];
|
|
14
14
|
}
|
|
15
15
|
static getRpcList(network) {
|
|
16
16
|
var _a;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cityofzion/bs-neo3",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.6",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"repository": "https://github.com/CityOfZion/blockchain-services",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"bignumber.js": "^9.1.2",
|
|
21
21
|
"isomorphic-ws": "^5.0.0",
|
|
22
22
|
"lodash.clonedeep": "^4.5.0",
|
|
23
|
-
"@cityofzion/blockchain-service": "1.16.
|
|
23
|
+
"@cityofzion/blockchain-service": "1.16.1",
|
|
24
24
|
"@cityofzion/bs-asteroid-sdk": "0.9.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
File without changes
|