This commit is contained in:
parent
49352fa7ca
commit
94d9b9bbd7
2 changed files with 303 additions and 22 deletions
|
|
@ -57,7 +57,14 @@ type purpose = {
|
||||||
comment: string;
|
comment: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
let f records =
|
let read_file file = In_channel.with_open_bin file In_channel.input_all
|
||||||
|
|
||||||
|
let () =
|
||||||
|
let content = read_file "registry.rec" in
|
||||||
|
match parse content with
|
||||||
|
| Error msg -> Fmt.failwith "Parse error: %s" msg
|
||||||
|
| Ok records ->
|
||||||
|
let purposes =
|
||||||
records
|
records
|
||||||
|> List.filter_map (fun l ->
|
|> List.filter_map (fun l ->
|
||||||
match l with
|
match l with
|
||||||
|
|
@ -68,27 +75,21 @@ let f records =
|
||||||
Some
|
Some
|
||||||
{
|
{
|
||||||
number= Int32.of_int (int_of_string a.v);
|
number= Int32.of_int (int_of_string a.v);
|
||||||
name= b.v;
|
name= String.lowercase_ascii b.v;
|
||||||
comment= c.v;
|
comment= c.v;
|
||||||
})
|
})
|
||||||
| _ -> None)
|
| _ -> None)
|
||||||
|>
|
|> List.filter (fun v -> v.number >= 1000_l)
|
||||||
(*GNU Taler, >= 1000*)
|
in
|
||||||
List.filter (fun v -> v.number >= 1000_l)
|
|
||||||
|
|
||||||
let read_file file = In_channel.with_open_bin file In_channel.input_all
|
let header =
|
||||||
let file_header = {|...|}
|
{|(* This file was generated from the GANA database:
|
||||||
|
https://git-www.gnunet.org/gana.git/tree/gnunet-signatures/registry.rec *)|}
|
||||||
let () =
|
in
|
||||||
let content = read_file "registry.rec" in
|
|
||||||
match parse content with
|
|
||||||
| Error msg -> Fmt.failwith "Parse error: %s" msg
|
|
||||||
| Ok records ->
|
|
||||||
let purposes = f records in
|
|
||||||
|
|
||||||
let pp_purpose ppf { number; name; comment } =
|
let pp_purpose ppf { number; name; comment } =
|
||||||
Fmt.pf ppf "(** %s *)\nlet %s : int32 = %ld\n\n" comment name number
|
Fmt.pf ppf "(** %s *)\nlet %s : int32 = %ld\n\n" comment name number
|
||||||
in
|
in
|
||||||
|
|
||||||
Fmt.pr "%a@." (Fmt.list ~sep:Fmt.nop pp_purpose) purposes;
|
Fmt.pr "%s\n\n%a@." header (Fmt.list ~sep:Fmt.nop pp_purpose) purposes;
|
||||||
()
|
()
|
||||||
|
|
|
||||||
280
uhuh.ml
Normal file
280
uhuh.ml
Normal file
|
|
@ -0,0 +1,280 @@
|
||||||
|
(* This file was generated from the GANA database:
|
||||||
|
https://git-www.gnunet.org/gana.git/tree/gnunet-signatures/registry.rec *)
|
||||||
|
|
||||||
|
(** Initialize or update the status of an AML key for an AML officer *)
|
||||||
|
let MASTER_AML_KEY : int32 = 1017
|
||||||
|
|
||||||
|
(** Affirm wiring of exchange profits to operator account. *)
|
||||||
|
let MASTER_DRAIN_PROFIT : int32 = 1018
|
||||||
|
|
||||||
|
(** Signature affirming a partner configuration for wads. *)
|
||||||
|
let MASTER_PARTNER_DETAILS : int32 = 1019
|
||||||
|
|
||||||
|
(** The given revocation key was revoked and must no longer be used. *)
|
||||||
|
let MASTER_SIGNING_KEY_REVOKED : int32 = 1020
|
||||||
|
|
||||||
|
(** Add payto URI to the list of our wire methods. *)
|
||||||
|
let MASTER_ADD_WIRE : int32 = 1021
|
||||||
|
|
||||||
|
(** Signature over global set of fees charged by the exchange. *)
|
||||||
|
let MASTER_GLOBAL_FEES : int32 = 1022
|
||||||
|
|
||||||
|
(** Remove payto URI from the list of our wire methods. *)
|
||||||
|
let MASTER_DEL_WIRE : int32 = 1023
|
||||||
|
|
||||||
|
(** Purpose for signing public keys signed by the exchange master key. *)
|
||||||
|
let MASTER_SIGNING_KEY_VALIDITY : int32 = 1024
|
||||||
|
|
||||||
|
(** Purpose for denomination keys signed by the exchange master key. *)
|
||||||
|
let MASTER_DENOMINATION_KEY_VALIDITY : int32 = 1025
|
||||||
|
|
||||||
|
(** Add an auditor to the list of our auditors. *)
|
||||||
|
let MASTER_ADD_AUDITOR : int32 = 1026
|
||||||
|
|
||||||
|
(** Remove an auditor from the list of our auditors. *)
|
||||||
|
let MASTER_DEL_AUDITOR : int32 = 1027
|
||||||
|
|
||||||
|
(** Fees charged per (aggregate) wire transfer to the merchant. *)
|
||||||
|
let MASTER_WIRE_FEES : int32 = 1028
|
||||||
|
|
||||||
|
(** The given revocation key was revoked and must no longer be used. *)
|
||||||
|
let MASTER_DENOMINATION_KEY_REVOKED : int32 = 1029
|
||||||
|
|
||||||
|
(** Signature where the Exchange confirms its IBAN details in the /wire
|
||||||
|
response. *)
|
||||||
|
let MASTER_WIRE_DETAILS : int32 = 1030
|
||||||
|
|
||||||
|
(** Set the configuration of an extension (age-restriction or peer2peer) *)
|
||||||
|
let MASTER_EXTENSION : int32 = 1031
|
||||||
|
|
||||||
|
(** Purpose for the state of a reserve, signed by the exchange's signing key. *)
|
||||||
|
let EXCHANGE_RESERVE_STATUS : int32 = 1032
|
||||||
|
|
||||||
|
(** Signature where the Exchange confirms a deposit request. *)
|
||||||
|
let EXCHANGE_CONFIRM_DEPOSIT : int32 = 1033
|
||||||
|
|
||||||
|
(** Signature where the exchange (current signing key) confirms the no-reveal
|
||||||
|
index for cut-and-choose and the validity of the melted coins. *)
|
||||||
|
let EXCHANGE_CONFIRM_MELT : int32 = 1034
|
||||||
|
|
||||||
|
(** Signature where the Exchange confirms the full /keys response set. *)
|
||||||
|
let EXCHANGE_KEY_SET : int32 = 1035
|
||||||
|
|
||||||
|
(** Signature where the Exchange confirms the /track/transaction response. *)
|
||||||
|
let EXCHANGE_CONFIRM_WIRE : int32 = 1036
|
||||||
|
|
||||||
|
(** Signature where the Exchange confirms the /wire/deposit response. *)
|
||||||
|
let EXCHANGE_CONFIRM_WIRE_DEPOSIT : int32 = 1037
|
||||||
|
|
||||||
|
(** Signature where the Exchange confirms a refund request. *)
|
||||||
|
let EXCHANGE_CONFIRM_REFUND : int32 = 1038
|
||||||
|
|
||||||
|
(** Signature where the Exchange confirms a recoup. *)
|
||||||
|
let EXCHANGE_CONFIRM_RECOUP : int32 = 1039
|
||||||
|
|
||||||
|
(** Signature where the Exchange confirms it closed a reserve. *)
|
||||||
|
let EXCHANGE_RESERVE_CLOSED : int32 = 1040
|
||||||
|
|
||||||
|
(** Signature where the Exchange confirms a recoup-refresh operation. *)
|
||||||
|
let EXCHANGE_CONFIRM_RECOUP_REFRESH : int32 = 1041
|
||||||
|
|
||||||
|
(** Signature where the Exchange confirms that it does not know a denomination
|
||||||
|
(hash). *)
|
||||||
|
let EXCHANGE_AFFIRM_DENOM_UNKNOWN : int32 = 1042
|
||||||
|
|
||||||
|
(** Signature where the Exchange confirms that it does not consider a
|
||||||
|
denomination valid for the given operation at this time. *)
|
||||||
|
let EXCHANGE_AFFIRM_DENOM_EXPIRED : int32 = 1043
|
||||||
|
|
||||||
|
(** Signature by which the exchange affirms that a purse was created with a
|
||||||
|
certain amount deposited into it. *)
|
||||||
|
let EXCHANGE_CONFIRM_PURSE_CREATION : int32 = 1045
|
||||||
|
|
||||||
|
(** Signature by which the exchange affirms that a purse was merged into a
|
||||||
|
reserve with a certain amount in it. *)
|
||||||
|
let EXCHANGE_CONFIRM_PURSE_MERGED : int32 = 1046
|
||||||
|
|
||||||
|
(** Purpose for the state of a purse, signed by the exchange's signing key. *)
|
||||||
|
let EXCHANGE_PURSE_STATUS : int32 = 1047
|
||||||
|
|
||||||
|
(** Signature by which the exchange attests identity attributes of a particular
|
||||||
|
reserve owner. *)
|
||||||
|
let EXCHANGE_RESERVE_ATTEST_DETAILS : int32 = 1048
|
||||||
|
|
||||||
|
(** Signature by which the exchange confirms that a purse expired and a coin was
|
||||||
|
refunded. *)
|
||||||
|
let EXCHANGE_CONFIRM_PURSE_REFUND : int32 = 1049
|
||||||
|
|
||||||
|
(** Signature where the Exchange confirms an (age-)withdraw. *)
|
||||||
|
let EXCHANGE_CONFIRM_WITHDRAW : int32 = 1050
|
||||||
|
|
||||||
|
(** Signature where the auditor confirms that he is aware of certain
|
||||||
|
denomination keys from the exchange. *)
|
||||||
|
let AUDITOR_EXCHANGE_KEYS : int32 = 1064
|
||||||
|
|
||||||
|
(** Signature where the merchant confirms a contract (to the customer). *)
|
||||||
|
let MERCHANT_CONTRACT : int32 = 1101
|
||||||
|
|
||||||
|
(** Signature where the merchant confirms a refund (of a coin). *)
|
||||||
|
let MERCHANT_REFUND : int32 = 1102
|
||||||
|
|
||||||
|
(** Signature where the merchant confirms that he needs the wire transfer
|
||||||
|
identifier for a deposit operation. *)
|
||||||
|
let MERCHANT_TRACK_TRANSACTION : int32 = 1103
|
||||||
|
|
||||||
|
(** Signature where the merchant confirms that the payment was successful *)
|
||||||
|
let MERCHANT_PAYMENT_OK : int32 = 1104
|
||||||
|
|
||||||
|
(** Signature where the merchant confirms its own (salted) wire details (not yet
|
||||||
|
really used). *)
|
||||||
|
let MERCHANT_WIRE_DETAILS : int32 = 1107
|
||||||
|
|
||||||
|
(** Signature where the merchant issues a token by blindly signing it. Signed
|
||||||
|
with the token issue private key. *)
|
||||||
|
let MERCHANT_TOKEN_ISSUE : int32 = 1108
|
||||||
|
|
||||||
|
(** Signature where the reserve key confirms a withdraw request. Signed with the
|
||||||
|
reserve private key. *)
|
||||||
|
let WALLET_RESERVE_WITHDRAW : int32 = 1200
|
||||||
|
|
||||||
|
(** Signature made by the wallet of a user to confirm a deposit of a coin. *)
|
||||||
|
let WALLET_COIN_DEPOSIT : int32 = 1201
|
||||||
|
|
||||||
|
(** Signature using a coin key confirming the melting of a coin. Signed with the
|
||||||
|
coin's private key. *)
|
||||||
|
let WALLET_COIN_MELT : int32 = 1202
|
||||||
|
|
||||||
|
(** Signature using a coin key requesting recoup. Signed with the coin's private
|
||||||
|
key. *)
|
||||||
|
let WALLET_COIN_RECOUP : int32 = 1203
|
||||||
|
|
||||||
|
(** Signature using a coin key authenticating link data. Signed with the old
|
||||||
|
coin's private key. *)
|
||||||
|
let WALLET_COIN_LINK : int32 = 1204
|
||||||
|
|
||||||
|
(** Signature using a reserve key by which a wallet requests a payment target
|
||||||
|
UUID for itself. Signs over just a purpose (no body), as the signature only
|
||||||
|
serves to demonstrate that the request comes from the wallet controlling the
|
||||||
|
private key, and not some third party. *)
|
||||||
|
let WALLET_ACCOUNT_SETUP : int32 = 1205
|
||||||
|
|
||||||
|
(** Signature using a coin key requesting recoup-refresh. Signed with the coin
|
||||||
|
private key. *)
|
||||||
|
let WALLET_COIN_RECOUP_REFRESH : int32 = 1206
|
||||||
|
|
||||||
|
(** Signature using a age restriction key for attestation of a particular
|
||||||
|
age/age-group. *)
|
||||||
|
let WALLET_AGE_ATTESTATION : int32 = 1207
|
||||||
|
|
||||||
|
(** Request full or partial reserve history. Signed with the reserve private
|
||||||
|
key. *)
|
||||||
|
let WALLET_RESERVE_HISTORY : int32 = 1208
|
||||||
|
|
||||||
|
(** Request full or partial coin history. Signed with the coin private key. *)
|
||||||
|
let WALLET_COIN_HISTORY : int32 = 1209
|
||||||
|
|
||||||
|
(** Request purse creation (without reserve). Signed by the purse private key.
|
||||||
|
*)
|
||||||
|
let WALLET_PURSE_CREATE : int32 = 1210
|
||||||
|
|
||||||
|
(** Request coin to be deposited into a purse. Signed with the coin private key.
|
||||||
|
*)
|
||||||
|
let WALLET_PURSE_DEPOSIT : int32 = 1211
|
||||||
|
|
||||||
|
(** Request purse status. Signed with the purse private key. *)
|
||||||
|
let WALLET_PURSE_STATUS : int32 = 1212
|
||||||
|
|
||||||
|
(** Request purse to be merged with a reserve. Signed with the purse private
|
||||||
|
key. *)
|
||||||
|
let WALLET_PURSE_MERGE : int32 = 1213
|
||||||
|
|
||||||
|
(** Request purse to be merged with a reserve. Signed by the reserve private
|
||||||
|
key. *)
|
||||||
|
let WALLET_ACCOUNT_MERGE : int32 = 1214
|
||||||
|
|
||||||
|
(** Request account to be closed. Signed with the reserve private key. *)
|
||||||
|
let WALLET_RESERVE_CLOSE : int32 = 1215
|
||||||
|
|
||||||
|
(** Associates encrypted contract with a purse. Signed with the purse private
|
||||||
|
key. *)
|
||||||
|
let WALLET_PURSE_ECONTRACT : int32 = 1216
|
||||||
|
|
||||||
|
(** Request reserve to be kept open. Signed with the reserve private key. *)
|
||||||
|
let WALLET_RESERVE_OPEN : int32 = 1217
|
||||||
|
|
||||||
|
(** Request coin to be used to pay for reserve to be kept open. Signed with the
|
||||||
|
coin private key. *)
|
||||||
|
let WALLET_RESERVE_OPEN_DEPOSIT : int32 = 1218
|
||||||
|
|
||||||
|
(** Request attestation about reserve owner. Signed by the reserve private key.
|
||||||
|
*)
|
||||||
|
let WALLET_RESERVE_ATTEST_DETAILS : int32 = 1219
|
||||||
|
|
||||||
|
(** Signature by which a wallet requests a purse to be deleted. *)
|
||||||
|
let WALLET_PURSE_DELETE : int32 = 1220
|
||||||
|
|
||||||
|
(** Signature where the reserve key confirms an age-withdraw request. Signed
|
||||||
|
with the reserve private key. *)
|
||||||
|
let WALLET_RESERVE_AGE_WITHDRAW : int32 = 1221
|
||||||
|
|
||||||
|
(** Signature where the token use key confirms the usage of a token on a pay
|
||||||
|
request. Signed with the token use private key. *)
|
||||||
|
let WALLET_TOKEN_USE : int32 = 1222
|
||||||
|
|
||||||
|
(** Signature used to unclaim an order, allowing other wallets to claim it.
|
||||||
|
Signed with the private key of the claim nonce. *)
|
||||||
|
let WALLET_ORDER_UNCLAIM : int32 = 1223
|
||||||
|
|
||||||
|
(** Signature on a denomination key announcement. *)
|
||||||
|
let SM_RSA_DENOMINATION_KEY : int32 = 1250
|
||||||
|
|
||||||
|
(** Signature on an exchange message signing key announcement. *)
|
||||||
|
let SM_SIGNING_KEY : int32 = 1251
|
||||||
|
|
||||||
|
(** Signature on a denomination key announcement. *)
|
||||||
|
let SM_CS_DENOMINATION_KEY : int32 = 1252
|
||||||
|
|
||||||
|
(** EdDSA test signature. *)
|
||||||
|
let CLIENT_TEST_EDDSA : int32 = 1302
|
||||||
|
|
||||||
|
(** EdDSA test signature. *)
|
||||||
|
let EXCHANGE_TEST_EDDSA : int32 = 1303
|
||||||
|
|
||||||
|
(** Signature by which an AML officer signs an AML decision. *)
|
||||||
|
let AML_DECISION : int32 = 1350
|
||||||
|
|
||||||
|
(** Signature by which an AML officer requests AML data. *)
|
||||||
|
let AML_QUERY : int32 = 1351
|
||||||
|
|
||||||
|
(** Signature by which an account owner authorizes access to a KYC operation. *)
|
||||||
|
let KYC_AUTH : int32 = 1360
|
||||||
|
|
||||||
|
(** EdDSA signature for a policy upload. *)
|
||||||
|
let ANASTASIS_POLICY_UPLOAD : int32 = 1400
|
||||||
|
|
||||||
|
(** EdDSA signature for a backup upload. *)
|
||||||
|
let SYNC_BACKUP_UPLOAD : int32 = 1450
|
||||||
|
|
||||||
|
(** The signature is done by the Donau. The Donau signes over the total amount
|
||||||
|
of the corresponding year, the corresponding year and the donation
|
||||||
|
identifier of a specific donor. The statement confirms that the donor made
|
||||||
|
this total in donations for the given year. *)
|
||||||
|
let DONAU_DONATION_STATEMENT : int32 = 1500
|
||||||
|
|
||||||
|
(** The signature is made by a charity and shows that the charity is in
|
||||||
|
agreement with the donation request which it sends to the Donau. The charity
|
||||||
|
signs over all blinded identifiers and key pairs which it has received from
|
||||||
|
the donor. The signature affirms that the charity wants the donation
|
||||||
|
receipts to be issued on its behalf. *)
|
||||||
|
let CHARITY_DONATION_CONFIRMATION : int32 = 1501
|
||||||
|
|
||||||
|
(** The signature is made by a charity to request information about its status
|
||||||
|
from a Donau. It is not over anything in particular and is just there for
|
||||||
|
access control. *)
|
||||||
|
let CHARITY_GET_INFO : int32 = 1502
|
||||||
|
|
||||||
|
(** Signature over messages to delete in the mailbox service *)
|
||||||
|
let MAILBOX_MESSAGES_DELETE : int32 = 1551
|
||||||
|
|
||||||
|
(** Signature for mailbox registration request *)
|
||||||
|
let MAILBOX_REGISTER : int32 = 1552
|
||||||
Loading…
Add table
Add a link
Reference in a new issue