Documentation
¶
Index ¶
- func EntryToProto(entry *addressbook.Entry) *pb.AddressBookEntry
- type Server
- func (s *Server) CancelDenial(ctx context.Context, req *connect.Request[pb.CancelDenialRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *Server) CreateAddressBookEntry(ctx context.Context, req *connect.Request[pb.CreateAddressBookEntryRequest]) (*connect.Response[pb.CreateAddressBookEntryResponse], error)
- func (s *Server) CreateDenial(ctx context.Context, req *connect.Request[pb.CreateDenialRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *Server) DeleteAddressBookEntry(ctx context.Context, req *connect.Request[pb.DeleteAddressBookEntryRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *Server) GetFireplaceStats(ctx context.Context, req *connect.Request[emptypb.Empty]) (*connect.Response[pb.GetFireplaceStatsResponse], error)
- func (s *Server) GetNetworkStats(ctx context.Context, req *connect.Request[emptypb.Empty]) (*connect.Response[pb.GetNetworkStatsResponse], error)
- func (s *Server) GetSyncInfo(ctx context.Context, req *connect.Request[emptypb.Empty]) (*connect.Response[pb.GetSyncInfoResponse], error)
- func (s *Server) ListAddressBook(ctx context.Context, req *connect.Request[emptypb.Empty]) (*connect.Response[pb.ListAddressBookResponse], error)
- func (s *Server) ListBlocks(ctx context.Context, c *connect.Request[pb.ListBlocksRequest]) (*connect.Response[pb.ListBlocksResponse], error)
- func (s *Server) ListRecentTransactions(ctx context.Context, c *connect.Request[pb.ListRecentTransactionsRequest]) (*connect.Response[pb.ListRecentTransactionsResponse], error)
- func (s *Server) MineBlocks(ctx context.Context, req *connect.Request[emptypb.Empty], ...) error
- func (s *Server) PauseDenial(ctx context.Context, req *connect.Request[pb.PauseDenialRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *Server) ResumeDenial(ctx context.Context, req *connect.Request[pb.ResumeDenialRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *Server) SetTransactionNote(ctx context.Context, req *connect.Request[pb.SetTransactionNoteRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *Server) Stop(ctx context.Context, req *connect.Request[pb.BitwindowdServiceStopRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *Server) UpdateAddressBookEntry(ctx context.Context, req *connect.Request[pb.UpdateAddressBookEntryRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *Server) UpdateNetwork(ctx context.Context, req *connect.Request[pb.UpdateNetworkRequest]) (*connect.Response[pb.UpdateNetworkResponse], error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EntryToProto ¶
func EntryToProto(entry *addressbook.Entry) *pb.AddressBookEntry
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func New ¶
func New( onShutdown func(ctx context.Context), db *sql.DB, validator *service.Service[validatorrpc.ValidatorServiceClient], wallet *service.Service[validatorrpc.WalletServiceClient], bitcoind *service.Service[corerpc.BitcoinServiceClient], walletEngine *engines.WalletEngine, config config.Config, recycle func(ctx context.Context, network config.Network) error, ) *Server
New creates a new Server. recycle hot-swaps bitwindowd's per-network runtime (DB, engines, sub-handlers) in-process when UpdateNetwork is called — bitwindowd never exits across a network swap.
func (*Server) CancelDenial ¶
func (*Server) CreateAddressBookEntry ¶
func (*Server) CreateDenial ¶
func (*Server) DeleteAddressBookEntry ¶
func (*Server) GetFireplaceStats ¶
func (s *Server) GetFireplaceStats(ctx context.Context, req *connect.Request[emptypb.Empty]) (*connect.Response[pb.GetFireplaceStatsResponse], error)
GetFireplaceStats implements bitwindowdv1connect.BitwindowdServiceHandler.
func (*Server) GetNetworkStats ¶
func (*Server) GetSyncInfo ¶
func (s *Server) GetSyncInfo(ctx context.Context, req *connect.Request[emptypb.Empty]) (*connect.Response[pb.GetSyncInfoResponse], error)
GetSyncInfo implements bitwindowdv1connect.BitwindowdServiceHandler.
func (*Server) ListAddressBook ¶
func (*Server) ListBlocks ¶
func (*Server) ListRecentTransactions ¶
func (*Server) MineBlocks ¶
func (*Server) PauseDenial ¶
func (*Server) ResumeDenial ¶
func (*Server) SetTransactionNote ¶
func (s *Server) SetTransactionNote(ctx context.Context, req *connect.Request[pb.SetTransactionNoteRequest]) (*connect.Response[emptypb.Empty], error)
SetTransactionNote implements bitwindowdv1connect.BitwindowdServiceHandler.
func (*Server) Stop ¶
func (s *Server) Stop(ctx context.Context, req *connect.Request[pb.BitwindowdServiceStopRequest]) (*connect.Response[emptypb.Empty], error)
Stop implements drivechainv1connect.DrivechainServiceHandler.
func (*Server) UpdateAddressBookEntry ¶
func (*Server) UpdateNetwork ¶
func (s *Server) UpdateNetwork(ctx context.Context, req *connect.Request[pb.UpdateNetworkRequest]) (*connect.Response[pb.UpdateNetworkResponse], error)
UpdateNetwork swaps bitcoind to a new network and recycles bitwindowd's per-network runtime in-process — bitwindowd never exits.
Sequence:
- Forward to orchestratord's SetBitcoinConfigNetwork. orchestratord rewrites bitcoin.conf, restarts bitcoind on the new chain, and atomically rebuilds its hosted bitcoin proxy. All `service.Service` reconnect loops (bitcoind, enforcer, wallet) reconverge automatically.
- Hand off to recycle: closes the old DB, opens a new network-scoped one, rebuilds engines + sub-handlers, atomic-swaps the listener mux. The HTTP server stays bound to the same port across the swap.
- Return success.
Click to show internal directories.
Click to hide internal directories.