Records API
This document covers the new Records API added to `@onsol/tldparser`. These features provide unified access to domain records across both Solana (SVM) and Monad (EVM) chains.
Records API Documentation
Overview
Installation
npm/yarn install @onsol/tldparserQuick Start
import { TldParser, Record, NetworkWithRpc } from '@onsol/tldparser';
import { Connection } from '@solana/web3.js';
// Solana
const connection = new Connection('https://api.mainnet-beta.solana.com');
const parser = new TldParser(connection);
// Monad (EVM)
const evmSettings = new NetworkWithRpc('monad', 143, 'https://rpc.monad.xyz');
const evmParser = new TldParser(evmSettings, 'monad');API Reference
getRecord(domainTld, record)
getRecord(domainTld, record)Parameter
Type
Description
getRecords(domainTld, records?)
getRecords(domainTld, records?)Parameter
Type
Description
getAvatar(domainTld, options?)
getAvatar(domainTld, options?)Parameter
Type
Description
Input Format
Output
Record Types
Social Records
Record
SVM Key
EVM Key
Profile Records
Record
SVM Key
EVM Key
Crypto Address Records
Record
SVM Key
EVM Key
Storage Records
Record
SVM Key
EVM Key
Utility Functions
resolveAvatarUrl(record, options?)
resolveAvatarUrl(record, options?)getReverseNode(address) (EVM only)
getReverseNode(address) (EVM only)EVM Chain Configuration
Architecture Notes
SVM Implementation
EVM Implementation
Complete Example
Last updated