import Arweave from 'arweave'; import { GQLNodeInterface, GQLTagInterface, VrfData } from './gqlResult'; import { EvaluationOptions } from '../core/index'; /** * * This class is be exposed as a global for contracts * as 'SmartWeave' and provides an API for getting further * information or using utility and crypto functions from * inside the contracts execution. * * It provides an api: * * - SmartWeave.transaction.id * - SmartWeave.transaction.reward * - SmartWeave.block.height * - SmartWeave.block.timestamp * - etc * * and access to some of the arweave utils: * - SmartWeave.arweave.utils * - SmartWeave.arweave.crypto * - SmartWeave.arweave.wallets * - SmartWeave.arweave.ar * * as well as access to the potentially non-deterministic full client: * - SmartWeave.unsafeClient * */ export declare class SmartWeaveGlobal { gasUsed: number; gasLimit: number; transaction: Transaction; block: Block; vrf: Vrf; evaluationOptions: EvaluationOptions; arweave: Pick; contract: { id: string; owner: string; }; unsafeClient: Arweave; contracts: { readContractState: (contractId: string) => Promise; viewContractState: (contractId: string, input: any) => Promise; write: (contractId: string, input: any) => Promise; refreshState: () => Promise; }; _activeTx?: GQLNodeInterface; caller?: string; constructor(arweave: Arweave, contract: { id: string; owner: string; }, evaluationOptions: EvaluationOptions); useGas(gas: number): void; getBalance(address: string, height?: number): Promise; } declare class Transaction { private readonly global; constructor(global: SmartWeaveGlobal); get id(): string; get owner(): string; get target(): string; get tags(): GQLTagInterface[]; get quantity(): string; get reward(): string; } declare class Block { private readonly global; constructor(global: SmartWeaveGlobal); get height(): number; get indep_hash(): string; get timestamp(): number; } declare class Vrf { private readonly global; constructor(global: SmartWeaveGlobal); get data(): VrfData; get value(): string; randomInt(maxValue: number): number; } export {}; //# sourceMappingURL=smartweave-global.d.ts.map