Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DustCollectionResult ¶
func (*DustCollectionResult) GetFeeSum ¶
func (d *DustCollectionResult) GetFeeSum() (uint64, error)
GetFeeSum sums spent fees from the result
type DustCollector ¶
type DustCollector struct {
// contains filtered or unexported fields
}
func NewDustCollector ¶
func (*DustCollector) Close ¶
func (w *DustCollector) Close() error
func (*DustCollector) CollectDust ¶
func (w *DustCollector) CollectDust(ctx context.Context, accountKey *account.AccountKey) (*DustCollectionResult, error)
CollectDust joins up to N units into existing target unit, prioritizing smallest units first. The largest unit is selected as the target unit. Returns swap transaction proof or error or nil if there's not enough bills to swap.
type RpcClient ¶ added in v0.4.0
type RpcClient interface { GetRoundNumber(ctx context.Context) (uint64, error) GetBill(ctx context.Context, unitID types.UnitID, includeStateProof bool) (*api.Bill, error) GetFeeCreditRecord(ctx context.Context, unitID types.UnitID, includeStateProof bool) (*api.FeeCreditBill, error) GetUnitsByOwnerID(ctx context.Context, ownerID types.Bytes) ([]types.UnitID, error) SendTransaction(ctx context.Context, tx *types.TransactionOrder) ([]byte, error) GetTransactionProof(ctx context.Context, txHash types.Bytes) (*types.TransactionRecord, *types.TxProof, error) }
Click to show internal directories.
Click to hide internal directories.