Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ContractApi

Contract API

This module provides methods about the smart contracts

Hierarchy

  • ContractApi

Index

Properties

callContractMethod

callContractMethod: function

Calls a public method of smart contract

param

The argument object

returns

The Transaction Id or Unsigned Bytes as Hex String if no private key was sent

Type declaration

getAllContractIds

getAllContractIds: function

Get all contract Ids of the blockchain, or filtered by the argument

param

The argument object

returns

The list of contract ids

Type declaration

getAllContractsByCodeHash

getAllContractsByCodeHash: function

Gets all contracts for a given machin code hash

param

The argument object

returns

A list of contracts

Type declaration

getContract

getContract: function

Get a contract by its Id

param

The ID of the contract

returns

The contract

Type declaration

    • (id: string): Promise<Contract>
    • Parameters

      • id: string

      Returns Promise<Contract>

getContractMapValuesByFirstKey

getContractMapValuesByFirstKey: function

Gets a key-value list for the given first key of a contracts data store

param

The argument object

returns

A list of values

Type declaration

getContractsByAccount

getContractsByAccount: function

Get all contracts of given account, or filtered by the arguments

param

The argument object

returns

A list of contracts

Type declaration

getSingleContractMapValue

getSingleContractMapValue: function

Gets a map value from a contracts data store

param

The argument object

returns

The value. Non-existing key-value tuples return always 0 (Zero)

Type declaration

publishContract

publishContract: function

Publishes a smart contract to the blockchain

param

The argument object

returns

The Transaction Id or Unsigned Bytes as Hex String if no private key was sent

Type declaration

publishContractByReference

publishContractByReference: function

Publishes a smart contract to the blockchain using the code base of an already existant contract. This reduces payload in the chain, allowing to deploy many contracts per block and very cheap

param

The argument object

returns

The Transaction Id or Unsigned Bytes as Hex String if no private key was sent