Skip to content

Creit-Tech/Stellar-SEP-0040-JS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stellar SEP-0040

A simple library to call oracle methods from SEP-0040.

Install

# Node
npx jsr add @creit-tech/stellar-sep-0040

# Deno
deno add jsr:@creit-tech/stellar-sep-0040

You can check more installation options in the JSR package.

How to use

import { Oracle } from "@creit-tech/stellar-sep-0040";

const oracle: Oracle = new Oracle({ oracleId: "CAFJZQWSED6YAWZU3GWRTOCNPPCGBN32L7QV43XX5LZLFTK6JLN34DLN" });
const [price, timestamp] = await oracle.lastPrice({ asset: [AssetType.Other, "BTC"] });
console.log(`BTC price: ${price}`);

License

Licensed under the MIT License, Copyright © 2025-present Creit Tech.

Check out the LICENSE.md file for more details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published