@tcswap/wallet-core 4.0.59 → 4.0.60
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 +2 -2
- package/dist/index.cjs.map +2 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var{defineProperty:p,getOwnPropertyNames:r,getOwnPropertyDescriptor:i}=Object,d=Object.prototype.hasOwnProperty;var
|
|
1
|
+
var{defineProperty:p,getOwnPropertyNames:r,getOwnPropertyDescriptor:i}=Object,d=Object.prototype.hasOwnProperty;function y(e){return this[e]}var c=(e)=>{var n=(o??=new WeakMap).get(e),t;if(n)return n;if(n=p({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var a of r(e))if(!d.call(n,a))p(n,a,{get:y.bind(e,a),enumerable:!(t=i(e,a))||t.enumerable})}return o.set(e,n),n},o;var C=(e)=>e;function h(e,n){this[e]=C.bind(null,n)}var u=(e,n)=>{for(var t in n)p(e,t,{get:n[t],enumerable:!0,configurable:!0,set:h.bind(n,t)})};var W={};u(W,{getWalletSupportedChains:()=>m,createWallet:()=>T});module.exports=c(W);function T({connect:e,name:n,supportedChains:t,walletType:a}){function s(l){return e({...l,supportedChains:t,walletType:a})}return{[n]:{connectWallet:s,supportedChains:t}}}function m(e){let n=Object.keys(e)?.[0]||"";return e?.[n]?.supportedChains||[]}
|
|
2
2
|
|
|
3
|
-
//# debugId=
|
|
3
|
+
//# debugId=AC883D2F973DFFA464756E2164756E21
|
|
4
4
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import type { AddChainType, Chain, WalletOption } from \"@tcswap/helpers\";\n\nexport function createWallet<\n ConnectParams extends any[],\n SupportedChains extends Chain[],\n const Name extends string,\n WalletType extends WalletOption,\n>({\n connect,\n name,\n supportedChains,\n walletType,\n}: {\n connect: (connectParams: {\n addChain: AddChainType;\n walletType: WalletType;\n supportedChains: SupportedChains;\n }) => (...params: ConnectParams) => Promise<boolean>;\n name: Name;\n supportedChains: SupportedChains;\n walletType?: WalletType | string;\n}) {\n function connectWallet(connectParams: { addChain: AddChainType }) {\n return connect({ ...connectParams, supportedChains, walletType: walletType as WalletType });\n }\n\n return { [name]: { connectWallet, supportedChains } } as unknown as {\n [key in Name]: { connectWallet: typeof connectWallet; supportedChains: SupportedChains };\n };\n}\n\nexport function getWalletSupportedChains<T extends ReturnType<typeof createWallet<any, any, any, any>>>(\n wallet: T,\n): T[keyof T][\"supportedChains\"] {\n const walletName = Object.keys(wallet)?.[0] || \"\";\n return wallet?.[walletName]?.supportedChains || [];\n}\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": "ynBAEO,SAAS,CAKf,EACC,UACA,OACA,kBACA,cAUC,CACD,SAAS,CAAa,CAAC,EAA2C,CAChE,OAAO,EAAQ,IAAK,EAAe,kBAAiB,WAAY,CAAyB,CAAC,EAG5F,MAAO,EAAG,GAAO,CAAE,gBAAe,iBAAgB,CAAE,EAK/C,SAAS,CAAuF,CACrG,EAC+B,CAC/B,IAAM,EAAa,OAAO,KAAK,CAAM,IAAI,IAAM,GAC/C,OAAO,IAAS,IAAa,iBAAmB,CAAC",
|
|
8
|
+
"debugId": "AC883D2F973DFFA464756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "swapkit-oss",
|
|
3
|
-
"dependencies": { "@tcswap/helpers": "4.5.
|
|
3
|
+
"dependencies": { "@tcswap/helpers": "4.5.16" },
|
|
4
4
|
"description": "USwap - Wallet Core",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"type-check:go": "tsgo"
|
|
30
30
|
},
|
|
31
31
|
"type": "module",
|
|
32
|
-
"version": "4.0.
|
|
32
|
+
"version": "4.0.60"
|
|
33
33
|
}
|