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 /version API #95

Closed
garyyu opened this issue Apr 30, 2019 · 2 comments
Closed

Add /version API #95

garyyu opened this issue Apr 30, 2019 · 2 comments

Comments

@garyyu
Copy link
Contributor

garyyu commented Apr 30, 2019

Now we have these wallet APIs in 1.1.0 version:

  • /v2/foreign/**
  • /v2/owner/**
  • /v1/wallet/foreign/**
  • /v1/wallet/owner/**

How about add a /version API since 1.1.0 version?

  1. We can use this /version API to make 1.1.0 version wallet sending to be compatible with 1.0.x version receiving. The 1.0.x version will return 404 Not Found for this API.
  2. Sending side can detect the receiver's version in all the future versions since 1.1.0.
@yeastplume
Copy link
Member

This is already covered here: #87

I don't think we want to change the endpoint each time the api changes. V1 is the http api, V2 is the json-rpc api, but there is another version number within these that can be retrieved by the check_version function.

@garyyu
Copy link
Contributor Author

garyyu commented May 1, 2019

Thanks.
Close this one since check_version works for that.

$ curl -0 -XPOST http://127.0.0.1:3415/v2/foreign --data '{"jsonrpc":"2.0","method":"check_version","id":1,"params":[]}'


{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "Ok": {
      "default_slate_version": 2,
      "foreign_api_version": 2
    }
  }
}

@garyyu garyyu closed this as completed May 1, 2019
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