graz 0.4.3 → 0.5.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.mts +271 -63
- package/dist/index.d.ts +271 -63
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -1
- package/types/global.d.ts +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="../types/global" />
|
|
2
2
|
import { OfflineAminoSigner, StdSignature } from '@cosmjs/amino';
|
|
3
|
-
import { DirectSignResponse, OfflineDirectSigner, Coin } from '@cosmjs/proto-signing';
|
|
3
|
+
import { DirectSignResponse, OfflineDirectSigner, Coin, EncodeObject } from '@cosmjs/proto-signing';
|
|
4
4
|
import { Keplr, ChainInfo, KeplrSignOptions, KeplrIntereactionOptions, Key as Key$1, AppCurrency } from '@keplr-wallet/types';
|
|
5
5
|
import { WalletConnectModalConfig } from '@walletconnect/modal';
|
|
6
6
|
import { SignClientTypes } from '@walletconnect/types';
|
|
@@ -19,15 +19,12 @@ type Maybe<T> = T | undefined;
|
|
|
19
19
|
|
|
20
20
|
declare enum WalletType {
|
|
21
21
|
KEPLR = "keplr",
|
|
22
|
-
LEAP = "leap",
|
|
23
22
|
VECTIS = "vectis",
|
|
24
23
|
COSMOSTATION = "cosmostation",
|
|
25
24
|
WALLETCONNECT = "walletconnect",
|
|
26
25
|
WC_KEPLR_MOBILE = "wc_keplr_mobile",
|
|
27
|
-
WC_LEAP_MOBILE = "wc_leap_mobile",
|
|
28
26
|
WC_COSMOSTATION_MOBILE = "wc_cosmostation_mobile",
|
|
29
27
|
WC_CLOT_MOBILE = "wc_clot_mobile",
|
|
30
|
-
METAMASK_SNAP_LEAP = "metamask_snap_leap",
|
|
31
28
|
METAMASK_SNAP_COSMOS = "metamask_snap_cosmos",
|
|
32
29
|
STATION = "station",
|
|
33
30
|
XDEFI = "xdefi",
|
|
@@ -42,6 +39,7 @@ declare const WALLET_TYPES: WalletType[];
|
|
|
42
39
|
type Wallet = Pick<Keplr, "enable" | "signAmino"> & {
|
|
43
40
|
experimentalSuggestChain: (chainInfo: Omit<ChainInfo, "nodeProvider">) => Promise<void>;
|
|
44
41
|
signArbitrary?: Keplr["signArbitrary"];
|
|
42
|
+
verifyArbitrary?: Keplr["verifyArbitrary"];
|
|
45
43
|
signDirect: (...args: SignDirectParams) => Promise<DirectSignResponse>;
|
|
46
44
|
getOfflineSigner: (chainId: string, signOptions?: KeplrSignOptions) => OfflineAminoSigner & OfflineDirectSigner;
|
|
47
45
|
getOfflineSignerOnlyAmino: (chainId: string, signOptions?: KeplrSignOptions) => OfflineAminoSigner;
|
|
@@ -320,7 +318,7 @@ interface ChainConfig {
|
|
|
320
318
|
}
|
|
321
319
|
interface WalletConnectStore {
|
|
322
320
|
options: SignClientTypes.Options | null;
|
|
323
|
-
walletConnectModal?: Pick<WalletConnectModalConfig, "themeVariables" | "themeMode" | "privacyPolicyUrl" | "termsOfServiceUrl"> | null;
|
|
321
|
+
walletConnectModal?: Pick<WalletConnectModalConfig, "themeVariables" | "themeMode" | "privacyPolicyUrl" | "termsOfServiceUrl" | "mobileWallets" | "desktopWallets"> | null;
|
|
324
322
|
}
|
|
325
323
|
interface IframeOptions {
|
|
326
324
|
/**
|
|
@@ -392,6 +390,10 @@ interface ConfigureGrazArgs {
|
|
|
392
390
|
* Options to enable iframe wallet connection.
|
|
393
391
|
*/
|
|
394
392
|
iframeOptions?: IframeOptions;
|
|
393
|
+
/**
|
|
394
|
+
* Prefix persisted Graz storage keys, useful when multiple Graz apps share one origin.
|
|
395
|
+
*/
|
|
396
|
+
prefixStorageKey?: string;
|
|
395
397
|
pingInteval?: number;
|
|
396
398
|
/**
|
|
397
399
|
* Logger configuration
|
|
@@ -408,6 +410,32 @@ interface Height {
|
|
|
408
410
|
revisionNumber: bigint;
|
|
409
411
|
revisionHeight: bigint;
|
|
410
412
|
}
|
|
413
|
+
interface SignArbitraryArgs {
|
|
414
|
+
walletType?: WalletType;
|
|
415
|
+
chainId: string;
|
|
416
|
+
signerAddress: string;
|
|
417
|
+
data: string | Uint8Array;
|
|
418
|
+
}
|
|
419
|
+
interface VerifyArbitraryArgs extends SignArbitraryArgs {
|
|
420
|
+
signature: StdSignature;
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* Sign arbitrary data using the active wallet's ADR-36-compatible signing API.
|
|
424
|
+
*/
|
|
425
|
+
declare const signArbitrary: ({ walletType, chainId, signerAddress, data, }: SignArbitraryArgs) => Promise<StdSignature>;
|
|
426
|
+
/**
|
|
427
|
+
* Verify arbitrary data using the active wallet's ADR-36-compatible verification API.
|
|
428
|
+
*/
|
|
429
|
+
declare const verifyArbitrary: ({ walletType, chainId, signerAddress, data, signature, }: VerifyArbitraryArgs) => Promise<boolean>;
|
|
430
|
+
interface SignAndBroadcastArgs {
|
|
431
|
+
signingClient?: SigningStargateClient;
|
|
432
|
+
senderAddress?: string;
|
|
433
|
+
messages: readonly EncodeObject[];
|
|
434
|
+
fee: number | StdFee | "auto";
|
|
435
|
+
memo?: string;
|
|
436
|
+
timeoutHeight?: bigint;
|
|
437
|
+
}
|
|
438
|
+
declare const signAndBroadcast: ({ signingClient, senderAddress, messages, fee, memo, timeoutHeight, }: SignAndBroadcastArgs) => Promise<DeliverTxResponse>;
|
|
411
439
|
interface SendTokensArgs {
|
|
412
440
|
signingClient?: SigningStargateClient | SigningCosmWasmClient;
|
|
413
441
|
senderAddress?: string;
|
|
@@ -486,8 +514,6 @@ declare const clearSession: () => void;
|
|
|
486
514
|
*/
|
|
487
515
|
declare const getWallet: (type?: WalletType) => Wallet;
|
|
488
516
|
declare const getAvailableWallets: () => Record<WalletType, boolean>;
|
|
489
|
-
declare const isLeapSnaps: (type: WalletType) => boolean;
|
|
490
|
-
declare const isLeapDappBrowser: () => boolean;
|
|
491
517
|
declare const isWalletConnect: (type: WalletType) => boolean;
|
|
492
518
|
declare const isPara: (type: WalletType) => type is WalletType.PARA;
|
|
493
519
|
|
|
@@ -608,38 +634,6 @@ declare const getCosmostation: () => Wallet;
|
|
|
608
634
|
*/
|
|
609
635
|
declare const getKeplr: () => Wallet;
|
|
610
636
|
|
|
611
|
-
/**
|
|
612
|
-
* Function to return Leap object (which is {@link Wallet}) and throws and error if it does not exist on `window`.
|
|
613
|
-
*
|
|
614
|
-
* @example
|
|
615
|
-
* ```ts
|
|
616
|
-
* try {
|
|
617
|
-
* const leap = getLeap();
|
|
618
|
-
* } catch (error: Error) {
|
|
619
|
-
* console.error(error.message);
|
|
620
|
-
* }
|
|
621
|
-
* ```
|
|
622
|
-
*
|
|
623
|
-
* @see https://docs.leapwallet.io/cosmos/for-dapps-connect-to-leap/add-leap-to-existing-keplr-integration
|
|
624
|
-
*/
|
|
625
|
-
declare const getLeap: () => Wallet;
|
|
626
|
-
|
|
627
|
-
/**
|
|
628
|
-
* Function to return {@link Wallet} object and throws and error if it does not exist on `window`.
|
|
629
|
-
*
|
|
630
|
-
* @example
|
|
631
|
-
* ```ts
|
|
632
|
-
* try {
|
|
633
|
-
* const leapMetamaskSnap = getMetamaskSnapLeap();
|
|
634
|
-
* } catch (error: Error) {
|
|
635
|
-
* console.error(error.message);
|
|
636
|
-
* }
|
|
637
|
-
* ```
|
|
638
|
-
*
|
|
639
|
-
*
|
|
640
|
-
*/
|
|
641
|
-
declare const getMetamaskSnapLeap: () => Wallet;
|
|
642
|
-
|
|
643
637
|
/**
|
|
644
638
|
* Function to return okxwallet object (which is {@link Wallet}) and throws and error if it does not exist on `window`.
|
|
645
639
|
*
|
|
@@ -676,7 +670,7 @@ declare const getVectis: () => Wallet;
|
|
|
676
670
|
|
|
677
671
|
interface GetWalletConnectParams {
|
|
678
672
|
encoding: BufferEncoding;
|
|
679
|
-
walletType: WalletType.WC_KEPLR_MOBILE | WalletType.
|
|
673
|
+
walletType: WalletType.WC_KEPLR_MOBILE | WalletType.WC_COSMOSTATION_MOBILE | WalletType.WC_CLOT_MOBILE;
|
|
680
674
|
appUrl: {
|
|
681
675
|
mobile: {
|
|
682
676
|
ios: string;
|
|
@@ -692,8 +686,6 @@ declare const getWCCosmostation: () => Wallet;
|
|
|
692
686
|
|
|
693
687
|
declare const getWCKeplr: () => Wallet;
|
|
694
688
|
|
|
695
|
-
declare const getWCLeap: () => Wallet;
|
|
696
|
-
|
|
697
689
|
/**
|
|
698
690
|
* Helper function to define chain information records (key values).
|
|
699
691
|
*
|
|
@@ -805,6 +797,13 @@ interface UseAccountResult<TChainIds extends readonly string[] | undefined> {
|
|
|
805
797
|
status: string;
|
|
806
798
|
walletType?: WalletType;
|
|
807
799
|
}
|
|
800
|
+
type UseBalancesArgs = {
|
|
801
|
+
bech32Address: string | undefined;
|
|
802
|
+
chainId: string | undefined;
|
|
803
|
+
} & QueryConfig;
|
|
804
|
+
type UseBalanceArgs = UseBalancesArgs & {
|
|
805
|
+
denom: string | undefined;
|
|
806
|
+
};
|
|
808
807
|
/**
|
|
809
808
|
* graz query hook to retrieve account data with optional arguments to invoke
|
|
810
809
|
* given function on connect/disconnect.
|
|
@@ -862,10 +861,7 @@ declare function useAccount(args?: UseAccountArgs): UseAccountResult<undefined>;
|
|
|
862
861
|
* // Type: { data?: Coin[] }
|
|
863
862
|
* ```
|
|
864
863
|
*/
|
|
865
|
-
declare const useBalances: (args:
|
|
866
|
-
bech32Address: string;
|
|
867
|
-
chainId: string;
|
|
868
|
-
} & QueryConfig) => UseQueryResult<Coin[], unknown>;
|
|
864
|
+
declare const useBalances: (args: UseBalancesArgs) => UseQueryResult<Coin[], unknown>;
|
|
869
865
|
/**
|
|
870
866
|
* graz query hook to retrieve specific asset balance for a specific chain and address.
|
|
871
867
|
*
|
|
@@ -885,11 +881,7 @@ declare const useBalances: (args: {
|
|
|
885
881
|
* // Type: { data?: Coin | undefined }
|
|
886
882
|
* ```
|
|
887
883
|
*/
|
|
888
|
-
declare const useBalance: (args:
|
|
889
|
-
bech32Address: string;
|
|
890
|
-
chainId: string;
|
|
891
|
-
denom: string;
|
|
892
|
-
} & QueryConfig) => UseQueryResult<Coin | undefined, unknown>;
|
|
884
|
+
declare const useBalance: (args: UseBalanceArgs) => UseQueryResult<Coin | undefined, unknown>;
|
|
893
885
|
type UseConnectChainArgs = MutationEventArgs<ConnectArgs, ConnectResult>;
|
|
894
886
|
/**
|
|
895
887
|
* graz mutation hook to execute wallet connection with optional arguments to
|
|
@@ -1022,10 +1014,7 @@ declare function useOfflineSigners(args?: Record<string, never>): UseMultiChainQ
|
|
|
1022
1014
|
* // Type: { data?: Coin }
|
|
1023
1015
|
* ```
|
|
1024
1016
|
*/
|
|
1025
|
-
declare const useBalanceStaked: (args:
|
|
1026
|
-
bech32Address: string;
|
|
1027
|
-
chainId: string;
|
|
1028
|
-
} & QueryConfig) => UseQueryResult<Coin | null, unknown>;
|
|
1017
|
+
declare const useBalanceStaked: (args: UseBalancesArgs) => UseQueryResult<Coin | null, unknown>;
|
|
1029
1018
|
|
|
1030
1019
|
type QueryValidatorsResponse = Awaited<ReturnType<StakingExtension["staking"]["validators"]>>;
|
|
1031
1020
|
/**
|
|
@@ -1093,8 +1082,8 @@ declare const useChainInfos: ({ chainId }?: {
|
|
|
1093
1082
|
* const { data: currency, ... } = useActiveChainCurrency({denom: "juno"});
|
|
1094
1083
|
* ```
|
|
1095
1084
|
*/
|
|
1096
|
-
declare const useActiveChainCurrency: ({ denom }: {
|
|
1097
|
-
denom: string;
|
|
1085
|
+
declare const useActiveChainCurrency: ({ denom, }: {
|
|
1086
|
+
denom: string | undefined;
|
|
1098
1087
|
}) => UseQueryResult<AppCurrency | undefined>;
|
|
1099
1088
|
/**
|
|
1100
1089
|
* graz hook to retrieve active chain validators with given query client and optional bond status
|
|
@@ -1339,6 +1328,228 @@ declare function useCosmWasmClient<const TChainIds extends readonly string[]>(ar
|
|
|
1339
1328
|
} & QueryConfig): UseMultiChainQueryResult<TChainIds, CosmWasmClient>;
|
|
1340
1329
|
declare function useCosmWasmClient(args?: QueryConfig): UseMultiChainQueryResult<undefined, CosmWasmClient>;
|
|
1341
1330
|
|
|
1331
|
+
/**
|
|
1332
|
+
* graz mutation hook to sign arbitrary data using the active wallet.
|
|
1333
|
+
*
|
|
1334
|
+
* @see {@link signArbitrary}
|
|
1335
|
+
*/
|
|
1336
|
+
declare const useSignArbitrary: ({ onError, onLoading, onSuccess, }?: MutationEventArgs<SignArbitraryArgs, StdSignature>) => {
|
|
1337
|
+
signArbitrary: _tanstack_react_query.UseMutateFunction<StdSignature, Error, SignArbitraryArgs, unknown>;
|
|
1338
|
+
signArbitraryAsync: _tanstack_react_query.UseMutateAsyncFunction<StdSignature, Error, SignArbitraryArgs, unknown>;
|
|
1339
|
+
data: undefined;
|
|
1340
|
+
variables: undefined;
|
|
1341
|
+
error: null;
|
|
1342
|
+
isError: false;
|
|
1343
|
+
isIdle: true;
|
|
1344
|
+
isPending: false;
|
|
1345
|
+
isSuccess: false;
|
|
1346
|
+
status: "idle";
|
|
1347
|
+
reset: () => void;
|
|
1348
|
+
context: unknown;
|
|
1349
|
+
failureCount: number;
|
|
1350
|
+
failureReason: Error | null;
|
|
1351
|
+
isPaused: boolean;
|
|
1352
|
+
submittedAt: number;
|
|
1353
|
+
} | {
|
|
1354
|
+
signArbitrary: _tanstack_react_query.UseMutateFunction<StdSignature, Error, SignArbitraryArgs, unknown>;
|
|
1355
|
+
signArbitraryAsync: _tanstack_react_query.UseMutateAsyncFunction<StdSignature, Error, SignArbitraryArgs, unknown>;
|
|
1356
|
+
data: undefined;
|
|
1357
|
+
variables: SignArbitraryArgs;
|
|
1358
|
+
error: null;
|
|
1359
|
+
isError: false;
|
|
1360
|
+
isIdle: false;
|
|
1361
|
+
isPending: true;
|
|
1362
|
+
isSuccess: false;
|
|
1363
|
+
status: "pending";
|
|
1364
|
+
reset: () => void;
|
|
1365
|
+
context: unknown;
|
|
1366
|
+
failureCount: number;
|
|
1367
|
+
failureReason: Error | null;
|
|
1368
|
+
isPaused: boolean;
|
|
1369
|
+
submittedAt: number;
|
|
1370
|
+
} | {
|
|
1371
|
+
signArbitrary: _tanstack_react_query.UseMutateFunction<StdSignature, Error, SignArbitraryArgs, unknown>;
|
|
1372
|
+
signArbitraryAsync: _tanstack_react_query.UseMutateAsyncFunction<StdSignature, Error, SignArbitraryArgs, unknown>;
|
|
1373
|
+
data: undefined;
|
|
1374
|
+
error: Error;
|
|
1375
|
+
variables: SignArbitraryArgs;
|
|
1376
|
+
isError: true;
|
|
1377
|
+
isIdle: false;
|
|
1378
|
+
isPending: false;
|
|
1379
|
+
isSuccess: false;
|
|
1380
|
+
status: "error";
|
|
1381
|
+
reset: () => void;
|
|
1382
|
+
context: unknown;
|
|
1383
|
+
failureCount: number;
|
|
1384
|
+
failureReason: Error | null;
|
|
1385
|
+
isPaused: boolean;
|
|
1386
|
+
submittedAt: number;
|
|
1387
|
+
} | {
|
|
1388
|
+
signArbitrary: _tanstack_react_query.UseMutateFunction<StdSignature, Error, SignArbitraryArgs, unknown>;
|
|
1389
|
+
signArbitraryAsync: _tanstack_react_query.UseMutateAsyncFunction<StdSignature, Error, SignArbitraryArgs, unknown>;
|
|
1390
|
+
data: StdSignature;
|
|
1391
|
+
error: null;
|
|
1392
|
+
variables: SignArbitraryArgs;
|
|
1393
|
+
isError: false;
|
|
1394
|
+
isIdle: false;
|
|
1395
|
+
isPending: false;
|
|
1396
|
+
isSuccess: true;
|
|
1397
|
+
status: "success";
|
|
1398
|
+
reset: () => void;
|
|
1399
|
+
context: unknown;
|
|
1400
|
+
failureCount: number;
|
|
1401
|
+
failureReason: Error | null;
|
|
1402
|
+
isPaused: boolean;
|
|
1403
|
+
submittedAt: number;
|
|
1404
|
+
};
|
|
1405
|
+
/**
|
|
1406
|
+
* graz mutation hook to verify arbitrary data using the active wallet.
|
|
1407
|
+
*
|
|
1408
|
+
* @see {@link verifyArbitrary}
|
|
1409
|
+
*/
|
|
1410
|
+
declare const useVerifyArbitrary: ({ onError, onLoading, onSuccess, }?: MutationEventArgs<VerifyArbitraryArgs, boolean>) => {
|
|
1411
|
+
verifyArbitrary: _tanstack_react_query.UseMutateFunction<boolean, Error, VerifyArbitraryArgs, unknown>;
|
|
1412
|
+
verifyArbitraryAsync: _tanstack_react_query.UseMutateAsyncFunction<boolean, Error, VerifyArbitraryArgs, unknown>;
|
|
1413
|
+
data: undefined;
|
|
1414
|
+
variables: undefined;
|
|
1415
|
+
error: null;
|
|
1416
|
+
isError: false;
|
|
1417
|
+
isIdle: true;
|
|
1418
|
+
isPending: false;
|
|
1419
|
+
isSuccess: false;
|
|
1420
|
+
status: "idle";
|
|
1421
|
+
reset: () => void;
|
|
1422
|
+
context: unknown;
|
|
1423
|
+
failureCount: number;
|
|
1424
|
+
failureReason: Error | null;
|
|
1425
|
+
isPaused: boolean;
|
|
1426
|
+
submittedAt: number;
|
|
1427
|
+
} | {
|
|
1428
|
+
verifyArbitrary: _tanstack_react_query.UseMutateFunction<boolean, Error, VerifyArbitraryArgs, unknown>;
|
|
1429
|
+
verifyArbitraryAsync: _tanstack_react_query.UseMutateAsyncFunction<boolean, Error, VerifyArbitraryArgs, unknown>;
|
|
1430
|
+
data: undefined;
|
|
1431
|
+
variables: VerifyArbitraryArgs;
|
|
1432
|
+
error: null;
|
|
1433
|
+
isError: false;
|
|
1434
|
+
isIdle: false;
|
|
1435
|
+
isPending: true;
|
|
1436
|
+
isSuccess: false;
|
|
1437
|
+
status: "pending";
|
|
1438
|
+
reset: () => void;
|
|
1439
|
+
context: unknown;
|
|
1440
|
+
failureCount: number;
|
|
1441
|
+
failureReason: Error | null;
|
|
1442
|
+
isPaused: boolean;
|
|
1443
|
+
submittedAt: number;
|
|
1444
|
+
} | {
|
|
1445
|
+
verifyArbitrary: _tanstack_react_query.UseMutateFunction<boolean, Error, VerifyArbitraryArgs, unknown>;
|
|
1446
|
+
verifyArbitraryAsync: _tanstack_react_query.UseMutateAsyncFunction<boolean, Error, VerifyArbitraryArgs, unknown>;
|
|
1447
|
+
data: undefined;
|
|
1448
|
+
error: Error;
|
|
1449
|
+
variables: VerifyArbitraryArgs;
|
|
1450
|
+
isError: true;
|
|
1451
|
+
isIdle: false;
|
|
1452
|
+
isPending: false;
|
|
1453
|
+
isSuccess: false;
|
|
1454
|
+
status: "error";
|
|
1455
|
+
reset: () => void;
|
|
1456
|
+
context: unknown;
|
|
1457
|
+
failureCount: number;
|
|
1458
|
+
failureReason: Error | null;
|
|
1459
|
+
isPaused: boolean;
|
|
1460
|
+
submittedAt: number;
|
|
1461
|
+
} | {
|
|
1462
|
+
verifyArbitrary: _tanstack_react_query.UseMutateFunction<boolean, Error, VerifyArbitraryArgs, unknown>;
|
|
1463
|
+
verifyArbitraryAsync: _tanstack_react_query.UseMutateAsyncFunction<boolean, Error, VerifyArbitraryArgs, unknown>;
|
|
1464
|
+
data: boolean;
|
|
1465
|
+
error: null;
|
|
1466
|
+
variables: VerifyArbitraryArgs;
|
|
1467
|
+
isError: false;
|
|
1468
|
+
isIdle: false;
|
|
1469
|
+
isPending: false;
|
|
1470
|
+
isSuccess: true;
|
|
1471
|
+
status: "success";
|
|
1472
|
+
reset: () => void;
|
|
1473
|
+
context: unknown;
|
|
1474
|
+
failureCount: number;
|
|
1475
|
+
failureReason: Error | null;
|
|
1476
|
+
isPaused: boolean;
|
|
1477
|
+
submittedAt: number;
|
|
1478
|
+
};
|
|
1479
|
+
/**
|
|
1480
|
+
* graz mutation hook to sign and broadcast arbitrary encoded messages.
|
|
1481
|
+
*
|
|
1482
|
+
* @see {@link signAndBroadcast}
|
|
1483
|
+
*/
|
|
1484
|
+
declare const useSignAndBroadcast: ({ onError, onLoading, onSuccess, }?: MutationEventArgs<SignAndBroadcastArgs, DeliverTxResponse>) => {
|
|
1485
|
+
signAndBroadcast: _tanstack_react_query.UseMutateFunction<DeliverTxResponse, Error, SignAndBroadcastArgs, unknown>;
|
|
1486
|
+
signAndBroadcastAsync: _tanstack_react_query.UseMutateAsyncFunction<DeliverTxResponse, Error, SignAndBroadcastArgs, unknown>;
|
|
1487
|
+
data: undefined;
|
|
1488
|
+
variables: undefined;
|
|
1489
|
+
error: null;
|
|
1490
|
+
isError: false;
|
|
1491
|
+
isIdle: true;
|
|
1492
|
+
isPending: false;
|
|
1493
|
+
isSuccess: false;
|
|
1494
|
+
status: "idle";
|
|
1495
|
+
reset: () => void;
|
|
1496
|
+
context: unknown;
|
|
1497
|
+
failureCount: number;
|
|
1498
|
+
failureReason: Error | null;
|
|
1499
|
+
isPaused: boolean;
|
|
1500
|
+
submittedAt: number;
|
|
1501
|
+
} | {
|
|
1502
|
+
signAndBroadcast: _tanstack_react_query.UseMutateFunction<DeliverTxResponse, Error, SignAndBroadcastArgs, unknown>;
|
|
1503
|
+
signAndBroadcastAsync: _tanstack_react_query.UseMutateAsyncFunction<DeliverTxResponse, Error, SignAndBroadcastArgs, unknown>;
|
|
1504
|
+
data: undefined;
|
|
1505
|
+
variables: SignAndBroadcastArgs;
|
|
1506
|
+
error: null;
|
|
1507
|
+
isError: false;
|
|
1508
|
+
isIdle: false;
|
|
1509
|
+
isPending: true;
|
|
1510
|
+
isSuccess: false;
|
|
1511
|
+
status: "pending";
|
|
1512
|
+
reset: () => void;
|
|
1513
|
+
context: unknown;
|
|
1514
|
+
failureCount: number;
|
|
1515
|
+
failureReason: Error | null;
|
|
1516
|
+
isPaused: boolean;
|
|
1517
|
+
submittedAt: number;
|
|
1518
|
+
} | {
|
|
1519
|
+
signAndBroadcast: _tanstack_react_query.UseMutateFunction<DeliverTxResponse, Error, SignAndBroadcastArgs, unknown>;
|
|
1520
|
+
signAndBroadcastAsync: _tanstack_react_query.UseMutateAsyncFunction<DeliverTxResponse, Error, SignAndBroadcastArgs, unknown>;
|
|
1521
|
+
data: undefined;
|
|
1522
|
+
error: Error;
|
|
1523
|
+
variables: SignAndBroadcastArgs;
|
|
1524
|
+
isError: true;
|
|
1525
|
+
isIdle: false;
|
|
1526
|
+
isPending: false;
|
|
1527
|
+
isSuccess: false;
|
|
1528
|
+
status: "error";
|
|
1529
|
+
reset: () => void;
|
|
1530
|
+
context: unknown;
|
|
1531
|
+
failureCount: number;
|
|
1532
|
+
failureReason: Error | null;
|
|
1533
|
+
isPaused: boolean;
|
|
1534
|
+
submittedAt: number;
|
|
1535
|
+
} | {
|
|
1536
|
+
signAndBroadcast: _tanstack_react_query.UseMutateFunction<DeliverTxResponse, Error, SignAndBroadcastArgs, unknown>;
|
|
1537
|
+
signAndBroadcastAsync: _tanstack_react_query.UseMutateAsyncFunction<DeliverTxResponse, Error, SignAndBroadcastArgs, unknown>;
|
|
1538
|
+
data: DeliverTxResponse;
|
|
1539
|
+
error: null;
|
|
1540
|
+
variables: SignAndBroadcastArgs;
|
|
1541
|
+
isError: false;
|
|
1542
|
+
isIdle: false;
|
|
1543
|
+
isPending: false;
|
|
1544
|
+
isSuccess: true;
|
|
1545
|
+
status: "success";
|
|
1546
|
+
reset: () => void;
|
|
1547
|
+
context: unknown;
|
|
1548
|
+
failureCount: number;
|
|
1549
|
+
failureReason: Error | null;
|
|
1550
|
+
isPaused: boolean;
|
|
1551
|
+
submittedAt: number;
|
|
1552
|
+
};
|
|
1342
1553
|
/**
|
|
1343
1554
|
* graz mutation hook to send tokens.
|
|
1344
1555
|
*
|
|
@@ -1856,11 +2067,8 @@ declare const useActiveWalletType: () => {
|
|
|
1856
2067
|
isCosmostationMobile: boolean;
|
|
1857
2068
|
isKeplr: boolean;
|
|
1858
2069
|
isKeplrMobile: boolean;
|
|
1859
|
-
isLeap: boolean;
|
|
1860
|
-
isLeapMobile: boolean;
|
|
1861
2070
|
isVectis: boolean;
|
|
1862
2071
|
isWalletConnect: boolean;
|
|
1863
|
-
isMetamaskSnapLeap: boolean;
|
|
1864
2072
|
isStation: boolean;
|
|
1865
2073
|
isCosmiframe: boolean;
|
|
1866
2074
|
};
|
|
@@ -1891,7 +2099,7 @@ interface GrazProviderProps {
|
|
|
1891
2099
|
* // example next.js application in _app.tsx
|
|
1892
2100
|
* export default function CustomApp({ Component, pageProps }: AppProps) {
|
|
1893
2101
|
* return (
|
|
1894
|
-
* <QueryClientProvider
|
|
2102
|
+
* <QueryClientProvider client={queryClient}>
|
|
1895
2103
|
* <GrazProvider grazOptions={{
|
|
1896
2104
|
* chains: [cosmoshubChainInfo, osmosisChainInfo],
|
|
1897
2105
|
* logger: {
|
|
@@ -1912,7 +2120,7 @@ interface GrazProviderProps {
|
|
|
1912
2120
|
declare const GrazProvider: FC<GrazProviderProps>;
|
|
1913
2121
|
|
|
1914
2122
|
/**
|
|
1915
|
-
* Graz custom hook to track `keplr_keystorechange`, `
|
|
2123
|
+
* Graz custom hook to track `keplr_keystorechange`, `accountChanged` event and reconnect state
|
|
1916
2124
|
*
|
|
1917
2125
|
* **Note: only use this hook if not using graz's provider component.**
|
|
1918
2126
|
*/
|
|
@@ -1924,4 +2132,4 @@ declare const useGrazEvents: () => null;
|
|
|
1924
2132
|
*/
|
|
1925
2133
|
declare const GrazEvents: FC;
|
|
1926
2134
|
|
|
1927
|
-
export { type ActionChainId, type AddChainArgs, type CactusCosmosWallet, type ConfigureGrazArgs, type ConnectArgs, type ConnectResult, type Dictionary, type ErrorReporter, type ExecuteContractArgs, type ExecuteContractMutationArgs, GrazEvents, GrazProvider, type GrazProviderProps, type Height, type InstantiateContractArgs, type InstantiateContractMutationArgs, type Key, type KnownKeys, LOG_CATEGORIES, LOG_FUNCTIONS, LOG_HOOKS, LogCategory, LogLevel, type Logger, type LoggerOptions, type Maybe, type OfflineSigners, type ParaGrazConfig, type ParaGrazConnector, type ParaGrazConnectorEvents, type ParaModalProps, type ParaWallet, type ReconnectArgs, type SendIbcTokensArgs, type SendTokensArgs, type SignAminoParams, type SignDirectParams, type SignDoc, type SuggestChainAndConnectArgs, type SuggestChainArgs, type UseAccountArgs, type UseAccountResult, type UseAddChainArgs, type UseConnectChainArgs, type UseExecuteContractArgs, type UseInstantiateContractArgs, type UseSuggestChainAndConnectArgs, type UseSuggestChainArgs, WALLET_TYPES, type Wallet, WalletType, addChain, checkWallet, clearRecentChain, clearSession, configureGraz, configureLogger, connect, defineChainInfo, defineChains, disconnect, executeContract, getAvailableWallets, getCactusCosmos, getChainInfo, getChainInfos, getCosmostation, getKeplr,
|
|
2135
|
+
export { type ActionChainId, type AddChainArgs, type CactusCosmosWallet, type ConfigureGrazArgs, type ConnectArgs, type ConnectResult, type Dictionary, type ErrorReporter, type ExecuteContractArgs, type ExecuteContractMutationArgs, GrazEvents, GrazProvider, type GrazProviderProps, type Height, type InstantiateContractArgs, type InstantiateContractMutationArgs, type Key, type KnownKeys, LOG_CATEGORIES, LOG_FUNCTIONS, LOG_HOOKS, LogCategory, LogLevel, type Logger, type LoggerOptions, type Maybe, type OfflineSigners, type ParaGrazConfig, type ParaGrazConnector, type ParaGrazConnectorEvents, type ParaModalProps, type ParaWallet, type ReconnectArgs, type SendIbcTokensArgs, type SendTokensArgs, type SignAminoParams, type SignAndBroadcastArgs, type SignArbitraryArgs, type SignDirectParams, type SignDoc, type SuggestChainAndConnectArgs, type SuggestChainArgs, type UseAccountArgs, type UseAccountResult, type UseAddChainArgs, type UseConnectChainArgs, type UseExecuteContractArgs, type UseInstantiateContractArgs, type UseSuggestChainAndConnectArgs, type UseSuggestChainArgs, type VerifyArbitraryArgs, WALLET_TYPES, type Wallet, WalletType, addChain, checkWallet, clearRecentChain, clearSession, configureGraz, configureLogger, connect, defineChainInfo, defineChains, disconnect, executeContract, getAvailableWallets, getCactusCosmos, getChainInfo, getChainInfos, getCosmostation, getKeplr, getLogger, getOfflineSigners, getOkx, getPara, getQueryRaw, getQuerySmart, getRecentChainIds, getRecentChains, getVectis, getWCCosmostation, getWCKeplr, getWallet, getWalletConnect, instantiateContract, isPara, isWalletConnect, reconnect, sendIbcTokens, sendTokens, signAndBroadcast, signArbitrary, suggestChain, suggestChainAndConnect, useAccount, useActiveChainCurrency, useActiveChainIds, useActiveChains, useActiveWalletType, useAddChain, useBalance, useBalanceStaked, useBalances, useChainInfo, useChainInfos, useCheckWallet, useConnect, useCosmWasmClient, useCosmWasmSigningClient, useDisconnect, useExecuteContract, useGrazEvents, useInstantiateContract, useOfflineSigners, useQueryClientValidators, useQueryRaw, useQuerySmart, useRecentChainIds, useRecentChains, useSendIbcTokens, useSendTokens, useSignAndBroadcast, useSignArbitrary, useStargateClient, useStargateSigningClient, useSuggestChain, useSuggestChainAndConnect, useVerifyArbitrary, verifyArbitrary };
|