Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Near

This is the main class developers should use to interact with NEAR.

example
const near = new Near(config);

Hierarchy

  • Near

Constructors

constructor

  • Parameters

    Returns Near

Properties

Readonly accountCreator

accountCreator: AccountCreator

Readonly config

config: any

Readonly connection

connection: Connection

Methods

account

  • account(accountId: string): Promise<Account>
  • Parameters

    • accountId: string

      near accountId used to interact with the network.

    Returns Promise<Account>

createAccount

loadContract

  • loadContract(contractId: string, options: object): Promise<Contract>
  • deprecated

    Use Contract instead.

    Parameters

    • contractId: string
    • options: object
      • changeMethods: string[]
      • sender: string
      • viewMethods: string[]

    Returns Promise<Contract>

sendTokens

  • sendTokens(amount: BN, originator: string, receiver: string): Promise<string>
  • deprecated

    Use Account.sendMoney instead.

    Parameters

    • amount: BN
    • originator: string
    • receiver: string

    Returns Promise<string>

Generated using TypeDoc