@swapkit/core 5.0.8 → 5.1.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 CHANGED
@@ -1,5 +1,27 @@
1
1
  # @swapkit/core
2
2
 
3
+ ## 5.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#421](https://github.com/swapkit/sdk/pull/421) [`f311348`](https://github.com/swapkit/sdk/commit/f311348c221764e64da368b06033f9a3c67d7a07) Thanks [@hippocampusSK](https://github.com/hippocampusSK)! - Add PactSwap support: `ProviderName.PACTSWAP` is now available, and PactSwap routes resolve to the generic `swapkit` plugin for any wallet (like Flashnet and Mayan), which signs the route's prebuilt EVM or Tron transaction.
8
+ - [#400](https://github.com/swapkit/sdk/pull/400) [`d64a2a7`](https://github.com/swapkit/sdk/commit/d64a2a77fe56689abc8521a4670d57131bdf2648) Thanks [@ice-chillios](https://github.com/ice-chillios)! - **The SDK targets mainnet only.** The stagenet/testnet switch and everything that backed it are gone: `SKConfig` `envs.isStagenet`, the `StagenetChain` enum with its chain configs, chain ids, node URLs, RPC entries and bech32 prefixes, the Zcash testnet paths in the toolbox, and the APIs that were already marked deprecated. Nodes and RPC endpoints stay configurable per chain through `SKConfig`; wallets always derive mainnet addresses. (via @swapkit/helpers@6.0.0)
9
+ - [#410](https://github.com/swapkit/sdk/pull/410) [`89c5e68`](https://github.com/swapkit/sdk/commit/89c5e68d52c094aa8acc1356244060261549a18b) Thanks [@hippocampusSK](https://github.com/hippocampusSK)! - Fix EVM network switching for extension wallets (Brave, Coinbase Wallet extension, …) on chains they don't ship by default, such as Arc. (via @swapkit/helpers@6.0.0)
10
+ - [#420](https://github.com/swapkit/sdk/pull/420) [`ec0d02c`](https://github.com/swapkit/sdk/commit/ec0d02cf4f35de1542bbd6c92324704c7c944c46) Thanks [@hippocampusSK](https://github.com/hippocampusSK)! - Solana: `createTransaction` now rejects an SPL token transfer that has to create the recipient's associated token account when the sender's SOL can't cover the network fee, the token account rent and its own rent-exempt reserve. It throws `toolbox_solana_insufficient_balance` (with `balance`, `required`, `fee`, `tokenAccountRent` and `rentReserve`) instead of returning a transaction that fails simulation with "Transaction results in an account (0) with insufficient funds for rent". `estimateTransactionFee` is unaffected. The recipient token account is now created with `CreateIdempotent`, so a transfer no longer fails if that account is created between building and broadcasting. (via @swapkit/helpers@6.0.0)
11
+ - [#413](https://github.com/swapkit/sdk/pull/413) [`4af82d0`](https://github.com/swapkit/sdk/commit/4af82d0764c4260d0e4df5ffdd1b7809516f14f8) Thanks [@hippocampusSK](https://github.com/hippocampusSK)! - Update the default `rpcUrls` for `Chain.Arc` to three public endpoints, in fallback order: the official `https://rpc.mainnet.arc.io`, `https://arc-rpc.publicnode.com` and `https://arc.drpc.org`. (via @swapkit/helpers@6.0.0)
12
+ - [#415](https://github.com/swapkit/sdk/pull/415) [`3e3dca0`](https://github.com/swapkit/sdk/commit/3e3dca0aea7625917a797c1a8183c60a47ae5574) Thanks [@github-actions](https://github.com/apps/github-actions)! - Update generated token lists. (via @swapkit/helpers@6.0.0)
13
+ - [#394](https://github.com/swapkit/sdk/pull/394) [`bece151`](https://github.com/swapkit/sdk/commit/bece151c7a6ca3402e740e5627e070cb7900d49c) Thanks [@hippocampusSK](https://github.com/hippocampusSK)! - **UTXO addresses are classified by decoding them, against the chain they belong to.** (via @swapkit/toolboxes@6.0.0)
14
+ - [#395](https://github.com/swapkit/sdk/pull/395) [`1021a3f`](https://github.com/swapkit/sdk/commit/1021a3f7dab8efc55fba573002a16ae5c0ad3a04) Thanks [@hippocampusSK](https://github.com/hippocampusSK)! - **UTXO toolboxes encode addresses by an explicit script type, and derive all four single-key standards on Bitcoin and Litecoin: legacy (BIP44, P2PKH), nested segwit (BIP49, P2SH-P2WPKH), native segwit (BIP84, P2WPKH) and taproot (BIP86, P2TR key path).** (via @swapkit/toolboxes@6.0.0)
15
+ - [#395](https://github.com/swapkit/sdk/pull/395) [`1021a3f`](https://github.com/swapkit/sdk/commit/1021a3f7dab8efc55fba573002a16ae5c0ad3a04) Thanks [@hippocampusSK](https://github.com/hippocampusSK)! - **Nested segwit (BIP49) and taproot (BIP86) inputs are built and signed on Bitcoin and Litecoin.** Deriving on them landed with the script-type contract; this release spends from them. (via @swapkit/toolboxes@6.0.0)
16
+ - [#411](https://github.com/swapkit/sdk/pull/411) [`b5d7cf0`](https://github.com/swapkit/sdk/commit/b5d7cf0ef988a475a910620d53c588990e4766ef) Thanks [@paz-ts](https://github.com/paz-ts)! - Fix EIP-1559 fees on OP-stack chains: the `Fast` and `Fastest` fee options multiplied the priority fee without raising `maxFeePerGas`. An Optimism base fee is a few hundred wei, so the priority fee is almost the whole cap and the multiplied tip ended up above it, which made ethers reject every transaction with `priorityFee cannot be more than maxFee`. Both fields now scale together, and the cap is clamped to the tip. (via @swapkit/toolboxes@6.0.0)
17
+
18
+ ## 5.0.9
19
+
20
+ ### Patch Changes
21
+
22
+ - [#408](https://github.com/swapkit/sdk/pull/408) [`93dc581`](https://github.com/swapkit/sdk/commit/93dc581bf236eb2823337939ed6c41ce1fec8fad) Thanks [@hippocampusSK](https://github.com/hippocampusSK)! - Replace the default `rpcUrls` entry for `Chain.Arc` with the Arc mainnet QuickNode RPC (via @swapkit/helpers@5.4.2)
23
+ - [#406](https://github.com/swapkit/sdk/pull/406) [`ed678ed`](https://github.com/swapkit/sdk/commit/ed678edfe26d66134db63fbe8d9891168f70e7d8) Thanks [@github-actions](https://github.com/apps/github-actions)! - Update generated token lists. (via @swapkit/helpers@5.4.2)
24
+
3
25
  ## 5.0.8
4
26
 
5
27
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- var v=((i)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(i,{get:(c,w)=>(typeof require<"u"?require:c)[w]}):i)(function(i){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+i+'" is not supported')});import{ApproveMode as m,AssetValue as g,Chain as f,CosmosChains as z,EVMChains as k,ProviderName as R,SKConfig as J,SwapKitError as l,UTXOChains as Z}from"@swapkit/helpers";import{parseTransactionValue as ee}from"@swapkit/helpers/api";export*from"@swapkit/helpers";var te=[R.FLASHNET,R.MAYAN];function ne({pluginName:i,providers:c,useDirectSigning:w}){return c.some((T)=>te.includes(T))||w?"swapkit":i||c[0]}function ae(i){let c="approvalTx"in i?i.approvalTx:void 0;return c!==void 0&&"txType"in c&&c.txType==="STELLAR"?g.from({asset:i.buyAsset}):g.from({asset:i.sellAsset,value:i.sellAmount})}function ie({config:i,plugins:c,wallets:w}={}){if(i)J.set(i);let y={},T=Object.entries(c||{}).reduce((e,[n,t])=>{let a=t({getWallet:o});return e[n]=a,e},{}),W=Object.entries(w||{}).reduce((e,[n,t])=>{let a=t.connectWallet({addChain:E});return e[n]=a,e},{});function b(e){let n=e&&T[e],t=Object.values(T).find((s)=>s.supportedSwapkitProviders?.includes(e)),a=n||t;if(!a)throw new l("core_plugin_not_found");return a}function E(e){let n=o(e.chain),t=e?.balance||n?.balance||[g.from({chain:e.chain})],a={...n,...e,balance:t};return y[e.chain]=a,a}function C({pluginName:e,route:n,useDirectSigning:t}){return b(ne({pluginName:e,providers:n.providers,useDirectSigning:t}))}function M({assetValue:e,plugin:n,route:t,spenderAddress:a,type:s}){if(s===m.CheckOnly&&"isAssetValueApproved"in n)return n.isAssetValueApproved({assetValue:e,route:t,spenderAddress:a});if(s===m.Approve&&"approveAssetValue"in n)return n.approveAssetValue({assetValue:e,route:t,spenderAddress:a});throw new l({errorKey:"core_approve_asset_target_invalid",info:{message:`Target ${String(a??t?.providers[0])} cannot be used for approve operation`}})}function A({assetValue:e,type:n="checkOnly",contractAddress:t,route:a}){let s=e??(a?ae(a):void 0);if(!s)throw new l("core_approve_asset_target_invalid");let r=t??a?.meta.approvalAddress,h=a?C({route:a,useDirectSigning:Boolean(o(s.chain)?.supportsDirectSigning)}):r&&T[r];if(h)return M({assetValue:s,plugin:h,route:a,spenderAddress:r,type:n});let V=s.chain,u=k.includes(V);if(u&&s.isGasAsset||!u||s.isSynthetic)return Promise.resolve(n==="checkOnly"?!0:"approved");let p=o(V),_=n==="checkOnly"?p.isApproved:p.approve;if(!_)throw new l("core_wallet_connection_not_found");if(!(s.address&&p.address&&typeof r==="string"))throw new l("core_approve_asset_address_or_from_not_found");return _({amount:s.getBaseValue("bigint"),assetAddress:s.address,from:p.address,spenderAddress:r})}function o(e){return y[e]}function O(){return{...y}}function F(e){return o(e)?.address||""}function K(e,n){return e instanceof g?A({assetValue:e,contractAddress:n,type:m.Approve}):A({route:e,type:m.Approve})}function D(e,n){return e instanceof g?A({assetValue:e,contractAddress:n,type:m.CheckOnly}):A({route:e,type:m.CheckOnly})}function S(e){o(e)?.disconnect?.(),delete y[e]}function B(){for(let e of Object.keys(y))S(e)}function I(e,n){return n?x(e).then(({balance:t})=>t):o(e)?.balance||[]}async function x(e,n=!0){let t=o(e);if(!t)throw new l("core_wallet_connection_not_found");let a=await t.getBalance?.(t.address,n);return t.balance=a||[g.from({chain:e})],t}function G({route:e,pluginName:n,...t}){let a=g.from({asset:e.sellAsset}).chain,s=o(a);if(!s)throw new l("core_wallet_connection_not_found");let r=C({pluginName:n,route:e,useDirectSigning:Boolean(s.supportsDirectSigning&&e.tx)});if("swap"in r)return r.swap({...t,route:e});throw new l("core_plugin_swap_not_found")}function L({assetValue:e,...n}){let t=e.chain;if([f.Radix].includes(t)||!o(t))throw new l("core_wallet_connection_not_found");return o(t).transfer({...n,assetValue:e})}function j({chain:e,message:n}){let t=o(e);if(!t)throw new l("core_wallet_connection_not_found");if("signMessage"in t)return t.signMessage?.(n);throw new l({errorKey:"core_wallet_sign_message_not_supported",info:{chain:e,wallet:t.walletType}})}function H({chain:e,domain:n,primaryType:t,types:a,value:s}){let r=o(e);if(!r)throw new l("core_wallet_connection_not_found");if("signTypedData"in r&&typeof r.signTypedData==="function")return r.signTypedData({domain:n,primaryType:t,types:a,value:s});throw new l({errorKey:"core_wallet_sign_typed_data_not_supported",info:{chain:e,wallet:r.walletType}})}async function Q({address:e,chain:n,message:t,signature:a}){if(n!==f.THORChain)throw new l({errorKey:"core_verify_message_not_supported",info:{chain:n}});let{getCosmosToolbox:s}=await import("@swapkit/toolboxes/cosmos");return s(n).verifySignature({address:e,message:t,signature:a})}async function U({type:e,feeOptionKey:n,params:t}){let{assetValue:a}=t,{chain:s}=a;if(!o(s))throw new l("core_wallet_connection_not_found");let r=g.from({chain:s}),{match:h}=await import("ts-pattern");return await h(s).returnType().with(...k,(u)=>{let{address:d,...p}=o(u),_=h(e).with("transfer",()=>p.createTransferTx(t)).with("approve",(Y)=>{let{contractAddress:P}=t;return p.createApprovalTx({amount:a.getBaseValue("bigint"),assetAddress:a.address,from:d,spenderAddress:P})}).with("swap",(Y)=>{let{route:{providers:[P],tx:q}}=t;if(P&&[R.CHAINFLIP,R.CHAINFLIP_STREAMING].includes(P))return p.createTransferTx({assetValue:a,recipient:d,sender:d});let N=q;return{...N,value:ee(N.value)}}).otherwise(()=>{return});if(!_)return r;return p.estimateTransactionFee({..._,feeOption:n})}).with(...z,async()=>{let{estimateTransactionFee:u}=await import("@swapkit/toolboxes/cosmos");return u(t)}).with(...Z,(u)=>{let{address:d,...p}=o(u);return p.estimateTransactionFee({...t,feeOptionKey:n,recipient:d,sender:d})}).with(f.Tron,f.Ton,f.Polkadot,(u)=>{let{address:d,...p}=o(u);return p.estimateTransactionFee({...t,recipient:d,sender:d})}).with(f.Aptos,f.Cardano,f.Ripple,f.Stellar,f.Sui,(u)=>o(u).estimateTransactionFee()).otherwise(()=>r)}async function X({address:e,chain:n}){try{let{getAddressValidator:t}=await import("@swapkit/toolboxes");return(await t())({address:e,chain:n})}catch{return!1}}return{...T,...W,approveAssetValue:K,disconnectAll:B,disconnectChain:S,estimateTransactionFee:U,getAddress:F,getAllWallets:O,getBalance:I,getWallet:o,getWalletWithBalance:x,isAssetValueApproved:D,signMessage:j,signTypedData:H,swap:G,transfer:L,validateAddress:X,verifyMessage:Q}}export{ie as SwapKit,ae as getRouteApprovalAssetValue,ne as resolveRoutePluginName};
1
+ var R=((i)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(i,{get:(c,w)=>(typeof require<"u"?require:c)[w]}):i)(function(i){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+i+'" is not supported')});import{ApproveMode as m,AssetValue as g,Chain as f,CosmosChains as z,EVMChains as k,ProviderName as _,SKConfig as J,SwapKitError as l,UTXOChains as Z}from"@swapkit/helpers";import{parseTransactionValue as ee}from"@swapkit/helpers/api";export*from"@swapkit/helpers";var te=[_.FLASHNET,_.MAYAN,_.PACTSWAP];function ne({pluginName:i,providers:c,useDirectSigning:w}){return c.some((T)=>te.includes(T))||w?"swapkit":i||c[0]}function ae(i){let c="approvalTx"in i?i.approvalTx:void 0;return c!==void 0&&"txType"in c&&c.txType==="STELLAR"?g.from({asset:i.buyAsset}):g.from({asset:i.sellAsset,value:i.sellAmount})}function ie({config:i,plugins:c,wallets:w}={}){if(i)J.set(i);let y={},T=Object.entries(c||{}).reduce((e,[n,t])=>{let a=t({getWallet:o});return e[n]=a,e},{}),W=Object.entries(w||{}).reduce((e,[n,t])=>{let a=t.connectWallet({addChain:E});return e[n]=a,e},{});function b(e){let n=e&&T[e],t=Object.values(T).find((s)=>s.supportedSwapkitProviders?.includes(e)),a=n||t;if(!a)throw new l("core_plugin_not_found");return a}function E(e){let n=o(e.chain),t=e?.balance||n?.balance||[g.from({chain:e.chain})],a={...n,...e,balance:t};return y[e.chain]=a,a}function C({pluginName:e,route:n,useDirectSigning:t}){return b(ne({pluginName:e,providers:n.providers,useDirectSigning:t}))}function M({assetValue:e,plugin:n,route:t,spenderAddress:a,type:s}){if(s===m.CheckOnly&&"isAssetValueApproved"in n)return n.isAssetValueApproved({assetValue:e,route:t,spenderAddress:a});if(s===m.Approve&&"approveAssetValue"in n)return n.approveAssetValue({assetValue:e,route:t,spenderAddress:a});throw new l({errorKey:"core_approve_asset_target_invalid",info:{message:`Target ${String(a??t?.providers[0])} cannot be used for approve operation`}})}function P({assetValue:e,type:n="checkOnly",contractAddress:t,route:a}){let s=e??(a?ae(a):void 0);if(!s)throw new l("core_approve_asset_target_invalid");let r=t??a?.meta.approvalAddress,h=a?C({route:a,useDirectSigning:Boolean(o(s.chain)?.supportsDirectSigning)}):r&&T[r];if(h)return M({assetValue:s,plugin:h,route:a,spenderAddress:r,type:n});let V=s.chain,u=k.includes(V);if(u&&s.isGasAsset||!u||s.isSynthetic)return Promise.resolve(n==="checkOnly"?!0:"approved");let p=o(V),A=n==="checkOnly"?p.isApproved:p.approve;if(!A)throw new l("core_wallet_connection_not_found");if(!(s.address&&p.address&&typeof r==="string"))throw new l("core_approve_asset_address_or_from_not_found");return A({amount:s.getBaseValue("bigint"),assetAddress:s.address,from:p.address,spenderAddress:r})}function o(e){return y[e]}function O(){return{...y}}function F(e){return o(e)?.address||""}function K(e,n){return e instanceof g?P({assetValue:e,contractAddress:n,type:m.Approve}):P({route:e,type:m.Approve})}function D(e,n){return e instanceof g?P({assetValue:e,contractAddress:n,type:m.CheckOnly}):P({route:e,type:m.CheckOnly})}function S(e){o(e)?.disconnect?.(),delete y[e]}function B(){for(let e of Object.keys(y))S(e)}function I(e,n){return n?x(e).then(({balance:t})=>t):o(e)?.balance||[]}async function x(e,n=!0){let t=o(e);if(!t)throw new l("core_wallet_connection_not_found");let a=await t.getBalance?.(t.address,n);return t.balance=a||[g.from({chain:e})],t}function G({route:e,pluginName:n,...t}){let a=g.from({asset:e.sellAsset}).chain,s=o(a);if(!s)throw new l("core_wallet_connection_not_found");let r=C({pluginName:n,route:e,useDirectSigning:Boolean(s.supportsDirectSigning&&e.tx)});if("swap"in r)return r.swap({...t,route:e});throw new l("core_plugin_swap_not_found")}function L({assetValue:e,...n}){let t=e.chain;if([f.Radix].includes(t)||!o(t))throw new l("core_wallet_connection_not_found");return o(t).transfer({...n,assetValue:e})}function j({chain:e,message:n}){let t=o(e);if(!t)throw new l("core_wallet_connection_not_found");if("signMessage"in t)return t.signMessage?.(n);throw new l({errorKey:"core_wallet_sign_message_not_supported",info:{chain:e,wallet:t.walletType}})}function H({chain:e,domain:n,primaryType:t,types:a,value:s}){let r=o(e);if(!r)throw new l("core_wallet_connection_not_found");if("signTypedData"in r&&typeof r.signTypedData==="function")return r.signTypedData({domain:n,primaryType:t,types:a,value:s});throw new l({errorKey:"core_wallet_sign_typed_data_not_supported",info:{chain:e,wallet:r.walletType}})}async function Q({address:e,chain:n,message:t,signature:a}){if(n!==f.THORChain)throw new l({errorKey:"core_verify_message_not_supported",info:{chain:n}});let{getCosmosToolbox:s}=await import("@swapkit/toolboxes/cosmos");return s(n).verifySignature({address:e,message:t,signature:a})}async function U({type:e,feeOptionKey:n,params:t}){let{assetValue:a}=t,{chain:s}=a;if(!o(s))throw new l("core_wallet_connection_not_found");let r=g.from({chain:s}),{match:h}=await import("ts-pattern");return await h(s).returnType().with(...k,(u)=>{let{address:d,...p}=o(u),A=h(e).with("transfer",()=>p.createTransferTx(t)).with("approve",(Y)=>{let{contractAddress:v}=t;return p.createApprovalTx({amount:a.getBaseValue("bigint"),assetAddress:a.address,from:d,spenderAddress:v})}).with("swap",(Y)=>{let{route:{providers:[v],tx:q}}=t;if(v&&[_.CHAINFLIP,_.CHAINFLIP_STREAMING].includes(v))return p.createTransferTx({assetValue:a,recipient:d,sender:d});let N=q;return{...N,value:ee(N.value)}}).otherwise(()=>{return});if(!A)return r;return p.estimateTransactionFee({...A,feeOption:n})}).with(...z,async()=>{let{estimateTransactionFee:u}=await import("@swapkit/toolboxes/cosmos");return u(t)}).with(...Z,(u)=>{let{address:d,...p}=o(u);return p.estimateTransactionFee({...t,feeOptionKey:n,recipient:d,sender:d})}).with(f.Tron,f.Ton,f.Polkadot,(u)=>{let{address:d,...p}=o(u);return p.estimateTransactionFee({...t,recipient:d,sender:d})}).with(f.Aptos,f.Cardano,f.Ripple,f.Stellar,f.Sui,(u)=>o(u).estimateTransactionFee()).otherwise(()=>r)}async function X({address:e,chain:n}){try{let{getAddressValidator:t}=await import("@swapkit/toolboxes");return(await t())({address:e,chain:n})}catch{return!1}}return{...T,...W,approveAssetValue:K,disconnectAll:B,disconnectChain:S,estimateTransactionFee:U,getAddress:F,getAllWallets:O,getBalance:I,getWallet:o,getWalletWithBalance:x,isAssetValueApproved:D,signMessage:j,signTypedData:H,swap:G,transfer:L,validateAddress:X,verifyMessage:Q}}export{ie as SwapKit,ae as getRouteApprovalAssetValue,ne as resolveRoutePluginName};
@@ -1490,7 +1490,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
1490
1490
  originalFee: number;
1491
1491
  txid: string;
1492
1492
  }>;
1493
- calculateTxSize: ({ inputs, outputs, feeRate }: import("@swapkit/toolboxes/utxo/types").UTXOCalculateTxSizeParams) => number;
1493
+ calculateTxSize: (params: Omit<import("@swapkit/toolboxes/utxo/types").UTXOCalculateTxSizeParams, "chain">) => number;
1494
1494
  createKeysForPath: (params: {
1495
1495
  wif?: string;
1496
1496
  phrase?: string;
@@ -1500,7 +1500,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
1500
1500
  publicKey: Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>;
1501
1501
  };
1502
1502
  createReplacementTransaction: ({ txid, newFeeRate, recipient, memo, }: import("@swapkit/toolboxes/utxo/types").RBFTransactionParams) => Promise<import("@swapkit/toolboxes/utxo/toolbox/utxo").ReplacementTransactionResult>;
1503
- createTransaction: ({ assetValue, recipient, memo, feeRate, sender, fetchTxHex, enableRBF, sweep, }: import("@swapkit/toolboxes/utxo/types").UTXOBuildTxParams) => Promise<{
1503
+ createTransaction: (params: import("@swapkit/toolboxes/utxo/types").UTXOBuildTxParams) => Promise<{
1504
1504
  inputs: import("@swapkit/toolboxes/utxo/types").UTXOType[];
1505
1505
  tx: import("@swapkit/utxo-signer").Transaction;
1506
1506
  utxos: {
@@ -1596,6 +1596,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
1596
1596
  change: boolean;
1597
1597
  index: number;
1598
1598
  } | undefined;
1599
+ scriptType: import("@swapkit/helpers").UTXOScriptType;
1599
1600
  signAndBroadcastTransaction: (tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>) => Promise<string>;
1600
1601
  signTransaction: (tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>) => import("@swapkit/utxo-signer").Transaction | Promise<import("@swapkit/utxo-signer").Transaction>;
1601
1602
  signTransactionWithMultipleKeys: ({ tx, inputDerivations, }: {
@@ -1610,9 +1611,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
1610
1611
  recipient: string;
1611
1612
  assetValue: AssetValue;
1612
1613
  memo?: string;
1613
- feeRate? /**
1614
- * @Public
1615
- */: number;
1614
+ feeRate?: number;
1616
1615
  feeOptionKey?: FeeOption;
1617
1616
  changeAddress?: string;
1618
1617
  sweep?: boolean;
@@ -1673,7 +1672,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
1673
1672
  originalFee: number;
1674
1673
  txid: string;
1675
1674
  }>;
1676
- calculateTxSize: ({ inputs, outputs, feeRate }: import("@swapkit/toolboxes/utxo/types").UTXOCalculateTxSizeParams) => number;
1675
+ calculateTxSize: (params: Omit<import("@swapkit/toolboxes/utxo/types").UTXOCalculateTxSizeParams, "chain">) => number;
1677
1676
  createKeysForPath: (params: {
1678
1677
  wif?: string;
1679
1678
  phrase?: string;
@@ -1754,6 +1753,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
1754
1753
  change: boolean;
1755
1754
  index: number;
1756
1755
  } | undefined;
1756
+ scriptType: import("@swapkit/helpers").UTXOScriptType;
1757
1757
  signTransactionWithMultipleKeys: ({ tx, inputDerivations, }: {
1758
1758
  tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>;
1759
1759
  inputDerivations: import("@swapkit/toolboxes/utxo/types").InputDerivation[];
@@ -2532,7 +2532,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
2532
2532
  originalFee: number;
2533
2533
  txid: string;
2534
2534
  }>;
2535
- calculateTxSize: ({ inputs, outputs, feeRate }: import("@swapkit/toolboxes/utxo/types").UTXOCalculateTxSizeParams) => number;
2535
+ calculateTxSize: (params: Omit<import("@swapkit/toolboxes/utxo/types").UTXOCalculateTxSizeParams, "chain">) => number;
2536
2536
  createKeysForPath: (params: {
2537
2537
  wif?: string;
2538
2538
  phrase?: string;
@@ -2542,7 +2542,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
2542
2542
  publicKey: Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>;
2543
2543
  };
2544
2544
  createReplacementTransaction: ({ txid, newFeeRate, recipient, memo, }: import("@swapkit/toolboxes/utxo/types").RBFTransactionParams) => Promise<import("@swapkit/toolboxes/utxo/toolbox/utxo").ReplacementTransactionResult>;
2545
- createTransaction: ({ assetValue, recipient, memo, feeRate, sender, fetchTxHex, enableRBF, sweep, }: import("@swapkit/toolboxes/utxo/types").UTXOBuildTxParams) => Promise<{
2545
+ createTransaction: (params: import("@swapkit/toolboxes/utxo/types").UTXOBuildTxParams) => Promise<{
2546
2546
  inputs: import("@swapkit/toolboxes/utxo/types").UTXOType[];
2547
2547
  tx: import("@swapkit/utxo-signer").Transaction;
2548
2548
  utxos: {
@@ -2638,6 +2638,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
2638
2638
  change: boolean;
2639
2639
  index: number;
2640
2640
  } | undefined;
2641
+ scriptType: import("@swapkit/helpers").UTXOScriptType;
2641
2642
  signAndBroadcastTransaction: (tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>) => Promise<string>;
2642
2643
  signTransaction: (tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>) => import("@swapkit/utxo-signer").Transaction | Promise<import("@swapkit/utxo-signer").Transaction>;
2643
2644
  signTransactionWithMultipleKeys: ({ tx, inputDerivations, }: {
@@ -2652,9 +2653,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
2652
2653
  recipient: string;
2653
2654
  assetValue: AssetValue;
2654
2655
  memo?: string;
2655
- feeRate? /**
2656
- * @Public
2657
- */: number;
2656
+ feeRate?: number;
2658
2657
  feeOptionKey?: FeeOption;
2659
2658
  changeAddress?: string;
2660
2659
  sweep?: boolean;
@@ -2669,7 +2668,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
2669
2668
  originalFee: number;
2670
2669
  txid: string;
2671
2670
  }>;
2672
- calculateTxSize: ({ inputs, outputs, feeRate }: import("@swapkit/toolboxes/utxo/types").UTXOCalculateTxSizeParams) => number;
2671
+ calculateTxSize: (params: Omit<import("@swapkit/toolboxes/utxo/types").UTXOCalculateTxSizeParams, "chain">) => number;
2673
2672
  createKeysForPath: (params: {
2674
2673
  wif?: string;
2675
2674
  phrase?: string;
@@ -2679,7 +2678,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
2679
2678
  publicKey: Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>;
2680
2679
  };
2681
2680
  createReplacementTransaction: ({ txid, newFeeRate, recipient, memo, }: import("@swapkit/toolboxes/utxo/types").RBFTransactionParams) => Promise<import("@swapkit/toolboxes/utxo/toolbox/utxo").ReplacementTransactionResult>;
2682
- createTransaction: ({ assetValue, recipient, memo, feeRate, sender, fetchTxHex, enableRBF, sweep, }: import("@swapkit/toolboxes/utxo/types").UTXOBuildTxParams) => Promise<{
2681
+ createTransaction: (params: import("@swapkit/toolboxes/utxo/types").UTXOBuildTxParams) => Promise<{
2683
2682
  inputs: import("@swapkit/toolboxes/utxo/types").UTXOType[];
2684
2683
  tx: import("@swapkit/utxo-signer").Transaction;
2685
2684
  utxos: {
@@ -2775,6 +2774,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
2775
2774
  change: boolean;
2776
2775
  index: number;
2777
2776
  } | undefined;
2777
+ scriptType: import("@swapkit/helpers").UTXOScriptType;
2778
2778
  signAndBroadcastTransaction: (tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>) => Promise<string>;
2779
2779
  signTransaction: (tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>) => import("@swapkit/utxo-signer").Transaction | Promise<import("@swapkit/utxo-signer").Transaction>;
2780
2780
  signTransactionWithMultipleKeys: ({ tx, inputDerivations, }: {
@@ -2789,9 +2789,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
2789
2789
  recipient: string;
2790
2790
  assetValue: AssetValue;
2791
2791
  memo?: string;
2792
- feeRate? /**
2793
- * @Public
2794
- */: number;
2792
+ feeRate?: number;
2795
2793
  feeOptionKey?: FeeOption;
2796
2794
  changeAddress?: string;
2797
2795
  sweep?: boolean;
@@ -3438,7 +3436,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
3438
3436
  originalFee: number;
3439
3437
  txid: string;
3440
3438
  }>;
3441
- calculateTxSize: ({ inputs, outputs, feeRate }: import("@swapkit/toolboxes/utxo/types").UTXOCalculateTxSizeParams) => number;
3439
+ calculateTxSize: (params: Omit<import("@swapkit/toolboxes/utxo/types").UTXOCalculateTxSizeParams, "chain">) => number;
3442
3440
  createKeysForPath: (params: {
3443
3441
  wif?: string;
3444
3442
  phrase?: string;
@@ -3448,7 +3446,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
3448
3446
  publicKey: Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>;
3449
3447
  };
3450
3448
  createReplacementTransaction: ({ txid, newFeeRate, recipient, memo, }: import("@swapkit/toolboxes/utxo/types").RBFTransactionParams) => Promise<import("@swapkit/toolboxes/utxo/toolbox/utxo").ReplacementTransactionResult>;
3451
- createTransaction: ({ assetValue, recipient, memo, feeRate, sender, fetchTxHex, enableRBF, sweep, }: import("@swapkit/toolboxes/utxo/types").UTXOBuildTxParams) => Promise<{
3449
+ createTransaction: (params: import("@swapkit/toolboxes/utxo/types").UTXOBuildTxParams) => Promise<{
3452
3450
  inputs: import("@swapkit/toolboxes/utxo/types").UTXOType[];
3453
3451
  tx: import("@swapkit/utxo-signer").Transaction;
3454
3452
  utxos: {
@@ -3544,6 +3542,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
3544
3542
  change: boolean;
3545
3543
  index: number;
3546
3544
  } | undefined;
3545
+ scriptType: import("@swapkit/helpers").UTXOScriptType;
3547
3546
  signAndBroadcastTransaction: (tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>) => Promise<string>;
3548
3547
  signTransaction: (tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>) => import("@swapkit/utxo-signer").Transaction | Promise<import("@swapkit/utxo-signer").Transaction>;
3549
3548
  signTransactionWithMultipleKeys: ({ tx, inputDerivations, }: {
@@ -3558,9 +3557,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
3558
3557
  recipient: string;
3559
3558
  assetValue: AssetValue;
3560
3559
  memo?: string;
3561
- feeRate? /**
3562
- * @Public
3563
- */: number;
3560
+ feeRate?: number;
3564
3561
  feeOptionKey?: FeeOption;
3565
3562
  changeAddress?: string;
3566
3563
  sweep?: boolean;
@@ -4092,7 +4089,6 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
4092
4089
  createContractFunctionCall: ({ args, attachedDeposit, contractId, gas, methodName, sender: accountId, }: import("@swapkit/toolboxes/near/types").ContractFunctionCallParams) => Promise<import("@near-js/transactions").Transaction>;
4093
4090
  createSubAccount: (subAccountId: string, publicKey: string, initialBalance: string) => Promise<string>;
4094
4091
  createTransaction: ({ recipient, assetValue, memo, attachedDeposit, sender, functionCall, sweep, }: import("@swapkit/toolboxes/near/types").NearCreateTransactionParams) => Promise<import("@near-js/transactions").Transaction>;
4095
- estimateGas: (params: import("@swapkit/toolboxes/near/types").NearGasEstimateParams, account?: import("@near-js/accounts").Account) => Promise<AssetValue>;
4096
4092
  estimateGasLimit: (params: import("@swapkit/toolboxes/near/types").NearGasEstimateParams, account?: import("@near-js/accounts").Account) => Promise<AssetValue>;
4097
4093
  estimateTransactionFee: (params: import("@swapkit/toolboxes/near/types").NearTransferParams | import("@swapkit/toolboxes/near/types").NearGasEstimateParams, protocolConfigParam?: {
4098
4094
  runtime_config: {
@@ -5594,7 +5590,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
5594
5590
  originalFee: number;
5595
5591
  txid: string;
5596
5592
  }>;
5597
- calculateTxSize: ({ inputs, outputs, feeRate }: import("@swapkit/toolboxes/utxo/types").UTXOCalculateTxSizeParams) => number;
5593
+ calculateTxSize: (params: Omit<import("@swapkit/toolboxes/utxo/types").UTXOCalculateTxSizeParams, "chain">) => number;
5598
5594
  createReplacementTransaction: ({ txid, newFeeRate, recipient, memo, }: import("@swapkit/toolboxes/utxo/types").RBFTransactionParams) => Promise<import("@swapkit/toolboxes/utxo/toolbox/utxo").ReplacementTransactionResult>;
5599
5595
  deriveAddressAtIndex: ({ accountIndex, index, change }: import("@swapkit/toolboxes").DeriveAddressParams) => {
5600
5596
  accountIndex: number;
@@ -5673,6 +5669,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
5673
5669
  change: boolean;
5674
5670
  index: number;
5675
5671
  } | undefined;
5672
+ scriptType: import("@swapkit/helpers").UTXOScriptType;
5676
5673
  signTransactionWithMultipleKeys: ({ tx, inputDerivations, }: {
5677
5674
  tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>;
5678
5675
  inputDerivations: import("@swapkit/toolboxes/utxo/types").InputDerivation[];
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "author": "swapkit-dev",
3
3
  "dependencies": {
4
- "@swapkit/helpers": "5.4.1",
5
- "@swapkit/plugins": "5.0.8",
6
- "@swapkit/toolboxes": "5.4.1",
7
- "@swapkit/wallet-core": "5.0.8"
4
+ "@swapkit/helpers": "6.0.0",
5
+ "@swapkit/plugins": "5.0.10",
6
+ "@swapkit/toolboxes": "6.0.0",
7
+ "@swapkit/wallet-core": "5.0.10"
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.0.8"
37
+ "version": "5.1.0"
38
38
  }