internals library
LibSpiffy Internals - Domain event-sourcing types for advanced use.
Most applications should use package:libspiffy/coordinator.dart instead.
This library exposes the aggregate commands, domain events, and actor-level
messages used internally by the coordinator. Import this only if you are
building custom actors, extending aggregates, or writing integration tests
that need direct access to the event-sourcing layer.
Classes
- AcceptChannelCommand
- Server accepts a channel request
- AcceptChannelMessage
- Request to accept a channel as server
- AcknowledgePaymentCommand
- Server acknowledges payment with pre-computed server signature
- AcknowledgePaymentMessage
- Request to acknowledge a payment as server
- AddressDiscoveredEvent
- Event fired when an address is discovered during import
- AddressGeneratedEvent
- Event fired when a new address is generated
- AddressLabelUpdatedEvent
- Event fired when an address label is updated
- AllUTXOsSplitCompletedEvent
- Event fired when all UTXOs have been processed
- BitcoinWalletAggregate
- Bitcoin wallet aggregate root implementing event sourcing
- BroadcastTransactionCommand
- Command to broadcast a transaction
- BuildFundingTransactionCommand
- Command to build and sign a payment channel funding transaction.
- BuildRefundTransactionMessage
- Request to build refund transaction (client side, after server accepts)
- CancelInvoiceCommand
- Command to cancel an invoice
- ChannelAcceptedEvent
- Server has accepted a channel request
- ChannelAcceptedResponse
- Response to channel acceptance
- ChannelClosedEvent
- Channel has been closed (settlement TX broadcast)
- ChannelClosedResponse
- Response to channel close
- ChannelClosingEvent
- Channel close has been initiated
- ChannelCommand
- Base class for all channel commands
- ChannelEvent
- Base class for all channel events
- ChannelInitiatedResponse
- Response to channel initiation
- ChannelOpenedEvent
- Channel is now open (funding TX broadcast)
- ChannelOpenedResponse
- Response to channel opening
- ChannelRejectedEvent
- Server has rejected a channel request
- ChannelRequestedEvent
- Channel has been requested by a client
- ChannelState
- State for a payment channel aggregate
- ChannelStateQuery
- Direct query to aggregate for full state (for building transactions)
- ChannelStateResponse
- Response with channel state
- CheckInvoiceStatusCommand
- Command to check invoice status
- ClaimRefundCommand
- Claim refund after channel expiry (non-cooperative close)
- CleanupExpiredReservationsCommand
- Command to clean up expired UTXO reservations
- CloseChannelCommand
- Initiate channel close (cooperative)
- CloseChannelMessage
- Request to close a channel
- ConfirmTransactionCommand
- Command to confirm a pending transaction (transition from pending to confirmed)
- CreateInvoiceCommand
- Command to create a new invoice
- CreateWalletCommand
- Command to create a new wallet
- ExpireInvoiceCommand
- Command to expire an invoice
- FinalizeCloseCommand
- Finalize channel close after settlement TX is broadcast
- FullChannelStateResponse
- Full channel state response from aggregate (for building transactions)
- GenerateAddressCommand
- Command to generate a new address
- ImportWalletFromXprivCommand
- Command to import a wallet from xpriv with transaction history
- InitiateChannelMessage
- Request to initiate a new payment channel as client
- InvoiceAggregate
- Invoice aggregate root implementing event sourcing
- InvoiceCancelledEvent
- Event fired when an invoice is cancelled
- InvoiceCommand
- Base class for all invoice commands
- InvoiceCreatedEvent
- Event fired when an invoice is created
- InvoiceEvent
- Base class for all invoice-related domain events
- InvoiceExpiredEvent
- Event fired when an invoice expires
- InvoicePaidEvent
- Event fired when an invoice is paid
- InvoiceStatusChangedEvent
- Event fired when invoice status changes
- MarkInvoicePaidCommand
- Command to mark an invoice as paid
- MarkUTXOAvailableCommand
- Command to mark UTXO as available for spending
- OpenChannelCommand
- Mark channel as open after funding transaction is broadcast
- OpenChannelMessage
- Message to finalize channel opening after funding TX is broadcast
- PaymentAcknowledgedEvent
- Payment has been acknowledged (server side - verified and countersigned)
- PaymentAcknowledgedResponse
- Response to payment acknowledgment
- PaymentChannelAggregate
- Payment Channel Aggregate Root
- PaymentChannelManagerActor
- Payment Channel Manager - Orchestrates all channel operations
- PaymentRecordedEvent
- Payment has been recorded (client side - built and signed)
- PaymentRecordedResponse
- Response to payment recording
- PreloadWalletCommand
- Command to preload a wallet aggregate at startup
- ProvideRefundSignatureCommand
- Server provides their signature on the refund transaction
- QueryChannelStateMessage
- Query current state of a channel
- ReceiveUTXOCommand
- Command to record a received UTXO
- RecordImportedTransactionCommand
- Command to record an imported transaction (from blockchain scan)
- RecordOutgoingTransactionCommand
- Command to record an outgoing transaction (payment created by this wallet) Records transaction in PENDING state until payment is confirmed by recipient
- RecordPaymentCommand
- Client records a payment with pre-built and pre-signed payment TX
- RecordPaymentMessage
- Request to record a payment as client
- RecordRefundSignatureMessage
- Request to record server's refund signature (client side, received via P2P)
- RecordServerAcceptanceCommand
- Client records that the server accepted the channel
- RecordServerAcceptanceMessage
- Client records that server accepted the channel (stores server pubkey/address)
- RefundBuiltEvent
- Refund transaction has been built (client side)
- RefundClaimedEvent
- Refund has been claimed after channel expiry
- RefundCountersignedEvent
- Server has signed the refund transaction
- RefundSignatureRecordedResponse
- Response to recording refund signature
- RefundTransactionBuiltResponse
- Response with built refund transaction
- RefundTransactionSignedResponse
- Response with refund signature
- RegisterDiscoveredAddressCommand
- Command to register a discovered address (from wallet import)
- RejectChannelCommand
- Server rejects a channel request
- ReleaseUTXOCommand
- Command to release a UTXO reservation
- ReleaseUTXOsCommand
- Command to release UTXO reservations
- RenewUTXOReservationCommand
- Command to renew/extend a UTXO reservation
- RequestChannelCommand
- Client requests to open a channel with a server
- RequestRefundSignatureCommand
- Client provides refund transaction with server's pre-computed signature
- ReserveUTXOCommand
- Command to reserve a UTXO for a transaction
- ReserveUTXOsCommand
- Command to reserve UTXOs for a transaction
- ServerAcceptanceRecordedEvent
- Client has recorded server's acceptance (server pubkey/address)
- SignMultisigTransactionCommand
- Command to sign a multisig transaction input Used for payment channels where we need to sign one input of a 2-of-2 multisig
- SignRefundTransactionMessage
- Request to sign refund transaction (server side)
- SignTransactionCommand
- Command to sign a transaction
- SpendUTXOCommand
- Command to spend a UTXO
- SplitUTXOsToBenfordCommand
- Command to split wallet UTXOs into Benford distribution for privacy
- TransactionBroadcastEvent
- Event fired when a transaction is broadcast
- TransactionConfirmedEvent
- Event fired when a pending transaction is confirmed
- TransactionImportedEvent
- Event fired when a transaction is imported
- TransactionRecordedEvent
- Event fired when an outgoing transaction is recorded (in pending state)
- TransactionSignedEvent
- Event fired when a transaction is created Event fired when a transaction is signed
- UpdateAddressLabelCommand
- Command to update an address label
- UpdateUTXOConfirmationsCommand
- Command to update UTXO confirmations
- UpdateWalletConfigurationCommand
- Command to update wallet configuration
- UTXOConfirmationUpdatedEvent
- Event fired when UTXO confirmation count is updated
- UTXOMarkedAvailableEvent
- Event fired when UTXO becomes available for spending
- UTXOReceivedEvent
- Event fired when a UTXO is received
- UTXOReleasedEvent
- Event fired when a UTXO reservation is released
- UTXOReservationExpiredEvent
- Event fired when UTXO reservation expires
- UTXOReservationPlacedEvent
- Event fired when UTXOs are reserved for transaction creation
- UTXOReservationReleasedEvent
- Event fired when UTXO reservation is released
- UTXOReservationRenewedEvent
- Event fired when a UTXO reservation is renewed/extended
- UTXOReservedEvent
- Event fired when a UTXO is reserved for a transaction
- UTXOSpentEvent
- Event fired when a UTXO is spent
- UTXOSplitCompletedEvent
- Event fired when a single UTXO has been successfully split
- UTXOSplitInitiatedEvent
- Event fired when UTXO split operation is initiated by the aggregate
- WalletCommand
- Base class for all wallet commands
- WalletConfigurationUpdatedEvent
- Event fired when wallet configuration is updated
- WalletCreatedEvent
- Event fired when a wallet is created
- WalletImportCompletedEvent
- Event fired when wallet import completes
- WalletImportFailedEvent
- Event fired when wallet import fails
- WalletImportProgressEvent
- Event fired during wallet import to report progress
- WalletImportStartedEvent
- Event fired when wallet import starts
Enums
- ChannelRole
- Role in a payment channel
- ChannelStatus
- Status of a payment channel