api_client_Network.Network
Last updated
Was this helpful?
Last updated
Was this helpful?
/ / / Network
.Network
Handles all Network related functionality, including querying for historical events from middleware
Retrieve a single event by any of its indexed arguments. Can be filtered using parameters
note
uses the middleware
Parameters
opts
Object
-
opts.eventArg0?
string
event parameter value to filter by in position 0
opts.eventArg1?
string
event parameter value to filter by in position 1
opts.eventArg2?
string
event parameter value to filter by in position 2
opts.eventId
EventIdEnum
type of the event to fetch
opts.moduleId
ModuleIdEnum
type of the module to fetch
Returns
Defined in
Retrieve a list of events. Can be filtered using parameters
note
uses the middleware
Parameters
opts
Object
-
opts.eventArg0?
string
event parameter value to filter by in position 0
opts.eventArg1?
string
event parameter value to filter by in position 1
opts.eventArg2?
string
event parameter value to filter by in position 2
opts.eventId
EventIdEnum
type of the event to fetch
opts.moduleId
ModuleIdEnum
type of the module to fetch
opts.size?
BigNumber
page size
opts.start?
BigNumber
page offset
Returns
Defined in
▸ getLatestBlock(): Promise
<BigNumber
>
Retrieve the number of the latest block in the chain
Returns
Promise
<BigNumber
>
Defined in
Retrieve information for the current network
Returns
Defined in
Retrieve the protocol fees associated with running specific transactions
Parameters
args
Object
-
args.tags
TxTag
[]
list of transaction tags (i.e. [TxTags.asset.CreateAsset, TxTags.asset.RegisterTicker] or ["asset.createAsset", "asset.registerTicker"])
Returns
Defined in
▸ getSs58Format(): BigNumber
Retrieve the chain's SS58 format
Returns
BigNumber
Defined in
Retrieve a transaction by hash
note
uses the middleware
Parameters
opts
Object
-
opts.txHash
string
hash of the transaction
Returns
Defined in
Get the treasury wallet address
Returns
Defined in
▸ getTreasuryBalance(): Promise
<BigNumber
>
Get the Treasury POLYX balance
note
can be subscribed to
Returns
Promise
<BigNumber
>
Defined in
Parameters
callback
Returns
Defined in
▸ getVersion(): Promise
<string
>
Fetch the current network version (i.e. 3.1.0)
Returns
Promise
<string
>
Defined in
▸ transferPolyx(args
, opts?
): Promise
<TransactionQueue
<void
, void
, unknown
[][]>>
Transfer an amount of POLYX to a specified Account
Parameters
args
opts?
Returns
Promise
<TransactionQueue
<void
, void
, unknown
[][]>>
Defined in
▸ getEventByIndexedArgs(opts
): Promise
<null
| >
Promise
<null
| >
▸ getEventsByIndexedArgs(opts
): Promise
<null
| []>
Promise
<null
| []>
▸ getNetworkProperties(): Promise
<>
Promise
<>
▸ getProtocolFees(args
): Promise
<[]>
Promise
<[]>
▸ getTransactionByHash(opts
): Promise
<null
| >
Promise
<null
| >
▸ getTreasuryAccount():
▸ getTreasuryBalance(callback
): Promise
<>
<BigNumber
>
Promise
<>
note
this method is of type , which means you can call on it to see whether the signing Account and Identity have the required roles and permissions to run it