@depay/web3-payments
Advanced tools
Comparing version 9.2.0 to 9.3.0
{ | ||
"name": "@depay/web3-payments", | ||
"moduleName": "Web3Payments", | ||
"version": "9.2.0", | ||
"version": "9.3.0", | ||
"description": "JavaScript library to scan crypto wallets for liquefiable assets and calculate most cost-effective payment routing.", | ||
@@ -6,0 +6,0 @@ "main": "dist/umd/index.js", |
@@ -76,2 +76,26 @@ ## Quickstart | ||
#### fromToken + fromAmount + toToken | ||
In cases where you want to set the `fromToken` and `fromAmount` (instead of the target token and the target amount) when calculating payment routes you can pass `fromToken`, `fromAmount` + `toToken`. | ||
Make sure to NOT pass `token` nor `amount` if you use that option! | ||
```javascript | ||
import { route } from '@depay/web3-payments' | ||
let paymentRoutes = await route({ | ||
accept: [ | ||
{ | ||
blockchain: 'bsc', | ||
fromAmount: 1, | ||
fromToken: '0xe9e7cea3dedca5984780bafc599bd69add087d56', | ||
toToken: '0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb', | ||
fromAddress: '0x5Af489c8786A018EC4814194dC8048be1007e390', | ||
toAddress: '0xb0252f13850a4823706607524de0b146820F2240' | ||
} | ||
], | ||
apiKey: 'YOUR-API-KEY' | ||
}) | ||
``` | ||
#### Pay into Smart Contracts | ||
@@ -78,0 +102,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
327834
9382
387