# Home

Welcome to the **documentation** for <mark style="color:purple;">Meta Names</mark>, the **official naming service** for the [**Partisia Blockchain**](https://partisiablockchain.com). It maps human-readable `.mpc` names to blockchain addresses and profile data, the way DNS maps names to servers on the internet.

This guide is tailored for users ranging from beginners to advanced, covering all aspects of using Meta Names, from getting your first domain to integrating Meta Names into your application. Explore the following sections to dive deep into the world of Meta Names:

### Getting Started

Whether you're new to blockchain or an experienced user, this section guides you through the essential steps to kickstart your journey with Meta Names. Learn how to:

* [Connect your wallet](/getting-started/connect-your-wallet)**:** Securely link your Partisia Wallet, MetaMask, or Ledger to Meta Names.
* [Deposit tokens](/getting-started/deposit-tokens)**:** Bridge the BYOC tokens you pay for domains with onto the Partisia Blockchain.
* [Register domain](/getting-started/register-domain)**:** Follow our step-by-step guide to register your first domain on the Partisia Blockchain.

### Domain Management

Once you've registered your domain, managing it efficiently is key. This section covers everything you need to know about maintaining control over your domain, including:

* [Profile](/domain-management/profile)**:** View and manage every domain you own from one page.
* [Records](/domain-management/records)**:** Learn how to set and update the records attached to your domain.
* [Renew domain](/domain-management/renew-domain)**:** Extend your domain before it expires so you keep hold of it.
* [Transfer domain](/domain-management/transfer-domain)**:** Securely transfer your domain to another user or wallet.

### Governance

Meta Names is a community-driven platform, and your voice matters. In the Governance section, discover how you can participate in the decision-making process, including:

* [Proposals](/governance/proposals)**:** Learn how to create and vote on proposals that shape the future of Meta Names. Whether it's introducing new features or modifying existing ones, find out how you can contribute to the evolution of the platform.

### Developers

For developers looking to integrate Meta Names into their applications, this section provides all the necessary resources and guidelines. Discover how to leverage the Meta Names SDK with:

* [Getting started](/developers/getting-started)**:** Install the SDK, choose an environment, and set up transaction signing.
* [Domains](/developers/domains)**:** Register, renew, transfer and look up domains with the SDK.
* [Records](/developers/records)**:** Create, read, update and delete domain records with the SDK.


# Connect your wallet

Link your wallet to Meta Names

Meta Names supports three ways to connect:

* **Partisia Wallet** — the [Partisia Wallet Chrome extension](https://chromewebstore.google.com/detail/partisia-wallet/gjkdbeaiifkpoencioahhcilildpjhgh)
* **MetaMask Wallet** — through the Partisia MetaMask snap
* **Ledger** — a hardware wallet connected over WebUSB

If you are starting from scratch, install the Partisia Wallet extension, then create a new wallet and log in to it.

Once your wallet is ready, connect it to Meta Names:

1. Go to [app.metanames.app](https://app.metanames.app)
2. Click the **Connect** button at the top right of the page
3. Pick your wallet from the **Connect a wallet** menu
4. Approve the connection in your wallet, entering your password or confirming on your Ledger device
5. <mark style="color:purple;">Start your journey with Meta Names</mark> :tada:

Your address appears in place of the Connect button once you are connected.

<figure><img src="https://775067728-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpIBU5CZ7viyyvuXPFoWH%2Fuploads%2Fgit-blob-5440fcff4fafcbe0a6e43c4d1239ead9c8a6922c%2FConnect-your-wallet.gif?alt=media" alt=""><figcaption></figcaption></figure>


# Deposit tokens

Replenish your wallet!

Domains are paid for with BYOC (Bring Your Own Coin) tokens bridged onto the Partisia Blockchain. Meta Names accepts:

* `ETH`
* `BNB`
* `MATIC`
* `ETHEREUM_USDT`
* `POLYGON_USDC`

You also need a small amount of gas on Partisia to submit the transactions.

To bridge tokens onto the Partisia Blockchain, follow this [blog post guide](https://medium.com/partisia-blockchain/using-browser-to-bridge-tokens-in-partisia-blockchain-5c45009a832a) or watch the video below:

{% embed url="<https://youtu.be/giDjEHq52rY?si=dUtoi2VNWrJdoDaI>" %}


# Register domain

Create your web3 domain!

Register your **unique** <mark style="color:purple;">Meta Name</mark> by following these steps:

1. [Connect your wallet](/getting-started/connect-your-wallet)
2. Search for the domain you want from the home page and open it if it is available
3. Choose how many **Years** to register it for
4. Under **Pay with**, select the BYOC token you deposited earlier in [Deposit tokens](/getting-started/deposit-tokens)
5. Click **Approve fees** and confirm in your wallet
6. Once the approval is confirmed, click **Confirm & pay** and approve the second transaction
7. <mark style="color:purple;">Domain registered!</mark> :tada:

{% hint style="info" %}
Registration always takes two transactions: the first approves the fee transfer, the second mints the domain. The total shown excludes network gas fees.
{% endhint %}

Every domain ends in `.mpc`.

To register a subdomain, search for the full name — for example `blog.supercool.mpc`. The parent domain has to exist already, and subdomains are minted **free** in a single transaction, with no duration or token to pick.

<figure><img src="https://775067728-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpIBU5CZ7viyyvuXPFoWH%2Fuploads%2Fgit-blob-5f43b6712afe4a91817acc638f4178e5f164245e%2FDomain-registration.gif?alt=media" alt=""><figcaption></figcaption></figure>


# Profile

View and manage the domains you own

The profile page is where all domains purchased or received through transactions can be viewed and customised. You can also search the list by domain name.

To open it, first [Connect your wallet](/getting-started/connect-your-wallet), then click **Profile** in the navigation bar at the top of the page.

Each domain in the list links to its own page, where you can edit its records, renew it, or transfer it.

<figure><img src="https://775067728-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpIBU5CZ7viyyvuXPFoWH%2Fuploads%2Fgit-blob-7198f24819967a40829aef46b85a75a1cbce2d9e%2FScreenshot%202024-03-16%20at%2017.37.56.png?alt=media" alt="" width="349"><figcaption></figcaption></figure>


# Records

Personalise the records on your domain

Explore the opportunity to personalise the records on your brand-new domain!

1. Visit [app.metanames.app](https://app.metanames.app) and [Connect your wallet](/getting-started/connect-your-wallet)
2. Navigate to the [Profile](/domain-management/profile)
3. Choose the domain you want to customise to open its page
4. In the **Add record** panel, pick a record type from **Select record type**
5. Enter the value and click **Add record**
6. Confirm the transaction in your wallet
7. <mark style="color:purple;">**Profit**</mark> :tada:

The following record types are available:

| Type    | Example value         |
| ------- | --------------------- |
| Bio     | Short bio             |
| Email   | <user@example.com>    |
| Twitter | @username             |
| Discord | user#1234             |
| Wallet  | Wallet address        |
| Price   | Number in PCT         |
| Url     | <https://example.com> |

Existing records can be edited or removed from the same page. Each change is a blockchain transaction, so it has to be confirmed in your wallet and takes a moment to be finalised.

<figure><img src="https://775067728-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpIBU5CZ7viyyvuXPFoWH%2Fuploads%2Fgit-blob-dd37e3f7feb9ed15253ce966d46f256e9364b434%2FRecords.gif?alt=media" alt=""><figcaption></figcaption></figure>


# Renew domain

Extend the duration of your domain

Has your domain started to approach its expiry date? Do you want to extend it? Then renew it by following the steps below:

1. Visit [app.metanames.app](https://app.metanames.app) and [Connect your wallet](/getting-started/connect-your-wallet)
2. Navigate to the [Profile](/domain-management/profile)
3. Choose the domain you want to renew to open its page, then click **Renew**
4. Choose how many **Years** to add and, under **Pay with**, select the BYOC token to pay with
5. Click **Approve fees** and confirm in your wallet
6. Once the approval is confirmed, click **Confirm & pay** and approve the second transaction

{% hint style="info" %}
Like registration, renewal takes two transactions: the first approves the fee transfer, the second extends the domain. The total shown excludes network gas fees.
{% endhint %}

<figure><img src="https://775067728-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpIBU5CZ7viyyvuXPFoWH%2Fuploads%2Fgit-blob-cae09504acfa9134f42ba993ec8db7c58ece18aa%2FRenew-domain.gif?alt=media" alt=""><figcaption></figcaption></figure>


# Transfer domain

Transfer your Meta Names domain

To **transfer your domain**, you need the address of the destination wallet.

Follow the steps below:

1. Visit [app.metanames.app](https://app.metanames.app) and [Connect your wallet](/getting-started/connect-your-wallet)
2. Navigate to the [Profile](/domain-management/profile)
3. Choose the domain you want to move to open its page, then click **Transfer**
4. Paste the recipient's wallet address into the **Recipient Address** field
5. Click **Transfer domain** and confirm the transaction in your wallet
6. <mark style="color:purple;">Profit!</mark> :tada:

The address must be 42 characters long. The button stays disabled until a valid address is entered.

{% hint style="warning" %}
Transfers are irreversible. Make sure you or the recipient can access the destination wallet, or the domain will be lost!
{% endhint %}

<figure><img src="https://775067728-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpIBU5CZ7viyyvuXPFoWH%2Fuploads%2Fgit-blob-3bed03c1180008200072df0db30b0473c4dc4cf6%2FDomain-transfer_1.gif?alt=media" alt=""><figcaption></figcaption></figure>


# Proposals

Welcome to the Proposals page of the Meta Names documentation, a collaborative space **dedicated to the continuous evolution and improvement of the Meta Names ecosystem**.

It is the central hub where the Meta Names community reads and reviews the enhancement proposals that drive the future of the platform, reflecting our commitment to open innovation and the collective wisdom of our users and developers.

Submit your proposal below:

{% embed url="<https://24uyggxrskp.typeform.com/to/TumjdmUv>" %}


# Transition from .meta to .mpc

Acknowledging the value of community input, we observed requests to **change the** [**Meta Names**](https://docs.metanames.app/) **top-level domain from .meta to .mpc**. The migration was put to a community vote, which has since closed.

{% hint style="success" %}
**This proposal passed and the migration is complete.** Every domain now uses the `.mpc` top-level domain, and the vote is closed. This page is kept as a record of the decision.
{% endhint %}

### Migration impacts

The migration from `.meta` to `.mpc` had the following outcomes:

1. All domains were migrated, so **they did not need to be registered again** and **ownership was retained**;
2. All links using `.meta` domains redirect to `.mpc`.

### Reasons for the Domain Transition to MPC

Switching to `.mpc` offers several advantages:

1. Adopting `.mpc` prevents **conflicts with Meta** Platforms (formerly Facebook), **avoiding trademark issues** and distinguishing our brand;
2. `.mpc`'s shorter length makes it **more premium;**
3. The `.mpc` domain **enhances visibility in the** [**Partisia**](https://partisiablockchain.com) **ecosystem**, aligning with its chain token (`$MPC`).

### Conclusion

The transition from `.meta` to `.mpc` was a strategic move for [Meta Names](https://docs.metanames.app/) in the long term: it **mitigates potential trademark conflicts** with Meta Platforms and **strengthens brand visibility** within the Partisia ecosystem.


# Getting started

Integrate Meta Names into your application

For the full API surface, check out the [auto-generated documentation](https://metanames.github.io/sdk/).

### Installation

To use the Meta Names SDK in your project, install it via npm or yarn:

```
npm install @metanames/sdk
# or
yarn add @metanames/sdk
```

### Usage

Import the SDK and create an instance:

```typescript
import { MetaNamesSdk, Enviroment } from '@metanames/sdk'

const metaNamesSdk = new MetaNamesSdk(Enviroment.mainnet)
```

{% hint style="warning" %}
The constructor defaults to **testnet** when no environment is passed. Pass `Enviroment.mainnet` explicitly to work against production domains.

`Enviroment` is spelled without the second `n` in the SDK. This is intentional in the current release.
{% endhint %}

### Signing transactions

Read operations such as `find` and `calculateMintFees` work straight away. Any operation that writes to the blockchain — registering, renewing, transferring, or changing records — requires a signing strategy to be set first, otherwise the transaction cannot be submitted.

```typescript
import PartisiaSdk from 'partisia-blockchain-applications-sdk'
import type { PermissionTypes } from 'partisia-blockchain-applications-sdk/lib/sdk-listeners'

const client = new PartisiaSdk()
await client.connect({
  permissions: ['sign'] as PermissionTypes[],
  dappName: 'My application',
  chainId: 'Partisia Blockchain', // 'Partisia Blockchain Testnet' on testnet
})

metaNamesSdk.setSigningStrategy('partisiaSdk', client)
```

The following strategies are supported:

| Strategy      | Value to pass                                      |
| ------------- | -------------------------------------------------- |
| `partisiaSdk` | A connected `PartisiaSdk` client                   |
| `MetaMask`    | The injected Ethereum provider (`window.ethereum`) |
| `Ledger`      | An open WebUSB transport                           |
| `privateKey`  | A 64-character hex private key                     |

Call `metaNamesSdk.resetSigningStrategy()` to disconnect.

### Supported payment tokens

Domains are paid for with BYOC (Bring Your Own Coin) tokens. The available symbols depend on the environment:

* **Mainnet**: `ETH`, `BNB`, `MATIC`, `ETHEREUM_USDT`, `POLYGON_USDC`
* **Testnet**: `ETH_GOERLI`, `TEST_COIN`

Passing a symbol that is not available in the current environment throws `BYOC <symbol> not handled`.


# Domains

Register, renew, transfer and find domains

All examples assume a configured `metaNamesSdk` instance. Registering, renewing and transferring are write operations, so a signing strategy must be set first — see [Getting started](/developers/getting-started).

### Calculate fees

Calculate the fees for a domain with:

```typescript
const domainName = 'supercool.mpc'
const { fees, symbol, address, feesLabel } = await metaNamesSdk.domainRepository.calculateMintFees(domainName, 'ETH')
console.log(`Fees for ${domainName}: ${feesLabel} ${symbol} (raw: ${fees}, BYOC contract: ${address})`)
```

`fees` is the raw on-chain amount as a `BN`, while `feesLabel` is the same amount formatted with the token's decimals. `address` is the BYOC contract the fees are paid from.

The fee returned covers **one** year. Multiply it yourself if you intend to register for longer.

### Approve fees

Registering a domain requires approving the fee transfer on the BYOC contract first:

```typescript
const domainName = 'supercool.mpc'
const { transactionHash, fetchResult } = await metaNamesSdk.domainRepository.approveMintFees(domainName, 'ETH')
console.log(`Transaction hash: ${transactionHash}`)
const result = await fetchResult
console.log(`Fees approval submitted: ${result}`)
```

Pass a third argument to approve several years at once:

```typescript
await metaNamesSdk.domainRepository.approveMintFees(domainName, 'ETH', 3)
```

Wait for `fetchResult` to settle before registering — the registration fails if the approval has not been finalised on chain.

### Register a domain

`register` mints a new domain. `domain`, `to` and `byocSymbol` are required; `parentDomain` and `subscriptionYears` are optional.

#### Register a new domain without a parent

```typescript
const { transactionHash, fetchResult } = await metaNamesSdk.domainRepository.register({
  domain: 'supercool.mpc',
  to: 'recipientAddress',
  byocSymbol: 'ETH',
})
console.log(`Transaction hash: ${transactionHash}`)
const result = await fetchResult
console.log(`Domain registration submitted: ${result}`)
```

#### Register a subdomain

```typescript
const { transactionHash, fetchResult } = await metaNamesSdk.domainRepository.register({
  domain: 'subname',
  to: 'recipientAddress',
  byocSymbol: 'ETH',
  parentDomain: 'supercool.mpc',
  subscriptionYears: 2,
})
console.log(`Transaction hash: ${transactionHash}`)
const result = await fetchResult
console.log(`Domain registration submitted: ${result}`)
```

Replace `'supercool.mpc'`, `'recipientAddress'` and `'ETH'` with actual values. To register several domains in a single transaction, pass an array to `registerBatch`.

### Renew a domain

```typescript
const { transactionHash, fetchResult } = await metaNamesSdk.domainRepository.renew({
  domain: 'supercool.mpc',
  payer: 'payerAddress',
  byocSymbol: 'ETH',
  subscriptionYears: 1,
})
console.log(`Transaction hash: ${transactionHash}`)
const result = await fetchResult
console.log(`Domain renewal submitted: ${result}`)
```

Renewal fees also have to be approved beforehand, in the same way as registration.

### Transfer a domain

```typescript
const { transactionHash, fetchResult } = await metaNamesSdk.domainRepository.transfer({
  domain: 'supercool.mpc',
  from: 'currentOwnerAddress',
  to: 'recipientAddress',
})
console.log(`Transaction hash: ${transactionHash}`)
const result = await fetchResult
console.log(`Domain transfer submitted: ${result}`)
```

{% hint style="warning" %}
Transfers are irreversible. Make sure the destination wallet is accessible, or the domain will be lost.
{% endhint %}

### Finding domain information

Use `find` to retrieve a single domain. It resolves to `null` when the domain does not exist:

```typescript
const domain = await metaNamesSdk.domainRepository.find('supercool.mpc')
if (!domain) console.log('Domain not found')
else console.log(`Domain data: ${JSON.stringify(domain)}`)
```

Other lookups available on the domain repository:

| Method                      | Returns                                                                          |
| --------------------------- | -------------------------------------------------------------------------------- |
| `findByOwner(ownerAddress)` | Every domain held by an address                                                  |
| `getAll()`                  | Every registered domain                                                          |
| `count()`                   | The number of registered domains                                                 |
| `getOwners()`               | The list of addresses holding at least one domain                                |
| `analyze(domainName)`       | The normalised `name`, its `parentId` and the `tld`, without hitting the network |


# Records

Handle the records of your domain

A domain record has the following fields:

* `class`: The class of the record, chosen from a predefined list of possibilities.
* `data`: The data associated with the record, which can be a string or a buffer, depending on the record class.

#### Available record classes

`RecordClassEnum` exposes the following classes:

| Class     | Value |
| --------- | ----- |
| `Bio`     | 0     |
| `Discord` | 1     |
| `Twitter` | 2     |
| `Uri`     | 3     |
| `Wallet`  | 4     |
| `Avatar`  | 5     |
| `Email`   | 6     |
| `Price`   | 7     |
| `Main`    | 8     |

The web app offers Bio, Email, Twitter, Discord, Wallet, Price and Uri. `Avatar` and `Main` exist on chain but are not exposed there.

#### Getting a record repository

Records are managed through the repository attached to a domain:

```typescript
import { RecordClassEnum } from '@metanames/sdk'

const domain = await metaNamesSdk.domainRepository.find('supercool.mpc')
if (!domain) throw new Error('Domain not found')

const recordRepository = domain.getRecordRepository(metaNamesSdk)
```

Creating, updating and deleting records are write operations, so a signing strategy must be set first — see [Getting started](/developers/getting-started).

### Creating a domain record

Provide the `class` and `data` fields for the new record:

```typescript
const { transactionHash, fetchResult } = await recordRepository.create({
  class: RecordClassEnum.Wallet,
  data: 'data',
})
console.log(`Transaction hash: ${transactionHash}`)
const result = await fetchResult
console.log(`Domain record creation submitted: ${result}`)
```

Replace `RecordClassEnum.Wallet` with the desired record class and `'data'` with the appropriate data for the record. To create several records in a single transaction, pass an array to `createBatch`.

### Updating a domain record

```typescript
const { transactionHash, fetchResult } = await recordRepository.update({
  class: RecordClassEnum.Wallet,
  data: 'newData',
})
console.log(`Transaction hash: ${transactionHash}`)
const result = await fetchResult
console.log(`Domain record update submitted: ${result}`)
```

Replace `RecordClassEnum.Wallet` with the class of the record you want to update and `'newData'` with the updated data.

### Deleting a domain record

`delete` takes the record class directly, not an object:

```typescript
const { transactionHash, fetchResult } = await recordRepository.delete(RecordClassEnum.Wallet)
console.log(`Transaction hash: ${transactionHash}`)
const result = await fetchResult
console.log(`Domain record deletion submitted: ${result}`)
```

### Reading a domain record

`find` takes the record class and reads from the domain data already loaded, returning `null` when the domain has no record of that class:

```typescript
const record = await recordRepository.find(RecordClassEnum.Uri)
console.log(`Record: ${JSON.stringify(record)}`)
```

### Example usage

Here's an example of how you can use these functionalities together:

```typescript
import { RecordClassEnum } from '@metanames/sdk'

const domain = await metaNamesSdk.domainRepository.find('supercool.mpc')
if (!domain) throw new Error('Domain not found')
const recordRepository = domain.getRecordRepository(metaNamesSdk)

// Create a new domain record
const createIntent = await recordRepository.create({
  class: RecordClassEnum.Uri,
  data: 'https://example.com',
})
console.log(`Transaction hash: ${createIntent.transactionHash}`)
console.log(`Domain record creation submitted: ${await createIntent.fetchResult}`)

// Update the existing domain record
const updateIntent = await recordRepository.update({
  class: RecordClassEnum.Uri,
  data: 'https://new-example.com',
})
console.log(`Transaction hash: ${updateIntent.transactionHash}`)
console.log(`Domain record update submitted: ${await updateIntent.fetchResult}`)

// Delete the existing domain record
const deleteIntent = await recordRepository.delete(RecordClassEnum.Uri)
console.log(`Transaction hash: ${deleteIntent.transactionHash}`)
console.log(`Domain record deletion submitted: ${await deleteIntent.fetchResult}`)
```

Replace `RecordClassEnum.Uri` and the URLs with your actual values.


