@stacks/connect
Advanced tools
Comparing version 8.0.2 to 8.0.3-alpha.5710cfa.0
{ | ||
"name": "@stacks/connect", | ||
"version": "8.0.2", | ||
"version": "8.0.3-alpha.5710cfa.0", | ||
"license": "MIT", | ||
@@ -20,3 +20,3 @@ "scripts": { | ||
"@stacks/common": "^7.0.0", | ||
"@stacks/connect-ui": "7.0.0", | ||
"@stacks/connect-ui": "^7.0.1-alpha.5710cfa.0", | ||
"@stacks/network": "^7.0.0", | ||
@@ -66,3 +66,3 @@ "@stacks/network-v6": "npm:@stacks/network@^6.16.0", | ||
}, | ||
"gitHead": "6a1bd26b6ea379cbb35e4e475cbdae11c3154ca8" | ||
"gitHead": "d0390450f06018b44127d9bd85eb162768f694af" | ||
} |
@@ -16,2 +16,4 @@ # `@stacks/connect` [](https://www.npmjs.com/package/@stacks/connect) <!-- omit in toc --> | ||
> Try the [Connect Method Demo App 🏁](https://connect-hirosystems.vercel.app/iframe?id=connect-connect--default&viewMode=story) to see which methods/features are available for wallets | ||
### Install `@stacks/connect` <!-- omit in toc --> | ||
@@ -37,2 +39,4 @@ | ||
- [`getAddresses`](#getaddresses) | ||
- [`sendTransfer`](#sendtransfer) | ||
- [`signPsbt`](#signpsbt) | ||
- [`stx_getAddresses`](#stx_getaddresses) | ||
@@ -68,2 +72,37 @@ - [`stx_getAccounts`](#stx_getaccounts) | ||
#### `sendTransfer` | ||
```js | ||
const response = await request('sendTransfer', { | ||
recipients: [ | ||
{ | ||
address: 'bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4', // recipient address | ||
amount: '1000', // amount in sats | ||
}, | ||
// You can specify multiple recipients | ||
{ | ||
address: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh', | ||
amount: '2000', | ||
}, | ||
], | ||
}); | ||
// { | ||
// "txid": "0x1234...", // The transaction ID | ||
// } | ||
``` | ||
#### `signPsbt` | ||
```js | ||
const response = await request('signPsbt', { | ||
psbt: 'cHNidP...', // base64 encoded PSBT string | ||
signInputs: [{ index: 0, address }], // indices of inputs to sign (optional) | ||
broadcast: false, // whether to broadcast the transaction after signing (optional) | ||
}); | ||
// { | ||
// "txid": "0x1234...", // The transaction ID (if broadcast is true) | ||
// "psbt": "cHNidP..." // The signed PSBT in base64 format | ||
// } | ||
``` | ||
#### `stx_getAddresses` | ||
@@ -70,0 +109,0 @@ |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
3833032
224
4
+ Added@stacks/connect-ui@7.0.1-alpha.f4e70a6.0(transitive)
- Removed@stacks/connect-ui@7.0.0(transitive)