
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@cardinal/namespaces
Advanced tools
A protocol for minting NFTs and subscriptions
A namespace can be thought of as a rental dispenser with a templated set of parameters that allow the NFTs to be programmatically minted and rented on demand. Similar in ways to the Metaplex candy-machine, this works by minting the NFT and subsequently wrapping it in a token manager of the configured parameters. When it is returned to the namespace, it can be rented again by a new user.
| Package | Description | Version | Docs |
|---|---|---|---|
cardinal-namespaces | On-demand NFT minting | ||
@cardinal/namespaces | TypeScript SDK for namespaces |
Program addresses are the same on devnet, testnet, and mainnet-beta.
nameXpT2PwZ2iA6DTNYTotTmiMYusBCYqwBLN2QgF4wgit clone https://github.com/cardinal-labs/cardinal-namespaces.git
cd cardinal-namespaces
make
Namepsace
Namespaces are the base component of the protocol. A namespace is a PDA owned by the program that forms a logical grouping of NFTs under a common name. Often similar to a TLD (top-level domain), but the use of a namespace can vary widely. Essentially a namespace is the creator of tokens that belongs in the namespace. It contains an authority who can update the parameters of the namespace, and when users claim entries in a namespace, they are issued by the namespace.
#[account]
pub struct Namespace {
pub bump: u8,
pub name: String,
pub update_authority: Pubkey,
pub rent_authority: Pubkey,
pub approve_authority: Option<Pubkey>,
pub schema: u8,
pub payment_amount_daily: u64,
pub payment_mint: Pubkey,
pub min_rental_seconds: i64,
pub max_rental_seconds: Option<i64>,
pub transferable_entries: bool,
}
Name Entry
Namespaces are a collection of name entries. Each name entry stores information related to a specific name in a namespace. Most importantly, the name is derived from the name and the namespace, so every entry is unique to a given namespace. The entry mostly serves to map a string name to an NFT (mint address). Whoever is the holder of that NFT has the ability to set the entry data and also map their address back to that name using the reverse_entry.
Name entry NFTs are dynamically generated using cardinal-generator.
Name entries are issued by the namespace according to the paramaters of the namespace. The namespaces use the cardinal-token-manager to create revocable and expiring NFTs that represent each entry. This setup allows for subscriptions, and revocable badges issued by a namespace.
#[account]
pub struct Entry {
pub bump: u8,
pub namespace: Pubkey,
pub name: String,
pub data: Option<Pubkey>,
pub reverse_entry: Option<Pubkey>,
pub mint: Pubkey,
pub is_claimed: bool,
pub claim_request_counter: u32,
}
If you are developing using Cardinal namespaces contracts and libraries, feel free to reach out for support on Discord. We will work with you or your team to answer questions, provide development support and discuss new feature requests.
For issues please, file a GitHub issue.
Cardinal Protocol is licensed under the GNU Affero General Public License v3.0.
In short, this means that any changes to this code must be made open source and available under the AGPL-v3.0 license, even if only used privately.
FAQs
Cardinal namespaces SDK
We found that @cardinal/namespaces demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.