1.3.16 • Published 3 years ago

@pylon-protocol/sdk v1.3.16

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@pylon-protocol/sdk

Github Actions Status NPM

Official Javascript & Typescript SDK to interact with Pylon Protocol.

Getting Started

Installing Pylon Protocol SDK

 $ yarn add @pylon-protocol/sdk

Using Pylon SDK

You need to provide a LCDClient instance on Pylon constructor.

import { LCDClient } from '@terra-money/terra.js';
import { Pylon } from '@pylon-protocol/sdk';

const lcd = new LCDClient({
  URL: 'https://columbus-lcd.terra.dev',
  chainID: 'columbus-5',
  isClassic: true,
});

const pylon = new Pylon(lcd);

Interacting with Pylon Gateway

Listing Projects in Pylon Gateway

const projects = await pylon.gateway.listProjects();

const mine = projects.find((project) => project.symbol === 'MINE');
console.log(mine);

// {
//   "type": "token",
//   "symbol": "MINE",
//   "name": "Pylon Protocol",
//   ...

Deposit into Project

const mine = await pylon.gateway.getProject('MINE');
const { transactions } = await mine.pools['A'].deposit(myWallet.address, 10_000 /* UST */);

console.log(await mine.pools['A'].statusOf(myWallet.address)]);
// {
//   "stakedUst": 10000,
//   "rewardTokens": 1.3233,
//   ...

Participating on the Governance

const polls = await pylon.governance.listPolls();
const transactions = await pylon.governance.createPoll(myAddress, '[General] Example poll', ...)

References

License: MIT

1.3.13

3 years ago

1.3.14

3 years ago

1.3.15

3 years ago

1.3.16

3 years ago

1.3.11

3 years ago

1.3.12

3 years ago

1.3.10

3 years ago

1.3.9

3 years ago

1.3.8

3 years ago

1.3.7

3 years ago

1.3.6

3 years ago

1.3.5

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.0

3 years ago

1.3.0-beta.3

3 years ago

1.3.0-beta.4

3 years ago

1.3.0-beta.5

3 years ago

1.3.0-beta.6

3 years ago

1.3.0-beta.7

3 years ago

1.3.0-beta.8

3 years ago

1.3.0-beta.9

3 years ago

1.2.8

3 years ago

1.2.7

3 years ago

1.2.6

3 years ago

1.2.12

3 years ago

1.2.13

3 years ago

1.2.10

3 years ago

1.2.11

3 years ago

1.2.16

3 years ago

1.2.17

3 years ago

1.2.14

3 years ago

1.2.15

3 years ago

1.3.0-beta.0

3 years ago

1.2.9

3 years ago

1.2.5

3 years ago

1.2.0

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.1.12

3 years ago

1.1.16

3 years ago

1.1.15

3 years ago

1.1.14

3 years ago

1.1.13

3 years ago

1.1.18

3 years ago

1.1.17

3 years ago

1.1.11

3 years ago

1.1.9

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.10

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.1

3 years ago

1.0.19

3 years ago

1.1.0

3 years ago

1.1.2

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.9

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.3

3 years ago

1.0.0

3 years ago