{
- console.log('requesting');
- window.btc
- ?.request('sendTransfer', {
- address: TEST_TESTNET_ACCOUNT_2_BTC_ADDRESS,
- amount: '10000',
- network: 'testnet',
- })
- .then(resp => {
- console.log({ sucesss: resp });
- })
- .catch(error => {
- console.log({ error });
- });
+
+
- Send transfer
-
- {
- console.log('requesting');
- (window as any).LeatherProvider?.request('sendTransfer', {
- recipients: [
- {
- address: TEST_TESTNET_ACCOUNT_2_BTC_ADDRESS,
- amount: '800',
- },
- {
+
+ signTx(buildTestNativeSegwitPsbtRequest(segwitPubKey), stacksTestnetNetwork)
+ }
+ >
+ Sign PSBT (Segwit)
+
+
+ signTx(buildTestNativeSegwitPsbtRequestWithIndexes(segwitPubKey), stacksTestnetNetwork)
+ }
+ >
+ Sign PSBT at indexes (SegWit)
+
+ signTx(buildTestTaprootPsbtRequest(taprootPubKey), stacksTestnetNetwork)}
+ >
+ Sign PSBT (Taproot)
+
+
+ signTx(buildTestTaprootPsbtRequestWithIndex(taprootPubKey), stacksTestnetNetwork)
+ }
+ >
+ Sign PSBT at index failure (Taproot)
+
+ {
+ console.log('requesting');
+ window.btc
+ ?.request('sendTransfer', {
address: TEST_TESTNET_ACCOUNT_2_BTC_ADDRESS,
amount: '10000',
- },
- ],
- network: 'testnet',
- })
- .then((resp: any) => {
- console.log({ sucesss: resp });
+ network: 'testnet',
+ })
+ .then(resp => {
+ console.log({ sucesss: resp });
+ })
+ .catch(error => {
+ console.log({ error });
+ });
+ }}
+ >
+ Send transfer
+
+ {
+ console.log('requesting');
+ (window as any).LeatherProvider?.request('sendTransfer', {
+ recipients: [
+ {
+ address: TEST_TESTNET_ACCOUNT_2_BTC_ADDRESS,
+ amount: '800',
+ },
+ {
+ address: TEST_TESTNET_ACCOUNT_2_BTC_ADDRESS,
+ amount: '900',
+ },
+ ],
+ network: 'testnet',
})
- .catch((error: Error) => {
- console.log({ error });
- });
- }}
- >
- Send transfer to multiple addresses
-
- {
- console.log('requesting');
- (window as any).LeatherProvider?.request('sendTransfer', {
- recipients: [
- {
- address: 'bc1qps90ws94pvk548y9jg03gn5lwjqnyud4lg6y56',
- amount: '800',
- },
- {
- address: 'bc1qps90ws94pvk548y9jg03gn5lwjqnyud4lg6y56',
- amount: '10000',
- },
- ],
- network: 'mainnet',
- })
- .then((resp: any) => {
- console.log({ sucesss: resp });
+ .then((resp: any) => {
+ console.log({ sucesss: resp });
+ })
+ .catch((error: Error) => {
+ console.log({ error });
+ });
+ }}
+ >
+ Send transfer to multiple addresses
+
+ {
+ console.log('requesting');
+ (window as any).LeatherProvider?.request('sendTransfer', {
+ recipients: [
+ {
+ address: 'bc1qps90ws94pvk548y9jg03gn5lwjqnyud4lg6y56',
+ amount: '800',
+ },
+ {
+ address: 'bc1qyrtw5v0rkmytg0gu34f06fxpyfk24x7jevtvx3',
+ amount: '10000',
+ },
+ ],
+ network: 'mainnet',
})
- .catch((error: Error) => {
- console.log({ error });
- });
- }}
- >
- Send native segwit transfer to multiple addresses
-
- {
- console.log('requesting');
- (window as any).LeatherProvider?.request('sendTransfer', {
- recipients: [
- {
- address: 'bc1p8nyc4sl8agqfjs2rq4yer6wnhd89naw05s0ha8hpmg8j36ht6yvswqyaxm',
- amount: '800',
- },
- {
- address: 'bc1p8nyc4sl8agqfjs2rq4yer6wnhd89naw05s0ha8hpmg8j36ht6yvswqyaxm',
- amount: '10000',
- },
- ],
- network: 'mainnet',
- })
- .then((resp: any) => {
- console.log({ sucesss: resp });
+ .then((resp: any) => {
+ console.log({ sucesss: resp });
+ })
+ .catch((error: Error) => {
+ console.log({ error });
+ });
+ }}
+ >
+ Send native segwit transfer to multiple addresses
+
+ {
+ console.log('requesting');
+ (window as any).LeatherProvider?.request('sendTransfer', {
+ recipients: [
+ {
+ address: 'bc1p8nyc4sl8agqfjs2rq4yer6wnhd89naw05s0ha8hpmg8j36ht6yvswqyaxm',
+ amount: '800',
+ },
+ {
+ address: 'bc1p8nyc4sl8agqfjs2rq4yer6wnhd89naw05s0ha8hpmg8j36ht6yvswqyaxm',
+ amount: '10000',
+ },
+ ],
+ network: 'mainnet',
})
- .catch((error: Error) => {
- console.log({ error });
- });
- }}
- >
- Send taproot transfer to multiple addresses
-
- {
- console.log('requesting');
- (window as any).LeatherProvider?.request('sendTransfer', {
- recipients: [
- {
- address: TEST_TESTNET_ACCOUNT_2_BTC_ADDRESS,
- amount: '10000',
- },
- {
- address: TEST_TESTNET_ACCOUNT_2_BTC_ADDRESS,
- amount: '10000',
- },
- ],
- })
- .then((resp: any) => {
- console.log({ sucesss: resp });
+ .then((resp: any) => {
+ console.log({ sucesss: resp });
+ })
+ .catch((error: Error) => {
+ console.log({ error });
+ });
+ }}
+ >
+ Send taproot transfer to multiple addresses
+
+ {
+ console.log('requesting');
+ (window as any).LeatherProvider?.request('sendTransfer', {
+ recipients: [
+ {
+ address: TEST_TESTNET_ACCOUNT_2_BTC_ADDRESS,
+ amount: '10000',
+ },
+ {
+ address: TEST_TESTNET_ACCOUNT_2_BTC_ADDRESS,
+ amount: '10000',
+ },
+ ],
})
- .catch((error: Error) => {
- console.log({ error });
- });
- }}
- >
- Send transfer validate error
-
-
+ .then((resp: any) => {
+ console.log({ sucesss: resp });
+ })
+ .catch((error: Error) => {
+ console.log({ error });
+ });
+ }}
+ >
+ Send transfer validate error
+
+
+