import { Datatoken } from './Datatoken.js'; import { Signer, TransactionRequest } from 'ethers'; import { AbiItem, ReceiptOrEstimate } from '../@types/index.js'; import { AccessListContract } from './AccessList.js'; import { Config } from '../config/index.js'; export declare class Datatoken4 extends Datatoken { accessList: AccessListContract; fileObject: Uint8Array; getDefaultAbi(): AbiItem[]; /** * Instantiate Datatoken class * @param {Signer} signer The signer object. * @param {string | number} [network] Network id or name * @param {Config} [config] The configuration object. * @param {AbiItem[]} [abi] ABI array of the smart contract */ constructor(signer: Signer, fileObject: Uint8Array, network?: string | number, config?: Config, abi?: AbiItem[]); setFileObj(fileObj: Uint8Array): void; /** * getAllowListContract - It returns the current allowList contract address * @param dtAddress datatoken address * @return {Promise} */ getAllowlistContract(dtAddress: string): Promise; /** * getDenyListContract - It returns the current denyList contract address * @param dtAddress datatoken address * @return {Promise} */ getDenylistContract(dtAddress: string): Promise; /** setAllowListContract * This function allows to set another address for allowListContract, only by datatoken deployer * only DatatokenDeployer can succeed * @param {String} dtAddress Datatoken address * @param {String} address Contract address * @param {String} consumer User address * @param {Boolean} estimateGas if True, return gas estimate * @return {Promise} returns the transaction receipt or the estimateGas value */ setAllowListContract(dtAddress: string, address: string, consumer: string, estimateGas?: G): Promise>; setAllowListContractTx(dtAddress: string, address: string, consumer: string): Promise; /** setDenyListContract * This function allows to set another address for allowListContract, only by datatoken deployer * only DatatokenDeployer can succeed * @param {String} dtAddress Datatoken address * @param {String} address Contract address * @param {String} consumer User address * @param {Boolean} estimateGas if True, return gas estimate * @return {Promise} returns the transaction receipt or the estimateGas value */ setDenyListContract(dtAddress: string, address: string, consumer: string, estimateGas?: G): Promise>; setDenyListContractTx(dtAddress: string, address: string, consumer: string): Promise; /** setFileObject * This function allows to set file object in ecnrypted format, only by datatoken deployer * only DatatokenDeployer can succeed * @param {String} dtAddress Datatoken address * @param {String} address User address * @param {Boolean} estimateGas if True, return gas estimate * @return {Promise} returns the transaction receipt or the estimateGas value */ setFileObject(dtAddress: string, address: string, estimateGas?: G): Promise>; setFileObjectTx(dtAddress: string, address: string): Promise; /** * getFileObject - It returns the consumer's file object encrypted format. * @param {String} dtAddress datatoken address * @param {Number} serviceIndex - service index * @param {String} providerAddress * @param {Bytes} providerSignature * @param {Bytes} consumerData * @param {Bytes} consumerSignature * @param {String} consumerAddress * @return {Promise} returns file object */ getFileObject(dtAddress: string, serviceIndex: number, providerAddress: string, providerSignature: Uint8Array, consumerData: Uint8Array, consumerSignature: Uint8Array, consumerAddress: string): Promise; }