Skip to content

Commit

Permalink
Add wallet_address to scopes
Browse files Browse the repository at this point in the history
Added wallet_address to the available scopes, and made a number of formatting changes to make it more clear what scopes are needed for what methods.
  • Loading branch information
CryptoGing authored Jan 20, 2023
1 parent 10f013d commit 7991f2e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion SDK_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ type AuthResult = {
### `scopes`

This comment has been minimized.

Copy link
@Khunhayman

Khunhayman Oct 19, 2023

ဘာတေလဲ🤔

This comment has been minimized.

Copy link
@Mohamedelsaka1

Mohamedelsaka1 via email Oct 19, 2023

Available scopes: `username`, `payments`.
Available scopes: `username`, `payments`, `wallet_address`.
> **Not yet implemented**
>
Expand All @@ -67,6 +67,7 @@ Available scopes: `username`, `payments`.
> However, you should implement your app by only adding the scopes you need when calling `authenticate`.
> Scopes support will be added before the general release of the Pi platform.
<br />
Here is a breakdown of various keys available on the `AuthResult['user']` object, and the scopes required for those keys
to be present:
Expand All @@ -75,6 +76,16 @@ to be present:
| `uid` | An app-local identifier for the user. This is specific to this user, and this app. It will change if the user revokes the permissions they granted to your app. | (none) |
| `username` | The user's Pi username. | `username` |
<br />
Here is a breakdown of scopes with no return and methods requiring them:
| Scope | Description | Methods Requiring Scope |
| -------------: | ------------- | :-------------: |
| `payments` | Gives permission to the app to create payments on the users behalf | `createPayment` |
| `wallet_address` | Gives the app access to the users public wallet address | `createPayment` - App to User Payments|
<br />
### `onIncompletePaymentFound`
Signature: `(payment: PaymentDTO) => void`
Expand Down

1 comment on commit 7991f2e

@jiiitVDA
Copy link

Choose a reason for hiding this comment

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

GDIVXUHWEFW6XOPHHSJ7GFBET6WYBTZTVMI3MZNAGBDAHUAVIV6RODM3

Please sign in to comment.