Documentation
¶
Index ¶
- Variables
- type Signature
- func (*Signature) Descriptor() ([]byte, []int)deprecated
- func (x *Signature) GetPkeyLen() uint32
- func (x *Signature) GetPublicKey() []byte
- func (x *Signature) GetSigLen() uint32
- func (x *Signature) GetSignature() []byte
- func (*Signature) ProtoMessage()
- func (x *Signature) ProtoReflect() protoreflect.Message
- func (x *Signature) Reset()
- func (x *Signature) String() string
- type SigningInput
- func (*SigningInput) Descriptor() ([]byte, []int)deprecated
- func (x *SigningInput) GetAmount() []byte
- func (x *SigningInput) GetBalance() []byte
- func (x *SigningInput) GetChainId() uint32
- func (x *SigningInput) GetFeePayer() string
- func (x *SigningInput) GetFeePayerBalance() []byte
- func (x *SigningInput) GetFeePayerNonce() []byte
- func (x *SigningInput) GetFeePayerPrivateKey() []byte
- func (x *SigningInput) GetFrom() string
- func (x *SigningInput) GetIdassetsId() uint32
- func (x *SigningInput) GetNonce() []byte
- func (x *SigningInput) GetPrivateKey() []byte
- func (x *SigningInput) GetRemark() string
- func (x *SigningInput) GetTimestamp() uint32
- func (x *SigningInput) GetTo() string
- func (*SigningInput) ProtoMessage()
- func (x *SigningInput) ProtoReflect() protoreflect.Message
- func (x *SigningInput) Reset()
- func (x *SigningInput) String() string
- type SigningOutput
- func (*SigningOutput) Descriptor() ([]byte, []int)deprecated
- func (x *SigningOutput) GetEncoded() []byte
- func (x *SigningOutput) GetError() common.SigningError
- func (x *SigningOutput) GetErrorMessage() string
- func (*SigningOutput) ProtoMessage()
- func (x *SigningOutput) ProtoReflect() protoreflect.Message
- func (x *SigningOutput) Reset()
- func (x *SigningOutput) String() string
- type Transaction
- func (*Transaction) Descriptor() ([]byte, []int)deprecated
- func (x *Transaction) GetHash() uint32
- func (x *Transaction) GetInput() []*TransactionCoinFrom
- func (x *Transaction) GetOutput() []*TransactionCoinTo
- func (x *Transaction) GetRemark() string
- func (x *Transaction) GetTimestamp() uint32
- func (x *Transaction) GetTxData() []byte
- func (x *Transaction) GetTxSigs() *Signature
- func (x *Transaction) GetType() uint32
- func (*Transaction) ProtoMessage()
- func (x *Transaction) ProtoReflect() protoreflect.Message
- func (x *Transaction) Reset()
- func (x *Transaction) String() string
- type TransactionCoinFrom
- func (*TransactionCoinFrom) Descriptor() ([]byte, []int)deprecated
- func (x *TransactionCoinFrom) GetAssetsChainid() uint32
- func (x *TransactionCoinFrom) GetAssetsId() uint32
- func (x *TransactionCoinFrom) GetFromAddress() string
- func (x *TransactionCoinFrom) GetIdAmount() []byte
- func (x *TransactionCoinFrom) GetLocked() uint32
- func (x *TransactionCoinFrom) GetNonce() []byte
- func (*TransactionCoinFrom) ProtoMessage()
- func (x *TransactionCoinFrom) ProtoReflect() protoreflect.Message
- func (x *TransactionCoinFrom) Reset()
- func (x *TransactionCoinFrom) String() string
- type TransactionCoinTo
- func (*TransactionCoinTo) Descriptor() ([]byte, []int)deprecated
- func (x *TransactionCoinTo) GetAssetsChainid() uint32
- func (x *TransactionCoinTo) GetAssetsId() uint32
- func (x *TransactionCoinTo) GetIdAmount() []byte
- func (x *TransactionCoinTo) GetLockTime() uint32
- func (x *TransactionCoinTo) GetToAddress() string
- func (*TransactionCoinTo) ProtoMessage()
- func (x *TransactionCoinTo) ProtoReflect() protoreflect.Message
- func (x *TransactionCoinTo) Reset()
- func (x *TransactionCoinTo) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_NULS_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Signature ¶
type Signature struct {
// Length of public key data
PkeyLen uint32 `protobuf:"varint,1,opt,name=pkey_len,json=pkeyLen,proto3" json:"pkey_len,omitempty"`
// The public key
PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
// The length of the signature
SigLen uint32 `protobuf:"varint,3,opt,name=sig_len,json=sigLen,proto3" json:"sig_len,omitempty"`
// The signature data
Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
// contains filtered or unexported fields
}
A signature
func (*Signature) Descriptor
deprecated
func (*Signature) GetPkeyLen ¶
func (*Signature) GetPublicKey ¶
func (*Signature) GetSignature ¶
func (*Signature) ProtoMessage ¶
func (*Signature) ProtoMessage()
func (*Signature) ProtoReflect ¶
func (x *Signature) ProtoReflect() protoreflect.Message
type SigningInput ¶
type SigningInput struct {
// The secret private key used for signing (32 bytes).
PrivateKey []byte `protobuf:"bytes,1,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"`
// Source address
From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"`
// Destination address
To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"`
// Transfer amount (uint256, serialized big endian)
Amount []byte `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"`
// Chain ID
ChainId uint32 `protobuf:"varint,5,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
// Asset ID
IdassetsId uint32 `protobuf:"varint,6,opt,name=idassets_id,json=idassetsId,proto3" json:"idassets_id,omitempty"`
// The last 8 bytes of latest transaction hash
Nonce []byte `protobuf:"bytes,7,opt,name=nonce,proto3" json:"nonce,omitempty"`
// Optional memo remark
Remark string `protobuf:"bytes,8,opt,name=remark,proto3" json:"remark,omitempty"`
// Account balance
Balance []byte `protobuf:"bytes,9,opt,name=balance,proto3" json:"balance,omitempty"`
// time, accurate to the second
Timestamp uint32 `protobuf:"varint,10,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// external address paying fee, required for token transfer, optional for NULS transfer, depending on if an external fee payer is provided. If provided, it will be the fee paying address.
FeePayer string `protobuf:"bytes,11,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"`
// fee payer address nonce, required for token transfer, optional for NULS transfer, depending on if fee_payer is provided.
FeePayerNonce []byte `protobuf:"bytes,12,opt,name=fee_payer_nonce,json=feePayerNonce,proto3" json:"fee_payer_nonce,omitempty"`
// fee payer address private key, required for token transfer, optional for NULS transfer, depending on if fee_payer is provided.
FeePayerPrivateKey []byte `protobuf:"bytes,13,opt,name=fee_payer_private_key,json=feePayerPrivateKey,proto3" json:"fee_payer_private_key,omitempty"`
// fee payer NULS balance, it is required for token transfer. optional for NULS transfer, depending on if fee_payer is provided.
FeePayerBalance []byte `protobuf:"bytes,14,opt,name=fee_payer_balance,json=feePayerBalance,proto3" json:"fee_payer_balance,omitempty"`
// contains filtered or unexported fields
}
Input data necessary to create a signed order.
func (*SigningInput) Descriptor
deprecated
func (*SigningInput) Descriptor() ([]byte, []int)
Deprecated: Use SigningInput.ProtoReflect.Descriptor instead.
func (*SigningInput) GetAmount ¶
func (x *SigningInput) GetAmount() []byte
func (*SigningInput) GetBalance ¶
func (x *SigningInput) GetBalance() []byte
func (*SigningInput) GetChainId ¶
func (x *SigningInput) GetChainId() uint32
func (*SigningInput) GetFeePayer ¶
func (x *SigningInput) GetFeePayer() string
func (*SigningInput) GetFeePayerBalance ¶
func (x *SigningInput) GetFeePayerBalance() []byte
func (*SigningInput) GetFeePayerNonce ¶
func (x *SigningInput) GetFeePayerNonce() []byte
func (*SigningInput) GetFeePayerPrivateKey ¶
func (x *SigningInput) GetFeePayerPrivateKey() []byte
func (*SigningInput) GetFrom ¶
func (x *SigningInput) GetFrom() string
func (*SigningInput) GetIdassetsId ¶
func (x *SigningInput) GetIdassetsId() uint32
func (*SigningInput) GetNonce ¶
func (x *SigningInput) GetNonce() []byte
func (*SigningInput) GetPrivateKey ¶
func (x *SigningInput) GetPrivateKey() []byte
func (*SigningInput) GetRemark ¶
func (x *SigningInput) GetRemark() string
func (*SigningInput) GetTimestamp ¶
func (x *SigningInput) GetTimestamp() uint32
func (*SigningInput) GetTo ¶
func (x *SigningInput) GetTo() string
func (*SigningInput) ProtoMessage ¶
func (*SigningInput) ProtoMessage()
func (*SigningInput) ProtoReflect ¶
func (x *SigningInput) ProtoReflect() protoreflect.Message
func (*SigningInput) Reset ¶
func (x *SigningInput) Reset()
func (*SigningInput) String ¶
func (x *SigningInput) String() string
type SigningOutput ¶
type SigningOutput struct {
// Encoded transaction
Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"`
// error code, 0 is ok, other codes will be treated as errors
Error common.SigningError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"`
// error code description
ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
// contains filtered or unexported fields
}
Result containing the signed and encoded transaction.
func (*SigningOutput) Descriptor
deprecated
func (*SigningOutput) Descriptor() ([]byte, []int)
Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead.
func (*SigningOutput) GetEncoded ¶
func (x *SigningOutput) GetEncoded() []byte
func (*SigningOutput) GetError ¶
func (x *SigningOutput) GetError() common.SigningError
func (*SigningOutput) GetErrorMessage ¶
func (x *SigningOutput) GetErrorMessage() string
func (*SigningOutput) ProtoMessage ¶
func (*SigningOutput) ProtoMessage()
func (*SigningOutput) ProtoReflect ¶
func (x *SigningOutput) ProtoReflect() protoreflect.Message
func (*SigningOutput) Reset ¶
func (x *SigningOutput) Reset()
func (*SigningOutput) String ¶
func (x *SigningOutput) String() string
type Transaction ¶
type Transaction struct {
// transaction type
Type uint32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"`
// Timestamp of the transaction
Timestamp uint32 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// Optional string remark
Remark string `protobuf:"bytes,3,opt,name=remark,proto3" json:"remark,omitempty"`
// The raw data
TxData []byte `protobuf:"bytes,4,opt,name=tx_data,json=txData,proto3" json:"tx_data,omitempty"`
// CoinFrom
Input []*TransactionCoinFrom `protobuf:"bytes,5,rep,name=input,proto3" json:"input,omitempty"`
// CoinTo
Output []*TransactionCoinTo `protobuf:"bytes,6,rep,name=output,proto3" json:"output,omitempty"`
// Signature
TxSigs *Signature `protobuf:"bytes,7,opt,name=tx_sigs,json=txSigs,proto3" json:"tx_sigs,omitempty"`
// Tx hash
Hash uint32 `protobuf:"varint,8,opt,name=hash,proto3" json:"hash,omitempty"`
// contains filtered or unexported fields
}
A transaction
func (*Transaction) Descriptor
deprecated
func (*Transaction) Descriptor() ([]byte, []int)
Deprecated: Use Transaction.ProtoReflect.Descriptor instead.
func (*Transaction) GetHash ¶
func (x *Transaction) GetHash() uint32
func (*Transaction) GetInput ¶
func (x *Transaction) GetInput() []*TransactionCoinFrom
func (*Transaction) GetOutput ¶
func (x *Transaction) GetOutput() []*TransactionCoinTo
func (*Transaction) GetRemark ¶
func (x *Transaction) GetRemark() string
func (*Transaction) GetTimestamp ¶
func (x *Transaction) GetTimestamp() uint32
func (*Transaction) GetTxData ¶
func (x *Transaction) GetTxData() []byte
func (*Transaction) GetTxSigs ¶
func (x *Transaction) GetTxSigs() *Signature
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 TransactionCoinFrom ¶
type TransactionCoinFrom struct {
// Source address
FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"`
// Chain ID
AssetsChainid uint32 `protobuf:"varint,2,opt,name=assets_chainid,json=assetsChainid,proto3" json:"assets_chainid,omitempty"`
// ID of the asset
AssetsId uint32 `protobuf:"varint,3,opt,name=assets_id,json=assetsId,proto3" json:"assets_id,omitempty"`
// transaction out amount (256-bit number)
IdAmount []byte `protobuf:"bytes,4,opt,name=id_amount,json=idAmount,proto3" json:"id_amount,omitempty"`
// Nonce, 8 bytes
Nonce []byte `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"`
// lock status: 1 locked; 0 unlocked
Locked uint32 `protobuf:"varint,6,opt,name=locked,proto3" json:"locked,omitempty"`
// contains filtered or unexported fields
}
Transaction from address
func (*TransactionCoinFrom) Descriptor
deprecated
func (*TransactionCoinFrom) Descriptor() ([]byte, []int)
Deprecated: Use TransactionCoinFrom.ProtoReflect.Descriptor instead.
func (*TransactionCoinFrom) GetAssetsChainid ¶
func (x *TransactionCoinFrom) GetAssetsChainid() uint32
func (*TransactionCoinFrom) GetAssetsId ¶
func (x *TransactionCoinFrom) GetAssetsId() uint32
func (*TransactionCoinFrom) GetFromAddress ¶
func (x *TransactionCoinFrom) GetFromAddress() string
func (*TransactionCoinFrom) GetIdAmount ¶
func (x *TransactionCoinFrom) GetIdAmount() []byte
func (*TransactionCoinFrom) GetLocked ¶
func (x *TransactionCoinFrom) GetLocked() uint32
func (*TransactionCoinFrom) GetNonce ¶
func (x *TransactionCoinFrom) GetNonce() []byte
func (*TransactionCoinFrom) ProtoMessage ¶
func (*TransactionCoinFrom) ProtoMessage()
func (*TransactionCoinFrom) ProtoReflect ¶
func (x *TransactionCoinFrom) ProtoReflect() protoreflect.Message
func (*TransactionCoinFrom) Reset ¶
func (x *TransactionCoinFrom) Reset()
func (*TransactionCoinFrom) String ¶
func (x *TransactionCoinFrom) String() string
type TransactionCoinTo ¶
type TransactionCoinTo struct {
// destination address
ToAddress string `protobuf:"bytes,1,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"`
// Chain ID
AssetsChainid uint32 `protobuf:"varint,2,opt,name=assets_chainid,json=assetsChainid,proto3" json:"assets_chainid,omitempty"`
// ID of the asset
AssetsId uint32 `protobuf:"varint,3,opt,name=assets_id,json=assetsId,proto3" json:"assets_id,omitempty"`
// transaction amount (uint256, serialized big endian)
IdAmount []byte `protobuf:"bytes,4,opt,name=id_amount,json=idAmount,proto3" json:"id_amount,omitempty"`
// lock time
LockTime uint32 `protobuf:"varint,5,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"`
// contains filtered or unexported fields
}
Transaction to a destination
func (*TransactionCoinTo) Descriptor
deprecated
func (*TransactionCoinTo) Descriptor() ([]byte, []int)
Deprecated: Use TransactionCoinTo.ProtoReflect.Descriptor instead.
func (*TransactionCoinTo) GetAssetsChainid ¶
func (x *TransactionCoinTo) GetAssetsChainid() uint32
func (*TransactionCoinTo) GetAssetsId ¶
func (x *TransactionCoinTo) GetAssetsId() uint32
func (*TransactionCoinTo) GetIdAmount ¶
func (x *TransactionCoinTo) GetIdAmount() []byte
func (*TransactionCoinTo) GetLockTime ¶
func (x *TransactionCoinTo) GetLockTime() uint32
func (*TransactionCoinTo) GetToAddress ¶
func (x *TransactionCoinTo) GetToAddress() string
func (*TransactionCoinTo) ProtoMessage ¶
func (*TransactionCoinTo) ProtoMessage()
func (*TransactionCoinTo) ProtoReflect ¶
func (x *TransactionCoinTo) ProtoReflect() protoreflect.Message
func (*TransactionCoinTo) Reset ¶
func (x *TransactionCoinTo) Reset()
func (*TransactionCoinTo) String ¶
func (x *TransactionCoinTo) String() string
Click to show internal directories.
Click to hide internal directories.