@rango-dev/provider-coin98 0.62.1-next.0 → 0.62.1-next.1

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.
@@ -1,5 +1,5 @@
1
- import type { Context, FunctionWithContext } from '@rango-dev/wallets-core';
2
- import { type SolanaActions, type ProviderAPI as SolanaProviderApi } from '@rango-dev/wallets-core/namespaces/solana';
1
+ import type { Context, FunctionWithContext } from '@hub3js/core';
2
+ import { type SolanaActions, type ProviderAPI as SolanaProviderApi } from '@hub3js/solana';
3
3
  declare function connect(getInstance: () => SolanaProviderApi): FunctionWithContext<SolanaActions['connect'], Context>;
4
4
  export declare const solanaActions: {
5
5
  connect: typeof connect;
@@ -1 +1 @@
1
- {"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["../../src/actions/solana.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE5E,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,WAAW,IAAI,iBAAiB,EAEtC,MAAM,2CAA2C,CAAC;AAEnD,iBAAS,OAAO,CACd,WAAW,EAAE,MAAM,iBAAiB,GACnC,mBAAmB,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,CAMxD;AAED,eAAO,MAAM,aAAa;;CAAc,CAAC"}
1
+ {"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["../../src/actions/solana.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEjE,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,WAAW,IAAI,iBAAiB,EAEtC,MAAM,gBAAgB,CAAC;AAExB,iBAAS,OAAO,CACd,WAAW,EAAE,MAAM,iBAAiB,GACnC,mBAAmB,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,CAMxD;AAED,eAAO,MAAM,aAAa;;CAAc,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { ProviderMetadata } from '@rango-dev/wallets-core';
1
+ import type { ProviderMetadata } from '@hub3js/core';
2
2
  import { WalletTypes } from '@rango-dev/wallets-shared';
3
3
  export declare const WALLET_ID = WalletTypes.COIN98;
4
4
  export declare const COIN98_INJECTION_DELAY = 1000;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAUxD,eAAO,MAAM,SAAS,qBAAqB,CAAC;AAC5C,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAC3C,eAAO,MAAM,QAAQ,EAAE,gBAwCtB,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAUxD,eAAO,MAAM,SAAS,qBAAqB,CAAC;AAC5C,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAC3C,eAAO,MAAM,QAAQ,EAAE,gBAwCtB,CAAC"}
package/dist/mod.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- declare const versions: () => import("@rango-dev/wallets-core/utils").VersionedProviders;
1
+ declare const versions: () => readonly [readonly ["1.0.0", import("@hub3js/core").Provider<Record<"evm", import("@hub3js/evm").EvmActions> & Record<"solana", import("@hub3js/solana").SolanaActions>>]];
2
2
  export { versions };
3
3
  //# sourceMappingURL=mod.d.ts.map
package/dist/mod.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,QAAQ,kEAC8C,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,QAAQ,kLAC8C,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAE,CAAC"}
package/dist/mod.js CHANGED
@@ -1,2 +1,2 @@
1
- var M=Object.defineProperty;var n=(o,e)=>M(o,"name",{value:e,configurable:!0});import{defineVersions as ro}from"@rango-dev/wallets-core/utils";import{ProviderBuilder as to}from"@rango-dev/wallets-core";import{WalletTypes as V}from"@rango-dev/wallets-shared";import{evmBlockchains as W,solanaBlockchain as j}from"rango-types";import{dynamicImportWithRefinedError as D,getNetworkInstance as w,Networks as v}from"@rango-dev/wallets-shared";import{DefaultSignerFactory as B,TransactionType as S}from"rango-types";import"@rango-dev/signer-solana";import{generalSolanaTransactionExecutor as O}from"@rango-dev/signer-solana";import{PublicKey as _}from"@solana/web3.js";import R from"bs58";import{SignerError as d,SignerErrorCode as u}from"rango-types";var s=class{static{n(this,"Coin98SolanaSigner")}provider;constructor(e){this.provider=e}async signMessage(e){try{return(await this.provider.signMessage(e)).signature}catch(r){throw new d(u.SIGN_TX_ERROR,void 0,r)}}async signAndSendTx(e){let r=n(async t=>{let i=await this.provider.request({method:"sol_sign",params:[t]}),k=new _(i.publicKey),L=R.decode(i.signature);return t.addSignature(k,Buffer.from(L)),t.serialize()},"DefaultSolanaSigner");try{return{hash:await O(e,r)}}catch(t){throw t&&typeof t=="object"&&"code"in t&&t.code===4001?new d(u.REJECTED_BY_USER,void 0,t):new d(u.SIGN_TX_ERROR,void 0,t)}}};async function g(o){let e=w(o,v.ETHEREUM),r=w(o,v.SOLANA),t=new B,{DefaultEvmSigner:i}=await D(async()=>await import("@rango-dev/signer-evm"));return t.registerSigner(S.EVM,new i(e)),t.registerSigner(S.SOLANA,new s(r)),t}n(g,"getSigners");import{Networks as l}from"@rango-dev/wallets-shared";function c(){let{coin98:o}=window;if(!o)return null;let e=new Map;return o.provider&&e.set(l.ETHEREUM,o.provider),o.sol&&e.set(l.SOLANA,o.sol),e}n(c,"coin98");function E(){let o=c();if(!o)throw new Error("Coin98 is not injected. Please check your wallet.");return o}n(E,"getInstanceOrThrow");function m(){let e=c()?.get(l.ETHEREUM);if(!e)throw new Error("Coin98 not injected or EVM not enabled. Please check your wallet.");return e}n(m,"evmCoin98");function f(){let e=c()?.get(l.SOLANA);if(!e)throw new Error("Coin98 Solana instance is not available. Ensure that Solana support is enabled in your wallet.");return e}n(f,"solanaCoin98");var a=V.COIN98,y=1e3,A={name:"Coin98",icon:"https://raw.githubusercontent.com/rango-exchange/assets/main/wallets/coin98/icon.svg",extensions:{chrome:"https://chrome.google.com/webstore/detail/coin98-wallet/aeachknmefphepccionboohckonoeemg",brave:"https://chrome.google.com/webstore/detail/coin98-wallet/aeachknmefphepccionboohckonoeemg",homepage:"https://coin98.com/wallet"},properties:[{name:"namespaces",value:{selection:"multiple",data:[{label:"EVM",value:"EVM",id:"ETH",getSupportedChains:o=>W(o)},{label:"Solana",value:"Solana",id:"SOLANA",getSupportedChains:o=>j(o)}]}},{name:"signers",value:{getSigners:async()=>g(E())}}]};import{NamespaceBuilder as F}from"@rango-dev/wallets-core";import{builders as J,standardizeAndThrowError as G}from"@rango-dev/wallets-core/namespaces/common";import{actions as h,builders as p}from"@rango-dev/wallets-core/namespaces/evm";var[H,b]=p.changeAccountSubscriber(m).build(),K=p.connect().action(h.connect(m)).before(H).or(b).or(G).build(),U=J.disconnect().after(b).build(),z=p.canSwitchNetwork().action(h.canSwitchNetwork()).build(),Y=p.getChainId().action(h.getChainId(m)).build(),P=new F("EVM",a).action(K).action(U).action(z).action(Y).build();import{NamespaceBuilder as Q}from"@rango-dev/wallets-core";import{builders as Z,standardizeAndThrowError as $}from"@rango-dev/wallets-core/namespaces/common";import{builders as T}from"@rango-dev/wallets-core/namespaces/solana";import{utils as X}from"@rango-dev/wallets-core/namespaces/solana";function q(o){return async()=>{let r=await o().connect();return X.formatAccountsToCAIP(r)}}n(q,"connect");var C={connect:q};var[oo,I]=T.changeAccountSubscriber(f).onSwitchAccount(async(o,e)=>{o.preventDefault(),o.payload&&o.payload.length!==0?e.action("connect"):e.action("disconnect")}).addEventListener((o,e)=>o.on("accountsChanged",e)).removeEventListener((o,e)=>o.off("accountsChanged",e)).build(),eo=T.connect().action(C.connect(f)).before(oo).or(I).or($).build(),no=Z.disconnect().after(I).build(),N=new Q("Solana",a).action(eo).action(no).build();var x=n(()=>new to(a).init(function(o){let[,e]=o.state();setTimeout(()=>{c()&&(e("installed",!0),console.debug("[coin98] instance detected.",o))},y)}).config("metadata",A).add("evm",P).add("solana",N).build(),"buildProvider");var $o=n(()=>ro().version("1.0.0",x()).build(),"versions");export{$o as versions};
1
+ var _=Object.defineProperty;var n=(o,e)=>_(o,"name",{value:e,configurable:!0});import{defineVersions as ro}from"@hub3js/core/utils";import{ProviderBuilder as to}from"@hub3js/core";import{WalletTypes as W}from"@rango-dev/wallets-shared";import{evmBlockchains as F,solanaBlockchain as J}from"rango-types";import{dynamicImportWithRefinedError as j,getNetworkInstance as S,Networks as w}from"@rango-dev/wallets-shared";import{DefaultSignerFactory as V,TransactionType as v}from"rango-types";import"@rango-dev/signer-solana";import{generalSolanaTransactionExecutor as R}from"@rango-dev/signer-solana";import{PublicKey as B}from"@solana/web3.js";import D from"bs58";import{SignerError as d,SignerErrorCode as u}from"rango-types";var s=class{static{n(this,"Coin98SolanaSigner")}provider;constructor(e){this.provider=e}async signMessage(e){try{return(await this.provider.signMessage(e)).signature}catch(r){throw new d(u.SIGN_TX_ERROR,void 0,r)}}async signAndSendTx(e){let r=n(async t=>{let a=await this.provider.request({method:"sol_sign",params:[t]}),M=new B(a.publicKey),O=D.decode(a.signature);return t.addSignature(M,Buffer.from(O)),t.serialize()},"DefaultSolanaSigner");try{return{hash:await R(e,r)}}catch(t){throw t&&typeof t=="object"&&"code"in t&&t.code===4001?new d(u.REJECTED_BY_USER,void 0,t):new d(u.SIGN_TX_ERROR,void 0,t)}}};async function f(o){let e=S(o,w.ETHEREUM),r=S(o,w.SOLANA),t=new V,{DefaultEvmSigner:a}=await j(async()=>await import("@rango-dev/signer-evm"));return t.registerSigner(v.EVM,new a(e)),t.registerSigner(v.SOLANA,new s(r)),t}n(f,"getSigners");import{Networks as m}from"@rango-dev/wallets-shared";function c(){let{coin98:o}=window;if(!o)return null;let e=new Map;return o.provider&&e.set(m.ETHEREUM,o.provider),o.sol&&e.set(m.SOLANA,o.sol),e}n(c,"coin98");function E(){let o=c();if(!o)throw new Error("Coin98 is not injected. Please check your wallet.");return o}n(E,"getInstanceOrThrow");function l(){let e=c()?.get(m.ETHEREUM);if(!e)throw new Error("Coin98 not injected or EVM not enabled. Please check your wallet.");return e}n(l,"evmCoin98");function g(){let e=c()?.get(m.SOLANA);if(!e)throw new Error("Coin98 Solana instance is not available. Ensure that Solana support is enabled in your wallet.");return e}n(g,"solanaCoin98");var i=W.COIN98,b=1e3,y={name:"Coin98",icon:"https://raw.githubusercontent.com/rango-exchange/assets/main/wallets/coin98/icon.svg",extensions:{chrome:"https://chrome.google.com/webstore/detail/coin98-wallet/aeachknmefphepccionboohckonoeemg",brave:"https://chrome.google.com/webstore/detail/coin98-wallet/aeachknmefphepccionboohckonoeemg",homepage:"https://coin98.com/wallet"},properties:[{name:"namespaces",value:{selection:"multiple",data:[{label:"EVM",value:"EVM",id:"ETH",getSupportedChains:o=>F(o)},{label:"Solana",value:"Solana",id:"SOLANA",getSupportedChains:o=>J(o)}]}},{name:"signers",value:{getSigners:async()=>f(E())}}]};import{NamespaceBuilder as G}from"@hub3js/core";import{actions as h,builders as p}from"@hub3js/evm";import*as A from"@hub3js/std/builders";import{standardizeAndThrowError as H}from"@hub3js/std/operators";var[K,P]=p.changeAccountSubscriber(l).build(),U=p.connect().action(h.connect(l)).before(K).or(P).or(H).build(),z=A.disconnect().after(P).build(),Y=p.canSwitchNetwork().action(h.canSwitchNetwork()).build(),X=p.getChainId().action(h.getChainId(l)).build(),C=new G("EVM",i).action(U).action(z).action(Y).action(X).build();import{NamespaceBuilder as Z}from"@hub3js/core";import{builders as I}from"@hub3js/solana";import*as N from"@hub3js/std/builders";import{standardizeAndThrowError as $}from"@hub3js/std/operators";import{utils as q}from"@hub3js/solana";function Q(o){return async()=>{let r=await o().connect();return q.formatAccountsToCAIP(r)}}n(Q,"connect");var T={connect:Q};var[oo,x]=I.changeAccountSubscriber(g).onSwitchAccount(async(o,e)=>{o.preventDefault(),o.payload&&o.payload.length!==0?e.action("connect"):e.action("disconnect")}).addEventListener((o,e)=>o.on("accountsChanged",e)).removeEventListener((o,e)=>o.off("accountsChanged",e)).build(),eo=I.connect().action(T.connect(g)).before(oo).or(x).or($).build(),no=N.disconnect().after(x).build(),k=new Z("Solana",i).action(eo).action(no).build();var L=n(()=>new to(i).init(function(o){let[,e]=o.state();setTimeout(()=>{c()&&(e("installed",!0),console.debug("[coin98] instance detected.",o))},b)}).config("metadata",y).add("evm",C).add("solana",k).build(),"buildProvider");var $o=n(()=>ro().version("1.0.0",L()).build(),"versions");export{$o as versions};
2
2
  //# sourceMappingURL=mod.js.map
package/dist/mod.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/mod.ts", "../src/provider.ts", "../src/constants.ts", "../src/signer.ts", "../src/signers/solana.ts", "../src/utils.ts", "../src/namespaces/evm.ts", "../src/namespaces/solana.ts", "../src/actions/solana.ts"],
4
- "sourcesContent": ["import { defineVersions } from '@rango-dev/wallets-core/utils';\n\nimport { buildProvider } from './provider.js';\n\nconst versions = () =>\n defineVersions().version('1.0.0', buildProvider()).build();\n\nexport { versions };\n", "import { ProviderBuilder } from '@rango-dev/wallets-core';\n\nimport { COIN98_INJECTION_DELAY, metadata, WALLET_ID } from './constants.js';\nimport { evm } from './namespaces/evm.js';\nimport { solana } from './namespaces/solana.js';\nimport { coin98 } from './utils.js';\n\nconst buildProvider = () =>\n new ProviderBuilder(WALLET_ID)\n .init(function (context) {\n const [, setState] = context.state();\n\n setTimeout(() => {\n if (coin98()) {\n setState('installed', true);\n console.debug('[coin98] instance detected.', context);\n }\n }, COIN98_INJECTION_DELAY);\n })\n .config('metadata', metadata)\n .add('evm', evm)\n .add('solana', solana)\n .build();\n\nexport { buildProvider };\n", "import type { ProviderMetadata } from '@rango-dev/wallets-core';\n\nimport { WalletTypes } from '@rango-dev/wallets-shared';\nimport {\n type BlockchainMeta,\n evmBlockchains,\n solanaBlockchain,\n} from 'rango-types';\n\nimport getSigners from './signer.js';\nimport { getInstanceOrThrow } from './utils.js';\n\nexport const WALLET_ID = WalletTypes.COIN98;\nexport const COIN98_INJECTION_DELAY = 1000;\nexport const metadata: ProviderMetadata = {\n name: 'Coin98',\n icon: 'https://raw.githubusercontent.com/rango-exchange/assets/main/wallets/coin98/icon.svg',\n extensions: {\n chrome:\n 'https://chrome.google.com/webstore/detail/coin98-wallet/aeachknmefphepccionboohckonoeemg',\n brave:\n 'https://chrome.google.com/webstore/detail/coin98-wallet/aeachknmefphepccionboohckonoeemg',\n homepage: 'https://coin98.com/wallet',\n },\n properties: [\n {\n name: 'namespaces',\n value: {\n selection: 'multiple',\n data: [\n {\n label: 'EVM',\n value: 'EVM',\n id: 'ETH',\n getSupportedChains: (allBlockchains: BlockchainMeta[]) =>\n evmBlockchains(allBlockchains),\n },\n {\n label: 'Solana',\n value: 'Solana',\n id: 'SOLANA',\n getSupportedChains: (allBlockchains: BlockchainMeta[]) =>\n solanaBlockchain(allBlockchains),\n },\n ],\n },\n },\n {\n name: 'signers',\n value: {\n getSigners: async () => getSigners(getInstanceOrThrow()),\n },\n },\n ],\n};\n", "import type { LegacyNetworkProviderMap } from '@rango-dev/wallets-core/legacy';\nimport type { SignerFactory } from 'rango-types';\n\nimport {\n dynamicImportWithRefinedError,\n getNetworkInstance,\n Networks,\n} from '@rango-dev/wallets-shared';\nimport { DefaultSignerFactory, TransactionType as TxType } from 'rango-types';\n\nimport { Coin98SolanaSigner } from './signers/solana.js';\n\nexport default async function getSigners(\n provider: LegacyNetworkProviderMap\n): Promise<SignerFactory> {\n const ethProvider = getNetworkInstance(provider, Networks.ETHEREUM);\n const solProvider = getNetworkInstance(provider, Networks.SOLANA);\n const signers = new DefaultSignerFactory();\n const { DefaultEvmSigner } = await dynamicImportWithRefinedError(\n async () => await import('@rango-dev/signer-evm')\n );\n signers.registerSigner(TxType.EVM, new DefaultEvmSigner(ethProvider));\n signers.registerSigner(TxType.SOLANA, new Coin98SolanaSigner(solProvider));\n return signers;\n}\n", "import type { Transaction, VersionedTransaction } from '@solana/web3.js';\nimport type { GenericSigner, SolanaTransaction } from 'rango-types';\n\nimport {\n type SolanaExternalProvider,\n type SolanaWeb3Signer,\n} from '@rango-dev/signer-solana';\nimport { generalSolanaTransactionExecutor } from '@rango-dev/signer-solana';\nimport { PublicKey } from '@solana/web3.js';\nimport bs58 from 'bs58';\nimport { SignerError, SignerErrorCode } from 'rango-types';\n\nexport class Coin98SolanaSigner implements GenericSigner<SolanaTransaction> {\n private provider: SolanaExternalProvider;\n constructor(provider: SolanaExternalProvider) {\n this.provider = provider;\n }\n\n async signMessage(msg: string): Promise<string> {\n try {\n const result = await this.provider.signMessage(msg);\n return result.signature as unknown as string;\n } catch (error) {\n throw new SignerError(SignerErrorCode.SIGN_TX_ERROR, undefined, error);\n }\n }\n\n async signAndSendTx(tx: SolanaTransaction): Promise<{ hash: string }> {\n const DefaultSolanaSigner: SolanaWeb3Signer = async (\n solanaWeb3Transaction: Transaction | VersionedTransaction\n ) => {\n const response: { publicKey: string; signature: string } =\n await this.provider.request({\n method: 'sol_sign',\n params: [solanaWeb3Transaction],\n });\n const publicKey = new PublicKey(response.publicKey);\n const sign = bs58.decode(response.signature);\n\n solanaWeb3Transaction.addSignature(publicKey, Buffer.from(sign));\n const raw = solanaWeb3Transaction.serialize();\n return raw;\n };\n try {\n const hash = await generalSolanaTransactionExecutor(\n tx,\n DefaultSolanaSigner\n );\n return { hash };\n } catch (e: unknown) {\n const REJECTION_CODE = 4001;\n if (\n e &&\n typeof e === 'object' &&\n 'code' in e &&\n e.code === REJECTION_CODE\n ) {\n throw new SignerError(SignerErrorCode.REJECTED_BY_USER, undefined, e);\n }\n throw new SignerError(SignerErrorCode.SIGN_TX_ERROR, undefined, e);\n }\n }\n}\n", "import type { Provider } from './types.js';\nimport type { ProviderAPI as EvmProviderApi } from '@rango-dev/wallets-core/namespaces/evm';\nimport type { ProviderAPI as SolanaProviderApi } from '@rango-dev/wallets-core/namespaces/solana';\n\nimport { Networks } from '@rango-dev/wallets-shared';\n\nexport function coin98() {\n const { coin98 } = window;\n\n if (!coin98) {\n return null;\n }\n\n const instances = new Map();\n\n if (coin98.provider) {\n instances.set(Networks.ETHEREUM, coin98.provider);\n }\n if (coin98.sol) {\n instances.set(Networks.SOLANA, coin98.sol);\n }\n\n return instances;\n}\n\nexport function getInstanceOrThrow(): Provider {\n const instances = coin98();\n\n if (!instances) {\n throw new Error('Coin98 is not injected. Please check your wallet.');\n }\n\n return instances;\n}\n\nexport function evmCoin98(): EvmProviderApi {\n const instances = coin98();\n const evmInstance = instances?.get(Networks.ETHEREUM);\n if (!evmInstance) {\n throw new Error(\n 'Coin98 not injected or EVM not enabled. Please check your wallet.'\n );\n }\n return evmInstance as EvmProviderApi;\n}\n\nexport function solanaCoin98(): SolanaProviderApi {\n const instances = coin98();\n const solanaInstance = instances?.get(Networks.SOLANA);\n if (!solanaInstance) {\n throw new Error(\n 'Coin98 Solana instance is not available. Ensure that Solana support is enabled in your wallet.'\n );\n }\n return solanaInstance as SolanaProviderApi;\n}\n", "import type { EvmActions } from '@rango-dev/wallets-core/namespaces/evm';\n\nimport { NamespaceBuilder } from '@rango-dev/wallets-core';\nimport {\n builders as commonBuilders,\n standardizeAndThrowError,\n} from '@rango-dev/wallets-core/namespaces/common';\nimport { actions, builders } from '@rango-dev/wallets-core/namespaces/evm';\n\nimport { WALLET_ID } from '../constants.js';\nimport { evmCoin98 } from '../utils.js';\n\nconst [changeAccountSubscriber, changeAccountCleanup] = builders\n .changeAccountSubscriber(evmCoin98)\n .build();\n\nconst connect = builders\n .connect()\n .action(actions.connect(evmCoin98))\n .before(changeAccountSubscriber)\n .or(changeAccountCleanup)\n .or(standardizeAndThrowError)\n .build();\n\nconst disconnect = commonBuilders\n .disconnect<EvmActions>()\n .after(changeAccountCleanup)\n .build();\n\nconst canSwitchNetwork = builders\n .canSwitchNetwork()\n .action(actions.canSwitchNetwork())\n .build();\n\nconst getChainId = builders\n .getChainId()\n .action(actions.getChainId(evmCoin98))\n .build();\n\nconst evm = new NamespaceBuilder<EvmActions>('EVM', WALLET_ID)\n .action(connect)\n .action(disconnect)\n .action(canSwitchNetwork)\n .action(getChainId)\n .build();\n\nexport { evm };\n", "import { NamespaceBuilder } from '@rango-dev/wallets-core';\nimport {\n builders as commonBuilders,\n standardizeAndThrowError,\n} from '@rango-dev/wallets-core/namespaces/common';\nimport {\n builders,\n type SolanaActions,\n} from '@rango-dev/wallets-core/namespaces/solana';\n\nimport { solanaActions } from '../actions/solana.js';\nimport { WALLET_ID } from '../constants.js';\nimport { solanaCoin98 } from '../utils.js';\n\nconst [changeAccountSubscriber, changeAccountCleanup] = builders\n .changeAccountSubscriber(solanaCoin98)\n /*\n * Coin98 returns EVM addresses on account change instead of Solana addresses even though\n * we are listening to the changes on the Solana instance.\n * But if we get the EVM address, it means that we also have permission to eagerly get\n * the Solana address of the new account.\n */\n .onSwitchAccount(async (event, context) => {\n event.preventDefault();\n if (event.payload && event.payload.length !== 0) {\n context.action('connect');\n } else {\n context.action('disconnect');\n }\n })\n .addEventListener((instance, callback) =>\n instance.on('accountsChanged', callback)\n )\n .removeEventListener((instance, callback) =>\n instance.off('accountsChanged', callback)\n )\n .build();\n\nconst connect = builders\n .connect()\n .action(solanaActions.connect(solanaCoin98))\n .before(changeAccountSubscriber)\n .or(changeAccountCleanup)\n .or(standardizeAndThrowError)\n .build();\n\nconst disconnect = commonBuilders\n .disconnect<SolanaActions>()\n .after(changeAccountCleanup)\n .build();\n\nconst solana = new NamespaceBuilder<SolanaActions>('Solana', WALLET_ID)\n .action(connect)\n .action(disconnect)\n .build();\n\nexport { solana };\n", "import type { Context, FunctionWithContext } from '@rango-dev/wallets-core';\n\nimport {\n type SolanaActions,\n type ProviderAPI as SolanaProviderApi,\n utils,\n} from '@rango-dev/wallets-core/namespaces/solana';\n\nfunction connect(\n getInstance: () => SolanaProviderApi\n): FunctionWithContext<SolanaActions['connect'], Context> {\n return async () => {\n const solanaInstance = getInstance();\n const connectResult = await solanaInstance.connect();\n return utils.formatAccountsToCAIP(connectResult);\n };\n}\n\nexport const solanaActions = { connect };\n"],
5
- "mappings": "+EAAA,OAAS,kBAAAA,OAAsB,gCCA/B,OAAS,mBAAAC,OAAuB,0BCEhC,OAAS,eAAAC,MAAmB,4BAC5B,OAEE,kBAAAC,EACA,oBAAAC,MACK,cCJP,OACE,iCAAAC,EACA,sBAAAC,EACA,YAAAC,MACK,4BACP,OAAS,wBAAAC,EAAsB,mBAAmBC,MAAc,cCLhE,MAGO,2BACP,OAAS,oCAAAC,MAAwC,2BACjD,OAAS,aAAAC,MAAiB,kBAC1B,OAAOC,MAAU,OACjB,OAAS,eAAAC,EAAa,mBAAAC,MAAuB,cAEtC,IAAMC,EAAN,KAAqE,CAZ5E,MAY4E,CAAAC,EAAA,2BAClE,SACR,YAAYC,EAAkC,CAC5C,KAAK,SAAWA,CAClB,CAEA,MAAM,YAAYC,EAA8B,CAC9C,GAAI,CAEF,OADe,MAAM,KAAK,SAAS,YAAYA,CAAG,GACpC,SAChB,OAASC,EAAO,CACd,MAAM,IAAIC,EAAYC,EAAgB,cAAe,OAAWF,CAAK,CACvE,CACF,CAEA,MAAM,cAAcG,EAAkD,CACpE,IAAMC,EAAwCP,EAAA,MAC5CQ,GACG,CACH,IAAMC,EACJ,MAAM,KAAK,SAAS,QAAQ,CAC1B,OAAQ,WACR,OAAQ,CAACD,CAAqB,CAChC,CAAC,EACGE,EAAY,I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IACpB,IAAIC,GAAgBC,CAAS,EAC1B,KAAK,SAAUC,EAAS,CACvB,GAAM,CAAC,CAAEC,CAAQ,EAAID,EAAQ,MAAM,EAEnC,WAAW,IAAM,CACXE,EAAO,IACTD,EAAS,YAAa,EAAI,EAC1B,QAAQ,MAAM,8BAA+BD,CAAO,EAExD,EAAGG,CAAsB,CAC3B,CAAC,EACA,OAAO,WAAYC,CAAQ,EAC3B,IAAI,MAAOC,CAAG,EACd,IAAI,SAAUC,CAAM,EACpB,MAAM,EAfW,iBDHtB,IAAMC,GAAWC,EAAA,IACfC,GAAe,EAAE,QAAQ,QAASC,EAAc,CAAC,EAAE,MAAM,EAD1C",
6
- "names": ["defineVersions", "ProviderBuilder", "WalletTypes", "evmBlockchains", "solanaBlockchain", "dynamicImportWithRefinedError", "getNetworkInstance", "Networks", "DefaultSignerFactory", "TxType", "generalSolanaTransactionExecutor", "PublicKey", "bs58", "SignerError", "SignerErrorCode", "Coin98SolanaSigner", "__name", "provider", "msg", "error", "SignerError", "SignerErrorCode", "tx", "DefaultSolanaSigner", "solanaWeb3Transaction", "response", "publicKey", "PublicKey", "sign", "bs58", "generalSolanaTransactionExecutor", "e", "getSigners", "provider", "ethProvider", "getNetworkInstance", "Networks", "solProvider", "signers", "DefaultSignerFactory", "DefaultEvmSigner", "dynamicImportWithRefinedError", "TxType", "Coin98SolanaSigner", "__name", "Networks", "coin98", "instances", "Networks", "__name", "getInstanceOrThrow", "evmCoin98", "evmInstance", "solanaCoin98", "solanaInstance", "WALLET_ID", "WalletTypes", "COIN98_INJECTION_DELAY", "metadata", "allBlockchains", "evmBlockchains", "solanaBlockchain", "getSigners", "getInstanceOrThrow", "NamespaceBuilder", "commonBuilders", "standardizeAndThrowError", "actions", "builders", "changeAccountSubscriber", "changeAccountCleanup", "builders", "evmCoin98", "connect", "actions", "standardizeAndThrowError", "disconnect", "commonBuilders", "canSwitchNetwork", "getChainId", "evm", "NamespaceBuilder", "WALLET_ID", "NamespaceBuilder", "commonBuilders", "standardizeAndThrowError", "builders", "utils", "connect", "getInstance", "connectResult", "utils", "__name", "solanaActions", "changeAccountSubscriber", "changeAccountCleanup", "builders", "solanaCoin98", "event", "context", "instance", "callback", "connect", "solanaActions", "standardizeAndThrowError", "disconnect", "commonBuilders", "solana", "NamespaceBuilder", "WALLET_ID", "buildProvider", "__name", "ProviderBuilder", "WALLET_ID", "context", "setState", "coin98", "COIN98_INJECTION_DELAY", "metadata", "evm", "solana", "versions", "__name", "defineVersions", "buildProvider"]
4
+ "sourcesContent": ["import { defineVersions } from '@hub3js/core/utils';\n\nimport { buildProvider } from './provider.js';\n\nconst versions = () =>\n defineVersions().version('1.0.0', buildProvider()).build();\n\nexport { versions };\n", "import { ProviderBuilder } from '@hub3js/core';\n\nimport { COIN98_INJECTION_DELAY, metadata, WALLET_ID } from './constants.js';\nimport { evm } from './namespaces/evm.js';\nimport { solana } from './namespaces/solana.js';\nimport { coin98 } from './utils.js';\n\nconst buildProvider = () =>\n new ProviderBuilder(WALLET_ID)\n .init(function (context) {\n const [, setState] = context.state();\n\n setTimeout(() => {\n if (coin98()) {\n setState('installed', true);\n console.debug('[coin98] instance detected.', context);\n }\n }, COIN98_INJECTION_DELAY);\n })\n .config('metadata', metadata)\n .add('evm', evm)\n .add('solana', solana)\n .build();\n\nexport { buildProvider };\n", "import type { ProviderMetadata } from '@hub3js/core';\n\nimport { WalletTypes } from '@rango-dev/wallets-shared';\nimport {\n type BlockchainMeta,\n evmBlockchains,\n solanaBlockchain,\n} from 'rango-types';\n\nimport getSigners from './signer.js';\nimport { getInstanceOrThrow } from './utils.js';\n\nexport const WALLET_ID = WalletTypes.COIN98;\nexport const COIN98_INJECTION_DELAY = 1000;\nexport const metadata: ProviderMetadata = {\n name: 'Coin98',\n icon: 'https://raw.githubusercontent.com/rango-exchange/assets/main/wallets/coin98/icon.svg',\n extensions: {\n chrome:\n 'https://chrome.google.com/webstore/detail/coin98-wallet/aeachknmefphepccionboohckonoeemg',\n brave:\n 'https://chrome.google.com/webstore/detail/coin98-wallet/aeachknmefphepccionboohckonoeemg',\n homepage: 'https://coin98.com/wallet',\n },\n properties: [\n {\n name: 'namespaces',\n value: {\n selection: 'multiple',\n data: [\n {\n label: 'EVM',\n value: 'EVM',\n id: 'ETH',\n getSupportedChains: (allBlockchains: BlockchainMeta[]) =>\n evmBlockchains(allBlockchains),\n },\n {\n label: 'Solana',\n value: 'Solana',\n id: 'SOLANA',\n getSupportedChains: (allBlockchains: BlockchainMeta[]) =>\n solanaBlockchain(allBlockchains),\n },\n ],\n },\n },\n {\n name: 'signers',\n value: {\n getSigners: async () => getSigners(getInstanceOrThrow()),\n },\n },\n ],\n};\n", "import type { LegacyNetworkProviderMap } from '@rango-dev/wallets-core/legacy';\nimport type { SignerFactory } from 'rango-types';\n\nimport {\n dynamicImportWithRefinedError,\n getNetworkInstance,\n Networks,\n} from '@rango-dev/wallets-shared';\nimport { DefaultSignerFactory, TransactionType as TxType } from 'rango-types';\n\nimport { Coin98SolanaSigner } from './signers/solana.js';\n\nexport default async function getSigners(\n provider: LegacyNetworkProviderMap\n): Promise<SignerFactory> {\n const ethProvider = getNetworkInstance(provider, Networks.ETHEREUM);\n const solProvider = getNetworkInstance(provider, Networks.SOLANA);\n const signers = new DefaultSignerFactory();\n const { DefaultEvmSigner } = await dynamicImportWithRefinedError(\n async () => await import('@rango-dev/signer-evm')\n );\n signers.registerSigner(TxType.EVM, new DefaultEvmSigner(ethProvider));\n signers.registerSigner(TxType.SOLANA, new Coin98SolanaSigner(solProvider));\n return signers;\n}\n", "import type { Transaction, VersionedTransaction } from '@solana/web3.js';\nimport type { GenericSigner, SolanaTransaction } from 'rango-types';\n\nimport {\n type SolanaExternalProvider,\n type SolanaWeb3Signer,\n} from '@rango-dev/signer-solana';\nimport { generalSolanaTransactionExecutor } from '@rango-dev/signer-solana';\nimport { PublicKey } from '@solana/web3.js';\nimport bs58 from 'bs58';\nimport { SignerError, SignerErrorCode } from 'rango-types';\n\nexport class Coin98SolanaSigner implements GenericSigner<SolanaTransaction> {\n private provider: SolanaExternalProvider;\n constructor(provider: SolanaExternalProvider) {\n this.provider = provider;\n }\n\n async signMessage(msg: string): Promise<string> {\n try {\n const result = await this.provider.signMessage(msg);\n return result.signature as unknown as string;\n } catch (error) {\n throw new SignerError(SignerErrorCode.SIGN_TX_ERROR, undefined, error);\n }\n }\n\n async signAndSendTx(tx: SolanaTransaction): Promise<{ hash: string }> {\n const DefaultSolanaSigner: SolanaWeb3Signer = async (\n solanaWeb3Transaction: Transaction | VersionedTransaction\n ) => {\n const response: { publicKey: string; signature: string } =\n await this.provider.request({\n method: 'sol_sign',\n params: [solanaWeb3Transaction],\n });\n const publicKey = new PublicKey(response.publicKey);\n const sign = bs58.decode(response.signature);\n\n solanaWeb3Transaction.addSignature(publicKey, Buffer.from(sign));\n const raw = solanaWeb3Transaction.serialize();\n return raw;\n };\n try {\n const hash = await generalSolanaTransactionExecutor(\n tx,\n DefaultSolanaSigner\n );\n return { hash };\n } catch (e: unknown) {\n const REJECTION_CODE = 4001;\n if (\n e &&\n typeof e === 'object' &&\n 'code' in e &&\n e.code === REJECTION_CODE\n ) {\n throw new SignerError(SignerErrorCode.REJECTED_BY_USER, undefined, e);\n }\n throw new SignerError(SignerErrorCode.SIGN_TX_ERROR, undefined, e);\n }\n }\n}\n", "import type { Provider } from './types.js';\nimport type { ProviderAPI as EvmProviderApi } from '@hub3js/evm';\nimport type { ProviderAPI as SolanaProviderApi } from '@hub3js/solana';\n\nimport { Networks } from '@rango-dev/wallets-shared';\n\nexport function coin98() {\n const { coin98 } = window;\n\n if (!coin98) {\n return null;\n }\n\n const instances = new Map();\n\n if (coin98.provider) {\n instances.set(Networks.ETHEREUM, coin98.provider);\n }\n if (coin98.sol) {\n instances.set(Networks.SOLANA, coin98.sol);\n }\n\n return instances;\n}\n\nexport function getInstanceOrThrow(): Provider {\n const instances = coin98();\n\n if (!instances) {\n throw new Error('Coin98 is not injected. Please check your wallet.');\n }\n\n return instances;\n}\n\nexport function evmCoin98(): EvmProviderApi {\n const instances = coin98();\n const evmInstance = instances?.get(Networks.ETHEREUM);\n if (!evmInstance) {\n throw new Error(\n 'Coin98 not injected or EVM not enabled. Please check your wallet.'\n );\n }\n return evmInstance as EvmProviderApi;\n}\n\nexport function solanaCoin98(): SolanaProviderApi {\n const instances = coin98();\n const solanaInstance = instances?.get(Networks.SOLANA);\n if (!solanaInstance) {\n throw new Error(\n 'Coin98 Solana instance is not available. Ensure that Solana support is enabled in your wallet.'\n );\n }\n return solanaInstance as SolanaProviderApi;\n}\n", "import type { EvmActions } from '@hub3js/evm';\n\nimport { NamespaceBuilder } from '@hub3js/core';\nimport { actions, builders } from '@hub3js/evm';\nimport * as commonBuilders from '@hub3js/std/builders';\nimport { standardizeAndThrowError } from '@hub3js/std/operators';\n\nimport { WALLET_ID } from '../constants.js';\nimport { evmCoin98 } from '../utils.js';\n\nconst [changeAccountSubscriber, changeAccountCleanup] = builders\n .changeAccountSubscriber(evmCoin98)\n .build();\n\nconst connect = builders\n .connect()\n .action(actions.connect(evmCoin98))\n .before(changeAccountSubscriber)\n .or(changeAccountCleanup)\n .or(standardizeAndThrowError)\n .build();\n\nconst disconnect = commonBuilders\n .disconnect<EvmActions>()\n .after(changeAccountCleanup)\n .build();\n\nconst canSwitchNetwork = builders\n .canSwitchNetwork()\n .action(actions.canSwitchNetwork())\n .build();\n\nconst getChainId = builders\n .getChainId()\n .action(actions.getChainId(evmCoin98))\n .build();\n\nconst evm = new NamespaceBuilder<EvmActions>('EVM', WALLET_ID)\n .action(connect)\n .action(disconnect)\n .action(canSwitchNetwork)\n .action(getChainId)\n .build();\n\nexport { evm };\n", "import { NamespaceBuilder } from '@hub3js/core';\nimport { builders, type SolanaActions } from '@hub3js/solana';\nimport * as commonBuilders from '@hub3js/std/builders';\nimport { standardizeAndThrowError } from '@hub3js/std/operators';\n\nimport { solanaActions } from '../actions/solana.js';\nimport { WALLET_ID } from '../constants.js';\nimport { solanaCoin98 } from '../utils.js';\n\nconst [changeAccountSubscriber, changeAccountCleanup] = builders\n .changeAccountSubscriber(solanaCoin98)\n /*\n * Coin98 returns EVM addresses on account change instead of Solana addresses even though\n * we are listening to the changes on the Solana instance.\n * But if we get the EVM address, it means that we also have permission to eagerly get\n * the Solana address of the new account.\n */\n .onSwitchAccount(async (event, context) => {\n event.preventDefault();\n if (event.payload && event.payload.length !== 0) {\n context.action('connect');\n } else {\n context.action('disconnect');\n }\n })\n .addEventListener((instance, callback) =>\n instance.on('accountsChanged', callback)\n )\n .removeEventListener((instance, callback) =>\n instance.off('accountsChanged', callback)\n )\n .build();\n\nconst connect = builders\n .connect()\n .action(solanaActions.connect(solanaCoin98))\n .before(changeAccountSubscriber)\n .or(changeAccountCleanup)\n .or(standardizeAndThrowError)\n .build();\n\nconst disconnect = commonBuilders\n .disconnect<SolanaActions>()\n .after(changeAccountCleanup)\n .build();\n\nconst solana = new NamespaceBuilder<SolanaActions>('Solana', WALLET_ID)\n .action(connect)\n .action(disconnect)\n .build();\n\nexport { solana };\n", "import type { Context, FunctionWithContext } from '@hub3js/core';\n\nimport {\n type SolanaActions,\n type ProviderAPI as SolanaProviderApi,\n utils,\n} from '@hub3js/solana';\n\nfunction connect(\n getInstance: () => SolanaProviderApi\n): FunctionWithContext<SolanaActions['connect'], Context> {\n return async () => {\n const solanaInstance = getInstance();\n const connectResult = await solanaInstance.connect();\n return utils.formatAccountsToCAIP(connectResult);\n };\n}\n\nexport const solanaActions = { connect };\n"],
5
+ "mappings": "+EAAA,OAAS,kBAAAA,OAAsB,qBCA/B,OAAS,mBAAAC,OAAuB,eCEhC,OAAS,eAAAC,MAAmB,4BAC5B,OAEE,kBAAAC,EACA,oBAAAC,MACK,cCJP,OACE,iCAAAC,EACA,sBAAAC,EACA,YAAAC,MACK,4BACP,OAAS,wBAAAC,EAAsB,mBAAmBC,MAAc,cCLhE,MAGO,2BACP,OAAS,oCAAAC,MAAwC,2BACjD,OAAS,aAAAC,MAAiB,kBAC1B,OAA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O,SAAS,EAExBA,EAAQ,OAAO,YAAY,CAE/B,CAAC,EACA,iBAAiB,CAACC,EAAUC,IAC3BD,EAAS,GAAG,kBAAmBC,CAAQ,CACzC,EACC,oBAAoB,CAACD,EAAUC,IAC9BD,EAAS,IAAI,kBAAmBC,CAAQ,CAC1C,EACC,MAAM,EAEHC,GAAUN,EACb,QAAQ,EACR,OAAOO,EAAc,QAAQN,CAAY,CAAC,EAC1C,OAAOH,EAAuB,EAC9B,GAAGC,CAAoB,EACvB,GAAGS,CAAwB,EAC3B,MAAM,EAEHC,GACH,aAA0B,EAC1B,MAAMV,CAAoB,EAC1B,MAAM,EAEHW,EAAS,IAAIC,EAAgC,SAAUC,CAAS,EACnE,OAAON,EAAO,EACd,OAAOG,EAAU,EACjB,MAAM,EN1CT,IAAMI,EAAgBC,EAAA,IACpB,IAAIC,GAAgBC,CAAS,EAC1B,KAAK,SAAUC,EAAS,CACvB,GAAM,CAAC,CAAEC,CAAQ,EAAID,EAAQ,MAAM,EAEnC,WAAW,IAAM,CACXE,EAAO,IACTD,EAAS,YAAa,EAAI,EAC1B,QAAQ,MAAM,8BAA+BD,CAAO,EAExD,EAAGG,CAAsB,CAC3B,CAAC,EACA,OAAO,WAAYC,CAAQ,EAC3B,IAAI,MAAOC,CAAG,EACd,IAAI,SAAUC,CAAM,EACpB,MAAM,EAfW,iBDHtB,IAAMC,GAAWC,EAAA,IACfC,GAAe,EAAE,QAAQ,QAASC,EAAc,CAAC,EAAE,MAAM,EAD1C",
6
+ "names": ["defineVersions", "ProviderBuilder", "WalletTypes", "evmBlockchains", "solanaBlockchain", "dynamicImportWithRefinedError", "getNetworkInstance", "Networks", "DefaultSignerFactory", "TxType", "generalSolanaTransactionExecutor", "PublicKey", "bs58", "SignerError", "SignerErrorCode", "Coin98SolanaSigner", "__name", "provider", "msg", "error", "SignerError", "SignerErrorCode", "tx", "DefaultSolanaSigner", "solanaWeb3Transaction", "response", "publicKey", "PublicKey", "sign", "bs58", "generalSolanaTransactionExecutor", "e", "getSigners", "provider", "ethProvider", "getNetworkInstance", "Networks", "solProvider", "signers", "DefaultSignerFactory", "DefaultEvmSigner", "dynamicImportWithRefinedError", "TxType", "Coin98SolanaSigner", "__name", "Networks", "coin98", "instances", "Networks", "__name", "getInstanceOrThrow", "evmCoin98", "evmInstance", "solanaCoin98", "solanaInstance", "WALLET_ID", "WalletTypes", "COIN98_INJECTION_DELAY", "metadata", "allBlockchains", "evmBlockchains", "solanaBlockchain", "getSigners", "getInstanceOrThrow", "NamespaceBuilder", "actions", "builders", "commonBuilders", "standardizeAndThrowError", "changeAccountSubscriber", "changeAccountCleanup", "builders", "evmCoin98", "connect", "actions", "standardizeAndThrowError", "disconnect", "canSwitchNetwork", "getChainId", "evm", "NamespaceBuilder", "WALLET_ID", "NamespaceBuilder", "builders", "commonBuilders", "standardizeAndThrowError", "utils", "connect", "getInstance", "connectResult", "utils", "__name", "solanaActions", "changeAccountSubscriber", "changeAccountCleanup", "builders", "solanaCoin98", "event", "context", "instance", "callback", "connect", "solanaActions", "standardizeAndThrowError", "disconnect", "solana", "NamespaceBuilder", "WALLET_ID", "buildProvider", "__name", "ProviderBuilder", "WALLET_ID", "context", "setState", "coin98", "COIN98_INJECTION_DELAY", "metadata", "evm", "solana", "versions", "__name", "defineVersions", "buildProvider"]
7
7
  }
@@ -1,4 +1,4 @@
1
- import type { EvmActions } from '@rango-dev/wallets-core/namespaces/evm';
2
- declare const evm: import("@rango-dev/wallets-core").ProxiedNamespace<EvmActions>;
1
+ import type { EvmActions } from '@hub3js/evm';
2
+ declare const evm: import("@hub3js/core").ProxiedNamespace<EvmActions>;
3
3
  export { evm };
4
4
  //# sourceMappingURL=evm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"evm.d.ts","sourceRoot":"","sources":["../../src/namespaces/evm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAuCzE,QAAA,MAAM,GAAG,gEAKC,CAAC;AAEX,OAAO,EAAE,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"evm.d.ts","sourceRoot":"","sources":["../../src/namespaces/evm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAqC9C,QAAA,MAAM,GAAG,qDAKC,CAAC;AAEX,OAAO,EAAE,GAAG,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { type SolanaActions } from '@rango-dev/wallets-core/namespaces/solana';
2
- declare const solana: import("@rango-dev/wallets-core").ProxiedNamespace<SolanaActions>;
1
+ import { type SolanaActions } from '@hub3js/solana';
2
+ declare const solana: import("@hub3js/core").ProxiedNamespace<SolanaActions>;
3
3
  export { solana };
4
4
  //# sourceMappingURL=solana.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["../../src/namespaces/solana.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,2CAA2C,CAAC;AA2CnD,QAAA,MAAM,MAAM,mEAGF,CAAC;AAEX,OAAO,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["../../src/namespaces/solana.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AA6C9D,QAAA,MAAM,MAAM,wDAGF,CAAC;AAEX,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"inputs":{"src/signers/solana.ts":{"bytes":2100,"imports":[{"path":"@rango-dev/signer-solana","kind":"import-statement","external":true},{"path":"@rango-dev/signer-solana","kind":"import-statement","external":true},{"path":"@solana/web3.js","kind":"import-statement","external":true},{"path":"bs58","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/signer.ts":{"bytes":973,"imports":[{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/signers/solana.ts","kind":"import-statement","original":"./signers/solana.js"},{"path":"@rango-dev/signer-evm","kind":"dynamic-import","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/utils.ts":{"bytes":1454,"imports":[{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/constants.ts":{"bytes":1548,"imports":[{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/signer.ts","kind":"import-statement","original":"./signer.js"},{"path":"src/utils.ts","kind":"import-statement","original":"./utils.js"}],"format":"esm"},"src/namespaces/evm.ts":{"bytes":1212,"imports":[{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/common","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/evm","kind":"import-statement","external":true},{"path":"src/constants.ts","kind":"import-statement","original":"../constants.js"},{"path":"src/utils.ts","kind":"import-statement","original":"../utils.js"}],"format":"esm"},"src/actions/solana.ts":{"bytes":556,"imports":[{"path":"@rango-dev/wallets-core/namespaces/solana","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/solana.ts":{"bytes":1695,"imports":[{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/common","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/solana","kind":"import-statement","external":true},{"path":"src/actions/solana.ts","kind":"import-statement","original":"../actions/solana.js"},{"path":"src/constants.ts","kind":"import-statement","original":"../constants.js"},{"path":"src/utils.ts","kind":"import-statement","original":"../utils.js"}],"format":"esm"},"src/provider.ts":{"bytes":732,"imports":[{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"src/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"src/namespaces/evm.ts","kind":"import-statement","original":"./namespaces/evm.js"},{"path":"src/namespaces/solana.ts","kind":"import-statement","original":"./namespaces/solana.js"},{"path":"src/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/mod.ts":{"bytes":220,"imports":[{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"src/provider.ts","kind":"import-statement","original":"./provider.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":17417},"dist/mod.js":{"imports":[{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"@rango-dev/signer-solana","kind":"import-statement","external":true},{"path":"@rango-dev/signer-solana","kind":"import-statement","external":true},{"path":"@solana/web3.js","kind":"import-statement","external":true},{"path":"bs58","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"@rango-dev/signer-evm","kind":"dynamic-import","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/common","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/evm","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/common","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/solana","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/solana","kind":"import-statement","external":true}],"exports":["versions"],"entryPoint":"src/mod.ts","inputs":{"src/mod.ts":{"bytesInOutput":123},"src/provider.ts":{"bytesInOutput":285},"src/constants.ts":{"bytesInOutput":753},"src/signer.ts":{"bytesInOutput":423},"src/signers/solana.ts":{"bytesInOutput":844},"src/utils.ts":{"bytesInOutput":689},"src/namespaces/evm.ts":{"bytesInOutput":556},"src/namespaces/solana.ts":{"bytesInOutput":657},"src/actions/solana.ts":{"bytesInOutput":190}},"bytes":4655}}}
1
+ {"inputs":{"src/signers/solana.ts":{"bytes":2100,"imports":[{"path":"@rango-dev/signer-solana","kind":"import-statement","external":true},{"path":"@rango-dev/signer-solana","kind":"import-statement","external":true},{"path":"@solana/web3.js","kind":"import-statement","external":true},{"path":"bs58","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/signer.ts":{"bytes":973,"imports":[{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/signers/solana.ts","kind":"import-statement","original":"./signers/solana.js"},{"path":"@rango-dev/signer-evm","kind":"dynamic-import","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/utils.ts":{"bytes":1400,"imports":[{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/constants.ts":{"bytes":1537,"imports":[{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/signer.ts","kind":"import-statement","original":"./signer.js"},{"path":"src/utils.ts","kind":"import-statement","original":"./utils.js"}],"format":"esm"},"src/namespaces/evm.ts":{"bytes":1150,"imports":[{"path":"@hub3js/core","kind":"import-statement","external":true},{"path":"@hub3js/evm","kind":"import-statement","external":true},{"path":"@hub3js/std/builders","kind":"import-statement","external":true},{"path":"@hub3js/std/operators","kind":"import-statement","external":true},{"path":"src/constants.ts","kind":"import-statement","original":"../constants.js"},{"path":"src/utils.ts","kind":"import-statement","original":"../utils.js"}],"format":"esm"},"src/actions/solana.ts":{"bytes":518,"imports":[{"path":"@hub3js/solana","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/solana.ts":{"bytes":1655,"imports":[{"path":"@hub3js/core","kind":"import-statement","external":true},{"path":"@hub3js/solana","kind":"import-statement","external":true},{"path":"@hub3js/std/builders","kind":"import-statement","external":true},{"path":"@hub3js/std/operators","kind":"import-statement","external":true},{"path":"src/actions/solana.ts","kind":"import-statement","original":"../actions/solana.js"},{"path":"src/constants.ts","kind":"import-statement","original":"../constants.js"},{"path":"src/utils.ts","kind":"import-statement","original":"../utils.js"}],"format":"esm"},"src/provider.ts":{"bytes":721,"imports":[{"path":"@hub3js/core","kind":"import-statement","external":true},{"path":"src/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"src/namespaces/evm.ts","kind":"import-statement","original":"./namespaces/evm.js"},{"path":"src/namespaces/solana.ts","kind":"import-statement","original":"./namespaces/solana.js"},{"path":"src/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/mod.ts":{"bytes":209,"imports":[{"path":"@hub3js/core/utils","kind":"import-statement","external":true},{"path":"src/provider.ts","kind":"import-statement","original":"./provider.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":17151},"dist/mod.js":{"imports":[{"path":"@hub3js/core/utils","kind":"import-statement","external":true},{"path":"@hub3js/core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"@rango-dev/signer-solana","kind":"import-statement","external":true},{"path":"@rango-dev/signer-solana","kind":"import-statement","external":true},{"path":"@solana/web3.js","kind":"import-statement","external":true},{"path":"bs58","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"@rango-dev/signer-evm","kind":"dynamic-import","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"@hub3js/core","kind":"import-statement","external":true},{"path":"@hub3js/evm","kind":"import-statement","external":true},{"path":"@hub3js/std/builders","kind":"import-statement","external":true},{"path":"@hub3js/std/operators","kind":"import-statement","external":true},{"path":"@hub3js/core","kind":"import-statement","external":true},{"path":"@hub3js/solana","kind":"import-statement","external":true},{"path":"@hub3js/std/builders","kind":"import-statement","external":true},{"path":"@hub3js/std/operators","kind":"import-statement","external":true},{"path":"@hub3js/solana","kind":"import-statement","external":true}],"exports":["versions"],"entryPoint":"src/mod.ts","inputs":{"src/mod.ts":{"bytesInOutput":112},"src/provider.ts":{"bytesInOutput":274},"src/constants.ts":{"bytesInOutput":753},"src/signer.ts":{"bytesInOutput":423},"src/signers/solana.ts":{"bytesInOutput":844},"src/utils.ts":{"bytesInOutput":689},"src/namespaces/evm.ts":{"bytesInOutput":523},"src/namespaces/solana.ts":{"bytesInOutput":624},"src/actions/solana.ts":{"bytesInOutput":163}},"bytes":4540}}}
@@ -1,3 +1,3 @@
1
- declare const buildProvider: () => import("@rango-dev/wallets-core").Provider;
1
+ declare const buildProvider: () => import("@hub3js/core").Provider<Record<"evm", import("@hub3js/evm").EvmActions> & Record<"solana", import("@hub3js/solana").SolanaActions>>;
2
2
  export { buildProvider };
3
3
  //# sourceMappingURL=provider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,aAAa,kDAeP,CAAC;AAEb,OAAO,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,aAAa,mJAeP,CAAC;AAEb,OAAO,EAAE,aAAa,EAAE,CAAC"}
package/dist/types.d.ts CHANGED
@@ -1,6 +1,6 @@
1
+ import type { ProviderAPI as EvmProviderApi } from '@hub3js/evm';
2
+ import type { ProviderAPI as SolanaProviderApi } from '@hub3js/solana';
1
3
  import type { LegacyNetworks } from '@rango-dev/wallets-core/legacy';
2
- import type { ProviderAPI as EvmProviderApi } from '@rango-dev/wallets-core/namespaces/evm';
3
- import type { ProviderAPI as SolanaProviderApi } from '@rango-dev/wallets-core/namespaces/solana';
4
4
  type ProviderObject = {
5
5
  [LegacyNetworks.ETHEREUM]: EvmProviderApi;
6
6
  [LegacyNetworks.SOLANA]: SolanaProviderApi;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAC5F,OAAO,KAAK,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAElG,KAAK,cAAc,GAAG;IACpB,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1C,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,GAAG,CACxB,MAAM,cAAc,EACpB,cAAc,CAAC,MAAM,cAAc,CAAC,CACrC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE,KAAK,cAAc,GAAG;IACpB,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1C,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,GAAG,CACxB,MAAM,cAAc,EACpB,cAAc,CAAC,MAAM,cAAc,CAAC,CACrC,CAAC"}
package/dist/utils.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { Provider } from './types.js';
2
- import type { ProviderAPI as EvmProviderApi } from '@rango-dev/wallets-core/namespaces/evm';
3
- import type { ProviderAPI as SolanaProviderApi } from '@rango-dev/wallets-core/namespaces/solana';
2
+ import type { ProviderAPI as EvmProviderApi } from '@hub3js/evm';
3
+ import type { ProviderAPI as SolanaProviderApi } from '@hub3js/solana';
4
4
  export declare function coin98(): Map<any, any> | null;
5
5
  export declare function getInstanceOrThrow(): Provider;
6
6
  export declare function evmCoin98(): EvmProviderApi;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAC5F,OAAO,KAAK,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAIlG,wBAAgB,MAAM,yBAiBrB;AAED,wBAAgB,kBAAkB,IAAI,QAAQ,CAQ7C;AAED,wBAAgB,SAAS,IAAI,cAAc,CAS1C;AAED,wBAAgB,YAAY,IAAI,iBAAiB,CAShD"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAIvE,wBAAgB,MAAM,yBAiBrB;AAED,wBAAgB,kBAAkB,IAAI,QAAQ,CAQ7C;AAED,wBAAgB,SAAS,IAAI,cAAc,CAS1C;AAED,wBAAgB,YAAY,IAAI,iBAAiB,CAShD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/provider-coin98",
3
- "version": "0.62.1-next.0",
3
+ "version": "0.62.1-next.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "source": "./src/mod.ts",
@@ -21,10 +21,14 @@
21
21
  "lint": "eslint \"**/*.{ts,tsx}\""
22
22
  },
23
23
  "dependencies": {
24
+ "@hub3js/core": "^0.60.1",
25
+ "@hub3js/evm": "^0.2.1",
26
+ "@hub3js/solana": "^0.2.1",
27
+ "@hub3js/std": "^0.1.1",
24
28
  "@rango-dev/signer-evm": "^0.42.0",
25
29
  "@rango-dev/signer-solana": "^0.48.0",
26
30
  "@rango-dev/wallets-core": "^0.59.1-next.0",
27
- "@rango-dev/wallets-shared": "^0.60.1-next.0",
31
+ "@rango-dev/wallets-shared": "^0.60.1-next.1",
28
32
  "@solana/web3.js": "^1.91.4",
29
33
  "bs58": "^5.0.0",
30
34
  "rango-types": "^0.5.0"
@@ -1,10 +1,10 @@
1
- import type { Context, FunctionWithContext } from '@rango-dev/wallets-core';
1
+ import type { Context, FunctionWithContext } from '@hub3js/core';
2
2
 
3
3
  import {
4
4
  type SolanaActions,
5
5
  type ProviderAPI as SolanaProviderApi,
6
6
  utils,
7
- } from '@rango-dev/wallets-core/namespaces/solana';
7
+ } from '@hub3js/solana';
8
8
 
9
9
  function connect(
10
10
  getInstance: () => SolanaProviderApi
package/src/constants.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ProviderMetadata } from '@rango-dev/wallets-core';
1
+ import type { ProviderMetadata } from '@hub3js/core';
2
2
 
3
3
  import { WalletTypes } from '@rango-dev/wallets-shared';
4
4
  import {
package/src/mod.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { defineVersions } from '@rango-dev/wallets-core/utils';
1
+ import { defineVersions } from '@hub3js/core/utils';
2
2
 
3
3
  import { buildProvider } from './provider.js';
4
4
 
@@ -1,11 +1,9 @@
1
- import type { EvmActions } from '@rango-dev/wallets-core/namespaces/evm';
2
-
3
- import { NamespaceBuilder } from '@rango-dev/wallets-core';
4
- import {
5
- builders as commonBuilders,
6
- standardizeAndThrowError,
7
- } from '@rango-dev/wallets-core/namespaces/common';
8
- import { actions, builders } from '@rango-dev/wallets-core/namespaces/evm';
1
+ import type { EvmActions } from '@hub3js/evm';
2
+
3
+ import { NamespaceBuilder } from '@hub3js/core';
4
+ import { actions, builders } from '@hub3js/evm';
5
+ import * as commonBuilders from '@hub3js/std/builders';
6
+ import { standardizeAndThrowError } from '@hub3js/std/operators';
9
7
 
10
8
  import { WALLET_ID } from '../constants.js';
11
9
  import { evmCoin98 } from '../utils.js';
@@ -1,12 +1,7 @@
1
- import { NamespaceBuilder } from '@rango-dev/wallets-core';
2
- import {
3
- builders as commonBuilders,
4
- standardizeAndThrowError,
5
- } from '@rango-dev/wallets-core/namespaces/common';
6
- import {
7
- builders,
8
- type SolanaActions,
9
- } from '@rango-dev/wallets-core/namespaces/solana';
1
+ import { NamespaceBuilder } from '@hub3js/core';
2
+ import { builders, type SolanaActions } from '@hub3js/solana';
3
+ import * as commonBuilders from '@hub3js/std/builders';
4
+ import { standardizeAndThrowError } from '@hub3js/std/operators';
10
5
 
11
6
  import { solanaActions } from '../actions/solana.js';
12
7
  import { WALLET_ID } from '../constants.js';
package/src/provider.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ProviderBuilder } from '@rango-dev/wallets-core';
1
+ import { ProviderBuilder } from '@hub3js/core';
2
2
 
3
3
  import { COIN98_INJECTION_DELAY, metadata, WALLET_ID } from './constants.js';
4
4
  import { evm } from './namespaces/evm.js';
package/src/types.ts CHANGED
@@ -1,6 +1,6 @@
1
+ import type { ProviderAPI as EvmProviderApi } from '@hub3js/evm';
2
+ import type { ProviderAPI as SolanaProviderApi } from '@hub3js/solana';
1
3
  import type { LegacyNetworks } from '@rango-dev/wallets-core/legacy';
2
- import type { ProviderAPI as EvmProviderApi } from '@rango-dev/wallets-core/namespaces/evm';
3
- import type { ProviderAPI as SolanaProviderApi } from '@rango-dev/wallets-core/namespaces/solana';
4
4
 
5
5
  type ProviderObject = {
6
6
  [LegacyNetworks.ETHEREUM]: EvmProviderApi;
package/src/utils.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { Provider } from './types.js';
2
- import type { ProviderAPI as EvmProviderApi } from '@rango-dev/wallets-core/namespaces/evm';
3
- import type { ProviderAPI as SolanaProviderApi } from '@rango-dev/wallets-core/namespaces/solana';
2
+ import type { ProviderAPI as EvmProviderApi } from '@hub3js/evm';
3
+ import type { ProviderAPI as SolanaProviderApi } from '@hub3js/solana';
4
4
 
5
5
  import { Networks } from '@rango-dev/wallets-shared';
6
6