Documentation
¶
Index ¶
- Variables
- type Account
- type Account_AccountType
- func (Account_AccountType) Descriptor() protoreflect.EnumDescriptor
- func (x Account_AccountType) Enum() *Account_AccountType
- func (Account_AccountType) EnumDescriptor() ([]byte, []int)deprecated
- func (x Account_AccountType) Number() protoreflect.EnumNumber
- func (x Account_AccountType) String() string
- func (Account_AccountType) Type() protoreflect.EnumType
- type Bigint
- type Block
- func (*Block) Descriptor() ([]byte, []int)deprecated
- func (x *Block) GetGasLimit() *Uint256
- func (x *Block) GetGasUsed() *Uint256
- func (x *Block) GetHeader() *BlockHeader
- func (x *Block) GetTransactions() []*Transaction
- func (*Block) ProtoMessage()
- func (x *Block) ProtoReflect() protoreflect.Message
- func (x *Block) Reset()
- func (x *Block) String() string
- type BlockHeader
- func (*BlockHeader) Descriptor() ([]byte, []int)deprecated
- func (x *BlockHeader) GetFinalityStatus() FinalityStatus
- func (x *BlockHeader) GetId() []byte
- func (x *BlockHeader) GetNumber() uint64
- func (x *BlockHeader) GetParentId() []byte
- func (x *BlockHeader) GetTimestamp() *timestamppb.Timestamp
- func (*BlockHeader) ProtoMessage()
- func (x *BlockHeader) ProtoReflect() protoreflect.Message
- func (x *BlockHeader) Reset()
- func (x *BlockHeader) String() string
- type Chain
- func (*Chain) Descriptor() ([]byte, []int)deprecated
- func (x *Chain) GetBip44Id() uint32
- func (x *Chain) GetExplorer() *ChainExplorerUrls
- func (x *Chain) GetFinalizedHeight() uint32
- func (x *Chain) GetId() *ChainId
- func (x *Chain) GetMetadata() *structpb.Struct
- func (x *Chain) GetMsPerBlock() uint32
- func (x *Chain) GetSupportedServices() []Chain_ChainSupportedServices
- func (x *Chain) GetTestnet() bool
- func (*Chain) ProtoMessage()
- func (x *Chain) ProtoReflect() protoreflect.Message
- func (x *Chain) Reset()
- func (x *Chain) String() string
- type ChainExplorerUrls
- func (*ChainExplorerUrls) Descriptor() ([]byte, []int)deprecated
- func (x *ChainExplorerUrls) GetAddressUrl() string
- func (x *ChainExplorerUrls) GetBlockUrl() string
- func (x *ChainExplorerUrls) GetTxUrl() string
- func (*ChainExplorerUrls) ProtoMessage()
- func (x *ChainExplorerUrls) ProtoReflect() protoreflect.Message
- func (x *ChainExplorerUrls) Reset()
- func (x *ChainExplorerUrls) String() string
- type ChainId
- type Chain_ChainSupportedServices
- func (Chain_ChainSupportedServices) Descriptor() protoreflect.EnumDescriptor
- func (x Chain_ChainSupportedServices) Enum() *Chain_ChainSupportedServices
- func (Chain_ChainSupportedServices) EnumDescriptor() ([]byte, []int)deprecated
- func (x Chain_ChainSupportedServices) Number() protoreflect.EnumNumber
- func (x Chain_ChainSupportedServices) String() string
- func (Chain_ChainSupportedServices) Type() protoreflect.EnumType
- type Currency
- func (*Currency) Descriptor() ([]byte, []int)deprecated
- func (x *Currency) GetCapabilities() uint64
- func (x *Currency) GetDecimals() uint32
- func (x *Currency) GetId() string
- func (x *Currency) GetMetadata() *CurrencyMetadata
- func (x *Currency) GetSymbol() string
- func (*Currency) ProtoMessage()
- func (x *Currency) ProtoReflect() protoreflect.Message
- func (x *Currency) Reset()
- func (x *Currency) String() string
- type CurrencyAmount
- func (*CurrencyAmount) Descriptor() ([]byte, []int)deprecated
- func (x *CurrencyAmount) GetCurrencyId() string
- func (x *CurrencyAmount) GetValue() *Uint256
- func (*CurrencyAmount) ProtoMessage()
- func (x *CurrencyAmount) ProtoReflect() protoreflect.Message
- func (x *CurrencyAmount) Reset()
- func (x *CurrencyAmount) String() string
- type CurrencyMetadata
- func (*CurrencyMetadata) Descriptor() ([]byte, []int)deprecated
- func (x *CurrencyMetadata) GetIconUrl() string
- func (x *CurrencyMetadata) GetName() string
- func (*CurrencyMetadata) ProtoMessage()
- func (x *CurrencyMetadata) ProtoReflect() protoreflect.Message
- func (x *CurrencyMetadata) Reset()
- func (x *CurrencyMetadata) String() string
- type FinalityStatus
- func (FinalityStatus) Descriptor() protoreflect.EnumDescriptor
- func (x FinalityStatus) Enum() *FinalityStatus
- func (FinalityStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x FinalityStatus) Number() protoreflect.EnumNumber
- func (x FinalityStatus) String() string
- func (FinalityStatus) Type() protoreflect.EnumType
- type Operation
- func (*Operation) Descriptor() ([]byte, []int)deprecated
- func (x *Operation) GetContract() *Account
- func (x *Operation) GetId() []byte
- func (x *Operation) GetType() uint32
- func (*Operation) ProtoMessage()
- func (x *Operation) ProtoReflect() protoreflect.Message
- func (x *Operation) Reset()
- func (x *Operation) String() string
- type Transaction
- func (*Transaction) Descriptor() ([]byte, []int)deprecated
- func (x *Transaction) GetAmount() *Uint256
- func (x *Transaction) GetBlockId() []byte
- func (x *Transaction) GetFee() *Uint256
- func (x *Transaction) GetFrom() string
- func (x *Transaction) GetId() []byte
- func (x *Transaction) GetIdx() uint32
- func (x *Transaction) GetOperations() []*Operation
- func (x *Transaction) GetTo() string
- func (x *Transaction) GetTransfers() []*Transfer
- func (x *Transaction) GetType() uint32
- func (*Transaction) ProtoMessage()
- func (x *Transaction) ProtoReflect() protoreflect.Message
- func (x *Transaction) Reset()
- func (x *Transaction) String() string
- type Transfer
- func (*Transfer) Descriptor() ([]byte, []int)deprecated
- func (x *Transfer) GetAmount() *CurrencyAmount
- func (x *Transfer) GetFrom() string
- func (x *Transfer) GetId() []byte
- func (x *Transfer) GetOpId() []byte
- func (x *Transfer) GetStatus() uint32
- func (x *Transfer) GetTo() string
- func (x *Transfer) GetTxId() []byte
- func (*Transfer) ProtoMessage()
- func (x *Transfer) ProtoReflect() protoreflect.Message
- func (x *Transfer) Reset()
- func (x *Transfer) String() string
- type Uint128
- type Uint256
Constants ¶
This section is empty.
Variables ¶
var ( FinalityStatus_name = map[int32]string{ 0: "FINALITY_STATUS_UNSPECIFIED", 1: "FINALITY_STATUS_UNSAFE", 2: "FINALITY_STATUS_SAFE", 3: "FINALITY_STATUS_FINALIZED", } FinalityStatus_value = map[string]int32{ "FINALITY_STATUS_UNSPECIFIED": 0, "FINALITY_STATUS_UNSAFE": 1, "FINALITY_STATUS_SAFE": 2, "FINALITY_STATUS_FINALIZED": 3, } )
Enum value maps for FinalityStatus.
var ( Chain_ChainSupportedServices_name = map[int32]string{ 0: "UNSPECIFIED", 1: "BLOCK", 2: "CURRENCIES", 3: "CONSTRUCT", 4: "BALANCES", } Chain_ChainSupportedServices_value = map[string]int32{ "UNSPECIFIED": 0, "BLOCK": 1, "CURRENCIES": 2, "CONSTRUCT": 3, "BALANCES": 4, } )
Enum value maps for Chain_ChainSupportedServices.
var ( Account_AccountType_name = map[int32]string{ 0: "UNSPECIFIED", 1: "STANDARD", 2: "CONTRACT", } Account_AccountType_value = map[string]int32{ "UNSPECIFIED": 0, "STANDARD": 1, "CONTRACT": 2, } )
Enum value maps for Account_AccountType.
var File_commons_proto protoreflect.FileDescriptor
var File_models_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // address in human readable format Type uint32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"` // account type, if known; can be flag mask for combinations // contains filtered or unexported fields }
func (*Account) Descriptor
deprecated
func (*Account) ProtoMessage ¶
func (*Account) ProtoMessage()
func (*Account) ProtoReflect ¶
func (x *Account) ProtoReflect() protoreflect.Message
type Account_AccountType ¶ added in v0.0.13
type Account_AccountType int32
const ( Account_UNSPECIFIED Account_AccountType = 0 Account_STANDARD Account_AccountType = 1 // standard address; usually can be used to initiate transactions Account_CONTRACT Account_AccountType = 2 // contract address )
func (Account_AccountType) Descriptor ¶ added in v0.0.13
func (Account_AccountType) Descriptor() protoreflect.EnumDescriptor
func (Account_AccountType) Enum ¶ added in v0.0.13
func (x Account_AccountType) Enum() *Account_AccountType
func (Account_AccountType) EnumDescriptor
deprecated
added in
v0.0.13
func (Account_AccountType) EnumDescriptor() ([]byte, []int)
Deprecated: Use Account_AccountType.Descriptor instead.
func (Account_AccountType) Number ¶ added in v0.0.13
func (x Account_AccountType) Number() protoreflect.EnumNumber
func (Account_AccountType) String ¶ added in v0.0.13
func (x Account_AccountType) String() string
func (Account_AccountType) Type ¶ added in v0.0.13
func (Account_AccountType) Type() protoreflect.EnumType
type Bigint ¶
type Bigint struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
unbounded signed integer in network byte order
func (*Bigint) Descriptor
deprecated
func (*Bigint) ProtoMessage ¶
func (*Bigint) ProtoMessage()
func (*Bigint) ProtoReflect ¶
func (x *Bigint) ProtoReflect() protoreflect.Message
type Block ¶
type Block struct { Header *BlockHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` Transactions []*Transaction `protobuf:"bytes,10,rep,name=transactions,proto3" json:"transactions,omitempty"` GasLimit *Uint256 `protobuf:"bytes,12,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` GasUsed *Uint256 `protobuf:"bytes,13,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` // contains filtered or unexported fields }
func (*Block) Descriptor
deprecated
func (*Block) GetGasLimit ¶
func (*Block) GetGasUsed ¶
func (*Block) GetHeader ¶
func (x *Block) GetHeader() *BlockHeader
func (*Block) GetTransactions ¶
func (x *Block) GetTransactions() []*Transaction
func (*Block) ProtoMessage ¶
func (*Block) ProtoMessage()
func (*Block) ProtoReflect ¶
func (x *Block) ProtoReflect() protoreflect.Message
type BlockHeader ¶
type BlockHeader struct { Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // unique block ID, usually block hash Number uint64 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"` // block sequential number (level/height) ParentId []byte `protobuf:"bytes,3,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` FinalityStatus FinalityStatus `` /* 128-byte string literal not displayed */ // contains filtered or unexported fields }
Small block header with only necessary information
func (*BlockHeader) Descriptor
deprecated
func (*BlockHeader) Descriptor() ([]byte, []int)
Deprecated: Use BlockHeader.ProtoReflect.Descriptor instead.
func (*BlockHeader) GetFinalityStatus ¶
func (x *BlockHeader) GetFinalityStatus() FinalityStatus
func (*BlockHeader) GetId ¶
func (x *BlockHeader) GetId() []byte
func (*BlockHeader) GetNumber ¶
func (x *BlockHeader) GetNumber() uint64
func (*BlockHeader) GetParentId ¶
func (x *BlockHeader) GetParentId() []byte
func (*BlockHeader) GetTimestamp ¶
func (x *BlockHeader) GetTimestamp() *timestamppb.Timestamp
func (*BlockHeader) ProtoMessage ¶
func (*BlockHeader) ProtoMessage()
func (*BlockHeader) ProtoReflect ¶
func (x *BlockHeader) ProtoReflect() protoreflect.Message
func (*BlockHeader) Reset ¶
func (x *BlockHeader) Reset()
func (*BlockHeader) String ¶
func (x *BlockHeader) String() string
type Chain ¶
type Chain struct { Id *ChainId `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Testnet bool `protobuf:"varint,3,opt,name=testnet,proto3" json:"testnet,omitempty"` // indicate if this is testnet-like instance MsPerBlock uint32 `protobuf:"varint,4,opt,name=ms_per_block,json=msPerBlock,proto3" json:"ms_per_block,omitempty"` // estimated block rate in the network FinalizedHeight uint32 `protobuf:"varint,5,opt,name=finalized_height,json=finalizedHeight,proto3" json:"finalized_height,omitempty"` // height between block and tip when block is considered finalized Explorer *ChainExplorerUrls `protobuf:"bytes,6,opt,name=explorer,proto3" json:"explorer,omitempty"` // recommended explorer service urls Bip44Id *uint32 `protobuf:"varint,7,opt,name=bip44_id,json=bip44Id,proto3,oneof" json:"bip44_id,omitempty"` // BIP-44 network id SupportedServices []Chain_ChainSupportedServices `` // supported services /* 158-byte string literal not displayed */ Metadata *structpb.Struct `protobuf:"bytes,15,opt,name=metadata,proto3" json:"metadata,omitempty"` // network metadata in JSON format // contains filtered or unexported fields }
* Blockchain instance information.
func (*Chain) Descriptor
deprecated
func (*Chain) GetBip44Id ¶
func (*Chain) GetExplorer ¶
func (x *Chain) GetExplorer() *ChainExplorerUrls
func (*Chain) GetFinalizedHeight ¶
func (*Chain) GetMetadata ¶
func (*Chain) GetMsPerBlock ¶
func (*Chain) GetSupportedServices ¶
func (x *Chain) GetSupportedServices() []Chain_ChainSupportedServices
func (*Chain) GetTestnet ¶
func (*Chain) ProtoMessage ¶
func (*Chain) ProtoMessage()
func (*Chain) ProtoReflect ¶
func (x *Chain) ProtoReflect() protoreflect.Message
type ChainExplorerUrls ¶
type ChainExplorerUrls struct { BlockUrl string `protobuf:"bytes,1,opt,name=block_url,json=blockUrl,proto3" json:"block_url,omitempty"` // url to recommended block explorer with '{}' placeholder for block hash TxUrl string `protobuf:"bytes,2,opt,name=tx_url,json=txUrl,proto3" json:"tx_url,omitempty"` // url to recommended block explorer with '{}' placeholder for tx id AddressUrl string `protobuf:"bytes,3,opt,name=address_url,json=addressUrl,proto3" json:"address_url,omitempty"` // url to view address information with '{}' placeholder for address // contains filtered or unexported fields }
* Explorer link templates for easier viewing
func (*ChainExplorerUrls) Descriptor
deprecated
func (*ChainExplorerUrls) Descriptor() ([]byte, []int)
Deprecated: Use ChainExplorerUrls.ProtoReflect.Descriptor instead.
func (*ChainExplorerUrls) GetAddressUrl ¶
func (x *ChainExplorerUrls) GetAddressUrl() string
func (*ChainExplorerUrls) GetBlockUrl ¶
func (x *ChainExplorerUrls) GetBlockUrl() string
func (*ChainExplorerUrls) GetTxUrl ¶
func (x *ChainExplorerUrls) GetTxUrl() string
func (*ChainExplorerUrls) ProtoMessage ¶
func (*ChainExplorerUrls) ProtoMessage()
func (*ChainExplorerUrls) ProtoReflect ¶
func (x *ChainExplorerUrls) ProtoReflect() protoreflect.Message
func (*ChainExplorerUrls) Reset ¶
func (x *ChainExplorerUrls) Reset()
func (*ChainExplorerUrls) String ¶
func (x *ChainExplorerUrls) String() string
type ChainId ¶
type ChainId struct { // * // Network type like BTC, ETH, etc. Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // * // Chain instance name like mainnet, testnet, etc. // Instance must have same chain and genesis block over the time so instead of 'testnet' it should be 'goerli', 'sepolia' etc. Network string `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` // contains filtered or unexported fields }
* Blockchain instance ID.
func (*ChainId) Descriptor
deprecated
func (*ChainId) GetNetwork ¶
func (*ChainId) ProtoMessage ¶
func (*ChainId) ProtoMessage()
func (*ChainId) ProtoReflect ¶
func (x *ChainId) ProtoReflect() protoreflect.Message
type Chain_ChainSupportedServices ¶
type Chain_ChainSupportedServices int32
* Supported services. CbtNetworkService must be always supported.
const ( Chain_UNSPECIFIED Chain_ChainSupportedServices = 0 Chain_BLOCK Chain_ChainSupportedServices = 1 Chain_CURRENCIES Chain_ChainSupportedServices = 2 Chain_CONSTRUCT Chain_ChainSupportedServices = 3 Chain_BALANCES Chain_ChainSupportedServices = 4 )
func (Chain_ChainSupportedServices) Descriptor ¶
func (Chain_ChainSupportedServices) Descriptor() protoreflect.EnumDescriptor
func (Chain_ChainSupportedServices) Enum ¶
func (x Chain_ChainSupportedServices) Enum() *Chain_ChainSupportedServices
func (Chain_ChainSupportedServices) EnumDescriptor
deprecated
func (Chain_ChainSupportedServices) EnumDescriptor() ([]byte, []int)
Deprecated: Use Chain_ChainSupportedServices.Descriptor instead.
func (Chain_ChainSupportedServices) Number ¶
func (x Chain_ChainSupportedServices) Number() protoreflect.EnumNumber
func (Chain_ChainSupportedServices) String ¶
func (x Chain_ChainSupportedServices) String() string
func (Chain_ChainSupportedServices) Type ¶
func (Chain_ChainSupportedServices) Type() protoreflect.EnumType
type Currency ¶
type Currency struct { // * // Unique currency ID within the blockchain in format [contractAddress]:[tokenId]. // For native currency - ':' // For ERC-20 like tokens - 'contractAddress:' // For ERC-1155 like tokens - 'contractAddress:tokenId' // For blockchain natively supported tokens (without a contract) - ':tokenId' Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // * // Short well known currency name like BTC, ETH, USDT etc. // Note that for contract based token it should be exact symbol from contract if specified Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` Decimals uint32 `protobuf:"varint,3,opt,name=decimals,proto3" json:"decimals,omitempty"` Capabilities uint64 `protobuf:"varint,4,opt,name=capabilities,proto3" json:"capabilities,omitempty"` // bit flags for token capabilities Metadata *CurrencyMetadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` // contains filtered or unexported fields }
* Common currency representation. Currency can be native blockchain currency, ERC-20 like token or ERC-1155 like token.
func (*Currency) Descriptor
deprecated
func (*Currency) GetCapabilities ¶
func (*Currency) GetDecimals ¶
func (*Currency) GetMetadata ¶
func (x *Currency) GetMetadata() *CurrencyMetadata
func (*Currency) ProtoMessage ¶
func (*Currency) ProtoMessage()
func (*Currency) ProtoReflect ¶
func (x *Currency) ProtoReflect() protoreflect.Message
type CurrencyAmount ¶
type CurrencyAmount struct { // * // Value in minimal units Value *Uint256 `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` CurrencyId string `protobuf:"bytes,2,opt,name=currency_id,json=currencyId,proto3" json:"currency_id,omitempty"` // contains filtered or unexported fields }
Amount in specific currency.
func (*CurrencyAmount) Descriptor
deprecated
func (*CurrencyAmount) Descriptor() ([]byte, []int)
Deprecated: Use CurrencyAmount.ProtoReflect.Descriptor instead.
func (*CurrencyAmount) GetCurrencyId ¶
func (x *CurrencyAmount) GetCurrencyId() string
func (*CurrencyAmount) GetValue ¶
func (x *CurrencyAmount) GetValue() *Uint256
func (*CurrencyAmount) ProtoMessage ¶
func (*CurrencyAmount) ProtoMessage()
func (*CurrencyAmount) ProtoReflect ¶
func (x *CurrencyAmount) ProtoReflect() protoreflect.Message
func (*CurrencyAmount) Reset ¶
func (x *CurrencyAmount) Reset()
func (*CurrencyAmount) String ¶
func (x *CurrencyAmount) String() string
type CurrencyMetadata ¶
type CurrencyMetadata struct { // long name of the currency Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` IconUrl string `protobuf:"bytes,2,opt,name=icon_url,json=iconUrl,proto3" json:"icon_url,omitempty"` // contains filtered or unexported fields }
func (*CurrencyMetadata) Descriptor
deprecated
func (*CurrencyMetadata) Descriptor() ([]byte, []int)
Deprecated: Use CurrencyMetadata.ProtoReflect.Descriptor instead.
func (*CurrencyMetadata) GetIconUrl ¶ added in v0.0.13
func (x *CurrencyMetadata) GetIconUrl() string
func (*CurrencyMetadata) GetName ¶
func (x *CurrencyMetadata) GetName() string
func (*CurrencyMetadata) ProtoMessage ¶
func (*CurrencyMetadata) ProtoMessage()
func (*CurrencyMetadata) ProtoReflect ¶
func (x *CurrencyMetadata) ProtoReflect() protoreflect.Message
func (*CurrencyMetadata) Reset ¶
func (x *CurrencyMetadata) Reset()
func (*CurrencyMetadata) String ¶
func (x *CurrencyMetadata) String() string
type FinalityStatus ¶
type FinalityStatus int32
Indicate reorg safety status of the block.
const ( FinalityStatus_FINALITY_STATUS_UNSPECIFIED FinalityStatus = 0 FinalityStatus_FINALITY_STATUS_UNSAFE FinalityStatus = 1 // there is a chance that block will not be included or reverted FinalityStatus_FINALITY_STATUS_SAFE FinalityStatus = 2 // less chance FinalityStatus_FINALITY_STATUS_FINALIZED FinalityStatus = 3 )
func (FinalityStatus) Descriptor ¶
func (FinalityStatus) Descriptor() protoreflect.EnumDescriptor
func (FinalityStatus) Enum ¶
func (x FinalityStatus) Enum() *FinalityStatus
func (FinalityStatus) EnumDescriptor
deprecated
func (FinalityStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use FinalityStatus.Descriptor instead.
func (FinalityStatus) Number ¶
func (x FinalityStatus) Number() protoreflect.EnumNumber
func (FinalityStatus) String ¶
func (x FinalityStatus) String() string
func (FinalityStatus) Type ¶
func (FinalityStatus) Type() protoreflect.EnumType
type Operation ¶
type Operation struct { Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Contract *Account `protobuf:"bytes,2,opt,name=contract,proto3" json:"contract,omitempty"` Type uint32 `protobuf:"varint,3,opt,name=type,proto3" json:"type,omitempty"` // contains filtered or unexported fields }
* Represents operation within transactions. Usually contract calls. Operations like ERC-20 transfer will be shown in both places - as operation and as transfer
func (*Operation) Descriptor
deprecated
func (*Operation) GetContract ¶
func (*Operation) ProtoMessage ¶
func (*Operation) ProtoMessage()
func (*Operation) ProtoReflect ¶
func (x *Operation) ProtoReflect() protoreflect.Message
type Transaction ¶
type Transaction struct { Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // unique transaction id within network; BlockId []byte `protobuf:"bytes,2,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` // block this tx belongs to Idx uint32 `protobuf:"varint,3,opt,name=idx,proto3" json:"idx,omitempty"` // transaction sequence number in block Type uint32 `protobuf:"varint,4,opt,name=type,proto3" json:"type,omitempty"` From string `protobuf:"bytes,5,opt,name=from,proto3" json:"from,omitempty"` // account that initiated transaction; To string `protobuf:"bytes,6,opt,name=to,proto3" json:"to,omitempty"` // transaction receiver Amount *Uint256 `protobuf:"bytes,7,opt,name=amount,proto3" json:"amount,omitempty"` // amount in native blockchain currency Fee *Uint256 `protobuf:"bytes,8,opt,name=fee,proto3" json:"fee,omitempty"` // actual fee in native blockchain currency Transfers []*Transfer `protobuf:"bytes,10,rep,name=transfers,proto3" json:"transfers,omitempty"` Operations []*Operation `protobuf:"bytes,11,rep,name=operations,proto3" json:"operations,omitempty"` // contains filtered or unexported fields }
func (*Transaction) Descriptor
deprecated
func (*Transaction) Descriptor() ([]byte, []int)
Deprecated: Use Transaction.ProtoReflect.Descriptor instead.
func (*Transaction) GetAmount ¶
func (x *Transaction) GetAmount() *Uint256
func (*Transaction) GetBlockId ¶
func (x *Transaction) GetBlockId() []byte
func (*Transaction) GetFee ¶
func (x *Transaction) GetFee() *Uint256
func (*Transaction) GetFrom ¶
func (x *Transaction) GetFrom() string
func (*Transaction) GetId ¶
func (x *Transaction) GetId() []byte
func (*Transaction) GetIdx ¶
func (x *Transaction) GetIdx() uint32
func (*Transaction) GetOperations ¶
func (x *Transaction) GetOperations() []*Operation
func (*Transaction) GetTo ¶
func (x *Transaction) GetTo() string
func (*Transaction) GetTransfers ¶
func (x *Transaction) GetTransfers() []*Transfer
func (*Transaction) GetType ¶
func (x *Transaction) GetType() uint32
func (*Transaction) ProtoMessage ¶
func (*Transaction) ProtoMessage()
func (*Transaction) ProtoReflect ¶
func (x *Transaction) ProtoReflect() protoreflect.Message
func (*Transaction) Reset ¶
func (x *Transaction) Reset()
func (*Transaction) String ¶
func (x *Transaction) String() string
type Transfer ¶
type Transfer struct { Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // id of the transfer, can be generated as tx id plus some index in transaction; From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` // transfer source account; might be different than tx.from; omitted for minting or UTXO output To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` // transfer destination account; might be different than tx.to; omitted for burning or UTXO input Amount *CurrencyAmount `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` // transfer amount; required Status uint32 `protobuf:"varint,5,opt,name=status,proto3" json:"status,omitempty"` // transfer status; required TxId []byte `protobuf:"bytes,10,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"` // transaction where this transfer happened; required OpId []byte `protobuf:"bytes,11,opt,name=op_id,json=opId,proto3" json:"op_id,omitempty"` // if transfer related to some contract operation; optional // contains filtered or unexported fields }
* Represents single transfer of any assets (in native, ERC-20 like or other token format) from one account to another. Multiple transfers can be related to no operations when transfer happened just in native currency, or multiple transfers can be be related to single operation in case of batch transfer calls.
For UTXO every input and output will be listed as separate transfer with empty 'from' or 'to' correspondingly.
Examples: tx with non-zero amount which calls contract method of ERC-20 token to transfer generate 2 transfer records - one for native currency, another for ERC-20 token transfer
func (*Transfer) Descriptor
deprecated
func (*Transfer) GetAmount ¶
func (x *Transfer) GetAmount() *CurrencyAmount
func (*Transfer) ProtoMessage ¶
func (*Transfer) ProtoMessage()
func (*Transfer) ProtoReflect ¶
func (x *Transfer) ProtoReflect() protoreflect.Message
type Uint128 ¶
type Uint128 struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
128-bit unsigned integer
func (*Uint128) Descriptor
deprecated
func (*Uint128) ProtoMessage ¶
func (*Uint128) ProtoMessage()
func (*Uint128) ProtoReflect ¶
func (x *Uint128) ProtoReflect() protoreflect.Message
type Uint256 ¶
type Uint256 struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
256-bit unsigned integer
func (*Uint256) Descriptor
deprecated
func (*Uint256) ProtoMessage ¶
func (*Uint256) ProtoMessage()
func (*Uint256) ProtoReflect ¶
func (x *Uint256) ProtoReflect() protoreflect.Message