1.1.1 • Published 5 years ago

avalanche-ts v1.1.1

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

avalanche-ts

Retrieve transaction by id

import { rpc } from "avalanche-ts"

const txID = "2k2ZFBdBdMGZqonGh8WHsHbKYNPHM2cAjY9etRK2vcdP5Eda4m";
rpc.avm.getTx({ txID }).then((res: any) => {
  console.log(res);
});

Retrieve addresses, private key and public key by mnemonic

import { wallet } from "avalanche-ts"

const mnemonic = "chaos zoo actress bicycle pretty sad version crush sail trim found syrup wealth employ exercise...";
const keysGenerator = wallet.keysGenerator({ mnemonic });
const index = 0;
console.log(keysGenerator(index));

Calculate rewards

import { stats } from "avalanche-ts"

stats.calculateReward({
    stakedAmount: 2000*10**9,
    durationInMs: 2592000000,
}).then(rewards => console.log({ rewards }));
1.1.1

5 years ago

1.1.0

5 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.9

6 years ago

1.0.10

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.2

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago