# Create a Blockchain Address

In this example you'll learn how to create a valid blockchain address that can be used on Public Mint's blockchain.

## **Before you start**

Public Mint's service APIs offer a series of methods that can be used to integrate with Public Mint services and blockchain. Before you start, it's recommended that you review the full documentation available online on [developers.publicmint.io](https://developers.publicmint.io/).

## Creating Addresses

There are many ways of creating a blockchain address. In this example, we'll use **NodeJS** with the **Web3 lib** to communicate with the blockchain.

**Example**

```javascript
const Web3 = require('web3');
const provider = 'https://public.tst.publicmint.io:8545'; // Public Mint TestNet Blockchain
const opts = {
    defaultBlock: 'latest',
    transactionConfirmationBlocks: 1,
}
const web3 = new Web3(provider, null, opts);
(async function () {
   const passphrase = 'test';
   const account = await web3.eth.accounts.create(passphrase);  
   console.log('PMINT ACCOUNT address:', account.address);
   console.log('PMINT ACCOUNT PK:', account.privateKey);
})();
```

{% code title="// OUTPUT" %}

```
PMINT ACCOUNT address: 0xEa3F2eb61dD221344834eA6a3fd2128dF6641D4E
PMINT ACCOUNT PK: 0x0edd054f73c62fdca08b3940413df4f713a34cd5b702f88641b984499f165565
```

{% endcode %}

This example will return the *private key* and the *public address* of the newly created account. Both will be necessary to integrate with Public Mint's blockchain and service APIs.


---

# Agent Instructions: 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://developers.publicmint.io/tutorials/create-a-blockchain-address.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.
