@cityofzion/bs-ethereum 2.8.5 → 2.9.1
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Account, LedgerService, LedgerServiceEmitter, GetLedgerTransport } from '@cityofzion/blockchain-service';
|
|
1
|
+
import { Account, LedgerService, LedgerServiceEmitter, GetLedgerTransport, UntilIndexRecord } from '@cityofzion/blockchain-service';
|
|
2
2
|
import Transport from '@ledgerhq/hw-transport';
|
|
3
3
|
import { ethers, Signer } from 'ethers';
|
|
4
4
|
import { TypedDataSigner } from '@ethersproject/abstract-signer';
|
|
@@ -17,7 +17,7 @@ export declare class EthersLedgerServiceEthereum<BSName extends string = string>
|
|
|
17
17
|
emitter: LedgerServiceEmitter;
|
|
18
18
|
getLedgerTransport?: GetLedgerTransport<BSName>;
|
|
19
19
|
constructor(blockchainService: BSEthereum<BSName>, getLedgerTransport?: GetLedgerTransport<BSName>);
|
|
20
|
-
getAccounts(transport: Transport): Promise<Account<BSName>[]>;
|
|
20
|
+
getAccounts(transport: Transport, untilIndexByBlockchainService?: UntilIndexRecord<BSName>): Promise<Account<BSName>[]>;
|
|
21
21
|
getAccount(transport: Transport, index: number): Promise<Account<BSName>>;
|
|
22
22
|
getSigner(transport: Transport, path: string, provider?: ethers.providers.Provider): EthersLedgerSigner;
|
|
23
23
|
}
|
|
@@ -166,11 +166,11 @@ class EthersLedgerServiceEthereum {
|
|
|
166
166
|
__classPrivateFieldSet(this, _EthersLedgerServiceEthereum_blockchainService, blockchainService, "f");
|
|
167
167
|
this.getLedgerTransport = getLedgerTransport;
|
|
168
168
|
}
|
|
169
|
-
getAccounts(transport) {
|
|
169
|
+
getAccounts(transport, untilIndexByBlockchainService) {
|
|
170
170
|
return __awaiter(this, void 0, void 0, function* () {
|
|
171
|
-
const accountsByBlockchainService = yield (0, blockchain_service_1.
|
|
171
|
+
const accountsByBlockchainService = yield (0, blockchain_service_1.generateAccountForBlockchainService)([__classPrivateFieldGet(this, _EthersLedgerServiceEthereum_blockchainService, "f")], (_service, index) => __awaiter(this, void 0, void 0, function* () {
|
|
172
172
|
return this.getAccount(transport, index);
|
|
173
|
-
}));
|
|
173
|
+
}), untilIndexByBlockchainService);
|
|
174
174
|
const accounts = accountsByBlockchainService.get(__classPrivateFieldGet(this, _EthersLedgerServiceEthereum_blockchainService, "f").name);
|
|
175
175
|
return accounts !== null && accounts !== void 0 ? accounts : [];
|
|
176
176
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cityofzion/bs-ethereum",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.1",
|
|
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
|
"@ledgerhq/hw-app-eth": "~6.35.7",
|
|
21
21
|
"@ethersproject/abstract-signer": "~5.7.0",
|
|
22
22
|
"@ethersproject/properties": "~5.7.0",
|
|
23
|
-
"@cityofzion/blockchain-service": "1.
|
|
23
|
+
"@cityofzion/blockchain-service": "1.15.1"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@ledgerhq/hw-transport-node-hid": "~6.28.5",
|