Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

depay-blockchain-token

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

depay-blockchain-token - npm Package Compare versions

Comparing version 0.10.0 to 0.11.0

6

dist/cjs/index.js

@@ -165,2 +165,8 @@ 'use strict';

Token.BigNumber = async ({ amount, blockchain, address }) => {
let token = new Token({ blockchain, address });
let decimals = await token.decimals();
return ethers.ethers.BigNumber.from(amount).mul(ethers.ethers.BigNumber.from(10).pow(decimals))
};
exports.Token = Token;

@@ -161,2 +161,8 @@ import { call } from 'depay-blockchain-call';

Token.BigNumber = async ({ amount, blockchain, address }) => {
let token = new Token({ blockchain, address });
let decimals = await token.decimals();
return ethers.BigNumber.from(amount).mul(ethers.BigNumber.from(10).pow(decimals))
};
export { Token };

@@ -164,2 +164,8 @@ (function (global, factory) {

Token.BigNumber = async ({ amount, blockchain, address }) => {
let token = new Token({ blockchain, address });
let decimals = await token.decimals();
return ethers.ethers.BigNumber.from(amount).mul(ethers.ethers.BigNumber.from(10).pow(decimals))
};
exports.Token = Token;

@@ -166,0 +172,0 @@

2

package.json
{
"name": "depay-blockchain-token",
"moduleName": "BlockchainToken",
"version": "0.10.0",
"version": "0.11.0",
"description": "JavaScript library providing basic functionalities to work with tokens.",

@@ -6,0 +6,0 @@ "main": "dist/cjs/index.js",

@@ -29,3 +29,3 @@ ## Quickstart

### initalize
### initalize (new)

@@ -65,2 +65,14 @@ ```javascript

### BigNumber
Provides the BigNumber amount for a given token (based on the tokens decimals) based on a humand readable amount:
```javascript
Token.BigNumber({
amount: 1,
blockchain: 'ethereum',
address: '0xa0bed124a09ac2bd941b10349d8d224fe3c955eb'
}) // BigNumber '1000000000000000000'
```
## Development

@@ -67,0 +79,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc