New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@swapkit/plugin-evm

Package Overview
Dependencies
Maintainers
0
Versions
148
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@swapkit/plugin-evm - npm Package Compare versions

Comparing version 1.1.28 to 1.1.29

4

dist/index.js

@@ -1,3 +0,3 @@

import{ApproveMode as X,AssetValue as G,EVMChains as Y,ProviderName as j,SwapKitError as L}from"@swapkit/helpers";function x({getWallet:Q}){async function Z({route:b,feeOptionKey:H}){const{tx:q,sellAsset:B}=b,D=(await G.from({asset:B,asyncTokenLookup:!0})).chain,J=Q(D);if(!(Y.includes(D)&&q))throw new L("core_swap_invalid_params");const{from:F,to:T,data:z}=q;return J.sendTransaction({from:F,to:T,data:z,value:BigInt(q.value)},H)}function R({assetValue:b,spenderAddress:H,type:q="checkOnly"}){const{address:B,chain:I,isGasAsset:D,isSynthetic:J}=b,F=Y.includes(I);if(F&&D||!F||J)return Promise.resolve(q==="checkOnly"?!0:"approved");const z=Q(I);if(!z)throw new L("core_wallet_connection_not_found");const k=q==="checkOnly"?z.isApproved:z.approve,U=z.address;if(!(B&&U))throw new L("core_approve_asset_address_or_from_not_found");return k({amount:b.getBaseValue("bigint"),assetAddress:B,from:U,spenderAddress:H})}function _(b){return R({...b,type:X.Approve})}function $(b){return R({...b,type:X.CheckOnly})}return{swap:Z,approveAssetValue:_,isAssetValueApproved:$,supportedSwapkitProviders:[j.ONEINCH,j.PANCAKESWAP,j.PANGOLIN_V1,j.SUSHISWAP_V2,j.TRADERJOE_V2,j.UNISWAP_V2,j.UNISWAP_V3]}}var f={evm:{plugin:x}};export{f as EVMPlugin};
import{ApproveMode as X,AssetValue as G,EVMChains as Y,ProviderName as j,SwapKitError as L}from"@swapkit/helpers";function x({getWallet:Q}){async function Z({route:b,feeOptionKey:H}){let{tx:q,sellAsset:B}=b,D=(await G.from({asset:B,asyncTokenLookup:!0})).chain,J=Q(D);if(!(Y.includes(D)&&q))throw new L("core_swap_invalid_params");let{from:F,to:T,data:z}=q;return J.sendTransaction({from:F,to:T,data:z,value:BigInt(q.value)},H)}function R({assetValue:b,spenderAddress:H,type:q="checkOnly"}){let{address:B,chain:I,isGasAsset:D,isSynthetic:J}=b,F=Y.includes(I);if(F&&D||!F||J)return Promise.resolve(q==="checkOnly"?!0:"approved");let z=Q(I);if(!z)throw new L("core_wallet_connection_not_found");let k=q==="checkOnly"?z.isApproved:z.approve,U=z.address;if(!(B&&U))throw new L("core_approve_asset_address_or_from_not_found");return k({amount:b.getBaseValue("bigint"),assetAddress:B,from:U,spenderAddress:H})}function _(b){return R({...b,type:X.Approve})}function $(b){return R({...b,type:X.CheckOnly})}return{swap:Z,approveAssetValue:_,isAssetValueApproved:$,supportedSwapkitProviders:[j.ONEINCH,j.PANCAKESWAP,j.PANGOLIN_V1,j.SUSHISWAP_V2,j.TRADERJOE_V2,j.UNISWAP_V2,j.UNISWAP_V3]}}var f={evm:{plugin:x}};export{f as EVMPlugin};
//# debugId=815442AFA752C6BF64756E2164756E21
//# debugId=D6B8CBAA0563AC8D64756E2164756E21
{
"author": "swapkit-oss",
"dependencies": {
"@swapkit/api": "1.9.5",
"@swapkit/helpers": "1.13.2",
"@swapkit/toolbox-evm": "1.5.7"
"@swapkit/api": "1.9.6",
"@swapkit/helpers": "1.13.3",
"@swapkit/toolbox-evm": "1.5.8"
},

@@ -31,3 +31,3 @@ "description": "SwapKit Plugin - EVM",

"types": "./src/index.ts",
"version": "1.1.28"
"version": "1.1.29"
}

Sorry, the diff of this file is not supported yet

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