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

[ZIP-17] Provider API #50

Closed
wants to merge 1 commit into from
Closed

Conversation

krisboit
Copy link
Contributor

@krisboit krisboit commented Dec 11, 2020

Hey,

This is just a first draft of the ZIP, I just put my ideas in words :) still a lot of changes needed.

Let's discuss about this PR in this issue: #51

@bb111189
Copy link
Contributor

bb111189 commented Jan 15, 2021

Hi @krisboit I am assigning ZIP-17 to this ZIP

@bb111189 bb111189 changed the title Provider API [ZIP-16] Provider API Jan 15, 2021
@@ -0,0 +1,97 @@
| ZIP | Title | Status | Type | Author | Discussions-to | Created (yyyy-mm-dd) | Updated (yyyy-mm-dd) |
| :-: | ------------------------------------------ | :----: | --------------- | ------------------------------ | -------------- | -------------------- | -------------------- |
| X | URL Scheme Format for Transaction Requests | Draft | Standards Track | Tibi Krisboi <tibi@moonlet.io> | - | 2020-12-11 | 2020-12-11 |
Copy link
Contributor

@bb111189 bb111189 Jan 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| X | URL Scheme Format for Transaction Requests | Draft | Standards Track | Tibi Krisboi <tibi@moonlet.io> | - | 2020-12-11 | 2020-12-11 |
| 17 | URL Scheme Format for Transaction Requests | Draft | Standards Track | Tibi Krisboi <tibi@moonlet.io> | - | 2020-12-11 | 2021-01-15 |


## Connectivity

The Provider is said to be **connected** when it can service RPC requests to ar least one network.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The Provider is said to be **connected** when it can service RPC requests to ar least one network.
The Provider is said to be **connected** when it can service RPC requests to at least one network.


### Errors

Error responses **must** be in this format: {error: {code: number, message: string}}, where _code_ is the code of the error and _message_ a human readable error message.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Error responses **must** be in this format: {error: {code: number, message: string}}, where _code_ is the code of the error and _message_ a human readable error message.
Error responses **must** be in this format: {error: {code: number, message: string}}, where _code_ is the code of the error and _message_ a human-readable concise error message.

@bb111189
Copy link
Contributor

bb111189 commented Jan 15, 2021

Should this ZIP define a list of standard errors in a table format? The following example seems to be sharing the same error code
code: -1 message: ACCESS_UNAUTHORIZED
code: -1 message: CANCELED_BY_USER

Example:

Code Comment
-1 ACCESS_UNAUTHORIZED
-2 CANCELED_BY_USER
-32601 METHOD_NOT_DEFINE

@bb111189 bb111189 changed the title [ZIP-16] Provider API [ZIP-17] Provider API Jan 15, 2021
@bb111189
Copy link
Contributor

Also rename the file to zip-17.md

- code: -1 message: CANCELED_BY_USER: Operation cancelled by user
- **SignMessage**
- Params: [message: string]
- message: string (required) - this method will be executed on wallet side, it will just singn the message and return an object of this form {signature: string, publicKey: string, message: string}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- message: string (required) - this method will be executed on wallet side, it will just singn the message and return an object of this form {signature: string, publicKey: string, message: string}
- message: string (required) - this method will be executed on wallet side, it will just sign the message and return an object of this form {signature: string, publicKey: string, message: string}

@krisboit
Copy link
Contributor Author

Should this ZIP define a list of standard errors in a table format? The following example seems to be sharing the same error code
code: -1 message: ACCESS_UNAUTHORIZED
code: -1 message: CANCELED_BY_USER

Example:

Code Comment
-1 ACCESS_UNAUTHORIZED
-2 CANCELED_BY_USER
-32601 METHOD_NOT_DEFINE

Yeah, it should be a table. I drafted this as quick as I could just to get your opinion on it.

Regarding the error codes, I was hoping you would help me define them to be on the same pattern as the errors returned by the RPC. I think it's crucial to assign the code so they don't already exist in RPC API and will not be used in future for other kind of errors. So @bb111189 I need your help on this :)

@bb111189
Copy link
Contributor

Should this ZIP define a list of standard errors in a table format? The following example seems to be sharing the same error code
code: -1 message: ACCESS_UNAUTHORIZED
code: -1 message: CANCELED_BY_USER
Example:
Code Comment
-1 ACCESS_UNAUTHORIZED
-2 CANCELED_BY_USER
-32601 METHOD_NOT_DEFINE

Yeah, it should be a table. I drafted this as quick as I could just to get your opinion on it.

Regarding the error codes, I was hoping you would help me define them to be on the same pattern as the errors returned by the RPC. I think it's crucial to assign the code so they don't already exist in RPC API and will not be used in future for other kind of errors. So @bb111189 I need your help on this :)

hey. I can take a stab at it. Can you also give me write access to your branch so that it is easier from my end.

@krisboit
Copy link
Contributor Author

Should this ZIP define a list of standard errors in a table format? The following example seems to be sharing the same error code
code: -1 message: ACCESS_UNAUTHORIZED
code: -1 message: CANCELED_BY_USER
Example:
Code Comment
-1 ACCESS_UNAUTHORIZED
-2 CANCELED_BY_USER
-32601 METHOD_NOT_DEFINE

Yeah, it should be a table. I drafted this as quick as I could just to get your opinion on it.
Regarding the error codes, I was hoping you would help me define them to be on the same pattern as the errors returned by the RPC. I think it's crucial to assign the code so they don't already exist in RPC API and will not be used in future for other kind of errors. So @bb111189 I need your help on this :)

hey. I can take a stab at it. Can you also give me write access to your branch so that it is easier from my end.

Sure! I've sent you an invite.

@krisboit krisboit closed this Sep 25, 2021
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

Successfully merging this pull request may close these issues.

None yet

2 participants