> ## Documentation Index
> Fetch the complete documentation index at: https://dynamic-docs-feat-sidebar-revamp.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 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](https://medium.com/@claudio_69833/how-to-create-bitcoin-transactions-with-javascript-b3b43f53ca0c).

```JavaScript
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>;
};
```
