Skip to main content
Version: near-api-js@1.1.0

Class: LocalAccountCreator

account_creator.LocalAccountCreator

Account creator provides an interface for implementations to actually create accounts

Hierarchy

Constructors

constructor

new LocalAccountCreator(masterAccount, initialBalance)

Parameters

NameType
masterAccountAccount
initialBalanceBN

Overrides

AccountCreator.constructor

Defined in

account_creator.ts:18

Properties

initialBalance

Readonly initialBalance: BN

Defined in

account_creator.ts:16


masterAccount

Readonly masterAccount: Account

Defined in

account_creator.ts:15

Methods

createAccount

createAccount(newAccountId, publicKey): Promise<void>

Creates an account using a masterAccount, meaning the new account is created from an existing account

Parameters

NameTypeDescription
newAccountIdstringThe name of the NEAR account to be created
publicKeyPublicKeyThe public key from the masterAccount used to create this account

Returns

Promise<void>

Overrides

AccountCreator.createAccount

Defined in

account_creator.ts:30