rename crockford
This commit is contained in:
parent
34b979a9bc
commit
10df5181a0
14 changed files with 80 additions and 70 deletions
11
src/api.ml
11
src/api.ml
|
|
@ -54,15 +54,16 @@ module Account_operation = struct
|
|||
|> Jsont.enum ~kind:"account operation type"
|
||||
end
|
||||
|
||||
module B32 = struct
|
||||
include B32
|
||||
module Crockford = struct
|
||||
include Crockford
|
||||
|
||||
let jsont = Jsont.of_of_string ~kind:"B32" B32.decode ~enc:B32.encode
|
||||
let jsont =
|
||||
Jsont.of_of_string ~kind:"Crockford" Crockford.decode ~enc:Crockford.encode
|
||||
|
||||
let caqti =
|
||||
Caqti_type.custom
|
||||
~encode:(fun v -> Ok (B32.encode v))
|
||||
~decode:B32.decode Caqti_type.string
|
||||
~encode:(fun v -> Ok (Crockford.encode v))
|
||||
~decode:Crockford.decode Caqti_type.string
|
||||
end
|
||||
|
||||
module ErrorDetail = struct
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue