@txnlab/use-wallet 0.1.14 → 0.1.16

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,14 +1,8 @@
1
- /**
2
- * Helpful resources:
3
- * https://github.com/perawallet/connect
4
- */
5
- import { providers } from "../providers";
6
- import type { PeraWalletConnect } from "@perawallet/connect";
1
+ import { PeraWalletConnect } from "@perawallet/connect";
7
2
  import type { WalletProvider, Wallet } from "../types";
8
3
  import { PROVIDER_ID } from "../constants";
9
4
  import type { Transaction } from "algosdk";
10
5
  import BaseWallet from "./base";
11
- import type { InitAlgodClient } from "./base";
12
6
  import { TransactionsArray } from "../types";
13
7
  export interface PeraTransaction {
14
8
  txn: Transaction;
@@ -22,13 +16,13 @@ export interface PeraTransaction {
22
16
  declare type InitWallet = {
23
17
  id: PROVIDER_ID;
24
18
  client: PeraWalletConnect;
25
- providers: typeof providers;
19
+ provider: WalletProvider;
26
20
  };
27
21
  declare class PeraWalletClient extends BaseWallet {
28
22
  #private;
29
23
  id: PROVIDER_ID;
30
24
  provider: WalletProvider;
31
- constructor(initAlgodClient: InitAlgodClient, initWallet: InitWallet);
25
+ constructor(initWallet: InitWallet);
32
26
  static init(): Promise<PeraWalletClient>;
33
27
  connect(onDisconnect: () => void): Promise<Wallet>;
34
28
  reconnect(onDisconnect: () => void): Promise<{
@@ -47,5 +41,4 @@ declare class PeraWalletClient extends BaseWallet {
47
41
  signTransactions(activeAdress: string, transactions: Uint8Array[]): Promise<Uint8Array[]>;
48
42
  signEncodedTransactions(transactions: TransactionsArray): Promise<Uint8Array[]>;
49
43
  }
50
- declare const _default: Promise<void | PeraWalletClient>;
51
- export default _default;
44
+ export default PeraWalletClient;
@@ -1,15 +1,7 @@
1
- /**
2
- * Helpful resources:
3
- * https://developer.algorand.org/docs/get-details/walletconnect/
4
- */
5
- import type WalletConnect from "@walletconnect/client";
6
- import type { IWalletConnectOptions } from "@walletconnect/types";
7
- import type QRCodeModal from "algorand-walletconnect-qrcode-modal";
8
- import { providers } from "../providers";
1
+ import WalletConnect from "@walletconnect/client";
9
2
  import type { WalletProvider, Wallet } from "../types/wallet";
10
3
  import { PROVIDER_ID } from "../constants";
11
4
  import BaseWallet from "./base";
12
- import type { InitAlgodClient } from "./base";
13
5
  import { TransactionsArray } from "../types/api";
14
6
  declare type WalletConnectTransaction = {
15
7
  txn: string;
@@ -18,17 +10,14 @@ declare type WalletConnectTransaction = {
18
10
  };
19
11
  declare type InitWallet = {
20
12
  id: PROVIDER_ID;
21
- walletConnect: typeof WalletConnect;
22
- bridge: string;
23
- qrcodeModal: typeof QRCodeModal;
24
- WalletConnectOptions?: IWalletConnectOptions;
25
- providers: typeof providers;
13
+ client: WalletConnect;
14
+ provider: WalletProvider;
26
15
  };
27
16
  declare class WalletConnectClient extends BaseWallet {
28
17
  #private;
29
18
  id: PROVIDER_ID;
30
19
  provider: WalletProvider;
31
- constructor(initAlgodClient: InitAlgodClient, initWallet: InitWallet);
20
+ constructor(initWallet: InitWallet);
32
21
  static init(): Promise<WalletConnectClient>;
33
22
  connect(): Promise<Wallet>;
34
23
  reconnect(): Promise<{
@@ -48,5 +37,4 @@ declare class WalletConnectClient extends BaseWallet {
48
37
  signTransactions(activeAdress: string, transactions: Uint8Array[]): Promise<Uint8Array[]>;
49
38
  signEncodedTransactions(transactions: TransactionsArray): Promise<Uint8Array[]>;
50
39
  }
51
- declare const _default: Promise<void | WalletConnectClient>;
52
- export default _default;
40
+ export default WalletConnectClient;