Network
getAbciInfo​
- Get ABCI information
This method is used to get ABCI information.
Parameters:​
- Â
<string>
- a wallet address - Â
<NetworkAxiosConfig>
- (optinal) network config
Results:​
- Â
Promise<AbciInfoResult>
- An instance ofAbciInfoResult
containing the response and error.
Example:​
const data = "0x12345d";
// Get ABCI information
const acbiInfo = await Network.getAbciInfo(data);
getAbciNoce​
- Get ABCI Noce
This method is used to get ABCI Noce.
Parameters:​
- Â
<string>
- a wallet address - Â
<NetworkAxiosConfig>
- (optinal) network config
Results:​
- Â
Promise<AbciNoceResult>
- An instance ofAbciNoceResult
containing the response and error.
Example:​
const data = "0x12345d";
// Get ABCI Noce
const acbiNoce = await Network.getAbciNoce(data);
getAssetToken​
- Get information of given type of asset token
This method is used to get information of given type of asset token
Parameters:​
- Â
<string>
- asset code - Â
<NetworkAxiosConfig>
- (optinal) network config
Results:​
- Â
Promise<AssetTokenDataResult>
- An instance ofAssetTokenDataResult
containing the response and error.
Example:​
const data = "0x12345d";
// Get ABCI Noce
const acbiNoce = await Network.getAbciNoce(data);
getBlock​
- Get datails of given block
This method is used to get details of given block.
Parameters:​
- Â
<number>
- block Height - Â
<NetworkAxiosConfig>
- (optinal) network config
Results:​
- Â
Promise<BlockDetailsDataResult>
- An instance ofBlockDetailsDataResult
containing the response and error.
Example:​
const blockHeight = 1432;
// Get block #1432 details
const blockDetail = await Network.getBlock(blockHeight);
getDelegateInfo​
- Get the delegation information
This method is used to get the delegation information.
Parameters:​
- Â
<string>
- public key - Â
<NetworkAxiosConfig>
- (optinal) network config
Results:​
- Â
Promise<DelegateInfoDataResult>
- An instance ofDelegateInfoDataResult
containing the response and error.
Example:​
const publickey = "qsedx23rtgds";
// Get the delegation information
const blockDetail = await Network.getDelegateInfo(publickey);
getHashSwap​
- Get transaction details
This method is used to get details of transaction with given hash
Parameters:​
- Â
<string>
- transaction hash - Â
<NetworkAxiosConfig>
- (optinal) network config
Results:​
- Â
Promise<HashSwapDataResult>
- An instance ofHashSwapDataResult
containing the response and error.
Example:​
const hash = `YOUR_TX_HASH`;
// Get transaction details of given hash
const txDetail = await Network.getHashSwap(hash);
getIssuedRecords​
- Get information of issued records for given public key
This method is used to get information of issued records for given public key
Parameters:​
- Â
<string>
- public key - Â
<NetworkAxiosConfig>
- (optinal) network config
Results:​
- Â
Promise<IssuedRecordDataResult>
- An instance ofIssuedRecordDataResult
containing the response and error.
Example:​
const publickey = `publickeyexample`;
// Get issed records information
const issuedRecords = await Network.getIssuedRecords(publickey);
getOwnedSids​
- Get Sids owned by given address
This method is used to get Sids owned by given address
Parameters:​
- Â
<string>
- wallet address - Â
<NetworkAxiosConfig>
- (optinal) network config
Results:​
- Â
Promise<OwnedSidsDataResult>
- An instance ofOwnedSidsDataResult
containing the response and error.
Example:​
const address = `frabhhjsswerf`;
// Get Sids' information
const ownedSids = await Network.getOwnedSids(address);
getOwnerMemo​
- Get the owner memo by given UTXO sid
This method is used to get owner memo by given UTXO sid
Parameters:​
- Â
<number>
- UTXO sid - Â
<NetworkAxiosConfig>
- (optinal) network config
Results:​
- Â
Promise<OwnerMemoDataResult>
- An instance ofOwnerMemoDataResult
containing the response and error.
Example:​
const utxoSid = 143;
// Get owner memo
const ownerMemo = await Network.getOwnerMemo(utxoSid);
getStateCommitment​
- Returns state commitment
An important property of a Findora ledger is the ability to authenticate transactions. Users can authenticate transactions against a small tag called the state commitment. The state commitment is a commitment to the current state of the ledger. The state commitment response is a tuple containing the state commitment and the state commitment version.
Parameters:​
- Â
<NetworkAxiosConfig>
- (optinal) network config
Results:​
- Â
Promise<StateCommitmentDataResult>
- An instance ofStateCommitmentDataResult
containing the response and error.
Example:​
// Get state commitment
const stateCommitment = await Network.getStateCommitment();
getTransactionStatus​
- Returns transaction status
Using the transaction handle, user can fetch the status of the transaction from the query server.
Parameters:​
- Â
<string>
- transaction handle (hash) - Â
<NetworkAxiosConfig>
- (optinal) network config
Results:​
- Â
Promise<TransactionStatusDataResult>
- An instance ofTransactionStatusDataResult
containing the response and error.
Example:​
const handle = `YOUR_TX_HASH`;
// Get transaction status
const transactionStatus = await Network.getTransactionStatus(handle);
getTransactionDetails​
- Returns transaction details
Using the transaction handle, user can fetch the details of the transaction from the query server.
Parameters:​
- Â
<string>
- transaction handle (hash) - Â
<NetworkAxiosConfig>
- (optinal) network config
Results:​
- Â
Promise<TxDetailsDataResult>
- An instance ofTxDetailsDataResult
containing the response and error.
Example:​
const handle = `YOUR_TX_HASH`;
// Get transaction details
const transactionDetails = await Network.getTransactionDetails(handle);
getTxList​
- Get a list of transactions for given wallet address
This method is used to get a list of transactions for given wallet address
Parameters:​
- Â
<string>
- wallet address - Â
<"to"|"from">
- transaction type. it can only be "to" or "from" - Â
<number>
- pagination. Default is 1. - Â
<NetworkAxiosConfig>
- (optinal) network config
Results:​
- Â
Promise<TxListDataResult>
- An instance ofTxListDataResult
containing the response and error.
Example:​
const address = `fra000xxsr`;
const type = "to";
// Get list of `to` transaction of given address
const txDetail = await Network.getTxList(address, type);
getUtxo​
- Get UTXO ledger for given utxo sid
This method is used to get UTXO ledger for given UTXO sid
Parameters:​
- Â
<number>
- UTXO SID - Â
<NetworkAxiosConfig>
- (optinal) network config
Results:​
- Â
Promise<UtxoDataResult>
- An instance ofUtxoDataResult
containing the response and error.
Example:​
const utxoSid = 143;
// Get UTXO details
const utxoData = await Network.getUtxo(utxoSid);
getValidatorList​
- Get validator list
This method is used to get the list of validators.
Parameters:​
- Â
<NetworkAxiosConfig>
- (optinal) network config
Results:​
- Â
Promise<ValidatorListDataResult>
- An instance ofValidatorListDataResult
containing the response and error.
Example:​
// Get validator list
const acbiInfo = await Network.getValidatorList();
sendRpcCall​
- Send RPC call
This method is used to send RPC call.
Parameters:​
- Â
<string>
- RPC url - Â
<{[key: string]: any}>
- payload - Â
<NetworkAxiosConfig>
- (optinal) network config
Results:​
- Â
Promise<T>
- The response object from RPC call.
Example:​
cont url = `https://prod-testnet.prod.findora.org:8545`;
const payload = {
method: `eth_getBlockByHash`,
params: ['0x1af723767d06...',true],
};
// Send the RPC call to get block details by hash
const response = await Network.sendRpcCall(url,payload);
submitEvmTx​
- Submit EVM transaction
This method is used to submit a EVM transaction.
Parameters:​
- Â
<string>
- transaction hash - Â
<NetworkAxiosConfig>
- (optinal) network config
Results:​
- Â
Promise<SubmitEvmTxResult>
- An instance ofSubmitEvmTxResult
containing the response and error.
Example:​
const tx = "Your_TX_Hash";
// Submit a EVM transaction
const result = await Network.submitEvmTx(tx);
submitTransaction​
- Submit transation
This method is used to submit a transaction
Parameters:​
- Â
<TransactionData>
- (optinal) transaction data - Â
<NetworkAxiosConfig>
- (optinal) network config
Results:​
- Â
Promise<SubmitTransactionDataResult>
- An instance ofSubmitTransactionDataResult
containing the response and error.
Example:​
const data = `Your_Transaction_Data`;
// Submit transaction
const txResult = await Network.submitTransaction(data);