Network
Last updated
Was this helpful?
Last updated
Was this helpful?
Handles all Network related functionality, including querying for historical events from middleware
Network
Retrieve a single event by any of its indexed arguments. Can be filtered using parameters
note
uses the middleware
Parameters:
▪ opts: object
eventArg0?
undefined | string
event parameter value to filter by in position 0
eventArg1?
undefined | string
event parameter value to filter by in position 1
eventArg2?
undefined | string
event parameter value to filter by in position 2
eventId
EventId
type of the event to fetch
moduleId
ModuleId
type of the module to fetch
Retrieve a list of events. Can be filtered using parameters
note
uses the middleware
Parameters:
▪ opts: object
eventArg0?
undefined | string
event parameter value to filter by in position 0
eventArg1?
undefined | string
event parameter value to filter by in position 1
eventArg2?
undefined | string
event parameter value to filter by in position 2
eventId
EventId
type of the event to fetch
moduleId
ModuleId
type of the module to fetch
size?
BigNumber
page size
start?
BigNumber
page offset
▸ getLatestBlock(): Promise‹BigNumber›
Retrieve the number of the latest block in the chain
Returns: Promise‹BigNumber›
Retrieve information for the current network
▸ getProtocolFees(args
: object): Promise‹BigNumber›
Retrieve the protocol fees associated with running a specific transaction
Parameters:
▪ args: object
tag
TxTag
transaction tag (i.e. TxTags.asset.CreateAsset or "asset.createAsset")
Returns: Promise‹BigNumber›
▸ getSs58Format(): BigNumber
Retrieve the chain's SS58 format
Returns: BigNumber
Retrieve a transaction by hash
note
uses the middleware
Parameters:
▪ opts: object
txHash
string
hash of the transaction
Get the treasury wallet address
▸ getTreasuryBalance(): Promise‹BigNumber›
Get the Treasury POLYX balance
note
can be subscribed to
Returns: Promise‹BigNumber›
Parameters:
callback
▸ getVersion(): Promise‹string›
Fetch the current network version (i.e. 3.1.0)
Returns: Promise‹string›
Transfer an amount of POLYX to a specified Account
Parameters:
args
opts?
▸ getEventByIndexedArgs(opts
: object): Promise‹ | null›
Defined in
Returns: Promise‹ | null›
▸ getEventsByIndexedArgs(opts
: object): Promise‹[] | null›
Defined in
Returns: Promise‹[] | null›
Defined in
▸ getNetworkProperties(): Promise‹›
Defined in
Returns: Promise‹›
Defined in
Defined in
▸ getTransactionByHash(opts
: object): Promise‹ | null›
Defined in
Returns: Promise‹ | null›
▸ getTreasuryAccount():
Defined in
Returns:
Defined in
▸ getTreasuryBalance(callback
: ‹BigNumber›): Promise‹›
Defined in
‹BigNumber›
Returns: Promise‹›
Defined in
▸ transferPolyx(args
: , opts?
: ): Promise‹‹void››
Defined in
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
Returns: Promise‹‹void››