---
updatedAt: 2025-05-19T20:45:49.000Z
agentTools:
  projectIndex: https://docs.arianee.org/v1.0/llms.txt
---

# Wallet

To interact with the Arianee Protocol, a wallet is mandatory to store your NFTs.

## Create <Glossary>wallet</Glossary> from private key

**Method**

```javascript
ArianeeWalletBuilder.fromPrivateKey(privatekey);

```

| Parameter    | Type   | Mandatory | Description                                           |
| :----------- | :----- | :-------- | :---------------------------------------------------- |
| `privateKey` | String | ✅         | String representing a 64 hex digits prefixed with 0x. |

**Output**

`object` returns `ArianeeWallet` object, an Arianee wallet object.

**Example**

```javascript
let wallet = arianee.fromPrivateKey('0x516bd2a1d8fbff19ef39501b17176def4150589d9200df1f34e6d91f57f5f40b');
```

***

## Create wallet from random key

**Method**

```javascript
ArianeeWalletBuilder.fromRandomKey();
```

**Output**

`object` returns `ArianeeWallet` object, an Arianee wallet object.

**Example**

```javascript
let wallet = arianee.fromRandomKey();
```

***

## Create wallet from specific mnemonic

> 📌
>
> Generate a <Glossary>BIP</Glossary>-039 and BIP-044 wallet from mnemonic deriving path using the wordlist. The language is English (en). The derivation path is “m/44’/60’/0’/0/0”.

**Method**

```javascript
ArianeeWalletBuilder.fromMnemonic(mnemonic);
```

| Parameter  | Type   | Mandatory | Description                                  |
| :--------- | :----- | :-------- | :------------------------------------------- |
| `mnemonic` | String | ✅         | String representing with 12-word passphrase. |

**Output**

`object` returns `ArianeeWallet` object, an Arianee wallet object.

**Example**

```javascript
let wallet = arianee.fromMnemonic('path return wheel crime share torch orbit aunt sponsor earth feel prepare');
```

***

## Create wallet from random mnemonic

> 📌
>
> Generate a <Glossary>BIP</Glossary>-039 and BIP-044 wallet from mnemonic deriving path using the wordlist. The language is English (en). The derivation path is “m/44’/60’/0’/0/0”.

**Method**

```javascript
ArianeeWalletBuilder.fromRandomMnemonic();
```

**Output**

`object` returns `ArianeeWallet` object, an Arianee wallet object.

**Example**

```javascript
let wallet = arianee.fromRandomMnemonic();
```

***

## Read public and private keys

When your wallet is instantiated, address and private key are available.

**Method**

```javascript PUBLIC KEY
let address = wallet.address;

```
```javascript PRIVATE KEY
let privateKey = wallet.privateKey;
```

> 📌
>
> `publicKey` property is deprecated.

***

## Create instance between Arianee and external wallet

Create an instance between Arianee and external wallet such as MetaMask for example.

**Methods:**

```javascript
import Web3 from 'web3';
import { NETWORK } from '../src';
import { Arianee } from '../src/core/arianee';

// First, create a Web3 instance with the current provider from MetaMask
const web3 = new Web3(window.ethereum);

(async function () {
  const arianee = await new Arianee().init(NETWORK.polygon, {
    blockchainProxy: {
      enable: true,
      host: 'https://api.arianee.com/report'
    }

  });
  // Next, use the fromExternalWallet method to create an ArianeeWallet instance from the MetaMask wallet
  const arianeeWallet = arianee.fromExternalWallet({
    address: web3.eth.accounts[0], 
	// The address of the connected wallet
    customSign: async (data: string) => {
  // Use Metamask's personal_sign method to sign the data with the connected wallet
      const signature = await web3.eth.personal.sign(data, web3.eth.accounts[0], '');
  // Return an object with the message, messageHash, and signature
      return { message: data, messageHash: '', signature };
    }
  });
 
  // Now you can use the ArianeeWallet instance to interact with the Arianee network
  const proof = await arianeeWallet.methods.createCertificateProofLink(123);
});
```

**Result:** The external wallet can now interact with the Arianee network. As shown in the code snippet, an Arianee NFT proof of ownership can be created.

***

## Create read-only object

No private key generation to empower performance. This method allows to display an NFT landing page without wallet generation.

**Method:**

```jsx
ArianeeWalletBuilder.readOnlyWallet();

```

**Output:** A read-only object is returned. This method does not create a wallet. It creates a read-only wallet object in your application, which can be used to read information.

**Example:**

```jsx
let wallet = arianee.readOnlyWallet();
```