Class: LocalAccountCreator
account_creator.LocalAccountCreator
Account creator provides an interface for implementations to actually create accounts
Hierarchy
↳
LocalAccountCreator
Constructors
constructor
new LocalAccountCreator(masterAccount, initialBalance)
Parameters
| Name | Type |
|---|---|
masterAccount | Account |
initialBalance | BN |
Overrides
Defined in
Properties
initialBalance
Readonly initialBalance: BN
Defined in
masterAccount
Readonly masterAccount: Account
Defined in
Methods
createAccount
createAccount(newAccountId, publicKey): Promise<void>
Creates an account using a masterAccount, meaning the new account is created from an existing account
Parameters
| Name | Type | Description |
|---|---|---|
newAccountId | string | The name of the NEAR account to be created |
publicKey | PublicKey | The public key from the masterAccount used to create this account |
Returns
Promise<void>