pub trait NodeBackendApi {
Show 46 methods
// Required methods
async fn get_user(
&self,
user_pk: UserPk,
) -> Result<MaybeUser, BackendApiError>;
async fn get_sealed_seed(
&self,
data: &SealedSeedId,
) -> Result<MaybeSealedSeed, BackendApiError>;
async fn create_sealed_seed(
&self,
data: &SealedSeed,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>;
async fn delete_sealed_seeds(
&self,
measurement: Measurement,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>;
async fn get_scids(
&self,
auth: BearerAuthToken,
) -> Result<Scids, BackendApiError>;
async fn get_scid(
&self,
auth: BearerAuthToken,
) -> Result<MaybeScid, BackendApiError>;
async fn get_file_v1(
&self,
file_id: &VfsFileId,
auth: BearerAuthToken,
) -> Result<MaybeVfsFile, BackendApiError>;
async fn get_file(
&self,
file_id: &VfsFileId,
token: BearerAuthToken,
) -> Result<Bytes, BackendApiError>;
async fn create_file_v1(
&self,
file: &VfsFile,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>;
async fn create_file(
&self,
file_id: &VfsFileId,
data: Bytes,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>;
async fn upsert_file_v1(
&self,
file: &VfsFile,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>;
async fn upsert_file(
&self,
file_id: &VfsFileId,
data: Bytes,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>;
async fn delete_file(
&self,
file_id: &VfsFileId,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>;
async fn get_directory_v1(
&self,
dir: &VfsDirectory,
auth: BearerAuthToken,
) -> Result<VecVfsFile, BackendApiError>;
async fn list_directory(
&self,
dir: &VfsDirectory,
auth: BearerAuthToken,
) -> Result<VfsDirectoryList, BackendApiError>;
async fn get_payment_by_index_v1(
&self,
req: PaymentCreatedIndexStruct,
auth: BearerAuthToken,
) -> Result<MaybeDbPaymentV1, BackendApiError>;
async fn create_payment(
&self,
payment: DbPaymentV1,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>;
async fn upsert_payment_v1(
&self,
payment: DbPaymentV1,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>;
async fn upsert_payment(
&self,
payment: DbPaymentV2,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>;
async fn get_payment_by_id_v1(
&self,
req: PaymentIdStruct,
auth: BearerAuthToken,
) -> Result<MaybeDbPaymentV1, BackendApiError>;
async fn get_payment_by_id(
&self,
req: PaymentIdStruct,
auth: BearerAuthToken,
) -> Result<MaybeDbPaymentV2, BackendApiError>;
async fn get_payment_by_index(
&self,
req: PaymentCreatedIndexStruct,
auth: BearerAuthToken,
) -> Result<MaybeDbPaymentV1, BackendApiError>;
async fn upsert_payment_batch_v1(
&self,
payments: VecDbPaymentV1,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>;
async fn upsert_payment_batch(
&self,
payments: VecDbPaymentV2,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>;
async fn get_payments_by_indexes(
&self,
req: PaymentCreatedIndexes,
auth: BearerAuthToken,
) -> Result<VecDbPaymentV1, BackendApiError>;
async fn get_payments_by_ids(
&self,
req: VecPaymentId,
auth: BearerAuthToken,
) -> Result<VecDbPaymentV2, BackendApiError>;
async fn get_new_payments(
&self,
req: GetNewPayments,
auth: BearerAuthToken,
) -> Result<VecDbPaymentV1, BackendApiError>;
async fn get_updated_payments(
&self,
req: GetUpdatedPayments,
auth: BearerAuthToken,
) -> Result<VecDbPaymentV2, BackendApiError>;
async fn get_pending_payments_v1(
&self,
auth: BearerAuthToken,
) -> Result<VecDbPaymentV1, BackendApiError>;
async fn get_pending_payments(
&self,
auth: BearerAuthToken,
) -> Result<VecDbPaymentV2, BackendApiError>;
async fn get_finalized_payment_ids(
&self,
auth: BearerAuthToken,
) -> Result<VecPaymentId, BackendApiError>;
async fn upsert_payment_metadata(
&self,
metadata: DbPaymentMetadata,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>;
async fn upsert_payment_metadata_batch(
&self,
payments: VecDbPaymentMetadata,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>;
async fn get_payment_metadata_by_id(
&self,
req: PaymentIdStruct,
token: BearerAuthToken,
) -> Result<MaybeDbPaymentMetadata, BackendApiError>;
async fn get_payment_metadata_by_ids(
&self,
req: VecPaymentId,
token: BearerAuthToken,
) -> Result<VecDbPaymentMetadata, BackendApiError>;
async fn get_updated_payment_metadata(
&self,
req: GetUpdatedPaymentMetadata,
auth: BearerAuthToken,
) -> Result<VecDbPaymentMetadata, BackendApiError>;
async fn update_human_bitcoin_address(
&self,
req: UpdateHumanBitcoinAddress,
auth: BearerAuthToken,
) -> Result<HumanBitcoinAddress, BackendApiError>;
async fn get_human_bitcoin_address(
&self,
auth: BearerAuthToken,
) -> Result<HumanBitcoinAddress, BackendApiError>;
async fn claim_generated_human_bitcoin_address(
&self,
req: ClaimGeneratedHumanBitcoinAddress,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>;
async fn get_generated_username(
&self,
auth: BearerAuthToken,
) -> Result<GetGeneratedUsernameResponse, BackendApiError>;
async fn get_nwc_clients(
&self,
req: GetNwcClients,
auth: BearerAuthToken,
) -> Result<VecDbNwcClient, BackendApiError>;
async fn upsert_nwc_client(
&self,
req: DbNwcClientFields,
auth: BearerAuthToken,
) -> Result<DbNwcClient, BackendApiError>;
async fn delete_nwc_client(
&self,
req: NostrPkStruct,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>;
// Provided methods
async fn update_payment_address(
&self,
req: UpdateHumanBitcoinAddress,
auth: BearerAuthToken,
) -> Result<HumanBitcoinAddress, BackendApiError> { ... }
async fn get_payment_address(
&self,
auth: BearerAuthToken,
) -> Result<HumanBitcoinAddress, BackendApiError> { ... }
async fn claim_generated_payment_address(
&self,
req: ClaimGeneratedHumanBitcoinAddress,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError> { ... }
}Expand description
Defines the api that the backend exposes to the node.
Required MethodsΒ§
Sourceasync fn get_user(&self, user_pk: UserPk) -> Result<MaybeUser, BackendApiError>
async fn get_user(&self, user_pk: UserPk) -> Result<MaybeUser, BackendApiError>
GET /node/v1/user [UserPkStruct] -> MaybeUser
Sourceasync fn get_sealed_seed(
&self,
data: &SealedSeedId,
) -> Result<MaybeSealedSeed, BackendApiError>
async fn get_sealed_seed( &self, data: &SealedSeedId, ) -> Result<MaybeSealedSeed, BackendApiError>
GET /node/v1/sealed_seed SealedSeedId -> MaybeSealedSeed
Sourceasync fn create_sealed_seed(
&self,
data: &SealedSeed,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>
async fn create_sealed_seed( &self, data: &SealedSeed, auth: BearerAuthToken, ) -> Result<Empty, BackendApiError>
PUT /node/v1/sealed_seed SealedSeed -> Empty
Idempotent: does nothing if the SealedSeedId already exists.
Sourceasync fn delete_sealed_seeds(
&self,
measurement: Measurement,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>
async fn delete_sealed_seeds( &self, measurement: Measurement, auth: BearerAuthToken, ) -> Result<Empty, BackendApiError>
Delete all sealed seeds which have the given measurement and the user_pk of the authenticated user.
DELETE /node/v1/sealed_seed [MeasurementStruct] -> Empty
Sourceasync fn get_scids(
&self,
auth: BearerAuthToken,
) -> Result<Scids, BackendApiError>
async fn get_scids( &self, auth: BearerAuthToken, ) -> Result<Scids, BackendApiError>
Sourceasync fn get_scid(
&self,
auth: BearerAuthToken,
) -> Result<MaybeScid, BackendApiError>
πDeprecated: since lsp-v0.7.3: Use multi scid version instead
async fn get_scid( &self, auth: BearerAuthToken, ) -> Result<MaybeScid, BackendApiError>
since lsp-v0.7.3: Use multi scid version instead
Sourceasync fn get_file_v1(
&self,
file_id: &VfsFileId,
auth: BearerAuthToken,
) -> Result<MaybeVfsFile, BackendApiError>
πDeprecated: since node-v0.8.5: Use get_file instead
async fn get_file_v1( &self, file_id: &VfsFileId, auth: BearerAuthToken, ) -> Result<MaybeVfsFile, BackendApiError>
since node-v0.8.5: Use get_file instead
GET /node/v1/file VfsFileId -> MaybeVfsFile
Sourceasync fn get_file(
&self,
file_id: &VfsFileId,
token: BearerAuthToken,
) -> Result<Bytes, BackendApiError>
async fn get_file( &self, file_id: &VfsFileId, token: BearerAuthToken, ) -> Result<Bytes, BackendApiError>
GET /node/v2/file VfsFileId -> Bytes (VfsFile::data)
Sourceasync fn create_file_v1(
&self,
file: &VfsFile,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>
πDeprecated: since node-v0.8.5: Use create_file instead
async fn create_file_v1( &self, file: &VfsFile, auth: BearerAuthToken, ) -> Result<Empty, BackendApiError>
since node-v0.8.5: Use create_file instead
Sourceasync fn create_file(
&self,
file_id: &VfsFileId,
data: Bytes,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>
async fn create_file( &self, file_id: &VfsFileId, data: Bytes, auth: BearerAuthToken, ) -> Result<Empty, BackendApiError>
Sourceasync fn upsert_file_v1(
&self,
file: &VfsFile,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>
πDeprecated: since node-v0.8.5: Use upsert_file instead
async fn upsert_file_v1( &self, file: &VfsFile, auth: BearerAuthToken, ) -> Result<Empty, BackendApiError>
since node-v0.8.5: Use upsert_file instead
Sourceasync fn upsert_file(
&self,
file_id: &VfsFileId,
data: Bytes,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>
async fn upsert_file( &self, file_id: &VfsFileId, data: Bytes, auth: BearerAuthToken, ) -> Result<Empty, BackendApiError>
Sourceasync fn delete_file(
&self,
file_id: &VfsFileId,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>
async fn delete_file( &self, file_id: &VfsFileId, auth: BearerAuthToken, ) -> Result<Empty, BackendApiError>
Sourceasync fn get_directory_v1(
&self,
dir: &VfsDirectory,
auth: BearerAuthToken,
) -> Result<VecVfsFile, BackendApiError>
πDeprecated: since node-v0.8.5: Use list_directory instead
async fn get_directory_v1( &self, dir: &VfsDirectory, auth: BearerAuthToken, ) -> Result<VecVfsFile, BackendApiError>
since node-v0.8.5: Use list_directory instead
GET /node/v1/directory VfsDirectory -> VecVfsFile
Sourceasync fn list_directory(
&self,
dir: &VfsDirectory,
auth: BearerAuthToken,
) -> Result<VfsDirectoryList, BackendApiError>
async fn list_directory( &self, dir: &VfsDirectory, auth: BearerAuthToken, ) -> Result<VfsDirectoryList, BackendApiError>
GET /node/v2/directory VfsDirectory -> VecVfsFile
Sourceasync fn get_payment_by_index_v1(
&self,
req: PaymentCreatedIndexStruct,
auth: BearerAuthToken,
) -> Result<MaybeDbPaymentV1, BackendApiError>
πDeprecated: since node-v0.8.8: Use get_payment_by_index instead
async fn get_payment_by_index_v1( &self, req: PaymentCreatedIndexStruct, auth: BearerAuthToken, ) -> Result<MaybeDbPaymentV1, BackendApiError>
since node-v0.8.8: Use get_payment_by_index instead
GET /node/v1/payments PaymentCreatedIndexStruct
-> MaybeDbPaymentV1
Sourceasync fn create_payment(
&self,
payment: DbPaymentV1,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>
πDeprecated: since node-v0.8.10: Use upsert_payment instead
async fn create_payment( &self, payment: DbPaymentV1, auth: BearerAuthToken, ) -> Result<Empty, BackendApiError>
since node-v0.8.10: Use upsert_payment instead
POST /node/v1/payments DbPaymentV1 -> Empty
Sourceasync fn upsert_payment_v1(
&self,
payment: DbPaymentV1,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>
πDeprecated: since node-v0.8.8: Use upsert_payment instead
async fn upsert_payment_v1( &self, payment: DbPaymentV1, auth: BearerAuthToken, ) -> Result<Empty, BackendApiError>
since node-v0.8.8: Use upsert_payment instead
PUT /node/v1/payments DbPaymentV1 -> Empty
Sourceasync fn upsert_payment(
&self,
payment: DbPaymentV2,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>
async fn upsert_payment( &self, payment: DbPaymentV2, auth: BearerAuthToken, ) -> Result<Empty, BackendApiError>
PUT /node/v2/payments DbPaymentV2 -> Empty
Sourceasync fn get_payment_by_id_v1(
&self,
req: PaymentIdStruct,
auth: BearerAuthToken,
) -> Result<MaybeDbPaymentV1, BackendApiError>
πDeprecated: since node-v0.8.10: Use get_payment_by_id instead
async fn get_payment_by_id_v1( &self, req: PaymentIdStruct, auth: BearerAuthToken, ) -> Result<MaybeDbPaymentV1, BackendApiError>
since node-v0.8.10: Use get_payment_by_id instead
GET /node/v1/payments/id PaymentIdStruct -> MaybeDbPaymentV1
Sourceasync fn get_payment_by_id(
&self,
req: PaymentIdStruct,
auth: BearerAuthToken,
) -> Result<MaybeDbPaymentV2, BackendApiError>
async fn get_payment_by_id( &self, req: PaymentIdStruct, auth: BearerAuthToken, ) -> Result<MaybeDbPaymentV2, BackendApiError>
GET /node/v2/payments/id PaymentIdStruct -> MaybeDbPaymentV2
Sourceasync fn get_payment_by_index(
&self,
req: PaymentCreatedIndexStruct,
auth: BearerAuthToken,
) -> Result<MaybeDbPaymentV1, BackendApiError>
πDeprecated: since node-v0.8.10: Use get_payment_by_id instead
async fn get_payment_by_index( &self, req: PaymentCreatedIndexStruct, auth: BearerAuthToken, ) -> Result<MaybeDbPaymentV1, BackendApiError>
since node-v0.8.10: Use get_payment_by_id instead
GET /node/v1/payments/index PaymentCreatedIndexStruct
-> MaybeDbPaymentV1
Sourceasync fn upsert_payment_batch_v1(
&self,
payments: VecDbPaymentV1,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>
πDeprecated: since node-v0.8.8: Use upsert_payment_batch instead
async fn upsert_payment_batch_v1( &self, payments: VecDbPaymentV1, auth: BearerAuthToken, ) -> Result<Empty, BackendApiError>
since node-v0.8.8: Use upsert_payment_batch instead
PUT /node/v1/payments/batch VecDbPaymentV1 -> Empty
ACID endpoint for upserting a batch of payments.
Sourceasync fn upsert_payment_batch(
&self,
payments: VecDbPaymentV2,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>
async fn upsert_payment_batch( &self, payments: VecDbPaymentV2, auth: BearerAuthToken, ) -> Result<Empty, BackendApiError>
PUT /node/v2/payments/batch VecDbPaymentV2 -> Empty
ACID endpoint for upserting a batch of payments.
Sourceasync fn get_payments_by_indexes(
&self,
req: PaymentCreatedIndexes,
auth: BearerAuthToken,
) -> Result<VecDbPaymentV1, BackendApiError>
πDeprecated: since node-v0.8.10: Use get_payments_by_ids instead
async fn get_payments_by_indexes( &self, req: PaymentCreatedIndexes, auth: BearerAuthToken, ) -> Result<VecDbPaymentV1, BackendApiError>
since node-v0.8.10: Use get_payments_by_ids instead
POST /node/v1/payments/indexes PaymentCreatedIndexes
-> VecDbPaymentV1
Fetch a batch of payments by their [PaymentCreatedIndex]s. This is
typically used by a mobile client to poll for updates on payments
which it currently has stored locally as βpendingβ; the intention is
to check if any of these payments have been updated.
Sourceasync fn get_payments_by_ids(
&self,
req: VecPaymentId,
auth: BearerAuthToken,
) -> Result<VecDbPaymentV2, BackendApiError>
async fn get_payments_by_ids( &self, req: VecPaymentId, auth: BearerAuthToken, ) -> Result<VecDbPaymentV2, BackendApiError>
POST /node/v1/payments/ids VecPaymentId
-> VecDbPaymentV2
Fetch a batch of payments by their [PaymentId]s.
Sourceasync fn get_new_payments(
&self,
req: GetNewPayments,
auth: BearerAuthToken,
) -> Result<VecDbPaymentV1, BackendApiError>
πDeprecated: since app-v0.8.9+29 and sdk-sidecar-v0.3.1: Use get_updated_payments instead
async fn get_new_payments( &self, req: GetNewPayments, auth: BearerAuthToken, ) -> Result<VecDbPaymentV1, BackendApiError>
since app-v0.8.9+29 and sdk-sidecar-v0.3.1: Use get_updated_payments instead
GET /node/v1/payments/new GetNewPayments -> VecDbPaymentV1
Sync a batch of new payments to local storage, optionally starting from
a known [PaymentCreatedIndex] (exclusive).
Results are in ascending order, by (created_at, payment_id).
See GetNewPayments for more info.
Sourceasync fn get_updated_payments(
&self,
req: GetUpdatedPayments,
auth: BearerAuthToken,
) -> Result<VecDbPaymentV2, BackendApiError>
async fn get_updated_payments( &self, req: GetUpdatedPayments, auth: BearerAuthToken, ) -> Result<VecDbPaymentV2, BackendApiError>
GET /node/v1/payments/updated GetUpdatedPayments
-> VecDbPaymentV2
Sourceasync fn get_pending_payments_v1(
&self,
auth: BearerAuthToken,
) -> Result<VecDbPaymentV1, BackendApiError>
πDeprecated: since node-v0.8.10: Use get_pending_payments instead
async fn get_pending_payments_v1( &self, auth: BearerAuthToken, ) -> Result<VecDbPaymentV1, BackendApiError>
since node-v0.8.10: Use get_pending_payments instead
GET /node/v1/payments/pending -> VecDbPaymentV1
Fetches all pending payments.
Sourceasync fn get_pending_payments(
&self,
auth: BearerAuthToken,
) -> Result<VecDbPaymentV2, BackendApiError>
async fn get_pending_payments( &self, auth: BearerAuthToken, ) -> Result<VecDbPaymentV2, BackendApiError>
GET /node/v2/payments/pending -> VecDbPaymentV2
Fetches all pending payments.
Sourceasync fn get_finalized_payment_ids(
&self,
auth: BearerAuthToken,
) -> Result<VecPaymentId, BackendApiError>
πDeprecated: since node-v0.8.8
async fn get_finalized_payment_ids( &self, auth: BearerAuthToken, ) -> Result<VecPaymentId, BackendApiError>
since node-v0.8.8
GET /node/v1/payments/final -> VecPaymentId
Fetches the IDs of all finalized payments.
Sourceasync fn upsert_payment_metadata(
&self,
metadata: DbPaymentMetadata,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>
async fn upsert_payment_metadata( &self, metadata: DbPaymentMetadata, auth: BearerAuthToken, ) -> Result<Empty, BackendApiError>
PUT /node/v1/payments/metadata DbPaymentMetadata -> Empty
Sourceasync fn upsert_payment_metadata_batch(
&self,
payments: VecDbPaymentMetadata,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>
async fn upsert_payment_metadata_batch( &self, payments: VecDbPaymentMetadata, auth: BearerAuthToken, ) -> Result<Empty, BackendApiError>
PUT /node/v1/payments/metadata/batch VecDbPaymentMetadata
-> Empty
ACID endpoint for upserting a batch of payments metadata.
Sourceasync fn get_payment_metadata_by_id(
&self,
req: PaymentIdStruct,
token: BearerAuthToken,
) -> Result<MaybeDbPaymentMetadata, BackendApiError>
async fn get_payment_metadata_by_id( &self, req: PaymentIdStruct, token: BearerAuthToken, ) -> Result<MaybeDbPaymentMetadata, BackendApiError>
GET /node/v1/payments/metadata/id PaymentIdStruct
-> MaybeDbPaymentMetadata
Fetch a payment metadata by its [PaymentId].
Sourceasync fn get_payment_metadata_by_ids(
&self,
req: VecPaymentId,
token: BearerAuthToken,
) -> Result<VecDbPaymentMetadata, BackendApiError>
async fn get_payment_metadata_by_ids( &self, req: VecPaymentId, token: BearerAuthToken, ) -> Result<VecDbPaymentMetadata, BackendApiError>
POST /node/v1/payments/metadata/ids VecPaymentId
-> VecDbPaymentMetadata
Fetch a batch of payment metadata by their [PaymentId]s.
Sourceasync fn get_updated_payment_metadata(
&self,
req: GetUpdatedPaymentMetadata,
auth: BearerAuthToken,
) -> Result<VecDbPaymentMetadata, BackendApiError>
async fn get_updated_payment_metadata( &self, req: GetUpdatedPaymentMetadata, auth: BearerAuthToken, ) -> Result<VecDbPaymentMetadata, BackendApiError>
GET /node/v1/payments/metadata/updated GetUpdatedPaymentMetadata
-> VecDbPaymentMetadata
Get a batch of payment metadata in asc (updated_at, payment_id) order.
Sourceasync fn update_human_bitcoin_address(
&self,
req: UpdateHumanBitcoinAddress,
auth: BearerAuthToken,
) -> Result<HumanBitcoinAddress, BackendApiError>
async fn update_human_bitcoin_address( &self, req: UpdateHumanBitcoinAddress, auth: BearerAuthToken, ) -> Result<HumanBitcoinAddress, BackendApiError>
PUT /node/v1/human_bitcoin_address UpdateHumanBitcoinAddress
-> HumanBitcoinAddress
Updates the human Bitcoin address (username and offer) of the given node.
Sourceasync fn get_human_bitcoin_address(
&self,
auth: BearerAuthToken,
) -> Result<HumanBitcoinAddress, BackendApiError>
async fn get_human_bitcoin_address( &self, auth: BearerAuthToken, ) -> Result<HumanBitcoinAddress, BackendApiError>
GET /node/v1/human_bitcoin_address Empty -> HumanBitcoinAddress
Fetches the nodeβs primary human Bitcoin address (username and offer).
Sourceasync fn claim_generated_human_bitcoin_address(
&self,
req: ClaimGeneratedHumanBitcoinAddress,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>
async fn claim_generated_human_bitcoin_address( &self, req: ClaimGeneratedHumanBitcoinAddress, auth: BearerAuthToken, ) -> Result<Empty, BackendApiError>
POST /node/v1/claim_generated_human_bitcoin_address
ClaimGeneratedHumanBitcoinAddress -> Empty
Claims a generated human Bitcoin address for the given node.
Sourceasync fn get_generated_username(
&self,
auth: BearerAuthToken,
) -> Result<GetGeneratedUsernameResponse, BackendApiError>
async fn get_generated_username( &self, auth: BearerAuthToken, ) -> Result<GetGeneratedUsernameResponse, BackendApiError>
GET /node/v1/generated_username Empty
-> GetGeneratedUsernameResponse
Generates an available username for the authenticated user without
storing it. The username is derived deterministically from the
userβs user_pk, with collision handling via numeric suffixes.
Sourceasync fn get_nwc_clients(
&self,
req: GetNwcClients,
auth: BearerAuthToken,
) -> Result<VecDbNwcClient, BackendApiError>
async fn get_nwc_clients( &self, req: GetNwcClients, auth: BearerAuthToken, ) -> Result<VecDbNwcClient, BackendApiError>
GET /node/v1/nwc_clients Empty -> VecDbNwcClient
Fetches the nodeβs NWC clients and optionally filters by client_nostr_pk.
Sourceasync fn upsert_nwc_client(
&self,
req: DbNwcClientFields,
auth: BearerAuthToken,
) -> Result<DbNwcClient, BackendApiError>
async fn upsert_nwc_client( &self, req: DbNwcClientFields, auth: BearerAuthToken, ) -> Result<DbNwcClient, BackendApiError>
PUT /node/v1/nwc_clients DbNwcClientFields -> DbNwcClient
Upserts a NWC client in the database.
Sourceasync fn delete_nwc_client(
&self,
req: NostrPkStruct,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>
async fn delete_nwc_client( &self, req: NostrPkStruct, auth: BearerAuthToken, ) -> Result<Empty, BackendApiError>
DELETE /node/v1/nwc_clients NostrPkStruct -> Empty
Deletes a NWC client given its nostr client public key.
Provided MethodsΒ§
Sourceasync fn update_payment_address(
&self,
req: UpdateHumanBitcoinAddress,
auth: BearerAuthToken,
) -> Result<HumanBitcoinAddress, BackendApiError>
πDeprecated: since node-v0.9.3: Use update_human_bitcoin_address instead
async fn update_payment_address( &self, req: UpdateHumanBitcoinAddress, auth: BearerAuthToken, ) -> Result<HumanBitcoinAddress, BackendApiError>
since node-v0.9.3: Use update_human_bitcoin_address instead
PUT /node/v1/payment_address UpdateHumanBitcoinAddress
-> HumanBitcoinAddress
Sourceasync fn get_payment_address(
&self,
auth: BearerAuthToken,
) -> Result<HumanBitcoinAddress, BackendApiError>
πDeprecated: since node-v0.9.3: Use get_human_bitcoin_address instead
async fn get_payment_address( &self, auth: BearerAuthToken, ) -> Result<HumanBitcoinAddress, BackendApiError>
since node-v0.9.3: Use get_human_bitcoin_address instead
GET /node/v1/payment_address Empty -> HumanBitcoinAddress
Sourceasync fn claim_generated_payment_address(
&self,
req: ClaimGeneratedHumanBitcoinAddress,
auth: BearerAuthToken,
) -> Result<Empty, BackendApiError>
πDeprecated: since node-v0.9.3: Use claim_generated_human_bitcoin_address instead
async fn claim_generated_payment_address( &self, req: ClaimGeneratedHumanBitcoinAddress, auth: BearerAuthToken, ) -> Result<Empty, BackendApiError>
since node-v0.9.3: Use claim_generated_human_bitcoin_address instead
POST /node/v1/claim_generated_payment_address
ClaimGeneratedHumanBitcoinAddress -> Empty
Dyn CompatibilityΒ§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.