Web3 NPM library to interact with Soonaverse.

Overview

npm

Soonaverse - Soonaverse JavaScript/Typescript API - APLHA

Please note this is APLHA and we might introduce breaking changes.

Library to interact with Soonaverse platform.

At this stage it only supports reading or streaming data from Soonaverase. Eventually we will provide web components that can be embeded on another sites.

Getting Started

NPM Package

Install NPM package

npm install soonaverse --save

Initiate class and get NFTs owned by IOTA Address. See API for full list of commands below:

import { Soon } from 'soonaverse';

const soon = new Soon();
soon.getNftsByIotaAddress('iota1qryv5aqy0p7lcr7djn8fea9cl4rqqv3xxcqah0erc2gdee3czm6wcmln3fp').then((obj) => {
    console.log(obj);
});

Use JS script directly in your app

Add script within your html

<script src="https://unpkg.com/soonaverse@latest/dist/soon.js"></script>

// We initiate Soon class to window.soon

Get NFT owner by IOTA Address

window.soon.getNftsByIotaAddress([
    'iota1qryv5aqy0p7lcr7djn8fea9cl4rqqv3xxcqah0erc2gdee3czm6wcmln3fp'
]).then((obj) => {
  console.log('NFTs owned by IOTA Address')
  console.log(obj);
});

Architecture

  • Google Firestore (highly performant database layer)
  • Centralized Contracts (interm) / Smart Contracts

Centralized contracts are slowly being replaced by Solidity Smart Contract as technology is mature enough and business processes are locked down.

Google Firestore stays in place to provide highly performant and scalable layer to read data.

Two different tools exists:

  • Tangle Listener -> custom component connected with Hornet that streams near real-time information about Tangle into Google Firestore
  • Wasp Listener -> custom component connected to Wasp that streams near real-time information from the L2 chain into Google Firestore.
  • Google Cloud Functions (serverless) -> Centralised contracts (typescript) that executes business processes and write results into Google Firestore

Google Firestore is used in a similar way GraphQL would be used in other DeFi projects. Google Firestore is used instead of GraphQL due it's highly performant and scalable attributes.

Soonaverse High-level architecture

API

GET: getNftsByIotaAddress

Get all NFTs owned by an IOTA Address. You can pass an array with up to 10 IOTA Addresses.

getNftsByIotaAddress([
    'iota1qryv5aqy0p7lcr7djn8fea9cl4rqqv3xxcqah0erc2gdee3czm6wcmln3fp'
]).then((obj) => {
  console.log('NFTs owned by IOTA Address')
  console.log(obj);
});

GET: getNftsByEthAddress

Get all NFTs owned by an ETH address.

getNftsByEthAddress('0x551FD2C7c7bF356baC194587dAb2fcd46420054b').then((obj) => {
  console.log(obj);
});

GET: getNft

Get NFT

getNft('0xa16722921cf0aa33ccc0d36bdff057dece5dc7ae').then((obj) => {
  console.log(obj);
});

GET: getMemberByIds

getMemberByIds(['0xa16722921cf0aa33ccc0d36bdff057dece5dc7ae']).then((obj) => {
  console.log(obj);
});

GET: getSpaceTransactions

getSpaceTransactions(['0x9e983f054e294d41beacbb28f769bcbc044b0766']).then((obj) => {
  console.log(obj);
});

GET: getCollection

Get Collection

getCollection('0xcbe28532602d67eec7c937c0037509d426f38223').then((obj) => {
  console.log(obj);
});

GET: getNftsByCollections

Get NFTs within Collection

getNftsByCollections(['0xc9813fa99b4b5a7f0e18e912bf726730bc633c17']).then((obj) => {
  console.log(obj);
});

LISTEN: onNft

Listen to updates for a particular NFT. RXJS Observable stream is returned.

onNft('0xa16722921cf0aa33ccc0d36bdff057dece5dc7ae').subscribe((obj) => {
    console.log('NFT Updated')
    console.log(obj);
});

LISTEN: onCollection

Listen to updates for a particular Collection. RXJS Observable stream is returned.

onCollection('0xcbe28532602d67eec7c937c0037509d426f38223').subscribe((obj) => {
    console.log('Collection Updated')
    console.log(obj);
});

LISTEN: onValidPayment

Listen to ALL valid payments on Soonaverse.

onValidPayment().subscribe((obj) => {
    console.log('Payment')
    console.log(obj);
});

Contributing

Contributing Guidelines

Read through our contributing guidelines to learn about our submission process, coding rules and more.

You might also like...

Nami Wallet is a browser based wallet extension to interact with the Cardano blockchain.

Nami Wallet Nami Wallet is a browser based wallet extension to interact with the Cardano blockchain. It's an open-source project and built by Berry Po

Dec 29, 2022

A package that allows your bot of discord.js v13 & v14 to create the new awesome Discord Modals and interact with them

