-
Notifications
You must be signed in to change notification settings - Fork 42
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
Sats Connect kit #87
Sats Connect kit #87
Changes from 1 commit
eef91d6
115787e
3745d73
1aa0a34
4ec4f45
dfa7e80
4ff8a91
d0d249a
8fe2d10
c156725
8357210
3867b78
cd90034
12a1ea9
103920f
642de5d
0c55d47
39b02c0
99a776e
a46850c
70ac819
b360a71
776de00
ebed7a3
88b844d
7a9f737
ceb8fab
6fbbb18
46b0334
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -22,6 +22,39 @@ Developers building apps on the Bitcoin ecosystem can use Sats connect to intera | |||||
npm i sats-connect | ||||||
``` | ||||||
|
||||||
## Usage | ||||||
|
||||||
### import | ||||||
|
||||||
``` | ||||||
import Wallet from 'sats-connect'; | ||||||
``` | ||||||
|
||||||
|
||||||
### Connect Wallet | ||||||
|
||||||
``` | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
const response = await Wallet.request('getAccounts', { | ||||||
purposes: [ | ||||||
AddressPurpose.Payment, | ||||||
AddressPurpose.Ordinals, | ||||||
AddressPurpose.Stacks | ||||||
], | ||||||
message: 'Cool app wants to know your addresses!' | ||||||
}); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prettier can format this if ```ts is set above, does it work? |
||||||
``` | ||||||
### Request a wallet action | ||||||
|
||||||
``` | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
await Wallet.request('sendTransfer', {...}); | ||||||
``` | ||||||
|
||||||
### Disconnect Wallet | ||||||
|
||||||
``` | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
await Wallet.disconnect(); | ||||||
``` | ||||||
|
||||||
## Documentation | ||||||
|
||||||
For full documentation, visit [docs.xverse.app](https://docs.xverse.app/sats-connect/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.