Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertBTCAddress(str string) (common.Address, error)
- func Decoder(_ codec.CdcAbstraction, txBytes []byte) (tx sdk.Tx, err error)
- func ErrCallMethod(msg string) *sdkerrors.Error
- func ErrExecute(msg string) *sdkerrors.Error
- func ErrGetContractAddress(msg string) *sdkerrors.Error
- func ErrInternal(msg string) *sdkerrors.Error
- func ErrPackInput(msg string) *sdkerrors.Error
- func ErrUnknownOperationOfManageContract(operation string) *sdkerrors.Error
- func ErrUnpackOutput(msg string) *sdkerrors.Error
- func ErrValidateBasic(msg string) *sdkerrors.Error
- func ErrValidateInput(msg string) *sdkerrors.Error
- func GetBasicXEntryPointInput(context string, inscription string) ([]byte, error)
- func GetBrc20AllBalanceInput(addr string) ([]byte, error)
- func GetBrc20AllTickInfoInput() ([]byte, error)
- func GetBrc20AllTransferableTickInput(addr string) ([]byte, error)
- func GetBrc20BalanceInput(addr string, tickName string) ([]byte, error)
- func GetBrc20EntryPointInput(context InscriptionContext, inscription string) ([]byte, error)
- func GetBrc20TickInfoInput(tickName string) ([]byte, error)
- func GetBrc20TotalTickHoldersInput() ([]byte, error)
- func GetBrc20TransferableTickInput(addr string, tickName string) ([]byte, error)
- func GetContractAddressByName(name string) []byte
- func GetEVMABIConfig(data []byte) abi.ABI
- func GetSrc20AllBalanceInput(address string) ([]byte, error)
- func GetSrc20AllTickInfoInput(page, pageSize *big.Int) ([]byte, error)
- func GetSrc20BalanceInput(address string, tickName string) ([]byte, error)
- func GetSrc20TickInfoInput(tickName string) ([]byte, error)
- func RegisterCodec(cdc *codec.Codec)
- func UnpackGetBrc20BalanceOutput(ret []byte) (*big.Int, *big.Int, *big.Int, error)
- func UnpackGetBrc20TotalTickHoldersOutput(ret []byte) (*big.Int, error)
- type ApiError
- type ApiResponse
- type BRC20Balance
- type BRC20Information
- type Brc20EventContext
- type Brc20EventResponse
- type Brc20InscriptionInfo
- type Brc20Operation
- type Brc20TransferableInscription
- type Brc20WrappedEvent
- type BurnInputEvent
- type BurnInputEventAdapter
- type BurnInputKey
- type BurnRuneEvent
- type Hash
- type InscriptionContext
- type IssueEvent
- type IssueEventAdapter
- type ManageContract
- type MintOutputEvent
- type MintOutputEventAdapter
- type MintOutputKey
- type MintRuneErrEvent
- type MintRuneEvent
- type MsgBasicProtocolOp
- type MsgInscription
- type Outpoint
- type QueryAllDataParams
- type QueryBrc20AllBalanceResponse
- type QueryBrc20AllTickInfoResponse
- type QueryBrc20BalanceResponse
- type QueryBrc20TickInfoResponse
- type QueryBrc20TotalTickHoldersResponse
- type QueryBrc20TransferableInscriptionResponse
- type QueryBrc20TxEventsByBlockHashResponse
- type QueryBrc20TxEventsResponse
- type QueryDataParams
- type QueryRuneAlphaTxEventsByBlockHashResponse
- type QueryRuneAlphaTxEventsResponse
- type QuerySrc20AllTickInfoResponse
- type QuerySrc20BalanceResponse
- type QuerySrc20LatestBlockIndexResponse
- type QuerySrc20TickInfoResponse
- type QuerySrc20TxEventsByBlockHashResponse
- type QuerySrc20TxEventsResponse
- type QueryTickParams
- type ResultInfo
- type RuneAlphaWrappedEvent
- type RuneBasicInfo
- type SatPoint
- type Src20AllTokenInfo
- type Src20AllTokenInfoReq
- type Src20Balance
- type Src20BalanceParams
- type Src20BalanceReq
- type Src20EventContext
- type Src20EventResponse
- type Src20TokenInfo
- type Src20TokenInfoReq
- type Src20WrappedEvent
- type TxIn
- type TxOut
- type WrappedBRC20Information
- type WrappedSrc20AllTokenInfo
- type WrappedSrc20Balance
- type WrappedSrc20TokenInfo
Constants ¶
View Source
const ( Brc20GetTickInfoMethod = "getTickInformation" Brc20GetAllTickInfoMethod = "getAllTickInformation" Brc20GetBalanceMethod = "getBalance" Brc20GetAllBalanceMethod = "getAllBalance" Brc20GetTotalTickHoldersMethod = "getTotalTickHolders" Brc20GetTransferableTickMethod = "getUserTransferableTickInformation" Brc20GetAllTransferableTickMethod = "getUserAllTransferableTickInformation" )
View Source
const ( ProtocolBRC20 = "brc-20" QueryTick = "tick" QueryAllTick = "allTick" QueryBalance = "balance" QueryAllBalance = "allBalance" QueryTotalTickHolders = "totalTickHolders" QueryTransferableTick = "transferableTick" QueryAllTransferableTick = "allTransferableTick" )
View Source
const ( EventTypeBasicX = ModuleName EventTypeManageContract = "manage_contract" EventTypeEntryPoint = "entry_point" EventTypeCallEvm = "call_evm" AttributeResult = "result" AttributeProtocolName = "protocol" AttributeBTCTXID = "btc_txid" AttributeBTCBlockHash = "btc_block_hash" AttributeManageContractOperation = "operation" AttributeManageContractAddress = "contract_addrss" AttributeEvmOutput = "evm_output" AttributeManageLog = "log" )
View Source
const ( // ModuleName is the name of the module ModuleName = "brcx" // StoreKey is the store key string for slashing StoreKey = ModuleName // RouterKey is the message route for slashing RouterKey = ModuleName // QuerierRoute is the querier route for slashing QuerierRoute = ModuleName MsgInscriptionType = "inscription" MsgBasicProtocolOpType = "basic_protocol_op" BRC20 = "brc-20" )
View Source
const ( ManageContractProtocolName = "brczero" ManageCreateContract = "create" ManageCallContract = "call" )
View Source
const ( EntryPointMethodName = "entryPoint" EventsName = "Events" )
View Source
const ( IssueEventName = "Issue" BurnRuneEventName = "BurnRune" BurnInputEventName = "BurnInput" MintErrorEventName = "MintError" MintRuneEventName = "MintRune" MintOutputEventName = "MintOutput" )
View Source
const ( Src20GetTickInfoMethod = "getSRC20TokenInfo" Src20GetBalanceMethod = "getSRC20Balance" Src20GetAllBalanceMethod = "getAllSRC20Balance" Src20GetAllTickInfoMethod = "getSRC20AllTokenInfo" )
View Source
const ( ProtocolSRC20 = "src-20" Src20QueryTick = "src20Tick" Src20QueryAllTick = "src20AllTick" Src20QueryBalance = "src20Balance" Src20QueryAllBalance = "src20AllBalance" )
Variables ¶
View Source
var ( MintRuneEventSig = []byte("MintRune((string,uint128,string,uint8,string,uint128))") MintOutputEventSig = []byte("MintOutput((string,string,(uint128,uint128,string,uint8,string)))") MintErrEventSig = []byte("MintError((string,uint128,uint128,uint128,string))") IssueEventSig = []byte("Issue((string,uint8,uint64,uint128,uint256,string,uint128,string,uint32,uint128))") BurnRuneEventSig = []byte("BurnRune((string,uint128,string,uint8,string,uint128))") BurnInputEventSig = []byte("BurnInput((string,string,(uint128,uint128,string,uint8,string))") MintRuneTopic0 = crypto.Keccak256Hash(MintRuneEventSig) MintOutputTopic0 = crypto.Keccak256Hash(MintOutputEventSig) MintErrTopic0 = crypto.Keccak256Hash(MintErrEventSig) IssueTopic0 = crypto.Keccak256Hash(IssueEventSig) BurnRuneTopic0 = crypto.Keccak256Hash(BurnRuneEventSig) BurnInputTopic0 = crypto.Keccak256Hash(BurnInputEventSig) )
View Source
var (
ContractNameKey = []byte{0x01}
)
View Source
var (
ErrChainConfigNotFound = sdkerrors.Register(ModuleName, 2, "chain configuration not found")
)
View Source
var ModuleCdc *codec.Codec
ModuleCdc defines the module codec
View Source
var (
QueryProtocol = "protocol"
)
Functions ¶
func ErrCallMethod ¶
func ErrExecute ¶
func ErrGetContractAddress ¶
func ErrInternal ¶
func ErrPackInput ¶
func ErrUnpackOutput ¶
func ErrValidateBasic ¶
func ErrValidateInput ¶
func GetBrc20AllBalanceInput ¶
func GetBrc20EntryPointInput ¶
func GetBrc20EntryPointInput(context InscriptionContext, inscription string) ([]byte, error)
func GetBrc20TickInfoInput ¶
func GetEVMABIConfig ¶
func GetSrc20AllBalanceInput ¶
func GetSrc20BalanceInput ¶
func GetSrc20TickInfoInput ¶
func RegisterCodec ¶
RegisterCodec registers concrete types on codec
Types ¶
type ApiError ¶
func NewApiError ¶
type ApiResponse ¶
type ApiResponse[T interface{}] struct { Code int32 `json:"code" yaml:"code"` Msg string `json:"msg" yaml:"msg"` Data T `json:"data" yaml:"data"` }
func NewOKApiResponse ¶
func NewOKApiResponse[T interface{}](data T) ApiResponse[T]
type BRC20Balance ¶
type BRC20Balance struct { Tick string TotalBalance *big.Int AvailableBalance *big.Int TransferableBalance *big.Int }
func UnpackGetBrc20AllBalanceOutput ¶
func UnpackGetBrc20AllBalanceOutput(ret []byte) ([]BRC20Balance, error)
func (BRC20Balance) ToResponse ¶
func (b BRC20Balance) ToResponse() QueryBrc20BalanceResponse
type BRC20Information ¶
type BRC20Information struct { Tick string TickAddress common.Address MaxSupply *big.Int NowSupply *big.Int Decimals *big.Int Lim *big.Int InscriptionId string InscriptionNumber int64 Txid string Sender string BlockTime uint32 BlockHeight uint64 }
func UnpackGetBrc20AllTickInfoOutput ¶
func UnpackGetBrc20AllTickInfoOutput(ret []byte) ([]BRC20Information, error)
func (BRC20Information) ToResponse ¶
func (info BRC20Information) ToResponse() QueryBrc20TickInfoResponse
type Brc20EventContext ¶
type Brc20EventContext struct { EventType string `json:"event" yaml:"event"` Tick string `json:"tick" yaml:"tick"` InscriptionId string `json:"inscription_id" yaml:"inscription_id"` InscriptionNumber int64 `json:"inscription_number" yaml:"inscription_number"` OldSatPoint string `json:"old_satpoint" yaml:"old_satpoint"` NewSatPoint string `json:"new_satpoint" yaml:"new_satpoint"` Supply *big.Int `json:"supply" yaml:"supply"` Lim *big.Int `json:"lim_per_mint" yaml:"lim_per_mint"` Dec *big.Int `json:"decimals" yaml:"decimals"` Amount *big.Int `json:"amount" yaml:"amount"` Sender string `json:"from" yaml:"from"` Receiver string `json:"to" yaml:"to"` Msg string `json:"msg,omitempty" yaml:"msg,omitempty"` Txid string `json:"txid" yaml:"txid"` }
type Brc20EventResponse ¶
type Brc20EventResponse struct { EventType string `json:"event" yaml:"event"` Tick string `json:"tick" yaml:"tick"` InscriptionId string `json:"inscription_id" yaml:"inscription_id"` InscriptionNumber int64 `json:"inscription_number" yaml:"inscription_number"` OldSatPoint string `json:"old_satpoint" yaml:"old_satpoint"` NewSatPoint string `json:"new_satpoint" yaml:"new_satpoint"` Supply string `json:"supply,omitempty" yaml:"supply,omitempty"` Lim string `json:"lim_per_mint,omitempty" yaml:"lim_per_mint,omitempty"` Dec uint64 `json:"decimals,omitempty" yaml:"decimals,omitempty"` Amount *big.Int `json:"amount" yaml:"amount"` Sender string `json:"from" yaml:"from"` Receiver string `json:"to" yaml:"to"` Valid bool `json:"valid" yaml:"valid"` Msg string `json:"msg" yaml:"msg"` }
type Brc20InscriptionInfo ¶
type Brc20InscriptionInfo struct { Action string `json:"action,omitempty" yaml:"action,omitempty"` InscriptionNumber int64 `json:"inscription_number,omitempty" yaml:"inscription_number,omitempty"` InscriptionId string `json:"inscription_id" yaml:"inscription_id"` From string `json:"from" yaml:"from"` To string `json:"to,omitempty" yaml:"to,omitempty"` OldSatPoint string `json:"old_satpoint,omitempty" yaml:"old_satpoint,omitempty"` NewSatPoint string `json:"new_satpoint,omitempty" yaml:"new_satpoint,omitempty"` Operation Brc20Operation `json:"operation,omitempty" yaml:"operation,omitempty"` }
type Brc20Operation ¶
type Brc20TransferableInscription ¶
type Brc20TransferableInscription struct { InscriptionId string `json:"inscription_id" yaml:"inscription_id"` InscriptionNumber int64 `json:"inscription_number" yaml:"inscription_number"` Amount string `json:"amount" yaml:"amount"` Tick string `json:"tick" yaml:"tick"` Owner string `json:"owner" yaml:"owner"` }
func UnpackGetBrc20AllTransferableTickOutput ¶
func UnpackGetBrc20AllTransferableTickOutput(ret []byte) ([]Brc20TransferableInscription, error)
func UnpackGetBrc20TransferableTickOutput ¶
func UnpackGetBrc20TransferableTickOutput(ret []byte) ([]Brc20TransferableInscription, error)
type Brc20WrappedEvent ¶
type Brc20WrappedEvent struct {
Brc20EventContext `json:"events" yaml:"events"`
}
func UnpackBrc20EventContext ¶
func UnpackBrc20EventContext(ret []byte) (Brc20WrappedEvent, error)
func (Brc20WrappedEvent) ToEventResponse ¶
func (we Brc20WrappedEvent) ToEventResponse() Brc20EventResponse
type BurnInputEvent ¶
type BurnInputEvent struct { Op string `json:"type"` //todo:input PreOutputId string `json:"preOutputId"` //todo:address Burn RuneBasicInfo `json:"burn"` }
func UnpackBurnInputEvent ¶
func UnpackBurnInputEvent(ret []byte) (BurnInputEvent, error)
type BurnInputEventAdapter ¶
type BurnInputEventAdapter struct { Op string `json:"type"` //todo:input PreOutputId string `json:"preOutputId"` //todo:address Burn []RuneBasicInfo `json:"burn"` }
func NewRawBurnInputEventAdapter ¶
func NewRawBurnInputEventAdapter(op string, preOutpointId string) BurnInputEventAdapter
type BurnInputKey ¶
func NewBurnInputKey ¶
func NewBurnInputKey(txid, op, preOutput string) BurnInputKey
type BurnRuneEvent ¶
type BurnRuneEvent struct { Op string `json:"type"` Id *big.Int `json:"id"` Rune string `json:"rune"` Divisibility uint8 `json:"divisibility"` Symbol string `json:"symbol"` Amount *big.Int `json:"amount"` }
func UnpackBurnRuneEvent ¶
func UnpackBurnRuneEvent(ret []byte) (BurnRuneEvent, error)
type InscriptionContext ¶
type InscriptionContext struct { InscriptionId string `json:"inscription_id" yaml:"inscription_id"` InscriptionNumber int64 `json:"inscription_number" yaml:"inscription_number"` IsTransfer bool `json:"is_transfer" yaml:"is_transfer"` Txid string `json:"txid" yaml:"txid"` Sender string `json:"sender" yaml:"sender"` Receiver string `json:"receiver" yaml:"receiver"` CommitInput string `json:"commit_input" yaml:"commit_input"` RevealOutput string `json:"reveal_output" yaml:"reveal_output"` OldSatPoint string `json:"old_sat_point" yaml:"old_sat_point"` NewSatPoint string `json:"new_sat_point" yaml:"new_sat_point"` BlockHash string `json:"block_hash" yaml:"block_hash"` // btc block hash BlockTime uint32 `json:"block_time" yaml:"block_time"` // btc block time BlockHeight uint64 `json:"block_height" yaml:"block_height"` // btc block height }
type IssueEvent ¶
type IssueEvent struct { Op string `json:"type"` Divisibility uint8 `json:"divisibility"` End uint64 `json:"end"` Limit *big.Int `json:"limit"` Number *big.Int `json:"number"` Rune string `json:"rune"` Supply *big.Int `json:"supply"` Symbol string `json:"symbol"` Timestamp uint32 `json:"timestamp"` Id *big.Int `json:"id"` }
func (IssueEvent) FormatResponse ¶
func (ie IssueEvent) FormatResponse() IssueEventAdapter
type IssueEventAdapter ¶
type IssueEventAdapter struct { Op string `json:"type"` Divisibility uint8 `json:"divisibility"` End *big.Int `json:"end"` Limit *big.Int `json:"limit"` Number *big.Int `json:"number"` Rune string `json:"rune"` Supply *big.Int `json:"supply"` Symbol string `json:"symbol"` Timestamp uint32 `json:"timestamp"` Id *big.Int `json:"id"` }
func UnpackIssueEvent ¶
func UnpackIssueEvent(ret []byte) (IssueEventAdapter, error)
type ManageContract ¶
type ManageContract struct { Protocol string `json:"p" yaml:"p"` Operation string `json:"op" yaml:"op"` Name string `json:"name,omitempty" yaml:"name,omitempty"` Contract string `json:"contract,omitempty" yaml:"contract,omitempty"` WaitInit uint8 `json:"wait_init" yaml:"waitInit"` CallData string `json:"d" yaml:"d"` }
func (ManageContract) GetCallData ¶
func (mc ManageContract) GetCallData() ([]byte, error)
func (ManageContract) ValidateBasic ¶
func (mc ManageContract) ValidateBasic() error
type MintOutputEvent ¶
type MintOutputEvent struct { Op string `json:"type"` OutputId string `json:"output"` //todo:address Mint RuneBasicInfo `json:"mint"` }
func UnpackMintOutputEvent ¶
func UnpackMintOutputEvent(ret []byte) (MintOutputEvent, error)
type MintOutputEventAdapter ¶
type MintOutputEventAdapter struct { Op string `json:"type"` OutputId string `json:"output"` //todo:address Mint []RuneBasicInfo `json:"mint"` }
func NewRawMintOutputEventAdapter ¶
func NewRawMintOutputEventAdapter(op string, outpointId string) MintOutputEventAdapter
type MintOutputKey ¶
func NewMintOutputKey ¶
func NewMintOutputKey(txid, op, output string) MintOutputKey
type MintRuneErrEvent ¶
type MintRuneErrEvent struct { Op string `json:"type"` Id *big.Int `json:"id"` Amount *big.Int `json:"amount"` Output *big.Int `json:"output"` Msg string `json:"msg"` }
func UnpackMintErrEvent ¶
func UnpackMintErrEvent(ret []byte) (MintRuneErrEvent, error)
type MintRuneEvent ¶
type MintRuneEvent struct { Op string `json:"type"` Id *big.Int `json:"id"` Rune string `json:"rune"` Divisibility uint8 `json:"divisibility"` Symbol string `json:"symbol"` Amount *big.Int `json:"amount"` }
func UnpackMintRuneEvent ¶
func UnpackMintRuneEvent(ret []byte) (MintRuneEvent, error)
type MsgBasicProtocolOp ¶
type MsgBasicProtocolOp struct { ProtocolName string `json:"protocol_name" yaml:"protocol_name"` // Inscription represents the inscription data of protocol operations on the chain. Inscription string `json:"inscription" yaml:"inscription"` BTCTxid string `json:"btc_txid" yaml:"btc_txid"` BTCFee string `json:"btc_fee" yaml:"btc_fee"` // Context represents the contextual data required for protocol operation execution. Context string `json:"inscription_context" yaml:"inscription_context"` }
func NewMsgBasicProtocolOp ¶
func (MsgBasicProtocolOp) GetSignBytes ¶
func (msg MsgBasicProtocolOp) GetSignBytes() []byte
GetSignBytes gets the bytes for the message signer to sign on
func (MsgBasicProtocolOp) GetSigners ¶
func (msg MsgBasicProtocolOp) GetSigners() []sdk.AccAddress
func (MsgBasicProtocolOp) Route ¶
func (msg MsgBasicProtocolOp) Route() string
func (MsgBasicProtocolOp) Type ¶
func (msg MsgBasicProtocolOp) Type() string
func (MsgBasicProtocolOp) ValidateBasic ¶
func (msg MsgBasicProtocolOp) ValidateBasic() error
ValidateBasic validity check for the AnteHandler
type MsgInscription ¶
type MsgInscription struct { Inscription string `json:"inscription" yaml:"inscription"` InscriptionContext InscriptionContext `json:"inscription_context" yaml:"inscriptionContext"` }
MsgInscription - struct for create contract
func NewMsgInscription ¶
func NewMsgInscription(Inscription string, ctx InscriptionContext) MsgInscription
func (MsgInscription) GetSignBytes ¶
func (msg MsgInscription) GetSignBytes() []byte
GetSignBytes gets the bytes for the message signer to sign on
func (MsgInscription) GetSigners ¶
func (msg MsgInscription) GetSigners() []sdk.AccAddress
func (MsgInscription) Route ¶
func (msg MsgInscription) Route() string
func (MsgInscription) Type ¶
func (msg MsgInscription) Type() string
func (MsgInscription) ValidateBasic ¶
func (msg MsgInscription) ValidateBasic() error
ValidateBasic validity check for the AnteHandler
type QueryAllDataParams ¶
type QueryAllDataParams struct {
Addr string
}
func NewQueryAllDataParams ¶
func NewQueryAllDataParams(addr string) QueryAllDataParams
type QueryBrc20AllBalanceResponse ¶
type QueryBrc20AllBalanceResponse struct {
Balance []QueryBrc20BalanceResponse `json:"balance" yaml:"balance"`
}
func NewQueryBrc20AllBalanceResponse ¶
func NewQueryBrc20AllBalanceResponse(balance []QueryBrc20BalanceResponse) QueryBrc20AllBalanceResponse
type QueryBrc20AllTickInfoResponse ¶
type QueryBrc20AllTickInfoResponse struct {
Tokens []QueryBrc20TickInfoResponse `json:"tokens" yaml:"tokens"`
}
func NewQueryBrc20AllTickInfoResponse ¶
func NewQueryBrc20AllTickInfoResponse(infos []QueryBrc20TickInfoResponse) QueryBrc20AllTickInfoResponse
type QueryBrc20BalanceResponse ¶
type QueryBrc20BalanceResponse struct { Tick string `json:"tick" yaml:"tick"` AvailableBalance string `json:"available_balance" yaml:"available_balance"` TransferableBalance string `json:"transferable_balance" yaml:"transferable_balance"` OverallBalance string `json:"overall_balance" yaml:"overall_balance"` }
func NewQueryBrc20BalanceResponse ¶
func NewQueryBrc20BalanceResponse(tick string, ab string, tb string, ob string) QueryBrc20BalanceResponse
type QueryBrc20TickInfoResponse ¶
type QueryBrc20TickInfoResponse struct { Tick string `json:"tick" yaml:"tick"` InscriptionId string `json:"inscription_id" yaml:"inscription_id"` InscriptionNumber int64 `json:"inscription_number" yaml:"inscription_number"` MaxSupply string `json:"supply" yaml:"supply"` Lim string `json:"limit_per_mint" yaml:"limit_per_mint"` NowSupply string `json:"minted" yaml:"minted"` Decimals string `json:"decimal" yaml:"decimal"` Sender string `json:"deploy_by" yaml:"deploy_by"` Txid string `json:"tx_id" yaml:"tx_id"` BlockHeight uint64 `json:"deploy_height" yaml:"deploy_height"` BlockTime uint32 `json:"deploy_blocktime" yaml:"deploy_blocktime"` }
func NewQueryBrc20TickInfoResponse ¶
func NewQueryBrc20TickInfoResponse(info WrappedBRC20Information) QueryBrc20TickInfoResponse
type QueryBrc20TotalTickHoldersResponse ¶
type QueryBrc20TotalTickHoldersResponse struct {
Holders string `json:"total_tick_holders" yaml:"total_tick_holders"`
}
func NewQueryBrc20TotalTickHoldersResponse ¶
func NewQueryBrc20TotalTickHoldersResponse(h string) QueryBrc20TotalTickHoldersResponse
type QueryBrc20TransferableInscriptionResponse ¶
type QueryBrc20TransferableInscriptionResponse struct {
Inscriptions []Brc20TransferableInscription `json:"inscriptions" yaml:"inscriptions"`
}
func NewQueryBrc20TransferableInscriptionResponse ¶
func NewQueryBrc20TransferableInscriptionResponse(tis []Brc20TransferableInscription) QueryBrc20TransferableInscriptionResponse
type QueryBrc20TxEventsByBlockHashResponse ¶
type QueryBrc20TxEventsByBlockHashResponse struct {
BlockEvents []QueryBrc20TxEventsResponse `json:"block" yaml:"block"`
}
func NewQueryBrc20TxEventsByBlockHashResponse ¶
func NewQueryBrc20TxEventsByBlockHashResponse(be []QueryBrc20TxEventsResponse) QueryBrc20TxEventsByBlockHashResponse
type QueryBrc20TxEventsResponse ¶
type QueryBrc20TxEventsResponse struct { Events []Brc20EventResponse `json:"events" yaml:"events"` Txid string `json:"txid" yaml:"txid"` }
func NewQueryBrc20TxEventsResponse ¶
func NewQueryBrc20TxEventsResponse(e []Brc20EventResponse, txid string) QueryBrc20TxEventsResponse
type QueryDataParams ¶
func NewQueryDataParams ¶
func NewQueryDataParams(addr string, name string) QueryDataParams
type QueryRuneAlphaTxEventsByBlockHashResponse ¶
type QueryRuneAlphaTxEventsByBlockHashResponse[T interface{}] struct {
BlockEvents []T `json:"block" yaml:"block"`
}
func NewQueryRuneAlphaTxEventsByBlockHashResponse ¶
func NewQueryRuneAlphaTxEventsByBlockHashResponse[T interface{}](se []T) QueryRuneAlphaTxEventsByBlockHashResponse[T]
type QueryRuneAlphaTxEventsResponse ¶
type QueryRuneAlphaTxEventsResponse[T interface{}] struct { Events []T `json:"events" yaml:"events"` Txid string `json:"txid" yaml:"txid"` }
func NewQueryRuneAlphaTxEventsResponse ¶
func NewQueryRuneAlphaTxEventsResponse[T interface{}](e []T, txid string) QueryRuneAlphaTxEventsResponse[T]
type QuerySrc20LatestBlockIndexResponse ¶
type QuerySrc20LatestBlockIndexResponse struct { BlockIndex int64 `json:"block_index" yaml:"block_index"` BlockTime uint32 `json:"block_time" yaml:"block_time"` BlockHash string `json:"block_hash" yaml:"block_hash"` PreHash string `json:"pre_hash" yaml:"pre_hash"` }
func NewQuerySrc20LatestBlockIndexResponse ¶
func NewQuerySrc20LatestBlockIndexResponse(index int64, hash string, preHash string) QuerySrc20LatestBlockIndexResponse
type QuerySrc20TickInfoResponse ¶
type QuerySrc20TickInfoResponse struct { Tick string `json:"tick" yaml:"tick"` //todo: stamp url is currently empty StampUrl string `json:"stamp_url" yaml:"stamp_url"` Max string `json:"max" yaml:"max"` Lim string `json:"lim" yaml:"lim"` Amt string `json:"amt" yaml:"amt"` Dec string `json:"dec" yaml:"dec"` Creator string `json:"creator" yaml:"creator"` TxHash string `json:"tx_hash" yaml:"tx_hash"` BlockIndex string `json:"block_index" yaml:"block_index"` }
type QuerySrc20TxEventsByBlockHashResponse ¶
type QuerySrc20TxEventsByBlockHashResponse struct {
BlockEvents []QuerySrc20TxEventsResponse `json:"block" yaml:"block"`
}
func NewQuerySrc20TxEventsByBlockHashResponse ¶
func NewQuerySrc20TxEventsByBlockHashResponse(se []QuerySrc20TxEventsResponse) QuerySrc20TxEventsByBlockHashResponse
type QuerySrc20TxEventsResponse ¶
type QuerySrc20TxEventsResponse struct { Events []Src20EventResponse `json:"events" yaml:"events"` Txid string `json:"tx_hash" yaml:"tx_hash"` }
func NewQuerySrc20TxEventsResponse ¶
func NewQuerySrc20TxEventsResponse(e []Src20EventResponse, txid string) QuerySrc20TxEventsResponse
type QueryTickParams ¶
type QueryTickParams struct {
Name string
}
func NewQueryTickParams ¶
func NewQueryTickParams(name string) QueryTickParams
type ResultInfo ¶
type RuneAlphaWrappedEvent ¶
type RuneAlphaWrappedEvent[T interface{}] struct {
Events T `json:"events" yaml:"events"`
}
type RuneBasicInfo ¶
type RuneBasicInfo struct { Id *big.Int `json:"id"` Amount *big.Int `json:"amount"` Rune string `json:"rune"` Divisibility uint8 `json:"divisibility"` Symbol string `json:"symbol"` }
func (*RuneBasicInfo) AddAmount ¶
func (rbi *RuneBasicInfo) AddAmount(another RuneBasicInfo) error
type SatPoint ¶
type SatPoint struct { Outpoint Outpoint `json:"outpoint" yaml:"outpoint"` Offset uint64 `json:"offset" yaml:"offset"` }
Sat
type Src20AllTokenInfo ¶
type Src20AllTokenInfo struct { AllTokenInfo []Src20TokenInfo CurPage *big.Int PageSize *big.Int TotalRecords *big.Int }
func (Src20AllTokenInfo) ToResponse ¶
func (info Src20AllTokenInfo) ToResponse() QuerySrc20AllTickInfoResponse
type Src20AllTokenInfoReq ¶
type Src20Balance ¶
func UnpackGetSrc20AllBalanceOutput ¶
func UnpackGetSrc20AllBalanceOutput(ret []byte) ([]Src20Balance, error)
func (Src20Balance) ToResponse ¶
func (b Src20Balance) ToResponse() QuerySrc20BalanceResponse
type Src20BalanceParams ¶
type Src20BalanceParams struct { Tick string `json:"tick" yaml:"tick"` Address string `json:"address" yaml:"address"` }
func NewSrc20BalanceParams ¶
func NewSrc20BalanceParams(tick, address string) Src20BalanceParams
type Src20BalanceReq ¶
type Src20BalanceReq struct {
Tick string `json:"tick" yaml:"tick"`
}
type Src20EventContext ¶
type Src20EventContext struct { Op string `json:"op" yaml:"op"` TickOrigin string `json:"tickOrigin" yaml:"tickOrigin"` Max uint64 `json:"max" yaml:"max"` Lim uint64 `json:"lim" yaml:"lim"` Amt uint64 `json:"amt" yaml:"amt"` Dec uint8 `json:"dec" yaml:"dec"` From string `json:"from" yaml:"from"` To string `json:"to" yaml:"to"` Valid bool `json:"valid" yaml:"valid"` Msg string `json:"msg" yaml:"msg"` }
type Src20EventResponse ¶
type Src20EventResponse struct { Op string `json:"op" yaml:"op"` TickOrigin string `json:"tick" yaml:"tick"` Max string `json:"max" yaml:"max"` Lim string `json:"lim" yaml:"lim"` Amt string `json:"amt" yaml:"amt"` Dec string `json:"dec" yaml:"dec"` From string `json:"from" yaml:"from"` To string `json:"to" yaml:"to"` Valid bool `json:"valid" yaml:"valid"` Msg string `json:"msg" yaml:"msg"` }
type Src20TokenInfo ¶
type Src20TokenInfo struct { TickOrigin string Max *big.Int Lim *big.Int Amt *big.Int Dec uint8 Creator string TxHash common.Hash BlockIndex *big.Int BlockTime *big.Int Address common.Address }
func (Src20TokenInfo) ToResponse ¶
func (info Src20TokenInfo) ToResponse() QuerySrc20TickInfoResponse
type Src20TokenInfoReq ¶
type Src20TokenInfoReq struct {
Tick string `json:"tick" yaml:"tick"`
}
type Src20WrappedEvent ¶
type Src20WrappedEvent struct {
Src20EventContext `json:"events" yaml:"events"`
}
func UnpackSrc20EventContext ¶
func UnpackSrc20EventContext(ret []byte) (Src20WrappedEvent, error)
func (Src20WrappedEvent) ToEventResponse ¶
func (we Src20WrappedEvent) ToEventResponse() Src20EventResponse
type TxOut ¶
type TxOut struct { Txid Hash `json:"txid" yaml:"txid"` Vout uint32 `json:"vout" yaml:"vout"` Value uint64 `json:"value" yaml:"value"` PkScript []byte `json:"pk_script" json:"pkScript"` }
交易输出
type WrappedBRC20Information ¶
type WrappedBRC20Information struct {
BRC20Information
}
func UnpackGetBrc20TickInfoOutput ¶
func UnpackGetBrc20TickInfoOutput(ret []byte) (WrappedBRC20Information, error)
type WrappedSrc20AllTokenInfo ¶
type WrappedSrc20AllTokenInfo struct {
Src20AllTokenInfo
}
func UnpackGetSrc20AllTickInfoOutput ¶
func UnpackGetSrc20AllTickInfoOutput(ret []byte) (WrappedSrc20AllTokenInfo, error)
type WrappedSrc20Balance ¶
type WrappedSrc20Balance struct {
Src20Balance
}
func UnpackGetSrc20BalanceOutput ¶
func UnpackGetSrc20BalanceOutput(ret []byte) (WrappedSrc20Balance, error)
type WrappedSrc20TokenInfo ¶
type WrappedSrc20TokenInfo struct {
Src20TokenInfo
}
func UnpackGetSrc20TickInfoOutput ¶
func UnpackGetSrc20TickInfoOutput(ret []byte) (WrappedSrc20TokenInfo, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.