Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide PubKeys to /construction/metadata #46

Merged
merged 3 commits into from
Sep 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion api.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
}
}
}
},
Expand Down
8 changes: 8 additions & 0 deletions api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down