Class: IotaClient
Constructors
new IotaClient()
new IotaClient(
options
):IotaClient
Establish a connection to a IOTA RPC endpoint
Parameters
• options: NetworkOrTransport
configuration options for the API Client
Returns
Properties
transport
protected
transport:IotaTransport
Methods
getRpcApiVersion()
getRpcApiVersion():
Promise
<undefined
|string
>
Returns
Promise
<undefined
| string
>
getCoins()
getCoins(
input
):Promise
<PaginatedCoins
>
Get all Coin<coin_type
> objects owned by an address.
Parameters
• input: GetCoinsParams
Returns
Promise
<PaginatedCoins
>
getAllCoins()
getAllCoins(
input
):Promise
<PaginatedCoins
>
Get all Coin objects owned by an address.
Parameters
• input: GetAllCoinsParams
Returns
Promise
<PaginatedCoins
>
getBalance()
getBalance(
input
):Promise
<CoinBalance
>
Get the total coin balance for one coin type, owned by the address owner.
Parameters
• input: GetBalanceParams
Returns
Promise
<CoinBalance
>
getAllBalances()
getAllBalances(
input
):Promise
<CoinBalance
[]>
Get the total coin balance for all coin types, owned by the address owner.
Parameters
• input: GetAllBalancesParams
Returns
Promise
<CoinBalance
[]>
getCoinMetadata()
getCoinMetadata(
input
):Promise
<null
|CoinMetadata
>
Fetch CoinMetadata for a given coin type
Parameters
• input: GetCoinMetadataParams
Returns
Promise
<null
| CoinMetadata
>
getTotalSupply()
getTotalSupply(
input
):Promise
<CoinSupply
>
Fetch total supply for a coin
Parameters
• input: GetTotalSupplyParams
Returns
Promise
<CoinSupply
>
call()
call<
T
>(method
,params
):Promise
<T
>
Invoke any RPC method
Type Parameters
• T = unknown
Parameters
• method: string
the method to be invoked
• params: unknown
[]
Returns
Promise
<T
>
getMoveFunctionArgTypes()
getMoveFunctionArgTypes(
input
):Promise
<IotaMoveFunctionArgType
[]>
Get Move function argument types like read, write and full access
Parameters
• input: GetMoveFunctionArgTypesParams
Returns
Promise
<IotaMoveFunctionArgType
[]>
getNormalizedMoveModulesByPackage()
getNormalizedMoveModulesByPackage(
input
):Promise
<IotaMoveNormalizedModules
>
Get a map from module name to structured representations of Move modules
Parameters
• input: GetNormalizedMoveModulesByPackageParams
Returns
Promise
<IotaMoveNormalizedModules
>
getNormalizedMoveModule()
getNormalizedMoveModule(
input
):Promise
<IotaMoveNormalizedModule
>
Get a structured representation of Move module
Parameters
• input: GetNormalizedMoveModuleParams
Returns
Promise
<IotaMoveNormalizedModule
>
getNormalizedMoveFunction()
getNormalizedMoveFunction(
input
):Promise
<IotaMoveNormalizedFunction
>
Get a structured representation of Move function
Parameters
• input: GetNormalizedMoveFunctionParams