Options
All
  • Public
  • Public/Protected
  • All
Menu

Module hooks

Index

Functions

Const useNear

  • useNear(): Near

Const useNearContract

  • useNearContract(contractId: string, contractMethods: { changeMethods: string[]; viewMethods: string[] }): Contract
  • Define a smart contract on NEAR

    const contract = useNearContract('dev-345324325324', {
      viewMethods: ['getCount'],
      changeMethods: ['increment', 'decrement']
    });
    

    Parameters

    • contractId: string

      The id of the smart contract

    • contractMethods: { changeMethods: string[]; viewMethods: string[] }

      The methods defined on the smart contract

      • changeMethods: string[]
      • viewMethods: string[]

    Returns Contract

Const useNearWallet

  • useNearWallet(): WalletConnection

Generated using TypeDoc