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

Make account optional for SignInParams and SignInMultiParams on Injected Wallets #484

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
10 changes: 8 additions & 2 deletions specs/Standards/Wallets/InjectedWallets.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ interface Network {

interface SignInParams {
permission: transactions.FunctionCallPermission;
account: Account;
account?: Account;
}

interface SignInMultiParams {
permissions: Array<transactions.FunctionCallPermission>;
account: Account;
account?: Account;
}

interface SignOutParams {
Expand Down Expand Up @@ -296,6 +296,12 @@ await window.near.wallet.signIn({
});
```

##### The account param is optional

The `account` param in the `SignInParams` and `SignInMultiParams` is optional. This allows the existing wallets that don't require/need an account during sign-in to keep the implementation for `signIn` and `signInMulti` similar and becomes a non-blocker for wallets that don't need an account during sign-in.

If the `account` is not passed to these methods the wallet is responsible for creating the `keyPair` and exposing it to the dApp.

##### `signInMulti`

Add multiple `FunctionCall` access keys for one or more accounts. This request should require explicit approval from the user.
Expand Down
Loading