@cityofzion/bs-neo-legacy 1.3.0 → 1.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.
@@ -14,6 +14,7 @@ export declare class BSNeoLegacy<BSCustomName extends string = string> implement
14
14
  network: Network<BSNeoLegacyNetworkId>;
15
15
  legacyNetwork: string;
16
16
  constructor(blockchainName: BSCustomName, network?: Network<BSNeoLegacyNetworkId>);
17
+ testNetwork(network: Network<BSNeoLegacyNetworkId>): Promise<void>;
17
18
  setNetwork(network: Network<BSNeoLegacyNetworkId>): void;
18
19
  validateAddress(address: string): boolean;
19
20
  validateEncrypted(key: string): boolean;
@@ -43,6 +43,12 @@ class BSNeoLegacy {
43
43
  this.bip44DerivationPath = BSNeoLegacyConstants_1.BSNeoLegacyConstants.DEFAULT_BIP44_DERIVATION_PATH;
44
44
  this.setNetwork(network);
45
45
  }
46
+ testNetwork(network) {
47
+ return __awaiter(this, void 0, void 0, function* () {
48
+ const blockchainDataServiceClone = new DoraBDSNeoLegacy_1.DoraBDSNeoLegacy(network, this.feeToken, this.claimToken, this.tokens);
49
+ yield blockchainDataServiceClone.getBlockHeight();
50
+ });
51
+ }
46
52
  setNetwork(network) {
47
53
  if (!BSNeoLegacyConstants_1.BSNeoLegacyConstants.ALL_NETWORK_IDS.includes(network.id))
48
54
  throw new Error('Custom network is not supported');
@@ -133,7 +139,7 @@ class BSNeoLegacy {
133
139
  }
134
140
  if (!response.tx)
135
141
  throw new Error('Failed to send transaction');
136
- return [response.tx.hash];
142
+ return intents.map(() => response.tx.hash);
137
143
  });
138
144
  }
139
145
  claim(account) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cityofzion/bs-neo-legacy",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "Coz",
@@ -11,7 +11,7 @@
11
11
  "dependencies": {
12
12
  "@cityofzion/dora-ts": "0.0.11",
13
13
  "@cityofzion/neon-js": "4.8.3",
14
- "@cityofzion/blockchain-service": "1.4.0",
14
+ "@cityofzion/blockchain-service": "1.6.0",
15
15
  "@cityofzion/bs-asteroid-sdk": "0.9.0"
16
16
  },
17
17
  "devDependencies": {