@cityofzion/bs-neo3 1.9.1 → 1.10.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.
@@ -8,6 +8,6 @@ export declare class NeonDappKitLedgerServiceNeo3<BSName extends string = string
8
8
  getLedgerTransport?: GetLedgerTransport<BSName>;
9
9
  constructor(blockchainService: BSNeo3<BSName>, getLedgerTransport?: GetLedgerTransport<BSName>);
10
10
  getAccount(transport: Transport, index: number): Promise<Account<BSName>>;
11
- getAccounts(transport: Transport): Promise<Account<BSName>[]>;
11
+ getAccounts(transport: Transport, untilIndex?: number): Promise<Account<BSName>[]>;
12
12
  getSigningCallback(transport: Transport, account: Account): api.SigningFunction;
13
13
  }
@@ -68,11 +68,19 @@ class NeonDappKitLedgerServiceNeo3 {
68
68
  };
69
69
  });
70
70
  }
71
- getAccounts(transport) {
71
+ getAccounts(transport, untilIndex) {
72
72
  return __awaiter(this, void 0, void 0, function* () {
73
- const accountsByBlockchainService = yield (0, blockchain_service_1.fetchAccountsForBlockchainServices)([__classPrivateFieldGet(this, _NeonDappKitLedgerServiceNeo3_blockchainService, "f")], (_service, index) => __awaiter(this, void 0, void 0, function* () {
74
- return this.getAccount(transport, index);
75
- }));
73
+ let accountsByBlockchainService;
74
+ if (untilIndex === undefined) {
75
+ accountsByBlockchainService = yield (0, blockchain_service_1.fetchAccountsForBlockchainServices)([__classPrivateFieldGet(this, _NeonDappKitLedgerServiceNeo3_blockchainService, "f")], (_service, index) => __awaiter(this, void 0, void 0, function* () {
76
+ return this.getAccount(transport, index);
77
+ }));
78
+ }
79
+ else {
80
+ accountsByBlockchainService = yield (0, blockchain_service_1.generateAccountUntilIndexForBlockchainService)([__classPrivateFieldGet(this, _NeonDappKitLedgerServiceNeo3_blockchainService, "f")], untilIndex, (_service, index) => __awaiter(this, void 0, void 0, function* () {
81
+ return this.getAccount(transport, index);
82
+ }));
83
+ }
76
84
  const accounts = accountsByBlockchainService.get(__classPrivateFieldGet(this, _NeonDappKitLedgerServiceNeo3_blockchainService, "f").name);
77
85
  return accounts !== null && accounts !== void 0 ? accounts : [];
78
86
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cityofzion/bs-neo3",
3
- "version": "1.9.1",
3
+ "version": "1.10.0",
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.13.3",
23
+ "@cityofzion/blockchain-service": "1.15.0",
24
24
  "@cityofzion/bs-asteroid-sdk": "0.9.0"
25
25
  },
26
26
  "devDependencies": {