Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# ZNN TypeScript SDK

[![Version](https://img.shields.io/github/v/tag/digitalSloth/znn-typescript-sdk?label=version)](https://github.com/digitalSloth/znn-typescript-sdk/tags)
[![Tests](https://github.com/digitalSloth/znn-typescript-sdk/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/digitalSloth/znn-typescript-sdk/actions/workflows/tests.yml)
[![Coverage](https://github.com/digitalSloth/znn-typescript-sdk/actions/workflows/coverage.yml/badge.svg?branch=main)](https://github.com/digitalSloth/znn-typescript-sdk/actions/workflows/coverage.yml)

Expand Down
8 changes: 6 additions & 2 deletions docs/utilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,13 @@ console.log('Empty hash:', EMPTY_HASH.toString());
- QSR: 8 decimals

```javascript
import { extractNumberDecimals } from 'znn-typescript-sdk';
import { extractNumberDecimals, addNumberDecimals } from 'znn-typescript-sdk';

const znnAmount = extractNumberDecimals(1, 8); // 1 ZNN = 100000000
// Converts humand readable number to non-fractional number
const znnAmount = extractNumberDecimals(1, 8);

// Converts non-fractional number to humand readable number
const dispplayValue = addNumberDecimals(100000000, 8);
```
---

Expand Down
Loading