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,
radixMemeAddressbook
} from "radix-meme-gateway";
console.log(radixMemeAddressbook);
const radixMemeGateway = createRadixMemeGateway(
Network.STOKENET,
radixMemeAddressbook.STOKENET.latest.componentAddress
);
console.log(radixMemeGateway.getConfig());
API endpoints
const tokens = await radixMemeGateway.getAllTokens();
const token = await radixMemeGateway.getToken(
"component_tdx_2_1cqcfndu8u4658fw68lu272sm0mwf38ms5p9dchpskn9rxwptpu05k4"
);
const events = await radixMemeGateway.getLatestRadixMemeTransactions();
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](https://github.com/user-attachments/assets/4b369bfa-e3e7-4fab-b53a-4d94b23479b9)