model

package
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateWalletPayload

type CreateWalletPayload struct {
	Ident string        `json:"ident"`
	Info  []*WalletInfo `json:"info"`
	Fee   uint          `json:"fee"`
}

func (*CreateWalletPayload) AddFee

func (walletPayload *CreateWalletPayload) AddFee(fee uint)

func (*CreateWalletPayload) AddIdent

func (walletPayload *CreateWalletPayload) AddIdent(ident string)

func (*CreateWalletPayload) AddInfo

func (walletPayload *CreateWalletPayload) AddInfo(udtHash string)

func (*CreateWalletPayload) Build

func (walletPayload *CreateWalletPayload) Build() *CreateWalletPayload

type CreateWalletPayloadBuilder

type CreateWalletPayloadBuilder struct {
	Ident string        `json:"ident"`
	Info  []*WalletInfo `json:"info"`
	Fee   uint          `json:"fee"`
}

type FromAccount

type FromAccount struct {
	Idents []string `json:"idents"`
	Source string   `json:"source"`
}

type ToAccount

type ToAccount struct {
	Ident  string `json:"ident"`
	Action string `json:"action"`
}

type TransferBuilder

type TransferBuilder struct {
	UdtHash string          `json:"udt_hash,omitempty"`
	From    *FromAccount    `json:"from"`
	Items   []*TransferItem `json:"items"`
	Change  string          `json:"change,omitempty"`
	Fee     uint            `json:"fee"`
}

func (*TransferBuilder) AddChange

func (builder *TransferBuilder) AddChange(change string)

func (*TransferBuilder) AddFee

func (builder *TransferBuilder) AddFee(fee uint)

func (*TransferBuilder) AddFrom

func (builder *TransferBuilder) AddFrom(idents []string, source string)

func (*TransferBuilder) AddItem

func (builder *TransferBuilder) AddItem(ident, action string, amount uint)

func (*TransferBuilder) AddUdtHash

func (builder *TransferBuilder) AddUdtHash(udtHash string)

func (*TransferBuilder) Build

func (builder *TransferBuilder) Build() *TransferPayload

type TransferItem

type TransferItem struct {
	To     *ToAccount `json:"to"`
	Amount uint       `json:"amount"`
}

type TransferPayload

type TransferPayload struct {
	UdtHash string          `json:"udt_hash,omitempty"`
	From    *FromAccount    `json:"from"`
	Items   []*TransferItem `json:"items"`
	Change  string          `json:"change,omitempty"`
	Fee     uint            `json:"fee"`
}

type WalletInfo

type WalletInfo struct {
	UdtHash string `json:"udt_hash"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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