Documentation
¶
Index ¶
- func FormatTimestamp(t time.Time) string
- func ParseTimestamp(timestamp string) (time.Time, error)
- func ValidateAddress(address string) error
- func ValidateBlockHeight(height string) error
- func ValidateHash(hash string) error
- func ValidateTransactionHash(hash string) error
- type AccumulatorInfoView
- type AnnotatedFunctionResultView
- type AnnotatedFunctionReturnValueView
- type AnnotatedMoveStructView
- type AnnotatedMoveValueView
- type BalanceInfoView
- type BitcoinAuthDataView
- type BitcoinStatus
- type BlockHeightHashView
- type BroadcastTXParams
- type DisplayFieldsView
- type DryRunRawTransactionParams
- type DryRunTransactionResponseView
- type ErrorContext
- type EventFilterView
- type EventIDView
- type EventOptions
- type EventTypeWithSenderFilter
- type EventView
- type EventViewBuilder
- func (b *EventViewBuilder) Build() EventView
- func (b *EventViewBuilder) SetDecodedEventData(data *AnnotatedMoveStructView) *EventViewBuilder
- func (b *EventViewBuilder) SetEventData(data string) *EventViewBuilder
- func (b *EventViewBuilder) SetEventID(id EventIDView) *EventViewBuilder
- func (b *EventViewBuilder) SetEventIndex(index string) *EventViewBuilder
- func (b *EventViewBuilder) SetEventType(eventType string) *EventViewBuilder
- type ExecuteRawTransactionParams
- type ExecuteTransactionResponseView
- type ExecuteViewFunctionParams
- type FunctionCallView
- type FunctionReturnValueView
- type GetBalanceParams
- type GetBalancesParams
- type GetChainIDParams
- type GetEventsByEventHandleParams
- type GetFieldStatesParams
- type GetModuleABIParams
- type GetObjectStatesParams
- type GetStatesParams
- type GetTransactionsByHashParams
- type GetTransactionsByOrderParams
- type IndexerEventIDView
- type IndexerEventView
- type IndexerObjectStateView
- type IndexerStateIDView
- type InscriptionFilterView
- type InscriptionIDFilter
- type InscriptionObjectIDFilter
- type InscriptionOwnerFilter
- type InscriptionStateView
- type InscriptionStateViewBuilder
- func (b *InscriptionStateViewBuilder) Build() InscriptionStateView
- func (b *InscriptionStateViewBuilder) SetID(id string) *InscriptionStateViewBuilder
- func (b *InscriptionStateViewBuilder) SetObjectType(objectType string) *InscriptionStateViewBuilder
- func (b *InscriptionStateViewBuilder) SetOwner(owner string) *InscriptionStateViewBuilder
- func (b *InscriptionStateViewBuilder) SetOwnerBitcoinAddress(address string) *InscriptionStateViewBuilder
- func (b *InscriptionStateViewBuilder) SetValue(value InscriptionView) *InscriptionStateViewBuilder
- type InscriptionView
- type KeptVMStatusView
- type L1BlockTxData
- type L1TxData
- type L2TxData
- type LedgerTransactionView
- type LedgerTxDataView
- type ListFieldStatesParams
- type ListStatesParams
- type ModuleABIView
- type MoveActionTypeView
- type MoveActionView
- type MoveFieldView
- type MoveFunctionView
- type MoveStructView
- type PaginatedBalanceInfoViews
- type PaginatedEventViews
- type PaginatedIndexerEventViews
- type PaginatedIndexerObjectStateViews
- type PaginatedInscriptionStateViews
- type PaginatedResponse
- type PaginatedStateChangeSetWithTxOrderViews
- type PaginatedStateKVViews
- type PaginatedTransactionWithInfoViews
- type PaginatedUTXOStateViews
- type PaginationArguments
- type PaginationParams
- type PaginationResult
- type QueryEventsParams
- type QueryInscriptionsParams
- type QueryObjectStatesParams
- type QueryOptions
- type QueryTransactionsParams
- type QueryUTXOsParams
- type RawTransactionOutputView
- type RawTransactionView
- type RepairIndexerParams
- type RoochError
- type RoochStatus
- type SatPointView
- type ScriptCallView
- type SendRawTransactionParams
- type ServiceStatus
- type SessionInfoView
- type StateChangeSetView
- type StateChangeSetViewBuilder
- type StateChangeSetWithTxOrderView
- type StateKVView
- type StateOptions
- type StateValue
- type StateValueWithTxOrder
- type Status
- type StatusParams
- type SyncStatesParams
- type TransactionAuthenticatorView
- type TransactionExecutionInfoView
- type TransactionExecutionInfoViewBuilder
- func (b *TransactionExecutionInfoViewBuilder) AddAuthenticator(auth TransactionAuthenticatorView) *TransactionExecutionInfoViewBuilder
- func (b *TransactionExecutionInfoViewBuilder) Build() TransactionExecutionInfoView
- func (b *TransactionExecutionInfoViewBuilder) SetHash(hash string) *TransactionExecutionInfoViewBuilder
- func (b *TransactionExecutionInfoViewBuilder) SetStatus(status TransactionStatusView) *TransactionExecutionInfoViewBuilder
- type TransactionOutputView
- type TransactionSequenceInfoView
- type TransactionStatusView
- func (t TransactionStatusView) IsExecuted() bool
- func (t TransactionStatusView) IsFailed() bool
- func (t TransactionStatusView) IsPending() bool
- func (t TransactionStatusView) MarshalJSON() ([]byte, error)
- func (t TransactionStatusView) String() string
- func (t *TransactionStatusView) UnmarshalJSON(data []byte) error
- type TransactionWithInfoView
- type UTXOStateView
- type UTXOStateViewBuilder
- func (b *UTXOStateViewBuilder) Build() UTXOStateView
- func (b *UTXOStateViewBuilder) SetAmount(amount string) *UTXOStateViewBuilder
- func (b *UTXOStateViewBuilder) SetBitcoinAddress(address string) *UTXOStateViewBuilder
- func (b *UTXOStateViewBuilder) SetOutPoint(outPoint string) *UTXOStateViewBuilder
- func (b *UTXOStateViewBuilder) SetRoochAddress(address string) *UTXOStateViewBuilder
- func (b *UTXOStateViewBuilder) SetStateIndex(index string) *UTXOStateViewBuilder
- func (b *UTXOStateViewBuilder) SetTxOrder(order string) *UTXOStateViewBuilder
- type VMErrorInfo
- type VMStatusView
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatTimestamp ¶
func ParseTimestamp ¶
Helper method for timestamp handling
func ValidateBlockHeight ¶
func ValidateHash ¶
func ValidateTransactionHash ¶
Helper methods for validation
Types ¶
type AccumulatorInfoView ¶
type AccumulatorInfoView struct { AccumulatorRoot string `json:"accumulator_root"` FrozenSubtreeRoots []string `json:"frozen_subtree_roots"` NumLeaves string `json:"num_leaves"` NumNodes string `json:"num_nodes"` }
AccumulatorInfoView represents information about an accumulator
func NewAccumulatorInfoView ¶
func NewAccumulatorInfoView(root string, frozenRoots []string, leaves, nodes string) AccumulatorInfoView
Helper methods for AccumulatorInfoView
type AnnotatedFunctionResultView ¶
type AnnotatedFunctionResultView struct { ReturnValues *[]AnnotatedFunctionReturnValueView `json:"return_values,omitempty"` VMStatus VMStatusView `json:"vm_status"` }
AnnotatedFunctionResultView represents the result of an annotated function
func NewAnnotatedFunctionResultView ¶
func NewAnnotatedFunctionResultView(returnValues []AnnotatedFunctionReturnValueView, vmStatus VMStatusView) AnnotatedFunctionResultView
Helper methods for AnnotatedFunctionResultView
type AnnotatedFunctionReturnValueView ¶
type AnnotatedFunctionReturnValueView struct { DecodedValue AnnotatedMoveValueView `json:"decoded_value"` Value FunctionReturnValueView `json:"value"` }
AnnotatedFunctionReturnValueView represents a return value from an annotated function
type AnnotatedMoveStructView ¶
type AnnotatedMoveStructView struct { Abilities int `json:"abilities"` Type string `json:"type"` Value map[string]AnnotatedMoveValueView `json:"value"` }
AnnotatedMoveStructView represents an annotated Move structure
type AnnotatedMoveValueView ¶
type AnnotatedMoveValueView interface{}
AnnotatedMoveValueView represents different possible Move values
type BalanceInfoView ¶
type BalanceInfoView struct { Balance string `json:"balance"` CoinType string `json:"coin_type"` Decimals int `json:"decimals"` IconURL *string `json:"icon_url,omitempty"` Name string `json:"name"` Supply string `json:"supply"` Symbol string `json:"symbol"` }
BalanceInfoView represents balance information
func NewBalanceInfoView ¶
func NewBalanceInfoView(balance, coinType string, decimals int, name, supply, symbol string) BalanceInfoView
Helper methods for BalanceInfoView
func (*BalanceInfoView) SetIconURL ¶
func (b *BalanceInfoView) SetIconURL(url string)
Helper method to set optional IconURL
type BitcoinAuthDataView ¶
type BitcoinAuthDataView struct { Address string `json:"address"` Message string `json:"message"` Signature string `json:"signature"` }
BitcoinAuthDataView represents Bitcoin authentication data
func NewBitcoinAuthDataView ¶
func NewBitcoinAuthDataView(address, message, signature string) BitcoinAuthDataView
Helper method for creating new BitcoinAuthDataView
type BitcoinStatus ¶
type BitcoinStatus struct { ConfirmedBlock *BlockHeightHashView `json:"confirmed_block,omitempty"` PendingBlock *BlockHeightHashView `json:"pending_block,omitempty"` }
BitcoinStatus represents the status of Bitcoin
func (*BitcoinStatus) SetConfirmedBlock ¶
func (b *BitcoinStatus) SetConfirmedBlock(block BlockHeightHashView)
Helper method to set confirmed block
func (*BitcoinStatus) SetPendingBlock ¶
func (b *BitcoinStatus) SetPendingBlock(block BlockHeightHashView)
Helper method to set pending block
type BlockHeightHashView ¶
type BlockHeightHashView struct { BlockHash string `json:"block_hash"` BlockHeight string `json:"block_height"` }
BlockHeightHashView represents a block height and hash
type BroadcastTXParams ¶
type BroadcastTXParams struct { Hex string `json:"hex"` MaxFeeRate *int `json:"maxfeerate,omitempty"` MaxBurnAmount *int `json:"maxburnamount,omitempty"` }
BroadcastTXParams represents parameters for broadcasting a Bitcoin transaction
type DisplayFieldsView ¶
DisplayFieldsView represents display fields
type DryRunRawTransactionParams ¶
type DryRunRawTransactionParams struct {
TxBcsHex string `json:"txBcsHex"`
}
DryRunRawTransactionParams represents parameters for dry running a raw transaction
type DryRunTransactionResponseView ¶
type DryRunTransactionResponseView struct { RawOutput RawTransactionOutputView `json:"raw_output"` VMErrorInfo VMErrorInfo `json:"vm_error_info"` }
DryRunTransactionResponseView represents the response of a dry run transaction
type ErrorContext ¶
Helper methods for error handling with context
type EventFilterView ¶
type EventFilterView interface{}
EventFilterView represents different types of event filters
type EventIDView ¶
type EventIDView struct { EventHandleID string `json:"event_handle_id"` EventSeq string `json:"event_seq"` }
EventIDView represents an event ID
type EventOptions ¶
type EventOptions struct {
Decode *bool `json:"decode,omitempty"`
}
EventOptions represents options for events
type EventTypeWithSenderFilter ¶
type EventTypeWithSenderFilter struct { EventType string `json:"event_type"` Sender string `json:"sender"` }
EventTypeWithSenderFilter represents an event filter by type and sender
func NewEventTypeWithSenderFilter ¶
func NewEventTypeWithSenderFilter(eventType, sender string) EventTypeWithSenderFilter
Helper method for EventFilterView creation
type EventView ¶
type EventView struct { DecodedEventData *AnnotatedMoveStructView `json:"decoded_event_data,omitempty"` EventData string `json:"event_data"` EventID EventIDView `json:"event_id"` EventIndex string `json:"event_index"` EventType string `json:"event_type"` }
EventView represents an event
func NewEventView ¶
func NewEventView(eventData string, eventID EventIDView, eventIndex, eventType string) EventView
Helper method for creating new EventView
type EventViewBuilder ¶
type EventViewBuilder struct {
// contains filtered or unexported fields
}
Helper methods for EventView
func NewEventViewBuilder ¶
func NewEventViewBuilder() *EventViewBuilder
func (*EventViewBuilder) Build ¶
func (b *EventViewBuilder) Build() EventView
func (*EventViewBuilder) SetDecodedEventData ¶
func (b *EventViewBuilder) SetDecodedEventData(data *AnnotatedMoveStructView) *EventViewBuilder
func (*EventViewBuilder) SetEventData ¶
func (b *EventViewBuilder) SetEventData(data string) *EventViewBuilder
func (*EventViewBuilder) SetEventID ¶
func (b *EventViewBuilder) SetEventID(id EventIDView) *EventViewBuilder
func (*EventViewBuilder) SetEventIndex ¶
func (b *EventViewBuilder) SetEventIndex(index string) *EventViewBuilder
func (*EventViewBuilder) SetEventType ¶
func (b *EventViewBuilder) SetEventType(eventType string) *EventViewBuilder
type ExecuteRawTransactionParams ¶
type ExecuteRawTransactionParams struct { TxBcsHex string `json:"txBcsHex"` TxOption *TxOptions `json:"txOption,omitempty"` }
ExecuteRawTransactionParams represents parameters for executing a raw transaction
type ExecuteTransactionResponseView ¶
type ExecuteTransactionResponseView struct { ErrorInfo *DryRunTransactionResponseView `json:"error_info,omitempty"` ExecutionInfo TransactionExecutionInfoView `json:"execution_info"` Output *TransactionOutputView `json:"output,omitempty"` SequenceInfo TransactionSequenceInfoView `json:"sequence_info"` }
ExecuteTransactionResponseView represents the response of an executed transaction
type ExecuteViewFunctionParams ¶
type ExecuteViewFunctionParams struct {
FunctionCall FunctionCallView `json:"functionCall"`
}
ExecuteViewFunctionParams represents parameters for executing a view function
type FunctionCallView ¶
type FunctionCallView struct { Args []string `json:"args"` FunctionID string `json:"function_id"` TyArgs []string `json:"ty_args"` }
FunctionCallView represents a function call
type FunctionReturnValueView ¶
type FunctionReturnValueView struct { TypeTag string `json:"type_tag"` Value string `json:"value"` }
FunctionReturnValueView represents a function return value
type GetBalanceParams ¶
GetBalanceParams represents parameters for getting account balance
type GetBalancesParams ¶
type GetBalancesParams struct { Owner string `json:"owner"` Cursor *IndexerStateIDView `json:"cursor,omitempty"` Limit *string `json:"limit,omitempty"` }
GetBalancesParams represents parameters for getting account balances
type GetChainIDParams ¶
type GetChainIDParams struct{}
GetChainIDParams represents empty parameters for getting chain ID
type GetEventsByEventHandleParams ¶
type GetEventsByEventHandleParams struct { EventHandleType string `json:"eventHandleType"` Cursor *string `json:"cursor,omitempty"` Limit *string `json:"limit,omitempty"` DescendingOrder *bool `json:"descendingOrder,omitempty"` EventOptions *EventOptions `json:"eventOptions,omitempty"` }
GetEventsByEventHandleParams represents parameters for getting events by handle
type GetFieldStatesParams ¶
type GetFieldStatesParams struct { ObjectID string `json:"objectId"` FieldKey []string `json:"fieldKey"` StateOption *StateOptions `json:"stateOption,omitempty"` }
GetFieldStatesParams represents parameters for getting object field states
type GetModuleABIParams ¶
type GetModuleABIParams struct { ModuleAddr string `json:"moduleAddr"` ModuleName string `json:"moduleName"` }
GetModuleABIParams represents parameters for getting module ABI
type GetObjectStatesParams ¶
type GetObjectStatesParams struct { ObjectIDs string `json:"objectIds"` StateOption *StateOptions `json:"stateOption,omitempty"` }
GetObjectStatesParams represents parameters for getting object states
type GetStatesParams ¶
type GetStatesParams struct { AccessPath string `json:"accessPath"` StateOption *StateOptions `json:"stateOption,omitempty"` }
GetStatesParams represents parameters for getting states
type GetTransactionsByHashParams ¶
type GetTransactionsByHashParams struct {
TxHashes []string `json:"txHashes"`
}
GetTransactionsByHashParams represents parameters for getting transactions by hash
type GetTransactionsByOrderParams ¶
type GetTransactionsByOrderParams struct { Cursor *string `json:"cursor,omitempty"` Limit *string `json:"limit,omitempty"` DescendingOrder *bool `json:"descendingOrder,omitempty"` }
GetTransactionsByOrderParams represents parameters for getting transactions by order
type IndexerEventIDView ¶
type IndexerEventIDView struct { EventIndex string `json:"event_index"` TxOrder string `json:"tx_order"` }
IndexerEventIDView represents an indexer event ID
type IndexerEventView ¶
type IndexerEventView struct { CreatedAt string `json:"created_at"` DecodedEventData *AnnotatedMoveStructView `json:"decoded_event_data,omitempty"` EventData string `json:"event_data"` EventID EventIDView `json:"event_id"` EventType string `json:"event_type"` IndexerEventID IndexerEventIDView `json:"indexer_event_id"` Sender string `json:"sender"` TxHash string `json:"tx_hash"` }
IndexerEventView represents an indexer event
type IndexerObjectStateView ¶
type IndexerObjectStateView struct { CreatedAt string `json:"created_at"` DecodedValue *AnnotatedMoveStructView `json:"decoded_value,omitempty"` DisplayFields *DisplayFieldsView `json:"display_fields,omitempty"` Flag int `json:"flag"` ID string `json:"id"` ObjectType string `json:"object_type"` Owner string `json:"owner"` OwnerBitcoinAddress *string `json:"owner_bitcoin_address,omitempty"` Size string `json:"size"` StateIndex string `json:"state_index"` StateRoot *string `json:"state_root,omitempty"` TxOrder string `json:"tx_order"` UpdatedAt string `json:"updated_at"` Value string `json:"value"` }
IndexerObjectStateView represents an indexer object state
type IndexerStateIDView ¶
type IndexerStateIDView struct { StateIndex string `json:"state_index"` TxOrder string `json:"tx_order"` }
IndexerStateIDView represents an indexer state ID
type InscriptionFilterView ¶
type InscriptionFilterView interface{}
InscriptionFilterView represents different types of inscription filters
type InscriptionIDFilter ¶
type InscriptionIDFilter struct {
InscriptionID string `json:"inscription_id"`
}
type InscriptionObjectIDFilter ¶
type InscriptionObjectIDFilter struct {
ObjectID string `json:"object_id"`
}
type InscriptionOwnerFilter ¶
type InscriptionOwnerFilter struct {
Owner string `json:"owner"`
}
func NewInscriptionOwnerFilter ¶
func NewInscriptionOwnerFilter(owner string) InscriptionOwnerFilter
Helper method for InscriptionFilterView creation
type InscriptionStateView ¶
type InscriptionStateView struct { CreatedAt string `json:"created_at"` Flag int `json:"flag"` ID string `json:"id"` ObjectType string `json:"object_type"` Owner string `json:"owner"` OwnerBitcoinAddress *string `json:"owner_bitcoin_address,omitempty"` Size string `json:"size"` StateIndex string `json:"state_index"` StateRoot *string `json:"state_root,omitempty"` TxOrder string `json:"tx_order"` UpdatedAt string `json:"updated_at"` Value InscriptionView `json:"value"` }
InscriptionStateView represents an inscription state
type InscriptionStateViewBuilder ¶
type InscriptionStateViewBuilder struct {
// contains filtered or unexported fields
}
Helper methods for InscriptionStateView
func NewInscriptionStateViewBuilder ¶
func NewInscriptionStateViewBuilder() *InscriptionStateViewBuilder
func (*InscriptionStateViewBuilder) Build ¶
func (b *InscriptionStateViewBuilder) Build() InscriptionStateView
func (*InscriptionStateViewBuilder) SetID ¶
func (b *InscriptionStateViewBuilder) SetID(id string) *InscriptionStateViewBuilder
func (*InscriptionStateViewBuilder) SetObjectType ¶
func (b *InscriptionStateViewBuilder) SetObjectType(objectType string) *InscriptionStateViewBuilder
func (*InscriptionStateViewBuilder) SetOwner ¶
func (b *InscriptionStateViewBuilder) SetOwner(owner string) *InscriptionStateViewBuilder
func (*InscriptionStateViewBuilder) SetOwnerBitcoinAddress ¶
func (b *InscriptionStateViewBuilder) SetOwnerBitcoinAddress(address string) *InscriptionStateViewBuilder
func (*InscriptionStateViewBuilder) SetValue ¶
func (b *InscriptionStateViewBuilder) SetValue(value InscriptionView) *InscriptionStateViewBuilder
type InscriptionView ¶
type InscriptionView struct { Body string `json:"body"` Charms int `json:"charms"` ContentEncoding *string `json:"content_encoding,omitempty"` ContentType *string `json:"content_type,omitempty"` ID string `json:"id"` InscriptionNumber int `json:"inscription_number"` Location SatPointView `json:"location"` Metadata string `json:"metadata"` Metaprotocol *string `json:"metaprotocol,omitempty"` Parents []string `json:"parents"` Pointer *string `json:"pointer,omitempty"` SequenceNumber int `json:"sequence_number"` }
InscriptionView represents an inscription
type KeptVMStatusView ¶
type KeptVMStatusView struct { Type string `json:"type"` AbortCode *string `json:"abort_code,omitempty"` Location *string `json:"location,omitempty"` CodeOffset *int `json:"code_offset,omitempty"` Function *int `json:"function,omitempty"` }
KeptVMStatusView represents different types of VM status
type L1BlockTxData ¶
type L2TxData ¶
type L2TxData struct { Action MoveActionView `json:"action"` ActionType MoveActionTypeView `json:"action_type"` Raw string `json:"raw"` Sender string `json:"sender"` SenderBitcoinAddress *string `json:"sender_bitcoin_address,omitempty"` SequenceNumber string `json:"sequence_number"` Type string `json:"type"` // Always "l2_tx" }
type LedgerTransactionView ¶
type LedgerTransactionView struct { Data LedgerTxDataView `json:"data"` SequenceInfo TransactionSequenceInfoView `json:"sequence_info"` }
LedgerTransactionView represents a ledger transaction
type LedgerTxDataView ¶
type LedgerTxDataView interface{}
LedgerTxDataView represents different types of ledger transaction data
type ListFieldStatesParams ¶
type ListFieldStatesParams struct { ObjectID string `json:"objectId"` Cursor *string `json:"cursor,omitempty"` Limit *string `json:"limit,omitempty"` StateOption *StateOptions `json:"stateOption,omitempty"` }
ListFieldStatesParams represents parameters for listing field states
type ListStatesParams ¶
type ListStatesParams struct { AccessPath string `json:"accessPath"` Cursor *string `json:"cursor,omitempty"` Limit *string `json:"limit,omitempty"` StateOption *StateOptions `json:"stateOption,omitempty"` }
ListStatesParams represents parameters for listing states
type ModuleABIView ¶
type ModuleABIView struct { Address string `json:"address"` Friends []string `json:"friends"` Functions []MoveFunctionView `json:"functions"` Name string `json:"name"` Structs []MoveStructView `json:"structs"` }
ModuleABIView represents a Move module ABI
type MoveActionTypeView ¶
type MoveActionTypeView string
MoveActionTypeView represents different types of Move actions
const ( MoveActionTypeScriptCall MoveActionTypeView = "scriptcall" MoveActionTypeFunctionCall MoveActionTypeView = "functioncall" MoveActionTypeModuleBundle MoveActionTypeView = "modulebundle" )
func (MoveActionTypeView) MarshalJSON ¶
func (m MoveActionTypeView) MarshalJSON() ([]byte, error)
Helper methods for JSON handling
func (MoveActionTypeView) String ¶
func (m MoveActionTypeView) String() string
String returns the string representation of MoveActionTypeView
func (*MoveActionTypeView) UnmarshalJSON ¶
func (m *MoveActionTypeView) UnmarshalJSON(data []byte) error
type MoveActionView ¶
type MoveActionView struct { FunctionCall *FunctionCallView `json:"function_call,omitempty"` ModuleBundle *[]string `json:"module_bundle,omitempty"` ScriptCall *ScriptCallView `json:"script_call,omitempty"` }
MoveActionView represents a Move action
type MoveFieldView ¶
MoveFieldView represents a Move field
type MoveFunctionView ¶
type MoveFunctionView struct { Name string `json:"name"` Visibility string `json:"visibility"` IsEntry bool `json:"is_entry"` GenericTypeParams []string `json:"generic_type_params"` Params []string `json:"params"` Returns []string `json:"returns"` }
MoveFunctionView represents a Move function
func NewMoveFunctionView ¶
func NewMoveFunctionView(name, visibility string, isEntry bool) MoveFunctionView
Helper methods for MoveFunctionView
func (*MoveFunctionView) AddGenericTypeParams ¶
func (m *MoveFunctionView) AddGenericTypeParams(params ...string)
Helper method to add generic type parameters
func (*MoveFunctionView) AddParams ¶
func (m *MoveFunctionView) AddParams(params ...string)
Helper method to add parameters
func (*MoveFunctionView) AddReturns ¶
func (m *MoveFunctionView) AddReturns(returns ...string)
Helper method to add return types
type MoveStructView ¶
type MoveStructView struct { Name string `json:"name"` IsNative bool `json:"is_native"` Abilities []string `json:"abilities"` GenericTypeParams []string `json:"generic_type_params"` Fields []MoveFieldView `json:"fields"` }
MoveStructView represents a Move struct
func NewMoveStructView ¶
func NewMoveStructView(name string, isNative bool, abilities []string) MoveStructView
Helper methods for MoveStructView
func (*MoveStructView) AddField ¶
func (m *MoveStructView) AddField(name, fieldType string)
Helper method to add fields to MoveStructView
func (*MoveStructView) AddGenericTypeParams ¶
func (m *MoveStructView) AddGenericTypeParams(params ...string)
Helper method to add generic type parameters
type PaginatedBalanceInfoViews ¶
type PaginatedBalanceInfoViews = PaginatedResponse[BalanceInfoView]
Define specific paginated response types
type PaginatedEventViews ¶
type PaginatedEventViews = PaginatedResponse[EventView]
type PaginatedIndexerEventViews ¶
type PaginatedIndexerEventViews = PaginatedResponse[IndexerEventView]
type PaginatedIndexerObjectStateViews ¶
type PaginatedIndexerObjectStateViews = PaginatedResponse[IndexerObjectStateView]
type PaginatedInscriptionStateViews ¶
type PaginatedInscriptionStateViews = PaginatedResponse[InscriptionStateView]
type PaginatedResponse ¶
type PaginatedResponse[T any] struct { Data []T `json:"data"` HasNextPage bool `json:"has_next_page"` NextCursor interface{} `json:"next_cursor,omitempty"` }
PaginatedResponse is a generic type for paginated responses
func EmptyPaginatedResponse ¶
func EmptyPaginatedResponse[T any]() PaginatedResponse[T]
Helper method for creating empty responses
func NewPaginatedResponse ¶
func NewPaginatedResponse[T any](data []T, hasNextPage bool, nextCursor interface{}) PaginatedResponse[T]
Helper methods for PaginatedResponse
func (*PaginatedResponse[T]) GetItems ¶
func (p *PaginatedResponse[T]) GetItems() []T
func (*PaginatedResponse[T]) GetNextCursor ¶
func (p *PaginatedResponse[T]) GetNextCursor() interface{}
func (*PaginatedResponse[T]) HasMore ¶
func (p *PaginatedResponse[T]) HasMore() bool
Helper methods for pagination
type PaginatedStateChangeSetWithTxOrderViews ¶
type PaginatedStateChangeSetWithTxOrderViews = PaginatedResponse[StateChangeSetWithTxOrderView]
type PaginatedStateKVViews ¶
type PaginatedStateKVViews = PaginatedResponse[StateKVView]
type PaginatedTransactionWithInfoViews ¶
type PaginatedTransactionWithInfoViews = PaginatedResponse[TransactionWithInfoView]
type PaginatedUTXOStateViews ¶
type PaginatedUTXOStateViews = PaginatedResponse[UTXOStateView]
type PaginationArguments ¶
type PaginationArguments struct { // Optional paging cursor, using interface{} to allow for different cursor types Cursor interface{} `json:"cursor,omitempty"` // Maximum item returned per page Limit *int `json:"limit,omitempty"` }
PaginationArguments represents parameters for pagination
type PaginationParams ¶
type PaginationParams struct { Limit int `json:"limit"` Cursor interface{} `json:"cursor,omitempty"` }
Helper method for creating pagination parameters
func NewPaginationParams ¶
func NewPaginationParams(limit int) PaginationParams
func (*PaginationParams) SetCursor ¶
func (p *PaginationParams) SetCursor(cursor interface{})
type PaginationResult ¶
type PaginationResult struct { Cursor interface{} `json:"cursor,omitempty"` Data interface{} `json:"data"` HasNextPage bool `json:"hasNextPage"` }
PaginationResult represents the paginated response
type QueryEventsParams ¶
type QueryEventsParams struct { Filter EventFilterView `json:"filter"` Cursor *IndexerEventIDView `json:"cursor,omitempty"` Limit *string `json:"limit,omitempty"` QueryOption *QueryOptions `json:"queryOption,omitempty"` }
QueryEventsParams represents parameters for querying events
type QueryInscriptionsParams ¶
type QueryInscriptionsParams struct { Filter InscriptionFilterView `json:"filter"` Cursor *IndexerStateIDView `json:"cursor,omitempty"` Limit *string `json:"limit,omitempty"` DescendingOrder *bool `json:"descendingOrder,omitempty"` }
QueryInscriptionsParams represents parameters for querying inscriptions
type QueryObjectStatesParams ¶
type QueryObjectStatesParams struct { Filter ObjectStateFilterView `json:"filter"` Cursor *IndexerStateIDView `json:"cursor,omitempty"` Limit *string `json:"limit,omitempty"` QueryOption *QueryOptions `json:"queryOption,omitempty"` }
QueryObjectStatesParams represents parameters for querying object states
type QueryOptions ¶
type QueryOptions struct { Decode *bool `json:"decode,omitempty"` Descending *bool `json:"descending,omitempty"` FilterOut *bool `json:"filterOut,omitempty"` ShowDisplay *bool `json:"showDisplay,omitempty"` }
QueryOptions represents options for queries
func NewQueryOptions ¶
func NewQueryOptions(decode, descending, filterOut, showDisplay bool) QueryOptions
Helper method for creating new QueryOptions
type QueryTransactionsParams ¶
type QueryTransactionsParams struct { Filter TransactionFilterView `json:"filter"` Cursor *string `json:"cursor,omitempty"` Limit *string `json:"limit,omitempty"` QueryOption *QueryOptions `json:"queryOption,omitempty"` }
QueryTransactionsParams represents parameters for querying transactions
type QueryUTXOsParams ¶
type QueryUTXOsParams struct { Filter UTXOFilterView `json:"filter"` Cursor *IndexerStateIDView `json:"cursor,omitempty"` Limit *string `json:"limit,omitempty"` DescendingOrder *bool `json:"descendingOrder,omitempty"` }
QueryUTXOsParams represents parameters for querying UTXOs
type RawTransactionOutputView ¶
type RawTransactionOutputView struct { Events []EventView `json:"events"` Return []FunctionReturnValueView `json:"return"` VMStatus VMStatusView `json:"vm_status"` }
RawTransactionOutputView represents raw transaction output
type RawTransactionView ¶
type RawTransactionView struct {
Data LedgerTxDataView `json:"data"`
}
RawTransactionView represents a raw transaction
type RepairIndexerParams ¶
type RepairIndexerParams struct { RepairType string `json:"repairType"` RepairParams RepairIndexerParamsView `json:"repairParams"` }
RepairIndexerParams represents parameters for repairing indexer
type RoochError ¶
Helper methods for error handling
func NewErrorWithContext ¶
func NewErrorWithContext(code int, message string, context ErrorContext) *RoochError
func NewRoochError ¶
func NewRoochError(code int, message string) *RoochError
Helper method for creating new RoochError
func (*RoochError) Error ¶
func (e *RoochError) Error() string
type RoochStatus ¶
type RoochStatus struct { ChainID string `json:"chain_id"` LatestBlockHash string `json:"latest_block_hash"` LatestBlockHeight string `json:"latest_block_height"` }
RoochStatus represents Rooch system status
type SatPointView ¶
SatPointView represents a satoshi point
type ScriptCallView ¶
type ScriptCallView struct { Args []string `json:"args"` Script string `json:"script"` TyArgs []string `json:"ty_args"` }
ScriptCallView represents a script call
type SendRawTransactionParams ¶
type SendRawTransactionParams struct {
TxBcsHex string `json:"txBcsHex"`
}
SendRawTransactionParams represents parameters for sending raw transaction
type ServiceStatus ¶
type ServiceStatus string
ServiceStatus represents different service states
const ( ServiceStatusActive ServiceStatus = "active" ServiceStatusMaintenance ServiceStatus = "maintenance" ServiceStatusReadOnlyMode ServiceStatus = "read-only-mode" ServiceStatusDateImportMode ServiceStatus = "date-import-mode" )
func (ServiceStatus) IsActive ¶
func (s ServiceStatus) IsActive() bool
IsActive checks if the service status is active
func (ServiceStatus) IsMaintenance ¶
func (s ServiceStatus) IsMaintenance() bool
IsMaintenance checks if the service status is in maintenance
func (ServiceStatus) MarshalJSON ¶
func (s ServiceStatus) MarshalJSON() ([]byte, error)
Helper methods for ServiceStatus
func (ServiceStatus) String ¶
func (s ServiceStatus) String() string
String returns the string representation of ServiceStatus
func (*ServiceStatus) UnmarshalJSON ¶
func (s *ServiceStatus) UnmarshalJSON(data []byte) error
type SessionInfoView ¶
type SessionInfoView struct { AppName string `json:"appName"` AppURL string `json:"appUrl"` AuthenticationKey string `json:"authenticationKey"` Scopes []string `json:"scopes"` CreateTime int64 `json:"createTime"` LastActiveTime int64 `json:"lastActiveTime"` MaxInactiveInterval int64 `json:"maxInactiveInterval"` }
SessionInfoView represents session information
type StateChangeSetView ¶
type StateChangeSetView struct { CreatedAt string `json:"created_at"` StateKey string `json:"state_key"` UpdatedAt string `json:"updated_at"` Value StateValue `json:"value"` }
StateChangeSetView represents a state change set
type StateChangeSetViewBuilder ¶
type StateChangeSetViewBuilder struct {
// contains filtered or unexported fields
}
Helper methods for StateChangeSetView
func NewStateChangeSetViewBuilder ¶
func NewStateChangeSetViewBuilder() *StateChangeSetViewBuilder
func (*StateChangeSetViewBuilder) Build ¶
func (b *StateChangeSetViewBuilder) Build() StateChangeSetView
func (*StateChangeSetViewBuilder) SetStateKey ¶
func (b *StateChangeSetViewBuilder) SetStateKey(key string) *StateChangeSetViewBuilder
func (*StateChangeSetViewBuilder) SetValue ¶
func (b *StateChangeSetViewBuilder) SetValue(value StateValue) *StateChangeSetViewBuilder
type StateChangeSetWithTxOrderView ¶
type StateChangeSetWithTxOrderView struct { CreatedAt string `json:"created_at"` StateKey string `json:"state_key"` TxOrder string `json:"tx_order"` UpdatedAt string `json:"updated_at"` Value StateValueWithTxOrder `json:"value"` }
StateChangeSetWithTxOrderView represents a state change set with transaction order
type StateKVView ¶
type StateKVView struct { Key string `json:"key"` Value interface{} `json:"value"` }
StateKVView represents a state key-value pair
type StateOptions ¶
type StateOptions struct { Decode *bool `json:"decode,omitempty"` ShowDisplay *bool `json:"showDisplay,omitempty"` StateRoot *string `json:"stateRoot,omitempty"` }
StateOptions represents options for state queries
func NewStateOptions ¶
func NewStateOptions(decode, showDisplay bool, stateRoot string) StateOptions
Helper method for creating new StateOptions
type StateValue ¶
type StateValue struct { DecodedValue *AnnotatedMoveStructView `json:"decoded_value,omitempty"` Value string `json:"value"` }
StateValue represents a state value
type StateValueWithTxOrder ¶
type StateValueWithTxOrder struct { DecodedValue *AnnotatedMoveStructView `json:"decoded_value,omitempty"` Value string `json:"value"` }
StateValueWithTxOrder represents a state value with transaction order
type Status ¶
type Status struct { BitcoinStatus BitcoinStatus `json:"bitcoin_status"` RoochStatus RoochStatus `json:"rooch_status"` ServiceStatus ServiceStatus `json:"service_status"` }
Status represents the overall system status
type StatusParams ¶
type StatusParams struct{}
StatusParams represents empty parameters for getting status
type SyncStatesParams ¶
type SyncStatesParams struct { Filter SyncStateFilterView `json:"filter"` Cursor *string `json:"cursor,omitempty"` Limit *string `json:"limit,omitempty"` QueryOption *QueryOptions `json:"queryOption,omitempty"` }
SyncStatesParams represents parameters for syncing states
type TransactionAuthenticatorView ¶
type TransactionAuthenticatorView struct { AuthenticatorType string `json:"authenticator_type"` BitcoinAuthData *BitcoinAuthDataView `json:"bitcoin_auth_data,omitempty"` PublicKey *string `json:"public_key,omitempty"` Signature *string `json:"signature,omitempty"` }
TransactionAuthenticatorView represents a transaction authenticator
func NewTransactionAuthenticatorView ¶
func NewTransactionAuthenticatorView(authenticatorType string) TransactionAuthenticatorView
Helper method for creating new TransactionAuthenticatorView
type TransactionExecutionInfoView ¶
type TransactionExecutionInfoView struct { Authentication []TransactionAuthenticatorView `json:"authentication"` Hash string `json:"hash"` Status TransactionStatusView `json:"status"` }
TransactionExecutionInfoView represents transaction execution information
type TransactionExecutionInfoViewBuilder ¶
type TransactionExecutionInfoViewBuilder struct {
// contains filtered or unexported fields
}
Helper methods for TransactionExecutionInfoView
func NewTransactionExecutionInfoViewBuilder ¶
func NewTransactionExecutionInfoViewBuilder() *TransactionExecutionInfoViewBuilder
func (*TransactionExecutionInfoViewBuilder) AddAuthenticator ¶
func (b *TransactionExecutionInfoViewBuilder) AddAuthenticator(auth TransactionAuthenticatorView) *TransactionExecutionInfoViewBuilder
func (*TransactionExecutionInfoViewBuilder) Build ¶
func (b *TransactionExecutionInfoViewBuilder) Build() TransactionExecutionInfoView
func (*TransactionExecutionInfoViewBuilder) SetHash ¶
func (b *TransactionExecutionInfoViewBuilder) SetHash(hash string) *TransactionExecutionInfoViewBuilder
func (*TransactionExecutionInfoViewBuilder) SetStatus ¶
func (b *TransactionExecutionInfoViewBuilder) SetStatus(status TransactionStatusView) *TransactionExecutionInfoViewBuilder
type TransactionOutputView ¶
type TransactionOutputView struct { Events []EventView `json:"events"` Return []FunctionReturnValueView `json:"return"` }
TransactionOutputView represents transaction output
type TransactionSequenceInfoView ¶
type TransactionSequenceInfoView struct { TxHash string `json:"tx_hash"` TxOrder string `json:"tx_order"` }
TransactionSequenceInfoView represents transaction sequence information
type TransactionStatusView ¶
type TransactionStatusView string
TransactionStatusView represents transaction status
const ( TransactionStatusPending TransactionStatusView = "pending" TransactionStatusExecuted TransactionStatusView = "executed" TransactionStatusFailed TransactionStatusView = "failed" )
func (TransactionStatusView) IsExecuted ¶
func (t TransactionStatusView) IsExecuted() bool
Helper method to check if a transaction is executed
func (TransactionStatusView) IsFailed ¶
func (t TransactionStatusView) IsFailed() bool
Helper method to check if a transaction failed
func (TransactionStatusView) IsPending ¶
func (t TransactionStatusView) IsPending() bool
Helper method to check if a transaction is pending
func (TransactionStatusView) MarshalJSON ¶
func (t TransactionStatusView) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (TransactionStatusView) String ¶
func (t TransactionStatusView) String() string
String returns the string representation of TransactionStatusView
func (*TransactionStatusView) UnmarshalJSON ¶
func (t *TransactionStatusView) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler
type TransactionWithInfoView ¶
type TransactionWithInfoView struct { ExecutionInfo TransactionExecutionInfoView `json:"execution_info"` RawTransaction LedgerTransactionView `json:"raw_transaction"` }
TransactionWithInfoView represents a transaction with additional information
func NewTransactionWithInfoView ¶
func NewTransactionWithInfoView(executionInfo TransactionExecutionInfoView, rawTransaction LedgerTransactionView) TransactionWithInfoView
Helper methods for TransactionWithInfoView
type UTXOStateView ¶
type UTXOStateView struct { Amount string `json:"amount"` BitcoinAddress string `json:"bitcoin_address"` CreatedAt string `json:"created_at"` OutPoint string `json:"out_point"` RoochAddress string `json:"rooch_address"` StateIndex string `json:"state_index"` TxOrder string `json:"tx_order"` UpdatedAt string `json:"updated_at"` }
UTXOStateView represents UTXO state
type UTXOStateViewBuilder ¶
type UTXOStateViewBuilder struct {
// contains filtered or unexported fields
}
Helper methods for UTXOStateView
func NewUTXOStateViewBuilder ¶
func NewUTXOStateViewBuilder() *UTXOStateViewBuilder
func (*UTXOStateViewBuilder) Build ¶
func (b *UTXOStateViewBuilder) Build() UTXOStateView
func (*UTXOStateViewBuilder) SetAmount ¶
func (b *UTXOStateViewBuilder) SetAmount(amount string) *UTXOStateViewBuilder
func (*UTXOStateViewBuilder) SetBitcoinAddress ¶
func (b *UTXOStateViewBuilder) SetBitcoinAddress(address string) *UTXOStateViewBuilder
func (*UTXOStateViewBuilder) SetOutPoint ¶
func (b *UTXOStateViewBuilder) SetOutPoint(outPoint string) *UTXOStateViewBuilder
func (*UTXOStateViewBuilder) SetRoochAddress ¶
func (b *UTXOStateViewBuilder) SetRoochAddress(address string) *UTXOStateViewBuilder
func (*UTXOStateViewBuilder) SetStateIndex ¶
func (b *UTXOStateViewBuilder) SetStateIndex(index string) *UTXOStateViewBuilder
func (*UTXOStateViewBuilder) SetTxOrder ¶
func (b *UTXOStateViewBuilder) SetTxOrder(order string) *UTXOStateViewBuilder
type VMErrorInfo ¶
type VMErrorInfo struct { ErrorMessage string `json:"error_message"` ExecutionState []string `json:"execution_state"` }
VMErrorInfo represents VM error information
func NewVMErrorInfo ¶
func NewVMErrorInfo(errorMessage string, executionState []string) VMErrorInfo
Helper method for VMErrorInfo
type VMStatusView ¶
type VMStatusView interface{}
VMStatusView represents the status of a VM operation