npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@tatumio/space-id-core

v1.0.1

Published

SPACE ID Core by Tatum

Downloads

115

Readme

🌍 SPACE ID Core

The SPACE ID Core extension integrates seamlessly with Tatum SDK to provide core SPACE ID SDK functionalities.

📖 Description

The SPACE ID Core extension aims to bring the Web3 Name SDK to Tatum, providing developers with a multi-chain name service to easily build and create a web3 identity without any blockchain knowledge due to the integration with Tatum RPC services and libraries.

  • Web3 Name SDK Core: The extension supports various reading methods for discovering already existing domains (e.g. getting domain name by address or vice versa) and their metadata (e.g. avatar or hash content).
  • Registration Integration: The extension also supports registering a new domain along with all the related utils (e.g. finding out if the domain is available in the first place or querying the registration fee of the domain).

🚀 Quick Start

  1. Installation

    Firstly, ensure that viem and the @tatumio/space-id-core package is set as a dependency within your project. Next, import the SPACE ID extension:

    import { SpaceIdCore } from '@tatumio/space-id-core';
  2. Initialization

    Create an instance of Tatum SDK passing SpaceIdCore as one of extensions.

     const tatumSdk = await TatumSDK.init<Ethereum>({
       network: Network.ETHEREUM,
       configureExtensions: [SpaceIdCore]
     })

🛠️ How to Use

The SPACE ID Core extension provides most Web3 Name SDK Core and Registration methods. It should therefore be possible to use almost anything mentioned in the SPACE ID docs with only minimal changes.

Get address by domain name example:

import { TatumSDK, Network, Solana } from "@tatumio/tatum";
import { SpaceIdCore } from "@tatumio/space-id-core";

const tatum = await TatumSDK.init<Solana>({
  network: Network.SOLANA,
  configureExtensions: [SpaceIdCore],
  apiKey: ****,
});

try {
  const result = await tatum.extension(SpaceIdCore).getAddress("spaceid");
  console.log(result);
} catch (e) {
  console.error(e);
}

tatum.destroy();

Get domain name by address example:

import { TatumSDK, Network, Ethereum } from "@tatumio/tatum";
import { SpaceIdCore } from "@tatumio/space-id-core";

const tatum = await TatumSDK.init<Ethereum>({
  network: Network.ETHEREUM,
  configureExtensions: [SpaceIdCore],
  apiKey: ****,
});

try {
  const result = await tatum
    .extension(SpaceIdCore)
    .getDomainName("0x5228BC5B84754f246Fc7265787511ae9C0afEBC5");
  console.log(result);
} catch (e) {
  console.error(e);
}

tatum.destroy();

Register a new domain example:

import { TatumSDK, Network, ArbitrumOne } from "@tatumio/tatum";
import { SpaceIdCore } from "@tatumio/space-id-core";

const tatum = await TatumSDK.init<ArbitrumOne>({
  network: Network.ARBITRUM_ONE,
  configureExtensions: [SpaceIdCore],
  apiKey: ****,
});
const privateKey = ****

try {
  await tatum.extension(SpaceIdCore).registerDomain('spaceid', 1, privateKey)
} catch (e) {
  console.error(e);
}

tatum.destroy();

🔗🔗 Supported Networks

The extension can be initialized on the following chains:

Network.ETHEREUM,
Network.ARBITRUM_ONE,
Network.BINANCE_SMART_CHAIN,
Network.GNOSIS,
Network.SOLANA,

However, different methods have different support as detailed below.

Web3 Name SDK Core

Methods for getting address by domain name and vice versa are supported on all the chains listed above. However, every other method such as getting domain metadata is currently NOT available on Solana (Network.SOLANA).

Registration Integration

Registration of new domain and all the utilities around it as detailed above are supported on the following chains:

Network.ETHEREUM,
Network.ARBITRUM_ONE,
Network.BINANCE_SMART_CHAIN,