Socket
Book a DemoInstallSign in
Socket

radix-meme-gateway

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

radix-meme-gateway

Utility to fetch relevant data for radix.meme app directly from the radix ledger

latest
Source
npmnpm
Version
0.0.32
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

Radix Meme Gateway

This package provides a utility to fetch data relevant to the radix.meme app directly from the radix ledger by using public gateway APIs. The APIs are called using axios (not with the GatewayAPI SDK).

Usage

Instal

npm install radix-meme-gateway

Initialize Service

import { 
  createRadixMemeGateway,
  Network,
} from "radix-meme-gateway";

// initialize service
const radixMemeGateway = createRadixMemeGateway(
  Network.MAINNET,
  "component_rdx1cq32tyxth5edlk5j3et0rzwxtr79pdr85c59jnjg5fxp3t4azajuld"
);

// Show config of an instance
console.log(radixMemeGateway.getConfig());

API endpoints

// Fetch all tokens
const tokens = await radixMemeGateway.getAllTokens();

// Fetch token from resource address
const token = await radixMemeGateway.getTokenFromResource(
  "resource_rdx1th04p2c55884yytgj0e8nq79ze9wjnvu4rpg9d7nh3t698cxdt0cr9"
);
// EXAMPLE: Get current price and creator of the token
console.log({
  price: token.lastPrice,
  creatorAddress: token.creatorAddress,
});

REPL test environment

To test the gateway in a JS REPL, you can simply run:

npm run repl

You should see an interactive javascript REPL environment, where you can test the functions in realtime.

Bildschirmfoto 2024-10-15 um 15 43 58

Keywords

radix

FAQs

Package last updated on 23 Apr 2025

Did you know?

Socket

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.

Install

Related posts