- Npm
- Yarn
npm install @thenamespace/mint-manager@latest viem
yarn add @thenamespace/mint-manager@latest viem
import {
MintClientConfig,
createMintClient,
MintClient,
} from "@thenamespace/mint-manager";
const TOKEN = process.env.ALCHEMY_TOKEN;
const clientConfig: MintClientConfig = {
isTestnet: false,
customRpcUrls: {
[mainnet.id]: `https://eth-mainnet.g.alchemy.com/v2/${TOKEN}`,
[base.id]: `https://base-mainnet.g.alchemy.com/v2/${TOKEN}`,
},
mintSource: "my-perfect-app",
};
const mintClient: MintClient = createMintClient(clientConfig);
MintClientConfig
| Parameter | Default | Description |
|---|---|---|
| isTestnet | false | Specifies whether the testnet app is used or not. |
| customRpcUrls | undefined | Sets a map of chain.id - rpc urls that a mint client is going to use when making external calls. If the rpc url is not specified, the client will default to a public client for a given chain |
| mintSource | namespace-sdk | When a subname is minted, the mint event also emits a source parameter which is useful to track where the subname mints are coming from |

