@initia/interwovenkit-react 2.0.5 → 2.1.0

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.d.ts CHANGED
@@ -17,7 +17,11 @@ import { PropsWithChildren } from 'react';
17
17
  import { SimulateResponse } from 'cosmjs-types/cosmos/tx/v1beta1/service';
18
18
  import { StdFee } from '@cosmjs/stargate';
19
19
  import { StdSignDoc } from '@cosmjs/amino';
20
+ import { useCreateWallet } from '@privy-io/react-auth';
21
+ import { useLoginWithSiwe } from '@privy-io/react-auth';
22
+ import { usePrivy } from '@privy-io/react-auth';
20
23
  import { UseQueryResult } from '@tanstack/react-query';
24
+ import { useWallets } from '@privy-io/react-auth';
21
25
  import { Wallet } from '@rainbow-me/rainbowkit';
22
26
 
23
27
  declare interface Config {
@@ -32,6 +36,13 @@ declare interface Config {
32
36
  theme: "light" | "dark";
33
37
  container?: HTMLElement;
34
38
  disableAnalytics?: boolean;
39
+ enableAutoSign?: boolean | Record<string, string[]>;
40
+ privyContext?: {
41
+ privy: ReturnType<typeof usePrivy>;
42
+ createWallet: ReturnType<typeof useCreateWallet>["createWallet"];
43
+ wallets: ReturnType<typeof useWallets>["wallets"];
44
+ siwe: ReturnType<typeof useLoginWithSiwe>;
45
+ };
35
46
  }
36
47
 
37
48
  export declare const DEFAULT_GAS_ADJUSTMENT = 1.4;
@@ -88,9 +99,11 @@ export declare class MoveError extends Error {
88
99
  declare class OfflineSigner implements OfflineAminoSigner {
89
100
  private address;
90
101
  private signMessage;
91
- constructor(address: string, signMessage: (message: string) => Promise<string>);
102
+ private restUrl;
103
+ constructor(address: string, signMessage: (message: string) => Promise<string>, restUrl: string);
92
104
  private cachedPublicKey;
93
105
  private getCachedPublicKey;
106
+ private getPublicKeyFromRestApi;
94
107
  private getPublicKey;
95
108
  getAccounts(): Promise<readonly AccountData[]>;
96
109
  signAmino(signerAddress: string, signDoc: StdSignDoc): Promise<AminoSignResponse>;
@@ -127,6 +140,8 @@ declare interface PortfolioChainItem extends PortfolioChainInfo {
127
140
  value: number;
128
141
  }
129
142
 
143
+ export declare const PRIVY_APP_ID = "cmbq1ozyc006al70lx4uciz0q";
144
+
130
145
  export declare const TESTNET: Config;
131
146
 
132
147
  declare interface TxParams {
@@ -178,6 +193,13 @@ export declare function useInterwovenKit(): {
178
193
  openWallet: () => void;
179
194
  openBridge: (defaultValues?: Partial<FormValues>) => void;
180
195
  disconnect: () => void;
196
+ autoSign: {
197
+ isLoading: boolean;
198
+ enable: (chainId?: string) => Promise<void>;
199
+ disable: (chainId?: string) => Promise<void>;
200
+ expiredAtByChain: Record<string, Date | null | undefined>;
201
+ isEnabledByChain: Record<string, boolean>;
202
+ };
181
203
  };
182
204
 
183
205
  export declare function usePortfolio(): {