@cityofzion/bs-multichain 3.0.4 → 3.0.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/BSAggregator.d.ts +1 -1
- package/dist/BSAggregator.js +4 -15
- package/dist/features/bridge/Neo3NeoXBridgeOrchestrator.d.ts +2 -2
- package/dist/features/bridge/Neo3NeoXBridgeOrchestrator.js +245 -241
- package/dist/features/bridge/types.d.ts +1 -1
- package/dist/features/swap/SimpleSwapApi.d.ts +1 -1
- package/dist/features/swap/SimpleSwapApi.js +114 -144
- package/dist/features/swap/SimpleSwapOrchestrator.d.ts +2 -2
- package/dist/features/swap/SimpleSwapOrchestrator.js +273 -295
- package/dist/features/swap/SimpleSwapService.d.ts +1 -1
- package/dist/features/swap/SimpleSwapService.js +20 -31
- package/dist/features/swap/types.d.ts +1 -1
- package/dist/features/wallet-connect/WalletKitHelper.d.ts +2 -2
- package/dist/features/wallet-connect/WalletKitHelper.js +19 -32
- package/dist/features/wallet-connect/types.d.ts +2 -2
- package/package.json +14 -17
package/dist/BSAggregator.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TBSAccount, IBlockchainService, TUntilIndexRecord } from '@cityofzion/blockchain-service';
|
|
1
|
+
import { type TBSAccount, type IBlockchainService, type TUntilIndexRecord } from '@cityofzion/blockchain-service';
|
|
2
2
|
export declare class BSAggregator<N extends string> {
|
|
3
3
|
readonly blockchainServicesByName: Record<N, IBlockchainService<N>>;
|
|
4
4
|
readonly blockchainServices: IBlockchainService<N>[];
|
package/dist/BSAggregator.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.BSAggregator = void 0;
|
|
13
4
|
const blockchain_service_1 = require("@cityofzion/blockchain-service");
|
|
@@ -40,12 +31,10 @@ class BSAggregator {
|
|
|
40
31
|
getBlockchainNameByEncrypted(keyOrJson) {
|
|
41
32
|
return this.blockchainServices.filter(bs => (0, blockchain_service_1.hasEncryption)(bs) && bs.validateEncrypted(keyOrJson)).map(bs => bs.name);
|
|
42
33
|
}
|
|
43
|
-
generateAccountsFromMnemonic(mnemonic, untilIndexByBlockchainService) {
|
|
44
|
-
return
|
|
45
|
-
return
|
|
46
|
-
|
|
47
|
-
}), untilIndexByBlockchainService);
|
|
48
|
-
});
|
|
34
|
+
async generateAccountsFromMnemonic(mnemonic, untilIndexByBlockchainService) {
|
|
35
|
+
return (0, blockchain_service_1.generateAccountForBlockchainService)(this.blockchainServices, async (service, index) => {
|
|
36
|
+
return await service.generateAccountFromMnemonic(mnemonic, index);
|
|
37
|
+
}, untilIndexByBlockchainService);
|
|
49
38
|
}
|
|
50
39
|
}
|
|
51
40
|
exports.BSAggregator = BSAggregator;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { TBSAccount, TBalanceResponse, IBridgeOrchestrator, TBridgeOrchestratorEvents, TBridgeToken } from '@cityofzion/blockchain-service';
|
|
1
|
+
import { type TBSAccount, type TBalanceResponse, type IBridgeOrchestrator, type TBridgeOrchestratorEvents, type TBridgeToken } from '@cityofzion/blockchain-service';
|
|
2
2
|
import { BSNeo3 } from '@cityofzion/bs-neo3';
|
|
3
3
|
import { BSNeoX } from '@cityofzion/bs-neox';
|
|
4
4
|
import TypedEmitter from 'typed-emitter';
|
|
5
|
-
import { TNeo3NeoXBridgeOrchestratorInitParams, TNeo3NeoXBridgeOrchestratorWaitParams } from './types';
|
|
5
|
+
import type { TNeo3NeoXBridgeOrchestratorInitParams, TNeo3NeoXBridgeOrchestratorWaitParams } from './types';
|
|
6
6
|
export declare class Neo3NeoXBridgeOrchestrator<N extends string> implements IBridgeOrchestrator<N> {
|
|
7
7
|
#private;
|
|
8
8
|
eventEmitter: TypedEmitter<TBridgeOrchestratorEvents<N>>;
|