types

package
v1.69.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 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 AssetsTransferChain33

type AssetsTransferChain33 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 (*AssetsTransferChain33) Descriptor deprecated

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

Deprecated: Use AssetsTransferChain33.ProtoReflect.Descriptor instead.

func (*AssetsTransferChain33) GetAmount

func (x *AssetsTransferChain33) GetAmount() int64

func (*AssetsTransferChain33) GetCointoken

func (x *AssetsTransferChain33) GetCointoken() string

func (*AssetsTransferChain33) GetNote

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

func (*AssetsTransferChain33) GetTo

func (x *AssetsTransferChain33) GetTo() string

func (*AssetsTransferChain33) ProtoMessage

func (*AssetsTransferChain33) ProtoMessage()

func (*AssetsTransferChain33) ProtoReflect

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

func (*AssetsTransferChain33) Reset

func (x *AssetsTransferChain33) Reset()

func (*AssetsTransferChain33) String

func (x *AssetsTransferChain33) String() string

type AssetsTransferToExecChain33

type AssetsTransferToExecChain33 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 (*AssetsTransferToExecChain33) Descriptor deprecated

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

Deprecated: Use AssetsTransferToExecChain33.ProtoReflect.Descriptor instead.

func (*AssetsTransferToExecChain33) GetAmount

func (x *AssetsTransferToExecChain33) GetAmount() int64

func (*AssetsTransferToExecChain33) GetCointoken

func (x *AssetsTransferToExecChain33) GetCointoken() string

func (*AssetsTransferToExecChain33) GetExecName

func (x *AssetsTransferToExecChain33) GetExecName() string

func (*AssetsTransferToExecChain33) GetNote

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

func (*AssetsTransferToExecChain33) GetTo

func (*AssetsTransferToExecChain33) ProtoMessage

func (*AssetsTransferToExecChain33) ProtoMessage()

func (*AssetsTransferToExecChain33) ProtoReflect

func (*AssetsTransferToExecChain33) Reset

func (x *AssetsTransferToExecChain33) Reset()

func (*AssetsTransferToExecChain33) String

func (x *AssetsTransferToExecChain33) String() string

type CoinsActionChain33

type CoinsActionChain33 struct {

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

func (*CoinsActionChain33) Descriptor deprecated

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

Deprecated: Use CoinsActionChain33.ProtoReflect.Descriptor instead.

func (*CoinsActionChain33) GetTransfer

func (x *CoinsActionChain33) GetTransfer() *AssetsTransferChain33

func (*CoinsActionChain33) GetTransferToExec

func (x *CoinsActionChain33) GetTransferToExec() *AssetsTransferToExecChain33

func (*CoinsActionChain33) GetTy

func (x *CoinsActionChain33) GetTy() int32

func (*CoinsActionChain33) GetValue

func (m *CoinsActionChain33) GetValue() isCoinsActionChain33_Value

func (*CoinsActionChain33) ProtoMessage

func (*CoinsActionChain33) ProtoMessage()

func (*CoinsActionChain33) ProtoReflect

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

func (*CoinsActionChain33) Reset

func (x *CoinsActionChain33) Reset()

func (*CoinsActionChain33) String

func (x *CoinsActionChain33) String() string

type CoinsActionChain33_Transfer

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

type CoinsActionChain33_TransferToExec

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

type CommonAction

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

CommonAction ...

func DecodeTxAction

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

DecodeTxAction decode chain33Tx ethTx

type EVMAction4Chain33

type EVMAction4Chain33 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 (*EVMAction4Chain33) Descriptor deprecated

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

Deprecated: Use EVMAction4Chain33.ProtoReflect.Descriptor instead.

func (*EVMAction4Chain33) GetAlias

func (x *EVMAction4Chain33) GetAlias() string

func (*EVMAction4Chain33) GetAmount

func (x *EVMAction4Chain33) GetAmount() uint64

func (*EVMAction4Chain33) GetCode

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

func (*EVMAction4Chain33) GetContractAddr

func (x *EVMAction4Chain33) GetContractAddr() string

func (*EVMAction4Chain33) GetGasLimit

func (x *EVMAction4Chain33) GetGasLimit() uint64

func (*EVMAction4Chain33) GetGasPrice

func (x *EVMAction4Chain33) GetGasPrice() uint32

func (*EVMAction4Chain33) GetNote

func (x *EVMAction4Chain33) GetNote() string

func (*EVMAction4Chain33) GetPara

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

func (*EVMAction4Chain33) ProtoMessage

func (*EVMAction4Chain33) ProtoMessage()

func (*EVMAction4Chain33) ProtoReflect

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

func (*EVMAction4Chain33) Reset

func (x *EVMAction4Chain33) Reset()

func (*EVMAction4Chain33) String

func (x *EVMAction4Chain33) String() string

type SignatureChain33

type SignatureChain33 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 (*SignatureChain33) Descriptor deprecated

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

Deprecated: Use SignatureChain33.ProtoReflect.Descriptor instead.

func (*SignatureChain33) GetPubkey

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

func (*SignatureChain33) GetSignature

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

func (*SignatureChain33) GetTy

func (x *SignatureChain33) GetTy() int32

func (*SignatureChain33) ProtoMessage

func (*SignatureChain33) ProtoMessage()

func (*SignatureChain33) ProtoReflect

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

func (*SignatureChain33) Reset

func (x *SignatureChain33) Reset()

func (*SignatureChain33) String

func (x *SignatureChain33) String() string

type TransactionChain33

type TransactionChain33 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 *SignatureChain33 `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 (*TransactionChain33) Descriptor deprecated

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

Deprecated: Use TransactionChain33.ProtoReflect.Descriptor instead.

func (*TransactionChain33) GetChainID

func (x *TransactionChain33) GetChainID() int32

func (*TransactionChain33) GetExecer

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

func (*TransactionChain33) GetExpire

func (x *TransactionChain33) GetExpire() int64

func (*TransactionChain33) GetFee

func (x *TransactionChain33) GetFee() int64

func (*TransactionChain33) GetGroupCount

func (x *TransactionChain33) GetGroupCount() int32

func (*TransactionChain33) GetHeader

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

func (*TransactionChain33) GetNext

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

func (*TransactionChain33) GetNonce

func (x *TransactionChain33) GetNonce() int64

func (*TransactionChain33) GetPayload

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

func (*TransactionChain33) GetSignature

func (x *TransactionChain33) GetSignature() *SignatureChain33

func (*TransactionChain33) GetTo

func (x *TransactionChain33) GetTo() string

func (*TransactionChain33) ProtoMessage

func (*TransactionChain33) ProtoMessage()

func (*TransactionChain33) ProtoReflect

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

func (*TransactionChain33) Reset

func (x *TransactionChain33) Reset()

func (*TransactionChain33) String

func (x *TransactionChain33) String() string

Jump to

Keyboard shortcuts

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