diff --git a/graphql_schema.json b/graphql_schema.json index 30f9d87c7e2..0ffcbbffafa 100644 --- a/graphql_schema.json +++ b/graphql_schema.json @@ -674,7 +674,7 @@ }, { "name": "memo", - "description": "Short arbitrary message provided by the sender", + "description": "A short message from the sender, encoded with Base58Check, version byte=0x14; byte 2 of the decoding is the message length", "args": [], "type": { "kind": "SCALAR", @@ -786,7 +786,7 @@ }, { "name": "memo", - "description": "Short arbitrary message provided by the sender", + "description": "A short message from the sender, encoded with Base58Check, version byte=0x14; byte 2 of the decoding is the message length", "type": { "kind": "SCALAR", "name": "String", @@ -921,7 +921,7 @@ }, { "name": "memo", - "description": "Short arbitrary message provided by the sender", + "description": "A short message from the sender, encoded with Base58Check, version byte=0x14; byte 2 of the decoding is the message length", "args": [], "type": { "kind": "SCALAR", @@ -1033,7 +1033,7 @@ }, { "name": "memo", - "description": "Short arbitrary message provided by the sender", + "description": "A short message from the sender, encoded with Base58Check, version byte=0x14; byte 2 of the decoding is the message length", "type": { "kind": "SCALAR", "name": "String", @@ -1168,7 +1168,7 @@ }, { "name": "memo", - "description": "Short arbitrary message provided by the sender", + "description": "A short message from the sender, encoded with Base58Check, version byte=0x14; byte 2 of the decoding is the message length", "args": [], "type": { "kind": "SCALAR", @@ -1248,7 +1248,7 @@ }, { "name": "memo", - "description": "Short arbitrary message provided by the sender", + "description": "A short message from the sender, encoded with Base58Check, version byte=0x14; byte 2 of the decoding is the message length", "type": { "kind": "SCALAR", "name": "String", @@ -1355,7 +1355,7 @@ }, { "name": "memo", - "description": "Short arbitrary message provided by the sender", + "description": "A short message from the sender, encoded with Base58Check, version byte=0x14; byte 2 of the decoding is the message length", "args": [], "type": { "kind": "SCALAR", @@ -1439,7 +1439,7 @@ }, { "name": "memo", - "description": "Short arbitrary message provided by the sender", + "description": "A short message from the sender, encoded with Base58Check, version byte=0x14; byte 2 of the decoding is the message length", "type": { "kind": "SCALAR", "name": "String", @@ -1628,7 +1628,7 @@ }, { "name": "memo", - "description": "Short arbitrary message provided by the sender", + "description": "A short message from the sender, encoded with Base58Check, version byte=0x14; byte 2 of the decoding is the message length", "args": [], "type": { "kind": "SCALAR", @@ -1740,7 +1740,7 @@ }, { "name": "memo", - "description": "Short arbitrary message provided by the sender", + "description": "A short message from the sender, encoded with Base58Check, version byte=0x14; byte 2 of the decoding is the message length", "type": { "kind": "SCALAR", "name": "String", @@ -3594,7 +3594,7 @@ }, { "name": "amount", - "description": "Amount that the source is sending to receiver - this is 0 for commands that are not associated with an amount", + "description": "Amount that the source is sending to receiver; 0 for commands without an associated amount", "args": [], "type": { "kind": "NON_NULL", @@ -3642,7 +3642,7 @@ }, { "name": "memo", - "description": "Short arbitrary message provided by the sender", + "description": "A short message from the sender, encoded with Base58Check, version byte=0x14; byte 2 of the decoding is the message length", "args": [], "type": { "kind": "NON_NULL", @@ -3915,7 +3915,7 @@ }, { "name": "amount", - "description": "Amount that the source is sending to receiver - this is 0 for commands that are not associated with an amount", + "description": "Amount that the source is sending to receiver; 0 for commands without an associated amount", "args": [], "type": { "kind": "NON_NULL", @@ -3963,7 +3963,7 @@ }, { "name": "memo", - "description": "Short arbitrary message provided by the sender", + "description": "A short message from the sender, encoded with Base58Check, version byte=0x14; byte 2 of the decoding is the message length", "args": [], "type": { "kind": "NON_NULL", @@ -4236,7 +4236,7 @@ }, { "name": "amount", - "description": "Amount that the source is sending to receiver - this is 0 for commands that are not associated with an amount", + "description": "Amount that the source is sending to receiver; 0 for commands without an associated amount", "args": [], "type": { "kind": "NON_NULL", @@ -4284,7 +4284,7 @@ }, { "name": "memo", - "description": "Short arbitrary message provided by the sender", + "description": "A short message from the sender, encoded with Base58Check, version byte=0x14; byte 2 of the decoding is the message length", "args": [], "type": { "kind": "NON_NULL", @@ -4557,7 +4557,7 @@ }, { "name": "amount", - "description": "Amount that the source is sending to receiver - this is 0 for commands that are not associated with an amount", + "description": "Amount that the source is sending to receiver; 0 for commands without an associated amount", "args": [], "type": { "kind": "NON_NULL", @@ -4605,7 +4605,7 @@ }, { "name": "memo", - "description": "Short arbitrary message provided by the sender", + "description": "A short message from the sender, encoded with Base58Check, version byte=0x14; byte 2 of the decoding is the message length", "args": [], "type": { "kind": "NON_NULL", @@ -4882,7 +4882,7 @@ }, { "name": "amount", - "description": "Amount that the source is sending to receiver - this is 0 for commands that are not associated with an amount", + "description": "Amount that the source is sending to receiver; 0 for commands without an associated amount", "args": [], "type": { "kind": "NON_NULL", @@ -4930,7 +4930,7 @@ }, { "name": "memo", - "description": "Short arbitrary message provided by the sender", + "description": "A short message from the sender, encoded with Base58Check, version byte=0x14; byte 2 of the decoding is the message length", "args": [], "type": { "kind": "NON_NULL", @@ -5171,7 +5171,7 @@ }, { "name": "amount", - "description": "Amount that the source is sending to receiver - 0 for commands that are not associated with an amount", + "description": "Amount that the source is sending to receiver; 0 for commands without an associated amount", "args": [], "type": { "kind": "NON_NULL", @@ -5219,7 +5219,7 @@ }, { "name": "memo", - "description": "Short arbitrary message provided by the sender", + "description": "A short message from the sender, encoded with Base58Check, version byte=0x14; byte 2 of the decoding is the message length", "args": [], "type": { "kind": "NON_NULL", diff --git a/src/lib/coda_graphql/coda_graphql.ml b/src/lib/coda_graphql/coda_graphql.ml index c4c65b18ab2..8f1be4989f7 100644 --- a/src/lib/coda_graphql/coda_graphql.ml +++ b/src/lib/coda_graphql/coda_graphql.ml @@ -969,9 +969,8 @@ module Types = struct Signed_command.token cmd.With_hash.data ) ; field "amount" ~typ:(non_null uint64) ~args:[] ~doc: - "Amount that the source is sending to receiver - this is 0 for \ - commands that are not associated with an amount" - ~resolve:(fun _ cmd -> + "Amount that the source is sending to receiver; 0 for commands \ + without an associated amount" ~resolve:(fun _ cmd -> match Signed_command.amount cmd.With_hash.data with | Some amount -> Currency.Amount.to_uint64 amount @@ -986,15 +985,18 @@ module Types = struct transaction" ~resolve:(fun _ cmd -> Signed_command.fee cmd.With_hash.data |> Currency.Fee.to_uint64 ) ; field "memo" ~typ:(non_null string) ~args:[] - ~doc:"Short arbitrary message provided by the sender" + ~doc: + (sprintf + "A short message from the sender, encoded with Base58Check, \ + version byte=0x%02X; byte 2 of the decoding is the message \ + length" + (Char.to_int Base58_check.Version_bytes.user_command_memo)) ~resolve:(fun _ payment -> Signed_command_payload.memo @@ Signed_command.payload payment.With_hash.data |> Signed_command_memo.to_string ) ; field "isDelegation" ~typ:(non_null bool) ~args:[] - ~doc: - "If true, this represents a delegation of stake, otherwise it is \ - a payment" + ~doc:"If true, this command represents a delegation of stake" ~deprecated:(Deprecated (Some "use kind field instead")) ~resolve:(fun _ user_command -> match