import { AccountAddress, CcdAmount, ConcordiumGRPCClient } from '@concordium/web-sdk'; /** * Data and state of a smart contract. */ export interface Info { /** * Version of the contract's semantics. */ version: number; /** * The contract's index on the chain. */ index: bigint; /** * The contract's name without the "init_" prefix. */ name: string; /** * The contract's balance. */ amount: CcdAmount.Type; /** * The address of the account that owns the contract. */ owner: AccountAddress.Type; /** * The contract's invokable methods. */ methods: string[]; /** * The reference identifier of the contract's module. */ moduleRef: string; } /** * A {@link useContractSelector} instance. */ export interface ContractSelector { /** * The selected contract info, if available. * Is undefined if there isn't any index to look up, during lookup, or the lookup failed. * In the latter case {@link error} will be non-empty. */ selected: Info | undefined; /** * Indicator of whether the lookup is in progress. */ isLoading: boolean; /** * Error parsing the input string or RPC error looking up the contract. */ error: string; } /** * React hook to look up a smart contract's data and state from its index. * @param rpc gRPC client through which to perform the lookup. * @param input The index of the contract to look up. * @return The resolved contract and related state. */ export declare function useContractSelector(rpc: ConcordiumGRPCClient | undefined, input: string): ContractSelector; //# sourceMappingURL=useContractSelector.d.ts.map