Documentation ¶
Index ¶
- Constants
- func CreateTransaction(receiverPubKey []byte, k *account.AccountKey, amount uint64, ...) (*types.TransactionOrder, error)
- func CreateTransactions(pubKey []byte, amount uint64, systemID types.SystemID, bills []*wtypes.Bill, ...) ([]*types.TransactionOrder, error)
- func NewAddFCTx(unitID []byte, fcProof *wallet.Proof, ac *account.AccountKey, ...) (*types.TransactionOrder, error)
- func NewCloseFCTx(systemID types.SystemID, unitID []byte, timeout uint64, amount uint64, ...) (*types.TransactionOrder, error)
- func NewDustTx(ac *account.AccountKey, systemID types.SystemID, bill *wallet.Bill, ...) (*types.TransactionOrder, error)
- func NewLockFCTx(ac *account.AccountKey, systemID types.SystemID, fcb *wtypes.FeeCreditBill, ...) (*types.TransactionOrder, error)
- func NewLockTx(ac *account.AccountKey, systemID types.SystemID, ...) (*types.TransactionOrder, error)
- func NewReclaimFCTx(systemID types.SystemID, unitID []byte, timeout uint64, fcProof *wallet.Proof, ...) (*types.TransactionOrder, error)
- func NewSplitTx(targetUnits []*money.TargetUnit, remainingValue uint64, k *account.AccountKey, ...) (*types.TransactionOrder, error)
- func NewSwapTx(k *account.AccountKey, systemID types.SystemID, dcProofs []*wallet.Proof, ...) (*types.TransactionOrder, error)
- func NewTransferFCTx(amount uint64, targetRecordID []byte, targetUnitBacklink []byte, ...) (*types.TransactionOrder, error)
- func NewTransferTx(receiverPubKey []byte, k *account.AccountKey, systemID types.SystemID, ...) (*types.TransactionOrder, error)
- func NewTxPayload(systemID types.SystemID, txType string, unitID types.UnitID, timeout uint64, ...) (*types.Payload, error)
- func NewUnlockFCTx(ac *account.AccountKey, systemID types.SystemID, fcb *wtypes.FeeCreditBill, ...) (*types.TransactionOrder, error)
- func NewUnlockTx(ac *account.AccountKey, systemID types.SystemID, b *wtypes.Bill, ...) (*types.TransactionOrder, error)
- func SignPayload(payload *types.Payload, ac *account.AccountKey) (*types.TransactionOrder, error)
Constants ¶
View Source
const MaxFee = uint64(1)
Variables ¶
This section is empty.
Functions ¶
func CreateTransaction ¶
func CreateTransaction(receiverPubKey []byte, k *account.AccountKey, amount uint64, systemID types.SystemID, bill *wtypes.Bill, timeout uint64, fcrID []byte) (*types.TransactionOrder, error)
CreateTransaction creates a P2PKH transfer or split transaction using the given bill.
func CreateTransactions ¶
func CreateTransactions(pubKey []byte, amount uint64, systemID types.SystemID, bills []*wtypes.Bill, k *account.AccountKey, timeout uint64, fcrID []byte) ([]*types.TransactionOrder, error)
CreateTransactions creates 1 to N P2PKH transactions from given bills until target amount is reached. If there exists a bill with value equal to the given amount then transfer transaction is created using that bill, otherwise bills are selected in the given order.
func NewAddFCTx ¶
func NewCloseFCTx ¶
func NewLockFCTx ¶
func NewLockFCTx(ac *account.AccountKey, systemID types.SystemID, fcb *wtypes.FeeCreditBill, lockStatus uint64, timeout uint64) (*types.TransactionOrder, error)
func NewLockTx ¶
func NewLockTx(ac *account.AccountKey, systemID types.SystemID, targetBillID, targetBillBacklink []byte, lockStatus, timeout uint64) (*types.TransactionOrder, error)
func NewReclaimFCTx ¶
func NewSplitTx ¶
func NewSplitTx(targetUnits []*money.TargetUnit, remainingValue uint64, k *account.AccountKey, systemID types.SystemID, bill *wtypes.Bill, timeout uint64, fcrID []byte) (*types.TransactionOrder, error)
NewSplitTx creates a P2PKH split transaction.
func NewTransferFCTx ¶
func NewTransferTx ¶
func NewTransferTx(receiverPubKey []byte, k *account.AccountKey, systemID types.SystemID, bill *wtypes.Bill, timeout uint64, fcrID []byte) (*types.TransactionOrder, error)
NewTransferTx creates a P2PKH transfer transaction.
func NewTxPayload ¶
func NewUnlockFCTx ¶
func NewUnlockFCTx(ac *account.AccountKey, systemID types.SystemID, fcb *wtypes.FeeCreditBill, timeout uint64) (*types.TransactionOrder, error)
func NewUnlockTx ¶
func NewUnlockTx(ac *account.AccountKey, systemID types.SystemID, b *wtypes.Bill, timeout uint64) (*types.TransactionOrder, error)
func SignPayload ¶
func SignPayload(payload *types.Payload, ac *account.AccountKey) (*types.TransactionOrder, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.