Versions in this module Expand all Collapse all v0 v0.4.0 Apr 4, 2024 v0.3.0 Feb 28, 2024 Changes in this version + const BoltBillStoreFileName + const DustBillDeletionTimeout + const ExpiredBillDeletionTimeout + var ErrOwnerPredicateIsNil = errors.New("unit owner predicate is nil") + func Run(ctx context.Context, config *Config) error + type ABClient interface + GetRoundNumber func(ctx context.Context) (uint64, error) + SendTransaction func(ctx context.Context, tx *types.TransactionOrder) error + type AddKeyRequest struct + Pubkey string + type BalanceResponse struct + Balance uint64 + type Bill struct + DCTargetUnitBacklink []byte + DCTargetUnitID []byte + Id []byte + Locked sdk.LockReason + OwnerPredicate []byte + TxHash []byte + Value uint64 + func (b *Bill) IsDCBill() bool + func (b *Bill) ToGenericBill() *sdk.Bill + func (b *Bill) ToGenericBills() *sdk.Bills + type BillStore interface + Do func() BillStoreTx + WithTransaction func(func(tx BillStoreTx) error) error + type BillStoreTx interface + DeleteExpiredBills func(blockNumber uint64) error + GetBill func(unitID []byte) (*Bill, error) + GetBills func(ownerCondition []byte, includeDCBills bool, offsetKey []byte, limit int) ([]*Bill, []byte, error) + GetBlockNumber func() (uint64, error) + GetFeeCreditBill func(unitID []byte) (*Bill, error) + GetSystemDescriptionRecords func() ([]*genesis.SystemDescriptionRecord, error) + GetTxHistoryRecords func(hash sdk.PubKeyHash, dbStartKey []byte, count int) ([]*sdk.TxHistoryRecord, []byte, error) + GetTxProof func(unitID types.UnitID, txHash sdk.TxHash) (*sdk.Proof, error) + RemoveBill func(unitID []byte) error + SetBill func(bill *Bill, proof *sdk.Proof) error + SetBillExpirationTime func(blockNumber uint64, unitID []byte) error + SetBlockNumber func(blockNumber uint64) error + SetFeeCreditBill func(fcb *Bill, proof *sdk.Proof) error + SetSystemDescriptionRecords func(sdrs []*genesis.SystemDescriptionRecord) error + StoreTxHistoryRecord func(hash sdk.PubKeyHash, rec *sdk.TxHistoryRecord) error + StoreTxProof func(unitID types.UnitID, txHash sdk.TxHash, txProof *sdk.Proof) error + type Bills struct + Bills []*Bill + type BlockProcessor struct + func NewBlockProcessor(store BillStore, moneySystemID types.SystemID, log *slog.Logger) (*BlockProcessor, error) + func (p *BlockProcessor) ProcessBlock(ctx context.Context, b *types.Block) error + type Config struct + ABMoneySystemIdentifier types.SystemID + AlphabillUrl string + DbFile string + InitialBill InitialBill + ListBillsPageLimit int + Logger *slog.Logger + Observe Observability + ServerAddr string + SystemDescriptionRecords []*genesis.SystemDescriptionRecord + type InitialBill struct + Id []byte + Predicate []byte + Value uint64 + type ListBillsResponse struct + Bills []*sdk.Bill + type Observability interface + Logger func() *slog.Logger + Tracer func(name string, options ...trace.TracerOption) trace.Tracer + TracerProvider func() trace.TracerProvider + type Pubkey struct + Pubkey []byte + PubkeyHash *account.KeyHashes + type WalletBackend struct + func (w *WalletBackend) GetBill(unitID []byte) (*Bill, error) + func (w *WalletBackend) GetBills(pubkey []byte, includeDCBills bool, offsetKey []byte, limit int) ([]*Bill, []byte, error) + func (w *WalletBackend) GetFeeCreditBill(unitID []byte) (*Bill, error) + func (w *WalletBackend) GetRoundNumber(ctx context.Context) (*sdk.RoundNumber, error) + func (w *WalletBackend) GetTxHistoryRecords(hash sdk.PubKeyHash, dbStartKey []byte, count int) ([]*sdk.TxHistoryRecord, []byte, error) + func (w *WalletBackend) GetTxProof(unitID types.UnitID, txHash sdk.TxHash) (*sdk.Proof, error) + func (w *WalletBackend) HandleTransactionsSubmission(egp *errgroup.Group, sender sdk.PubKey, txs []*types.TransactionOrder) + func (w *WalletBackend) SendTransactions(ctx context.Context, txs []*types.TransactionOrder) map[string]string + type WalletBackendService interface + GetBill func(unitID []byte) (*Bill, error) + GetBills func(pubKey []byte, includeDCBills bool, offsetKey []byte, limit int) ([]*Bill, []byte, error) + GetFeeCreditBill func(unitID []byte) (*Bill, error) + GetRoundNumber func(ctx context.Context) (*sdk.RoundNumber, error) + GetTxHistoryRecords func(hash sdk.PubKeyHash, dbStartKey []byte, count int) ([]*sdk.TxHistoryRecord, []byte, error) + GetTxProof func(unitID types.UnitID, txHash sdk.TxHash) (*sdk.Proof, error) + HandleTransactionsSubmission func(egp *errgroup.Group, sender sdk.PubKey, txs []*types.TransactionOrder) + SendTransactions func(ctx context.Context, txs []*types.TransactionOrder) map[string]string