add libtool_version.ml
This commit is contained in:
parent
f56ef6b544
commit
4784f32df5
4 changed files with 64 additions and 11 deletions
16
src/api.ml
16
src/api.ml
|
|
@ -8,8 +8,6 @@
|
|||
- payto_uri
|
||||
- uri *)
|
||||
|
||||
let protocol_version = "31:0:0"
|
||||
|
||||
open Time
|
||||
open Crypto
|
||||
open Signatures
|
||||
|
|
@ -206,7 +204,7 @@ end
|
|||
|
||||
module ExchangeVersionResponse = struct
|
||||
type t = {
|
||||
version: string;
|
||||
version: Libtool_version.t;
|
||||
(* todo jsont const string
|
||||
`name: "taler-exchange"` *)
|
||||
name: string;
|
||||
|
|
@ -241,7 +239,7 @@ module ExchangeVersionResponse = struct
|
|||
let currency_specification v = v.currency_specification in
|
||||
let aml_spa_dialect v = v.aml_spa_dialect in
|
||||
map ~kind:"ExchangeVersionResponse" make
|
||||
|> mem "version" Jsont.string ~enc:version
|
||||
|> mem "version" Libtool_version.jsont ~enc:version
|
||||
|> mem "name" Jsont.string ~enc:name
|
||||
|> mem "implementation" (Jsont.option Jsont.string) ~enc:implementation
|
||||
|> mem "currency" Jsont.string ~enc:currency
|
||||
|
|
@ -273,7 +271,7 @@ let currency_specification =
|
|||
let config =
|
||||
ExchangeVersionResponse.
|
||||
{
|
||||
version= protocol_version;
|
||||
version= Libtool_version.mte_protocol_version;
|
||||
name= "taler-exchange";
|
||||
currency= Config.currency;
|
||||
currency_specification;
|
||||
|
|
@ -1230,7 +1228,7 @@ end
|
|||
module ExtensionManifest = struct
|
||||
type t = {
|
||||
critical: bool;
|
||||
version: string;
|
||||
version: Libtool_version.t;
|
||||
config: Jsont.json option;
|
||||
}
|
||||
|
||||
|
|
@ -1241,7 +1239,7 @@ module ExtensionManifest = struct
|
|||
let config v = v.config in
|
||||
map ~kind:"ExtensionManifest" make
|
||||
|> mem "critical" Jsont.bool ~enc:critical
|
||||
|> mem "version" Jsont.string ~enc:version
|
||||
|> mem "version" Libtool_version.jsont ~enc:version
|
||||
|> opt_mem "config" (Jsont.any ()) ~enc:config
|
||||
|> finish
|
||||
end
|
||||
|
|
@ -1250,7 +1248,7 @@ module ExchangeKeysResponse = struct
|
|||
module String_map = Map.Make (String)
|
||||
|
||||
type t = {
|
||||
version: string;
|
||||
version: Libtool_version.t;
|
||||
base_url: string;
|
||||
currency: string;
|
||||
shopping_url: string option;
|
||||
|
|
@ -1366,7 +1364,7 @@ module ExchangeKeysResponse = struct
|
|||
let extensions v = v.extensions in
|
||||
let extensions_sig v = v.extensions_sig in
|
||||
map ~kind:"ExchangeKeysResponse" make
|
||||
|> mem "version" Jsont.string ~enc:version
|
||||
|> mem "version" Libtool_version.jsont ~enc:version
|
||||
|> mem "base_url" Jsont.string ~enc:base_url
|
||||
|> mem "currency" Jsont.string ~enc:currency
|
||||
|> opt_mem "shopping_url" Jsont.string ~enc:shopping_url
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue