# Functions
AccountFromContext attempts to extract an account from the given context.
AddAccountToContext adds the given value to the context for easy retrieval later on.
AddRequestIDToContext adds the given request ID to the context for easy retrieval later on.
FromContext tries to extract a value from the given context.
InvoiceEntryMapDecoder decodes a map of invoice hashes.
InvoiceEntryMapEncoder encodes a map of invoice hashes.
NewAccountChecker creates a new account checker that can keep track of all account related requests, including invoices, payments and account balances.
NewBoltStore creates a BoltStore instance and the corresponding bucket in the bolt DB if it does not exist yet.
NewRPCServer returns a new RPC server for the given service.
NewService returns a service backed by the macaroon Bolt DB stored in the passed-in directory.
ParseAccountID attempts to parse a string as an account ID.
PaymentEntryMapDecoder decodes a map of payment entries.
PaymentEntryMapEncoder encodes a map of payment entries.
RequestIDFromContext attempts to extract a request ID from the given context.
UseLogger uses a specified Logger to output package logging info.
# Constants
AccountIDLen is the length of the ID that is generated as a unique identifier of an account.
CondAccount is the custom caveat condition that binds a macaroon to a certain account.
DBFilename is the filename within the data directory which contains the macaroon stores.
DefaultAccountDBTimeout is the default maximum time we wait for the account bbolt database to be opened.
No description provided by the author
TypeInitialBalance represents an account that has an initial balance that is used up when it is spent and is not replenished automatically.
# Variables
ClosedChannelsEmptyRewriter is a response re-writer that returns a response to ClosedChannels with zero channels shown.
DecodePayReqPassThrough is a pass-through checker that allows calls to DecodePayReq through unchanged.
ErrAccBalanceInsufficient is returned if the amount required to perform a certain action is larger than the current balance of the account.
ErrAccExpired is returned if an account has an expiration date set and that date is in the past.
ErrAccNotFound is returned if an account could not be found in the local bolt DB.
ErrAccountBucketNotFound specifies that there is no bucket for the accounts in the DB yet which can/should only happen if the account store has been corrupted or was initialized incorrectly.
ErrAccountServiceDisabled is the error that is returned when the account service has been disabled due to an error being thrown in the service that cannot be recovered from.
ErrNoInvoiceIndexKnown is the error that is returned by the store if it does not yet have any invoice indexes stored.
ErrNotSupportedWithAccounts is the error that is returned when an RPC is called that isn't supported to be handled by the account interceptor.
GetNodeInfoPassThrough is a pass-through checker that allows calls to GetNodeInfo through unchanged.
GetTransactionsEmptyRewriter is a response re-writer that returns a response to GetTransactions with zero transactions shown.
KeyAccount is the key under which we store the account in the request context.
KeyRequestID is the key under which we store the middleware request ID.
ListChannelsEmptyRewriter is a response re-writer that returns a response to ListChannels with zero channels shown.
ListPeersEmptyRewriter is a response re-writer that returns a response to ListPeers with zero peers shown.
MacaroonPermissions are the permissions required for an account macaroon.
PendingChannelsEmptyRewriter is a response re-writer that returns a response to PendingChannels with zero channels shown.
WalletBalanceEmptyRewriter is a response re-writer that returns a response to WalletBalance with a zero balance shown.
# Structs
AccountChecker is a type that can check all account related requests, including invoices, payments and account balances.
BoltStore wraps the bolt DB that stores all accounts and their balances.
Config holds the configuration options for the accounts service.
ContextKey is the type that we use to identify account specific values in the request context.
InterceptorService is an account storage and interceptor for accounting based macaroon balances and utility methods to manage accounts.
OffChainBalanceAccount holds all information that is needed to keep track of a user's off-chain account balance.
PaymentEntry is the data we track per payment that is associated with an account.
RequestValues holds various values associated with a specific request that we may want access to when handling the response.
RPCServer is the main server that implements the Accounts gRPC service.
# Interfaces
RequestValuesStore is a store that can be used to keep track of the mapping between a request ID and various values associated with that request which we may want access to when handling the request response.
Service is the main account service interface.
Store is the main account store interface.
# Type aliases
AccountID represents an account's unique ID.
AccountInvoices is the set of invoices that are associated with an account.
AccountPayments is the set of payments that are associated with an account.
AccountType is an enum-like type which denotes the possible account types that can be referenced in macaroons to keep track of user's balances.
CheckerMap is a type alias that maps gRPC request URIs to their rpcmiddleware.RoundTripChecker types.