types

package
v0.0.0-...-3c905e5 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2023 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_transferAction_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AssetsTransferChain

type AssetsTransferChain struct {
	Cointoken string `protobuf:"bytes,1,opt,name=cointoken,proto3" json:"cointoken,omitempty"`
	Amount    int64  `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
	Note      []byte `protobuf:"bytes,3,opt,name=note,proto3" json:"note,omitempty"`
	To        string `protobuf:"bytes,4,opt,name=to,proto3" json:"to,omitempty"`
	// contains filtered or unexported fields
}

func (*AssetsTransferChain) Descriptor deprecated

func (*AssetsTransferChain) Descriptor() ([]byte, []int)

Deprecated: Use AssetsTransferChain.ProtoReflect.Descriptor instead.

func (*AssetsTransferChain) GetAmount

func (x *AssetsTransferChain) GetAmount() int64

func (*AssetsTransferChain) GetCointoken

func (x *AssetsTransferChain) GetCointoken() string

func (*AssetsTransferChain) GetNote

func (x *AssetsTransferChain) GetNote() []byte

func (*AssetsTransferChain) GetTo

func (x *AssetsTransferChain) GetTo() string

func (*AssetsTransferChain) ProtoMessage

func (*AssetsTransferChain) ProtoMessage()

func (*AssetsTransferChain) ProtoReflect

func (x *AssetsTransferChain) ProtoReflect() protoreflect.Message

func (*AssetsTransferChain) Reset

func (x *AssetsTransferChain) Reset()

func (*AssetsTransferChain) String

func (x *AssetsTransferChain) String() string

type AssetsTransferToExecChain

type AssetsTransferToExecChain struct {
	Cointoken string `protobuf:"bytes,1,opt,name=cointoken,proto3" json:"cointoken,omitempty"`
	Amount    int64  `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
	Note      []byte `protobuf:"bytes,3,opt,name=note,proto3" json:"note,omitempty"`
	ExecName  string `protobuf:"bytes,4,opt,name=execName,proto3" json:"execName,omitempty"`
	To        string `protobuf:"bytes,5,opt,name=to,proto3" json:"to,omitempty"`
	// contains filtered or unexported fields
}

func (*AssetsTransferToExecChain) Descriptor deprecated

func (*AssetsTransferToExecChain) Descriptor() ([]byte, []int)

Deprecated: Use AssetsTransferToExecChain.ProtoReflect.Descriptor instead.

func (*AssetsTransferToExecChain) GetAmount

func (x *AssetsTransferToExecChain) GetAmount() int64

func (*AssetsTransferToExecChain) GetCointoken

func (x *AssetsTransferToExecChain) GetCointoken() string

func (*AssetsTransferToExecChain) GetExecName

func (x *AssetsTransferToExecChain) GetExecName() string

func (*AssetsTransferToExecChain) GetNote

func (x *AssetsTransferToExecChain) GetNote() []byte

func (*AssetsTransferToExecChain) GetTo

func (x *AssetsTransferToExecChain) GetTo() string

func (*AssetsTransferToExecChain) ProtoMessage

func (*AssetsTransferToExecChain) ProtoMessage()

func (*AssetsTransferToExecChain) ProtoReflect

func (*AssetsTransferToExecChain) Reset

func (x *AssetsTransferToExecChain) Reset()

func (*AssetsTransferToExecChain) String

func (x *AssetsTransferToExecChain) String() string

type CoinsActionChain

type CoinsActionChain struct {

	// Types that are assignable to Value:
	//	*CoinsActionChain_Transfer
	//	*CoinsActionChain_TransferToExec
	Value isCoinsActionChain_Value `protobuf_oneof:"value"`
	Ty    int32                    `protobuf:"varint,3,opt,name=ty,proto3" json:"ty,omitempty"`
	// contains filtered or unexported fields
}

func (*CoinsActionChain) Descriptor deprecated

func (*CoinsActionChain) Descriptor() ([]byte, []int)

Deprecated: Use CoinsActionChain.ProtoReflect.Descriptor instead.

func (*CoinsActionChain) GetTransfer

func (x *CoinsActionChain) GetTransfer() *AssetsTransferChain

