near / near-api-js

JavaScript library to interact with NEAR Protocol via RPC API
https://near.github.io/near-api-js
MIT License
396 stars 244 forks source link

Wallet injection API #104

Open ilblackdragon opened 5 years ago

ilblackdragon commented 5 years ago

We need a wallet injection API that existing wallets that have dApp browser can leverage to integrate with apps.

For example:

vgrichina commented 5 years ago

We need APIs to: 1) Request login (without knowing account name yet). At this step user potentially might want to only let app know account (but not give access), so cannot be exactly like Sign Transaction. Alternatively can just be special "error" result for Sign Transaction. 2) Sign transaction (potentially for specific account). Needs to support multiple transactions in one request. 3) Get NEAR connection config.

I'll do more specific spec soon, after I implement individual transaction signing for our wallet.

chadoh commented 4 years ago

@vgrichina are you now able to add a more specific spec?