/** * This file was automatically generated by @octalmage/terra-cosmwasm-typescript-gen@0.2.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @octalmage/terra-cosmwasm-typescript-gen generate command to regenerate this file. */ import { LCDClient, Coins, Wallet, TxInfo, WaitTxBroadcastResult, Fee, Msg } from '@terra-money/terra.js'; import { ConnectedWallet } from '@terra-money/wallet-provider'; import { NETWORK } from '../../@types'; export declare function isConnectedWallet(x: Wallet | ConnectedWallet): x is ConnectedWallet; export declare function waitForInclusionInBlock(lcd: LCDClient, txHash: string): Promise; export declare type Addr = string; export declare type Uint128 = string; export interface AllBettingHistoryResponse { history: BetData[]; [k: string]: unknown; } export interface BetData { address: Addr; bet_amount: Uint128; bet_id: number; bet_result: boolean; bet_value: number; created_at: number; key: string; result_hash: string; [k: string]: unknown; } export interface BetAmountRangeResponse { max: Uint128; min: Uint128; [k: string]: unknown; } export interface BetDataByIdResponse { data: BetData; [k: string]: unknown; } export interface BetResultResponse { results: string[]; [k: string]: unknown; } export interface BurntAmountResponse { amount: Uint128; [k: string]: unknown; } export interface ContractStateResponse { data: State; [k: string]: unknown; } export interface InstantiateMsg { cw20_addr: Addr; initial_computed_results: string[]; max_bet_amount: Uint128; min_balance: Uint128; min_bet_amount: Uint128; [k: string]: unknown; } export interface OperatorResponse { operator: Addr; [k: string]: unknown; } export interface OwnerResponse { owner: Addr; [k: string]: unknown; } export declare type QueryMsg = { GetAllBettingHistory: { count?: number | null; from?: Uint128 | null; [k: string]: unknown; }; } | { GetRandomness: { round: number; [k: string]: unknown; }; } | { GetOwner: { [k: string]: unknown; }; } | { GetBurntAmount: { [k: string]: unknown; }; } | { GetBetAmountRange: { [k: string]: unknown; }; } | { GetBetResult: { count: number; [k: string]: unknown; }; } | { GetOperator: { [k: string]: unknown; }; } | { GetBetDataById: { bet_id: number; [k: string]: unknown; }; }; export interface RandomnessResponse { value: number; [k: string]: unknown; } export declare type CanonicalAddr = string; export interface State { bet_id: Uint128; burnt_amount: Uint128; cw20_addr: Addr; max_bet_amount: Uint128; min_balance: Uint128; min_bet_amount: Uint128; operator: CanonicalAddr; owner: CanonicalAddr; [k: string]: unknown; } export interface FlipReadOnlyInterface { contractAddress: string; getAllBettingHistoryQuery: ({ count, from, }: { count?: number; from?: number; }) => Promise; getRandomnessQuery: ({ round, }: { round: number; }) => Promise; getOwnerQuery: () => Promise; getBurntAmountQuery: () => Promise; getBetAmountRangeQuery: () => Promise; getBetResultQuery: ({ count, }: { count: number; }) => Promise; getOperatorQuery: () => Promise; getBetDataByIdQuery: ({ betId, }: { betId: number; }) => Promise; getContractStateQuery: () => Promise; } export declare class FlipQueryClient implements FlipReadOnlyInterface { client: LCDClient; contractAddress: string; network: NETWORK; constructor(client: LCDClient); setNetwork: () => NETWORK; getAllBettingHistoryQuery: ({ count, from, }: { count?: number | undefined; from?: number | undefined; }) => Promise; getRandomnessQuery: ({ round, }: { round: number; }) => Promise; getOwnerQuery: () => Promise; getBurntAmountQuery: () => Promise; getBetAmountRangeQuery: () => Promise; getBetResultQuery: ({ count, }: { count: number; }) => Promise; getOperatorQuery: () => Promise; getBetDataByIdQuery: ({ betId, }: { betId: number; }) => Promise; getContractStateQuery: () => Promise; } export interface FlipInterface extends FlipReadOnlyInterface { contractAddress: string; bet: ({ actor, amount, bet, betResult, computedResults, key, resultHash, }: { actor: string; amount: string; bet: number; betResult: boolean; computedResults: string[]; key: string; resultHash: string; }, funds?: Coins) => Promise; withdraw: (funds?: Coins) => Promise; setMinBalance: ({ minBalance, }: { minBalance: string; }, funds?: Coins) => Promise; setNewOwner: ({ newOwner, }: { newOwner: string; }, funds?: Coins) => Promise; setBetAmountRange: ({ max, min, }: { max: string; min: string; }, funds?: Coins) => Promise; setCw20TokenAddress: ({ newToken, }: { newToken: string; }, funds?: Coins) => Promise; addResult: ({ result, }: { result: string[]; }, funds?: Coins) => Promise; sliceResult: ({ count, }: { count: number; }, funds?: Coins) => Promise; setOperator: ({ address, }: { address: string; }, funds?: Coins) => Promise; } export declare class FlipClient extends FlipQueryClient implements FlipInterface { client: LCDClient; wallet: Wallet | ConnectedWallet; taxRate: any; taxCap: any; constructor(client: LCDClient, wallet: Wallet | ConnectedWallet); initGas: () => void; calcFee: (luncAmount: string, msgs: Msg[]) => Promise<{ fee: Fee; actualFunds: Coins; }>; bet: ({ actor, amount, bet, betResult, computedResults, key, resultHash, }: { actor: string; amount: string; bet: number; betResult: boolean; computedResults: string[]; key: string; resultHash: string; }, funds?: Coins | undefined) => Promise; withdraw: (funds?: Coins | undefined) => Promise; setMinBalance: ({ minBalance, }: { minBalance: string; }, funds?: Coins | undefined) => Promise; setNewOwner: ({ newOwner, }: { newOwner: string; }, funds?: Coins | undefined) => Promise; setBetAmountRange: ({ max, min, }: { max: string; min: string; }, funds?: Coins | undefined) => Promise; setCw20TokenAddress: ({ newToken, }: { newToken: string; }, funds?: Coins | undefined) => Promise; addResult: ({ result, }: { result: string[]; }, funds?: Coins | undefined) => Promise; sliceResult: ({ count, }: { count: number; }, funds?: Coins | undefined) => Promise; setOperator: ({ address, }: { address: string; }, funds?: Coins | undefined) => Promise; }