@swapkit/server 4.2.51 → 4.2.52
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/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var{defineProperty:l,getOwnPropertyNames:b,getOwnPropertyDescriptor:$}=Object,x=Object.prototype.hasOwnProperty;function n(r){return this[r]}var t=(r,i,e)=>{var p=b(i);for(let s of p)if(!x.call(r,s)&&s!=="default")l(r,s,{get:n.bind(i,s),enumerable:!0});if(e){for(let s of p)if(!x.call(e,s)&&s!=="default")l(e,s,{get:n.bind(i,s),enumerable:!0});return e}};var oo=(r)=>{var i=(h??=new WeakMap).get(r),e;if(i)return i;if(i=l({},"__esModule",{value:!0}),r&&typeof r==="object"||typeof r==="function"){for(var p of b(r))if(!x.call(i,p))l(i,p,{get:n.bind(r,p),enumerable:!(e=$(r,p))||e.enumerable})}return h.set(r,i),i},h;var to=(r)=>r;function ro(r,i){this[r]=to.bind(null,i)}var f=(r,i)=>{for(var e in i)l(r,e,{get:i[e],enumerable:!0,configurable:!0,set:ro.bind(i,e)})};var o={};f(o,{validateChainAddress:()=>d,getChainToolbox:()=>T});module.exports=oo(o);t(o,require("@swapkit/helpers"),module.exports);t(o,require("@swapkit/helpers/api"),module.exports);t(o,require("@swapkit/helpers/contracts"),module.exports);t(o,require("@swapkit/tokens"),module.exports);t(o,require("@swapkit/toolboxes"),module.exports);t(o,require("@swapkit/toolboxes/cardano"),module.exports);t(o,require("@swapkit/toolboxes/cosmos"),module.exports);t(o,require("@swapkit/toolboxes/evm"),module.exports);t(o,require("@swapkit/toolboxes/near"),module.exports);t(o,require("@swapkit/toolboxes/radix"),module.exports);t(o,require("@swapkit/toolboxes/ripple"),module.exports);t(o,require("@swapkit/toolboxes/solana"),module.exports);t(o,require("@swapkit/toolboxes/starknet"),module.exports);t(o,require("@swapkit/toolboxes/substrate"),module.exports);t(o,require("@swapkit/toolboxes/sui"),module.exports);t(o,require("@swapkit/toolboxes/ton"),module.exports);t(o,require("@swapkit/toolboxes/tron"),module.exports);t(o,require("@swapkit/toolboxes/utxo"),module.exports);t(o,require("@swapkit/wallet-keystore"),module.exports);var U={};f(U,{getChainToolbox:()=>T});var a=require("@swapkit/helpers"),u=require("@swapkit/toolboxes/aptos"),g=require("@swapkit/toolboxes/cardano"),
|
|
1
|
+
var{defineProperty:l,getOwnPropertyNames:b,getOwnPropertyDescriptor:$}=Object,x=Object.prototype.hasOwnProperty;function n(r){return this[r]}var t=(r,i,e)=>{var p=b(i);for(let s of p)if(!x.call(r,s)&&s!=="default")l(r,s,{get:n.bind(i,s),enumerable:!0});if(e){for(let s of p)if(!x.call(e,s)&&s!=="default")l(e,s,{get:n.bind(i,s),enumerable:!0});return e}};var oo=(r)=>{var i=(h??=new WeakMap).get(r),e;if(i)return i;if(i=l({},"__esModule",{value:!0}),r&&typeof r==="object"||typeof r==="function"){for(var p of b(r))if(!x.call(i,p))l(i,p,{get:n.bind(r,p),enumerable:!(e=$(r,p))||e.enumerable})}return h.set(r,i),i},h;var to=(r)=>r;function ro(r,i){this[r]=to.bind(null,i)}var f=(r,i)=>{for(var e in i)l(r,e,{get:i[e],enumerable:!0,configurable:!0,set:ro.bind(i,e)})};var o={};f(o,{validateChainAddress:()=>d,getChainToolbox:()=>T});module.exports=oo(o);t(o,require("@swapkit/helpers"),module.exports);t(o,require("@swapkit/helpers/api"),module.exports);t(o,require("@swapkit/helpers/contracts"),module.exports);t(o,require("@swapkit/tokens"),module.exports);t(o,require("@swapkit/toolboxes"),module.exports);t(o,require("@swapkit/toolboxes/cardano"),module.exports);t(o,require("@swapkit/toolboxes/cosmos"),module.exports);t(o,require("@swapkit/toolboxes/evm"),module.exports);t(o,require("@swapkit/toolboxes/near"),module.exports);t(o,require("@swapkit/toolboxes/radix"),module.exports);t(o,require("@swapkit/toolboxes/ripple"),module.exports);t(o,require("@swapkit/toolboxes/solana"),module.exports);t(o,require("@swapkit/toolboxes/starknet"),module.exports);t(o,require("@swapkit/toolboxes/substrate"),module.exports);t(o,require("@swapkit/toolboxes/sui"),module.exports);t(o,require("@swapkit/toolboxes/ton"),module.exports);t(o,require("@swapkit/toolboxes/tron"),module.exports);t(o,require("@swapkit/toolboxes/utxo"),module.exports);t(o,require("@swapkit/wallet-keystore"),module.exports);var U={};f(U,{getChainToolbox:()=>T});var a=require("@swapkit/helpers"),u=require("@swapkit/toolboxes/aptos"),g=require("@swapkit/toolboxes/cardano"),w=require("@swapkit/toolboxes/cosmos"),C=require("@swapkit/toolboxes/evm"),A=require("@swapkit/toolboxes/hypercore"),S=require("@swapkit/toolboxes/near"),y=require("@swapkit/toolboxes/radix"),P=require("@swapkit/toolboxes/ripple"),v=require("@swapkit/toolboxes/solana"),c=require("@swapkit/toolboxes/starknet"),V=require("@swapkit/toolboxes/stellar"),R=require("@swapkit/toolboxes/substrate"),k=require("@swapkit/toolboxes/sui"),E=require("@swapkit/toolboxes/ton"),H=require("@swapkit/toolboxes/tron"),N=require("@swapkit/toolboxes/utxo"),O=require("ts-pattern");function T(r,...i){let e=i[0];return O.match(r).with(...a.EVMChains,a.Chain.MegaETH,(s)=>{return C.getEvmToolbox(s,e)}).with(...a.UTXOChains,(s)=>{return N.getUtxoToolbox(s,e)}).with(...a.CosmosChains,(s)=>{return w.getCosmosToolbox(s,e)}).with(...a.SubstrateChains,(s)=>{return R.getSubstrateToolbox(s,e)}).with(a.Chain.Radix,()=>{return y.getRadixToolbox(e)}).with(a.Chain.Ripple,()=>{return P.getRippleToolbox(e)}).with(a.Chain.Solana,()=>{return v.getSolanaToolbox(e)}).with(a.Chain.Sui,()=>{return k.getSuiToolbox(e)}).with(a.Chain.Tron,()=>{return H.getTronToolbox(e)}).with(a.Chain.HyperCore,()=>{return A.getHyperCoreToolbox(e)}).with(a.Chain.Near,()=>{return S.getNearToolbox(e)}).with(a.Chain.Cardano,()=>{return g.getCardanoToolbox(e)}).with(a.Chain.Ton,()=>{return E.getTONToolbox(e)}).with(a.Chain.Starknet,()=>{return c.getStarknetToolbox(e)}).with(a.Chain.Aptos,()=>{return u.getAptosToolbox(e)}).with(a.Chain.Stellar,()=>{return V.getStellarToolbox(e)}).with(a.Chain.Spark,()=>{throw new a.SwapKitError("toolbox_not_supported",{chain:r})}).exhaustive()}var Z={};f(Z,{validateChainAddress:()=>d});var m=require("@swapkit/helpers"),M=require("@swapkit/toolboxes/aptos"),X=require("@swapkit/toolboxes/cardano"),_=require("@swapkit/toolboxes/cosmos"),K=require("@swapkit/toolboxes/evm"),j=require("@swapkit/toolboxes/hypercore"),q=require("@swapkit/toolboxes/near"),z=require("@swapkit/toolboxes/radix"),B=require("@swapkit/toolboxes/ripple"),D=require("@swapkit/toolboxes/solana"),F=require("@swapkit/toolboxes/starknet"),G=require("@swapkit/toolboxes/stellar"),I=require("@swapkit/toolboxes/substrate"),J=require("@swapkit/toolboxes/sui"),L=require("@swapkit/toolboxes/ton"),Q=require("@swapkit/toolboxes/tron"),W=require("@swapkit/toolboxes/utxo"),Y=require("ts-pattern");function d({address:r,chain:i}){return Y.match(i).with(...m.EVMChains,()=>K.validateEVMAddress(r)).with(...m.UTXOChains,(p)=>{return W.getUTXOAddressValidator(p)(r)}).with(...m.CosmosChains,(p)=>{return _.getCosmosAddressValidator(p)(r)}).with(...m.SubstrateChains,(p)=>{return I.getSubstrateAddressValidator({chain:p})(r)}).with(m.Chain.Aptos,()=>M.validateAptosAddress(r)).with(m.Chain.Cardano,()=>X.validateCardanoAddress(r)).with(m.Chain.Near,()=>q.validateNearAddress(r)).with(m.Chain.Stellar,()=>G.validateStellarAddress(r)).with(m.Chain.Radix,()=>z.validateRadixAddress(r)).with(m.Chain.Ripple,()=>B.validateRippleAddress(r)).with(m.Chain.Solana,()=>D.validateSolanaAddress(r)).with(m.Chain.Sui,()=>J.validateSuiAddress(r)).with(m.Chain.Ton,()=>L.validateTonAddress(r)).with(m.Chain.Tron,()=>Q.validateTronAddress(r)).with(m.Chain.Starknet,()=>F.validateStarknetAddress(r)).with(m.Chain.HyperCore,()=>j.validateHyperCoreAddress(r)).otherwise(()=>!1)}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"@swapkit/helpers";export*from"@swapkit/helpers/api";export*from"@swapkit/helpers/contracts";export*from"@swapkit/tokens";export*from"@swapkit/toolboxes";export*from"@swapkit/toolboxes/cardano";export*from"@swapkit/toolboxes/cosmos";export*from"@swapkit/toolboxes/evm";export*from"@swapkit/toolboxes/near";export*from"@swapkit/toolboxes/radix";export*from"@swapkit/toolboxes/ripple";export*from"@swapkit/toolboxes/solana";export*from"@swapkit/toolboxes/starknet";export*from"@swapkit/toolboxes/substrate";export*from"@swapkit/toolboxes/sui";export*from"@swapkit/toolboxes/ton";export*from"@swapkit/toolboxes/tron";export*from"@swapkit/toolboxes/utxo";export*from"@swapkit/wallet-keystore";import{Chain as r,CosmosChains as s,EVMChains as p,SubstrateChains as l,UTXOChains as
|
|
1
|
+
export*from"@swapkit/helpers";export*from"@swapkit/helpers/api";export*from"@swapkit/helpers/contracts";export*from"@swapkit/tokens";export*from"@swapkit/toolboxes";export*from"@swapkit/toolboxes/cardano";export*from"@swapkit/toolboxes/cosmos";export*from"@swapkit/toolboxes/evm";export*from"@swapkit/toolboxes/near";export*from"@swapkit/toolboxes/radix";export*from"@swapkit/toolboxes/ripple";export*from"@swapkit/toolboxes/solana";export*from"@swapkit/toolboxes/starknet";export*from"@swapkit/toolboxes/substrate";export*from"@swapkit/toolboxes/sui";export*from"@swapkit/toolboxes/ton";export*from"@swapkit/toolboxes/tron";export*from"@swapkit/toolboxes/utxo";export*from"@swapkit/wallet-keystore";import{Chain as r,CosmosChains as s,EVMChains as p,SubstrateChains as l,SwapKitError as x,UTXOChains as n}from"@swapkit/helpers";import{getAptosToolbox as f}from"@swapkit/toolboxes/aptos";import{getCardanoToolbox as T}from"@swapkit/toolboxes/cardano";import{getCosmosToolbox as d}from"@swapkit/toolboxes/cosmos";import{getEvmToolbox as h}from"@swapkit/toolboxes/evm";import{getHyperCoreToolbox as b}from"@swapkit/toolboxes/hypercore";import{getNearToolbox as u}from"@swapkit/toolboxes/near";import{getRadixToolbox as g}from"@swapkit/toolboxes/radix";import{getRippleToolbox as w}from"@swapkit/toolboxes/ripple";import{getSolanaToolbox as C}from"@swapkit/toolboxes/solana";import{getStarknetToolbox as A}from"@swapkit/toolboxes/starknet";import{getStellarToolbox as S}from"@swapkit/toolboxes/stellar";import{getSubstrateToolbox as y}from"@swapkit/toolboxes/substrate";import{getSuiToolbox as P}from"@swapkit/toolboxes/sui";import{getTONToolbox as v}from"@swapkit/toolboxes/ton";import{getTronToolbox as c}from"@swapkit/toolboxes/tron";import{getUtxoToolbox as V}from"@swapkit/toolboxes/utxo";import{match as R}from"ts-pattern";function k(o,...m){let t=m[0];return R(o).with(...p,r.MegaETH,(a)=>{return h(a,t)}).with(...n,(a)=>{return V(a,t)}).with(...s,(a)=>{return d(a,t)}).with(...l,(a)=>{return y(a,t)}).with(r.Radix,()=>{return g(t)}).with(r.Ripple,()=>{return w(t)}).with(r.Solana,()=>{return C(t)}).with(r.Sui,()=>{return P(t)}).with(r.Tron,()=>{return c(t)}).with(r.HyperCore,()=>{return b(t)}).with(r.Near,()=>{return u(t)}).with(r.Cardano,()=>{return T(t)}).with(r.Ton,()=>{return v(t)}).with(r.Starknet,()=>{return A(t)}).with(r.Aptos,()=>{return f(t)}).with(r.Stellar,()=>{return S(t)}).with(r.Spark,()=>{throw new x("toolbox_not_supported",{chain:o})}).exhaustive()}import{Chain as e,CosmosChains as E,EVMChains as H,SubstrateChains as N,UTXOChains as O}from"@swapkit/helpers";import{validateAptosAddress as U}from"@swapkit/toolboxes/aptos";import{validateCardanoAddress as M}from"@swapkit/toolboxes/cardano";import{getCosmosAddressValidator as X}from"@swapkit/toolboxes/cosmos";import{validateEVMAddress as _}from"@swapkit/toolboxes/evm";import{validateHyperCoreAddress as K}from"@swapkit/toolboxes/hypercore";import{validateNearAddress as j}from"@swapkit/toolboxes/near";import{validateRadixAddress as q}from"@swapkit/toolboxes/radix";import{validateRippleAddress as z}from"@swapkit/toolboxes/ripple";import{validateSolanaAddress as B}from"@swapkit/toolboxes/solana";import{validateStarknetAddress as D}from"@swapkit/toolboxes/starknet";import{validateStellarAddress as F}from"@swapkit/toolboxes/stellar";import{getSubstrateAddressValidator as G}from"@swapkit/toolboxes/substrate";import{validateSuiAddress as I}from"@swapkit/toolboxes/sui";import{validateTonAddress as J}from"@swapkit/toolboxes/ton";import{validateTronAddress as L}from"@swapkit/toolboxes/tron";import{getUTXOAddressValidator as Q}from"@swapkit/toolboxes/utxo";import{match as W}from"ts-pattern";function Y({address:o,chain:m}){return W(m).with(...H,()=>_(o)).with(...O,(i)=>{return Q(i)(o)}).with(...E,(i)=>{return X(i)(o)}).with(...N,(i)=>{return G({chain:i})(o)}).with(e.Aptos,()=>U(o)).with(e.Cardano,()=>M(o)).with(e.Near,()=>j(o)).with(e.Stellar,()=>F(o)).with(e.Radix,()=>q(o)).with(e.Ripple,()=>z(o)).with(e.Solana,()=>B(o)).with(e.Sui,()=>I(o)).with(e.Ton,()=>J(o)).with(e.Tron,()=>L(o)).with(e.Starknet,()=>D(o)).with(e.HyperCore,()=>K(o)).otherwise(()=>!1)}export{Y as validateChainAddress,k as getChainToolbox};
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "swapkit-dev",
|
|
3
3
|
"dependencies": {
|
|
4
|
-
"@swapkit/helpers": "4.13.
|
|
4
|
+
"@swapkit/helpers": "4.13.10",
|
|
5
5
|
"@swapkit/tokens": "4.2.8",
|
|
6
|
-
"@swapkit/toolboxes": "4.15.
|
|
7
|
-
"@swapkit/wallet-keystore": "4.3.
|
|
6
|
+
"@swapkit/toolboxes": "4.15.14",
|
|
7
|
+
"@swapkit/wallet-keystore": "4.3.33"
|
|
8
8
|
},
|
|
9
9
|
"description": "SwapKit - Server SDK",
|
|
10
10
|
"exports": {
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"type-check:go": "tsgo"
|
|
26
26
|
},
|
|
27
27
|
"type": "module",
|
|
28
|
-
"version": "4.2.
|
|
28
|
+
"version": "4.2.52"
|
|
29
29
|
}
|