add protocol_version

This commit is contained in:
swrup 2026-02-05 21:19:57 +01:00 committed by Swrup
parent 46f7bed948
commit f63236fe74
4 changed files with 12 additions and 34 deletions

View file

@ -1,35 +1,24 @@
(* TODO
ppx?
normalized JSON-object
for signature of ExchangeKeysResponse.exetensions field
why is this one not defined by a struct?
how to handle protocol versions:
- "@deprecated" fields
- "@since protocol xx"
use of _monotonic_ time
option: correct use opt_mem or Jsont.option
better types:
- payto_uri
- uri
- uri *)
let protocol_version = "31"
number:
- number is "float", but we probably want int everywhere instead
- numeric values capped at 2^53 -1 inclusive because json *)
open Crypto
open Signatures
open Jsont.Object
module DenominationHash = Hash.DenominationHash
let encode_exn jsont v = Jsont_bytesrw.encode_string jsont v |> Result.get_ok
let encode jsont v = Jsont_bytesrw.encode_string jsont v
let decode jsont v = Jsont_bytesrw.decode_string jsont v
open Jsont.Object
module Account_operation = struct
type t =
| Withdraw