Documentation
¶
Index ¶
- Constants
- Variables
- func AllowCORS(handler http.Handler, origins []string) http.Handler
- func CheckFederationServer(localRuntimeID int64, connectTimeout time.Duration, server universe.ServerAddr) error
- func ConnectUniverse(serverAddr universe.ServerAddr) (*universeClientConn, error)
- func MarshalAssetFedSyncCfg(config universe.FedUniSyncConfig) (*unirpc.AssetFederationSyncConfig, error)
- func MarshalUniID(id universe.Identifier) (*unirpc.ID, error)
- func MarshalUniProofType(proofType universe.ProofType) (unirpc.ProofType, error)
- func NewRpcSupplySync(serverAddr universe.ServerAddr) (supplyverifier.UniverseClient, error)
- func NewRpcUniverseDiff(serverAddr universe.ServerAddr) (universe.DiffEngine, error)
- func NewRpcUniverseRegistrar(serverAddr universe.ServerAddr) (universe.Registrar, error)
- func UnmarshalGroupWitness(wit *taprpc.GroupWitness) (*tapgarden.PendingGroupWitness, error)
- func UnmarshalUniID(rpcID *unirpc.ID) (universe.Identifier, error)
- func UnmarshalUniProofType(rpcType unirpc.ProofType) (universe.ProofType, error)
- func UseDaemonLogger(logger btclog.Logger)
- func UseLogger(logger btclog.Logger)
- func UseServerLogger(logger btclog.Logger)
- type EventStream
- type IgnoreAssetOutPointRequest
- type RPCServer
- func (r *RPCServer) AddAssetBuyOffer(_ context.Context, req *rfqrpc.AddAssetBuyOfferRequest) (*rfqrpc.AddAssetBuyOfferResponse, error)
- func (r *RPCServer) AddAssetBuyOrder(ctx context.Context, req *rfqrpc.AddAssetBuyOrderRequest) (*rfqrpc.AddAssetBuyOrderResponse, error)
- func (r *RPCServer) AddAssetSellOffer(_ context.Context, req *rfqrpc.AddAssetSellOfferRequest) (*rfqrpc.AddAssetSellOfferResponse, error)
- func (r *RPCServer) AddAssetSellOrder(ctx context.Context, req *rfqrpc.AddAssetSellOrderRequest) (*rfqrpc.AddAssetSellOrderResponse, error)
- func (r *RPCServer) AddFederationServer(ctx context.Context, req *unirpc.AddFederationServerRequest) (*unirpc.AddFederationServerResponse, error)
- func (r *RPCServer) AddInvoice(ctx context.Context, req *tchrpc.AddInvoiceRequest) (*tchrpc.AddInvoiceResponse, error)
- func (r *RPCServer) AddrReceives(ctx context.Context, req *taprpc.AddrReceivesRequest) (*taprpc.AddrReceivesResponse, error)
- func (r *RPCServer) AnchorVirtualPsbts(ctx context.Context, req *wrpc.AnchorVirtualPsbtsRequest) (*taprpc.SendAssetResponse, error)
- func (r *RPCServer) AssetLeafKeys(ctx context.Context, req *unirpc.AssetLeafKeysRequest) (*unirpc.AssetLeafKeyResponse, error)
- func (r *RPCServer) AssetLeaves(ctx context.Context, req *unirpc.AssetLeavesRequest) (*unirpc.AssetLeafResponse, error)
- func (r *RPCServer) AssetRoots(ctx context.Context, req *unirpc.AssetRootRequest) (*unirpc.AssetRootResponse, error)
- func (r *RPCServer) BakeMacaroon(ctx context.Context, req *taprpc.BakeMacaroonRequest) (*taprpc.BakeMacaroonResponse, error)
- func (r *RPCServer) BurnAsset(ctx context.Context, in *taprpc.BurnAssetRequest) (*taprpc.BurnAssetResponse, error)
- func (r *RPCServer) CancelBatch(_ context.Context, _ *mintrpc.CancelBatchRequest) (*mintrpc.CancelBatchResponse, error)
- func (r *RPCServer) CommitVirtualPsbts(ctx context.Context, req *wrpc.CommitVirtualPsbtsRequest) (*wrpc.CommitVirtualPsbtsResponse, error)
- func (r *RPCServer) DebugLevel(ctx context.Context, req *taprpc.DebugLevelRequest) (*taprpc.DebugLevelResponse, error)
- func (r *RPCServer) DeclareScriptKey(ctx context.Context, in *wrpc.DeclareScriptKeyRequest) (*wrpc.DeclareScriptKeyResponse, error)
- func (r *RPCServer) DecodeAddr(_ context.Context, req *taprpc.DecodeAddrRequest) (*taprpc.Addr, error)
- func (r *RPCServer) DecodeAssetPayReq(ctx context.Context, payReq *tchrpc.AssetPayReq) (*tchrpc.AssetPayReqResponse, error)
- func (r *RPCServer) DecodeProof(ctx context.Context, req *taprpc.DecodeProofRequest) (*taprpc.DecodeProofResponse, error)
- func (r *RPCServer) DeleteAssetLeaf(ctx context.Context, req *unirpc.DeleteAssetLeafRequest) (*unirpc.DeleteAssetLeafResponse, error)
- func (r *RPCServer) DeleteAssetRoot(ctx context.Context, req *unirpc.DeleteRootQuery) (*unirpc.DeleteRootResponse, error)
- func (r *RPCServer) DeleteFederationServer(ctx context.Context, req *unirpc.DeleteFederationServerRequest) (*unirpc.DeleteFederationServerResponse, error)
- func (r *RPCServer) EncodeCustomRecords(_ context.Context, in *tchrpc.EncodeCustomRecordsRequest) (*tchrpc.EncodeCustomRecordsResponse, error)
- func (r *RPCServer) ExportAssetWalletBackup(ctx context.Context, req *wrpc.ExportAssetWalletBackupRequest) (*wrpc.ExportAssetWalletBackupResponse, error)
- func (r *RPCServer) ExportProof(ctx context.Context, req *taprpc.ExportProofRequest) (*taprpc.ProofFile, error)
- func (r *RPCServer) FetchAsset(ctx context.Context, req *taprpc.FetchAssetRequest) (*taprpc.FetchAssetResponse, error)
- func (r *RPCServer) FetchAssetMeta(ctx context.Context, req *taprpc.FetchAssetMetaRequest) (*taprpc.FetchAssetMetaResponse, error)
- func (r *RPCServer) FetchSupplyCommit(ctx context.Context, req *unirpc.FetchSupplyCommitRequest) (*unirpc.FetchSupplyCommitResponse, error)
- func (r *RPCServer) FetchSupplyLeaves(ctx context.Context, req *unirpc.FetchSupplyLeavesRequest) (*unirpc.FetchSupplyLeavesResponse, error)
- func (r *RPCServer) FinalizeBatch(ctx context.Context, req *mintrpc.FinalizeBatchRequest) (*mintrpc.FinalizeBatchResponse, error)
- func (r *RPCServer) ForwardingHistory(ctx context.Context, req *rfqrpc.ForwardingHistoryRequest) (*rfqrpc.ForwardingHistoryResponse, error)
- func (r *RPCServer) FundBatch(ctx context.Context, req *mintrpc.FundBatchRequest) (*mintrpc.FundBatchResponse, error)
- func (r *RPCServer) FundChannel(ctx context.Context, req *tchrpc.FundChannelRequest) (*tchrpc.FundChannelResponse, error)
- func (r *RPCServer) FundVirtualPsbt(ctx context.Context, req *wrpc.FundVirtualPsbtRequest) (*wrpc.FundVirtualPsbtResponse, error)
- func (r *RPCServer) GetInfo(ctx context.Context, _ *taprpc.GetInfoRequest) (*taprpc.GetInfoResponse, error)
- func (r *RPCServer) IgnoreAssetOutPoint(ctx context.Context, rpcReq *unirpc.IgnoreAssetOutPointRequest) (*unirpc.IgnoreAssetOutPointResponse, error)
- func (r *RPCServer) ImportAssetsFromBackup(ctx context.Context, req *wrpc.ImportAssetsFromBackupRequest) (*wrpc.ImportAssetsFromBackupResponse, error)
- func (r *RPCServer) ImportProof(ctx context.Context, req *tapdevrpc.ImportProofRequest) (*tapdevrpc.ImportProofResponse, error)
- func (r *RPCServer) Info(ctx context.Context, _ *unirpc.InfoRequest) (*unirpc.InfoResponse, error)
- func (r *RPCServer) InsertProof(ctx context.Context, req *unirpc.AssetProof) (*unirpc.AssetProofResponse, error)
- func (r *RPCServer) InsertSupplyCommit(ctx context.Context, req *unirpc.InsertSupplyCommitRequest) (*unirpc.InsertSupplyCommitResponse, error)
- func (r *RPCServer) ListAssets(ctx context.Context, req *taprpc.ListAssetRequest) (*taprpc.ListAssetResponse, error)
- func (r *RPCServer) ListBalances(ctx context.Context, req *taprpc.ListBalancesRequest) (*taprpc.ListBalancesResponse, error)
- func (r *RPCServer) ListBatches(_ context.Context, req *mintrpc.ListBatchRequest) (*mintrpc.ListBatchResponse, error)
- func (r *RPCServer) ListBurns(ctx context.Context, in *taprpc.ListBurnsRequest) (*taprpc.ListBurnsResponse, error)
- func (r *RPCServer) ListFederationServers(ctx context.Context, _ *unirpc.ListFederationServersRequest) (*unirpc.ListFederationServersResponse, error)
- func (r *RPCServer) ListGroups(ctx context.Context, _ *taprpc.ListGroupsRequest) (*taprpc.ListGroupsResponse, error)
- func (r *RPCServer) ListTransfers(ctx context.Context, req *taprpc.ListTransfersRequest) (*taprpc.ListTransfersResponse, error)
- func (r *RPCServer) ListUtxos(ctx context.Context, req *taprpc.ListUtxosRequest) (*taprpc.ListUtxosResponse, error)
- func (r *RPCServer) MarshalChainAsset(ctx context.Context, a asset.ChainAsset, meta *proof.MetaReveal, ...) (*taprpc.Asset, error)
- func (r *RPCServer) MintAsset(ctx context.Context, req *mintrpc.MintAssetRequest) (*mintrpc.MintAssetResponse, error)
- func (r *RPCServer) MultiverseRoot(ctx context.Context, req *unirpc.MultiverseRootRequest) (*unirpc.MultiverseRootResponse, error)
- func (r *RPCServer) NewAddr(ctx context.Context, req *taprpc.NewAddrRequest) (*taprpc.Addr, error)
- func (r *RPCServer) NextInternalKey(ctx context.Context, req *wrpc.NextInternalKeyRequest) (*wrpc.NextInternalKeyResponse, error)
- func (r *RPCServer) NextScriptKey(ctx context.Context, req *wrpc.NextScriptKeyRequest) (*wrpc.NextScriptKeyResponse, error)
- func (r *RPCServer) ProofVerifierCtx(ctx context.Context) proof.VerifierCtx
- func (r *RPCServer) ProveAssetOwnership(ctx context.Context, req *wrpc.ProveAssetOwnershipRequest) (*wrpc.ProveAssetOwnershipResponse, error)
- func (r *RPCServer) PublishAndLogTransfer(ctx context.Context, req *wrpc.PublishAndLogRequest) (*taprpc.SendAssetResponse, error)
- func (r *RPCServer) PushProof(ctx context.Context, req *unirpc.PushProofRequest) (*unirpc.PushProofResponse, error)
- func (r *RPCServer) QueryAddrs(ctx context.Context, req *taprpc.QueryAddrRequest) (*taprpc.QueryAddrResponse, error)
- func (r *RPCServer) QueryAssetRoots(ctx context.Context, req *unirpc.AssetRootQuery) (*unirpc.QueryRootResponse, error)
- func (r *RPCServer) QueryAssetStats(ctx context.Context, req *unirpc.AssetStatsQuery) (*unirpc.UniverseAssetStats, error)
- func (r *RPCServer) QueryEvents(ctx context.Context, req *unirpc.QueryEventsRequest) (*unirpc.QueryEventsResponse, error)
- func (r *RPCServer) QueryFederationSyncConfig(ctx context.Context, _ *unirpc.QueryFederationSyncConfigRequest) (*unirpc.QueryFederationSyncConfigResponse, error)
- func (r *RPCServer) QueryInternalKey(ctx context.Context, req *wrpc.QueryInternalKeyRequest) (*wrpc.QueryInternalKeyResponse, error)
- func (r *RPCServer) QueryPeerAcceptedQuotes(_ context.Context, _ *rfqrpc.QueryPeerAcceptedQuotesRequest) (*rfqrpc.QueryPeerAcceptedQuotesResponse, error)
- func (r *RPCServer) QueryProof(ctx context.Context, req *unirpc.UniverseKey) (*unirpc.AssetProofResponse, error)
- func (r *RPCServer) QueryScriptKey(ctx context.Context, req *wrpc.QueryScriptKeyRequest) (*wrpc.QueryScriptKeyResponse, error)
- func (r *RPCServer) RegisterTransfer(ctx context.Context, req *taprpc.RegisterTransferRequest) (*taprpc.RegisterTransferResponse, error)
- func (r *RPCServer) RegisterWithGrpcServer(registrar grpc.ServiceRegistrar) error
- func (r *RPCServer) RegisterWithRestProxy(restCtx context.Context, restMux *proxy.ServeMux, ...) error
- func (r *RPCServer) RemoveUTXOLease(ctx context.Context, req *wrpc.RemoveUTXOLeaseRequest) (*wrpc.RemoveUTXOLeaseResponse, error)
- func (r *RPCServer) SealBatch(ctx context.Context, req *mintrpc.SealBatchRequest) (*mintrpc.SealBatchResponse, error)
- func (r *RPCServer) SendAsset(ctx context.Context, req *taprpc.SendAssetRequest) (*taprpc.SendAssetResponse, error)
- func (r *RPCServer) SendPayment(req *tchrpc.SendPaymentRequest, ...) error
- func (r *RPCServer) SetFederationSyncConfig(ctx context.Context, req *unirpc.SetFederationSyncConfigRequest) (*unirpc.SetFederationSyncConfigResponse, error)
- func (r *RPCServer) SignVirtualPsbt(ctx context.Context, req *wrpc.SignVirtualPsbtRequest) (*wrpc.SignVirtualPsbtResponse, error)
- func (r *RPCServer) Start(cfg *tapconfig.Config) error
- func (r *RPCServer) Stop() error
- func (r *RPCServer) StopDaemon(_ context.Context, _ *taprpc.StopRequest) (*taprpc.StopResponse, error)
- func (r *RPCServer) SubscribeMintEvents(req *mintrpc.SubscribeMintEventsRequest, ntfnStream mintEventStream) error
- func (r *RPCServer) SubscribeReceiveAssetEventNtfns(_ *tapdevrpc.SubscribeReceiveAssetEventNtfnsRequest, ...) error
- func (r *RPCServer) SubscribeReceiveEvents(req *taprpc.SubscribeReceiveEventsRequest, ntfnStream receiveEventStream) error
- func (r *RPCServer) SubscribeRfqEventNtfns(_ *rfqrpc.SubscribeRfqEventNtfnsRequest, ...) error
- func (r *RPCServer) SubscribeSendAssetEventNtfns(_ *tapdevrpc.SubscribeSendAssetEventNtfnsRequest, ...) error
- func (r *RPCServer) SubscribeSendEvents(req *taprpc.SubscribeSendEventsRequest, ntfnStream sendEventStream) error
- func (r *RPCServer) SyncUniverse(ctx context.Context, req *unirpc.SyncRequest) (*unirpc.SyncResponse, error)
- func (r *RPCServer) UniverseStats(ctx context.Context, _ *unirpc.StatsRequest) (*unirpc.StatsResponse, error)
- func (r *RPCServer) UnpackProofFile(_ context.Context, req *taprpc.UnpackProofFileRequest) (*taprpc.UnpackProofFileResponse, error)
- func (r *RPCServer) UpdateSupplyCommit(ctx context.Context, req *unirpc.UpdateSupplyCommitRequest) (*unirpc.UpdateSupplyCommitResponse, error)
- func (r *RPCServer) VerifyAssetOwnership(ctx context.Context, req *wrpc.VerifyAssetOwnershipRequest) (*wrpc.VerifyAssetOwnershipResponse, error)
- func (r *RPCServer) VerifyProof(ctx context.Context, req *taprpc.ProofFile) (*taprpc.VerifyProofResponse, error)
- type RpcSupplySync
- type RpcUniverseDiff
- func (r *RpcUniverseDiff) Close() error
- func (r *RpcUniverseDiff) FetchProofLeaf(ctx context.Context, id universe.Identifier, key universe.LeafKey) ([]*universe.Proof, error)
- func (r *RpcUniverseDiff) RootNode(ctx context.Context, id universe.Identifier) (universe.Root, error)
- func (r *RpcUniverseDiff) RootNodes(ctx context.Context, q universe.RootNodesQuery) ([]universe.Root, error)
- func (r *RpcUniverseDiff) UniverseLeafKeys(ctx context.Context, q universe.UniverseLeafKeysQuery) ([]universe.LeafKey, error)
- type RpcUniverseRegistrar
Constants ¶
const ( // RPCSubsystem defines the logging code for the RPC subsystem. RPCSubsystem = "TRPC" // ServerSubsystem defines the logging code for the server subsystem. ServerSubsystem = "TSVR" // DaemonSubsystem defines the logging code for the daemon subsystem. DaemonSubsystem = "TAPD" )
const ( // AssetBurnConfirmationText is the text that needs to be set on the // RPC to confirm an asset burn. AssetBurnConfirmationText = "assets will be destroyed" )
Variables ¶
var ( // MaxMsgReceiveSize is the largest message our client will receive. We // set this to 200MiB atm. MaxMsgReceiveSize = grpc.MaxCallRecvMsgSize(lnrpc.MaxGrpcMsgSize) // ServerMaxMsgReceiveSize is the largest message our server will // receive. ServerMaxMsgReceiveSize = grpc.MaxRecvMsgSize(lnrpc.MaxGrpcMsgSize) // P2TRChangeType is the type of change address that should be used for // funding PSBTs, as we'll always want to use P2TR change addresses. P2TRChangeType = walletrpc.ChangeAddressType_CHANGE_ADDRESS_TYPE_P2TR )
Functions ¶
func AllowCORS ¶
AllowCORS wraps the given http.Handler with a function that adds the Access-Control-Allow-Origin header to the response.
func CheckFederationServer ¶
func CheckFederationServer(localRuntimeID int64, connectTimeout time.Duration, server universe.ServerAddr) error
CheckFederationServer attempts to connect to the target server and ensure that it is a valid federation server that isn't the local daemon.
func ConnectUniverse ¶
func ConnectUniverse( serverAddr universe.ServerAddr) (*universeClientConn, error)
ConnectUniverse connects to a remote Universe server using the provided server address.
func MarshalAssetFedSyncCfg ¶
func MarshalAssetFedSyncCfg( config universe.FedUniSyncConfig) (*unirpc.AssetFederationSyncConfig, error)
MarshalAssetFedSyncCfg returns an RPC ready asset specific federation sync config.
func MarshalUniID ¶
func MarshalUniID(id universe.Identifier) (*unirpc.ID, error)
MarshalUniID marshals the universe ID into the RPC counterpart.
func MarshalUniProofType ¶
MarshalUniProofType marshals the universe proof type into the RPC counterpart.
func NewRpcSupplySync ¶
func NewRpcSupplySync( serverAddr universe.ServerAddr) (supplyverifier.UniverseClient, error)
NewRpcSupplySync creates a new RpcSupplySync instance that dials out to the target remote universe server address.
func NewRpcUniverseDiff ¶
func NewRpcUniverseDiff( serverAddr universe.ServerAddr) (universe.DiffEngine, error)
NewRpcUniverseDiff creates a new RpcUniverseDiff instance that dials out to the target remote universe server address.
func NewRpcUniverseRegistrar ¶
func NewRpcUniverseRegistrar( serverAddr universe.ServerAddr) (universe.Registrar, error)
NewRpcUniverseRegistrar creates a new RpcUniverseRegistrar instance that dials out to the target remote universe server address.
func UnmarshalGroupWitness ¶
func UnmarshalGroupWitness( wit *taprpc.GroupWitness) (*tapgarden.PendingGroupWitness, error)
UnmarshalGroupWitness parses an asset group witness from the RPC variant.
func UnmarshalUniID ¶
func UnmarshalUniID(rpcID *unirpc.ID) (universe.Identifier, error)
UnmarshalUniID parses the RPC universe ID into the native counterpart.
func UnmarshalUniProofType ¶
UnmarshalUniProofType parses the RPC universe proof type into the native counterpart.
func UseDaemonLogger ¶
UseDaemonLogger uses a specified Logger to output daemon logging info.
func UseServerLogger ¶
UseServerLogger uses a specified Logger to output server logging info.
Types ¶
type EventStream ¶
type EventStream[T any] interface { // Send sends an event object to the notification stream. Send(T) error grpc.ServerStream }
EventStream is a generic interface type for notification streams.
type IgnoreAssetOutPointRequest ¶
type IgnoreAssetOutPointRequest struct {
// AssetAnchorPoint is the asset anchor point to ignore.
AssetAnchorPoint asset.AnchorPoint
// Amount is the amount of the asset at the anchor outpoint.
Amount uint64
}
IgnoreAssetOutPointRequest is the request type for the IgnoreAssetOutPoint RPC method.
type RPCServer ¶
type RPCServer struct {
taprpc.UnimplementedTaprootAssetsServer
wrpc.UnimplementedAssetWalletServer
mintrpc.UnimplementedMintServer
rfqrpc.UnimplementedRfqServer
tchrpc.UnimplementedTaprootAssetChannelsServer
tapdevrpc.UnimplementedTapDevServer
unirpc.UnimplementedUniverseServer
// contains filtered or unexported fields
}
RPCServer is the main RPC server for the Taproot Assets daemon that handles gRPC/REST/Websockets incoming requests.
func (*RPCServer) AddAssetBuyOffer ¶
func (r *RPCServer) AddAssetBuyOffer(_ context.Context, req *rfqrpc.AddAssetBuyOfferRequest) (*rfqrpc.AddAssetBuyOfferResponse, error)
AddAssetBuyOffer upserts a new buy offer for the given asset into the RFQ manager. If the offer already exists for the given asset, it will be updated.
A buy offer is used by the node to selectively accept or reject incoming asset sell quote requests before price is considered.
func (*RPCServer) AddAssetBuyOrder ¶
func (r *RPCServer) AddAssetBuyOrder(ctx context.Context, req *rfqrpc.AddAssetBuyOrderRequest) (*rfqrpc.AddAssetBuyOrderResponse, error)
AddAssetBuyOrder upserts a new buy order for the given asset into the RFQ manager. If the order already exists for the given asset, it will be updated.
func (*RPCServer) AddAssetSellOffer ¶
func (r *RPCServer) AddAssetSellOffer(_ context.Context, req *rfqrpc.AddAssetSellOfferRequest) ( *rfqrpc.AddAssetSellOfferResponse, error)
AddAssetSellOffer upserts a new sell offer for the given asset into the RFQ manager. If the offer already exists for the given asset, it will be updated.
func (*RPCServer) AddAssetSellOrder ¶
func (r *RPCServer) AddAssetSellOrder(ctx context.Context, req *rfqrpc.AddAssetSellOrderRequest) ( *rfqrpc.AddAssetSellOrderResponse, error)
AddAssetSellOrder upserts a new sell order for the given asset into the RFQ manager. If the order already exists for the given asset, it will be updated.
func (*RPCServer) AddFederationServer ¶
func (r *RPCServer) AddFederationServer(ctx context.Context, req *unirpc.AddFederationServerRequest, ) (*unirpc.AddFederationServerResponse, error)
AddFederationServer adds a new server to the federation of the local Universe server. Once a server is added, this call can also optionally be used to trigger a sync of the remote server.
func (*RPCServer) AddInvoice ¶
func (r *RPCServer) AddInvoice(ctx context.Context, req *tchrpc.AddInvoiceRequest) (*tchrpc.AddInvoiceResponse, error)
AddInvoice is a wrapper around lnd's lnrpc.AddInvoice method with asset specific parameters. It allows RPC users to create invoices that correspond to the specified asset amount.
func (*RPCServer) AddrReceives ¶
func (r *RPCServer) AddrReceives(ctx context.Context, req *taprpc.AddrReceivesRequest) (*taprpc.AddrReceivesResponse, error)
AddrReceives lists all receives for incoming asset transfers for addresses that were created previously.
func (*RPCServer) AnchorVirtualPsbts ¶
func (r *RPCServer) AnchorVirtualPsbts(ctx context.Context, req *wrpc.AnchorVirtualPsbtsRequest) (*taprpc.SendAssetResponse, error)
AnchorVirtualPsbts merges and then commits multiple virtual transactions in a single BTC level anchor transaction.
func (*RPCServer) AssetLeafKeys ¶
func (r *RPCServer) AssetLeafKeys(ctx context.Context, req *unirpc.AssetLeafKeysRequest) (*unirpc.AssetLeafKeyResponse, error)
AssetLeafKeys queries for the set of Universe keys associated with a given asset_id or group_key. Each key takes the form: (outpoint, script_key), where outpoint is an outpoint in the Bitcoin blockchain that anchors a valid Taproot Asset commitment, and script_key is the script_key of the asset within the Taproot Asset commitment for the given asset_id or group_key.
func (*RPCServer) AssetLeaves ¶
func (r *RPCServer) AssetLeaves(ctx context.Context, req *unirpc.AssetLeavesRequest) (*unirpc.AssetLeafResponse, error)
AssetLeaves queries for the set of asset leaves (the values in the Universe MS-SMT tree) for a given asset_id or group_key. These represents either asset issuance events (they have a genesis witness) or asset transfers that took place on chain. The leaves contain a normal Taproot asset proof, as well as details for the asset.
func (*RPCServer) AssetRoots ¶
func (r *RPCServer) AssetRoots(ctx context.Context, req *unirpc.AssetRootRequest) (*unirpc.AssetRootResponse, error)
AssetRoots queries for the known Universe roots associated with each known asset. These roots represent the supply/audit state for each known asset.
func (*RPCServer) BakeMacaroon ¶
func (r *RPCServer) BakeMacaroon(ctx context.Context, req *taprpc.BakeMacaroonRequest) (*taprpc.BakeMacaroonResponse, error)
BakeMacaroon allows the creation of a new macaroon with custom permissions. No first-party caveats are added since this can be done offline.
func (*RPCServer) BurnAsset ¶
func (r *RPCServer) BurnAsset(ctx context.Context, in *taprpc.BurnAssetRequest) (*taprpc.BurnAssetResponse, error)
BurnAsset burns the given number of units of a given asset by sending them to a provably un-spendable script key. Burning means irrevocably destroying a certain number of assets, reducing the total supply of the asset. Because burning is such a destructive and non-reversible operation, some specific values need to be set in the request to avoid accidental burns.
func (*RPCServer) CancelBatch ¶
func (r *RPCServer) CancelBatch(_ context.Context, _ *mintrpc.CancelBatchRequest) (*mintrpc.CancelBatchResponse, error)
CancelBatch attempts to cancel the current pending batch.
func (*RPCServer) CommitVirtualPsbts ¶
func (r *RPCServer) CommitVirtualPsbts(ctx context.Context, req *wrpc.CommitVirtualPsbtsRequest) (*wrpc.CommitVirtualPsbtsResponse, error)
CommitVirtualPsbts creates the output commitments and proofs for the given virtual transactions by committing them to the BTC level anchor transaction. In addition, the BTC level anchor transaction is funded and prepared up to the point where it is ready to be signed.
func (*RPCServer) DebugLevel ¶
func (r *RPCServer) DebugLevel(ctx context.Context, req *taprpc.DebugLevelRequest) (*taprpc.DebugLevelResponse, error)
DebugLevel allows a caller to programmatically set the logging verbosity of tapd. The logging can be targeted according to a coarse daemon-wide logging level, or in a granular fashion to specify the logging for a target sub-system.
func (*RPCServer) DeclareScriptKey ¶
func (r *RPCServer) DeclareScriptKey(ctx context.Context, in *wrpc.DeclareScriptKeyRequest) (*wrpc.DeclareScriptKeyResponse, error)
DeclareScriptKey declares a new script key to the wallet. This is useful when the script key contains scripts, which would mean it wouldn't be recognized by the wallet automatically. Declaring a script key will make any assets sent to the script key be recognized as being local assets.
func (*RPCServer) DecodeAddr ¶
func (r *RPCServer) DecodeAddr(_ context.Context, req *taprpc.DecodeAddrRequest) (*taprpc.Addr, error)
DecodeAddr decode a Taproot Asset address into a partial asset message that represents the asset it wants to receive.
func (*RPCServer) DecodeAssetPayReq ¶
func (r *RPCServer) DecodeAssetPayReq(ctx context.Context, payReq *tchrpc.AssetPayReq) (*tchrpc.AssetPayReqResponse, error)
DecodeAssetPayReq decodes an incoming invoice, then uses the RFQ system to map the BTC amount to the amount of asset units for the specified asset ID.
func (*RPCServer) DecodeProof ¶
func (r *RPCServer) DecodeProof(ctx context.Context, req *taprpc.DecodeProofRequest) (*taprpc.DecodeProofResponse, error)
DecodeProof attempts to decode a given proof file that claims to be anchored at the specified genesis point.
func (*RPCServer) DeleteAssetLeaf ¶
func (r *RPCServer) DeleteAssetLeaf(ctx context.Context, req *unirpc.DeleteAssetLeafRequest) ( *unirpc.DeleteAssetLeafResponse, error)
DeleteAssetLeaf deletes a single Universe leaf, identified by its universe ID and leaf key (outpoint + script key).
func (*RPCServer) DeleteAssetRoot ¶
func (r *RPCServer) DeleteAssetRoot(ctx context.Context, req *unirpc.DeleteRootQuery) (*unirpc.DeleteRootResponse, error)
DeleteAssetRoot attempts to locate the current Universe root for a specific asset, and deletes the associated Universe tree if found.
func (*RPCServer) DeleteFederationServer ¶
func (r *RPCServer) DeleteFederationServer(ctx context.Context, req *unirpc.DeleteFederationServerRequest, ) (*unirpc.DeleteFederationServerResponse, error)
DeleteFederationServer removes a server from the federation of the local Universe server.
func (*RPCServer) EncodeCustomRecords ¶
func (r *RPCServer) EncodeCustomRecords(_ context.Context, in *tchrpc.EncodeCustomRecordsRequest) ( *tchrpc.EncodeCustomRecordsResponse, error)
EncodeCustomRecords allows RPC users to encode Taproot Asset channel related data into the TLV format that is used in the custom records of the lnd payment or other channel related RPCs. This RPC is completely stateless and does not perform any checks on the data provided, other than pure format validation.
func (*RPCServer) ExportAssetWalletBackup ¶
func (r *RPCServer) ExportAssetWalletBackup(ctx context.Context, req *wrpc.ExportAssetWalletBackupRequest) ( *wrpc.ExportAssetWalletBackupResponse, error)
ExportAssetWalletBackup exports a backup of all active assets in the wallet. The backup includes all data necessary to restore the assets in case of database or system failure.
func (*RPCServer) ExportProof ¶
func (r *RPCServer) ExportProof(ctx context.Context, req *taprpc.ExportProofRequest) (*taprpc.ProofFile, error)
ExportProof exports the latest raw proof file anchored at the specified script_key.
func (*RPCServer) FetchAsset ¶
func (r *RPCServer) FetchAsset(ctx context.Context, req *taprpc.FetchAssetRequest) (*taprpc.FetchAssetResponse, error)
FetchAsset fetches asset(s) by asset ID or group key, with optional filters.
func (*RPCServer) FetchAssetMeta ¶
func (r *RPCServer) FetchAssetMeta(ctx context.Context, req *taprpc.FetchAssetMetaRequest) (*taprpc.FetchAssetMetaResponse, error)
func (*RPCServer) FetchSupplyCommit ¶
func (r *RPCServer) FetchSupplyCommit(ctx context.Context, req *unirpc.FetchSupplyCommitRequest) ( *unirpc.FetchSupplyCommitResponse, error)
FetchSupplyCommit fetches the on-chain supply commitment for a specific asset group.
func (*RPCServer) FetchSupplyLeaves ¶
func (r *RPCServer) FetchSupplyLeaves(ctx context.Context, req *unirpc.FetchSupplyLeavesRequest) ( *unirpc.FetchSupplyLeavesResponse, error)
FetchSupplyLeaves fetches the supply leaves for a specific asset group within a specified block height range. The leaves include issuance, burn, and ignore leaves, which represent the supply changes for the asset group.
func (*RPCServer) FinalizeBatch ¶
func (r *RPCServer) FinalizeBatch(ctx context.Context, req *mintrpc.FinalizeBatchRequest) (*mintrpc.FinalizeBatchResponse, error)
FinalizeBatch attempts to finalize the current pending batch.
func (*RPCServer) ForwardingHistory ¶
func (r *RPCServer) ForwardingHistory(ctx context.Context, req *rfqrpc.ForwardingHistoryRequest) ( *rfqrpc.ForwardingHistoryResponse, error)
ForwardingHistory queries the historical records of asset forwarding events.
func (*RPCServer) FundBatch ¶
func (r *RPCServer) FundBatch(ctx context.Context, req *mintrpc.FundBatchRequest) (*mintrpc.FundBatchResponse, error)
FundBatch attempts to fund the current pending batch.
func (*RPCServer) FundChannel ¶
func (r *RPCServer) FundChannel(ctx context.Context, req *tchrpc.FundChannelRequest) (*tchrpc.FundChannelResponse, error)
FundChannel initiates the channel funding negotiation with a peer for the creation of a channel that contains a specified amount of a given asset.
func (*RPCServer) FundVirtualPsbt ¶
func (r *RPCServer) FundVirtualPsbt(ctx context.Context, req *wrpc.FundVirtualPsbtRequest) (*wrpc.FundVirtualPsbtResponse, error)
FundVirtualPsbt selects inputs from the available asset commitments to fund a virtual transaction matching the template.
func (*RPCServer) GetInfo ¶
func (r *RPCServer) GetInfo(ctx context.Context, _ *taprpc.GetInfoRequest) (*taprpc.GetInfoResponse, error)
GetInfo returns general information relating to the active daemon. For example: its version, network, and lnd version.
func (*RPCServer) IgnoreAssetOutPoint ¶
func (r *RPCServer) IgnoreAssetOutPoint(ctx context.Context, rpcReq *unirpc.IgnoreAssetOutPointRequest) ( *unirpc.IgnoreAssetOutPointResponse, error)
IgnoreAssetOutPoint allows an asset issuer to mark a specific asset outpoint as ignored. An ignored outpoint will be included in the next universe commitment transaction that is published.
func (*RPCServer) ImportAssetsFromBackup ¶
func (r *RPCServer) ImportAssetsFromBackup(ctx context.Context, req *wrpc.ImportAssetsFromBackupRequest) ( *wrpc.ImportAssetsFromBackupResponse, error)
ImportAssetsFromBackup imports assets from a backup blob that was previously created using ExportAssetWalletBackup.
func (*RPCServer) ImportProof ¶
func (r *RPCServer) ImportProof(ctx context.Context, req *tapdevrpc.ImportProofRequest) (*tapdevrpc.ImportProofResponse, error)
ImportProof attempts to import a proof file into the daemon. If successful, a new asset will be inserted on disk, spendable using the specified target script key, and internal key.
func (*RPCServer) Info ¶
func (r *RPCServer) Info(ctx context.Context, _ *unirpc.InfoRequest) (*unirpc.InfoResponse, error)
Info returns a set of information about the current state of the Universe and allows a caller to check that a universe server is reachable and configured correctly to allow proof courier access without macaroons.
func (*RPCServer) InsertProof ¶
func (r *RPCServer) InsertProof(ctx context.Context, req *unirpc.AssetProof) (*unirpc.AssetProofResponse, error)
InsertProof attempts to insert a new issuance or transfer proof into the Universe tree specified by the UniverseKey. If valid, then the proof is inserted into the database, with a new Universe root returned for the updated asset_id/group_key.
func (*RPCServer) InsertSupplyCommit ¶
func (r *RPCServer) InsertSupplyCommit(ctx context.Context, req *unirpc.InsertSupplyCommitRequest) ( *unirpc.InsertSupplyCommitResponse, error)
InsertSupplyCommit stores a verified supply commitment for the given asset group in the node's local database.
func (*RPCServer) ListAssets ¶
func (r *RPCServer) ListAssets(ctx context.Context, req *taprpc.ListAssetRequest) (*taprpc.ListAssetResponse, error)
ListAssets lists the set of assets owned by the target daemon.
func (*RPCServer) ListBalances ¶
func (r *RPCServer) ListBalances(ctx context.Context, req *taprpc.ListBalancesRequest) (*taprpc.ListBalancesResponse, error)
ListBalances lists the asset balances owned by the daemon.
func (*RPCServer) ListBatches ¶
func (r *RPCServer) ListBatches(_ context.Context, req *mintrpc.ListBatchRequest) (*mintrpc.ListBatchResponse, error)
ListBatches lists the set of batches submitted for minting, including pending and cancelled batches.
func (*RPCServer) ListBurns ¶
func (r *RPCServer) ListBurns(ctx context.Context, in *taprpc.ListBurnsRequest) (*taprpc.ListBurnsResponse, error)
ListBurns returns a list of burnt assets. Some filters may be defined in the request to return more specific results.
func (*RPCServer) ListFederationServers ¶
func (r *RPCServer) ListFederationServers(ctx context.Context, _ *unirpc.ListFederationServersRequest) ( *unirpc.ListFederationServersResponse, error)
ListFederationServers lists the set of servers that make up the federation of the local Universe server. These servers are used to push out new proofs, and also periodically call sync new proofs from the remote server.
func (*RPCServer) ListGroups ¶
func (r *RPCServer) ListGroups(ctx context.Context, _ *taprpc.ListGroupsRequest) (*taprpc.ListGroupsResponse, error)
ListGroups lists known groups and the assets held in each group.
func (*RPCServer) ListTransfers ¶
func (r *RPCServer) ListTransfers(ctx context.Context, req *taprpc.ListTransfersRequest) (*taprpc.ListTransfersResponse, error)
ListTransfers returns a list of all asset transfers managed by this daemon. This includes both confirmed and unconfirmed transfers.
func (*RPCServer) ListUtxos ¶
func (r *RPCServer) ListUtxos(ctx context.Context, req *taprpc.ListUtxosRequest) (*taprpc.ListUtxosResponse, error)
ListUtxos lists the UTXOs managed by the target daemon, and the assets they hold.
func (*RPCServer) MarshalChainAsset ¶
func (r *RPCServer) MarshalChainAsset(ctx context.Context, a asset.ChainAsset, meta *proof.MetaReveal, withWitness bool, keyRing rpcutils.KeyLookup) (*taprpc.Asset, error)
MarshalChainAsset marshals the given chain asset into an RPC asset.
func (*RPCServer) MintAsset ¶
func (r *RPCServer) MintAsset(ctx context.Context, req *mintrpc.MintAssetRequest) (*mintrpc.MintAssetResponse, error)
MintAsset attempts to mint the set of assets (async by default to ensure proper batching) specified in the request.
func (*RPCServer) MultiverseRoot ¶
func (r *RPCServer) MultiverseRoot(ctx context.Context, req *unirpc.MultiverseRootRequest) (*unirpc.MultiverseRootResponse, error)
MultiverseRoot returns the root of the multiverse tree. This is useful to determine the equality of two multiverse trees, since the root can directly be compared to another multiverse root to find out if a sync is required.
func (*RPCServer) NextInternalKey ¶
func (r *RPCServer) NextInternalKey(ctx context.Context, req *wrpc.NextInternalKeyRequest) (*wrpc.NextInternalKeyResponse, error)
NextInternalKey derives the next internal key for the given key family and stores it as an internal key in the database to make sure it is identified as a local key later on when importing proofs. While an internal key can also be used as the internal key of a script key, it is recommended to use the NextScriptKey RPC instead, to make sure the tweaked Taproot output key is also recognized as a local key.
func (*RPCServer) NextScriptKey ¶
func (r *RPCServer) NextScriptKey(ctx context.Context, req *wrpc.NextScriptKeyRequest) (*wrpc.NextScriptKeyResponse, error)
NextScriptKey derives the next script key (and its corresponding internal key) and stores them both in the database to make sure they are identified as local keys later on when importing proofs.
func (*RPCServer) ProofVerifierCtx ¶
func (r *RPCServer) ProofVerifierCtx(ctx context.Context) proof.VerifierCtx
ProofVerifierCtx returns a proof.VerifierCtx that can be used to verify proofs in the RPC server.
func (*RPCServer) ProveAssetOwnership ¶
func (r *RPCServer) ProveAssetOwnership(ctx context.Context, req *wrpc.ProveAssetOwnershipRequest) ( *wrpc.ProveAssetOwnershipResponse, error)
ProveAssetOwnership creates an ownership proof embedded in an asset transition proof. That ownership proof is a signed virtual transaction spending the asset with a valid witness to prove the prover owns the keys that can spend the asset.
func (*RPCServer) PublishAndLogTransfer ¶
func (r *RPCServer) PublishAndLogTransfer(ctx context.Context, req *wrpc.PublishAndLogRequest) (*taprpc.SendAssetResponse, error)
PublishAndLogTransfer accepts a fully committed and signed anchor transaction and publishes it to the Bitcoin network. It also logs the transfer of the given active and passive assets in the database and ships any outgoing proofs to the counterparties.
func (*RPCServer) PushProof ¶
func (r *RPCServer) PushProof(ctx context.Context, req *unirpc.PushProofRequest) (*unirpc.PushProofResponse, error)
PushProof attempts to query the local universe for a proof specified by a UniverseKey. If found, a connection is made to a remote Universe server to attempt to upload the asset leaf.
func (*RPCServer) QueryAddrs ¶
func (r *RPCServer) QueryAddrs(ctx context.Context, req *taprpc.QueryAddrRequest) (*taprpc.QueryAddrResponse, error)
QueryAddrs queries the set of Taproot Asset addresses stored in the database.
func (*RPCServer) QueryAssetRoots ¶
func (r *RPCServer) QueryAssetRoots(ctx context.Context, req *unirpc.AssetRootQuery) (*unirpc.QueryRootResponse, error)
QueryAssetRoots attempts to locate the current Universe root for a specific asset. This asset can be identified by its asset ID or group key.
func (*RPCServer) QueryAssetStats ¶
func (r *RPCServer) QueryAssetStats(ctx context.Context, req *unirpc.AssetStatsQuery) (*unirpc.UniverseAssetStats, error)
QueryAssetStats returns a set of statistics for a given set of assets. Stats can be queried for all assets, or based on the: asset ID, name, or asset type. Pagination is supported via the offset and limit params. Results can also be sorted based on any of the main query params.
func (*RPCServer) QueryEvents ¶
func (r *RPCServer) QueryEvents(ctx context.Context, req *unirpc.QueryEventsRequest) (*unirpc.QueryEventsResponse, error)
QueryEvents returns the number of sync and proof events for a given time period, grouped by day.
func (*RPCServer) QueryFederationSyncConfig ¶
func (r *RPCServer) QueryFederationSyncConfig(ctx context.Context, _ *unirpc.QueryFederationSyncConfigRequest, ) (*unirpc.QueryFederationSyncConfigResponse, error)
QueryFederationSyncConfig queries the universe federation sync configuration settings.
func (*RPCServer) QueryInternalKey ¶
func (r *RPCServer) QueryInternalKey(ctx context.Context, req *wrpc.QueryInternalKeyRequest) (*wrpc.QueryInternalKeyResponse, error)
QueryInternalKey returns the key descriptor for the given internal key.
func (*RPCServer) QueryPeerAcceptedQuotes ¶
func (r *RPCServer) QueryPeerAcceptedQuotes(_ context.Context, _ *rfqrpc.QueryPeerAcceptedQuotesRequest) ( *rfqrpc.QueryPeerAcceptedQuotesResponse, error)
QueryPeerAcceptedQuotes is used to query for quotes that were requested by our node and have been accepted our peers.
func (*RPCServer) QueryProof ¶
func (r *RPCServer) QueryProof(ctx context.Context, req *unirpc.UniverseKey) (*unirpc.AssetProofResponse, error)
QueryProof attempts to query for an issuance or transfer proof for a given asset based on its UniverseKey. A UniverseKey is composed of the Universe ID (asset_id/group_key) and also a leaf key (outpoint || script_key). If found, the target universe proof leaf is returned in addition to inclusion proofs for the Universe and Multiverse MS-SMTs. This allows a caller to verify the known Universe root, Multiverse root, and transition or issuance proof for the target asset.
func (*RPCServer) QueryScriptKey ¶
func (r *RPCServer) QueryScriptKey(ctx context.Context, req *wrpc.QueryScriptKeyRequest) (*wrpc.QueryScriptKeyResponse, error)
QueryScriptKey returns the full script key descriptor for the given tweaked script key.
func (*RPCServer) RegisterTransfer ¶
func (r *RPCServer) RegisterTransfer(ctx context.Context, req *taprpc.RegisterTransferRequest) (*taprpc.RegisterTransferResponse, error)
RegisterTransfer informs the daemon about a new inbound transfer that has happened. This is used for interactive transfers where no TAP address is involved and the recipient is aware of the transfer through an out-of-band protocol but the daemon hasn't been informed about the completion of the transfer. For this to work, the proof must already be in the recipient's local universe (e.g. through the use of the universerpc.InsertProof RPC or the universe proof courier and universe sync mechanisms) and this call simply instructs the daemon to detect the transfer as an asset it owns.
func (*RPCServer) RegisterWithGrpcServer ¶
func (r *RPCServer) RegisterWithGrpcServer( registrar grpc.ServiceRegistrar) error
RegisterWithGrpcServer registers the RPCServer with the passed root gRPC server.
func (*RPCServer) RegisterWithRestProxy ¶
func (r *RPCServer) RegisterWithRestProxy(restCtx context.Context, restMux *proxy.ServeMux, restDialOpts []grpc.DialOption, restProxyDest string) error
RegisterWithRestProxy registers the RPC server with the given rest proxy.
func (*RPCServer) RemoveUTXOLease ¶
func (r *RPCServer) RemoveUTXOLease(ctx context.Context, req *wrpc.RemoveUTXOLeaseRequest) (*wrpc.RemoveUTXOLeaseResponse, error)
RemoveUTXOLease removes the lease/lock/reservation of the given managed UTXO.
func (*RPCServer) SealBatch ¶
func (r *RPCServer) SealBatch(ctx context.Context, req *mintrpc.SealBatchRequest) (*mintrpc.SealBatchResponse, error)
SealBatch attempts to seal the current pending batch, validating provided asset group witnesses and generating asset group witnesses as needed.
func (*RPCServer) SendAsset ¶
func (r *RPCServer) SendAsset(ctx context.Context, req *taprpc.SendAssetRequest) (*taprpc.SendAssetResponse, error)
SendAsset uses one or multiple passed Taproot Asset address(es) to attempt to complete an asset send. The method returns information w.r.t the on chain send, as well as the proof file information the receiver needs to fully receive the asset.
func (*RPCServer) SendPayment ¶
func (r *RPCServer) SendPayment(req *tchrpc.SendPaymentRequest, stream tchrpc.TaprootAssetChannels_SendPaymentServer) error
SendPayment is a wrapper around lnd's routerrpc.SendPaymentV2 RPC method with asset specific parameters. It allows RPC users to send asset keysend payments (direct payments) or payments to an invoice with a specified asset amount.
func (*RPCServer) SetFederationSyncConfig ¶
func (r *RPCServer) SetFederationSyncConfig(ctx context.Context, req *unirpc.SetFederationSyncConfigRequest) ( *unirpc.SetFederationSyncConfigResponse, error)
SetFederationSyncConfig sets the configuration of the universe federation sync.
func (*RPCServer) SignVirtualPsbt ¶
func (r *RPCServer) SignVirtualPsbt(ctx context.Context, req *wrpc.SignVirtualPsbtRequest) (*wrpc.SignVirtualPsbtResponse, error)
SignVirtualPsbt signs the inputs of a virtual transaction and prepares the commitments of the inputs and outputs.
func (*RPCServer) Stop ¶
Stop signals that the RPC server should attempt a graceful shutdown and cancel any outstanding requests.
func (*RPCServer) StopDaemon ¶
func (r *RPCServer) StopDaemon(_ context.Context, _ *taprpc.StopRequest) (*taprpc.StopResponse, error)
StopDaemon will send a shutdown request to the interrupt handler, triggering a graceful shutdown of the daemon.
func (*RPCServer) SubscribeMintEvents ¶
func (r *RPCServer) SubscribeMintEvents(req *mintrpc.SubscribeMintEventsRequest, ntfnStream mintEventStream) error
SubscribeMintEvents allows a caller to subscribe to mint events for asset creation batches.
func (*RPCServer) SubscribeReceiveAssetEventNtfns ¶
func (r *RPCServer) SubscribeReceiveAssetEventNtfns( _ *tapdevrpc.SubscribeReceiveAssetEventNtfnsRequest, ntfnStream devReceiveEventStream) error
SubscribeReceiveAssetEventNtfns registers a subscription to the event notification stream which relates to the asset receiving process.
func (*RPCServer) SubscribeReceiveEvents ¶
func (r *RPCServer) SubscribeReceiveEvents( req *taprpc.SubscribeReceiveEventsRequest, ntfnStream receiveEventStream) error
SubscribeReceiveEvents registers a subscription to the event notification stream which relates to the asset receiving process.
func (*RPCServer) SubscribeRfqEventNtfns ¶
func (r *RPCServer) SubscribeRfqEventNtfns( _ *rfqrpc.SubscribeRfqEventNtfnsRequest, ntfnStream rfqrpc.Rfq_SubscribeRfqEventNtfnsServer) error
SubscribeRfqEventNtfns subscribes to RFQ event notifications.
func (*RPCServer) SubscribeSendAssetEventNtfns ¶
func (r *RPCServer) SubscribeSendAssetEventNtfns( _ *tapdevrpc.SubscribeSendAssetEventNtfnsRequest, ntfnStream devSendEventStream) error
SubscribeSendAssetEventNtfns registers a subscription to the event notification stream which relates to the asset sending process.
func (*RPCServer) SubscribeSendEvents ¶
func (r *RPCServer) SubscribeSendEvents(req *taprpc.SubscribeSendEventsRequest, ntfnStream sendEventStream) error
SubscribeSendEvents registers a subscription to the event notification stream which relates to the asset sending process.
func (*RPCServer) SyncUniverse ¶
func (r *RPCServer) SyncUniverse(ctx context.Context, req *unirpc.SyncRequest) (*unirpc.SyncResponse, error)
SyncUniverse takes host information for a remote Universe server, then attempts to synchronize either only the set of specified asset_ids, or all assets if none are specified. The sync process will attempt to query for the latest known root for each asset, performing tree based reconciliation to arrive at a new shared root.
func (*RPCServer) UniverseStats ¶
func (r *RPCServer) UniverseStats(ctx context.Context, _ *unirpc.StatsRequest) (*unirpc.StatsResponse, error)
UniverseStats returns a set of aggregate statistics for the current state of the Universe.
func (*RPCServer) UnpackProofFile ¶
func (r *RPCServer) UnpackProofFile(_ context.Context, req *taprpc.UnpackProofFileRequest) (*taprpc.UnpackProofFileResponse, error)
UnpackProofFile unpacks a proof file into a list of the individual raw proofs in the proof chain.
func (*RPCServer) UpdateSupplyCommit ¶
func (r *RPCServer) UpdateSupplyCommit(ctx context.Context, req *unirpc.UpdateSupplyCommitRequest) ( *unirpc.UpdateSupplyCommitResponse, error)
UpdateSupplyCommit updates the on-chain supply commitment for a specific asset group.
func (*RPCServer) VerifyAssetOwnership ¶
func (r *RPCServer) VerifyAssetOwnership(ctx context.Context, req *wrpc.VerifyAssetOwnershipRequest) ( *wrpc.VerifyAssetOwnershipResponse, error)
VerifyAssetOwnership verifies the asset ownership proof embedded in the given transition proof of an asset and returns true if the proof is valid.
func (*RPCServer) VerifyProof ¶
func (r *RPCServer) VerifyProof(ctx context.Context, req *taprpc.ProofFile) (*taprpc.VerifyProofResponse, error)
VerifyProof attempts to verify a given proof file that claims to be anchored at the specified genesis point.
type RpcSupplySync ¶
type RpcSupplySync struct {
// contains filtered or unexported fields
}
RpcSupplySync is an implementation of the universe.SupplySyncer interface that uses an RPC connection to target a remote universe server.
func (*RpcSupplySync) Close ¶
func (r *RpcSupplySync) Close() error
Close closes the RPC connection to the universe server.
func (*RpcSupplySync) FetchSupplyCommit ¶
func (r *RpcSupplySync) FetchSupplyCommit(ctx context.Context, assetSpec asset.Specifier, spentCommitOutpoint fn.Option[wire.OutPoint]) ( supplycommit.FetchSupplyCommitResult, error)
FetchSupplyCommit fetches a supply commitment for a specific asset group from the remote universe server.
func (*RpcSupplySync) InsertSupplyCommit ¶
func (r *RpcSupplySync) InsertSupplyCommit(ctx context.Context, assetSpec asset.Specifier, commitment supplycommit.RootCommitment, leaves supplycommit.SupplyLeaves, chainProof supplycommit.ChainProof) error
InsertSupplyCommit inserts a supply commitment for a specific asset group into the remote universe server.
type RpcUniverseDiff ¶
type RpcUniverseDiff struct {
// contains filtered or unexported fields
}
RpcUniverseDiff is an implementation of the universe.DiffEngine interface that uses an RPC connection to target Universe.
func (*RpcUniverseDiff) Close ¶
func (r *RpcUniverseDiff) Close() error
Close closes the underlying RPC connection to the remote universe server.
func (*RpcUniverseDiff) FetchProofLeaf ¶
func (r *RpcUniverseDiff) FetchProofLeaf(ctx context.Context, id universe.Identifier, key universe.LeafKey) ([]*universe.Proof, error)
FetchProofLeaf attempts to fetch a proof leaf for the target leaf key and given a universe identifier (assetID/groupKey).
TODO(roasbeef): actually add this somewhere else? * rn kinda asymmetric, as just need this to complete final portion of diff
func (*RpcUniverseDiff) RootNode ¶
func (r *RpcUniverseDiff) RootNode(ctx context.Context, id universe.Identifier) (universe.Root, error)
RootNode returns the root node for a given universe.
func (*RpcUniverseDiff) RootNodes ¶
func (r *RpcUniverseDiff) RootNodes(ctx context.Context, q universe.RootNodesQuery) ([]universe.Root, error)
RootNodes returns the complete set of known root nodes for the set of assets tracked in the universe.
func (*RpcUniverseDiff) UniverseLeafKeys ¶
func (r *RpcUniverseDiff) UniverseLeafKeys(ctx context.Context, q universe.UniverseLeafKeysQuery) ([]universe.LeafKey, error)
UniverseLeafKeys returns all the keys inserted in the universe.
type RpcUniverseRegistrar ¶
type RpcUniverseRegistrar struct {
// contains filtered or unexported fields
}
RpcUniverseRegistrar is an implementation of the universe.Registrar interface that uses an RPC connection to target Universe.
func (*RpcUniverseRegistrar) Close ¶
func (r *RpcUniverseRegistrar) Close() error
Close closes the underlying RPC connection to the remote Universe server.
func (*RpcUniverseRegistrar) UpsertProofLeaf ¶
func (r *RpcUniverseRegistrar) UpsertProofLeaf(ctx context.Context, id universe.Identifier, key universe.LeafKey, leaf *universe.Leaf) (*universe.Proof, error)
UpsertProofLeaf is an implementation of the universe.Registrar interface that uses a remote Universe server as the Registry instance.