func (*CoinsActionChain) GetTransferToExec

func (x *CoinsActionChain) GetTransferToExec() *AssetsTransferToExecChain

func (*CoinsActionChain) GetTy

func (x *CoinsActionChain) GetTy() int32

func (*CoinsActionChain) GetValue

func (m *CoinsActionChain) GetValue() isCoinsActionChain_Value

func (*CoinsActionChain) ProtoMessage

func (*CoinsActionChain) ProtoMessage()

func (*CoinsActionChain) ProtoReflect

func (x *CoinsActionChain) ProtoReflect() protoreflect.Message

func (*CoinsActionChain) Reset

func (x *CoinsActionChain) Reset()

func (*CoinsActionChain) String

func (x *CoinsActionChain) String() string

type CoinsActionChain_Transfer

type CoinsActionChain_Transfer struct {
	Transfer *AssetsTransferChain `protobuf:"bytes,1,opt,name=transfer,proto3,oneof"`
}

type CoinsActionChain_TransferToExec

type CoinsActionChain_TransferToExec struct {
	TransferToExec *AssetsTransferToExecChain `protobuf:"bytes,2,opt,name=transferToExec,proto3,oneof"`
}

type CommonAction

type CommonAction struct {
	Note   []byte //存放metamask 签名后的rawtx hexdata
	To     string //to地址(目的地址或者合约地址)
	Amount uint64 //解析组装后的chain tx 的amount
	Code   []byte //evm 数据
	Nonce  int64
}

CommonAction ...

func DecodeTxAction

func DecodeTxAction(msg []byte) (*CommonAction, error)

DecodeTxAction decode chainTx ethTx

type EVMAction4Chain

type EVMAction4Chain struct {

	// 转账金额
	Amount uint64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"`
	// 消耗限制,默认为Transaction.Fee
	GasLimit uint64 `protobuf:"varint,2,opt,name=gasLimit,proto3" json:"gasLimit,omitempty"`
	// gas价格,默认为1
	GasPrice uint32 `protobuf:"varint,3,opt,name=gasPrice,proto3" json:"gasPrice,omitempty"`
	// 合约数据
	Code []byte `protobuf:"bytes,4,opt,name=code,proto3" json:"code,omitempty"`
	//交易参数
	Para []byte `protobuf:"bytes,5,opt,name=para,proto3" json:"para,omitempty"`
	// 合约别名,方便识别
	Alias string `protobuf:"bytes,6,opt,name=alias,proto3" json:"alias,omitempty"`
	// 交易备注
	Note string `protobuf:"bytes,7,opt,name=note,proto3" json:"note,omitempty"`
	// 调用合约地址
	ContractAddr string `protobuf:"bytes,8,opt,name=contractAddr,proto3" json:"contractAddr,omitempty"`
	// contains filtered or unexported fields
}

创建/调用合约的请求结构

func (*EVMAction4Chain) Descriptor deprecated

func (*EVMAction4Chain) Descriptor() ([]byte, []int)

Deprecated: Use EVMAction4Chain.ProtoReflect.Descriptor instead.

func (*EVMAction4Chain) GetAlias

func (x *EVMAction4Chain) GetAlias() string

func (*EVMAction4Chain) GetAmount

func (x *EVMAction4Chain) GetAmount() uint64

func (*EVMAction4Chain) GetCode

func (x *EVMAction4Chain) GetCode() []byte

func (*EVMAction4Chain) GetContractAddr

func (x *EVMAction4Chain) GetContractAddr() string

func (*EVMAction4Chain) GetGasLimit

func (x *EVMAction4Chain) GetGasLimit() uint64

func (*EVMAction4Chain) GetGasPrice

func (x *EVMAction4Chain) GetGasPrice() uint32

func (*EVMAction4Chain) GetNote

func (x *EVMAction4Chain) GetNote() string

func (*EVMAction4Chain) GetPara

func (x *EVMAction4Chain) GetPara() []byte

func (*EVMAction4Chain) ProtoMessage

func (*EVMAction4Chain) ProtoMessage()

func (*EVMAction4Chain) ProtoReflect

