Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lido-terra-sdk/facade

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lido-terra-sdk/facade

Contract queries and query builder for Lido Terra Finance projects. Part of [Lido JS SDK](https://github.com/lidofinance/lido-terra-js-sdk/#readme)

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
increased by500%
Maintainers
1
Weekly downloads
 
Created
Source

Facade

Contract queries and query builder for Lido Terra Finance projects. Part of Lido JS SDK

Install

yarn add @lido-terra-sdk/facade

Address provider

import { CHAIN, NETWORK, NETWORK_URL } from '@lido-terra-sdk/constants';
import { LCDClient } from '@terra-money/terra.js';
import { LidoTerraAddressProvider } from '@lido-terra-sdk/facade';
const lcd = new LCDClient({
  URL: NETWORK_URL[NETWORK.TESTNET],
  chainID: CHAIN[NETWORK.TESTNET].BOMBAY12,
});

const addressProvider = new LidoTerraAddressProvider(NETWORK.TESTNET, lcd);
const { hub, airdropRegistryContract } = await addressProvider.getAddresses();

Contract queries

Source

Hub

import { CHAIN, NETWORK, NETWORK_URL } from '@lido-terra-sdk/constants';
import { LCDClient } from '@terra-money/terra.js';
import { LidoTerraAddressProvider } from '@lido-terra-sdk/facade';

const lcd = new LCDClient({
  URL: NETWORK_URL[NETWORK.TESTNET],
  chainID: CHAIN[NETWORK.TESTNET].BOMBAY12,
});
const addressProvider = new LidoTerraAddressProvider(NETWORK.TESTNET, lcd);
const contract = new LidoTerraHub(NETWORK.TESTNET, lcd, addressProvider);
const config = await contract.getConfig();

bLuna token

import { CHAIN, NETWORK, NETWORK_URL } from '@lido-terra-sdk/constants';
import { LCDClient } from '@terra-money/terra.js';
import {
  LidoTerraAddressProvider,
  LidoTerraBLunaToken,
} from '@lido-terra-sdk/facade';

const lcd = new LCDClient({
  URL: NETWORK_URL[NETWORK.TESTNET],
  chainID: CHAIN[NETWORK.TESTNET].BOMBAY12,
});
const addressProvider = new LidoTerraAddressProvider(NETWORK.TESTNET, lcd);
const contract = new LidoTerraBLunaToken(NETWORK.TESTNET, lcd, addressProvider);
const config = await contract.getConfig();

stLuna token

import { CHAIN, NETWORK, NETWORK_URL } from '@lido-terra-sdk/constants';
import { LCDClient } from '@terra-money/terra.js';
import {
  LidoTerraAddressProvider,
  LidoTerraStLunaToken,
} from '@lido-terra-sdk/facade';

const lcd = new LCDClient({
  URL: NETWORK_URL[NETWORK.TESTNET],
  chainID: CHAIN[NETWORK.TESTNET].BOMBAY12,
});
const addressProvider = new LidoTerraAddressProvider(NETWORK.TESTNET, lcd);
const contract = new LidoTerraStLunaToken(
  NETWORK.TESTNET,
  lcd,
  addressProvider,
);
const config = await contract.getConfig();

Validators registry

import { CHAIN, NETWORK, NETWORK_URL } from '@lido-terra-sdk/constants';
import { LCDClient } from '@terra-money/terra.js';
import {
  LidoTerraAddressProvider,
  LidoTerraValidatorsRegistry,
} from '@lido-terra-sdk/facade';

const lcd = new LCDClient({
  URL: NETWORK_URL[NETWORK.TESTNET],
  chainID: CHAIN[NETWORK.TESTNET].BOMBAY12,
});
const addressProvider = new LidoTerraAddressProvider(NETWORK.TESTNET, lcd);
const contract = new LidoTerraValidatorsRegistry(
  NETWORK.TESTNET,
  lcd,
  addressProvider,
);
const config = await contract.getConfig();

Rewards contract

import { CHAIN, NETWORK, NETWORK_URL } from '@lido-terra-sdk/constants';
import { LCDClient } from '@terra-money/terra.js';
import {
  LidoTerraAddressProvider,
  LidoTerraRewards,
} from '@lido-terra-sdk/facade';

const lcd = new LCDClient({
  URL: NETWORK_URL[NETWORK.TESTNET],
  chainID: CHAIN[NETWORK.TESTNET].BOMBAY12,
});
const addressProvider = new LidoTerraAddressProvider(NETWORK.TESTNET, lcd);
const contract = new LidoTerraRewards(NETWORK.TESTNET, lcd, addressProvider);
const config = await contract.getConfig();

Airdrop registry

import { CHAIN, NETWORK, NETWORK_URL } from '@lido-terra-sdk/constants';
import { LCDClient } from '@terra-money/terra.js';
import {
  LidoTerraAirdropRegistry,
  LidoTerraRewards,
} from '@lido-terra-sdk/facade';

const lcd = new LCDClient({
  URL: NETWORK_URL[NETWORK.TESTNET],
  chainID: CHAIN[NETWORK.TESTNET].BOMBAY12,
});
const addressProvider = new LidoTerraAirdropRegistry(NETWORK.TESTNET, lcd);
const contract = new LidoTerraRewards(NETWORK.TESTNET, lcd, addressProvider);
const config = await contract.getConfig();

FAQs

Package last updated on 28 Dec 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc