1.1.1 • Published 3 years ago

avalanche-ts v1.1.1

Weekly downloads
1
License
ISC
Repository
-
Last release
3 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

3 years ago

1.1.0

3 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.9

4 years ago

1.0.10

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.2

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago