Skip to content

Commit 7991f2e

Browse files
authored
Add wallet_address to scopes
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.
1 parent 10f013d commit 7991f2e

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

SDK_reference.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ type AuthResult = {
5858
5959
### `scopes`
6060
61-
Available scopes: `username`, `payments`.
61+
Available scopes: `username`, `payments`, `wallet_address`.
6262
6363
> **Not yet implemented**
6464
>
@@ -67,6 +67,7 @@ Available scopes: `username`, `payments`.
6767
> However, you should implement your app by only adding the scopes you need when calling `authenticate`.
6868
> Scopes support will be added before the general release of the Pi platform.
6969
70+
<br />
7071
Here is a breakdown of various keys available on the `AuthResult['user']` object, and the scopes required for those keys
7172
to be present:
7273
@@ -75,6 +76,16 @@ to be present:
7576
| `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) |
7677
| `username` | The user's Pi username. | `username` |
7778
79+
<br />
80+
81+
Here is a breakdown of scopes with no return and methods requiring them:
82+
83+
| Scope | Description | Methods Requiring Scope |
84+
| -------------: | ------------- | :-------------: |
85+
| `payments` | Gives permission to the app to create payments on the users behalf | `createPayment` |
86+
| `wallet_address` | Gives the app access to the users public wallet address | `createPayment` - App to User Payments|
87+
88+
<br />
7889
### `onIncompletePaymentFound`
7990
8091
Signature: `(payment: PaymentDTO) => void`

0 commit comments

Comments
 (0)