func (x *EVMAction4Chain) ProtoReflect() protoreflect.Message

func (*EVMAction4Chain) Reset

func (x *EVMAction4Chain) Reset()

func (*EVMAction4Chain) String

func (x *EVMAction4Chain) String() string

type SignatureChain

type SignatureChain struct {
	Ty     int32  `protobuf:"varint,1,opt,name=ty,proto3" json:"ty,omitempty"`
	Pubkey []byte `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
	//当ty为5时,格式应该用RingSignature去解析
	Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

func (*SignatureChain) Descriptor deprecated

func (*SignatureChain) Descriptor() ([]byte, []int)

Deprecated: Use SignatureChain.ProtoReflect.Descriptor instead.

func (*SignatureChain) GetPubkey

func (x *SignatureChain) GetPubkey() []byte

func (*SignatureChain) GetSignature

func (x *SignatureChain) GetSignature() []byte

func (*SignatureChain) GetTy

func (x *SignatureChain) GetTy() int32

func (*SignatureChain) ProtoMessage

func (*SignatureChain) ProtoMessage()

func (*SignatureChain) ProtoReflect

func (x *SignatureChain) ProtoReflect() protoreflect.Message

func (*SignatureChain) Reset

func (x *SignatureChain) Reset()

func (*SignatureChain) String

func (x *SignatureChain) String() string

type TransactionChain

type TransactionChain struct {
	Execer    []byte          `protobuf:"bytes,1,opt,name=execer,proto3" json:"execer,omitempty"`
	Payload   []byte          `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
	Signature *SignatureChain `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
	Fee       int64           `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,omitempty"`
	Expire    int64           `protobuf:"varint,5,opt,name=expire,proto3" json:"expire,omitempty"`
	//随机ID,可以防止payload 相同的时候,交易重复
	Nonce int64 `protobuf:"varint,6,opt,name=nonce,proto3" json:"nonce,omitempty"`
	//对方地址,如果没有对方地址,可以为空
	To         string `protobuf:"bytes,7,opt,name=to,proto3" json:"to,omitempty"`
	GroupCount int32  `protobuf:"varint,8,opt,name=groupCount,proto3" json:"groupCount,omitempty"`
	Header     []byte `protobuf:"bytes,9,opt,name=header,proto3" json:"header,omitempty"`
	Next       []byte `protobuf:"bytes,10,opt,name=next,proto3" json:"next,omitempty"`
	ChainID    int32  `protobuf:"varint,11,opt,name=chainID,proto3" json:"chainID,omitempty"`
	// contains filtered or unexported fields
}

func (*TransactionChain) Descriptor deprecated

func (*TransactionChain) Descriptor() ([]byte, []int)

Deprecated: Use TransactionChain.ProtoReflect.Descriptor instead.

func (*TransactionChain) GetChainID

func (x *TransactionChain) GetChainID() int32

func (*TransactionChain) GetExecer

func (x *TransactionChain) GetExecer() []byte

func (*TransactionChain) GetExpire

func (x *TransactionChain) GetExpire() int64

func (*TransactionChain) GetFee

func (x *TransactionChain) GetFee() int64

func (*TransactionChain) GetGroupCount

func (x *TransactionChain) GetGroupCount() int32

func (*TransactionChain) GetHeader

func (x *TransactionChain) GetHeader() []byte

func (*TransactionChain) GetNext

func (x *TransactionChain) GetNext() []byte

func (*TransactionChain) GetNonce

func (x *TransactionChain) GetNonce() int64

func (*TransactionChain) GetPayload

func (x *TransactionChain) GetPayload() []byte

func (*TransactionChain) GetSignature

func (x *TransactionChain) GetSignature() *SignatureChain

func (*TransactionChain) GetTo

func (x *TransactionChain) GetTo() string

func (*TransactionChain) ProtoMessage

func (*TransactionChain) ProtoMessage()

func (*TransactionChain) ProtoReflect

func (x *TransactionChain) ProtoReflect() protoreflect.Message

func (*TransactionChain) Reset

func (x *TransactionChain) Reset()

func (*TransactionChain) String

func (x *TransactionChain) String() string

Jump to

Keyboard shortcuts

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