Introduction
The Basics
- Login / Signup
- Chains / Networks
- Embedded Wallets
- Server Wallets
- Smart Accounts (AA)
- External Wallets
- Users / VC's
- Design
- Money & Funding
Beyond The Basics
- Using Wallets
- Accessing Wallets
- Interacting with wallets
- Multi Asset UI
- Send Assets
- General Interactions
- EVM Interactions
- Solana Interactions
- Bitcoin Interactions
- Cosmos Interactions
- Sui Interactions
- Headless
- Global Identity
- Global Wallets
- Wallet Connect Global Connectivity
- Bridge Widget
- Rate Limits
Developer Dashboard
- SDK and API Keys
- Sandbox vs Live
- Analytics
- User Management
- Test Accounts
- Settings
- Admin
- Webhooks
- Configuring Social Providers
Migrating to Dynamic
- Migrating to Dynamic
- Migration Tutorials
For Wallets & Chains
Hackathons
Legacy Embedded Wallets
Bitcoin Interactions
Send a raw transaction
In this example, we are going to send a raw transaction as a hex value to the bitcoin network.
For information on how to construct the transactionHexString, please refer to this example.
Copy
Ask AI
import { useDynamicContext } from '@dynamic-labs/sdk-react-core';
import { isBitcoinWallet } from '@dynamic-labs/bitcoin';
const SendRawTransaction = () => {
const { primaryWallet } = useDynamicContext();
const signMessage = async () => {
if (!primaryWallet || !isBitcoinWallet(primaryWallet)) return;
const transactionId = await primaryWallet.sendRawTransaction('transactionHexString');
console.log('transactionId', transactionId);
};
return <button onClick={SendRawTransaction}>Send Raw Transaction</button>;
};
Was this page helpful?
Assistant
Responses are generated using AI and may contain mistakes.