> For the complete documentation index, see [llms.txt](https://web3-coin.gitbook.io/welcome-to-web3-coin/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://web3-coin.gitbook.io/welcome-to-web3-coin/whitepaper/transaction.md).

# Transaction

<figure><img src="/files/3S9bqVxW7w1IdWkoC6ed" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/bWVnpvBmQ0EQPwJlJmfz" alt=""><figcaption></figcaption></figure>

```
// require("dotenv").config();
const {ethers, Wallet} = require("ethers");

const network = {
    name:"Web3 Testnet",
    endpoint:"https://test.web3finance.me/rpc",
};

const provider = new ethers.providers.JsonRpcProvider(network.endpoint);
const wallet = new Wallet(process.env.PRIVATE_KEY);

const getTxnInstance = async () => {
    const nonce = await wallet.getTransactionCount();
    const gasPrice = await provider.getGasPrice();
    const gasLimit = 21_000;
    const chainID = await provider.getChainID();
    
    const tx = {
        from: wallet.address,
        to: ethers.constants.AddressZero,
        value: ethers.utils.parseEther(1),
        gasLimit,
        gasPrice,
        nonce,
        chainId,
        data: "0x",
        type: null,
    };
    
    return tx;
};

(async() => {
    const txInstance = await.getTxnInstance();
    await wallet.sendTransaction(txnInstance);
})();
```

In the Web3Chain network, developers can develop on the network using libraries such as Web 3.0 and Ethers.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://web3-coin.gitbook.io/welcome-to-web3-coin/whitepaper/transaction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
