@cityofzion/blockchain-service 1.4.0 → 1.6.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.
@@ -39,8 +39,9 @@ export interface BlockchainService<BSCustomName extends string = string, BSAvail
39
39
  blockchainDataService: BlockchainDataService;
40
40
  tokens: Token[];
41
41
  network: Network<BSAvailableNetworks>;
42
+ testNetwork: (network: Network<BSAvailableNetworks>) => Promise<void>;
42
43
  setNetwork: (partialNetwork: Network<BSAvailableNetworks>) => void;
43
- generateAccountFromMnemonic(mnemonic: string | string, index: number): Account;
44
+ generateAccountFromMnemonic(mnemonic: string, index: number): Account;
44
45
  generateAccountFromKey(key: string): Account;
45
46
  decrypt(keyOrJson: string, password: string): Promise<Account>;
46
47
  encrypt(key: string, password: string): Promise<string>;
@@ -221,9 +222,10 @@ export type LedgerServiceEmitter = TypedEmitter<{
221
222
  getSignatureStart(): void | Promise<void>;
222
223
  getSignatureEnd(): void | Promise<void>;
223
224
  }>;
225
+ export type GetLedgerTransport = (account: Account) => Promise<Transport>;
224
226
  export interface LedgerService {
225
227
  emitter: LedgerServiceEmitter;
226
- getLedgerTransport?: (account: Account) => Promise<Transport>;
228
+ getLedgerTransport?: GetLedgerTransport;
227
229
  getAccounts(transport: Transport): Promise<Account[]>;
228
230
  getAccount(transport: Transport, index: number): Promise<Account>;
229
231
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cityofzion/blockchain-service",
3
- "version": "1.4.0",
3
+ "version": "1.6.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "repository": "https://github.com/CityOfZion/blockchain-services",