models

package
v0.0.0-...-091c304 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotBalanceChangeEvent = errors.New("event doesn't represent a balance change")
	ErrNotTransferEvent      = errors.New("this is not transfer event")
	ErrNotMintEvent          = errors.New("this is not mint event")
	ErrNotClawbackEvent      = errors.New("this is not clawback event")
	ErrNotBurnEvent          = errors.New("this is not burn event")
)

Functions

This section is empty.

Types

type AssetContractBurnEvent

type AssetContractBurnEvent struct {
	Id         string `json:"id,omitempty"`
	ContractId string `json:"contract_id,omitempty"`
	TxHash     string `json:"tx_hash,omitempty"`
	FromAddr   string `json:"from_addr,omitempty"`
	AmountHi   int64  `json:"amount_hi,omitempty"`
	AmountLo   uint64 `json:"amount_lo,omitempty"`
}

func (AssetContractBurnEvent) GetType

func (AssetContractBurnEvent) GetType() string

func (*AssetContractBurnEvent) Parse

func (event *AssetContractBurnEvent) Parse(topics xdr.ScVec, value xdr.ScVal) error

type AssetContractClawbackEvent

type AssetContractClawbackEvent struct {
	Id         string `json:"id,omitempty"`
	ContractId string `json:"contract_id,omitempty"`
	TxHash     string `json:"tx_hash,omitempty"`
	AdminAddr  string `json:"admin_addr,omitempty"`
	FromAddr   string `json:"from_addr,omitempty"`
	AmountHi   int64  `json:"amount_hi,omitempty"`
	AmountLo   uint64 `json:"amount_lo,omitempty"`
}

func (AssetContractClawbackEvent) GetType

func (*AssetContractClawbackEvent) Parse

func (a *AssetContractClawbackEvent) Parse(topics xdr.ScVec, value xdr.ScVal) error

type AssetContractMintEvent

type AssetContractMintEvent struct {
	Id         string `json:"id,omitempty"`
	ContractId string `json:"contract_id,omitempty"`
	TxHash     string `json:"tx_hash,omitempty"`
	AdminAddr  string `json:"admin_addr,omitempty"`
	ToAddr     string `json:"to_addr,omitempty"`
	AmountHi   int64  `json:"amount_hi,omitempty"`
	AmountLo   uint64 `json:"amount_lo,omitempty"`
}

func (AssetContractMintEvent) GetType

func (AssetContractMintEvent) GetType() string

func (*AssetContractMintEvent) Parse

func (a *AssetContractMintEvent) Parse(topics xdr.ScVec, value xdr.ScVal) error

type AssetContractTransferEvent

type AssetContractTransferEvent struct {
	Id         string `json:"id,omitempty"`
	ContractId string `json:"contract_id,omitempty"`
	TxHash     string `json:"tx_hash,omitempty"`
	FromAddr   string `json:"from_addr,omitempty"`
	ToAddr     string `json:"to_addr,omitempty"`
	AmountHi   int64  `json:"amount_hi,omitempty"`
	AmountLo   uint64 `json:"amount_lo,omitempty"`
}

func (AssetContractTransferEvent) GetType

func (*AssetContractTransferEvent) Parse

func (a *AssetContractTransferEvent) Parse(topics xdr.ScVec, value xdr.ScVal) error

type ContractsCode

type ContractsCode struct {
	CreatorAddress string `json:"creator_address,omitempty"`
	ContractId     string `json:"contract_id,omitempty"`
	ContractCode   string `json:"contract_code,omitempty"`
	CreatedLedger  uint32 `json:"created_ledger,omitempty"`
}

type ContractsData

type ContractsData struct {
	Id            string `json:"id,omitempty"`
	ContractId    string `json:"contract_id,omitempty"`
	AccountId     string `json:"account_id,omitempty"`
	TxHash        string `json:"tx_hash,omitempty"`
	Ledger        uint32 `json:"ledger,omitempty"`
	EntryType     string `json:"entry_type,omitempty"`
	KeyXdr        []byte `json:"key_xdr,omitempty"`
	ValueXdr      []byte `json:"value_xdr,omitempty"`
	Durability    int32  `json:"durability,omitempty"`
	IsNewest      bool   `json:"is_newest,omitempty"`
	UpdatedLedger uint32 `json:"updated_ledger,omitempty"` // previous updated ledger (TODO: we should correct the name here)
}

type Int128Parts

type Int128Parts struct {
	Hi int64  `json:"hi,omitempty"`
	Lo uint64 `json:"lo,omitempty"`
}

func XdrInt128PartsConvert

func XdrInt128PartsConvert(in xdr.Int128Parts) Int128Parts

type InvokeTransaction

type InvokeTransaction struct {
	Hash         string `json:"hash,omitempty"`
	ContractId   string `json:"contract_id,omitempty"`
	FunctionType string `json:"function_type,omitempty"`
	FunctionName string `json:"function_name,omitempty"`
	Args         []byte `json:"args,omitempty"`
	TimeStamp    uint64 `json:"time_stamp,omitempty"`
}

type Ledger

type Ledger struct {
	Hash         string `json:"hash,omitempty"`
	PrevHash     string `json:"prev_hash,omitempty"`
	Seq          uint32 `json:"seq,omitempty"`
	Transactions uint32 `json:"transaction,omitempty"`
	Operations   uint32 `json:"operations,omitempty"`
	LedgerTime   uint64 `json:"ledger_time,omitempty"`
}

type ScAddress

type ScAddress struct {
	AccountId  *string `json:"account_id,omitempty"`
	ContractId *string `json:"contract_id,omitempty"`
}

type StellarAssetContractEvent

type StellarAssetContractEvent interface {
	GetType() string
	Parse(topics xdr.ScVec, value xdr.ScVal) error
}

type Transaction

type Transaction struct {
	Hash             string `json:"hash,omitempty"`
	Status           string `json:"status,omitempty"`
	Ledger           uint32 `json:"ledger,omitempty"`
	ApplicationOrder uint32 `json:"application_order,omitempty"`
	EnvelopeXdr      []byte `json:"envelope_xdr,omitempty"`
	ResultXdr        []byte `json:"result_xdr,omitempty"`
	ResultMetaXdr    []byte `json:"result_meta_xdr,omitempty"`
	SourceAddress    string `json:"source_address,omitempty"`
	TransactionTime  uint64 `json:"transaction_time,omitempty"`
}

type WasmContractEvent

type WasmContractEvent struct {
	Id           string `json:"id,omitempty"`
	ContractId   string `json:"contract_id,omitempty"`
	TxHash       string `json:"tx_hash,omitempty"`
	EventBodyXdr []byte `json:"event_body_xdr,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL