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
Feat/198 construction derive staking support #207
Merged
tomasBustamante
merged 22 commits into
master
from
feat/198-construction-derive-staking-support
Nov 11, 2020
Merged
Feat/198 construction derive staking support #207
tomasBustamante
merged 22 commits into
master
from
feat/198-construction-derive-staking-support
Nov 11, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tomasBustamante
force-pushed
the
feat/198-construction-derive-staking-support
branch
from
November 6, 2020 06:51
0d14712
to
1b122be
Compare
AlanVerbner
reviewed
Nov 6, 2020
AlanVerbner
reviewed
Nov 9, 2020
cardano-rosetta-server/src/server/controllers/construction-controller.ts
Outdated
Show resolved
Hide resolved
AlanVerbner
reviewed
Nov 9, 2020
cardano-rosetta-server/src/server/controllers/construction-controller.ts
Show resolved
Hide resolved
AlanVerbner
reviewed
Nov 9, 2020
AlanVerbner
reviewed
Nov 9, 2020
AlanVerbner
reviewed
Nov 9, 2020
AlanVerbner
reviewed
Nov 9, 2020
AlanVerbner
reviewed
Nov 9, 2020
AlanVerbner
reviewed
Nov 9, 2020
cardano-rosetta-server/test/e2e/construction/construction-derive-api.test.ts
Show resolved
Hide resolved
tomasBustamante
force-pushed
the
feat/198-construction-derive-staking-support
branch
2 times, most recently
from
November 11, 2020 13:15
4040531
to
4f1849d
Compare
AlanVerbner
previously approved these changes
Nov 11, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
Information to generate the base and reward addresses used for assertions Refs #198
tomasBustamante
force-pushed
the
feat/198-construction-derive-staking-support
branch
from
November 11, 2020 15:24
4f1849d
to
b0f88c6
Compare
AlanVerbner
approved these changes
Nov 11, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
AlanVerbner
pushed a commit
that referenced
this pull request
Nov 28, 2020
* feat: add staking_credential and address_type in ConstructionDeriveRequest * refactor: move staking_credential and address_type into metadata of ConstructionDeriveRequest * feat: add invalid address type error * feat: add metadata validation in construction derive controller * refactor: generatePayload parameters in construction derive tests * test: construction derive with invalid staking key * refactor: exclude enum for address type in openApi * test: construction derive with invalid address type * test: construction derive for Base and Reward addresses * feat: construction derive Base and Reward address support * test: construction derive validation for staking key size * test: construction derive reward address correct bech32 address * fix: correct address prefix for reward address creation * refactor: move UTxOAddressTypes enum to constants file * refactor: rename UTxOAddressType and make Enterprise default value * refactor: add comment for staking address prefix * test: add comments to construction derive tests * refactor: use proper error for invalid staking key * test: construction derive error when no staking key for base address * feat: missing staking key validation for base address generation * refactor: rename AddressType * refactor: address type description in openApi Refs #198
AlanVerbner
pushed a commit
that referenced
this pull request
Dec 2, 2020
* feat: add staking_credential and address_type in ConstructionDeriveRequest * refactor: move staking_credential and address_type into metadata of ConstructionDeriveRequest * feat: add invalid address type error * feat: add metadata validation in construction derive controller * refactor: generatePayload parameters in construction derive tests * test: construction derive with invalid staking key * refactor: exclude enum for address type in openApi * test: construction derive with invalid address type * test: construction derive for Base and Reward addresses * feat: construction derive Base and Reward address support * test: construction derive validation for staking key size * test: construction derive reward address correct bech32 address * fix: correct address prefix for reward address creation * refactor: move UTxOAddressTypes enum to constants file * refactor: rename UTxOAddressType and make Enterprise default value * refactor: add comment for staking address prefix * test: add comments to construction derive tests * refactor: use proper error for invalid staking key * test: construction derive error when no staking key for base address * feat: missing staking key validation for base address generation * refactor: rename AddressType * refactor: address type description in openApi Refs #198
rhyslbw
pushed a commit
that referenced
this pull request
Dec 4, 2020
* feat: add staking_credential and address_type in ConstructionDeriveRequest * refactor: move staking_credential and address_type into metadata of ConstructionDeriveRequest * feat: add invalid address type error * feat: add metadata validation in construction derive controller * refactor: generatePayload parameters in construction derive tests * test: construction derive with invalid staking key * refactor: exclude enum for address type in openApi * test: construction derive with invalid address type * test: construction derive for Base and Reward addresses * feat: construction derive Base and Reward address support * test: construction derive validation for staking key size * test: construction derive reward address correct bech32 address * fix: correct address prefix for reward address creation * refactor: move UTxOAddressTypes enum to constants file * refactor: rename UTxOAddressType and make Enterprise default value * refactor: add comment for staking address prefix * test: add comments to construction derive tests * refactor: use proper error for invalid staking key * test: construction derive error when no staking key for base address * feat: missing staking key validation for base address generation * refactor: rename AddressType * refactor: address type description in openApi Refs #198
AlanVerbner
pushed a commit
that referenced
this pull request
Dec 7, 2020
* feat: add staking_credential and address_type in ConstructionDeriveRequest * refactor: move staking_credential and address_type into metadata of ConstructionDeriveRequest * feat: add invalid address type error * feat: add metadata validation in construction derive controller * refactor: generatePayload parameters in construction derive tests * test: construction derive with invalid staking key * refactor: exclude enum for address type in openApi * test: construction derive with invalid address type * test: construction derive for Base and Reward addresses * feat: construction derive Base and Reward address support * test: construction derive validation for staking key size * test: construction derive reward address correct bech32 address * fix: correct address prefix for reward address creation * refactor: move UTxOAddressTypes enum to constants file * refactor: rename UTxOAddressType and make Enterprise default value * refactor: add comment for staking address prefix * test: add comments to construction derive tests * refactor: use proper error for invalid staking key * test: construction derive error when no staking key for base address * feat: missing staking key validation for base address generation * refactor: rename AddressType * refactor: address type description in openApi Refs #198
AlanVerbner
pushed a commit
that referenced
this pull request
Dec 8, 2020
* feat: add staking_credential and address_type in ConstructionDeriveRequest * refactor: move staking_credential and address_type into metadata of ConstructionDeriveRequest * feat: add invalid address type error * feat: add metadata validation in construction derive controller * refactor: generatePayload parameters in construction derive tests * test: construction derive with invalid staking key * refactor: exclude enum for address type in openApi * test: construction derive with invalid address type * test: construction derive for Base and Reward addresses * feat: construction derive Base and Reward address support * test: construction derive validation for staking key size * test: construction derive reward address correct bech32 address * fix: correct address prefix for reward address creation * refactor: move UTxOAddressTypes enum to constants file * refactor: rename UTxOAddressType and make Enterprise default value * refactor: add comment for staking address prefix * test: add comments to construction derive tests * refactor: use proper error for invalid staking key * test: construction derive error when no staking key for base address * feat: missing staking key validation for base address generation * refactor: rename AddressType * refactor: address type description in openApi Refs #198
AlanVerbner
pushed a commit
that referenced
this pull request
Dec 11, 2020
* feat: add staking_credential and address_type in ConstructionDeriveRequest * refactor: move staking_credential and address_type into metadata of ConstructionDeriveRequest * feat: add invalid address type error * feat: add metadata validation in construction derive controller * refactor: generatePayload parameters in construction derive tests * test: construction derive with invalid staking key * refactor: exclude enum for address type in openApi * test: construction derive with invalid address type * test: construction derive for Base and Reward addresses * feat: construction derive Base and Reward address support * test: construction derive validation for staking key size * test: construction derive reward address correct bech32 address * fix: correct address prefix for reward address creation * refactor: move UTxOAddressTypes enum to constants file * refactor: rename UTxOAddressType and make Enterprise default value * refactor: add comment for staking address prefix * test: add comments to construction derive tests * refactor: use proper error for invalid staking key * test: construction derive error when no staking key for base address * feat: missing staking key validation for base address generation * refactor: rename AddressType * refactor: address type description in openApi Refs #198
AlanVerbner
pushed a commit
that referenced
this pull request
Dec 11, 2020
* feat: add staking_credential and address_type in ConstructionDeriveRequest * refactor: move staking_credential and address_type into metadata of ConstructionDeriveRequest * feat: add invalid address type error * feat: add metadata validation in construction derive controller * refactor: generatePayload parameters in construction derive tests * test: construction derive with invalid staking key * refactor: exclude enum for address type in openApi * test: construction derive with invalid address type * test: construction derive for Base and Reward addresses * feat: construction derive Base and Reward address support * test: construction derive validation for staking key size * test: construction derive reward address correct bech32 address * fix: correct address prefix for reward address creation * refactor: move UTxOAddressTypes enum to constants file * refactor: rename UTxOAddressType and make Enterprise default value * refactor: add comment for staking address prefix * test: add comments to construction derive tests * refactor: use proper error for invalid staking key * test: construction derive error when no staking key for base address * feat: missing staking key validation for base address generation * refactor: rename AddressType * refactor: address type description in openApi Refs #198
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Endpoint
/construction/derive
now supports the creation of Base and Reward addresses besided the already supported Enterprise address.Proposed Solution
The staking key and the address type are provided as optional parameters in the metadata.
The controller does some basic validation and the service does the actual construction based on the following:
References
Closes #198