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 single event by any of its indexed arguments. Can be filtered using parameters
note
uses the middlewareV2
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
Retrieve a list of events. Can be filtered using parameters
note
uses the middlewareV2
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
Retrieve the protocol fees associated with running specific transactions
Parameters:
â–ª args: object
tags
TxTag[]
list of transaction tags (i.e. [TxTags.asset.CreateAsset, TxTags.asset.RegisterTicker] or ["asset.createAsset", "asset.registerTicker"])
â–¸ 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
Retrieve a transaction by hash
note
uses the middlewareV2
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›
â–¸ getEventByIndexedArgsV2(opts
: object): Promise‹ | null›
Defined in
Returns: Promise‹ | null›
â–¸ getEventsByIndexedArgs(opts
: object): Promise‹[] | null›
Defined in
Returns: Promise‹[] | null›
â–¸ getEventsByIndexedArgsV2(opts
: object): Promise‹[] | null›
Defined in
Returns: Promise‹[] | null›
Defined in
▸ getNetworkProperties(): Promise‹›
Defined in
Returns: Promise‹›
â–¸ getProtocolFees(args
: object): Promise‹[]›
Defined in
Returns: Promise‹[]›
Defined in
â–¸ getTransactionByHash(opts
: object): Promise‹ | null›
Defined in
Returns: Promise‹ | null›
â–¸ getTransactionByHashV2(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››