web3-ronin-provider • Docs
web3-ronin-provider / SkynetWeb3Provider
This class implements the Skynet Web3 API.
To create a SkynetWeb3Provider quickly, call createSkynetProvider with the API key.
To customize headers, call the SkynetWeb3Provider constructor with a tailored ConnectionInfo parameter.
CustomSkynetProvider
new SkynetWeb3Provider(
connection
):SkynetWeb3Provider
Creates an instance of SkynetWeb3Provider, see documentation in the docs directory.
• 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-RoninSkynetProvider.ts:68
get_balance_of_address_and_contract(
account
,contractAddress
):Promise
<get_balance_of_address_and_contract_Response
>
Get balance of an address and contract
• account: string
• contractAddress: string
Promise
<get_balance_of_address_and_contract_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:262
get_balances_of_address_by_multiple_contracts(
account
,contractAddresses
):Promise
<get_balances_of_address_by_multiple_contracts_Response
>
Get balances of an address by multiple contracts
• account: string
• contractAddresses: string
[]
Promise
<get_balances_of_address_by_multiple_contracts_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:279
get_fungible_token_balance(
address
,limit
?,cursor
?):Promise
<get_fungible_token_balance_Response
>
Get fungible token balances of an address, including the native token (RON)
• address: 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
<get_fungible_token_balance_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:214
get_internal_txs_transfers(
account
,limit
?,cursor
?):Promise
<get_internal_txs_transfers_Response
>
Get internal tx transfers
Get all RON transfers via internal transactions of a wallet address
This API provides a focused view of internal transactions that may indicate potential money movement associated with a specific wallet. This API exclusively returns internal transactions where the Ethereum Virtual Machine (EVM) OpCode is “CALL” signaling that the transaction likely involves a call to another contract, which may result in a transfer of funds.
The API filters results to include only those internal transactions where either the from or to field matches the provided wallet address. This allows users to efficiently monitor all relevant internal activity linked to their wallet, helping them track significant interactions, such as fund movements or contract engagements.
By focusing on potential money movements, this API is invaluable for users looking to gain insights into their on-chain behavior and manage their assets effectively.
• account: 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
<get_internal_txs_transfers_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:369
get_list_of_collections_having_NFTs(
address
,limit
?,cursor
?):Promise
<get_list_of_collections_having_NFTs_Response
>
Get list of collections having NFTs belonging to an address
• address: 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
<get_list_of_collections_having_NFTs_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:230
get_nft_list_of_address_and_contract(
address
,contractAddress
,limit
?,cursor
?):Promise
<get_nft_list_of_address_and_contract_Response
>
Get NFT list of an address and contract
• address: string
• contractAddress: 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
<get_nft_list_of_address_and_contract_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:247
get_owned_nfts_of_address(
address
,limit
?,cursor
?):Promise
<get_owned_nfts_of_address_Response
>
Get owned NFTs of an address
This API allows you to retrieve a list of NFTs owned by a wallet address.
• address: string
owner address - The address to retrieve owned NFTs for
• 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
<get_owned_nfts_of_address_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:198
get_token_tranfers_of_address(
account
,limit
?,cursor
?):Promise
<get_token_tranfers_of_address_Response
>
Get token transfers of an address
• account: 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
<get_token_tranfers_of_address_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:298
get_token_tranfers_of_address_with_contract(
account
,contractAddress
,limit
?,cursor
?):Promise
<get_token_tranfers_of_address_with_contract_Response
>
Get token transfers of an address with a contract
Get all token transfers of a wallet address and a contract
This API offers a more targeted way to track token movements between a specific wallet and a particular smart contract. It is ideal for platforms, traders, and developers who need detailed insights into how tokens are being transferred between a wallet and a specific contract, such as in staking, liquidity pools, or token sale contracts. For NFT and token holders, it allows precise tracking of interactions with a contract, ensuring transparency and control over assets. DeFi projects and investors can use this API to analyze contract-specific transactions like token swaps, staking, or rewards distributed from the contract to the wallet. By narrowing the focus to a single wallet-contract relationship, this API simplifies auditing and enhances security checks, helping users spot patterns or irregularities in token flows. I t’s an essential tool for those who need contract-specific token transfer data without wading through the noise of all wallet transactions
• account: string
wallet address
• contractAddress: string
contract address
• 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
<get_token_tranfers_of_address_with_contract_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:320
get_transactions_of_address(
account
,limit
?,cursor
?):Promise
<get_transactions_of_address_Response
>
Get transactions of an address
Get all transactions of a wallet address
This API provides comprehensive access to every blockchain transaction associated with a specific wallet address. Unlike token transfers, which are derived from event logs, this API returns raw blockchain transactions, including contract interactions, token approvals, and transfers. This is invaluable for developers, investors, and platforms needing a full overview of a wallet’s blockchain activity. For DeFi users, it offers transparency into all on-chain actions, whether interacting with smart contracts or moving assets between wallets. NFT collectors and creators can use this API to track every significant transaction related to their assets, such as minting or contract deployments. By providing a complete history of blockchain transactions, this API is essential for auditing, monitoring, and managing wallets, helping users maintain full visibility into their on-chain behavior, including interactions that don’t necessarily involve token transfers.
A blockchain transaction relates to a wallet through the from, to, and contractAddress fields. The from field indicates the sender; if it matches the wallet address, it means the wallet initiated the transaction, such as sending tokens or RON. The to field represents the recipient; if this matches the wallet, it signifies that the wallet received assets. The contractAddress specifies any smart contract involved in the transaction. If this address matches a specific contract the wallet interacts with, it shows the relationship between the wallet and that contract.
• account: 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
<get_transactions_of_address_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:343
search(
account
,searchCriteria
?):Promise
<search_Response
>
Search for matched account activities
• account: string
address of the account to query events for.
• searchCriteria?: SearchCriteria
When activityTypes is not empty, fromBlock and toBlock needs to be specified.
Promise
<search_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:163
get_block_by_hash_timestamp_block_number_range(
fromBlock
,toBlock
,optionalParams
?):Promise
<get_block_by_hash_timestamp_block_number_range_Response
>
Get block by hash, timestamp, block number range
• fromBlock: number
• toBlock: number
• optionalParams?: OptionalParams
get the block where its life span covers the input timestamp and/or hash
Promise
<get_block_by_hash_timestamp_block_number_range_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:449
get_block_by_number(
block_number
):Promise
<get_block_by_number_Response
>
Get block by number
• block_number: number
Promise
<get_block_by_number_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:431
get_finalized_block_number():
Promise
<get_finalized_block_number_Response
>
Get finalized block number
Promise
<get_finalized_block_number_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:385
get_latest_block_number():
Promise
<get_finalized_block_number_Response
>
Get latest block number
Promise
<get_finalized_block_number_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:399
get_transactions_by_block_number(
block_number
):Promise
<get_transactions_by_block_number_Response
>
Get transactions by block number
• block_number: number
Promise
<get_transactions_by_block_number_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:414
get_collection_detail(
contract_addr
):Promise
<get_collection_detail_Response
>
Get collection detail
• contract_addr: string
The address to get collection detail for
Promise
<get_collection_detail_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:683
get_collection_holder_list(
contractAddress
,limit
?,cursor
?):Promise
<get_collection_holder_list_Response
>
Get collection holder list
Get all owners of a collection
This API allows you to retrieve a list of wallet addresses that own NFTs from a specific collection along with NFTs amounts they own.
• contractAddress: string
The address to get collection holder list for
• 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
<get_collection_holder_list_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:653
get_collection_token_transfers(
contractAddress
,limit
?,cursor
?):Promise
<get_collection_token_transfers_Response
>
Get collection token transfers
• contractAddress: string
The address to get token transfers for
• 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
<get_collection_token_transfers_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:669
get_detail_of_nft(
contractAddress
,tokenId
):Promise
<get_detail_of_nft_Response
>
Get detail of an NFT
This API allows you to retrieve details of one or more NFTs their identities
• contractAddress: string
collection address - Contract address of NFT
• tokenId: number
ID of NFT token
Promise
<get_detail_of_nft_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:524
get_details_of_multiple_collections(
contractAddresses
):Promise
<get_details_of_multiple_collections_Response
>
Get details of multiple collections
• contractAddresses: string
[]
An array of addresses
Promise
<get_details_of_multiple_collections_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:699
get_details_of_multiple_nfts(
contractAddress
,tokenIds
):Promise
<get_details_of_multiple_nfts_Response
>
Get details of multiple NFTs
• contractAddress: string
• tokenIds: string
[]
Promise
<get_details_of_multiple_nfts_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:589
get_nfts_from_collection(
contractAddress
,limit
?,cursor
?):Promise
<get_nfts_from_collection_Response
>
Get NFTs from a collection
This API is a must-have for game studios looking to efficiently manage their on-chain assets. With one simple request, game developers can access all NFTs in as collection. Game studios often deal with large volumes of NFTs, from in-game items to collectibles. This API provides an easy way to retrieve and organize all assets in a collection, helping teams focus on game development, not blockchain complexity. Ensure your NFT-based assets are accurately tracked and managed on-chain, providing transparency and security for both the studio and its players. No need for deep blockchain knowledge—this API handles the heavy lifting.
• contractAddress: 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
<get_nfts_from_collection_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:616
get_number_of_collection_holdings_by_address(
contractAddress
,address
,limit
?,cursor
?):Promise
<get_number_of_collection_holdings_by_address_Response
>
Get the number of collection holdings by address
• contractAddress: string
The address to get the number of collection holders for
• address: string
The account address
• 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
<get_number_of_collection_holdings_by_address_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:633
get_owners_of_nft(
contractAddress
,tokenId
):Promise
<get_owners_of_nft_Response
>
Get owners of an NFT
The most efficient way to access NFT ownership data. Whether you’re building a marketplace, verifying digital assets, or analyzing trends in the NFT space, our API provides a streamlined solution to gather ownership information faster and more reliably than traditional.
You can travel through the whole list of owners in case an NFT has more than one owner.
• contractAddress: string
• tokenId: number
Promise
<get_owners_of_nft_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:485
get_token_transfers_of_nft(
contractAddress
,tokenId
,limit
?,cursor
?):Promise
<get_token_transfers_of_nft_Response
>
Get token transfers of an NFT
Get all token transfers of an NFT
This API is a powerful tool to track the complete transfer history of any NFT. This API is invaluable for NFT creators, collectors, and marketplaces, providing detailed insights into every transaction an NFT has gone through. For collectors and investors, it enables easy tracking of an NFT’s provenance. NFT game studios and creators can also benefit from this API to monitor the distribution and movement of their assets across different users.
• contractAddress: string
collection address
• tokenId: number
NFT ID
• 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
<get_token_transfers_of_nft_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:507
refresh_nfts_of_collection_async(
contractAddress
,tokenIds
):Promise
<refresh_nfts_of_collection_async_Response
>
Refresh NFTs of a collection in asynchronous manner
By using this API, users don’t have to wait until the API complete the refreshing process. The API will return immediately after putting tokenIds to the background queue successfully, results of refreshing operation are not notified in any channel. You should call the NFT details API to verify refresh results.
• contractAddress: string
• tokenIds: string
[]
Promise
<refresh_nfts_of_collection_async_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:569
refresh_nfts_of_collection_sync(
contractAddress
,tokenIds
,maxWait
):Promise
<refresh_nfts_of_collection_sync_Response
>
Refresh NFTs of a collection in synchronous manner
By using this API, users have to wait until the API complete the refreshing process, tokenIds list can be specified in the request body as well as the maxWait duration in milliseconds (the maximum amount of wait time this call can accept). Without its presence, the API treat it as server default timeout of 10 seconds.
In the response, there are two lists, successes and failures tokenIds, failure reasons can vary and not be exposed. If an NFT keeps failing for a long time, you’d better contact developer support.
• contractAddress: string
• tokenIds: string
[]
• maxWait: number
milliseconds, when maxWait exceeds server timeout, then server timeout will be used instead
Promise
<refresh_nfts_of_collection_sync_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:546
get_detail_of_contract(
contract_addr
):Promise
<get_detail_of_contract_Response
>
Get detail of a contract
• contract_addr: string
address of contract to get detail for
Promise
<get_detail_of_contract_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:720
get_details_of_multiple_contracts(
contractAddresses
):Promise
<get_details_of_multiple_contracts_Response
>
Get details of multiple contracts
• contractAddresses: string
[]
An array of contract address to get details for
Promise
<get_details_of_multiple_contracts_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:736
get_logs_by_contract_address(
contractAddress
,limit
?,cursor
?):Promise
<get_logs_by_contract_address_Response
>
Get logs by contract address
• contractAddress: 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
<get_logs_by_contract_address_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:758
get_logs_by_contract_address_and_log_topic(
contractAddress
,topic
,limit
?,cursor
?):Promise
<get_logs_by_contract_address_and_log_topic_Response
>
Get logs by contract address and log topic
• contractAddress: string
• topic: 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
<get_logs_by_contract_address_and_log_topic_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:777
search_nfts_by_metadata(
contractAddress
,metadata
,limit
?,cursor
?):Promise
<search_nfts_by_metadata_Response
>
Search NFTs by metadata
• contractAddress: string
• metadata: search_nfts_by_metadata_Request
• limit?: number
• cursor?: string
Promise
<search_nfts_by_metadata_Response
>
src/web3-RoninSkynetProvider.ts:884
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-RoninSkynetProvider.ts:100
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-RoninSkynetProvider.ts:131
protected
update_url(url
,limit
?,cursor
?):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
• 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
string
Updated url if limit and cursors provided, otherwise, returns the parameter url.
CustomSkynetProvider.update_url
src/web3-roninCustomSkynetProvider.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_token_transfers_by_block_range(
fromBlock
,toBlock
,optionalParams
?):Promise
<get_token_transfers_by_block_range_Response
>
Get token transfers by block range, with maximum number of blocks allowed of 1000 blocks
• fromBlock: number
• toBlock: number
• optionalParams?: get_token_transfers_by_block_range_OptionalParams
Promise
<get_token_transfers_by_block_range_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:849
get_detail_of_transaction(
txHash
):Promise
<get_detail_of_transaction_Response
>
Get detail of a transaction
• txHash: string
hash of the transaction to get
Promise
<get_detail_of_transaction_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:813
get_details_of_multiple_transactions(
hashes
):Promise
<get_details_of_multiple_transactions_Response
>
Get details of multiple transactions
• hashes: string
[]
hashes of transactions
Promise
<get_details_of_multiple_transactions_Response
>
EErrorCodeMessage
src/web3-RoninSkynetProvider.ts:829
get_internal_transaction_of_transaction(
txHash
):Promise
<get_internal_transaction_of_transaction_Response
>
Get internal transaction of a transaction
• txHash: string
hash of the transaction to get
Promise
<get_internal_transaction_of_transaction_Response
>
EErrorCodeMessage