A package that allows your bot of discord.js v13 & v14 to create the new awesome Discord Modals and interact with them

A package that allows your bot of discord.js v13 & v14 to create the new awesome Discord Modals and interact with them

Dec 23, 2022

Complete module to interact with the Brawl Stars API.

BrawlStars-API.js Brawlstars-api.js is a library made to interact with the Official Brawl Stars api, listing all of their endpoints in one place. ✨ Ho

Nov 3, 2022

A comprehensive collection of useful tools developed with the help of Ethers.js to interact with the Ethereum Blockchain to develop great DeFi apps as quickly and easily as possible.

hudi-packages-ethersfactory How to install Installing with npm For more information on using npm check out the docs here. npm i @humandataincome/ether

Mar 30, 2022

A simple API to interact with Stacks and CityCoins data.

CityCoins API Probably Nothing CF Workers + IttyRouter + micro-stacks + TypeScript ...and it feels good! Things to Note uses simple typed responses an

Oct 10, 2022

Get, change, and otherwise interact with your notes in Obsidian via a REST API.

Local REST API for Obsidian See our interactive docs: https://coddingtonbear.github.io/obsidian-local-rest-api/ Have you ever needed to automate inter

Dec 22, 2022

Customizable browser's home page to interact with your homeserver's Docker containers (e.g. Sonarr/Radarr)

Customizable browser's home page to interact with your homeserver's Docker containers (e.g. Sonarr/Radarr)

Homarr A homepage for your server. Demo ↗️ • Install ➡️ Join the discord! 📃 Table of Contents 📃 Table of Contents 🚀 Getting Started ℹ️ About 💥 Kno

Jan 7, 2023

A CLI to upload files to IPFS and interact with them using wbeb3.storage

Storli A CLI to upload files to IPFS and interact with them using web3.storage Storli Usage Commands Usage $ npm install -g storli $ storli COMMAND ru

Aug 7, 2022

PublisherConnector is a class object that allows you to interact with the CHILI Publisher editorObject via postMessage without the complexity of postMessage.

PublisherConnector is a class object that allows you to interact with the CHILI Editor editorObject via postMessage without the complexity of postMessage.

Nov 24, 2022
Owner
SoonLabs
SoonLabs
npm i uuid, npm i nodemon, npm i commander

goit-nodejs-hw-01 Получаем и выводим весь список контактов в виде таблицы (console.table) node index.js --action list Получаем контакт по id node inde

Oksana Banshchykova 3 Jul 5, 2022
Web3.js provider to interact with the VeChain Thor protocol

web3-providers-connex Web3.js provider implemented using Connex.js. It makes it possible to use web3.js and ethers.js to interact with VeChain Thor pr

null 13 Dec 26, 2022
The Gitcoin Passport SDK is comprised of a set of libraries distributed on npm to help developers interact with Passport data living on Ceramic.

The Gitcoin Passport SDK is comprised of a set of libraries distributed on npm to help developers interact with Passport data living on [Ceramic]

Gitcoin Core 47 Dec 6, 2022
Web3-citizens-app - React application based on smart contract using web3 and MetaMask extention.

Citizens App (web3-react-redux) React application based on smart contract using web3 and MetaMask extention. Start the applicarion Recomend to install

Denys Voloshyn 3 Aug 25, 2022
A web3 starter project using Typescript, Hardhat, ethers.js and @web3-react

Starter React Typescript Ethers.js Hardhat Project This repo contains a Hardhat and React Dapp starter project. The React Dapp in the frontend dir of

ChainShot 39 Dec 31, 2022
(🔗, 🌲) Web3 Link Tree is a free & open-source alternative to Linktree built with React.js, Next.js, Tailwind and Web3-React

Getting Started Read the detailed guide here Customize Add your name, wallet address, social media links and more in config.ts Images Save images to t

Naut 35 Sep 20, 2022
🛠 Solana Web3 Tools - A set of tools to improve the user experience on Web3 Solana Frontends.

?? Solana Web3 Tools - A set of tools to improve the user experience on Web3 Solana Frontends.

Holaplex 30 May 21, 2022
A standard library to interact with KaiOS 2.x and 3.x APIs.

kaios-lib A standard library to interact with KaiOS 2.x and 3.x* APIs. * 3.x support coming when there is a good dev device available for testing purp

Garrett Downs 4 Jun 3, 2022
JavaScript library to interact with the Cfx.re API (FiveM/RedM)

Cfx.re JavaScript API A package that helps you interacting with the Cfx.re, FiveM & RedM API. How to install npm i cfx-api Example usage: const cfx =

Pablo Zapata 21 Jan 1, 2023
JavaScript library to interact with the Cfx.re API (FiveM/RedM)

Cfx.re JavaScript API A package that helps you interacting with the Cfx.re, FiveM & RedM API. How to install npm i cfx-api Example usage: const cfx =

Pablo Zapata 14 Aug 14, 2022