XRP Web3 Identity
WebsiteAppTwitter
  • Overview
    • Vision
    • Benefit
    • Features
    • Q&A
    • XRPL Hackathon: Winner
  • - Getting Started -
    • Technical
      • Metadata
    • Tutorials
      • User Guide for Registration
      • User Guide for Transfer
    • Articles
      • XRP Domains: Clarifying Community Concerns
      • XRP Domains: Technical talk
    • Marketplace
    • Products
    • Programs
      • Referral Program
  • - Developer Guide -
    • XRPL Name SDK
      • XRPLID SDK
      • XRPLID API
  • Official Links
    • Website
    • Twitter
    • Github
Powered by GitBook
On this page
  1. - Developer Guide -
  2. XRPL Name SDK

XRPLID SDK

This is a beta version that will be continuously improved

PreviousXRPL Name SDKNextXRPLID API

Last updated 2 years ago

Installation

Make sure to install the following packages before installing xrplidjs: xrpl and verify-xrpl-signature.

npm install xrpl verify-xrpl-signature

Install Package

npm install xrplidjs

See the code below

const xrplidjs = require('xrplidjs');

const config = 
{
	rpcUrl: "wss://xrplcluster.com/",
	Issuer: "raAyazbgEkwzLByXipQuPLWFfnsPS1v1q9",
		
}

async function main() {
	const sdk = xrplidjs.SDK(config);	
	
	// your xrp domain
	const domain = "xrpdomains.xrp";
	// your address
	const address = "rLhi87aSCyNW88tW4632yLiwinbghFZNue";
		
	// resolve name to get the address of the owner.
	const objOwner = await sdk.getAddress(domain);
	console.log(objOwner);
	
	//Reverse Resolve Names
	const objDomain = await sdk.getName(address);
	console.log(objDomain);
	
	//Get All Names
	const objAllDomains = await sdk.getAllNames(address);
	console.log(objAllDomains);
}

main();

Please contact [email protected] if you have any questions about integration.

npm: xrplidjsnpm
Logo