LocalUserAccountProvider

Class
Implements UserAccountProvider using a KeyStore instance and a Provider instance. See the LocalUserAccountProvider section of the advanced guide for more details.
export class LocalUserAccountProvider<TKeyStore extends KeyStore = KeyStore, TProvider extends Provider = Provider> 
  extends UserAccountProviderBase<TProvider> 
  implements UserAccountProvider 
{ 
  public readonly currentUserAccount$: Observable<UserAccount | undefined>; 
  public readonly userAccounts$: Observable<readonly UserAccount[]>; 
  public readonly networks$: Observable<readonly NetworkType[]>; 
  public readonly keystore: TKeyStore; 
  public readonly deleteUserAccount?: (id: UserAccountID) => Promise<void>; 
  public readonly updateUserAccountName?: (options: UpdateAccountNameOptions) => Promise<void>; 
  protected readonly executeInvokeMethod: <T extends TransactionReceipt>( 
    options: ExecuteInvokeMethodOptions<T>, 
  ) => Promise<TransactionResult<T>>; 
  protected readonly executeInvokeScript: <T extends TransactionReceipt>( 
    options: ExecuteInvokeScriptOptions<T>, 
  ) => Promise<TransactionResult<T>>; 
 
  public constructor({ keystore, provider }: 

Constructor

constructor

public constructor({ keystore, provider }: { readonly keystore: TKeyStore; readonly provider: TProvider }) 

Parameters

__0
{ readonly keystore: TKeyStore; readonly provider: TProvider; }

Properties

currentUserAccount$
Observable<UserAccount | undefined>
userAccounts$
Observable<readonly UserAccount[]>
networks$
Observable<readonly NetworkType[]>
keystore
TKeyStore
executeInvokeMethod
<T extends TransactionReceipt>(options: ExecuteInvokeMethodOptions<T>) => Promise<TransactionResult<T>>
executeInvokeScript
<T extends TransactionReceipt>(options: ExecuteInvokeScriptOptions<T>) => Promise<TransactionResult<T>>

Methods

deleteUserAccount

(id: UserAccountID) => Promise<void> 

updateUserAccountName

(options: UpdateAccountNameOptions) => Promise<void> 

getCurrentUserAccount

public getCurrentUserAccount(): UserAccount | undefined 

getUserAccounts

public getUserAccounts(): readonly UserAccount[] 

getNetworks

public getNetworks(): readonly NetworkType[] 

selectUserAccount

public async selectUserAccount(id?: UserAccountID): Promise<void> 

Parameters

getNetworkFee

public async getNetworkFee({ 
    network, 
    transaction, 
    maxFee, 
  }: 

Parameters

__0
{ readonly network: string; readonly transaction: TransactionModel<AttributeModel, WitnessModel, SignerModel>; readonly maxFee: BigNumber; }
  • @neo-one/client
  • @neo-one/smart-contract
DOCS
InstallationMain ConceptsAdvanced GuidesAPI ReferenceContributing
CHANNELS
GitHubStack OverflowDiscord ChatTwitterYouTube
COPYRIGHT © 2021 NEO•ONE