UNPKG

@roochnetwork/sdk

Version:
285 lines (222 loc) 7.51 kB
// This file was generated by `yarn gen:client`. Please, do not modify it. export type AnnotatedEventView = { event: EventView; parsed_event_data: AnnotatedMoveStructView; sender: RoochAccountAddress; timestamp_ms?: number | null; tx_hash?: Hex | null; }; export type AnnotatedFunctionResultView = { return_values?: AnnotatedFunctionReturnValueView[] | null; vm_status: VMStatusView; }; export type AnnotatedFunctionReturnValueView = { move_value: AnnotatedMoveValueView; value: FunctionReturnValueView; }; export type AnnotatedMoveStructView = { abilities: number; type: RoochStructTag; value: { [key: string]: AnnotatedMoveValueView }; }; export type AnnotatedMoveValueView = | number | unknown | u128 | boolean | RoochAccountAddress | AnnotatedMoveValueView[] | Uint8Array | AnnotatedMoveStructView | SpecificStructView | number | number | RoochU256; export type AnnotatedStateView = { move_value: AnnotatedMoveValueView; state: StateView; }; export type AuthenticatorView = { auth_validator_id: u64; payload: Uint8Array }; export type BalanceInfoView = { balance: RoochU256; coin_type: RoochStructTag; decimals: number; symbol: string; }; // A struct that represents a globally unique id for an Event stream that a user can listen to. the Unique ID is a combination of event handle id and event seq number. the ID is local to this particular fullnode and will be different from other fullnode. export type EventID = { event_handle_id: unknown; event_seq: number }; export type EventView = { event_data: Uint8Array; event_id: EventID; event_index: number; type_tag: RoochTypeTag; }; export type ExecuteTransactionResponseView = { execution_info: TransactionExecutionInfoView; output: TransactionOutputView; sequence_info: TransactionSequenceInfoView; }; export type FunctionCallView = { args: Uint8Array[]; function_id: RoochFunctionId; ty_args: RoochTypeTag[]; }; export type FunctionReturnValueView = { type_tag: RoochTypeTag; value: Uint8Array; }; // Missing properties and type: H256View // Hex string encoding. export type Hex = string; export type KeptVMStatusView0 = { type: string }; export type KeptVMStatusView1 = { type: string }; export type KeptVMStatusView2 = { abort_code: u64; location: AbortLocation; type: string; }; export type KeptVMStatusView3 = { code_offset: number; function: number; location: AbortLocation; type: string; }; export type KeptVMStatusView4 = { type: string }; export type KeptVMStatusView = | KeptVMStatusView0 | KeptVMStatusView1 | KeptVMStatusView2 | KeptVMStatusView3 | KeptVMStatusView4; export type MoveActionTypeView = string; export type MoveActionView = { function_call?: FunctionCallView | null; module_bundle?: Uint8Array[] | null; script_call?: ScriptCallView | null; }; export type MoveAsciiString = { bytes: number[] }; export type MoveString = { bytes: number[] }; // Missing properties and type: ObjectID export type OpView_for_StateView0 = { type: string; value: Uint8Array; value_type: RoochTypeTag; }; export type OpView_for_StateView1 = { type: string; value: Uint8Array; value_type: RoochTypeTag; }; export type OpView_for_StateView2 = { type: string }; export type OpView_for_StateView = | OpView_for_StateView0 | OpView_for_StateView1 | OpView_for_StateView2; // `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first item. export type AnnotatedEventResultPageView = { data: AnnotatedEventView | null[]; has_next_page: boolean; next_cursor?: number | null; }; // `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first item. export type PageView_for_Nullable_AnnotatedStateView_and_alloc_vec_Vec_U8Array = { data: AnnotatedStateView | null[]; has_next_page: boolean; next_cursor?: Uint8Array | null; }; // `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first item. export type PageView_for_Nullable_BalanceInfoView_and_alloc_vec_Vec_U8Array = { data: BalanceInfoView | null[]; has_next_page: boolean; next_cursor?: Uint8Array | null; }; // `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first item. export type StateResultPageView = { data: StateView | null[]; has_next_page: boolean; next_cursor?: Uint8Array | null; }; // `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first item. export type TransactionResultPageView = { data: TransactionResultView[]; has_next_page: boolean; next_cursor?: number | null; }; export type ScriptCallView = { args: Uint8Array[]; code: Uint8Array; ty_args: RoochTypeTag[]; }; // Some specific struct that we want to display in a special way for better readability export type SpecificStructView = MoveString | MoveAsciiString | Hex; export type StateChangeSetView = { changes: { [key: string]: TableChangeView }; new_tables: { [key: string]: TableTypeInfoView }; removed_tables: Hex[]; }; export type StateView = { value: Uint8Array; value_type: RoochTypeTag }; export type TableChangeView = { entries: { [key: string]: OpView_for_StateView }; }; export type TableTypeInfoView = { key_type: RoochTypeTag }; export type TransactionExecutionInfoView = { event_root: Hex; gas_used: number; state_root: Hex; status: KeptVMStatusView; tx_hash: Hex; }; export type TransactionOutputView = { events: EventView[]; gas_used: number; status: KeptVMStatusView; table_changeset: StateChangeSetView; }; export type TransactionResultView = { execution_info: TransactionExecutionInfoView; sequence_info: TransactionSequenceInfoView; transaction: TransactionView; }; export type TransactionSequenceInfoView = { tx_accumulator_root: Hex; tx_order: u128; tx_order_signature: AuthenticatorView; }; export type TransactionTypeView = string; export type TransactionView = { action: MoveActionView; action_type: MoveActionTypeView; raw: Uint8Array; sender: string; sequence_number: number; transaction_type: TransactionTypeView; }; export type VMStatusView0 = string; export type VMStatusView1 = { MoveAbort: { abort_code: u64; location: AbortLocation }; }; export type VMStatusView2 = { ExecutionFailure: { code_offset: number; function: number; location: AbortLocation; status_code: u64; }; }; export type VMStatusView3 = { Error: u64 }; export type VMStatusView = | VMStatusView0 | VMStatusView1 | VMStatusView2 | VMStatusView3; export type RoochAccountAddress = string; export type RoochStructTag = string; export type RoochTypeTag = string; export type RoochU256 = string; export type AbortLocation = string; export type AccessPath = string; export type RoochFunctionId = string; export type u128 = string; export type u64 = string; // This file was generated by `yarn gen:client`. Please, do not modify it.