Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cheque ¶ added in v0.3.0
type Cheque struct { Sender *types.Script Receiver *types.Script UUID string Amount *big.Int FeeRate uint64 // contains filtered or unexported fields }
Cheque object
func NewCheque ¶ added in v0.3.0
func NewCheque(senderAddr, receiverAddr, uuid, amount string, feeRate uint64, systemScripts *utils.SystemScripts) (*Cheque, error)
NewCheque returns a new Cheque object
func (*Cheque) GenerateIssuingChequeUnsignedTx ¶ added in v0.3.0
GenerateIssuingChequeUnsignedTx generate an unsigned transaction for issuing a cheque cell
type ClaimCheque ¶ added in v0.3.0
type ClaimCheque struct { Receiver *types.Script UUID string FeeRate uint64 // contains filtered or unexported fields }
ClaimCheque object
func NewClaimCheque ¶ added in v0.3.0
func NewClaimCheque(receiverAddr, uuid string, feeRate uint64, systemScripts *utils.SystemScripts) (*ClaimCheque, error)
NewClaimCheque returns a new ClaimCheque object
func (*ClaimCheque) GenerateClaimChequeUnsignedTx ¶ added in v0.3.0
func (c *ClaimCheque) GenerateClaimChequeUnsignedTx(client rpc.Client) (*types.Transaction, error)
GenerateClaimChequeUnsignedTx generate an unsigned transaction for claim cheque cells
func (*ClaimCheque) SignTx ¶ added in v0.3.0
func (c *ClaimCheque) SignTx(key crypto.Key) (*types.Transaction, error)
SignTx sign an unsigned claim cheque transaction and return an signed transaction
type Payment ¶
type Payment struct { From *types.Script To *types.Script Amount uint64 FeeRate uint64 // contains filtered or unexported fields }
func NewPayment ¶
NewPayment returns a Payment object, amount's unit is shannon
func (*Payment) GenerateTx ¶
func (p *Payment) GenerateTx(client rpc.Client, systemScripts *utils.SystemScripts) (*types.Transaction, error)
type Sudt ¶ added in v0.3.0
type Sudt struct { Senders []*types.Script ReceiverInfo []types.ReceiverInfo CkbPayer *types.Script CkbChanger *types.Script SudtChanger *types.Script UUID string TransferAmount *big.Int FeeRate uint64 // contains filtered or unexported fields }
func NewSudt ¶ added in v0.3.0
func NewSudt(senderAddresses []string, receiverInfo map[string]string, ckbPayerAddress, ckbChangeAddress, sudtChangeAddress, uuid string, feeRate uint64, systemScripts *utils.SystemScripts) (*Sudt, error)
NewSudt returns a new NewSudt object receiverInfo's key is an address and its value is a sudt amount
func (*Sudt) GenerateTransferSudtUnsignedTx ¶ added in v0.3.0
GenerateTransferSudtUnsignedTx generate an unsigned transaction for transfer sudt
type WithdrawCheque ¶ added in v0.3.0
type WithdrawCheque struct { Sender *types.Script Receiver *types.Script UUID string FeeRate uint64 Amount *big.Int // contains filtered or unexported fields }
WithdrawCheque object
func NewWithdrawCheque ¶ added in v0.3.0
func NewWithdrawCheque(senderAddr, receiverAddr, uuid, amount string, feeRate uint64, systemScripts *utils.SystemScripts) (*WithdrawCheque, error)
NewWithdrawCheque returns a new WithdrawCheque object
func (*WithdrawCheque) GenerateWithdrawChequeUnsignedTx ¶ added in v0.3.0
func (c *WithdrawCheque) GenerateWithdrawChequeUnsignedTx(client rpc.Client) (*types.Transaction, error)
GenerateWithdrawChequeUnsignedTx generate an unsigned transaction for withdraw the cheque cell
func (*WithdrawCheque) SignTx ¶ added in v0.3.0
func (c *WithdrawCheque) SignTx(key crypto.Key) (*types.Transaction, error)
SignTx sign an unsigned withdraw cheque transaction and return an signed transaction