Wallet Generator

This class enable us to generate wallet addresses.

Initialization

const walletGenerator = await broker.walletGenerator()
  • topicIn : array[string] - default=[topic-wallet-generator] - topic to send wallet creation request.
  • topicOut : array[string] - default=[topic-wallet-generated] - topic to consume wallet generated in Orchestrate.

Returns

Returns a class promise with the method generate().

  • promise: returns promise of a public address generated in Orchestrate.
// Generate multiple wallets and get addresses
const wallets = await Promise.all([
    walletGenerator.generate(),
    walletGenerator.generate(),
    walletGenerator.generate(),
    walletGenerator.generate(),
    walletGenerator.generate(),
    walletGenerator.generate(),
    walletGenerator.generate()
])
console.log(wallets[0]) ////0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7