@yubing744/rooch-sdk
Version:
449 lines (448 loc) • 12.5 kB
TypeScript
export type AnnotatedFunctionResultView = {
return_values: AnnotatedFunctionReturnValueView[] | null;
vm_status: VMStatusView;
};
export type AnnotatedFunctionReturnValueView = {
decoded_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 AuthenticatorView = {
auth_validator_id: u64;
payload: Uint8Array;
};
export type BalanceInfoView = {
balance: RoochU256;
coin_type: RoochStructTag;
decimals: number;
name: string;
supply: RoochU256;
symbol: string;
};
export type DynamicFieldView = {
k: KeyStateView;
v: OpView_for_StateView;
};
export type EventFilterView0 = {
event_type: RoochStructTag;
};
export type EventFilterView1 = {
sender: RoochAccountAddress;
};
export type EventFilterView2 = {
tx_hash: primitive_types_H256;
};
export type EventFilterView3 = {
time_range: {
end_time: number;
start_time: number;
};
};
export type EventFilterView4 = {
tx_order_range: {
from_order: number;
to_order: number;
};
};
export type EventFilterView = EventFilterView0 | EventFilterView1 | EventFilterView2 | EventFilterView3 | EventFilterView4;
export type EventID = {
event_handle_id: unknown;
event_seq: number;
};
export type EventOptions = {
decode: boolean;
};
export type EventView = {
decoded_event_data: AnnotatedMoveStructView | null;
event_data: Uint8Array;
event_id: EventID;
event_index: number;
event_type: RoochStructTag;
};
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;
};
export type GlobalStateFilterView0 = {
object_type_with_owner: {
object_type: RoochStructTag;
owner: RoochAccountAddress;
};
};
export type GlobalStateFilterView1 = {
object_type: RoochStructTag;
};
export type GlobalStateFilterView2 = {
owner: RoochAccountAddress;
};
export type GlobalStateFilterView3 = {
object_id: Hex;
};
export type GlobalStateFilterView4 = {
multi_chain_address: {
address: string;
multichain_id: number;
};
};
export type GlobalStateFilterView = GlobalStateFilterView0 | GlobalStateFilterView1 | GlobalStateFilterView2 | GlobalStateFilterView3 | GlobalStateFilterView4;
export type Hex = string;
export type IndexerEventID = {
event_index: number;
tx_order: number;
};
export type IndexerEventView = {
created_at: number;
decoded_event_data: AnnotatedMoveStructView | null;
event_data: Uint8Array;
event_id: EventID;
event_type: RoochStructTag;
indexer_event_id: IndexerEventID;
sender: RoochAccountAddress;
tx_hash: primitive_types_H256;
};
export type IndexerGlobalStateView = {
created_at: number;
flag: number;
object_id: Hex;
object_type: RoochStructTag;
owner: RoochAccountAddress;
size: number;
state_index: number;
state_root: RoochAccountAddress;
tx_order: number;
updated_at: number;
value: AnnotatedMoveStructView;
};
export type IndexerStateID = {
state_index: number;
tx_order: number;
};
export type IndexerTableChangeSetView = {
created_at: number;
state_index: number;
table_change_set: TableChangeSetView;
table_handle: Hex;
tx_order: number;
};
export type IndexerTableStateView = {
created_at: number;
key: AnnotatedMoveValueView;
key_hex: string;
key_type: RoochTypeTag;
state_index: number;
table_handle: Hex;
tx_order: number;
updated_at: number;
value: AnnotatedMoveValueView;
value_type: RoochTypeTag;
};
export type InscriptionFilterView0 = {
owner: rooch_types_address_BitcoinAddress;
};
export type InscriptionFilterView1 = {
object_id: Hex;
};
export type InscriptionFilterView = InscriptionFilterView0 | InscriptionFilterView1;
export type InscriptionStateView = {
created_at: number;
flag: number;
object_id: Hex;
object_type: RoochStructTag;
owner: RoochAccountAddress;
owner_bitcoin_address: string | null;
state_index: number;
tx_order: number;
updated_at: number;
value: InscriptionView;
};
export type InscriptionView = {
bitcoin_txid: bitcoin_hash_types_newtypes_Txid;
body: Uint8Array;
content_encoding: moveos_types_move_std_string_MoveString | null;
content_type: moveos_types_move_std_string_MoveString | null;
index: number;
metadata: Uint8Array;
metaprotocol: moveos_types_move_std_string_MoveString | null;
parent: Hex | null;
pointer: number | null;
txid: RoochAccountAddress;
};
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 KeyStateView = {
decoded_key: AnnotatedMoveValueView | null;
key: Uint8Array;
key_type: RoochTypeTag;
};
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[];
};
export type OpView_for_StateView0 = {
decoded_value: AnnotatedMoveValueView | null;
type: string;
value: Uint8Array;
value_type: RoochTypeTag;
};
export type OpView_for_StateView1 = {
decoded_value: AnnotatedMoveValueView | null;
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;
export type PageView_for_BalanceInfoView_and_String = {
data: BalanceInfoView[];
has_next_page: boolean;
next_cursor: string | null;
};
export type EventPageView = {
data: EventView[];
has_next_page: boolean;
next_cursor: number | null;
};
export type PageView_for_IndexerEventView_and_IndexerEventID = {
data: IndexerEventView[];
has_next_page: boolean;
next_cursor: IndexerEventID | null;
};
export type GlobalStateView = {
data: IndexerGlobalStateView[];
has_next_page: boolean;
next_cursor: IndexerStateID | null;
};
export type PageView_for_IndexerTableChangeSetView_and_IndexerStateID = {
data: IndexerTableChangeSetView[];
has_next_page: boolean;
next_cursor: IndexerStateID | null;
};
export type TableStateView = {
data: IndexerTableStateView[];
has_next_page: boolean;
next_cursor: IndexerStateID | null;
};
export type InscriptionStatePageView = {
data: InscriptionStateView[];
has_next_page: boolean;
next_cursor: IndexerStateID | null;
};
export type StatePageView = {
data: StateKVView[];
has_next_page: boolean;
next_cursor: string | null;
};
export type TransactionWithInfoPageView = {
data: TransactionWithInfoView[];
has_next_page: boolean;
next_cursor: number | null;
};
export type UTXOStatePageView = {
data: UTXOStateView[];
has_next_page: boolean;
next_cursor: IndexerStateID | null;
};
export type ScriptCallView = {
args: Uint8Array[];
code: Uint8Array;
ty_args: RoochTypeTag[];
};
export type SpecificStructView = MoveString | MoveAsciiString | Hex;
export type StateChangeSetView = {
changes: {
[key: string]: TableChangeView;
};
new_tables: Hex[];
removed_tables: Hex[];
};
export type StateKVView = {
key_state: KeyStateView;
state: StateView;
};
export type StateOptions = {
decode: boolean;
};
export type StateSyncFilterView0 = {
table_handle: Hex;
};
export type StateSyncFilterView = StateSyncFilterView0;
export type StateView = {
decoded_value: AnnotatedMoveValueView | null;
value: Uint8Array;
value_type: RoochTypeTag;
};
export type TableChangeSetView = {
changes: {
[key: string]: TableChangeView;
};
new_tables: Hex[];
removed_tables: Hex[];
};
export type TableChangeView = {
entries: DynamicFieldView[];
size_increment: number;
};
export type TableStateFilterView0 = {
table_handle: Hex;
};
export type TableStateFilterView = TableStateFilterView0;
export type TransactionExecutionInfoView = {
event_root: primitive_types_H256;
gas_used: number;
state_root: primitive_types_H256;
status: KeptVMStatusView;
tx_hash: primitive_types_H256;
};
export type TransactionFilterView0 = {
sender: RoochAccountAddress;
};
export type TransactionFilterView1 = {
original_address: string;
};
export type TransactionFilterView2 = {
tx_hashes: primitive_types_H256[];
};
export type TransactionFilterView3 = {
time_range: {
end_time: number;
start_time: number;
};
};
export type TransactionFilterView4 = {
tx_order_range: {
from_order: number;
to_order: number;
};
};
export type TransactionFilterView = TransactionFilterView0 | TransactionFilterView1 | TransactionFilterView2 | TransactionFilterView3 | TransactionFilterView4;
export type TransactionOutputView = {
events: EventView[];
gas_used: number;
is_upgrade: boolean;
status: KeptVMStatusView;
table_changeset: StateChangeSetView;
};
export type TransactionSequenceInfoView = {
tx_accumulator_root: primitive_types_H256;
tx_order: u64;
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 TransactionWithInfoView = {
execution_info: TransactionExecutionInfoView;
sequence_info: TransactionSequenceInfoView;
transaction: TransactionView;
};
export type UTXOFilterView0 = {
owner: rooch_types_address_BitcoinAddress;
};
export type UTXOFilterView1 = {
object_id: Hex;
};
export type UTXOFilterView = UTXOFilterView0 | UTXOFilterView1;
export type UTXOStateView = {
created_at: number;
flag: number;
object_id: Hex;
object_type: RoochStructTag;
owner: RoochAccountAddress;
owner_bitcoin_address: string | null;
state_index: number;
tx_order: number;
updated_at: number;
value: UTXOView | null;
};
export type UTXOView = {
bitcoin_txid: unknown;
seals: string;
txid: unknown;
value: number;
vout: number;
};
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 bitcoin_hash_types_newtypes_Txid = string;
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 moveos_types_move_std_string_MoveString = string;
export type RoochFunctionId = string;
export type primitive_types_H256 = string;
export type rooch_types_address_BitcoinAddress = string;
export type u128 = string;
export type u64 = string;
export type usize = string;