Options
All
  • Public
  • Public/Protected
  • All
Menu

Class KeyStoreTransactionCreator

This is an implementation of TransactionCreator. It is used to create transactions given a KeyStore and Provider from near-api-js.

A new KeyStoreTransactionCreator can be created from a NEAR WalletConnection or by using the constructor.

example
const transactionCreator = KeyStoreTransactionCreator.fromWallet(wallet)
example
const transactionCreator = new KeyStoreTransactionCreator({
  keyStore,
  signerId: "my-acct.testnet",
  networkId: "testnet",
  nodeUrl: "https://rpc.testnet.near.org",
})

Hierarchy

  • KeyStoreTransactionCreator

Implements

Index

Constructors

constructor

Properties

Private keyStore

keyStore: KeyStore

Private networkId

networkId: string

Private provider

provider: Provider

Private signerId

signerId: string

Methods

create

Static fromAccount

  • Create an instance of KeyStoreTransactionCreator from a NEAR Account.

    Parameters

    • account: Account

    Returns KeyStoreTransactionCreator

Static fromWallet

  • Create an instance of KeyStoreTransactionCreator from a NEAR WalletConnection.

    Parameters

    • wallet: WalletConnection

    Returns KeyStoreTransactionCreator

Generated using TypeDoc