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

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.9

5 years ago

1.0.10

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.2

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago