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

Add API endpoint to fetch information about a legacy wallet. #776

Closed
6 tasks done
jonathanknowles opened this issue Oct 1, 2019 · 1 comment
Closed
6 tasks done
Assignees

Comments

@jonathanknowles
Copy link
Member

jonathanknowles commented Oct 1, 2019

Context

This task will provide an API endpoint that allows users to fetch information about a Byron wallet.

In order to use this endpoint for a given wallet, the wallet must have been previously restored with the postByronWallet endpoint.

Decision

The API will provide an endpoint similar to the following:

/byron/wallets/{byronWalletId}:
  get:  
    operationId: getByronWallet  
    tags: ["Wallets"]
    summary: Get
    description: Return information about a Byron wallet. 
    parameters:
      - *parametersByronWalletId 
    responses: *responsesGetByronWallet

With schema definitions similar to the following:

x-responsesGetByronWallet: &responsesGetByronWallet 
  <<: *responsesErr404
  <<: *responsesErr405
  <<: *responsesErr406
  200:
    description: Ok   
    schema: *ApiByronWallet  

See ApiByronWallet definition.

Acceptance Criteria

Within the list of criteria below, a ticked criterion indicates that there is test coverage in the master branch to demonstrate that this criterion is satisfied.

  • The API must provide an endpoint to fetch information about a legacy wallet.
  • After a successful restore with restoreByronWallet, calling getByronWallet must return a valid ApiByronWallet object with information about the restored wallet.
  • After a successful deletion with deleteByronWallet, calling getByronWallet must return an error.

Development Plan

  • Implement dummy endpoint that always fails with a suitable wallet not found error.
    This will unblock tasks that depend on the presence of this endpoint and types relating to it.
  • Replace dummy implementation with real implementation.

PR

Number Base
#790 master
#817 master
#846 master

QA

  • Build integration tests to verify that all acceptance criteria have been satisfied.
@jonathanknowles jonathanknowles added this to the Legacy Wallet Support milestone Oct 1, 2019
@jonathanknowles jonathanknowles changed the title Add API endpoint to fetch information about a specific legacy wallet. Add API endpoint to fetch information about a legacy wallet. Oct 1, 2019
@jonathanknowles jonathanknowles self-assigned this Oct 3, 2019
iohk-bors bot added a commit that referenced this issue Oct 3, 2019
790: Provide skeletal API endpoints for functions on Byron-style wallets.   r=piotr-iohk a=jonathanknowles

# Issue Number

#774 
#775 
#776 
#777 

# Overview

This PR provides skeletal API endpoints for a subset of the functions on Byron-style wallets.

The goal of this PR is to establish the general direction, including types and module organization, and not to provide a complete implementation. (This will be provided in further PRs.)

- [x] Separated the API into a core API (non-legacy) and a compatibility API (includes operations on Byron wallets).
- [x] Provided API types for a subset of functions on Byron-style wallets.
- [x] Provided compatibility API server implementation that returns HTTP 501 (Not Implemented) for each of the functions on Byron-style wallets.
- [x] Added appropriate definitions to the Swagger API specification.

Co-authored-by: Jonathan Knowles <[email protected]>
iohk-bors bot added a commit that referenced this issue Oct 15, 2019
817: Implement basic API functions for Byron-style wallets.  r=jonathanknowles a=jonathanknowles

# Issue Number

#774 (`restoreByronWallet`)
#775 (`listByronWallets`)
#776 (`getByronWallet`)
#777 (`deleteByronWallet`)

# Overview

This PR implements all API functions _**apart from**_ those relating to _**migration**_.

We have:

- [x] Provided an implementation for [`restoreByronWallet`](#774).
- [x] Provided an implementation for [`listByronWallets`](#775).
- [x] Provided an implementation for [`getByronWallets`](#776).
- [x] Provided an implementation for [`deleteByronWallet`](#777).
- [x] Fixed **existing** integration tests for all of the above.

# Not included in this PR

Further integration tests: these will be included in _**further**_ sub-topic PRs.

Co-authored-by: Jonathan Knowles <[email protected]>
iohk-bors bot added a commit that referenced this issue Oct 16, 2019
841: Group tags by era (Shelley vs Byron) in swagger documentation r=KtorZ a=KtorZ

# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->

#774 #775 #776 #777 #778 

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] I have renamed `/external-transactions` to `/proxy/transactions` to better convey its meaning
- [x] I have renamed all `/byron/wallets` to `/byron-wallets` as per the discussion we had on slack
- [x] I have renamed `/.../migrate` to `/.../migrations`, REST is about resources, not actions. 
- [x] I have grouped and organize API tags by eras such that it's more readable:

![Screenshot from 2019-10-16 13-38-08](https://user-images.githubusercontent.com/5680256/66916252-24946900-f01b-11e9-9060-9a6aa88d0ac4.png)


# Comments

<!-- Additional comments or screenshots to attach if any -->

:warning: base branch is `jonathanknowles/migrate-byron-wallet-return-type`

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: KtorZ <[email protected]>
iohk-bors bot added a commit that referenced this issue Oct 16, 2019
841: Group tags by era (Shelley vs Byron) in swagger documentation r=KtorZ a=KtorZ

# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->

#774 #775 #776 #777 #778 

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] I have renamed `/external-transactions` to `/proxy/transactions` to better convey its meaning
- [x] I have renamed all `/byron/wallets` to `/byron-wallets` as per the discussion we had on slack
- [x] I have renamed `/.../migrate` to `/.../migrations`, REST is about resources, not actions. 
- [x] I have grouped and organize API tags by eras such that it's more readable:

![Screenshot from 2019-10-16 13-38-08](https://user-images.githubusercontent.com/5680256/66916252-24946900-f01b-11e9-9060-9a6aa88d0ac4.png)


# Comments

<!-- Additional comments or screenshots to attach if any -->

:warning: base branch is `jonathanknowles/migrate-byron-wallet-return-type`

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: KtorZ <[email protected]>
@piotr-iohk
Copy link
Contributor

lgtm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants