management RPC follow up (#770)

* new protobuf file

* redis

* format
This commit is contained in:
lollerfirst
2025-08-05 12:52:00 +02:00
committed by GitHub
parent 92bf6311fb
commit e361cff5c1
5 changed files with 577 additions and 186 deletions

View File

@@ -26,6 +26,8 @@ class MintManagementRPC(management_pb2_grpc.MintServicer):
logger.debug("gRPC GetInfo has been called")
mint_info_dict = self.ledger.mint_info.dict()
del mint_info_dict["nuts"]
mint_info_dict["long_description"] = mint_info_dict["description_long"]
del mint_info_dict["description_long"]
response = management_pb2.GetInfoResponse(**mint_info_dict)
return response
@@ -102,7 +104,12 @@ class MintManagementRPC(management_pb2_grpc.MintServicer):
async def UpdateQuoteTtl(self, request, context):
logger.debug("gRPC UpdateQuoteTtl has been called")
settings.mint_redis_cache_ttl = request.ttl
if request.mint_ttl:
settings.mint_redis_cache_ttl = request.mint_ttl
elif request.melt_ttl:
settings.mint_redis_cache_ttl = request.melt_ttl
else:
raise Exception("No quote ttl was specified")
return management_pb2.UpdateResponse()
async def GetNut04Quote(self, request, _):

View File

@@ -1,197 +1,345 @@
syntax = "proto3";
package management;
package cashu;
// The Mint service provides a gRPC interface for managing a Cashu mint.
// It allows for updating mint information, managing payment methods (NUT-04 and NUT-05),
// handling quotes, rotating keysets, and configuring fees and authentication limits.
service Mint {
// GetInfo retrieves general information about the mint.
rpc GetInfo(GetInfoRequest) returns (GetInfoResponse) {}
// UpdateMotd updates the Message of the Day (MOTD) for the mint.
rpc UpdateMotd(UpdateMotdRequest) returns (UpdateResponse) {}
// UpdateShortDescription updates the short description of the mint.
rpc UpdateShortDescription(UpdateDescriptionRequest) returns (UpdateResponse) {}
// UpdateLongDescription updates the long description of the mint.
rpc UpdateLongDescription(UpdateDescriptionRequest) returns (UpdateResponse) {}
// UpdateIconUrl updates the URL for the mint's icon.
rpc UpdateIconUrl(UpdateIconUrlRequest) returns (UpdateResponse) {}
// UpdateName updates the name of the mint.
rpc UpdateName(UpdateNameRequest) returns (UpdateResponse) {}
// AddUrl adds a new URL associated with the mint.
rpc AddUrl(UpdateUrlRequest) returns (UpdateResponse) {}
// RemoveUrl removes an existing URL associated with the mint.
rpc RemoveUrl(UpdateUrlRequest) returns (UpdateResponse) {}
// AddContact adds a new contact method for the mint.
rpc AddContact(UpdateContactRequest) returns (UpdateResponse) {}
// RemoveContact removes an existing contact method for the mint.
rpc RemoveContact(UpdateContactRequest) returns (UpdateResponse) {}
// GetNut04Quote retrieves a specific NUT-04 (minting) quote by its ID.
rpc GetNut04Quote(GetNut04QuoteRequest) returns (GetNut04QuoteResponse) {}
// GetNut05Quote retrieves a specific NUT-05 (melting) quote by its ID.
rpc GetNut05Quote(GetNut05QuoteRequest) returns (GetNut05QuoteResponse) {}
// UpdateNut04 configures a NUT-04 (minting) payment method.
rpc UpdateNut04(UpdateNut04Request) returns (UpdateResponse) {}
// UpdateNut05 configures a NUT-05 (melting) payment method.
rpc UpdateNut05(UpdateNut05Request) returns (UpdateResponse) {}
// UpdateQuoteTtl updates the Time-To-Live (TTL) for minting and melting quotes.
rpc UpdateQuoteTtl(UpdateQuoteTtlRequest) returns (UpdateResponse) {}
// UpdateNut04Quote updates the state of a specific NUT-04 (minting) quote.
rpc UpdateNut04Quote(UpdateQuoteRequest) returns (UpdateResponse) {}
// UpdateNut05Quote updates the state of a specific NUT-05 (melting) quote.
rpc UpdateNut05Quote(UpdateQuoteRequest) returns (UpdateResponse) {}
// RotateNextKeyset initiates the rotation to a new keyset for a given unit.
rpc RotateNextKeyset(RotateNextKeysetRequest) returns (RotateNextKeysetResponse) {}
// UpdateLightningFee updates the lightning network fee configuration for the mint.
rpc UpdateLightningFee(UpdateLightningFeeRequest) returns (UpdateResponse) {}
// UpdateAuthLimits updates the authentication rate limits for the mint.
rpc UpdateAuthLimits(UpdateAuthLimitsRequest) returns (UpdateResponse) {}
}
// GetInfoRequest is an empty message used to request general mint information.
message GetInfoRequest {
}
message MintInfoContact {
// InfoContact represents a contact method for the mint.
message InfoContact {
// The method of contact (e.g., "email", "telegram", "twitter").
string method = 1;
// The contact information itself (e.g., "info@example.com", "@mint_support").
string info = 2;
}
// GetInfoResponse contains general information about the mint.
message GetInfoResponse {
// The name of the mint.
optional string name = 1;
// The public key of the mint.
optional string pubkey = 2;
// The version of the mint software.
optional string version = 3;
// A short description of the mint.
optional string description = 4;
optional string description_long = 5;
repeated MintInfoContact contact = 6;
// A longer, more detailed description of the mint.
optional string long_description = 5;
// A list of contact methods for the mint.
repeated InfoContact contact = 6;
// The Message of the Day (MOTD) displayed by the mint.
optional string motd = 7;
// The URL to the mint's icon.
optional string icon_url = 8;
// A list of URLs associated with the mint.
repeated string urls = 9;
// The current time on the mint server (Unix timestamp).
optional int64 time = 10;
// The URL to the mint's Terms of Service.
optional string tos_url = 11;
}
// UpdateResponse is a generic empty message returned for successful update operations.
message UpdateResponse{
}
// UpdateMotdRequest is used to update the Message of the Day (MOTD).
message UpdateMotdRequest {
// The new MOTD string.
string motd = 1;
}
// UpdateDescriptionRequest is used to update either the short or long description.
message UpdateDescriptionRequest {
// The new description string.
string description = 1;
}
// UpdateIconUrlRequest is used to update the mint's icon URL.
message UpdateIconUrlRequest {
// The new URL for the mint's icon.
string icon_url = 1;
}
// UpdateNameRequest is used to update the mint's name.
message UpdateNameRequest {
// The new name for the mint.
string name = 1;
}
// UpdateUrlRequest is used to add or remove a URL associated with the mint.
message UpdateUrlRequest {
// The URL to add or remove.
string url = 1;
}
// UpdateContactRequest is used to add or remove a contact method for the mint.
message UpdateContactRequest {
// The method of contact (e.g., "email", "telegram").
string method = 1;
// The contact information (e.g., "info@example.com").
string info = 2;
}
// MintMethodOptions defines specific options for a NUT-04 (minting) method.
message MintMethodOptions {
// Bolt11 options
// Indicates if a description is required for Bolt11 invoices.
bool description = 1;
}
// UpdateNut04Request is used to configure a NUT-04 (minting) payment method.
message UpdateNut04Request {
// The unit of the payment method (e.g., "sat").
string unit = 1;
// The method of payment (e.g., "bolt11").
string method = 2;
// Optional: If true, disables this payment method.
optional bool disabled = 3;
optional uint64 min = 4;
optional uint64 max = 5;
optional bool description = 6;
// Optional: The minimum amount allowed for this method.
optional uint64 min_amount = 4;
// Optional: The maximum amount allowed for this method.
optional uint64 max_amount = 5;
// Optional: Specific options for this minting method.
optional MintMethodOptions options = 6;
}
// MeltMethodOptions defines specific options for a NUT-05 (melting) method.
message MeltMethodOptions {
// Bolt11 options
// Indicates if the amount can be omitted for Bolt11 invoices.
bool amountless = 1;
}
// UpdateNut05Request is used to configure a NUT-05 (melting) payment method.
message UpdateNut05Request {
// The unit of the payment method (e.g., "sat").
string unit = 1;
// The method of payment (e.g., "bolt11").
string method = 2;
// Optional: If true, disables this payment method.
optional bool disabled = 3;
optional uint64 min = 4;
optional uint64 max = 5;
// Optional: The minimum amount allowed for this method.
optional uint64 min_amount = 4;
// Optional: The maximum amount allowed for this method.
optional uint64 max_amount = 5;
// Optional: Specific options for this melting method.
optional MeltMethodOptions options = 6;
}
// UpdateQuoteTtlRequest is used to update the Time-To-Live (TTL) for quotes.
message UpdateQuoteTtlRequest {
optional uint64 ttl = 1;
// Optional: The TTL in seconds for minting (NUT-04) quotes.
optional uint64 mint_ttl = 1;
// Optional: The TTL in seconds for melting (NUT-05) quotes.
optional uint64 melt_ttl = 2;
}
// Nut04Quote represents a quote for minting (NUT-04).
message Nut04Quote {
// The unique identifier for the quote.
string quote = 1;
// The payment method used for this quote (e.g., "bolt11").
string method = 2;
// The original request string (e.g., Bolt11 invoice).
string request = 3;
// The ID used for checking the payment status.
string checking_id = 4;
// The unit of the amount (e.g., "sat").
string unit = 5;
// The amount of tokens to be minted.
uint64 amount = 6;
// Optional: The current state of the quote (e.g., "pending", "paid", "expired").
optional string state = 7;
// Optional: The Unix timestamp when the quote was created.
optional int64 created_time = 8;
// Optional: The Unix timestamp when the quote was paid.
optional int64 paid_time = 9;
// Optional: The Unix timestamp when the quote expires.
optional int64 expiry = 10;
// Optional: The public key associated with the quote, if applicable.
optional string pubkey = 13;
}
// BlindedMessage represents a blinded message used in Cashu.
message BlindedMessage {
// The amount of the token.
int32 amount = 1;
// The ID of the keyset.
string id = 2;
// The blinded point B_.
string B_ = 3;
// Optional: The witness for the blinded message.
optional string witness = 4;
}
// DLEQ represents a Discrete Logarithm Equality Proof.
message DLEQ {
// The 'e' value of the DLEQ proof.
string e = 1;
// The 's' value of the DLEQ proof.
string s = 2;
}
// BlindedSignature represents a blinded signature from the mint.
message BlindedSignature {
// The ID of the keyset.
string id = 1;
// The amount of the token.
int32 amount = 2;
// The blinded signature C_.
string C_ = 3;
// Optional: The DLEQ proof for the signature.
optional DLEQ dleq = 4;
}
// Nut05Quote represents a quote for melting (NUT-05).
message Nut05Quote {
// The unique identifier for the quote.
string quote = 1;
// The payment method used for this quote (e.g., "bolt11").
string method = 2;
// The original request string (e.g., Bolt11 invoice).
string request = 3;
// The ID used for checking the payment status.
string checking_id = 4;
// The unit of the amount (e.g., "sat").
string unit = 5;
// The amount of tokens to be melted.
int32 amount = 6;
// The fee reserve for the melting operation.
int32 fee_reserve = 7;
// The current state of the quote (e.g., "pending", "paid", "success", "failed").
string state = 8;
// Optional: The Unix timestamp when the quote was created.
optional int64 created_time = 9;
// Optional: The Unix timestamp when the quote was paid.
optional int64 paid_time = 10;
// The actual fee paid for the melting operation.
int32 fee_paid = 11;
// Optional: The payment preimage if the payment was successful.
optional string payment_preimage = 12;
// Optional: The Unix timestamp when the quote expires.
optional int64 expiry = 13;
// A list of blinded messages representing the outputs (e.g., change).
repeated BlindedMessage outputs = 14;
// A list of blinded signatures representing the change.
repeated BlindedSignature change = 15;
}
// GetNut04QuoteRequest is used to request a specific NUT-04 quote.
message GetNut04QuoteRequest {
// The ID of the NUT-04 quote to retrieve.
string quote_id = 1;
}
// GetNut04QuoteResponse contains the requested NUT-04 quote.
message GetNut04QuoteResponse {
// The NUT-04 quote object.
Nut04Quote quote = 1;
}
// GetNut05QuoteRequest is used to request a specific NUT-05 quote.
message GetNut05QuoteRequest {
// The ID of the NUT-05 quote to retrieve.
string quote_id = 1;
}
// GetNut05QuoteResponse contains the requested NUT-05 quote.
message GetNut05QuoteResponse {
// The NUT-05 quote object.
Nut05Quote quote = 1;
}
// UpdateQuoteRequest is used to update the state of a minting or melting quote.
message UpdateQuoteRequest {
// The ID of the quote to update.
string quote_id = 1;
// The new state for the quote (e.g., "paid", "expired", "success", "failed").
string state = 2;
}
// RotateNextKeysetRequest is used to initiate a keyset rotation.
message RotateNextKeysetRequest {
// The unit for which to rotate the keyset (e.g., "sat").
string unit = 1;
// Optional: The maximum order of the new keyset.
optional uint32 max_order = 2;
// Optional: The input fee per kilobyte for the new keyset.
optional uint64 input_fee_ppk = 3;
}
// RotateNextKeysetResponse contains information about the newly rotated keyset.
message RotateNextKeysetResponse {
// The ID of the new keyset.
string id = 1;
// The unit of the new keyset.
string unit = 2;
// The maximum order of the new keyset.
uint32 max_order = 3;
// The input fee per kilobyte for the new keyset.
uint64 input_fee_ppk = 4;
}
// UpdateLightningFeeRequest is used to update the lightning network fee configuration.
message UpdateLightningFeeRequest {
// Optional: The percentage of the fee.
optional double fee_percent = 1;
// Optional: The minimum reserve amount for the fee.
optional uint64 fee_min_reserve = 2;
}
// UpdateAuthLimitsRequest is used to update authentication rate limits.
message UpdateAuthLimitsRequest {
// Optional: The maximum number of authentication requests allowed per minute.
optional uint64 auth_rate_limit_per_minute = 1;
// Optional: The maximum number of blind tokens allowed for authentication.
optional uint64 auth_max_blind_tokens = 2;
}
}

File diff suppressed because one or more lines are too long

View File

@@ -15,6 +15,8 @@ DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
@typing.final
class GetInfoRequest(google.protobuf.message.Message):
"""GetInfoRequest is an empty message used to request general mint information."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
def __init__(
@@ -24,13 +26,17 @@ class GetInfoRequest(google.protobuf.message.Message):
global___GetInfoRequest = GetInfoRequest
@typing.final
class MintInfoContact(google.protobuf.message.Message):
class InfoContact(google.protobuf.message.Message):
"""InfoContact represents a contact method for the mint."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
METHOD_FIELD_NUMBER: builtins.int
INFO_FIELD_NUMBER: builtins.int
method: builtins.str
"""The method of contact (e.g., "email", "telegram", "twitter")."""
info: builtins.str
"""The contact information itself (e.g., "info@example.com", "@mint_support")."""
def __init__(
self,
*,
@@ -39,17 +45,19 @@ class MintInfoContact(google.protobuf.message.Message):
) -> None: ...
def ClearField(self, field_name: typing.Literal["info", b"info", "method", b"method"]) -> None: ...
global___MintInfoContact = MintInfoContact
global___InfoContact = InfoContact
@typing.final
class GetInfoResponse(google.protobuf.message.Message):
"""GetInfoResponse contains general information about the mint."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
NAME_FIELD_NUMBER: builtins.int
PUBKEY_FIELD_NUMBER: builtins.int
VERSION_FIELD_NUMBER: builtins.int
DESCRIPTION_FIELD_NUMBER: builtins.int
DESCRIPTION_LONG_FIELD_NUMBER: builtins.int
LONG_DESCRIPTION_FIELD_NUMBER: builtins.int
CONTACT_FIELD_NUMBER: builtins.int
MOTD_FIELD_NUMBER: builtins.int
ICON_URL_FIELD_NUMBER: builtins.int
@@ -57,18 +65,31 @@ class GetInfoResponse(google.protobuf.message.Message):
TIME_FIELD_NUMBER: builtins.int
TOS_URL_FIELD_NUMBER: builtins.int
name: builtins.str
"""The name of the mint."""
pubkey: builtins.str
"""The public key of the mint."""
version: builtins.str
"""The version of the mint software."""
description: builtins.str
description_long: builtins.str
"""A short description of the mint."""
long_description: builtins.str
"""A longer, more detailed description of the mint."""
motd: builtins.str
"""The Message of the Day (MOTD) displayed by the mint."""
icon_url: builtins.str
"""The URL to the mint's icon."""
time: builtins.int
"""The current time on the mint server (Unix timestamp)."""
tos_url: builtins.str
"""The URL to the mint's Terms of Service."""
@property
def contact(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___MintInfoContact]: ...
def contact(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___InfoContact]:
"""A list of contact methods for the mint."""
@property
def urls(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
def urls(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
"""A list of URLs associated with the mint."""
def __init__(
self,
*,
@@ -76,23 +97,23 @@ class GetInfoResponse(google.protobuf.message.Message):
pubkey: builtins.str | None = ...,
version: builtins.str | None = ...,
description: builtins.str | None = ...,
description_long: builtins.str | None = ...,
contact: collections.abc.Iterable[global___MintInfoContact] | None = ...,
long_description: builtins.str | None = ...,
contact: collections.abc.Iterable[global___InfoContact] | None = ...,
motd: builtins.str | None = ...,
icon_url: builtins.str | None = ...,
urls: collections.abc.Iterable[builtins.str] | None = ...,
time: builtins.int | None = ...,
tos_url: builtins.str | None = ...,
) -> None: ...
def HasField(self, field_name: typing.Literal["_description", b"_description", "_description_long", b"_description_long", "_icon_url", b"_icon_url", "_motd", b"_motd", "_name", b"_name", "_pubkey", b"_pubkey", "_time", b"_time", "_tos_url", b"_tos_url", "_version", b"_version", "description", b"description", "description_long", b"description_long", "icon_url", b"icon_url", "motd", b"motd", "name", b"name", "pubkey", b"pubkey", "time", b"time", "tos_url", b"tos_url", "version", b"version"]) -> builtins.bool: ...
def ClearField(self, field_name: typing.Literal["_description", b"_description", "_description_long", b"_description_long", "_icon_url", b"_icon_url", "_motd", b"_motd", "_name", b"_name", "_pubkey", b"_pubkey", "_time", b"_time", "_tos_url", b"_tos_url", "_version", b"_version", "contact", b"contact", "description", b"description", "description_long", b"description_long", "icon_url", b"icon_url", "motd", b"motd", "name", b"name", "pubkey", b"pubkey", "time", b"time", "tos_url", b"tos_url", "urls", b"urls", "version", b"version"]) -> None: ...
def HasField(self, field_name: typing.Literal["_description", b"_description", "_icon_url", b"_icon_url", "_long_description", b"_long_description", "_motd", b"_motd", "_name", b"_name", "_pubkey", b"_pubkey", "_time", b"_time", "_tos_url", b"_tos_url", "_version", b"_version", "description", b"description", "icon_url", b"icon_url", "long_description", b"long_description", "motd", b"motd", "name", b"name", "pubkey", b"pubkey", "time", b"time", "tos_url", b"tos_url", "version", b"version"]) -> builtins.bool: ...
def ClearField(self, field_name: typing.Literal["_description", b"_description", "_icon_url", b"_icon_url", "_long_description", b"_long_description", "_motd", b"_motd", "_name", b"_name", "_pubkey", b"_pubkey", "_time", b"_time", "_tos_url", b"_tos_url", "_version", b"_version", "contact", b"contact", "description", b"description", "icon_url", b"icon_url", "long_description", b"long_description", "motd", b"motd", "name", b"name", "pubkey", b"pubkey", "time", b"time", "tos_url", b"tos_url", "urls", b"urls", "version", b"version"]) -> None: ...
@typing.overload
def WhichOneof(self, oneof_group: typing.Literal["_description", b"_description"]) -> typing.Literal["description"] | None: ...
@typing.overload
def WhichOneof(self, oneof_group: typing.Literal["_description_long", b"_description_long"]) -> typing.Literal["description_long"] | None: ...
@typing.overload
def WhichOneof(self, oneof_group: typing.Literal["_icon_url", b"_icon_url"]) -> typing.Literal["icon_url"] | None: ...
@typing.overload
def WhichOneof(self, oneof_group: typing.Literal["_long_description", b"_long_description"]) -> typing.Literal["long_description"] | None: ...
@typing.overload
def WhichOneof(self, oneof_group: typing.Literal["_motd", b"_motd"]) -> typing.Literal["motd"] | None: ...
@typing.overload
def WhichOneof(self, oneof_group: typing.Literal["_name", b"_name"]) -> typing.Literal["name"] | None: ...
@@ -109,6 +130,8 @@ global___GetInfoResponse = GetInfoResponse
@typing.final
class UpdateResponse(google.protobuf.message.Message):
"""UpdateResponse is a generic empty message returned for successful update operations."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
def __init__(
@@ -119,10 +142,13 @@ global___UpdateResponse = UpdateResponse
@typing.final
class UpdateMotdRequest(google.protobuf.message.Message):
"""UpdateMotdRequest is used to update the Message of the Day (MOTD)."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
MOTD_FIELD_NUMBER: builtins.int
motd: builtins.str
"""The new MOTD string."""
def __init__(
self,
*,
@@ -134,10 +160,13 @@ global___UpdateMotdRequest = UpdateMotdRequest
@typing.final
class UpdateDescriptionRequest(google.protobuf.message.Message):
"""UpdateDescriptionRequest is used to update either the short or long description."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
DESCRIPTION_FIELD_NUMBER: builtins.int
description: builtins.str
"""The new description string."""
def __init__(
self,
*,
@@ -149,10 +178,13 @@ global___UpdateDescriptionRequest = UpdateDescriptionRequest
@typing.final
class UpdateIconUrlRequest(google.protobuf.message.Message):
"""UpdateIconUrlRequest is used to update the mint's icon URL."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
ICON_URL_FIELD_NUMBER: builtins.int
icon_url: builtins.str
"""The new URL for the mint's icon."""
def __init__(
self,
*,
@@ -164,10 +196,13 @@ global___UpdateIconUrlRequest = UpdateIconUrlRequest
@typing.final
class UpdateNameRequest(google.protobuf.message.Message):
"""UpdateNameRequest is used to update the mint's name."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
NAME_FIELD_NUMBER: builtins.int
name: builtins.str
"""The new name for the mint."""
def __init__(
self,
*,
@@ -179,10 +214,13 @@ global___UpdateNameRequest = UpdateNameRequest
@typing.final
class UpdateUrlRequest(google.protobuf.message.Message):
"""UpdateUrlRequest is used to add or remove a URL associated with the mint."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
URL_FIELD_NUMBER: builtins.int
url: builtins.str
"""The URL to add or remove."""
def __init__(
self,
*,
@@ -194,12 +232,16 @@ global___UpdateUrlRequest = UpdateUrlRequest
@typing.final
class UpdateContactRequest(google.protobuf.message.Message):
"""UpdateContactRequest is used to add or remove a contact method for the mint."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
METHOD_FIELD_NUMBER: builtins.int
INFO_FIELD_NUMBER: builtins.int
method: builtins.str
"""The method of contact (e.g., "email", "telegram")."""
info: builtins.str
"""The contact information (e.g., "info@example.com")."""
def __init__(
self,
*,
@@ -210,98 +252,175 @@ class UpdateContactRequest(google.protobuf.message.Message):
global___UpdateContactRequest = UpdateContactRequest
@typing.final
class MintMethodOptions(google.protobuf.message.Message):
"""MintMethodOptions defines specific options for a NUT-04 (minting) method."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
DESCRIPTION_FIELD_NUMBER: builtins.int
description: builtins.bool
"""Bolt11 options
Indicates if a description is required for Bolt11 invoices.
"""
def __init__(
self,
*,
description: builtins.bool = ...,
) -> None: ...
def ClearField(self, field_name: typing.Literal["description", b"description"]) -> None: ...
global___MintMethodOptions = MintMethodOptions
@typing.final
class UpdateNut04Request(google.protobuf.message.Message):
"""UpdateNut04Request is used to configure a NUT-04 (minting) payment method."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
UNIT_FIELD_NUMBER: builtins.int
METHOD_FIELD_NUMBER: builtins.int
DISABLED_FIELD_NUMBER: builtins.int
MIN_FIELD_NUMBER: builtins.int
MAX_FIELD_NUMBER: builtins.int
DESCRIPTION_FIELD_NUMBER: builtins.int
MIN_AMOUNT_FIELD_NUMBER: builtins.int
MAX_AMOUNT_FIELD_NUMBER: builtins.int
OPTIONS_FIELD_NUMBER: builtins.int
unit: builtins.str
"""The unit of the payment method (e.g., "sat")."""
method: builtins.str
"""The method of payment (e.g., "bolt11")."""
disabled: builtins.bool
min: builtins.int
max: builtins.int
description: builtins.bool
"""Optional: If true, disables this payment method."""
min_amount: builtins.int
"""Optional: The minimum amount allowed for this method."""
max_amount: builtins.int
"""Optional: The maximum amount allowed for this method."""
@property
def options(self) -> global___MintMethodOptions:
"""Optional: Specific options for this minting method."""
def __init__(
self,
*,
unit: builtins.str = ...,
method: builtins.str = ...,
disabled: builtins.bool | None = ...,
min: builtins.int | None = ...,
max: builtins.int | None = ...,
description: builtins.bool | None = ...,
min_amount: builtins.int | None = ...,
max_amount: builtins.int | None = ...,
options: global___MintMethodOptions | None = ...,
) -> None: ...
def HasField(self, field_name: typing.Literal["_description", b"_description", "_disabled", b"_disabled", "_max", b"_max", "_min", b"_min", "description", b"description", "disabled", b"disabled", "max", b"max", "min", b"min"]) -> builtins.bool: ...
def ClearField(self, field_name: typing.Literal["_description", b"_description", "_disabled", b"_disabled", "_max", b"_max", "_min", b"_min", "description", b"description", "disabled", b"disabled", "max", b"max", "method", b"method", "min", b"min", "unit", b"unit"]) -> None: ...
@typing.overload
def WhichOneof(self, oneof_group: typing.Literal["_description", b"_description"]) -> typing.Literal["description"] | None: ...
def HasField(self, field_name: typing.Literal["_disabled", b"_disabled", "_max_amount", b"_max_amount", "_min_amount", b"_min_amount", "_options", b"_options", "disabled", b"disabled", "max_amount", b"max_amount", "min_amount", b"min_amount", "options", b"options"]) -> builtins.bool: ...
def ClearField(self, field_name: typing.Literal["_disabled", b"_disabled", "_max_amount", b"_max_amount", "_min_amount", b"_min_amount", "_options", b"_options", "disabled", b"disabled", "max_amount", b"max_amount", "method", b"method", "min_amount", b"min_amount", "options", b"options", "unit", b"unit"]) -> None: ...
@typing.overload
def WhichOneof(self, oneof_group: typing.Literal["_disabled", b"_disabled"]) -> typing.Literal["disabled"] | None: ...
@typing.overload
def WhichOneof(self, oneof_group: typing.Literal["_max", b"_max"]) -> typing.Literal["max"] | None: ...
def WhichOneof(self, oneof_group: typing.Literal["_max_amount", b"_max_amount"]) -> typing.Literal["max_amount"] | None: ...
@typing.overload
def WhichOneof(self, oneof_group: typing.Literal["_min", b"_min"]) -> typing.Literal["min"] | None: ...
def WhichOneof(self, oneof_group: typing.Literal["_min_amount", b"_min_amount"]) -> typing.Literal["min_amount"] | None: ...
@typing.overload
def WhichOneof(self, oneof_group: typing.Literal["_options", b"_options"]) -> typing.Literal["options"] | None: ...
global___UpdateNut04Request = UpdateNut04Request
@typing.final
class MeltMethodOptions(google.protobuf.message.Message):
"""MeltMethodOptions defines specific options for a NUT-05 (melting) method."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
AMOUNTLESS_FIELD_NUMBER: builtins.int
amountless: builtins.bool
"""Bolt11 options
Indicates if the amount can be omitted for Bolt11 invoices.
"""
def __init__(
self,
*,
amountless: builtins.bool = ...,
) -> None: ...
def ClearField(self, field_name: typing.Literal["amountless", b"amountless"]) -> None: ...
global___MeltMethodOptions = MeltMethodOptions
@typing.final
class UpdateNut05Request(google.protobuf.message.Message):
"""UpdateNut05Request is used to configure a NUT-05 (melting) payment method."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
UNIT_FIELD_NUMBER: builtins.int
METHOD_FIELD_NUMBER: builtins.int
DISABLED_FIELD_NUMBER: builtins.int
MIN_FIELD_NUMBER: builtins.int
MAX_FIELD_NUMBER: builtins.int
MIN_AMOUNT_FIELD_NUMBER: builtins.int
MAX_AMOUNT_FIELD_NUMBER: builtins.int
OPTIONS_FIELD_NUMBER: builtins.int
unit: builtins.str
"""The unit of the payment method (e.g., "sat")."""
method: builtins.str
"""The method of payment (e.g., "bolt11")."""
disabled: builtins.bool
min: builtins.int
max: builtins.int
"""Optional: If true, disables this payment method."""
min_amount: builtins.int
"""Optional: The minimum amount allowed for this method."""
max_amount: builtins.int
"""Optional: The maximum amount allowed for this method."""
@property
def options(self) -> global___MeltMethodOptions:
"""Optional: Specific options for this melting method."""
def __init__(
self,
*,
unit: builtins.str = ...,
method: builtins.str = ...,
disabled: builtins.bool | None = ...,
min: builtins.int | None = ...,
max: builtins.int | None = ...,
min_amount: builtins.int | None = ...,
max_amount: builtins.int | None = ...,
options: global___MeltMethodOptions | None = ...,
) -> None: ...
def HasField(self, field_name: typing.Literal["_disabled", b"_disabled", "_max", b"_max", "_min", b"_min", "disabled", b"disabled", "max", b"max", "min", b"min"]) -> builtins.bool: ...
def ClearField(self, field_name: typing.Literal["_disabled", b"_disabled", "_max", b"_max", "_min", b"_min", "disabled", b"disabled", "max", b"max", "method", b"method", "min", b"min", "unit", b"unit"]) -> None: ...
def HasField(self, field_name: typing.Literal["_disabled", b"_disabled", "_max_amount", b"_max_amount", "_min_amount", b"_min_amount", "_options", b"_options", "disabled", b"disabled", "max_amount", b"max_amount", "min_amount", b"min_amount", "options", b"options"]) -> builtins.bool: ...
def ClearField(self, field_name: typing.Literal["_disabled", b"_disabled", "_max_amount", b"_max_amount", "_min_amount", b"_min_amount", "_options", b"_options", "disabled", b"disabled", "max_amount", b"max_amount", "method", b"method", "min_amount", b"min_amount", "options", b"options", "unit", b"unit"]) -> None: ...
@typing.overload
def WhichOneof(self, oneof_group: typing.Literal["_disabled", b"_disabled"]) -> typing.Literal["disabled"] | None: ...
@typing.overload
def WhichOneof(self, oneof_group: typing.Literal["_max", b"_max"]) -> typing.Literal["max"] | None: ...
def WhichOneof(self, oneof_group: typing.Literal["_max_amount", b"_max_amount"]) -> typing.Literal["max_amount"] | None: ...
@typing.overload
def WhichOneof(self, oneof_group: typing.Literal["_min", b"_min"]) -> typing.Literal["min"] | None: ...
def WhichOneof(self, oneof_group: typing.Literal["_min_amount", b"_min_amount"]) -> typing.Literal["min_amount"] | None: ...
@typing.overload
def WhichOneof(self, oneof_group: typing.Literal["_options", b"_options"]) -> typing.Literal["options"] | None: ...
global___UpdateNut05Request = UpdateNut05Request
@typing.final
class UpdateQuoteTtlRequest(google.protobuf.message.Message):
"""UpdateQuoteTtlRequest is used to update the Time-To-Live (TTL) for quotes."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
TTL_FIELD_NUMBER: builtins.int
ttl: builtins.int
MINT_TTL_FIELD_NUMBER: builtins.int
MELT_TTL_FIELD_NUMBER: builtins.int
mint_ttl: builtins.int
"""Optional: The TTL in seconds for minting (NUT-04) quotes."""
melt_ttl: builtins.int
"""Optional: The TTL in seconds for melting (NUT-05) quotes."""
def __init__(
self,
*,
ttl: builtins.int | None = ...,
mint_ttl: builtins.int | None = ...,
melt_ttl: builtins.int | None = ...,
) -> None: ...
def HasField(self, field_name: typing.Literal["_ttl", b"_ttl", "ttl", b"ttl"]) -> builtins.bool: ...
def ClearField(self, field_name: typing.Literal["_ttl", b"_ttl", "ttl", b"ttl"]) -> None: ...
def WhichOneof(self, oneof_group: typing.Literal["_ttl", b"_ttl"]) -> typing.Literal["ttl"] | None: ...
def HasField(self, field_name: typing.Literal["_melt_ttl", b"_melt_ttl", "_mint_ttl", b"_mint_ttl", "melt_ttl", b"melt_ttl", "mint_ttl", b"mint_ttl"]) -> builtins.bool: ...
def ClearField(self, field_name: typing.Literal["_melt_ttl", b"_melt_ttl", "_mint_ttl", b"_mint_ttl", "melt_ttl", b"melt_ttl", "mint_ttl", b"mint_ttl"]) -> None: ...
@typing.overload
def WhichOneof(self, oneof_group: typing.Literal["_melt_ttl", b"_melt_ttl"]) -> typing.Literal["melt_ttl"] | None: ...
@typing.overload
def WhichOneof(self, oneof_group: typing.Literal["_mint_ttl", b"_mint_ttl"]) -> typing.Literal["mint_ttl"] | None: ...
global___UpdateQuoteTtlRequest = UpdateQuoteTtlRequest
@typing.final
class Nut04Quote(google.protobuf.message.Message):
"""Nut04Quote represents a quote for minting (NUT-04)."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
QUOTE_FIELD_NUMBER: builtins.int
@@ -316,16 +435,27 @@ class Nut04Quote(google.protobuf.message.Message):
EXPIRY_FIELD_NUMBER: builtins.int
PUBKEY_FIELD_NUMBER: builtins.int
quote: builtins.str
"""The unique identifier for the quote."""
method: builtins.str
"""The payment method used for this quote (e.g., "bolt11")."""
request: builtins.str
"""The original request string (e.g., Bolt11 invoice)."""
checking_id: builtins.str
"""The ID used for checking the payment status."""
unit: builtins.str
"""The unit of the amount (e.g., "sat")."""
amount: builtins.int
"""The amount of tokens to be minted."""
state: builtins.str
"""Optional: The current state of the quote (e.g., "pending", "paid", "expired")."""
created_time: builtins.int
"""Optional: The Unix timestamp when the quote was created."""
paid_time: builtins.int
"""Optional: The Unix timestamp when the quote was paid."""
expiry: builtins.int
"""Optional: The Unix timestamp when the quote expires."""
pubkey: builtins.str
"""Optional: The public key associated with the quote, if applicable."""
def __init__(
self,
*,
@@ -358,6 +488,8 @@ global___Nut04Quote = Nut04Quote
@typing.final
class BlindedMessage(google.protobuf.message.Message):
"""BlindedMessage represents a blinded message used in Cashu."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
AMOUNT_FIELD_NUMBER: builtins.int
@@ -365,9 +497,13 @@ class BlindedMessage(google.protobuf.message.Message):
B__FIELD_NUMBER: builtins.int
WITNESS_FIELD_NUMBER: builtins.int
amount: builtins.int
"""The amount of the token."""
id: builtins.str
"""The ID of the keyset."""
B_: builtins.str
"""The blinded point B_."""
witness: builtins.str
"""Optional: The witness for the blinded message."""
def __init__(
self,
*,
@@ -384,12 +520,16 @@ global___BlindedMessage = BlindedMessage
@typing.final
class DLEQ(google.protobuf.message.Message):
"""DLEQ represents a Discrete Logarithm Equality Proof."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
E_FIELD_NUMBER: builtins.int
S_FIELD_NUMBER: builtins.int
e: builtins.str
"""The 'e' value of the DLEQ proof."""
s: builtins.str
"""The 's' value of the DLEQ proof."""
def __init__(
self,
*,
@@ -402,6 +542,8 @@ global___DLEQ = DLEQ
@typing.final
class BlindedSignature(google.protobuf.message.Message):
"""BlindedSignature represents a blinded signature from the mint."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
ID_FIELD_NUMBER: builtins.int
@@ -409,10 +551,15 @@ class BlindedSignature(google.protobuf.message.Message):
C__FIELD_NUMBER: builtins.int
DLEQ_FIELD_NUMBER: builtins.int
id: builtins.str
"""The ID of the keyset."""
amount: builtins.int
"""The amount of the token."""
C_: builtins.str
"""The blinded signature C_."""
@property
def dleq(self) -> global___DLEQ: ...
def dleq(self) -> global___DLEQ:
"""Optional: The DLEQ proof for the signature."""
def __init__(
self,
*,
@@ -429,6 +576,8 @@ global___BlindedSignature = BlindedSignature
@typing.final
class Nut05Quote(google.protobuf.message.Message):
"""Nut05Quote represents a quote for melting (NUT-05)."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
QUOTE_FIELD_NUMBER: builtins.int
@@ -447,22 +596,39 @@ class Nut05Quote(google.protobuf.message.Message):
OUTPUTS_FIELD_NUMBER: builtins.int
CHANGE_FIELD_NUMBER: builtins.int
quote: builtins.str
"""The unique identifier for the quote."""
method: builtins.str
"""The payment method used for this quote (e.g., "bolt11")."""
request: builtins.str
"""The original request string (e.g., Bolt11 invoice)."""
checking_id: builtins.str
"""The ID used for checking the payment status."""
unit: builtins.str
"""The unit of the amount (e.g., "sat")."""
amount: builtins.int
"""The amount of tokens to be melted."""
fee_reserve: builtins.int
"""The fee reserve for the melting operation."""
state: builtins.str
"""The current state of the quote (e.g., "pending", "paid", "success", "failed")."""
created_time: builtins.int
"""Optional: The Unix timestamp when the quote was created."""
paid_time: builtins.int
"""Optional: The Unix timestamp when the quote was paid."""
fee_paid: builtins.int
"""The actual fee paid for the melting operation."""
payment_preimage: builtins.str
"""Optional: The payment preimage if the payment was successful."""
expiry: builtins.int
"""Optional: The Unix timestamp when the quote expires."""
@property
def outputs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BlindedMessage]: ...
def outputs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BlindedMessage]:
"""A list of blinded messages representing the outputs (e.g., change)."""
@property
def change(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BlindedSignature]: ...
def change(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BlindedSignature]:
"""A list of blinded signatures representing the change."""
def __init__(
self,
*,
@@ -497,10 +663,13 @@ global___Nut05Quote = Nut05Quote
@typing.final
class GetNut04QuoteRequest(google.protobuf.message.Message):
"""GetNut04QuoteRequest is used to request a specific NUT-04 quote."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
QUOTE_ID_FIELD_NUMBER: builtins.int
quote_id: builtins.str
"""The ID of the NUT-04 quote to retrieve."""
def __init__(
self,
*,
@@ -512,11 +681,15 @@ global___GetNut04QuoteRequest = GetNut04QuoteRequest
@typing.final
class GetNut04QuoteResponse(google.protobuf.message.Message):
"""GetNut04QuoteResponse contains the requested NUT-04 quote."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
QUOTE_FIELD_NUMBER: builtins.int
@property
def quote(self) -> global___Nut04Quote: ...
def quote(self) -> global___Nut04Quote:
"""The NUT-04 quote object."""
def __init__(
self,
*,
@@ -529,10 +702,13 @@ global___GetNut04QuoteResponse = GetNut04QuoteResponse
@typing.final
class GetNut05QuoteRequest(google.protobuf.message.Message):
"""GetNut05QuoteRequest is used to request a specific NUT-05 quote."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
QUOTE_ID_FIELD_NUMBER: builtins.int
quote_id: builtins.str
"""The ID of the NUT-05 quote to retrieve."""
def __init__(
self,
*,
@@ -544,11 +720,15 @@ global___GetNut05QuoteRequest = GetNut05QuoteRequest
@typing.final
class GetNut05QuoteResponse(google.protobuf.message.Message):
"""GetNut05QuoteResponse contains the requested NUT-05 quote."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
QUOTE_FIELD_NUMBER: builtins.int
@property
def quote(self) -> global___Nut05Quote: ...
def quote(self) -> global___Nut05Quote:
"""The NUT-05 quote object."""
def __init__(
self,
*,
@@ -561,12 +741,16 @@ global___GetNut05QuoteResponse = GetNut05QuoteResponse
@typing.final
class UpdateQuoteRequest(google.protobuf.message.Message):
"""UpdateQuoteRequest is used to update the state of a minting or melting quote."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
QUOTE_ID_FIELD_NUMBER: builtins.int
STATE_FIELD_NUMBER: builtins.int
quote_id: builtins.str
"""The ID of the quote to update."""
state: builtins.str
"""The new state for the quote (e.g., "paid", "expired", "success", "failed")."""
def __init__(
self,
*,
@@ -579,14 +763,19 @@ global___UpdateQuoteRequest = UpdateQuoteRequest
@typing.final
class RotateNextKeysetRequest(google.protobuf.message.Message):
"""RotateNextKeysetRequest is used to initiate a keyset rotation."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
UNIT_FIELD_NUMBER: builtins.int
MAX_ORDER_FIELD_NUMBER: builtins.int
INPUT_FEE_PPK_FIELD_NUMBER: builtins.int
unit: builtins.str
"""The unit for which to rotate the keyset (e.g., "sat")."""
max_order: builtins.int
"""Optional: The maximum order of the new keyset."""
input_fee_ppk: builtins.int
"""Optional: The input fee per kilobyte for the new keyset."""
def __init__(
self,
*,
@@ -605,6 +794,8 @@ global___RotateNextKeysetRequest = RotateNextKeysetRequest
@typing.final
class RotateNextKeysetResponse(google.protobuf.message.Message):
"""RotateNextKeysetResponse contains information about the newly rotated keyset."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
ID_FIELD_NUMBER: builtins.int
@@ -612,9 +803,13 @@ class RotateNextKeysetResponse(google.protobuf.message.Message):
MAX_ORDER_FIELD_NUMBER: builtins.int
INPUT_FEE_PPK_FIELD_NUMBER: builtins.int
id: builtins.str
"""The ID of the new keyset."""
unit: builtins.str
"""The unit of the new keyset."""
max_order: builtins.int
"""The maximum order of the new keyset."""
input_fee_ppk: builtins.int
"""The input fee per kilobyte for the new keyset."""
def __init__(
self,
*,
@@ -629,12 +824,16 @@ global___RotateNextKeysetResponse = RotateNextKeysetResponse
@typing.final
class UpdateLightningFeeRequest(google.protobuf.message.Message):
"""UpdateLightningFeeRequest is used to update the lightning network fee configuration."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
FEE_PERCENT_FIELD_NUMBER: builtins.int
FEE_MIN_RESERVE_FIELD_NUMBER: builtins.int
fee_percent: builtins.float
"""Optional: The percentage of the fee."""
fee_min_reserve: builtins.int
"""Optional: The minimum reserve amount for the fee."""
def __init__(
self,
*,
@@ -652,12 +851,16 @@ global___UpdateLightningFeeRequest = UpdateLightningFeeRequest
@typing.final
class UpdateAuthLimitsRequest(google.protobuf.message.Message):
"""UpdateAuthLimitsRequest is used to update authentication rate limits."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
AUTH_RATE_LIMIT_PER_MINUTE_FIELD_NUMBER: builtins.int
AUTH_MAX_BLIND_TOKENS_FIELD_NUMBER: builtins.int
auth_rate_limit_per_minute: builtins.int
"""Optional: The maximum number of authentication requests allowed per minute."""
auth_max_blind_tokens: builtins.int
"""Optional: The maximum number of blind tokens allowed for authentication."""
def __init__(
self,
*,

View File

@@ -26,7 +26,10 @@ if _version_not_supported:
class MintStub(object):
"""Missing associated documentation comment in .proto file."""
"""The Mint service provides a gRPC interface for managing a Cashu mint.
It allows for updating mint information, managing payment methods (NUT-04 and NUT-05),
handling quotes, rotating keysets, and configuring fees and authentication limits.
"""
def __init__(self, channel):
"""Constructor.
@@ -35,226 +38,249 @@ class MintStub(object):
channel: A grpc.Channel.
"""
self.GetInfo = channel.unary_unary(
'/management.Mint/GetInfo',
'/cashu.Mint/GetInfo',
request_serializer=management__pb2.GetInfoRequest.SerializeToString,
response_deserializer=management__pb2.GetInfoResponse.FromString,
_registered_method=True)
self.UpdateMotd = channel.unary_unary(
'/management.Mint/UpdateMotd',
'/cashu.Mint/UpdateMotd',
request_serializer=management__pb2.UpdateMotdRequest.SerializeToString,
response_deserializer=management__pb2.UpdateResponse.FromString,
_registered_method=True)
self.UpdateShortDescription = channel.unary_unary(
'/management.Mint/UpdateShortDescription',
'/cashu.Mint/UpdateShortDescription',
request_serializer=management__pb2.UpdateDescriptionRequest.SerializeToString,
response_deserializer=management__pb2.UpdateResponse.FromString,
_registered_method=True)
self.UpdateLongDescription = channel.unary_unary(
'/management.Mint/UpdateLongDescription',
'/cashu.Mint/UpdateLongDescription',
request_serializer=management__pb2.UpdateDescriptionRequest.SerializeToString,
response_deserializer=management__pb2.UpdateResponse.FromString,
_registered_method=True)
self.UpdateIconUrl = channel.unary_unary(
'/management.Mint/UpdateIconUrl',
'/cashu.Mint/UpdateIconUrl',
request_serializer=management__pb2.UpdateIconUrlRequest.SerializeToString,
response_deserializer=management__pb2.UpdateResponse.FromString,
_registered_method=True)
self.UpdateName = channel.unary_unary(
'/management.Mint/UpdateName',
'/cashu.Mint/UpdateName',
request_serializer=management__pb2.UpdateNameRequest.SerializeToString,
response_deserializer=management__pb2.UpdateResponse.FromString,
_registered_method=True)
self.AddUrl = channel.unary_unary(
'/management.Mint/AddUrl',
'/cashu.Mint/AddUrl',
request_serializer=management__pb2.UpdateUrlRequest.SerializeToString,
response_deserializer=management__pb2.UpdateResponse.FromString,
_registered_method=True)
self.RemoveUrl = channel.unary_unary(
'/management.Mint/RemoveUrl',
'/cashu.Mint/RemoveUrl',
request_serializer=management__pb2.UpdateUrlRequest.SerializeToString,
response_deserializer=management__pb2.UpdateResponse.FromString,
_registered_method=True)
self.AddContact = channel.unary_unary(
'/management.Mint/AddContact',
'/cashu.Mint/AddContact',
request_serializer=management__pb2.UpdateContactRequest.SerializeToString,
response_deserializer=management__pb2.UpdateResponse.FromString,
_registered_method=True)
self.RemoveContact = channel.unary_unary(
'/management.Mint/RemoveContact',
'/cashu.Mint/RemoveContact',
request_serializer=management__pb2.UpdateContactRequest.SerializeToString,
response_deserializer=management__pb2.UpdateResponse.FromString,
_registered_method=True)
self.GetNut04Quote = channel.unary_unary(
'/management.Mint/GetNut04Quote',
'/cashu.Mint/GetNut04Quote',
request_serializer=management__pb2.GetNut04QuoteRequest.SerializeToString,
response_deserializer=management__pb2.GetNut04QuoteResponse.FromString,
_registered_method=True)
self.GetNut05Quote = channel.unary_unary(
'/management.Mint/GetNut05Quote',
'/cashu.Mint/GetNut05Quote',
request_serializer=management__pb2.GetNut05QuoteRequest.SerializeToString,
response_deserializer=management__pb2.GetNut05QuoteResponse.FromString,
_registered_method=True)
self.UpdateNut04 = channel.unary_unary(
'/management.Mint/UpdateNut04',
'/cashu.Mint/UpdateNut04',
request_serializer=management__pb2.UpdateNut04Request.SerializeToString,
response_deserializer=management__pb2.UpdateResponse.FromString,
_registered_method=True)
self.UpdateNut05 = channel.unary_unary(
'/management.Mint/UpdateNut05',
'/cashu.Mint/UpdateNut05',
request_serializer=management__pb2.UpdateNut05Request.SerializeToString,
response_deserializer=management__pb2.UpdateResponse.FromString,
_registered_method=True)
self.UpdateQuoteTtl = channel.unary_unary(
'/management.Mint/UpdateQuoteTtl',
'/cashu.Mint/UpdateQuoteTtl',
request_serializer=management__pb2.UpdateQuoteTtlRequest.SerializeToString,
response_deserializer=management__pb2.UpdateResponse.FromString,
_registered_method=True)
self.UpdateNut04Quote = channel.unary_unary(
'/management.Mint/UpdateNut04Quote',
'/cashu.Mint/UpdateNut04Quote',
request_serializer=management__pb2.UpdateQuoteRequest.SerializeToString,
response_deserializer=management__pb2.UpdateResponse.FromString,
_registered_method=True)
self.UpdateNut05Quote = channel.unary_unary(
'/management.Mint/UpdateNut05Quote',
'/cashu.Mint/UpdateNut05Quote',
request_serializer=management__pb2.UpdateQuoteRequest.SerializeToString,
response_deserializer=management__pb2.UpdateResponse.FromString,
_registered_method=True)
self.RotateNextKeyset = channel.unary_unary(
'/management.Mint/RotateNextKeyset',
'/cashu.Mint/RotateNextKeyset',
request_serializer=management__pb2.RotateNextKeysetRequest.SerializeToString,
response_deserializer=management__pb2.RotateNextKeysetResponse.FromString,
_registered_method=True)
self.UpdateLightningFee = channel.unary_unary(
'/management.Mint/UpdateLightningFee',
'/cashu.Mint/UpdateLightningFee',
request_serializer=management__pb2.UpdateLightningFeeRequest.SerializeToString,
response_deserializer=management__pb2.UpdateResponse.FromString,
_registered_method=True)
self.UpdateAuthLimits = channel.unary_unary(
'/management.Mint/UpdateAuthLimits',
'/cashu.Mint/UpdateAuthLimits',
request_serializer=management__pb2.UpdateAuthLimitsRequest.SerializeToString,
response_deserializer=management__pb2.UpdateResponse.FromString,
_registered_method=True)
class MintServicer(object):
"""Missing associated documentation comment in .proto file."""
"""The Mint service provides a gRPC interface for managing a Cashu mint.
It allows for updating mint information, managing payment methods (NUT-04 and NUT-05),
handling quotes, rotating keysets, and configuring fees and authentication limits.
"""
def GetInfo(self, request, context):
"""Missing associated documentation comment in .proto file."""
"""GetInfo retrieves general information about the mint.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpdateMotd(self, request, context):
"""Missing associated documentation comment in .proto file."""
"""UpdateMotd updates the Message of the Day (MOTD) for the mint.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpdateShortDescription(self, request, context):
"""Missing associated documentation comment in .proto file."""
"""UpdateShortDescription updates the short description of the mint.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpdateLongDescription(self, request, context):
"""Missing associated documentation comment in .proto file."""
"""UpdateLongDescription updates the long description of the mint.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpdateIconUrl(self, request, context):
"""Missing associated documentation comment in .proto file."""
"""UpdateIconUrl updates the URL for the mint's icon.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpdateName(self, request, context):
"""Missing associated documentation comment in .proto file."""
"""UpdateName updates the name of the mint.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def AddUrl(self, request, context):
"""Missing associated documentation comment in .proto file."""
"""AddUrl adds a new URL associated with the mint.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def RemoveUrl(self, request, context):
"""Missing associated documentation comment in .proto file."""
"""RemoveUrl removes an existing URL associated with the mint.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def AddContact(self, request, context):
"""Missing associated documentation comment in .proto file."""
"""AddContact adds a new contact method for the mint.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def RemoveContact(self, request, context):
"""Missing associated documentation comment in .proto file."""
"""RemoveContact removes an existing contact method for the mint.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetNut04Quote(self, request, context):
"""Missing associated documentation comment in .proto file."""
"""GetNut04Quote retrieves a specific NUT-04 (minting) quote by its ID.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetNut05Quote(self, request, context):
"""Missing associated documentation comment in .proto file."""
"""GetNut05Quote retrieves a specific NUT-05 (melting) quote by its ID.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpdateNut04(self, request, context):
"""Missing associated documentation comment in .proto file."""
"""UpdateNut04 configures a NUT-04 (minting) payment method.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpdateNut05(self, request, context):
"""Missing associated documentation comment in .proto file."""
"""UpdateNut05 configures a NUT-05 (melting) payment method.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpdateQuoteTtl(self, request, context):
"""Missing associated documentation comment in .proto file."""
"""UpdateQuoteTtl updates the Time-To-Live (TTL) for minting and melting quotes.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpdateNut04Quote(self, request, context):
"""Missing associated documentation comment in .proto file."""
"""UpdateNut04Quote updates the state of a specific NUT-04 (minting) quote.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpdateNut05Quote(self, request, context):
"""Missing associated documentation comment in .proto file."""
"""UpdateNut05Quote updates the state of a specific NUT-05 (melting) quote.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def RotateNextKeyset(self, request, context):
"""Missing associated documentation comment in .proto file."""
"""RotateNextKeyset initiates the rotation to a new keyset for a given unit.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpdateLightningFee(self, request, context):
"""Missing associated documentation comment in .proto file."""
"""UpdateLightningFee updates the lightning network fee configuration for the mint.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpdateAuthLimits(self, request, context):
"""Missing associated documentation comment in .proto file."""
"""UpdateAuthLimits updates the authentication rate limits for the mint.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
@@ -364,14 +390,17 @@ def add_MintServicer_to_server(servicer, server):
),
}
generic_handler = grpc.method_handlers_generic_handler(
'management.Mint', rpc_method_handlers)
'cashu.Mint', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
server.add_registered_method_handlers('management.Mint', rpc_method_handlers)
server.add_registered_method_handlers('cashu.Mint', rpc_method_handlers)
# This class is part of an EXPERIMENTAL API.
class Mint(object):
"""Missing associated documentation comment in .proto file."""
"""The Mint service provides a gRPC interface for managing a Cashu mint.
It allows for updating mint information, managing payment methods (NUT-04 and NUT-05),
handling quotes, rotating keysets, and configuring fees and authentication limits.
"""
@staticmethod
def GetInfo(request,
@@ -387,7 +416,7 @@ class Mint(object):
return grpc.experimental.unary_unary(
request,
target,
'/management.Mint/GetInfo',
'/cashu.Mint/GetInfo',
management__pb2.GetInfoRequest.SerializeToString,
management__pb2.GetInfoResponse.FromString,
options,
@@ -414,7 +443,7 @@ class Mint(object):
return grpc.experimental.unary_unary(
request,
target,
'/management.Mint/UpdateMotd',
'/cashu.Mint/UpdateMotd',
management__pb2.UpdateMotdRequest.SerializeToString,
management__pb2.UpdateResponse.FromString,
options,
@@ -441,7 +470,7 @@ class Mint(object):
return grpc.experimental.unary_unary(
request,
target,
'/management.Mint/UpdateShortDescription',
'/cashu.Mint/UpdateShortDescription',
management__pb2.UpdateDescriptionRequest.SerializeToString,
management__pb2.UpdateResponse.FromString,
options,
@@ -468,7 +497,7 @@ class Mint(object):
return grpc.experimental.unary_unary(
request,
target,
'/management.Mint/UpdateLongDescription',
'/cashu.Mint/UpdateLongDescription',
management__pb2.UpdateDescriptionRequest.SerializeToString,
management__pb2.UpdateResponse.FromString,
options,
@@ -495,7 +524,7 @@ class Mint(object):
return grpc.experimental.unary_unary(
request,
target,
'/management.Mint/UpdateIconUrl',
'/cashu.Mint/UpdateIconUrl',
management__pb2.UpdateIconUrlRequest.SerializeToString,
management__pb2.UpdateResponse.FromString,
options,
@@ -522,7 +551,7 @@ class Mint(object):
return grpc.experimental.unary_unary(
request,
target,
'/management.Mint/UpdateName',
'/cashu.Mint/UpdateName',
management__pb2.UpdateNameRequest.SerializeToString,
management__pb2.UpdateResponse.FromString,
options,
@@ -549,7 +578,7 @@ class Mint(object):
return grpc.experimental.unary_unary(
request,
target,
'/management.Mint/AddUrl',
'/cashu.Mint/AddUrl',
management__pb2.UpdateUrlRequest.SerializeToString,
management__pb2.UpdateResponse.FromString,
options,
@@ -576,7 +605,7 @@ class Mint(object):
return grpc.experimental.unary_unary(
request,
target,
'/management.Mint/RemoveUrl',
'/cashu.Mint/RemoveUrl',
management__pb2.UpdateUrlRequest.SerializeToString,
management__pb2.UpdateResponse.FromString,
options,
@@ -603,7 +632,7 @@ class Mint(object):
return grpc.experimental.unary_unary(
request,
target,
'/management.Mint/AddContact',
'/cashu.Mint/AddContact',
management__pb2.UpdateContactRequest.SerializeToString,
management__pb2.UpdateResponse.FromString,
options,
@@ -630,7 +659,7 @@ class Mint(object):
return grpc.experimental.unary_unary(
request,
target,
'/management.Mint/RemoveContact',
'/cashu.Mint/RemoveContact',
management__pb2.UpdateContactRequest.SerializeToString,
management__pb2.UpdateResponse.FromString,
options,
@@ -657,7 +686,7 @@ class Mint(object):
return grpc.experimental.unary_unary(
request,
target,
'/management.Mint/GetNut04Quote',
'/cashu.Mint/GetNut04Quote',
management__pb2.GetNut04QuoteRequest.SerializeToString,
management__pb2.GetNut04QuoteResponse.FromString,
options,
@@ -684,7 +713,7 @@ class Mint(object):
return grpc.experimental.unary_unary(
request,
target,
'/management.Mint/GetNut05Quote',
'/cashu.Mint/GetNut05Quote',
management__pb2.GetNut05QuoteRequest.SerializeToString,
management__pb2.GetNut05QuoteResponse.FromString,
options,
@@ -711,7 +740,7 @@ class Mint(object):
return grpc.experimental.unary_unary(
request,
target,
'/management.Mint/UpdateNut04',
'/cashu.Mint/UpdateNut04',
management__pb2.UpdateNut04Request.SerializeToString,
management__pb2.UpdateResponse.FromString,
options,
@@ -738,7 +767,7 @@ class Mint(object):
return grpc.experimental.unary_unary(
request,
target,
'/management.Mint/UpdateNut05',
'/cashu.Mint/UpdateNut05',
management__pb2.UpdateNut05Request.SerializeToString,
management__pb2.UpdateResponse.FromString,
options,
@@ -765,7 +794,7 @@ class Mint(object):
return grpc.experimental.unary_unary(
request,
target,
'/management.Mint/UpdateQuoteTtl',
'/cashu.Mint/UpdateQuoteTtl',
management__pb2.UpdateQuoteTtlRequest.SerializeToString,
management__pb2.UpdateResponse.FromString,
options,
@@ -792,7 +821,7 @@ class Mint(object):
return grpc.experimental.unary_unary(
request,
target,
'/management.Mint/UpdateNut04Quote',
'/cashu.Mint/UpdateNut04Quote',
management__pb2.UpdateQuoteRequest.SerializeToString,
management__pb2.UpdateResponse.FromString,
options,
@@ -819,7 +848,7 @@ class Mint(object):
return grpc.experimental.unary_unary(
request,
target,
'/management.Mint/UpdateNut05Quote',
'/cashu.Mint/UpdateNut05Quote',
management__pb2.UpdateQuoteRequest.SerializeToString,
management__pb2.UpdateResponse.FromString,
options,
@@ -846,7 +875,7 @@ class Mint(object):
return grpc.experimental.unary_unary(
request,
target,
'/management.Mint/RotateNextKeyset',
'/cashu.Mint/RotateNextKeyset',
management__pb2.RotateNextKeysetRequest.SerializeToString,
management__pb2.RotateNextKeysetResponse.FromString,
options,
@@ -873,7 +902,7 @@ class Mint(object):
return grpc.experimental.unary_unary(
request,
target,
'/management.Mint/UpdateLightningFee',
'/cashu.Mint/UpdateLightningFee',
management__pb2.UpdateLightningFeeRequest.SerializeToString,
management__pb2.UpdateResponse.FromString,
options,
@@ -900,7 +929,7 @@ class Mint(object):
return grpc.experimental.unary_unary(
request,
target,
'/management.Mint/UpdateAuthLimits',
'/cashu.Mint/UpdateAuthLimits',
management__pb2.UpdateAuthLimitsRequest.SerializeToString,
management__pb2.UpdateResponse.FromString,
options,