web3-ronin-provider • Docs
web3-ronin-provider / SkynetRESTProvider
This class implements the Skynet REST API.
To create a SkynetRESTProvider quickly, call createSkynetRESTProvider with the API key.
To customize headers, call the SkynetRESTProvider constructor with a tailored ConnectionInfo parameter.
CustomSkynetProvider
new SkynetRESTProvider(
connection
):SkynetRESTProvider
Creates an instance of CustomSkynetProvider. Used by SkynetWeb3Provider and SkynetRESTProvider.
• connection: ConnectionInfo
The URL to use, headers, etc
EEmptyHeaders when headers are present, but empty
EEmptyUrl when URL is empty
ENoApiKey when X-API-KEY is absent
ENoHeaders when headers are absent
CustomSkynetProvider.constructor
src/web3-roninCustomSkynetProvider.ts:22
get_Account_Activities(
account_addr
,body
):Promise
<get_Account_Activities_Response
>
Get account activities on Ronin chain
Get an account’s activities on the Ronin chain (Transfers, Approvals, Mint, Burn, Marketplace, Deposit, Staking, Add/Remove Liquidity).
• account_addr: string
• body: get_Account_Activities_Request_Body
Promise
<get_Account_Activities_Response
>
src/web3-RoninSkynetRESTProvider.ts:157
get_account_info_by_address(
account_addr
):Promise
<get_account_info_by_address_Response
>
Get account info by address
Get an account’s information by its address.
• account_addr: string
Promise
<get_account_info_by_address_Response
>
src/web3-RoninSkynetRESTProvider.ts:174
search_wealthiest_accounts(
limit
?,offset
?):Promise
<search_wealthiest_accounts_Response
>
Search wealthiest accounts
Get the wealthiest accounts.
• limit?: number
• offset?: string
Promise
<search_wealthiest_accounts_Response
>
src/web3-RoninSkynetRESTProvider.ts:192
get_the_finalized_block_number():
Promise
<get_the_finalized_block_number_Response
>
Get the finalized block number
Returns the most recent block that has been confirmed as final and that cannot be reverted, even by a reorg.
Promise
<get_the_finalized_block_number_Response
>
src/web3-RoninSkynetRESTProvider.ts:234
get_the_latest_block_number():
Promise
<get_the_finalized_block_number_Response
>
Get the latest block number
Returns the most recent block that has been added to the chain, but that can still be reverted by a reorg.
Promise
<get_the_finalized_block_number_Response
>
src/web3-RoninSkynetRESTProvider.ts:250
get_blocks(
params
?):Promise
<get_blocks_Response
>
Get blocks
If block_hash is present, always search by block_hash first. The block_number value must be positive. If there is no block_hash or block_number present, the API searches for all blocks. The limit and offset parameters are used to paginate results.
• params?: get_blocks_Param
optional query parameters
Promise
<get_blocks_Response
>
src/web3-RoninSkynetRESTProvider.ts:210
get_contract_by_address(
contractAddr
):Promise
<get_contract_by_address_Response
>
Get contract by address
Get a contract by its address.
• contractAddr: string
Promise
<get_contract_by_address_Response
>
src/web3-RoninSkynetRESTProvider.ts:267
get_multiple_NFTs(
query
):Promise
<get_multiple_NFTs_Response
>
Get multiple NFTs
Get multiple NFTs that matched the specified IDs.
• query: get_multiple_NFTs_Query
Promise
<get_multiple_NFTs_Response
>
src/web3-RoninSkynetRESTProvider.ts:302
get_summary_for_individual_NFT(
contractAddr
,tokenId
):Promise
<get_summary_for_individual_NFT_Response
>
Get summary for individual NFT
Get summarized information for an individual NFT.
• contractAddr: string
• tokenId: number
Promise
<get_summary_for_individual_NFT_Response
>
src/web3-RoninSkynetRESTProvider.ts:285
get_summary_for_multiple_NFTs(
query
):Promise
<get_summary_for_multiple_NFTs_Response
>
Get summary for multiple NFTs
Get summarized information for multiple NFTs.
• query: get_summary_for_multiple_NFTs_Query
Promise
<get_summary_for_multiple_NFTs_Response
>
src/web3-RoninSkynetRESTProvider.ts:353
search_for_matched_NFTs(
query
):Promise
<search_for_matched_NFTs_Response
>
Search for matched NFTs
Search for NFTs that matched the specified search parameters.
• query: search_for_matched_NFTs_Query
Promise
<search_for_matched_NFTs_Response
>
src/web3-RoninSkynetRESTProvider.ts:336
search_for_NFTs_by_metadata_attributes(
query
):Promise
<search_for_NFTs_by_metadata_attributes_Response
>
DSearch for NFTs by metadata attributes
Search for NFTs that match the specified metadata attributes.
• query: search_for_NFTs_by_metadata_attributes_Query
Promise
<search_for_NFTs_by_metadata_attributes_Response
>
src/web3-RoninSkynetRESTProvider.ts:319
protected
readonly
connection:ConnectionInfo
CustomSkynetProvider.connection
src/web3-roninCustomSkynetProvider.ts:10
protected
concatUrl(url
,urlSuffix
):string
• url: string
• urlSuffix: string
string
CustomSkynetProvider.concatUrl
src/web3-roninCustomSkynetProvider.ts:48
protected
getRonin(urlSuffix
,config
?):Promise
<AxiosResponse
<any
,any
>>
Sends HTTP GET message to the service provider
• urlSuffix: string
• config?: AxiosRequestConfig
<any
>
Promise
<AxiosResponse
<any
, any
>>
CustomSkynetProvider.getRonin
src/web3-RoninSkynetRESTProvider.ts:91
protected
getRoninLimitCursor(url
,limit
?,cursor
?):Promise
<any
>
Places a call to the service, with optional limits and cursor
• url: string
• limit?: number
how many items can be return in a single response, maximum 200
• cursor?: string
the current pointer of the result set, to iterate to the next part of the results, it’s returned by the previous call (nextCursor field), you get it and pass to the next call, present nextCursor means there will be more results to scroll, empty nextCursor means it reaches to the end of results
Promise
<any
>
CustomSkynetProvider.getRoninLimitCursor
src/web3-roninCustomSkynetProvider.ts:103
protected
isErrorResponse(e
):boolean
• e: unknown
boolean
CustomSkynetProvider.isErrorResponse
src/web3-roninCustomSkynetProvider.ts:44
protected
postRonin(urlSuffix
,data
):Promise
<AxiosResponse
<any
,any
>>
Sends HTTP POST message to the service provider
• urlSuffix: string
• data: any
Promise
<AxiosResponse
<any
, any
>>
CustomSkynetProvider.postRonin
src/web3-RoninSkynetRESTProvider.ts:122
search_token_transfers():
Promise
<void
>
Promise
<void
>
src/web3-RoninSkynetRESTProvider.ts:596
protected
update_url(url
,limit
?,offset
?):string
Updates the url to include limit and cursors, if they’re provided.
• url: string
• limit?: number
how many items can be return in a single response, maximum 200
• offset?: string
| number
string
Updated url if limit and cursors provided, otherwise, returns the parameter url.
CustomSkynetProvider.update_url
src/web3-RoninSkynetRESTProvider.ts:69
protected
update_url_with_Params(url
,params
):string
• url: string
• params: string
| URLSearchParams
string
CustomSkynetProvider.update_url_with_Params
src/web3-roninCustomSkynetProvider.ts:81
get_circulating_RON_supply(
from
?,to
?):Promise
<get_circulating_RON_supply_Response
>
Get circulating RON supply
Get ronin circulating supply for RON. When getting by date range, both param from and to must be present, from and to must follow date format YYYY-MM-DD, for example ‘2023-10-29’. Max difference allowed between from and to 100 days.
• from?: string
YYYY-MM-DD
• to?: string
YYYY-MM-DD
Promise
<get_circulating_RON_supply_Response
>
src/web3-RoninSkynetRESTProvider.ts:425
get_circulating_token_supply(
symbol
):Promise
<get_circulating_token_supply_Response
>
Get circulating token supply
Get the circulating supply for a token.
• symbol: string
Promise
<get_circulating_token_supply_Response
>
src/web3-RoninSkynetRESTProvider.ts:370
get_total_RON_supply():
Promise
<get_total_RON_supply_Response
>
Get total RON supply
Get the total supply for RON.
Promise
<get_total_RON_supply_Response
>
src/web3-RoninSkynetRESTProvider.ts:467
get_total_token_supply(
symbol
):Promise
<get_total_token_supply_Response
>
Get total token supply
Get the total supply for the specified token.
• symbol: string
Promise
<get_total_token_supply_Response
>
src/web3-RoninSkynetRESTProvider.ts:407
query_RON_supply(
supply_type
):Promise
<number
>
Query RON supply
Get the total supply or circulating supply for RON.
• supply_type: query_token_supply_Query
Promise
<number
>
src/web3-RoninSkynetRESTProvider.ts:448
query_token_supply(
symbol
,supply_type
):Promise
<get_circulating_token_supply_Response
>
Query token supply
Get the total supply or circulating supply for the specified token.
• symbol: string
• supply_type: query_token_supply_Query
Promise
<get_circulating_token_supply_Response
>
src/web3-RoninSkynetRESTProvider.ts:388
get_summary_of_token_balances(
query
):Promise
<get_summary_of_token_balances_Response
>
Get summary of token balances
Get the summary of token balances for the specified owner address.
• query: get_summary_of_token_balances_Query
Promise
<get_summary_of_token_balances_Response
>
src/web3-RoninSkynetRESTProvider.ts:570
search_token_balances(
query
):Promise
<search_token_balances_Response
>
Search token balances
Search token balances.
• query: search_token_balances_Query
Promise
<search_token_balances_Response
>
src/web3-RoninSkynetRESTProvider.ts:553
list_token_transfers_by_timestamp(
limit
?,offset
?):Promise
<list_token_transfers_by_timestamp_Response
>
List token transfers by timestamp
List token transfers ordered by timestamp.
• limit?: number
• offset?: number
Promise
<list_token_transfers_by_timestamp_Response
>
src/web3-RoninSkynetRESTProvider.ts:588
list_token_transfers_by_transaction_hash(
transaction_hashes
):Promise
<list_token_transfers_by_transaction_hash_Response
>
List token transfers by transaction hash
List token transfers ordered by transaction hash.
• transaction_hashes: string
[]
Promise
<list_token_transfers_by_transaction_hash_Response
>
src/web3-RoninSkynetRESTProvider.ts:613
get_overview_for_tokens(
contractAddresses
):Promise
<get_overview_for_tokens_Response
>
Get overview for tokens
Get an overview for tokens that matched the specified contract addresses.
• contractAddresses: string
[]
Promise
<get_overview_for_tokens_Response
>
src/web3-RoninSkynetRESTProvider.ts:518
get_token_by_address(
contractAddr
):Promise
<get_token_by_address_Response
>
Get token by address
Get a token by its address.
• contractAddr: string
Promise
<get_token_by_address_Response
>
src/web3-RoninSkynetRESTProvider.ts:484
get_token_top_holders(
contractAddr
):Promise
<get_token_top_holders_Response
>
Get token’s top holders
Get the top holders of the specified token.
• contractAddr: string
Promise
<get_token_top_holders_Response
>
src/web3-RoninSkynetRESTProvider.ts:501
search_tokens(
query
):Promise
<search_tokens_Response
>
Search tokens
Search tokens.
• query: search_tokens_Query
Promise
<search_tokens_Response
>
src/web3-RoninSkynetRESTProvider.ts:535
get_daily_count_of_transactions():
Promise
<get_daily_count_of_transactions_Response
>
Get daily count of transactions
Get the daily count of transactions.
Promise
<get_daily_count_of_transactions_Response
>
src/web3-RoninSkynetRESTProvider.ts:684
get_multiple_transactions_by_hashes(
hashes
):Promise
<get_multiple_transactions_by_hashes_Response
>
Get multiple transactions by hashes
Returns the details of multiple transactions by their hashes.
• hashes: string
[]
Promise
<get_multiple_transactions_by_hashes_Response
>
src/web3-RoninSkynetRESTProvider.ts:665
get_transaction_by_hash(
hash
):Promise
<get_transaction_by_hash_Response
>
Get transaction by hash
Returns the details of an individual transaction by its hash.
• hash: string
Promise
<get_transaction_by_hash_Response
>
src/web3-RoninSkynetRESTProvider.ts:648
list_transactions(
limit
?,offset
?):Promise
<list_transactions_Response
>
List transactions
List transactions.
• limit?: number
• offset?: number
Promise
<list_transactions_Response
>