Documentation ¶
Index ¶
- Constants
- func ParseIDFromSlate(slateBytes []byte) (ID []byte, err error)
- type Database
- type Output
- type OutputStatus
- type SavedSlate
- type Slate
- type Transaction
- type TransactionStatus
- type Wallet
- func (t *Wallet) Cancel(transactionID []byte) error
- func (t *Wallet) Close()
- func (t *Wallet) Confirm(transactionID []byte) error
- func (t *Wallet) Finalize(responseSlateBytes []byte) (txBytes []byte, err error)
- func (t *Wallet) Info() (string, error)
- func (t *Wallet) InitMasterKey(mnemonic string) (createdMnemonic string, err error)
- func (t *Wallet) Issue(value uint64, asset string) (issueBytes []byte, err error)
- func (t *Wallet) NewResponse(amount uint64, fee uint64, asset string, change uint64, walletInputs []Output, ...) (outSlateBytes []byte, outputs []Output, savedSlate *SavedSlate, err error)
- func (t *Wallet) NewSlate(amount uint64, fee uint64, asset string, change uint64, walletInputs []Output, ...) (slateBytes []byte, outputs []Output, savedSlate *SavedSlate, err error)
- func (t *Wallet) NewTransaction(responseSlate *Slate, senderSlate *SavedSlate) (ledgerTxBytes []byte, walletTx Transaction, err error)
- func (t *Wallet) Print() error
- func (t *Wallet) Respond(inSlateBytes []byte) (outSlateBytes []byte, err error)
- func (t *Wallet) Send(amount uint64, asset string, receiveAmount uint64, receiveAsset string) (slateBytes []byte, err error)
Constants ¶
View Source
const ( OutputUnconfirmed = iota OutputConfirmed OutputLocked OutputSpent OutputCanceled )
View Source
const ( TransactionUnconfirmed = iota TransactionConfirmed TransactionCanceled )
Variables ¶
This section is empty.
Functions ¶
func ParseIDFromSlate ¶
Types ¶
type Database ¶
type Database interface { PutSenderSlate(slate *SavedSlate) error PutReceiverSlate(slate *SavedSlate) error PutTransaction(tx Transaction) error PutOutput(output Output) error GetSenderSlate(id []byte) (slate *SavedSlate, err error) GetTransaction(id []byte) (transaction Transaction, err error) GetOutput(commit string) (output Output, err error) ListSlates() (slates []SavedSlate, err error) ListTransactions() (transactions []Transaction, err error) ListOutputs() (outputs []Output, err error) GetInputs(amount uint64, asset string) (inputs []Output, change uint64, err error) Confirm(transactionID []byte) error Cancel(transactionID []byte) error NextIndex() (uint32, error) Close() }
func NewLeveldbDatabase ¶
type OutputStatus ¶
type OutputStatus int
func (OutputStatus) String ¶
func (t OutputStatus) String() string
type SavedSlate ¶
type Transaction ¶
type Transaction struct { ledger.Transaction Status TransactionStatus `json:"status,omitempty"` }
type TransactionStatus ¶
type TransactionStatus int
func (TransactionStatus) String ¶
func (t TransactionStatus) String() string
type Wallet ¶
type Wallet struct {
// contains filtered or unexported fields
}
func (*Wallet) InitMasterKey ¶
func (*Wallet) NewResponse ¶
func (*Wallet) NewTransaction ¶
func (t *Wallet) NewTransaction(responseSlate *Slate, senderSlate *SavedSlate) (ledgerTxBytes []byte, walletTx Transaction, err error)
Click to show internal directories.
Click to hide internal directories.