export declare const connector = "ALGO"; import algosdk from 'algosdk'; export { default as algosdk } from 'algosdk'; import { ethers } from 'ethers'; import type { Transaction, SuggestedParams } from 'algosdk'; import type { ARC11_Wallet, WalletTransaction } from './ALGO_ARC11'; import type { BaseHTTPClient } from 'algosdk'; import * as RHC from './ALGO_ReachHTTPClient'; import { CurrencyAmount, OnProgress, IBackend, IAccount, IContract, LaunchTokenOpts } from './shared_impl'; import { CBR_Val } from './CBR'; import { Token, ALGO_Ty, addressFromHex } from './ALGO_compiled'; export type { Token } from './ALGO_compiled'; export declare const add: (x: import("./shared_backend").num, y: import("./shared_backend").num) => ethers.BigNumber, sub: (x: import("./shared_backend").num, y: import("./shared_backend").num) => ethers.BigNumber, mod: (x: import("./shared_backend").num, y: import("./shared_backend").num) => ethers.BigNumber, mul: (x: import("./shared_backend").num, y: import("./shared_backend").num) => ethers.BigNumber, div: (x: import("./shared_backend").num, y: import("./shared_backend").num) => ethers.BigNumber, band: (x: import("./shared_backend").num, y: import("./shared_backend").num) => ethers.BigNumber, bior: (x: import("./shared_backend").num, y: import("./shared_backend").num) => ethers.BigNumber, bxor: (x: import("./shared_backend").num, y: import("./shared_backend").num) => ethers.BigNumber, eq: (n1: import("./shared_backend").num, n2: import("./shared_backend").num) => boolean, ge: (n1: import("./shared_backend").num, n2: import("./shared_backend").num) => boolean, gt: (n1: import("./shared_backend").num, n2: import("./shared_backend").num) => boolean, le: (n1: import("./shared_backend").num, n2: import("./shared_backend").num) => boolean, lt: (n1: import("./shared_backend").num, n2: import("./shared_backend").num) => boolean, add256: (x: import("./shared_backend").num, y: import("./shared_backend").num) => ethers.BigNumber, sub256: (x: import("./shared_backend").num, y: import("./shared_backend").num) => ethers.BigNumber, mod256: (x: import("./shared_backend").num, y: import("./shared_backend").num) => ethers.BigNumber, mul256: (x: import("./shared_backend").num, y: import("./shared_backend").num) => ethers.BigNumber, div256: (x: import("./shared_backend").num, y: import("./shared_backend").num) => ethers.BigNumber, band256: (x: import("./shared_backend").num, y: import("./shared_backend").num) => ethers.BigNumber, bior256: (x: import("./shared_backend").num, y: import("./shared_backend").num) => ethers.BigNumber, bxor256: (x: import("./shared_backend").num, y: import("./shared_backend").num) => ethers.BigNumber, eq256: (n1: import("./shared_backend").num, n2: import("./shared_backend").num) => boolean, ge256: (n1: import("./shared_backend").num, n2: import("./shared_backend").num) => boolean, gt256: (n1: import("./shared_backend").num, n2: import("./shared_backend").num) => boolean, le256: (n1: import("./shared_backend").num, n2: import("./shared_backend").num) => boolean, lt256: (n1: import("./shared_backend").num, n2: import("./shared_backend").num) => boolean, sqrt: (n1: import("./shared_backend").num, n2: import("./shared_backend").num) => ethers.BigNumber, sqrt256: (n1: import("./shared_backend").num, n2: import("./shared_backend").num) => ethers.BigNumber, cast: (from: import("./shared_impl").UIntTy, to: import("./shared_impl").UIntTy, x: import("./shared_backend").num, truncate: boolean) => ethers.BigNumber, muldiv: (x: import("./shared_backend").num, y: import("./shared_backend").num, z: import("./shared_backend").num) => ethers.BigNumber, protect: (t: any, v: unknown, ai?: string | undefined) => unknown, assert: (b: boolean, message: string) => void, Array_set: (arr: A[], idx: number, val: A) => A[], bytesEq: (s1: string, s2: string) => boolean, digestEq: (x: unknown, y: unknown) => boolean, digest_xor: (x: string, y: string) => string, bytes_xor: (x: string, y: string) => string, btoiLast8: (b: string) => ethers.BigNumber; export * from './shared_user'; import { setQueryLowerBound, getQueryLowerBound, formatWithDecimals } from './shared_impl'; export { setQueryLowerBound, getQueryLowerBound, addressFromHex, formatWithDecimals }; declare const setSigningMonitor: import("./shared_impl").SetSigningMonitor; export { setSigningMonitor }; declare type BigNumber = ethers.BigNumber; declare type AnyALGO_Ty = ALGO_Ty; export declare type Ty = AnyALGO_Ty; export declare type Address = string; declare type SecretKey = Uint8Array; declare type TxnParams = SuggestedParams; declare type RecvTxn = { 'confirmed-round': bigint; 'created-asset-index'?: bigint; 'created-application-index'?: bigint; 'created-companion-application-index'?: bigint; 'application-index'?: bigint; 'application-args': Array; 'sender': Address; 'logs': Array; 'approval-program'?: string; 'clear-state-program'?: string; }; export declare type NetworkAccount = { addr: Address; sk?: SecretKey; }; export declare type Backend = IBackend & { _Connectors: { ALGO: { version: number; ABI: any; appApproval: string; appClear: string; companionInfo: { [key: string]: number; } | null; extraPages: number; stateSize: number; stateKeys: number; mapDataSize: number; mapDataKeys: number; unsupported: Array; warnings: Array; }; }; }; export declare type ContractInfo = BigNumber; export declare type Contract = IContract; export declare type Account = IAccount; export declare function setCustomHttpEventHandler(h: (e: RHC.Event) => Promise): void; export declare function setMinMillisBetweenRequests(n: number): void; export declare const signSendAndConfirm: (acc: NetworkAccount, txns: Array) => Promise; export declare const toWTxn: (t: Transaction) => WalletTransaction; export declare const getTxnParams: (label: string) => Promise; export declare const MinTxnFee = 1000; export declare function getValidQueryWindow(): number | true; export declare function setValidQueryWindow(n: number | true): void; export declare const addressEq: (addr1: unknown, addr2: unknown) => boolean, tokenEq: (x: unknown, y: unknown) => boolean, digest: (t: ALGO_Ty, a: unknown) => string; export declare const T_Null: ALGO_Ty, T_Bool: ALGO_Ty, T_UInt: ALGO_Ty, T_UInt256: ALGO_Ty, T_Tuple: (cos: ALGO_Ty[]) => ALGO_Ty, T_Array: (co: ALGO_Ty, size_u: unknown) => ALGO_Ty, T_Contract: ALGO_Ty, T_Object: (coMap: { [key: string]: ALGO_Ty; }) => ALGO_Ty, T_Data: (coMap: { [key: string]: ALGO_Ty; }) => ALGO_Ty, T_Bytes: (len: number) => ALGO_Ty, T_Address: ALGO_Ty, T_Digest: ALGO_Ty, T_Struct: (cos: [string, ALGO_Ty][]) => ALGO_Ty, T_Token: ALGO_Ty; export declare const randomUInt: () => ethers.BigNumber, hasRandom: { random: () => ethers.BigNumber; }; export interface Provider { algod_bc: BaseHTTPClient; indexer_bc: BaseHTTPClient; algodClient: algosdk.Algodv2; indexer: algosdk.Indexer; nodeWriteOnly: boolean; getDefaultAddress: () => Promise
; isIsolatedNetwork: boolean; signAndPostTxns: (txns: WalletTransaction[], opts?: object) => Promise; } export declare const setWalletFallback: (wf: () => unknown) => void; export declare const walletFallback: (opts: any) => () => ARC11_Wallet; export declare const getProvider: () => Promise, setProvider: (val: Promise) => void; export interface ProviderEnv { ALGO_SERVER: string; ALGO_PORT: string; ALGO_TOKEN: string; ALGO_INDEXER_SERVER: string; ALGO_INDEXER_PORT: string; ALGO_INDEXER_TOKEN: string; REACH_ISOLATED_NETWORK: string; ALGO_NODE_WRITE_ONLY: string; } export declare function setProviderByEnv(env: Partial): void; export declare type ProviderName = string; export declare function providerEnvByName(pn: ProviderName): ProviderEnv; export declare function setProviderByName(pn: ProviderName): void; export declare const getFaucet: () => Promise, setFaucet: (val: Promise) => void; export declare const makeTransferTxn: (from: Address, to: Address, value: BigNumber, token: Token | undefined, ps: TxnParams, closeTo?: Address | undefined, tag?: number | undefined) => Transaction; export declare const transfer: (from: Account, to: Account, value: unknown, token?: Token | undefined, tag?: number | undefined) => Promise; export declare const connectAccount: (networkAccount: NetworkAccount) => Promise; export declare const minimumBalanceOf: (acc: Account) => Promise; export declare const balancesOf: (acc: Account, tokens: Array) => Promise>; export declare const balanceOf: (acc: Account, token?: ethers.BigNumber | undefined) => Promise; export declare const createAccount: () => Promise; export declare const canFundFromFaucet: () => Promise; export declare const fundFromFaucet: (account: Account, value: unknown) => Promise; export declare const newTestAccount: (startingBalance: unknown) => Promise; export declare const newTestAccounts: (k: number, bal: any) => Promise; /** @description the display name of the standard unit of currency for the network */ export declare const standardUnit = "ALGO"; /** @description the display name of the atomic (smallest) unit of currency for the network */ export declare const atomicUnit = "\u03BCALGO"; /** * @description Parse currency by network * @param amt value in the {@link standardUnit} for the token. * @returns the amount in the {@link atomicUnit} of the token. * @example parseCurrency(100).toString() // => '100000000' * @example parseCurrency(100, 3).toString() // => '100000' */ export declare function parseCurrency(amt: CurrencyAmount, decimals?: number): BigNumber; export declare const minimumBalance: BigNumber; /** * @description Format currency by network */ export declare function formatCurrency(amt: unknown, decimals?: number): string; export declare function getDefaultAccount(): Promise; /** * @param mnemonic 25 words, space-separated */ export declare const newAccountFromMnemonic: (mnemonic: string) => Promise; /** * @param secret a Uint8Array, or its hex string representation */ export declare const newAccountFromSecret: (secret: string | SecretKey) => Promise; export declare const getNetworkTime: () => Promise; export declare const getTimeSecs: (now_bn: BigNumber) => Promise; export declare const getNetworkSecs: () => Promise; export declare const waitUntilTime: (target: ethers.BigNumber, onProgress?: OnProgress | undefined) => Promise; export declare const waitUntilSecs: (target: ethers.BigNumber, onProgress?: OnProgress | undefined) => Promise; export declare const wait: (delta: BigNumber, onProgress?: OnProgress | undefined) => Promise; declare type VerifyResult = { ApplicationID: BigNumber; Deployer: Address; }; export declare const verifyContract: (info: ContractInfo, bin: Backend) => Promise; /** * Formats an account's address in the way users expect to see it. * @param acc Account, NetworkAccount, base32-encoded address, or hex-encoded address * @returns the address formatted as a base32-encoded string with checksum */ export declare function formatAddress(acc: string | NetworkAccount | Account): string; export declare function unsafeGetMnemonic(acc: NetworkAccount | Account): string; export declare const launchToken: (accCreator: Account, name: string, sym: string, opts?: LaunchTokenOpts) => Promise<{ name: string; sym: string; id: ethers.BigNumber; mint: (accTo: Account, amt: any) => Promise; optOut: (accFrom: Account, accTo?: Account) => Promise; }>; export declare const reachStdlib: import("./interfaces").Stdlib_Backend_Base>; //# sourceMappingURL=ALGO.d.ts.map