Method: Chain::Account::ClientModule#create

Defined in:
lib/chain/account.rb

#create(opts) ⇒ Account

Parameters:

  • opts (Hash)

    Options hash specifiying account creation details.

Options Hash (opts):

  • alias (String)

    User specified, unique identifier.

  • root_xpubs (Array<String>)

    The list of keys used to create control programs under the account.

  • quorum (Integer)

    The number of keys required to sign transactions for the account.

  • tags (Hash)

    User-specified tag structure for the account.

Returns:



44
45
46
47
# File 'lib/chain/account.rb', line 44

def create(opts)
  opts = {client_token: SecureRandom.uuid}.merge(opts)
  client.conn.singleton_batch_request('create-account', [opts]) { |item| .new(item) }
end