import { Sha256Hash } from "../hash/sha256hash"; import { PublicAddress } from "../blockchain/ed_keys"; import { Block, BlockHeader } from "../blockchain/block"; import { Transaction, CommandReceipt, Receipt } from "../blockchain/transaction"; import { Stake } from "../blockchain/stake"; import { Option } from "../serde/option"; import { Serializable } from "../serde/serializable"; import { Enum, TypeCtorParams, u32, u64 } from "../constants"; export declare class SubmitTransactionRequest extends Serializable { transaction: Transaction; constructor({ transaction }: TypeCtorParams); } export declare class SubmitTransactionResponse extends Serializable { error: Option; constructor({ error }: TypeCtorParams); } export declare enum SubmitTransactionError { UnacceptableNonce = 0, MempoolFull = 1, Other = 2 } export declare class TransactionRequest extends Serializable { transaction_hash: Sha256Hash; include_receipt: boolean; constructor({ transaction_hash, include_receipt, }: TypeCtorParams); } export declare class TransactionResponse extends Serializable { transaction: Option; receipt: Option; block_hash: Option; position: Option; constructor({ transaction, receipt, block_hash, position, }: TypeCtorParams); } export declare class TransactionPositionRequest extends Serializable { transaction_hash: Sha256Hash; constructor({ transaction_hash, }: TypeCtorParams); } export declare class TransactionPositionResponse extends Serializable { transaction_hash: Option; block: Option; position: Option; constructor({ transaction_hash, block, position, }: TypeCtorParams); } export declare class ReceiptRequest extends Serializable { transaction_hash: Sha256Hash; constructor({ transaction_hash }: TypeCtorParams); } export declare class ReceiptResponse extends Serializable { transaction_hash: Sha256Hash; receipt: Option; block_hash: Option; position: Option; constructor({ transaction_hash, receipt, block_hash, position, }: TypeCtorParams); } export declare class BlockRequest extends Serializable { block_hash: Sha256Hash; constructor({ block_hash }: TypeCtorParams); } export declare class BlockResponse extends Serializable { block: Option; constructor({ block }: TypeCtorParams); } export declare class BlockHeaderRequest extends Serializable { block_hash: Sha256Hash; constructor({ block_hash }: TypeCtorParams); } export declare class BlockHeaderResponse extends Serializable { block_header: Option; constructor({ block_header }: TypeCtorParams); } export declare class BlockHeightByHashRequest extends Serializable { block_hash: Sha256Hash; constructor({ block_hash }: TypeCtorParams); } export declare class BlockHeightByHashResponse extends Serializable { block_hash: Sha256Hash; block_height: Option; constructor({ block_hash, block_height, }: TypeCtorParams); } export declare class BlockHashByHeightRequest extends Serializable { block_height: u64; constructor({ block_height }: TypeCtorParams); } export declare class BlockHashByHeightResponse extends Serializable { block_height: u64; block_hash: Option; constructor({ block_height, block_hash, }: TypeCtorParams); } export declare class HighestCommittedBlockResponse extends Serializable { block_hash: Option; constructor({ block_hash }: TypeCtorParams); } export declare class StateRequest extends Serializable { accounts: Set; include_contract: boolean; storage_keys: Map>; constructor({ accounts, include_contract, storage_keys, }: TypeCtorParams); } export declare class StateResponse extends Serializable { accounts: Map; storage_tuples: Map>; block_hash: Sha256Hash; constructor({ accounts, storage_tuples, block_hash, }: TypeCtorParams); } export declare class ValidatorSetsRequest extends Serializable { include_prev: boolean; include_prev_delegators: boolean; include_curr: boolean; include_curr_delegators: boolean; include_next: boolean; include_next_delegators: boolean; constructor({ include_prev, include_prev_delegators, include_curr, include_curr_delegators, include_next, include_next_delegators, }: TypeCtorParams); } export declare class ValidatorSetsResponse extends Serializable { prev_validator_set: Option>; curr_validator_set: Option; next_validator_set: Option; block_hash: Sha256Hash; constructor({ prev_validator_set, curr_validator_set, next_validator_set, block_hash, }: TypeCtorParams); } export declare class PoolsRequest extends Serializable { operators: Set; include_stakes: boolean; constructor({ operators, include_stakes }: TypeCtorParams); } export declare class PoolsResponse extends Serializable { pools: Map>; block_hash: Sha256Hash; constructor({ pools, block_hash }: TypeCtorParams); } export declare class StakesRequest extends Serializable { stakes: Set<[PublicAddress, PublicAddress]>; constructor({ stakes }: TypeCtorParams); } export declare class StakesResponse extends Serializable { stakes: Map<[PublicAddress, PublicAddress], Option>; block_hash: Sha256Hash; constructor({ stakes, block_hash }: TypeCtorParams); } export declare class DepositsRequest extends Serializable { stakes: Set<[PublicAddress, PublicAddress]>; constructor({ stakes }: TypeCtorParams); } export declare class DepositsResponse extends Serializable { deposits: Map<[PublicAddress, PublicAddress], Option>; block_hash: Sha256Hash; constructor({ deposits, block_hash }: TypeCtorParams); } export declare class Deposit extends Serializable { owner: PublicAddress; balance: u64; auto_stake_rewards: boolean; constructor({ owner, balance, auto_stake_rewards }: TypeCtorParams); } export declare class Account extends Enum { accountWithContract?: AccountWithContract; accountWithoutContract?: AccountWithoutContract; } export declare class AccountWithContract extends Serializable { nonce: u64; balance: u64; contract: Option; cbi_version: Option; storage_hash: Option; /** * @deprecated to be removed, check wrapper enum or instance type instead */ static index: number; constructor({ nonce, balance, contract, cbi_version, storage_hash, }: TypeCtorParams); index(): number; } export declare class AccountWithoutContract extends Serializable { nonce: u64; balance: u64; cbi_version: Option; storage_hash: Option; static index: number; constructor({ nonce, balance, cbi_version, storage_hash, }: TypeCtorParams); /** * @deprecated to be removed, check wrapper enum or instance type instead */ index(): number; } export declare class ViewRequest extends Serializable { target: PublicAddress; method: Uint8Array; args: Option; constructor({ target, method, args }: TypeCtorParams); } export declare class ViewResponse extends Serializable { receipt: CommandReceipt; constructor({ receipt }: TypeCtorParams); } export declare class ValidatorSet extends Enum { poolsWithDelegator?: PoolWithDelegator[]; poolsWithoutDelegator?: PoolWithoutDelegator[]; } export declare class Pool extends Enum { poolWithDelegator?: PoolWithDelegator; poolWithoutDelegator?: PoolWithoutDelegator; } export declare class PoolWithDelegator extends Serializable { operator: PublicAddress; power: u64; commission_rate: number; operator_stake: Option; delegated_stakes: Stake[]; /** * @deprecated to be removed, check wrapper enum or instance type instead */ static index: number; constructor({ operator, power, commission_rate, operator_stake, delegated_stakes, }: TypeCtorParams); /** * @deprecated to be removed, check wrapper enum or instance type instead */ index(): number; } export declare class PoolWithoutDelegator extends Serializable { operator: PublicAddress; power: u64; commission_rate: number; operator_stake: Option; /** * @deprecated to be removed, check wrapper enum or instance type instead */ static index: number; constructor({ operator, power, commission_rate, operator_stake, }: TypeCtorParams); /** * @deprecated to be removed, check wrapper enum or instance type instead */ index(): number; }