From 23aa808cf984ca40b78128f1dfcb418975b2419e Mon Sep 17 00:00:00 2001 From: Patrick O'Grady Date: Wed, 2 Sep 2020 12:34:08 -0700 Subject: [PATCH 1/3] Pass PublicKeys to ConstructionMetadata --- api.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api.yaml b/api.yaml index b6537fb..09fadab 100644 --- a/api.yaml +++ b/api.yaml @@ -880,6 +880,10 @@ components: to construct a transaction. The Options object used to specify which metadata to return is left purposely unstructured to allow flexibility for implementers. + + Optionally, the request can also include an array + of PublicKeys associated with the AccountIdentifiers + returned in ConstructionPreprocessResponse. type: object required: - network_identifier @@ -896,6 +900,10 @@ components: the client can populate an options object to limit the metadata returned to only the subset required. type: object + public_keys: + type: array + items: + $ref: '#/components/schemas/PublicKey' ConstructionMetadataResponse: description: | The ConstructionMetadataResponse returns network-specific metadata From 9f35de7aa2c5ed407a7c8cadbe2608f14b27fe38 Mon Sep 17 00:00:00 2001 From: Patrick O'Grady Date: Wed, 2 Sep 2020 12:34:37 -0700 Subject: [PATCH 2/3] make gen --- api.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/api.json b/api.json index 1ea9c12..3e8489c 100644 --- a/api.json +++ b/api.json @@ -1531,7 +1531,7 @@ } }, "ConstructionMetadataRequest": { - "description":"A ConstructionMetadataRequest is utilized to get information required to construct a transaction. The Options object used to specify which metadata to return is left purposely unstructured to allow flexibility for implementers.", + "description":"A ConstructionMetadataRequest is utilized to get information required to construct a transaction. The Options object used to specify which metadata to return is left purposely unstructured to allow flexibility for implementers. Optionally, the request can also include an array of PublicKeys associated with the AccountIdentifiers returned in ConstructionPreprocessResponse.", "type":"object", "required": [ "network_identifier", @@ -1544,6 +1544,12 @@ "options": { "description":"Some blockchains require different metadata for different types of transaction construction (ex: delegation versus a transfer). Instead of requiring a blockchain node to return all possible types of metadata for construction (which may require multiple node fetches), the client can populate an options object to limit the metadata returned to only the subset required.", "type":"object" + }, + "public_keys": { + "type":"array", + "items": { + "$ref":"#/components/schemas/PublicKey" + } } } }, From 913e2844bde33efed91bec0631cd95be719ac294 Mon Sep 17 00:00:00 2001 From: Patrick O'Grady Date: Wed, 2 Sep 2020 12:54:09 -0700 Subject: [PATCH 3/3] nits --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index bea9e96..88c3c9e 100644 --- a/README.md +++ b/README.md @@ -230,6 +230,7 @@ Construction API implementation. ### Supported CurveTypes * secp256k1: SEC compressed - `33 bytes` (https://secg.org/sec1-v2.pdf#subsubsection.2.3.3) +* secp256r1: SEC compressed - `33 bytes` (https://secg.org/sec1-v2.pdf#subsubsection.2.3.3) * edwards25519: `y (255-bits) || x-sign-bit (1-bit)` - `32 bytes` (https://ed25519.cr.yp.to/ed25519-20110926.pdf) ### Supported SignatureTypes