123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- syntax = "proto3";
- package signatory;
- service Signatory {
- /// Sign messages
- rpc BlindSign (BlindedMessages) returns (BlindSignResponse);
- /// VerifyProofs
- rpc VerifyProofs (Proofs) returns (BooleanResponse);
- /// Returns all the keysets for the mint, active and non actives.
- /// This requests will include keysets for all CurrencyUnit, Auth.
- rpc Keysets (EmptyRequest) returns (KeysResponse);
- /// Rotates the keyset for the mint
- rpc RotateKeyset (RotationRequest) returns (KeyRotationResponse);
- }
- message BlindSignResponse {
- oneof result {
- BlindSignatures sigs = 1;
- Error error = 2;
- }
- }
- message BlindedMessages {
- repeated BlindedMessage blinded_messages = 1;
- }
- // Represents a blinded message
- message BlindedMessage {
- uint64 amount = 1;
- string keyset_id = 2;
- bytes blinded_secret = 3;
- }
- message BooleanResponse {
- oneof result {
- bool success = 1;
- Error error = 2;
- }
- }
- message KeyRotationResponse {
- oneof result {
- KeySet keyset = 1;
- Error error = 2;
- }
- }
- message KeysResponse {
- oneof result {
- SignatoryKeysets keysets = 1;
- Error error = 2;
- }
- }
- message SignatoryKeysets {
- bytes pubkey = 1;
- repeated KeySet keysets = 2;
- }
- message KeySet {
- string id = 1;
- CurrencyUnit unit = 2;
- bool active = 3;
- uint64 input_fee_ppk = 4;
- Keys keys = 5;
- }
- message Keys {
- map<uint64, bytes> keys = 1;
- }
- message RotationRequest {
- CurrencyUnit unit = 1;
- uint32 input_fee_ppk = 2;
- uint32 max_order = 3;
- }
- enum CurrencyUnitType {
- SAT = 0;
- MSAT = 1;
- USD = 2;
- EUR = 3;
- AUTH = 4;
- }
- message CurrencyUnit {
- oneof currency_unit {
- CurrencyUnitType unit = 1;
- string custom_unit = 2;
- }
- }
- message Proofs {
- repeated Proof proof = 1;
- }
- message Proof {
- uint64 amount = 1;
- string keyset_id = 2;
- bytes secret = 3;
- bytes C = 4;
- optional Witness witness = 5;
- }
- message ProofDLEQ {
- bytes e = 1;
- bytes s = 2;
- bytes r = 3;
- }
- message SigningResponse {
- oneof result {
- BlindSignatures blind_signatures = 1;
- Error error = 2;
- }
- }
- message BlindSignatures {
- repeated BlindSignature blind_signatures = 1;
- }
- message BlindSignature {
- uint64 amount = 1;
- string keyset_id = 2;
- bytes blinded_secret = 3;
- optional BlindSignatureDLEQ dleq = 4;
- }
- message BlindSignatureDLEQ {
- bytes e = 1;
- bytes s = 2;
- }
- // Witness type
- message Witness {
- oneof witness_type {
- P2PKWitness p2pk_witness = 1;
- HTLCWitness htlc_witness = 2;
- }
- }
- // P2PKWitness type
- message P2PKWitness {
- // List of signatures
- repeated string signatures = 1;
- }
- // HTLCWitness type
- message HTLCWitness {
- // Preimage
- string preimage = 1;
- // List of signatures
- repeated string signatures = 2;
- }
- enum ErrorCode {
- UNKNOWN = 0;
- AMOUNT_OUTSIDE_LIMIT = 1;
- DUPLICATE_INPUTS_PROVIDED = 2;
- DUPLICATE_OUTPUTS_PROVIDED = 3;
- KEYSET_NOT_KNOWN = 4;
- KEYSET_INACTIVE = 5;
- MINTING_DISABLED = 6;
- COULD_NOT_ROTATE_KEYSET = 7;
- INVALID_PROOF = 8;
- INVALID_BLIND_MESSAGE = 9;
- UNIT_NOT_SUPPORTED = 10;
- }
- message Error {
- ErrorCode code = 1;
- string detail = 2;
- }
- message EmptyRequest {}
|