Options
All
  • Public
  • Public/Protected
  • All
Menu

web3.js

Index

Type aliases

Contract

Contract: { abi: any; address: string }

Contract type

Type declaration

  • abi: any
  • address: string

Functions

deployContract

fromWEI

  • fromWEI(amount: bigint, decimals?: number): number
  • Converts any amount of WEI to AIRE token

    Parameters

    • amount: bigint

      The amount of WEI to convert

    • Default value decimals: number = 2

      The number of decimals to round to

    Returns number

    The amount of AIRE token

getBalance

  • getBalance(connection: Connection, contract: string, address: string): Promise<bigint>

getGasBalance

  • getGasBalance(connection: Connection, address: string): Promise<bigint>

readFileCallback

  • readFileCallback(sourcePath: any): { contents: string } | { error: string }

sendTransaction

  • sendTransaction(connection: Connection, wallet: Wallet, contract: string, address: string, amount: bigint): Promise<string>
  • Send transaction

    Parameters

    • connection: Connection

      The connection to use.

    • wallet: Wallet

      The wallet to use.

    • contract: string

      The contract to use.

    • address: string

      The address to send the transaction to.

    • amount: bigint

      The amount to send in wei.

    Returns Promise<string>

    A promise that resolves to the transaction hash.

toWEI

  • toWEI(amount: string | number): bigint
  • Converts any amount of AIRE token to WEI

    Parameters

    • amount: string | number

    Returns bigint

Generated using TypeDoc