fusion-sdk
/
1.0.1-rc.37
fusion-sdk 1.0.1-rc.37
Install from the command line:
Learn more about npm packages
$ npm install @1inch/fusion-sdk@1.0.1-rc.37
Install via package.json:
"@1inch/fusion-sdk": "1.0.1-rc.37"
About this version
npm install @1inch/fusion-sdk
yarn add @1inch/fusion-sdk
const makerPrivateKey = '0x123....'
const makerAddress = '0x123....'
const nodeUrl = '....'
const blockchainProvider = new PrivateKeyProviderConnector(
makerPrivateKey,
new Web3(nodeUrl)
)
const sdk = new FusionSDK({
url: 'https://api.1inch.dev/fusion',
network: 1,
blockchainProvider,
authKey: 'your-auth-key'
})
sdk.placeOrder({
fromTokenAddress: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', // WETH
toTokenAddress: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', // USDC
amount: '50000000000000000', // 0.05 ETH
walletAddress: makerAddress
}).then(console.log)
settleOrders
function usage and Resolver contract examples you can find here
Language | Link | Type |
---|---|---|
rust | frolovdev/fusion-sdk-rs | Community driven |
Details
- fusion-sdk
- 1inch
- 7 months ago
- 35 dependencies
Assets
- fusion-sdk-1.0.1-rc.37.tgz
Download activity
- Total downloads 1
- Last 30 days 0
- Last week 0
- Today 0