Documentation ¶
Index ¶
- func ValidCode(u uint16) bool
- func Verify(from mint.PublicKey, payload []byte, signature mint.Signature) error
- type Code
- type DistributionFee
- type ParsedTransaction
- type RegisterNode
- type SetWalletTag
- type SignedTransaction
- type Transactioner
- type TransferAsset
- type UnregisterNode
- type UnsetWalletTag
- type UserData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Code ¶
type Code uint16
Code is a transaction name/code
const ( // RegisterNodeTx ... RegisterNodeTx Code = 1 // UnregisterNodeTx ... UnregisterNodeTx Code = 2 // SetWalletTagTx ... SetWalletTagTx Code = 3 // UnsetWalletTagTx ... UnsetWalletTagTx Code = 4 // UserDataTx ... UserDataTx Code = 7 // TransferAssetTx ... TransferAssetTx Code = 10 // DistributionFeeTx ... DistributionFeeTx Code = 11 )
type DistributionFee ¶
type DistributionFee struct { OwnerAddress mint.PublicKey AmountMNT *amount.Amount AmountGOLD *amount.Amount }
DistributionFee transaction data
func (*DistributionFee) Parse ¶
func (t *DistributionFee) Parse(r io.Reader) (*ParsedTransaction, error)
Parse impl.
func (*DistributionFee) Sign ¶
func (t *DistributionFee) Sign(signer *signer.Signer, nonce uint64) (*SignedTransaction, error)
Sign impl
type ParsedTransaction ¶
type ParsedTransaction struct { Nonce uint64 From mint.PublicKey Digest mint.Digest Signature mint.Signature }
ParsedTransaction data
type RegisterNode ¶
RegisterNode transaction data
func (*RegisterNode) Parse ¶
func (t *RegisterNode) Parse(r io.Reader) (*ParsedTransaction, error)
Parse impl
func (*RegisterNode) Sign ¶
func (t *RegisterNode) Sign(signer *signer.Signer, nonce uint64) (*SignedTransaction, error)
Sign impl
type SetWalletTag ¶
SetWalletTag transaction data
func (*SetWalletTag) Parse ¶
func (t *SetWalletTag) Parse(r io.Reader) (*ParsedTransaction, error)
Parse impl
func (*SetWalletTag) Sign ¶
func (t *SetWalletTag) Sign(signer *signer.Signer, nonce uint64) (*SignedTransaction, error)
Sign impl
type SignedTransaction ¶
SignedTransaction data
type Transactioner ¶
type Transactioner interface { Sign(signer *signer.Signer, nonce uint64) (*SignedTransaction, error) Parse(r io.Reader) (*ParsedTransaction, error) Code() Code }
Transactioner is a transaction interface
func CodeToTransaction ¶
func CodeToTransaction(code Code) (Transactioner, error)
CodeToTransaction returns corresponding transaction data holder
type TransferAsset ¶
TransferAsset transaction data
func (*TransferAsset) Parse ¶
func (t *TransferAsset) Parse(r io.Reader) (*ParsedTransaction, error)
Parse impl
func (*TransferAsset) Sign ¶
func (t *TransferAsset) Sign(signer *signer.Signer, nonce uint64) (*SignedTransaction, error)
Sign impl
type UnregisterNode ¶
UnregisterNode transaction data
func (*UnregisterNode) Parse ¶
func (t *UnregisterNode) Parse(r io.Reader) (*ParsedTransaction, error)
Parse impl
func (*UnregisterNode) Sign ¶
func (t *UnregisterNode) Sign(signer *signer.Signer, nonce uint64) (*SignedTransaction, error)
Sign impl
type UnsetWalletTag ¶
UnsetWalletTag transaction data
func (*UnsetWalletTag) Parse ¶
func (t *UnsetWalletTag) Parse(r io.Reader) (*ParsedTransaction, error)
Parse impl
func (*UnsetWalletTag) Sign ¶
func (t *UnsetWalletTag) Sign(signer *signer.Signer, nonce uint64) (*SignedTransaction, error)
Sign impl
Click to show internal directories.
Click to hide internal directories.