@swapkit/core 5.2.3 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/index.js +1 -1
- package/dist/types/index.d.ts +333 -27
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @swapkit/core
|
|
2
2
|
|
|
3
|
+
## 5.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#460](https://github.com/swapkit/sdk/pull/460) [`9190931`](https://github.com/swapkit/sdk/commit/9190931bb2c1f911543a22cb8ccc91e3913cfe6c) Thanks [@hippocampusSK](https://github.com/hippocampusSK)! - Add limit orders. A `SwapKit` instance with the `swapkit` plugin exposes `swapKit.limitOrder`: `tokens`, `quote`, `build`, `sign`, `submit`, `execute`, `list`, `get`, `allowedProviders` and `canSign`, plus `cancel.build`, `cancel.sign`, `cancel.submit` and `cancel.execute`. `execute({ build })` signs a built order with the connected wallet and submits it in one step; `cancel.execute(orderId)` does the same for a cancellation.
|
|
8
|
+
- [#460](https://github.com/swapkit/sdk/pull/460) [`9190931`](https://github.com/swapkit/sdk/commit/9190931bb2c1f911543a22cb8ccc91e3913cfe6c) Thanks [@hippocampusSK](https://github.com/hippocampusSK)! - `SwapKitApi` now covers the full limit-order API: `getLimitOrderTokens`, `getLimitOrderQuote`, `buildLimitOrder`, `submitLimitOrder`, `getLimitOrders`, `getLimitOrder`, `buildLimitOrderCancel` and `submitLimitOrderCancel`, with typed responses and `LimitOrderStatus` and `LimitOrderTxType` constants. `getLimitOrderQuote` accepts an optional `providers` list to restrict the quote to those providers. Each call can be overridden through `SKConfig.endpoints`. (via @swapkit/helpers@6.4.0)
|
|
9
|
+
- [#467](https://github.com/swapkit/sdk/pull/467) [`6ddbd12`](https://github.com/swapkit/sdk/commit/6ddbd12b87af88d304aa575518970214ca4516e9) Thanks [@ice-chillios](https://github.com/ice-chillios)! - `getTokenAddress` and `getChecksumAddressFromAsset` now use `isGasAsset`, so `MONAD.MON`, `XLAYER.OKB` and `GNO.xDAI` resolve to the native asset address instead of returning `null` or throwing. Identifiers that repeat the chain name on a chain whose gas asset has another ticker, such as `ARB.ARB` or `BSC.BSC`, no longer resolve to the native asset address. `ContractAddress[Chain.Optimism]` is now the zero address, like every EVM chain except Polygon, so `OP.ETH` resolves to the zero address instead of the OP token contract (`0x4200000000000000000000000000000000000042`). `OP.OP` without an address still resolves to the OP token contract. The Botanix toolbox now targets the Botanix network instead of Sonic. (via @swapkit/helpers@6.4.0)
|
|
10
|
+
- [#474](https://github.com/swapkit/sdk/pull/474) [`f107064`](https://github.com/swapkit/sdk/commit/f10706478e42440912a009b011b92b4e345104f8) Thanks [@ice-chillios](https://github.com/ice-chillios)! - The TON toolbox spaces out and retries its requests to the public Toncenter endpoint, which allows about one request per second without an API key, so TON jetton sales such as TON.USDT are much less likely to fail there. Requests to the chain's default endpoints start at least 1.1 seconds apart, through a queue shared by every toolbox in the process. Waits therefore grow with concurrent TON activity; for servers and other high-volume use, configure a custom TON RPC or a Toncenter API key, which is not spaced out. The endpoint health check is not queued. A request rejected with 429 or a gateway error (502 and above) is sent again after 1, 2 and 4 seconds. A node's 500 answer, such as a rejected message, a timeout and a network failure fail at once. A jetton lookup that the RPC does not answer is reported as `helpers_chain_rpc_connection_failed` instead of `core_swap_contract_not_found`. A toolbox looks up each jetton wallet address only once per jetton and owner. (via @swapkit/helpers@6.4.0)
|
|
11
|
+
- [#464](https://github.com/swapkit/sdk/pull/464) [`c20cc10`](https://github.com/swapkit/sdk/commit/c20cc10b4534c7948dfe4b57f29e07f1b183f1ca) Thanks [@github-actions](https://github.com/apps/github-actions)! - Update generated token lists. (via @swapkit/helpers@6.4.0)
|
|
12
|
+
- [#460](https://github.com/swapkit/sdk/pull/460) [`9190931`](https://github.com/swapkit/sdk/commit/9190931bb2c1f911543a22cb8ccc91e3913cfe6c) Thanks [@hippocampusSK](https://github.com/hippocampusSK)! - The keystore can now sign Bitcoin messages (BIP-137) and declares the `btcMessage` capability for Bitcoin, so flows that need a Bitcoin signed message, like cancelling a Harbor Bitcoin limit order, work with it. (via @swapkit/toolboxes@6.5.0)
|
|
13
|
+
- [#460](https://github.com/swapkit/sdk/pull/460) [`9190931`](https://github.com/swapkit/sdk/commit/9190931bb2c1f911543a22cb8ccc91e3913cfe6c) Thanks [@hippocampusSK](https://github.com/hippocampusSK)! - EVM transactions that carry only a legacy `gasPrice` are now sent as legacy transactions instead of failing on chains that support EIP-1559. (via @swapkit/toolboxes@6.5.0)
|
|
14
|
+
- [#468](https://github.com/swapkit/sdk/pull/468) [`8062907`](https://github.com/swapkit/sdk/commit/8062907e7f2dd5a7c12f436b9ee3a2b5fad66e15) Thanks [@ice-chillios](https://github.com/ice-chillios)! - The TON toolbox no longer falls back to Orbs TON Access when every configured TON RPC fails. That service no longer returns any nodes, so the fallback itself failed with an unclear error. Now the toolbox throws `helpers_chain_rpc_connection_failed`, and jetton transfers and sweeps report that error instead of `core_swap_contract_not_found`. Set a working endpoint with `SKConfig.setRpcUrl(Chain.Ton, [...])` or pass `provider` to the toolbox. The `@orbs-network/ton-access` dependency is removed. (via @swapkit/toolboxes@6.5.0)
|
|
15
|
+
- [#465](https://github.com/swapkit/sdk/pull/465) [`d03591d`](https://github.com/swapkit/sdk/commit/d03591dd257fb2735d1ce1eb72540e11082a084e) Thanks [@towanTG](https://github.com/towanTG)! - Zcash transactions keep working through the NU7 network upgrade (mainnet block 3,543,405, around 5 November 2026), which rejects version 4 transactions. From the activation block on, the Zcash toolbox builds version 5 transactions with the NU7 consensus branch id `0x77190ad9`; before it, nothing changes. If the block height can't be fetched, building a Zcash transaction now fails with `toolbox_utxo_api_error` instead of guessing the format, because a guess on the wrong side of an upgrade produces a transaction the network rejects. `@swapkit/utxo-signer` can now build, sign, parse and compute the txid of transparent version 5 transactions, including version 5 PSBTs and PCZTs, and exports `getZcashTransactionFormat` and `ZCASH_NU7_ACTIVATION_HEIGHT`. Parsing a raw Zcash transaction now keeps input txids in the right byte order, so re-serializing it no longer changes them. (via @swapkit/toolboxes@6.5.0)
|
|
16
|
+
|
|
17
|
+
## 5.3.0
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- [#459](https://github.com/swapkit/sdk/pull/459) [`29bda2c`](https://github.com/swapkit/sdk/commit/29bda2c7a7f69112fc9403c042cb4aee7c2010a5) Thanks [@hippocampusSK](https://github.com/hippocampusSK)! - Wallets now declare all their signing capabilities per chain in one `signingSupport` map on `createWallet`: `direct` (signs the transaction the API builds for a route), `typedData` (EIP-712) and `btcMessage` (BIP-137), with the names exported as `SigningCapability`. Undeclared capabilities count as unsupported, and each connected chain wallet carries its capabilities as `signing`. Use `walletSupportsDirectSigning(wallet)` to check for direct signing; it understands wallets from both old and new connectors.
|
|
22
|
+
- [#462](https://github.com/swapkit/sdk/pull/462) [`adf132c`](https://github.com/swapkit/sdk/commit/adf132ce1b856153be10f132372cb4fd6cabe7d6) Thanks [@hippocampusSK](https://github.com/hippocampusSK)! - EVM wallets wrapped by `prepareNetworkSwitch` now switch to the chain's network before `signTypedData`, as they already do before sending a transaction. A refused or impossible switch fails with `helpers_failed_to_switch_network` before anything is signed. Message signing (`signMessage`) is unchanged. (via @swapkit/helpers@6.3.0)
|
|
23
|
+
- [#457](https://github.com/swapkit/sdk/pull/457) [`59568bc`](https://github.com/swapkit/sdk/commit/59568bcafbe907e7efa3a6ee0eb55a8c2500bac4) Thanks [@hippocampusSK](https://github.com/hippocampusSK)! - EVM `signTypedData` now accepts standard EIP-712 payloads that include `EIP712Domain` in `types`, as wallets and backends produce them for `eth_signTypedData_v4`. Such payloads previously threw; callers no longer need to strip `EIP712Domain` before signing. If the declared `EIP712Domain` does not exactly match the fields of `domain` (names, types and canonical order), signing rejects with `toolbox_evm_typed_data_domain_mismatch` instead of signing a different domain. Payloads without it sign exactly as before. (via @swapkit/helpers@6.3.0)
|
|
24
|
+
- [#453](https://github.com/swapkit/sdk/pull/453) [`e8988db`](https://github.com/swapkit/sdk/commit/e8988dbd06040f6b134163e7d9cba1910b9ee711) Thanks [@github-actions](https://github.com/apps/github-actions)! - Update generated token lists. (via @swapkit/helpers@6.3.0)
|
|
25
|
+
- [#452](https://github.com/swapkit/sdk/pull/452) [`8f3ecb0`](https://github.com/swapkit/sdk/commit/8f3ecb0522e2433f38012277446fd56ba1a223c5) Thanks [@hippocampusSK](https://github.com/hippocampusSK)! - The Sui toolbox now talks to Sui over gRPC instead of JSON-RPC, which Sui's public fullnodes stopped serving. Balances, transfers, sweeps, fee estimates and swaps from Sui work again with the default RPC. A custom Sui RPC set in `rpcUrls` must now serve gRPC. (via @swapkit/toolboxes@6.4.1)
|
|
26
|
+
|
|
3
27
|
## 5.2.3
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var S=((l)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(l,{get:(g,y)=>(typeof require<"u"?require:g)[y]}):l)(function(l){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+l+'" is not supported')});import{ApproveMode as P,AssetValue as d,Chain as m,CosmosChains as ae,EVMChains as N,ProviderName as h,SKConfig as re,SwapKitError as r,UTXOChains as se,walletSupportsDirectSigning as W}from"@swapkit/helpers";import{parseTransactionValue as oe,SwapKitApi as p}from"@swapkit/helpers/api";export*from"@swapkit/helpers";var le=[h.FLASHNET,h.MAYAN,h.PACTSWAP,h.RELAY];function ue({pluginName:l,providers:g,useDirectSigning:y}){return g.some((_)=>le.includes(_))||y?"swapkit":l||g[0]}function ce(l){let g="approvalTx"in l?l.approvalTx:void 0;return g!==void 0&&"txType"in g&&g.txType==="STELLAR"?d.from({asset:l.buyAsset}):d.from({asset:l.sellAsset,value:l.sellAmount})}function fe({config:l,plugins:g,wallets:y}={}){if(l)re.set(l);let T={},_=Object.entries(g||{}).reduce((e,[n,t])=>{let i=t({getWallet:s});return e[n]=i,e},{}),E=Object.entries(y||{}).reduce((e,[n,t])=>{let i=t.connectWallet({addChain:M});return e[n]=i,e},{});function V(e){let n=e&&_[e],t=Object.values(_).find((a)=>a.supportedSwapkitProviders?.includes(e)),i=n||t;if(!i)throw new r("core_plugin_not_found");return i}function M(e){let n=s(e.chain),t=e?.balance||n?.balance||[d.from({chain:e.chain})],i={...n,...e,balance:t};return T[e.chain]=i,i}function x({pluginName:e,route:n,useDirectSigning:t}){return V(ue({pluginName:e,providers:n.providers,useDirectSigning:t}))}function K({assetValue:e,plugin:n,route:t,spenderAddress:i,type:a}){if(a===P.CheckOnly&&"isAssetValueApproved"in n)return n.isAssetValueApproved({assetValue:e,route:t,spenderAddress:i});if(a===P.Approve&&"approveAssetValue"in n)return n.approveAssetValue({assetValue:e,route:t,spenderAddress:i});throw new r({errorKey:"core_approve_asset_target_invalid",info:{message:`Target ${String(i??t?.providers[0])} cannot be used for approve operation`}})}function C({assetValue:e,type:n="checkOnly",contractAddress:t,route:i}){let a=e??(i?ce(i):void 0);if(!a)throw new r("core_approve_asset_target_invalid");let o=t??i?.meta.approvalAddress,A=i?x({route:i,useDirectSigning:W(s(a.chain))}):o&&_[o];if(A)return K({assetValue:a,plugin:A,route:i,spenderAddress:o,type:n});let R=a.chain,c=N.includes(R);if(c&&a.isGasAsset||!c||a.isSynthetic)return Promise.resolve(n==="checkOnly"?!0:"approved");let u=s(R),v=n==="checkOnly"?u.isApproved:u.approve;if(!v)throw new r("core_wallet_connection_not_found");if(!(a.address&&u.address&&typeof o==="string"))throw new r("core_approve_asset_address_or_from_not_found");return v({amount:a.getBaseValue("bigint"),assetAddress:a.address,from:u.address,spenderAddress:o})}function s(e){return T[e]}function F(){return{...T}}function D(e){return s(e)?.address||""}function B(e,n){return e instanceof d?C({assetValue:e,contractAddress:n,type:P.Approve}):C({route:e,type:P.Approve})}function I(e,n){return e instanceof d?C({assetValue:e,contractAddress:n,type:P.CheckOnly}):C({route:e,type:P.CheckOnly})}function b(e){s(e)?.disconnect?.(),delete T[e]}function G(){for(let e of Object.keys(T))b(e)}function Q(e,n){return n?k(e).then(({balance:t})=>t):s(e)?.balance||[]}async function k(e,n=!0){let t=s(e);if(!t)throw new r("core_wallet_connection_not_found");let i=await t.getBalance?.(t.address,n);return t.balance=i||[d.from({chain:e})],t}function j({route:e,pluginName:n,...t}){let i=d.from({asset:e.sellAsset}).chain,a=s(i);if(!a)throw new r("core_wallet_connection_not_found");let o=x({pluginName:n,route:e,useDirectSigning:Boolean(W(a)&&e.tx)});if("swap"in o)return o.swap({...t,route:e});throw new r("core_plugin_swap_not_found")}function w(){let e=V("swapkit");if(typeof e.limitOrderSign!=="function")throw new r({errorKey:"core_plugin_not_found",info:{method:"limitOrderSign",plugin:"swapkit"}});return e}async function H(e){let n=d.from({asset:e.sellAsset}),t=w().limitOrderAllowedProviders({sellAsset:n}),i=e.providers?t.filter((a)=>e.providers?.includes(a)):t;if(i.length===0)throw new r("plugin_swapkit_limit_order_no_signable_provider",{chain:n.chain,requestedProviders:e.providers,sellAsset:e.sellAsset});return await p.getLimitOrderQuote({...e,providers:i})}async function U(e){let{orderId:n}=e.build,t=await w().limitOrderSign(e);try{return await p.submitLimitOrder({orderId:n,...t})}catch(i){throw new r({errorKey:"plugin_swapkit_limit_order_submit_failed",info:{...t,error:i,orderId:n}},i)}}async function Y(e){let n=await p.buildLimitOrderCancel({orderId:e});if(n.orderId!==e)throw new r("plugin_swapkit_limit_order_invalid_build",{buildOrderId:n.orderId,expectedOrderId:e,reason:"Cancel build belongs to a different order"});let t=await w().limitOrderCancelSign({cancelBuild:n});try{return await p.submitLimitOrderCancel({orderId:e,...t})}catch(i){throw new r({errorKey:"plugin_swapkit_limit_order_cancel_submit_failed",info:{...t,error:i,orderId:e}},i)}}let X={allowedProviders:({sellAsset:e})=>w().limitOrderAllowedProviders({sellAsset:e}),build:p.buildLimitOrder,cancel:{build:p.buildLimitOrderCancel,canSign:({order:e})=>w().limitOrderCanCancel({order:e}),execute:Y,sign:(e)=>w().limitOrderCancelSign(e),submit:p.submitLimitOrderCancel},canSign:({sellAsset:e})=>w().limitOrderAllowedProviders({sellAsset:e}).length>0,execute:U,get:p.getLimitOrder,list:p.getLimitOrders,quote:H,sign:(e)=>w().limitOrderSign(e),submit:p.submitLimitOrder,tokens:p.getLimitOrderTokens};function q({assetValue:e,...n}){let t=e.chain;if([m.Radix].includes(t)||!s(t))throw new r("core_wallet_connection_not_found");return s(t).transfer({...n,assetValue:e})}function z({chain:e,message:n}){let t=s(e);if(!t)throw new r("core_wallet_connection_not_found");if("signMessage"in t)return t.signMessage?.(n);throw new r({errorKey:"core_wallet_sign_message_not_supported",info:{chain:e,wallet:t.walletType}})}function J({chain:e,domain:n,primaryType:t,types:i,value:a}){let o=s(e);if(!o)throw new r("core_wallet_connection_not_found");if("signTypedData"in o&&typeof o.signTypedData==="function")return o.signTypedData({domain:n,primaryType:t,types:i,value:a});throw new r({errorKey:"core_wallet_sign_typed_data_not_supported",info:{chain:e,wallet:o.walletType}})}async function Z({address:e,chain:n,message:t,signature:i}){if(n!==m.THORChain)throw new r({errorKey:"core_verify_message_not_supported",info:{chain:n}});let{getCosmosToolbox:a}=await import("@swapkit/toolboxes/cosmos");return a(n).verifySignature({address:e,message:t,signature:i})}async function ee({type:e,feeOptionKey:n,params:t}){let{assetValue:i}=t,{chain:a}=i;if(!s(a))throw new r("core_wallet_connection_not_found");let o=d.from({chain:a}),{match:A}=await import("ts-pattern");return await A(a).returnType().with(...N,(c)=>{let{address:f,...u}=s(c),v=A(e).with("transfer",()=>u.createTransferTx(t)).with("approve",(ne)=>{let{contractAddress:O}=t;return u.createApprovalTx({amount:i.getBaseValue("bigint"),assetAddress:i.address,from:f,spenderAddress:O})}).with("swap",(ne)=>{let{route:{providers:[O],tx:ie}}=t;if(O&&[h.CHAINFLIP,h.CHAINFLIP_STREAMING].includes(O))return u.createTransferTx({assetValue:i,recipient:f,sender:f});let L=ie;return{...L,value:oe(L.value)}}).otherwise(()=>{return});if(!v)return o;return u.estimateTransactionFee({...v,feeOption:n})}).with(...ae,async()=>{let{estimateTransactionFee:c}=await import("@swapkit/toolboxes/cosmos");return c(t)}).with(...se,(c)=>{let{address:f,...u}=s(c);return u.estimateTransactionFee({...t,feeOptionKey:n,recipient:f,sender:f})}).with(m.Tron,m.Ton,m.Polkadot,(c)=>{let{address:f,...u}=s(c);return u.estimateTransactionFee({...t,recipient:f,sender:f})}).with(m.Aptos,m.Cardano,m.Ripple,m.Stellar,m.Sui,(c)=>s(c).estimateTransactionFee()).otherwise(()=>o)}async function te({address:e,chain:n}){try{let{getAddressValidator:t}=await import("@swapkit/toolboxes");return(await t())({address:e,chain:n})}catch{return!1}}return{..._,...E,approveAssetValue:B,disconnectAll:G,disconnectChain:b,estimateTransactionFee:ee,getAddress:D,getAllWallets:F,getBalance:Q,getWallet:s,getWalletWithBalance:k,isAssetValueApproved:I,limitOrder:X,signMessage:z,signTypedData:J,swap:j,transfer:q,validateAddress:te,verifyMessage:Z}}export{fe as SwapKit,ce as getRouteApprovalAssetValue,ue as resolveRoutePluginName};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AssetValue, Chain, type ChainWallet, type ConditionalAssetValueReturn, type FeeOption, type GenericTransferParams, ProviderName as PluginNameEnum, type SKConfigState, type SwapParams } from "@swapkit/helpers";
|
|
2
|
-
import { type QuoteResponseRoute, type SwapRouteV2Response } from "@swapkit/helpers/api";
|
|
3
|
-
import type { createPlugin } from "@swapkit/plugins";
|
|
2
|
+
import { type LimitOrderQuoteRequest, type QuoteResponseRoute, type SwapRouteV2Response } from "@swapkit/helpers/api";
|
|
3
|
+
import type { createPlugin, SKPlugins } from "@swapkit/plugins";
|
|
4
4
|
import type { FullWallet } from "@swapkit/toolboxes";
|
|
5
5
|
import type { EVMCreateTransactionParams, EVMTransferParams, TypedDataField } from "@swapkit/toolboxes/evm";
|
|
6
6
|
import type { createWallet } from "@swapkit/wallet-core";
|
|
@@ -10,6 +10,8 @@ export type SwapKitParams<P, W> = {
|
|
|
10
10
|
wallets?: W;
|
|
11
11
|
};
|
|
12
12
|
type SwapRoute = QuoteResponseRoute | SwapRouteV2Response;
|
|
13
|
+
type LimitOrderPlugin = ReturnType<SKPlugins["swapkit"]>;
|
|
14
|
+
type LimitOrderSignParams = Parameters<LimitOrderPlugin["limitOrderSign"]>[0];
|
|
13
15
|
export declare function resolveRoutePluginName({ pluginName, providers, useDirectSigning, }: {
|
|
14
16
|
pluginName?: string;
|
|
15
17
|
providers: readonly PluginNameEnum[];
|
|
@@ -214,7 +216,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
214
216
|
chainId?: bigint;
|
|
215
217
|
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
216
218
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
217
|
-
signTypedData: ((
|
|
219
|
+
signTypedData: ((params: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
218
220
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
219
221
|
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
220
222
|
};
|
|
@@ -440,7 +442,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
440
442
|
chainId?: bigint;
|
|
441
443
|
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
442
444
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
443
|
-
signTypedData: ((
|
|
445
|
+
signTypedData: ((params: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
444
446
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
445
447
|
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
446
448
|
};
|
|
@@ -612,7 +614,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
612
614
|
chainId?: bigint;
|
|
613
615
|
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
614
616
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
615
|
-
signTypedData: ((
|
|
617
|
+
signTypedData: ((params: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
616
618
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
617
619
|
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
618
620
|
};
|
|
@@ -784,7 +786,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
784
786
|
chainId?: bigint;
|
|
785
787
|
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
786
788
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
787
|
-
signTypedData: ((
|
|
789
|
+
signTypedData: ((params: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
788
790
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
789
791
|
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
790
792
|
};
|
|
@@ -956,7 +958,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
956
958
|
chainId?: bigint;
|
|
957
959
|
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
958
960
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
959
|
-
signTypedData: ((
|
|
961
|
+
signTypedData: ((params: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
960
962
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
961
963
|
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
962
964
|
};
|
|
@@ -1134,7 +1136,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1134
1136
|
chainId?: bigint;
|
|
1135
1137
|
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
1136
1138
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
1137
|
-
signTypedData: ((
|
|
1139
|
+
signTypedData: ((params: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
1138
1140
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
1139
1141
|
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
1140
1142
|
};
|
|
@@ -1306,7 +1308,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1306
1308
|
chainId?: bigint;
|
|
1307
1309
|
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
1308
1310
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
1309
|
-
signTypedData: ((
|
|
1311
|
+
signTypedData: ((params: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
1310
1312
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
1311
1313
|
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
1312
1314
|
};
|
|
@@ -1478,7 +1480,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1478
1480
|
chainId?: bigint;
|
|
1479
1481
|
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
1480
1482
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
1481
|
-
signTypedData: ((
|
|
1483
|
+
signTypedData: ((params: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
1482
1484
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
1483
1485
|
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
1484
1486
|
};
|
|
@@ -1598,6 +1600,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1598
1600
|
} | undefined;
|
|
1599
1601
|
scriptType: import("@swapkit/helpers").UTXOScriptType;
|
|
1600
1602
|
signAndBroadcastTransaction: (tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>) => Promise<string>;
|
|
1603
|
+
signMessage: ((message: string) => Promise<string>) | undefined;
|
|
1601
1604
|
signTransaction: (tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>) => import("@swapkit/utxo-signer").Transaction | Promise<import("@swapkit/utxo-signer").Transaction>;
|
|
1602
1605
|
signTransactionWithMultipleKeys: ({ tx, inputDerivations, }: {
|
|
1603
1606
|
tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>;
|
|
@@ -1754,6 +1757,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1754
1757
|
index: number;
|
|
1755
1758
|
} | undefined;
|
|
1756
1759
|
scriptType: import("@swapkit/helpers").UTXOScriptType;
|
|
1760
|
+
signMessage: ((message: string) => Promise<string>) | undefined;
|
|
1757
1761
|
signTransactionWithMultipleKeys: ({ tx, inputDerivations, }: {
|
|
1758
1762
|
tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>;
|
|
1759
1763
|
inputDerivations: import("@swapkit/toolboxes/utxo/types").InputDerivation[];
|
|
@@ -1937,7 +1941,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1937
1941
|
chainId?: bigint;
|
|
1938
1942
|
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
1939
1943
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
1940
|
-
signTypedData: ((
|
|
1944
|
+
signTypedData: ((params: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
1941
1945
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
1942
1946
|
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
1943
1947
|
};
|
|
@@ -2144,7 +2148,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
2144
2148
|
chainId?: bigint;
|
|
2145
2149
|
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
2146
2150
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
2147
|
-
signTypedData: ((
|
|
2151
|
+
signTypedData: ((params: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
2148
2152
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
2149
2153
|
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
2150
2154
|
};
|
|
@@ -2316,7 +2320,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
2316
2320
|
chainId?: bigint;
|
|
2317
2321
|
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
2318
2322
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
2319
|
-
signTypedData: ((
|
|
2323
|
+
signTypedData: ((params: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
2320
2324
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
2321
2325
|
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
2322
2326
|
};
|
|
@@ -2520,7 +2524,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
2520
2524
|
chainId?: bigint;
|
|
2521
2525
|
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
2522
2526
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
2523
|
-
signTypedData: ((
|
|
2527
|
+
signTypedData: ((params: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
2524
2528
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
2525
2529
|
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
2526
2530
|
};
|
|
@@ -2640,6 +2644,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
2640
2644
|
} | undefined;
|
|
2641
2645
|
scriptType: import("@swapkit/helpers").UTXOScriptType;
|
|
2642
2646
|
signAndBroadcastTransaction: (tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>) => Promise<string>;
|
|
2647
|
+
signMessage: ((message: string) => Promise<string>) | undefined;
|
|
2643
2648
|
signTransaction: (tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>) => import("@swapkit/utxo-signer").Transaction | Promise<import("@swapkit/utxo-signer").Transaction>;
|
|
2644
2649
|
signTransactionWithMultipleKeys: ({ tx, inputDerivations, }: {
|
|
2645
2650
|
tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>;
|
|
@@ -2776,6 +2781,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
2776
2781
|
} | undefined;
|
|
2777
2782
|
scriptType: import("@swapkit/helpers").UTXOScriptType;
|
|
2778
2783
|
signAndBroadcastTransaction: (tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>) => Promise<string>;
|
|
2784
|
+
signMessage: ((message: string) => Promise<string>) | undefined;
|
|
2779
2785
|
signTransaction: (tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>) => import("@swapkit/utxo-signer").Transaction | Promise<import("@swapkit/utxo-signer").Transaction>;
|
|
2780
2786
|
signTransactionWithMultipleKeys: ({ tx, inputDerivations, }: {
|
|
2781
2787
|
tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>;
|
|
@@ -2968,7 +2974,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
2968
2974
|
chainId?: bigint;
|
|
2969
2975
|
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
2970
2976
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
2971
|
-
signTypedData: ((
|
|
2977
|
+
signTypedData: ((params: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
2972
2978
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
2973
2979
|
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
2974
2980
|
};
|
|
@@ -3140,7 +3146,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
3140
3146
|
chainId?: bigint;
|
|
3141
3147
|
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
3142
3148
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
3143
|
-
signTypedData: ((
|
|
3149
|
+
signTypedData: ((params: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
3144
3150
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
3145
3151
|
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
3146
3152
|
};
|
|
@@ -3344,7 +3350,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
3344
3350
|
chainId?: bigint;
|
|
3345
3351
|
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
3346
3352
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
3347
|
-
signTypedData: ((
|
|
3353
|
+
signTypedData: ((params: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
3348
3354
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
3349
3355
|
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
3350
3356
|
};
|
|
@@ -3544,6 +3550,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
3544
3550
|
} | undefined;
|
|
3545
3551
|
scriptType: import("@swapkit/helpers").UTXOScriptType;
|
|
3546
3552
|
signAndBroadcastTransaction: (tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>) => Promise<string>;
|
|
3553
|
+
signMessage: ((message: string) => Promise<string>) | undefined;
|
|
3547
3554
|
signTransaction: (tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>) => import("@swapkit/utxo-signer").Transaction | Promise<import("@swapkit/utxo-signer").Transaction>;
|
|
3548
3555
|
signTransactionWithMultipleKeys: ({ tx, inputDerivations, }: {
|
|
3549
3556
|
tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>;
|
|
@@ -3732,7 +3739,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
3732
3739
|
chainId?: bigint;
|
|
3733
3740
|
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
3734
3741
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
3735
|
-
signTypedData: ((
|
|
3742
|
+
signTypedData: ((params: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
3736
3743
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
3737
3744
|
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
3738
3745
|
};
|
|
@@ -3905,7 +3912,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
3905
3912
|
chainId?: bigint;
|
|
3906
3913
|
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
3907
3914
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
3908
|
-
signTypedData: ((
|
|
3915
|
+
signTypedData: ((params: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
3909
3916
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
3910
3917
|
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
3911
3918
|
};
|
|
@@ -4077,7 +4084,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
4077
4084
|
chainId?: bigint;
|
|
4078
4085
|
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
4079
4086
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
4080
|
-
signTypedData: ((
|
|
4087
|
+
signTypedData: ((params: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
4081
4088
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
4082
4089
|
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
4083
4090
|
};
|
|
@@ -4327,7 +4334,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
4327
4334
|
chainId?: bigint;
|
|
4328
4335
|
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
4329
4336
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
4330
|
-
signTypedData: ((
|
|
4337
|
+
signTypedData: ((params: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
4331
4338
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
4332
4339
|
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
4333
4340
|
};
|
|
@@ -4499,7 +4506,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
4499
4506
|
chainId?: bigint;
|
|
4500
4507
|
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
4501
4508
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
4502
|
-
signTypedData: ((
|
|
4509
|
+
signTypedData: ((params: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
4503
4510
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
4504
4511
|
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
4505
4512
|
};
|
|
@@ -4693,7 +4700,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
4693
4700
|
chainId?: bigint;
|
|
4694
4701
|
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
4695
4702
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
4696
|
-
signTypedData: ((
|
|
4703
|
+
signTypedData: ((params: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
4697
4704
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
4698
4705
|
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
4699
4706
|
};
|
|
@@ -4910,7 +4917,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
4910
4917
|
chainId?: bigint;
|
|
4911
4918
|
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
4912
4919
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
4913
|
-
signTypedData: ((
|
|
4920
|
+
signTypedData: ((params: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
4914
4921
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
4915
4922
|
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
4916
4923
|
};
|
|
@@ -5104,7 +5111,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
5104
5111
|
chainId?: bigint;
|
|
5105
5112
|
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
5106
5113
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
5107
|
-
signTypedData: ((
|
|
5114
|
+
signTypedData: ((params: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
5108
5115
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
5109
5116
|
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
5110
5117
|
};
|
|
@@ -5386,7 +5393,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
5386
5393
|
chainId?: bigint;
|
|
5387
5394
|
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
5388
5395
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
5389
|
-
signTypedData: ((
|
|
5396
|
+
signTypedData: ((params: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
5390
5397
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
5391
5398
|
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
5392
5399
|
};
|
|
@@ -5558,7 +5565,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
5558
5565
|
chainId?: bigint;
|
|
5559
5566
|
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
5560
5567
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
5561
|
-
signTypedData: ((
|
|
5568
|
+
signTypedData: ((params: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
5562
5569
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
5563
5570
|
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
5564
5571
|
};
|
|
@@ -5670,6 +5677,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
5670
5677
|
index: number;
|
|
5671
5678
|
} | undefined;
|
|
5672
5679
|
scriptType: import("@swapkit/helpers").UTXOScriptType;
|
|
5680
|
+
signMessage: ((message: string) => Promise<string>) | undefined;
|
|
5673
5681
|
signTransactionWithMultipleKeys: ({ tx, inputDerivations, }: {
|
|
5674
5682
|
tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>;
|
|
5675
5683
|
inputDerivations: import("@swapkit/toolboxes/utxo/types").InputDerivation[];
|
|
@@ -5690,6 +5698,304 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
5690
5698
|
getWallet: <T_1 extends Chain>(chain: T_1) => FullWallet[T_1];
|
|
5691
5699
|
getWalletWithBalance: <T_1 extends Chain>(chain: T_1, scamFilter?: boolean) => Promise<FullWallet[T_1]>;
|
|
5692
5700
|
isAssetValueApproved: (target: AssetValue | SwapRoute, contractAddress?: string | keyof Plugins) => Promise<boolean>;
|
|
5701
|
+
limitOrder: {
|
|
5702
|
+
allowedProviders: ({ sellAsset }: {
|
|
5703
|
+
sellAsset: AssetValue;
|
|
5704
|
+
}) => (PluginNameEnum.ONEINCH | PluginNameEnum.NEAR | PluginNameEnum.HARBOR)[];
|
|
5705
|
+
build: (json: import("@swapkit/helpers").LimitOrderBuildRequest) => Promise<{
|
|
5706
|
+
nextActions: {
|
|
5707
|
+
method: string;
|
|
5708
|
+
url: string;
|
|
5709
|
+
payload?: unknown;
|
|
5710
|
+
}[];
|
|
5711
|
+
orderHash: string;
|
|
5712
|
+
orderId: string;
|
|
5713
|
+
tx: string | Record<string, unknown> | unknown[] | {
|
|
5714
|
+
data: string;
|
|
5715
|
+
to: string;
|
|
5716
|
+
value: string;
|
|
5717
|
+
from?: string | undefined;
|
|
5718
|
+
gas?: string | undefined;
|
|
5719
|
+
gasPrice?: string | undefined;
|
|
5720
|
+
maxFeePerGas?: string | undefined;
|
|
5721
|
+
maxPriorityFeePerGas?: string | undefined;
|
|
5722
|
+
type?: string | undefined;
|
|
5723
|
+
} | null;
|
|
5724
|
+
txMeta: {
|
|
5725
|
+
txType: "evm" | "cardano" | "near" | "psbt" | "ripple" | "solana" | "starknet" | "stellar" | "sui" | "ton" | "tron";
|
|
5726
|
+
chainId?: number | undefined;
|
|
5727
|
+
memo?: string | undefined;
|
|
5728
|
+
} | null;
|
|
5729
|
+
typedData: {
|
|
5730
|
+
domain: {
|
|
5731
|
+
[x: string]: unknown;
|
|
5732
|
+
chainId: number;
|
|
5733
|
+
name: string;
|
|
5734
|
+
verifyingContract: string;
|
|
5735
|
+
version: string;
|
|
5736
|
+
};
|
|
5737
|
+
message: Record<string, unknown>;
|
|
5738
|
+
primaryType: string;
|
|
5739
|
+
types: Record<string, {
|
|
5740
|
+
name: string;
|
|
5741
|
+
type: string;
|
|
5742
|
+
}[]>;
|
|
5743
|
+
} | null;
|
|
5744
|
+
approvalTx?: {
|
|
5745
|
+
data: string;
|
|
5746
|
+
from: string;
|
|
5747
|
+
to: string;
|
|
5748
|
+
value: string;
|
|
5749
|
+
gasLimit?: string | undefined;
|
|
5750
|
+
gasPrice?: string | undefined;
|
|
5751
|
+
} | undefined;
|
|
5752
|
+
depositAddress?: string | undefined;
|
|
5753
|
+
depositAmount?: string | undefined;
|
|
5754
|
+
depositMemo?: string | undefined;
|
|
5755
|
+
isApproved?: boolean | undefined;
|
|
5756
|
+
warnings?: {
|
|
5757
|
+
code: string;
|
|
5758
|
+
display: string;
|
|
5759
|
+
tooltip?: string | undefined;
|
|
5760
|
+
}[] | undefined;
|
|
5761
|
+
}>;
|
|
5762
|
+
cancel: {
|
|
5763
|
+
build: (json: {
|
|
5764
|
+
orderId: string;
|
|
5765
|
+
}) => Promise<{
|
|
5766
|
+
btcSignaturePreimage: string | null;
|
|
5767
|
+
cancelTx: {
|
|
5768
|
+
chainId: number;
|
|
5769
|
+
data: string;
|
|
5770
|
+
from: string;
|
|
5771
|
+
to: string;
|
|
5772
|
+
value: string;
|
|
5773
|
+
} | null;
|
|
5774
|
+
nextActions: {
|
|
5775
|
+
method: string;
|
|
5776
|
+
url: string;
|
|
5777
|
+
payload?: unknown;
|
|
5778
|
+
}[];
|
|
5779
|
+
orderId: string;
|
|
5780
|
+
typedData: {
|
|
5781
|
+
domain: {
|
|
5782
|
+
[x: string]: unknown;
|
|
5783
|
+
name: string;
|
|
5784
|
+
version: string;
|
|
5785
|
+
};
|
|
5786
|
+
message: {
|
|
5787
|
+
[x: string]: unknown;
|
|
5788
|
+
action: "cancel_and_withdraw";
|
|
5789
|
+
chain: string;
|
|
5790
|
+
expiry: number;
|
|
5791
|
+
l1Address: string;
|
|
5792
|
+
nonce: number;
|
|
5793
|
+
payload: {
|
|
5794
|
+
[x: string]: unknown;
|
|
5795
|
+
orderId: string;
|
|
5796
|
+
};
|
|
5797
|
+
};
|
|
5798
|
+
primaryType: "CancelAndWithdraw";
|
|
5799
|
+
types: {
|
|
5800
|
+
[x: string]: unknown;
|
|
5801
|
+
CancelAndWithdraw: {
|
|
5802
|
+
name: string;
|
|
5803
|
+
type: string;
|
|
5804
|
+
}[];
|
|
5805
|
+
CancelAndWithdrawPayload: {
|
|
5806
|
+
name: string;
|
|
5807
|
+
type: string;
|
|
5808
|
+
}[];
|
|
5809
|
+
EIP712Domain: {
|
|
5810
|
+
name: string;
|
|
5811
|
+
type: string;
|
|
5812
|
+
}[];
|
|
5813
|
+
};
|
|
5814
|
+
} | null;
|
|
5815
|
+
}>;
|
|
5816
|
+
canSign: ({ order }: Parameters<LimitOrderPlugin["limitOrderCanCancel"]>[0]) => boolean;
|
|
5817
|
+
execute: (orderId: string) => Promise<{
|
|
5818
|
+
orderId: string;
|
|
5819
|
+
status: (string & {}) | "CANCELLED" | "EXPIRED" | "FAILED" | "FILLED" | "OPEN" | "PARTIAL" | "PENDING" | "SUBMITTED";
|
|
5820
|
+
cancelRequestedAt?: string | undefined;
|
|
5821
|
+
txHash?: string | undefined;
|
|
5822
|
+
withdrawId?: string | undefined;
|
|
5823
|
+
}>;
|
|
5824
|
+
sign: (params: Parameters<LimitOrderPlugin["limitOrderCancelSign"]>[0]) => Promise<{
|
|
5825
|
+
txHash: string;
|
|
5826
|
+
signature?: undefined;
|
|
5827
|
+
} | {
|
|
5828
|
+
signature: string;
|
|
5829
|
+
txHash?: undefined;
|
|
5830
|
+
} | {
|
|
5831
|
+
txHash?: undefined;
|
|
5832
|
+
signature?: undefined;
|
|
5833
|
+
}>;
|
|
5834
|
+
submit: (json: import("@swapkit/helpers").LimitOrderCancelSubmitRequest) => Promise<{
|
|
5835
|
+
orderId: string;
|
|
5836
|
+
status: (string & {}) | "CANCELLED" | "EXPIRED" | "FAILED" | "FILLED" | "OPEN" | "PARTIAL" | "PENDING" | "SUBMITTED";
|
|
5837
|
+
cancelRequestedAt?: string | undefined;
|
|
5838
|
+
txHash?: string | undefined;
|
|
5839
|
+
withdrawId?: string | undefined;
|
|
5840
|
+
}>;
|
|
5841
|
+
};
|
|
5842
|
+
canSign: ({ sellAsset }: {
|
|
5843
|
+
sellAsset: AssetValue;
|
|
5844
|
+
}) => boolean;
|
|
5845
|
+
execute: (params: LimitOrderSignParams) => Promise<{
|
|
5846
|
+
createdAt: string;
|
|
5847
|
+
orderHash: string;
|
|
5848
|
+
orderId: string;
|
|
5849
|
+
status: (string & {}) | "CANCELLED" | "EXPIRED" | "FAILED" | "FILLED" | "OPEN" | "PARTIAL" | "PENDING" | "SUBMITTED";
|
|
5850
|
+
}>;
|
|
5851
|
+
get: (orderId: string) => Promise<{
|
|
5852
|
+
buyAmount: string;
|
|
5853
|
+
buyAsset: string;
|
|
5854
|
+
chainId: import("@swapkit/types").ChainId | (string & {});
|
|
5855
|
+
createdAt: string;
|
|
5856
|
+
expiresAt: string;
|
|
5857
|
+
fees: {
|
|
5858
|
+
amount: string;
|
|
5859
|
+
asset: string;
|
|
5860
|
+
chain: string;
|
|
5861
|
+
protocol: (string & {}) | import("@swapkit/helpers").ProviderName;
|
|
5862
|
+
type: (string & {}) | import("@swapkit/helpers").FeeTypeEnum;
|
|
5863
|
+
amountBps?: number | undefined;
|
|
5864
|
+
}[];
|
|
5865
|
+
filledBuyAmount: string;
|
|
5866
|
+
filledSellAmount: string;
|
|
5867
|
+
limitPrice: string;
|
|
5868
|
+
maker: string;
|
|
5869
|
+
orderHash: string;
|
|
5870
|
+
orderId: string;
|
|
5871
|
+
provider: (string & {}) | import("@swapkit/helpers").ProviderName;
|
|
5872
|
+
receiver: string | null;
|
|
5873
|
+
sellAmount: string;
|
|
5874
|
+
sellAsset: string;
|
|
5875
|
+
status: (string & {}) | "CANCELLED" | "EXPIRED" | "FAILED" | "FILLED" | "OPEN" | "PARTIAL" | "PENDING" | "SUBMITTED";
|
|
5876
|
+
updatedAt: string;
|
|
5877
|
+
cancelRequestedAt?: string | undefined;
|
|
5878
|
+
depositHash?: string | undefined;
|
|
5879
|
+
txHashes?: {
|
|
5880
|
+
chainId: import("@swapkit/types").ChainId | (string & {});
|
|
5881
|
+
txHash: string;
|
|
5882
|
+
type: "fill" | (string & {}) | "cancel" | "deposit" | "withdraw" | "refund";
|
|
5883
|
+
blockNumber?: number | undefined;
|
|
5884
|
+
}[] | undefined;
|
|
5885
|
+
usdValueClose?: string | null | undefined;
|
|
5886
|
+
usdValueOpen?: string | null | undefined;
|
|
5887
|
+
withdrawHash?: string | undefined;
|
|
5888
|
+
}>;
|
|
5889
|
+
list: (query?: import("@swapkit/helpers").LimitOrderListQuery) => Promise<{
|
|
5890
|
+
orders: {
|
|
5891
|
+
buyAmount: string;
|
|
5892
|
+
buyAsset: string;
|
|
5893
|
+
chainId: import("@swapkit/types").ChainId | (string & {});
|
|
5894
|
+
createdAt: string;
|
|
5895
|
+
expiresAt: string;
|
|
5896
|
+
fees: {
|
|
5897
|
+
amount: string;
|
|
5898
|
+
asset: string;
|
|
5899
|
+
chain: string;
|
|
5900
|
+
protocol: (string & {}) | import("@swapkit/helpers").ProviderName;
|
|
5901
|
+
type: (string & {}) | import("@swapkit/helpers").FeeTypeEnum;
|
|
5902
|
+
amountBps?: number | undefined;
|
|
5903
|
+
}[];
|
|
5904
|
+
filledBuyAmount: string;
|
|
5905
|
+
filledSellAmount: string;
|
|
5906
|
+
limitPrice: string;
|
|
5907
|
+
maker: string;
|
|
5908
|
+
orderHash: string;
|
|
5909
|
+
orderId: string;
|
|
5910
|
+
provider: (string & {}) | import("@swapkit/helpers").ProviderName;
|
|
5911
|
+
receiver: string | null;
|
|
5912
|
+
sellAmount: string;
|
|
5913
|
+
sellAsset: string;
|
|
5914
|
+
status: (string & {}) | "CANCELLED" | "EXPIRED" | "FAILED" | "FILLED" | "OPEN" | "PARTIAL" | "PENDING" | "SUBMITTED";
|
|
5915
|
+
updatedAt: string;
|
|
5916
|
+
cancelRequestedAt?: string | undefined;
|
|
5917
|
+
depositHash?: string | undefined;
|
|
5918
|
+
txHashes?: {
|
|
5919
|
+
chainId: import("@swapkit/types").ChainId | (string & {});
|
|
5920
|
+
txHash: string;
|
|
5921
|
+
type: "fill" | (string & {}) | "cancel" | "deposit" | "withdraw" | "refund";
|
|
5922
|
+
blockNumber?: number | undefined;
|
|
5923
|
+
}[] | undefined;
|
|
5924
|
+
usdValueClose?: string | null | undefined;
|
|
5925
|
+
usdValueOpen?: string | null | undefined;
|
|
5926
|
+
withdrawHash?: string | undefined;
|
|
5927
|
+
}[];
|
|
5928
|
+
nextCursor?: string | undefined;
|
|
5929
|
+
}>;
|
|
5930
|
+
quote: (request: LimitOrderQuoteRequest) => Promise<{
|
|
5931
|
+
quoteId: string;
|
|
5932
|
+
routes: {
|
|
5933
|
+
buyAmount: string;
|
|
5934
|
+
buyAsset: string;
|
|
5935
|
+
effectiveFillPrice: string;
|
|
5936
|
+
integratorFeeBps: number;
|
|
5937
|
+
limitPrice: string;
|
|
5938
|
+
maxExpirationSeconds: number;
|
|
5939
|
+
minExpirationSeconds: number;
|
|
5940
|
+
provider: (string & {}) | import("@swapkit/helpers").ProviderName;
|
|
5941
|
+
routeId: string;
|
|
5942
|
+
sellAmount: string;
|
|
5943
|
+
sellAsset: string;
|
|
5944
|
+
spotPrice: string;
|
|
5945
|
+
spotPriceDeviationBps: number;
|
|
5946
|
+
takerFeeBps: number;
|
|
5947
|
+
fees?: {
|
|
5948
|
+
amount: string;
|
|
5949
|
+
asset: string;
|
|
5950
|
+
chain: string;
|
|
5951
|
+
protocol: (string & {}) | import("@swapkit/helpers").ProviderName;
|
|
5952
|
+
type: (string & {}) | import("@swapkit/helpers").FeeTypeEnum;
|
|
5953
|
+
amountBps?: number | undefined;
|
|
5954
|
+
}[] | undefined;
|
|
5955
|
+
nextActions?: {
|
|
5956
|
+
method: string;
|
|
5957
|
+
url: string;
|
|
5958
|
+
payload?: unknown;
|
|
5959
|
+
}[] | undefined;
|
|
5960
|
+
warnings?: {
|
|
5961
|
+
code: string;
|
|
5962
|
+
display: string;
|
|
5963
|
+
tooltip?: string | undefined;
|
|
5964
|
+
}[] | undefined;
|
|
5965
|
+
}[];
|
|
5966
|
+
error?: string | undefined;
|
|
5967
|
+
providerErrors?: {
|
|
5968
|
+
errorCode?: string | undefined;
|
|
5969
|
+
message?: string | undefined;
|
|
5970
|
+
provider?: (string & {}) | import("@swapkit/helpers").ProviderName | undefined;
|
|
5971
|
+
}[] | undefined;
|
|
5972
|
+
}>;
|
|
5973
|
+
sign: (params: LimitOrderSignParams) => Promise<{
|
|
5974
|
+
signature: string;
|
|
5975
|
+
depositTxHash?: undefined;
|
|
5976
|
+
} | {
|
|
5977
|
+
depositTxHash: string;
|
|
5978
|
+
signature?: undefined;
|
|
5979
|
+
}>;
|
|
5980
|
+
submit: (json: import("@swapkit/helpers").LimitOrderSubmitRequest) => Promise<{
|
|
5981
|
+
createdAt: string;
|
|
5982
|
+
orderHash: string;
|
|
5983
|
+
orderId: string;
|
|
5984
|
+
status: (string & {}) | "CANCELLED" | "EXPIRED" | "FAILED" | "FILLED" | "OPEN" | "PARTIAL" | "PENDING" | "SUBMITTED";
|
|
5985
|
+
}>;
|
|
5986
|
+
tokens: () => Promise<{
|
|
5987
|
+
crossChain: {
|
|
5988
|
+
assets: string[];
|
|
5989
|
+
chainIds: (import("@swapkit/types").ChainId | (string & {}))[];
|
|
5990
|
+
provider: (string & {}) | import("@swapkit/helpers").ProviderName;
|
|
5991
|
+
}[];
|
|
5992
|
+
singleChain: {
|
|
5993
|
+
assets: string[];
|
|
5994
|
+
chainId: import("@swapkit/types").ChainId | (string & {});
|
|
5995
|
+
provider: (string & {}) | import("@swapkit/helpers").ProviderName;
|
|
5996
|
+
}[];
|
|
5997
|
+
}>;
|
|
5998
|
+
};
|
|
5693
5999
|
signMessage: ({ chain, message }: {
|
|
5694
6000
|
chain: Chain;
|
|
5695
6001
|
message: string;
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "swapkit-dev",
|
|
3
3
|
"dependencies": {
|
|
4
|
-
"@swapkit/helpers": "6.
|
|
5
|
-
"@swapkit/plugins": "5.0
|
|
6
|
-
"@swapkit/toolboxes": "6.
|
|
7
|
-
"@swapkit/wallet-core": "5.
|
|
4
|
+
"@swapkit/helpers": "6.4.0",
|
|
5
|
+
"@swapkit/plugins": "5.2.0",
|
|
6
|
+
"@swapkit/toolboxes": "6.5.0",
|
|
7
|
+
"@swapkit/wallet-core": "5.1.1"
|
|
8
8
|
},
|
|
9
9
|
"description": "SwapKit - Core",
|
|
10
10
|
"devDependencies": {
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"type-check:go": "tsgo"
|
|
35
35
|
},
|
|
36
36
|
"type": "module",
|
|
37
|
-
"version": "5.
|
|
37
|
+
"version": "5.4.0"
|
|
38
38
|
}
|