@nfttrader-io/sdk-js
Advanced tools
Comparing version
{ | ||
"name": "@nfttrader-io/sdk-js", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "The NFT Trader official javascript SDK.", | ||
@@ -5,0 +5,0 @@ "main": "dist/nfttrader-sdk.js", |
@@ -17,3 +17,3 @@ # NFT Trader Javascript SDK | ||
Using local js file: | ||
Using local js file (copy the file under dist folder): | ||
@@ -120,3 +120,5 @@ ```html | ||
```js | ||
const ethers = require("ethers") | ||
const sdk = new NFTTraderSDK({ | ||
ethers : ethers, //you need to provide the instance of ethers js library | ||
jsonRpcProvider : 'RPC_URL_PROVIDER', //example: infura | ||
@@ -145,2 +147,3 @@ network : 'NETWORK', //example: 'MAINNET', 'RINKEBY', 'KOVAN', 'POLYGON', 'MUMBAI', 'GOERLI', 'ROPSTEN', 'XDAI' | ||
const sdk = new NFTTraderSDK({ | ||
ethers : ethers, //you need to provide the instance of ethers js library | ||
web3Provider : window.ethereum, | ||
@@ -150,3 +153,2 @@ network : 'NETWORK', //example: 'MAINNET', 'RINKEBY', 'KOVAN', 'POLYGON', 'MUMBAI', 'GOERLI', 'ROPSTEN', 'XDAI' | ||
const ethers = sdk.getEthersJSInstance() | ||
provider = new ethers.providers.Web3Provider(window.ethereum) | ||
@@ -153,0 +155,0 @@ await provider.send('eth_requestAccounts', []) |
@@ -8,2 +8,3 @@ const { swap, contractAbi, erc721Abi } = require("./contracts") | ||
* @param {Object} obj - configuration object for the SDK instance. | ||
* @param {Ethers} obj.ethers - the ethers instance | ||
* @param {Provider} obj.web3Provider - the handler object for the interaction with the chain. | ||
@@ -10,0 +11,0 @@ * @param {string} obj.jsonRpcProvider - the RPC provider URL. |
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
820
0.24%0
-100%237449
-61.39%