js-conflux-sdk
Version:
JavaScript Conflux Software Development Kit
34 lines • 1.58 kB
TypeScript
export = AdvancedRPCUtilities;
declare class AdvancedRPCUtilities {
constructor(conflux: any);
conflux: any;
/**
* First try to use txpool_nextNonce method, if failed use cfx_getNextNonce
*
* @param {string} address - The address to get nonce
* @returns {Promise<BigInt>}
*/
getNextUsableNonce(address: string): Promise<BigInt>;
/**
* Get PoS interest rate
*
* @returns {Promise<string>} PoS interest rate
*/
getPoSInterestRate(): Promise<string>;
/**
* A advance method to check whether user's balance is enough to pay one transaction
*
* @param {Object} options Transaction info
* @param {string|number} [epochNumber] Optional epoch number
* @returns {Promise<Object>} A object indicate whether user's balance is capable to pay the transaction.
* - `BigInt` gasUsed: The gas used.
* - `BigInt` gasLimit: The gas limit.
* - `BigInt` storageCollateralized: The storage collateralized in Byte.
* - `Boolean` isBalanceEnough: indicate balance is enough for gas and storage fee
* - `Boolean` isBalanceEnoughForValueAndFee: indicate balance is enough for gas and storage fee plus value
* - `Boolean` willPayCollateral: false if the transaction is eligible for storage collateral sponsorship, true otherwise
* - `Boolean` willPayTxFee: false if the transaction is eligible for gas sponsorship, true otherwise
*/
estimateGasAndCollateralAdvance(options: any, epochNumber?: string | number): Promise<any>;
}
//# sourceMappingURL=Advanced.d.ts.map