@rango-dev/provider-walletconnect-2 0.30.1-next.0 → 0.30.1-next.2

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/signer.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import type { WCInstance } from './types.js';
2
2
  import type { SignerFactory } from 'rango-types';
3
- export default function getSigners(instance: WCInstance): SignerFactory;
3
+ export default function getSigners(instance: WCInstance): Promise<SignerFactory>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/provider-walletconnect-2",
3
- "version": "0.30.1-next.0",
3
+ "version": "0.30.1-next.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "source": "./src/index.ts",
@@ -28,7 +28,7 @@
28
28
  "@rango-dev/signer-cosmos": "^0.29.0",
29
29
  "@rango-dev/signer-evm": "^0.30.0",
30
30
  "@rango-dev/signer-solana": "^0.32.0",
31
- "@rango-dev/wallets-shared": "^0.37.1-next.0",
31
+ "@rango-dev/wallets-shared": "^0.37.1-next.2",
32
32
  "@solana/web3.js": "^1.91.4",
33
33
  "@walletconnect/encoding": "^1.0.2",
34
34
  "@walletconnect/sign-client": "^2.11.2",
package/src/index.ts CHANGED
@@ -214,7 +214,8 @@ export const disconnect: Disconnect = async ({ instance }) => {
214
214
  }
215
215
  };
216
216
 
217
- export const getSigners: (provider: WCInstance) => SignerFactory = signer;
217
+ export const getSigners: (provider: WCInstance) => Promise<SignerFactory> =
218
+ signer;
218
219
 
219
220
  export const getWalletInfo: (allBlockChains: BlockchainMeta[]) => WalletInfo = (
220
221
  allBlockChains
package/src/signer.ts CHANGED
@@ -3,16 +3,18 @@ import type { SignerFactory } from 'rango-types';
3
3
 
4
4
  import { DefaultSignerFactory, TransactionType as TxType } from 'rango-types';
5
5
 
6
- import COSMOSSigner from './signers/cosmos.js';
7
- import EVMSigner from './signers/evm.js';
8
- import SOLANASigner from './signers/solana.js';
9
-
10
- export default function getSigners(instance: WCInstance): SignerFactory {
6
+ export default async function getSigners(
7
+ instance: WCInstance
8
+ ): Promise<SignerFactory> {
11
9
  if (!instance.session) {
12
10
  throw new Error('Session is required for wallet connect signers.');
13
11
  }
14
12
 
15
13
  const signers = new DefaultSignerFactory();
14
+ const EVMSigner = (await import('./signers/evm.js')).default;
15
+ const COSMOSSigner = (await import('./signers/cosmos.js')).default;
16
+ const SOLANASigner = (await import('./signers/solana.js')).default;
17
+
16
18
  signers.registerSigner(
17
19
  TxType.EVM,
18
20
  new EVMSigner(instance.client, instance.session)