Skip to content

Commit

Permalink
Merge pull request #48 from coinbase/patrick/deprecate-address
Browse files Browse the repository at this point in the history
Deprecate Address-based Fields
  • Loading branch information
patrick-ogrady authored Sep 8, 2020
2 parents 10a2e0a + 65c3d5e commit a399adf
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 26 deletions.
35 changes: 21 additions & 14 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.3",
"version":"1.4.4",
"title":"Rosetta",
"description":"Build Once. Integrate Your Blockchain Everywhere.",
"license": {
Expand Down Expand Up @@ -348,8 +348,8 @@
},
"/construction/derive": {
"post": {
"summary":"Derive an Address from a PublicKey",
"description":"Derive returns the network-specific address associated with a public key. Blockchains that require an on-chain action to create an account should not implement this method.",
"summary":"Derive an AccountIdentifier from a PublicKey",
"description":"Derive returns the AccountIdentifier associated with a public key. Blockchains that require an on-chain action to create an account should not implement this method.",
"operationId":"constructionDerive",
"tags": [
"Construction"
Expand Down Expand Up @@ -475,7 +475,7 @@
"/construction/payloads": {
"post": {
"summary":"Generate an Unsigned Transaction and Signing Payloads",
"description":"Payloads is called with an array of operations and the response from `/construction/metadata`. It returns an unsigned transaction blob and a collection of payloads that must be signed by particular addresses using a certain SignatureType. The array of operations provided in transaction construction often times can not specify all \"effects\" of a transaction (consider invoked transactions in Ethereum). However, they can deterministically specify the \"intent\" of the transaction, which is sufficient for construction. For this reason, parsing the corresponding transaction in the Data API (when it lands on chain) will contain a superset of whatever operations were provided during construction.",
"description":"Payloads is called with an array of operations and the response from `/construction/metadata`. It returns an unsigned transaction blob and a collection of payloads that must be signed by particular AccountIdentifiers using a certain SignatureType. The array of operations provided in transaction construction often times can not specify all \"effects\" of a transaction (consider invoked transactions in Ethereum). However, they can deterministically specify the \"intent\" of the transaction, which is sufficient for construction. For this reason, parsing the corresponding transaction in the Data API (when it lands on chain) will contain a superset of whatever operations were provided during construction.",
"operationId":"constructionPayloads",
"tags": [
"Construction"
Expand Down Expand Up @@ -1169,16 +1169,18 @@
]
},
"SigningPayload": {
"description":"SigningPayload is signed by the client with the keypair associated with an address using the specified SignatureType. SignatureType can be optionally populated if there is a restriction on the signature scheme that can be used to sign the payload.",
"description":"SigningPayload is signed by the client with the keypair associated with an AccountIdentifier using the specified SignatureType. SignatureType can be optionally populated if there is a restriction on the signature scheme that can be used to sign the payload.",
"type":"object",
"required": [
"address",
"hex_bytes"
],
"properties": {
"address": {
"type":"string",
"description":"The network-specific address of the account that should sign the payload."
"description":"[DEPRECATED by `account_identifier` in `v1.4.4`] The network-specific address of the account that should sign the payload."
},
"account_identifier": {
"$ref":"#/components/schemas/AccountIdentifier"
},
"hex_bytes": {
"type":"string"
Expand Down Expand Up @@ -1599,13 +1601,13 @@
"ConstructionDeriveResponse": {
"description":"ConstructionDeriveResponse is returned by the `/construction/derive` endpoint.",
"type":"object",
"required": [
"address"
],
"properties": {
"address": {
"type":"string",
"description":"Address in network-specific format."
"description":"[DEPRECATED by `account_identifier` in `v1.4.4`] Address in network-specific format."
},
"account_identifier": {
"$ref":"#/components/schemas/AccountIdentifier"
},
"metadata": {
"type":"object"
Expand Down Expand Up @@ -1769,8 +1771,7 @@
"description":"ConstructionParseResponse contains an array of operations that occur in a transaction blob. This should match the array of operations provided to `/construction/preprocess` and `/construction/payloads`.",
"type":"object",
"required": [
"operations",
"signers"
"operations"
],
"properties": {
"operations": {
Expand All @@ -1780,12 +1781,18 @@
}
},
"signers": {
"description":"All signers (addresses) of a particular transaction. If the transaction is unsigned, it should be empty.",
"description":"[DEPRECATED by `account_identifier_signers` in `v1.4.4`] All signers (addresses) of a particular transaction. If the transaction is unsigned, it should be empty.",
"type":"array",
"items": {
"type":"string"
}
},
"account_identifier_signers": {
"type":"array",
"items": {
"$ref":"#/components/schemas/AccountIdentifier"
}
},
"metadata": {
"type":"object"
}
Expand Down
21 changes: 12 additions & 9 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.3
version: 1.4.4
title: Rosetta
description: |
Build Once. Integrate Your Blockchain Everywhere.
Expand Down Expand Up @@ -304,9 +304,9 @@ paths:
$ref: '#/components/schemas/Error'
/construction/derive:
post:
summary: Derive an Address from a PublicKey
summary: Derive an AccountIdentifier from a PublicKey
description: |
Derive returns the network-specific address associated with a public key.
Derive returns the AccountIdentifier associated with a public key.
Blockchains that require an on-chain action to create an
account should not implement this method.
Expand Down Expand Up @@ -414,7 +414,7 @@ paths:
Payloads is called with an array of operations
and the response from `/construction/metadata`. It returns an
unsigned transaction blob and a collection of payloads that must
be signed by particular addresses using a certain SignatureType.
be signed by particular AccountIdentifiers using a certain SignatureType.
The array of operations provided in transaction construction often times
can not specify all "effects" of a transaction (consider invoked transactions
Expand Down Expand Up @@ -951,13 +951,13 @@ components:
ConstructionDeriveResponse is returned by the `/construction/derive`
endpoint.
type: object
required:
- address
properties:
address:
type: string
description: |
Address in network-specific format.
[DEPRECATED by `account_identifier` in `v1.4.4`] Address in network-specific format.
account_identifier:
$ref: '#/components/schemas/AccountIdentifier'
metadata:
type: object
ConstructionPreprocessRequest:
Expand Down Expand Up @@ -1138,19 +1138,22 @@ components:
type: object
required:
- operations
- signers
properties:
operations:
type: array
items:
$ref: '#/components/schemas/Operation'
signers:
description: |
All signers (addresses) of a particular transaction. If the transaction
[DEPRECATED by `account_identifier_signers` in `v1.4.4`] All signers (addresses) of a particular transaction. If the transaction
is unsigned, it should be empty.
type: array
items:
type: string
account_identifier_signers:
type: array
items:
$ref: '#/components/schemas/AccountIdentifier'
metadata:
type: object
ConstructionHashRequest:
Expand Down
7 changes: 4 additions & 3 deletions models/SigningPayload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,22 @@

description: |
SigningPayload is signed by the client with the keypair associated
with an address using the specified SignatureType.
with an AccountIdentifier using the specified SignatureType.
SignatureType can be optionally populated if there is
a restriction on the signature scheme that can be
used to sign the payload.
type: object
required:
- address
- hex_bytes
properties:
address:
type: string
description: |
The network-specific address of the account that should sign
[DEPRECATED by `account_identifier` in `v1.4.4`] The network-specific address of the account that should sign
the payload.
account_identifier:
$ref: 'AccountIdentifier.yaml'
hex_bytes:
type: string
signature_type:
Expand Down

0 comments on commit a399adf

Please sign in to comment.