import { Balance, Claims } from '../../wallet' import { RPCResponse } from '../../rpc' import { Fixed8 } from '../../utils' import { signingFunction, net, AssetAmounts, PastTransaction } from './core'; import { BigNumber } from 'bignumber.js'; /** API Switch for MainNet and TestNet */ export function getAPIEndpoint(net: net): string /** Get balances of MODC and MOD for an address */ export function getBalance(net: net, address: string): Promise /** Get amounts of available (spent) and unavailable claims. */ export function getClaims(net: net, address: string): Promise /** Gets the maximum amount of gas claimable after spending all MOD. */ export function getMaxClaimAmount(net: net, address: string): Promise /** Returns the best performing (highest block + fastest) node RPC. */ export function getRPCEndpoint(net: net): Promise /** Get transaction history for an account */ export function getTransactionHistory(net: net, address: string): Promise /** Get the current height of the light wallet DB */ export function getWalletDBHeight(net: net): Promise /** DEPRECATED: use claimGas instead */ export function doClaimAllGas( net: net, privateKey: string ): Promise /** DEPRECATED: use claimGas instead */ export function doClaimAllGas( net: net, publicKey: string, signingFunction: signingFunction ): Promise /** DEPRECATED: Call mintTokens for RPX */ export function doMintTokens( net: net, scriptHash: string, fromWif: string, modc: number, gasCost: number ): Promise /** DEPRECATED: Call mintTokens for RPX */ export function doMintTokens( net: net, scriptHash: string, publicKey: string, modc: number, gasCost: number, signingFunction: signingFunction ): Promise /** DEPRECATED: Send an asset to an address */ export function doSendMod( net: net, toAddress: string, fromPrivKey: string, fromAddress: string, assetAmounts: AssetAmounts ): Promise /** DEPRECATED: Send an asset to an address */ export function doSendAsset( net: net, toAddress: string, publicKey: string, assetAmounts: number, signingFunction: signingFunction ): Promise /** Get info from Module Data */ export function getParameter( net: net, KeyHash: string, Param: string, ): Promise /** Get Provider Information from Blockchain */ export function getProviderInfo( net: net, address: string, field: string ): Promise /** Remove Provider from Blockchain */ export function RemoveProviderInfo( net: net, balance: Balance, privKey: string, address: string ): Promise /** Denied File Contract */ export function deniedFileContract( net: net, balance: Balance, privKey: string, fileContractHash: string ): Promise /** Get File Contract Information from Blockchain */ export function getFileContractInfo( net: net, fileContractHash : string, field: string ): Promise /** Only provider can be call this method for changing the status of file contract */ export function setStatusAsDownload( net: net, balance: Balance, privKey: string, fileContractHash: string ): Promise /** Register the Provider info on blockchain so that client can be found on blockchain. */ export function setProviderInfo( net: net, balance: Balance, privKey: string, providerAddress: string, duration: BigNumber, collateral: BigNumber, storagePrice: BigNumber, storageSize: BigNumber, downloadPrice: BigNumber, uploadPrice: BigNumber, proofStorageMinDuration : BigNumber, proofStorageMaxDuration : BigNumber, failLimit : BigNumber ): Promise /** Register the File Contract on Blockchain and make an contract between provider and client */ export function setFileContract( net: net, balance: Balance, privKey: string, clientAddress : string, providerAddress : string, merkleTreeHash : string, duration : BigNumber, fileSize : BigNumber, version : BigNumber, splitFileCount: BigNumber, depositAmount: BigNumber, magnetAddress: string, timestamp: BigNumber, origin: string ): Promise /** Deposit collateral from Provider */ export function depositCollateral( net: net, balance: Balance, privKey: string, providerAddress : string ): Promise /** When Provider receives a filecontract then he can do accept this. */ export function acceptFileContract( net: net, balance: Balance, privKey: string, fileContractHash : string, providerAddress : string ): Promise /** When a user want to check his status, then he can call this function. */ export function isFinishedFileContract( net: net, fileContractHash: string ): Promise /** When a Provider or Client want to change the status of file contract. */ export function CheckFileContract( net: net, balance: Balance, privKey: string, fileContractHash: string ): Promise /** Withdraw coin from torrent escrow. */ export function WithdrawCoinFromTorrentEscrow( net: net, toAddress: string, amount: BigNumber ): Promise /** Get escrow info from address */ export function getEscrowInfos( net: net, address: string ): Promise /** Provider must send Proof of Storage to blockchain. */ export function proofOfStorage( net: net, privKey: string, balance: Balance, fileContractHash : string, providerAddress : string, merkleData : string ): Promise /** Transfer coins from collateral to withdraw */ export function transferFromCollateralToWithdraw( net: net, privKey: string, balance: Balance, address: string, amount: Fixed8 ): Promise /** Transfer coins from withdaraw to collateral */ export function transferFromWithdrawToCollateral( net: net, privKey: string, balance: Balance, address: string, amount: Fixed8 ): Promise /** This contract will be called when a client want to download thier file from Provider. */ // export function downloadContract( // net: net, // ): Promise