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

Access PublicKeys During Construction #45

Merged
merged 3 commits into from
Sep 1, 2020
Merged
Show file tree
Hide file tree
Changes from 2 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
18 changes: 15 additions & 3 deletions api.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"openapi":"3.0.2",
"info": {
"version":"1.4.2",
"version":"1.4.3",
"title":"Rosetta",
"description":"Build Once. Integrate Your Blockchain Everywhere.",
"license": {
Expand Down Expand Up @@ -1638,17 +1638,23 @@
}
},
"ConstructionPreprocessResponse": {
"description":"ConstructionPreprocessResponse contains the request that will be sent directly to `/construction/metadata`. If it is not necessary to make a request to `/construction/metadata`, options should be null.",
"description":"ConstructionPreprocessResponse contains `options` that will be sent unmodified to `/construction/metadata`. If it is not necessary to make a request to `/construction/metadata`, `options` should be omitted. Some blockchains require the PublicKey of particular AccountIdentifiers to construct a valid transaction. To fetch these PublicKeys, populate `public_keys` with the AccountIdentifiers associated with the desired PublicKeys. If it is not necessary to retrieve any PublicKeys for construction, `public_keys` should be omitted.",
"type":"object",
"properties": {
"options": {
"type":"object",
"description":"The options that will be sent directly to `/construction/metadata` by the caller."
},
"public_keys": {
"type":"array",
"items": {
"$ref":"#/components/schemas/AccountIdentifier"
}
}
}
},
"ConstructionPayloadsRequest": {
"description":"ConstructionPayloadsRequest is the request to `/construction/payloads`. It contains the network, a slice of operations, and arbitrary metadata that was returned by the call to `/construction/metadata`.",
"description":"ConstructionPayloadsRequest is the request to `/construction/payloads`. It contains the network, a slice of operations, and arbitrary metadata that was returned by the call to `/construction/metadata`. Optionally, the request can also include an array of PublicKeys associated with the AccountIdentifiers returned in ConstructionPreprocessResponse.",
"type":"object",
"required": [
"network_identifier",
Expand All @@ -1666,6 +1672,12 @@
},
"metadata": {
"type":"object"
},
"public_keys": {
"type":"array",
"items": {
"$ref":"#/components/schemas/PublicKey"
}
}
}
},
Expand Down
27 changes: 22 additions & 5 deletions api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

openapi: 3.0.2
info:
version: 1.4.2
version: 1.4.3
title: Rosetta
description: |
Build Once. Integrate Your Blockchain Everywhere.
Expand Down Expand Up @@ -1003,24 +1003,37 @@ components:
minimum: 0.0
ConstructionPreprocessResponse:
description: |
ConstructionPreprocessResponse contains the request that will
be sent directly to `/construction/metadata`.
ConstructionPreprocessResponse contains `options` that will
be sent unmodified to `/construction/metadata`. If it is
not necessary to make a request to `/construction/metadata`,
`options` should be omitted.

If it is not necessary to make a request to `/construction/metadata`,
options should be null.
Some blockchains require the PublicKey of particular AccountIdentifiers
to construct a valid transaction. To fetch these PublicKeys, populate
`public_keys` with the AccountIdentifiers associated with the desired
PublicKeys. If it is not necessary to retrieve any PublicKeys
for construction, `public_keys` should be omitted.
type: object
properties:
options:
type: object
description: |
The options that will be sent directly to `/construction/metadata` by
the caller.
public_keys:
type: array
items:
$ref: '#/components/schemas/AccountIdentifier'
ConstructionPayloadsRequest:
description: |
ConstructionPayloadsRequest is the request to
`/construction/payloads`. It contains the network,
a slice of operations, and arbitrary metadata
that was returned by the call to `/construction/metadata`.

Optionally, the request can also include an array
of PublicKeys associated with the AccountIdentifiers
returned in ConstructionPreprocessResponse.
type: object
required:
- network_identifier
Expand All @@ -1034,6 +1047,10 @@ components:
$ref: '#/components/schemas/Operation'
metadata:
type: object
public_keys:
type: array
items:
$ref: '#/components/schemas/PublicKey'
ConstructionPayloadsResponse:
description: |
ConstructionTransactionResponse is returned by `/construction/payloads`. It
Expand Down