graz 0.1.30 → 0.2.0-alpha.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/.gitkeep CHANGED
File without changes
package/dist/index.d.mts CHANGED
@@ -7,13 +7,13 @@ import * as _cosmjs_cosmwasm_stargate from '@cosmjs/cosmwasm-stargate';
7
7
  import { SigningCosmWasmClient, InstantiateOptions, CosmWasmClient, InstantiateResult, ExecuteResult, SigningCosmWasmClientOptions } from '@cosmjs/cosmwasm-stargate';
8
8
  import { SigningStargateClient, StdFee, DeliverTxResponse, QueryClient, StakingExtension, StargateClient, SigningStargateClientOptions } from '@cosmjs/stargate';
9
9
  import { Height } from 'cosmjs-types/ibc/core/client/v1/client';
10
- import * as _tanstack_react_query from '@tanstack/react-query';
11
- import { UseQueryResult, QueryClientProviderProps } from '@tanstack/react-query';
10
+ import { UseQueryResult } from '@tanstack/react-query';
12
11
  import * as _leapwallet_cosmos_social_login_capsule_provider from '@leapwallet/cosmos-social-login-capsule-provider';
12
+ import * as _tanstack_react_query_build_legacy_types from '@tanstack/react-query/build/legacy/types';
13
13
  import { BondStatusString } from '@cosmjs/stargate/build/modules/staking/queries';
14
14
  import { QueryValidatorsResponse } from 'cosmjs-types/cosmos/staking/v1beta1/query';
15
15
  import { Tendermint34Client, Tendermint37Client } from '@cosmjs/tendermint-rpc';
16
- import { FC } from 'react';
16
+ import { ReactNode, FC } from 'react';
17
17
 
18
18
  type Dictionary<T = string> = Record<string, T>;
19
19
  type Maybe<T> = T | undefined;
@@ -48,6 +48,8 @@ type Wallet = Pick<Keplr, "enable" | "getOfflineSigner" | "getOfflineSignerAuto"
48
48
  setDefaultOptions?: (options: KeplrIntereactionOptions) => void;
49
49
  onAfterLoginSuccessful?: () => Promise<void>;
50
50
  getKey: (chainId: string) => Promise<Key>;
51
+ signEthereum?: Keplr["signEthereum"];
52
+ experimentalSignEIP712CosmosTx_v0?: Keplr["experimentalSignEIP712CosmosTx_v0"];
51
53
  };
52
54
  type SignDirectParams = Parameters<Wallet["signDirect"]>;
53
55
  type SignAminoParams = Parameters<Wallet["signAmino"]>;
@@ -547,11 +549,11 @@ type UseConnectChainArgs = MutationEventArgs<ConnectArgs, ConnectResult>;
547
549
  declare const useConnect: ({ onError, onLoading, onSuccess }?: UseConnectChainArgs) => {
548
550
  connect: (args?: ConnectArgs) => void;
549
551
  connectAsync: (args?: ConnectArgs) => Promise<ConnectResult>;
550
- error: unknown;
552
+ error: Error | null;
551
553
  isLoading: boolean;
552
554
  isSuccess: boolean;
553
555
  isSupported: boolean;
554
- status: "error" | "success" | "loading" | "idle";
556
+ status: "error" | "success" | "pending" | "idle";
555
557
  };
556
558
  /**
557
559
  * graz mutation hook to execute wallet disconnection with optional arguments to
@@ -584,10 +586,10 @@ declare const useDisconnect: ({ onError, onLoading, onSuccess }?: MutationEventA
584
586
  disconnectAsync: (args?: {
585
587
  chainId?: ChainId$1;
586
588
  }) => Promise<void>;
587
- error: unknown;
589
+ error: Error | null;
588
590
  isLoading: boolean;
589
591
  isSuccess: boolean;
590
- status: "error" | "success" | "loading" | "idle";
592
+ status: "error" | "success" | "pending" | "idle";
591
593
  };
592
594
  /**
593
595
  * graz hook to retrieve offline signer objects (default, amino enabled, and auto).
@@ -777,12 +779,12 @@ type UseSuggestChainArgs = MutationEventArgs<ChainInfo>;
777
779
  * ```
778
780
  */
779
781
  declare const useSuggestChain: ({ onError, onLoading, onSuccess }?: UseSuggestChainArgs) => {
780
- error: unknown;
782
+ error: Error | null;
781
783
  isLoading: boolean;
782
784
  isSuccess: boolean;
783
- suggest: _tanstack_react_query.UseMutateFunction<ChainInfo, unknown, SuggestChainArgs, unknown>;
784
- suggestAsync: _tanstack_react_query.UseMutateAsyncFunction<ChainInfo, unknown, SuggestChainArgs, unknown>;
785
- status: "error" | "success" | "loading" | "idle";
785
+ suggest: _tanstack_react_query_build_legacy_types.UseMutateFunction<ChainInfo, Error, SuggestChainArgs, unknown>;
786
+ suggestAsync: _tanstack_react_query_build_legacy_types.UseMutateAsyncFunction<ChainInfo, Error, SuggestChainArgs, unknown>;
787
+ status: "error" | "success" | "pending" | "idle";
786
788
  };
787
789
  type UseSuggestChainAndConnectArgs = MutationEventArgs<SuggestChainAndConnectArgs, ConnectResult>;
788
790
  /**
@@ -816,13 +818,13 @@ type UseSuggestChainAndConnectArgs = MutationEventArgs<SuggestChainAndConnectArg
816
818
  * ```
817
819
  */
818
820
  declare const useSuggestChainAndConnect: ({ onError, onLoading, onSuccess }?: UseSuggestChainAndConnectArgs) => {
819
- error: unknown;
821
+ error: Error | null;
820
822
  isLoading: boolean;
821
823
  isSuccess: boolean;
822
824
  isSupported: boolean;
823
- status: "error" | "success" | "loading" | "idle";
824
- suggestAndConnect: _tanstack_react_query.UseMutateFunction<ConnectResult, unknown, SuggestChainAndConnectArgs, unknown>;
825
- suggestAndConnectAsync: _tanstack_react_query.UseMutateAsyncFunction<ConnectResult, unknown, SuggestChainAndConnectArgs, unknown>;
825
+ status: "error" | "success" | "pending" | "idle";
826
+ suggestAndConnect: _tanstack_react_query_build_legacy_types.UseMutateFunction<ConnectResult, Error, SuggestChainAndConnectArgs, unknown>;
827
+ suggestAndConnectAsync: _tanstack_react_query_build_legacy_types.UseMutateAsyncFunction<ConnectResult, Error, SuggestChainAndConnectArgs, unknown>;
826
828
  };
827
829
 
828
830
  /**
@@ -903,12 +905,12 @@ declare const useTendermintClient: <T extends "tm34" | "tm37", TMulti extends Mu
903
905
  * @see {@link sendTokens}
904
906
  */
905
907
  declare const useSendTokens: ({ onError, onLoading, onSuccess, }?: MutationEventArgs<SendTokensArgs, DeliverTxResponse>) => {
906
- error: unknown;
908
+ error: Error | null;
907
909
  isLoading: boolean;
908
910
  isSuccess: boolean;
909
- sendTokens: _tanstack_react_query.UseMutateFunction<DeliverTxResponse, unknown, SendTokensArgs, unknown>;
910
- sendTokensAsync: _tanstack_react_query.UseMutateAsyncFunction<DeliverTxResponse, unknown, SendTokensArgs, unknown>;
911
- status: "error" | "success" | "loading" | "idle";
911
+ sendTokens: _tanstack_react_query_build_legacy_types.UseMutateFunction<DeliverTxResponse, Error, SendTokensArgs, unknown>;
912
+ sendTokensAsync: _tanstack_react_query_build_legacy_types.UseMutateAsyncFunction<DeliverTxResponse, Error, SendTokensArgs, unknown>;
913
+ status: "error" | "success" | "pending" | "idle";
912
914
  };
913
915
  /**
914
916
  * graz mutation hook to send IBC tokens. Note: if `senderAddress` undefined, it will use current connected account address.
@@ -931,12 +933,12 @@ declare const useSendTokens: ({ onError, onLoading, onSuccess, }?: MutationEvent
931
933
  * ```
932
934
  */
933
935
  declare const useSendIbcTokens: ({ onError, onLoading, onSuccess, }?: MutationEventArgs<SendIbcTokensArgs, DeliverTxResponse>) => {
934
- error: unknown;
936
+ error: Error | null;
935
937
  isLoading: boolean;
936
938
  isSuccess: boolean;
937
- sendIbcTokens: _tanstack_react_query.UseMutateFunction<DeliverTxResponse, unknown, SendIbcTokensArgs, unknown>;
938
- sendIbcTokensAsync: _tanstack_react_query.UseMutateAsyncFunction<DeliverTxResponse, unknown, SendIbcTokensArgs, unknown>;
939
- status: "error" | "success" | "loading" | "idle";
939
+ sendIbcTokens: _tanstack_react_query_build_legacy_types.UseMutateFunction<DeliverTxResponse, Error, SendIbcTokensArgs, unknown>;
940
+ sendIbcTokensAsync: _tanstack_react_query_build_legacy_types.UseMutateAsyncFunction<DeliverTxResponse, Error, SendIbcTokensArgs, unknown>;
941
+ status: "error" | "success" | "pending" | "idle";
940
942
  };
941
943
  type UseInstantiateContractArgs<Message extends Record<string, unknown>> = {
942
944
  codeId: number;
@@ -963,12 +965,12 @@ type UseInstantiateContractArgs<Message extends Record<string, unknown>> = {
963
965
  * ```
964
966
  */
965
967
  declare const useInstantiateContract: <Message extends Record<string, unknown>>({ codeId, onError, onLoading, onSuccess, }: UseInstantiateContractArgs<Message>) => {
966
- error: unknown;
968
+ error: Error | null;
967
969
  isLoading: boolean;
968
970
  isSuccess: boolean;
969
- instantiateContract: _tanstack_react_query.UseMutateFunction<InstantiateResult, unknown, InstantiateContractMutationArgs<Message>, unknown>;
970
- instantiateContractAsync: _tanstack_react_query.UseMutateAsyncFunction<InstantiateResult, unknown, InstantiateContractMutationArgs<Message>, unknown>;
971
- status: "error" | "success" | "loading" | "idle";
971
+ instantiateContract: _tanstack_react_query_build_legacy_types.UseMutateFunction<InstantiateResult, Error, InstantiateContractMutationArgs<Message>, unknown>;
972
+ instantiateContractAsync: _tanstack_react_query_build_legacy_types.UseMutateAsyncFunction<InstantiateResult, Error, InstantiateContractMutationArgs<Message>, unknown>;
973
+ status: "error" | "success" | "pending" | "idle";
972
974
  };
973
975
  type UseExecuteContractArgs<Message extends Record<string, unknown>> = {
974
976
  contractAddress: string;
@@ -1004,12 +1006,12 @@ type UseExecuteContractArgs<Message extends Record<string, unknown>> = {
1004
1006
  * ```
1005
1007
  */
1006
1008
  declare const useExecuteContract: <Message extends Record<string, unknown>>({ contractAddress, onError, onLoading, onSuccess, }: UseExecuteContractArgs<Message>) => {
1007
- error: unknown;
1009
+ error: Error | null;
1008
1010
  isLoading: boolean;
1009
1011
  isSuccess: boolean;
1010
- executeContract: _tanstack_react_query.UseMutateFunction<ExecuteResult, unknown, ExecuteContractMutationArgs<Message>, unknown>;
1011
- executeContractAsync: _tanstack_react_query.UseMutateAsyncFunction<ExecuteResult, unknown, ExecuteContractMutationArgs<Message>, unknown>;
1012
- status: "error" | "success" | "loading" | "idle";
1012
+ executeContract: _tanstack_react_query_build_legacy_types.UseMutateFunction<ExecuteResult, Error, ExecuteContractMutationArgs<Message>, unknown>;
1013
+ executeContractAsync: _tanstack_react_query_build_legacy_types.UseMutateAsyncFunction<ExecuteResult, Error, ExecuteContractMutationArgs<Message>, unknown>;
1014
+ status: "error" | "success" | "pending" | "idle";
1013
1015
  };
1014
1016
  /**
1015
1017
  * graz query hook for dispatching a "smart" query to a CosmWasm smart
@@ -1101,21 +1103,23 @@ declare const useActiveWalletType: () => {
1101
1103
  */
1102
1104
  declare const useCheckWallet: (type?: WalletType) => UseQueryResult<boolean>;
1103
1105
 
1104
- type GrazProviderProps = Partial<QueryClientProviderProps> & {
1106
+ interface GrazProviderProps {
1105
1107
  grazOptions: ConfigureGrazArgs;
1106
- };
1108
+ children: ReactNode;
1109
+ }
1107
1110
  /**
1108
- * Provider component which extends `@tanstack/react-query`'s {@link QueryClientProvider} with built-in query client
1109
- * and various `graz` side effects
1110
- *
1111
+ * Provider component configures various `graz` side effects.
1112
+ * Graz uses `@tanstack/react-query`'s features under the hood, hence you need to wrap `GrazProvider` with `QueryClientProvider`.
1111
1113
  * @example
1112
1114
  * ```tsx
1113
1115
  * // example next.js application in _app.tsx
1114
1116
  * export default function CustomApp({ Component, pageProps }: AppProps) {
1115
1117
  * return (
1116
- * <GrazProvider>
1117
- * <Component {...pageProps} />
1118
- * </GrazProvider>
1118
+ * <QueryClientProvider queryClient={queryClient}>
1119
+ * <GrazProvider grazOptions={grazOptions}>
1120
+ * <Component {...pageProps} />
1121
+ * </GrazProvider>
1122
+ * </QueryClientProvider>
1119
1123
  * );
1120
1124
  * }
1121
1125
  * ```
package/dist/index.d.ts CHANGED
@@ -7,13 +7,13 @@ import * as _cosmjs_cosmwasm_stargate from '@cosmjs/cosmwasm-stargate';
7
7
  import { SigningCosmWasmClient, InstantiateOptions, CosmWasmClient, InstantiateResult, ExecuteResult, SigningCosmWasmClientOptions } from '@cosmjs/cosmwasm-stargate';
8
8
  import { SigningStargateClient, StdFee, DeliverTxResponse, QueryClient, StakingExtension, StargateClient, SigningStargateClientOptions } from '@cosmjs/stargate';
9
9
  import { Height } from 'cosmjs-types/ibc/core/client/v1/client';
10
- import * as _tanstack_react_query from '@tanstack/react-query';
11
- import { UseQueryResult, QueryClientProviderProps } from '@tanstack/react-query';
10
+ import { UseQueryResult } from '@tanstack/react-query';
12
11
  import * as _leapwallet_cosmos_social_login_capsule_provider from '@leapwallet/cosmos-social-login-capsule-provider';
12
+ import * as _tanstack_react_query_build_legacy_types from '@tanstack/react-query/build/legacy/types';
13
13
  import { BondStatusString } from '@cosmjs/stargate/build/modules/staking/queries';
14
14
  import { QueryValidatorsResponse } from 'cosmjs-types/cosmos/staking/v1beta1/query';
15
15
  import { Tendermint34Client, Tendermint37Client } from '@cosmjs/tendermint-rpc';
16
- import { FC } from 'react';
16
+ import { ReactNode, FC } from 'react';
17
17
 
18
18
  type Dictionary<T = string> = Record<string, T>;
19
19
  type Maybe<T> = T | undefined;
@@ -48,6 +48,8 @@ type Wallet = Pick<Keplr, "enable" | "getOfflineSigner" | "getOfflineSignerAuto"
48
48
  setDefaultOptions?: (options: KeplrIntereactionOptions) => void;
49
49
  onAfterLoginSuccessful?: () => Promise<void>;
50
50
  getKey: (chainId: string) => Promise<Key>;
51
+ signEthereum?: Keplr["signEthereum"];
52
+ experimentalSignEIP712CosmosTx_v0?: Keplr["experimentalSignEIP712CosmosTx_v0"];
51
53
  };
52
54
  type SignDirectParams = Parameters<Wallet["signDirect"]>;
53
55
  type SignAminoParams = Parameters<Wallet["signAmino"]>;
@@ -547,11 +549,11 @@ type UseConnectChainArgs = MutationEventArgs<ConnectArgs, ConnectResult>;
547
549
  declare const useConnect: ({ onError, onLoading, onSuccess }?: UseConnectChainArgs) => {
548
550
  connect: (args?: ConnectArgs) => void;
549
551
  connectAsync: (args?: ConnectArgs) => Promise<ConnectResult>;
550
- error: unknown;
552
+ error: Error | null;
551
553
  isLoading: boolean;
552
554
  isSuccess: boolean;
553
555
  isSupported: boolean;
554
- status: "error" | "success" | "loading" | "idle";
556
+ status: "error" | "success" | "pending" | "idle";
555
557
  };
556
558
  /**
557
559
  * graz mutation hook to execute wallet disconnection with optional arguments to
@@ -584,10 +586,10 @@ declare const useDisconnect: ({ onError, onLoading, onSuccess }?: MutationEventA
584
586
  disconnectAsync: (args?: {
585
587
  chainId?: ChainId$1;
586
588
  }) => Promise<void>;
587
- error: unknown;
589
+ error: Error | null;
588
590
  isLoading: boolean;
589
591
  isSuccess: boolean;
590
- status: "error" | "success" | "loading" | "idle";
592
+ status: "error" | "success" | "pending" | "idle";
591
593
  };
592
594
  /**
593
595
  * graz hook to retrieve offline signer objects (default, amino enabled, and auto).
@@ -777,12 +779,12 @@ type UseSuggestChainArgs = MutationEventArgs<ChainInfo>;
777
779
  * ```
778
780
  */
779
781
  declare const useSuggestChain: ({ onError, onLoading, onSuccess }?: UseSuggestChainArgs) => {
780
- error: unknown;
782
+ error: Error | null;
781
783
  isLoading: boolean;
782
784
  isSuccess: boolean;
783
- suggest: _tanstack_react_query.UseMutateFunction<ChainInfo, unknown, SuggestChainArgs, unknown>;
784
- suggestAsync: _tanstack_react_query.UseMutateAsyncFunction<ChainInfo, unknown, SuggestChainArgs, unknown>;
785
- status: "error" | "success" | "loading" | "idle";
785
+ suggest: _tanstack_react_query_build_legacy_types.UseMutateFunction<ChainInfo, Error, SuggestChainArgs, unknown>;
786
+ suggestAsync: _tanstack_react_query_build_legacy_types.UseMutateAsyncFunction<ChainInfo, Error, SuggestChainArgs, unknown>;
787
+ status: "error" | "success" | "pending" | "idle";
786
788
  };
787
789
  type UseSuggestChainAndConnectArgs = MutationEventArgs<SuggestChainAndConnectArgs, ConnectResult>;
788
790
  /**
@@ -816,13 +818,13 @@ type UseSuggestChainAndConnectArgs = MutationEventArgs<SuggestChainAndConnectArg
816
818
  * ```
817
819
  */
818
820
  declare const useSuggestChainAndConnect: ({ onError, onLoading, onSuccess }?: UseSuggestChainAndConnectArgs) => {
819
- error: unknown;
821
+ error: Error | null;
820
822
  isLoading: boolean;
821
823
  isSuccess: boolean;
822
824
  isSupported: boolean;
823
- status: "error" | "success" | "loading" | "idle";
824
- suggestAndConnect: _tanstack_react_query.UseMutateFunction<ConnectResult, unknown, SuggestChainAndConnectArgs, unknown>;
825
- suggestAndConnectAsync: _tanstack_react_query.UseMutateAsyncFunction<ConnectResult, unknown, SuggestChainAndConnectArgs, unknown>;
825
+ status: "error" | "success" | "pending" | "idle";
826
+ suggestAndConnect: _tanstack_react_query_build_legacy_types.UseMutateFunction<ConnectResult, Error, SuggestChainAndConnectArgs, unknown>;
827
+ suggestAndConnectAsync: _tanstack_react_query_build_legacy_types.UseMutateAsyncFunction<ConnectResult, Error, SuggestChainAndConnectArgs, unknown>;
826
828
  };
827
829
 
828
830
  /**
@@ -903,12 +905,12 @@ declare const useTendermintClient: <T extends "tm34" | "tm37", TMulti extends Mu
903
905
  * @see {@link sendTokens}
904
906
  */
905
907
  declare const useSendTokens: ({ onError, onLoading, onSuccess, }?: MutationEventArgs<SendTokensArgs, DeliverTxResponse>) => {
906
- error: unknown;
908
+ error: Error | null;
907
909
  isLoading: boolean;
908
910
  isSuccess: boolean;
909
- sendTokens: _tanstack_react_query.UseMutateFunction<DeliverTxResponse, unknown, SendTokensArgs, unknown>;
910
- sendTokensAsync: _tanstack_react_query.UseMutateAsyncFunction<DeliverTxResponse, unknown, SendTokensArgs, unknown>;
911
- status: "error" | "success" | "loading" | "idle";
911
+ sendTokens: _tanstack_react_query_build_legacy_types.UseMutateFunction<DeliverTxResponse, Error, SendTokensArgs, unknown>;
912
+ sendTokensAsync: _tanstack_react_query_build_legacy_types.UseMutateAsyncFunction<DeliverTxResponse, Error, SendTokensArgs, unknown>;
913
+ status: "error" | "success" | "pending" | "idle";
912
914
  };
913
915
  /**
914
916
  * graz mutation hook to send IBC tokens. Note: if `senderAddress` undefined, it will use current connected account address.
@@ -931,12 +933,12 @@ declare const useSendTokens: ({ onError, onLoading, onSuccess, }?: MutationEvent
931
933
  * ```
932
934
  */
933
935
  declare const useSendIbcTokens: ({ onError, onLoading, onSuccess, }?: MutationEventArgs<SendIbcTokensArgs, DeliverTxResponse>) => {
934
- error: unknown;
936
+ error: Error | null;
935
937
  isLoading: boolean;
936
938
  isSuccess: boolean;
937
- sendIbcTokens: _tanstack_react_query.UseMutateFunction<DeliverTxResponse, unknown, SendIbcTokensArgs, unknown>;
938
- sendIbcTokensAsync: _tanstack_react_query.UseMutateAsyncFunction<DeliverTxResponse, unknown, SendIbcTokensArgs, unknown>;
939
- status: "error" | "success" | "loading" | "idle";
939
+ sendIbcTokens: _tanstack_react_query_build_legacy_types.UseMutateFunction<DeliverTxResponse, Error, SendIbcTokensArgs, unknown>;
940
+ sendIbcTokensAsync: _tanstack_react_query_build_legacy_types.UseMutateAsyncFunction<DeliverTxResponse, Error, SendIbcTokensArgs, unknown>;
941
+ status: "error" | "success" | "pending" | "idle";
940
942
  };
941
943
  type UseInstantiateContractArgs<Message extends Record<string, unknown>> = {
942
944
  codeId: number;
@@ -963,12 +965,12 @@ type UseInstantiateContractArgs<Message extends Record<string, unknown>> = {
963
965
  * ```
964
966
  */
965
967
  declare const useInstantiateContract: <Message extends Record<string, unknown>>({ codeId, onError, onLoading, onSuccess, }: UseInstantiateContractArgs<Message>) => {
966
- error: unknown;
968
+ error: Error | null;
967
969
  isLoading: boolean;
968
970
  isSuccess: boolean;
969
- instantiateContract: _tanstack_react_query.UseMutateFunction<InstantiateResult, unknown, InstantiateContractMutationArgs<Message>, unknown>;
970
- instantiateContractAsync: _tanstack_react_query.UseMutateAsyncFunction<InstantiateResult, unknown, InstantiateContractMutationArgs<Message>, unknown>;
971
- status: "error" | "success" | "loading" | "idle";
971
+ instantiateContract: _tanstack_react_query_build_legacy_types.UseMutateFunction<InstantiateResult, Error, InstantiateContractMutationArgs<Message>, unknown>;
972
+ instantiateContractAsync: _tanstack_react_query_build_legacy_types.UseMutateAsyncFunction<InstantiateResult, Error, InstantiateContractMutationArgs<Message>, unknown>;
973
+ status: "error" | "success" | "pending" | "idle";
972
974
  };
973
975
  type UseExecuteContractArgs<Message extends Record<string, unknown>> = {
974
976
  contractAddress: string;
@@ -1004,12 +1006,12 @@ type UseExecuteContractArgs<Message extends Record<string, unknown>> = {
1004
1006
  * ```
1005
1007
  */
1006
1008
  declare const useExecuteContract: <Message extends Record<string, unknown>>({ contractAddress, onError, onLoading, onSuccess, }: UseExecuteContractArgs<Message>) => {
1007
- error: unknown;
1009
+ error: Error | null;
1008
1010
  isLoading: boolean;
1009
1011
  isSuccess: boolean;
1010
- executeContract: _tanstack_react_query.UseMutateFunction<ExecuteResult, unknown, ExecuteContractMutationArgs<Message>, unknown>;
1011
- executeContractAsync: _tanstack_react_query.UseMutateAsyncFunction<ExecuteResult, unknown, ExecuteContractMutationArgs<Message>, unknown>;
1012
- status: "error" | "success" | "loading" | "idle";
1012
+ executeContract: _tanstack_react_query_build_legacy_types.UseMutateFunction<ExecuteResult, Error, ExecuteContractMutationArgs<Message>, unknown>;
1013
+ executeContractAsync: _tanstack_react_query_build_legacy_types.UseMutateAsyncFunction<ExecuteResult, Error, ExecuteContractMutationArgs<Message>, unknown>;
1014
+ status: "error" | "success" | "pending" | "idle";
1013
1015
  };
1014
1016
  /**
1015
1017
  * graz query hook for dispatching a "smart" query to a CosmWasm smart
@@ -1101,21 +1103,23 @@ declare const useActiveWalletType: () => {
1101
1103
  */
1102
1104
  declare const useCheckWallet: (type?: WalletType) => UseQueryResult<boolean>;
1103
1105
 
1104
- type GrazProviderProps = Partial<QueryClientProviderProps> & {
1106
+ interface GrazProviderProps {
1105
1107
  grazOptions: ConfigureGrazArgs;
1106
- };
1108
+ children: ReactNode;
1109
+ }
1107
1110
  /**
1108
- * Provider component which extends `@tanstack/react-query`'s {@link QueryClientProvider} with built-in query client
1109
- * and various `graz` side effects
1110
- *
1111
+ * Provider component configures various `graz` side effects.
1112
+ * Graz uses `@tanstack/react-query`'s features under the hood, hence you need to wrap `GrazProvider` with `QueryClientProvider`.
1111
1113
  * @example
1112
1114
  * ```tsx
1113
1115
  * // example next.js application in _app.tsx
1114
1116
  * export default function CustomApp({ Component, pageProps }: AppProps) {
1115
1117
  * return (
1116
- * <GrazProvider>
1117
- * <Component {...pageProps} />
1118
- * </GrazProvider>
1118
+ * <QueryClientProvider queryClient={queryClient}>
1119
+ * <GrazProvider grazOptions={grazOptions}>
1120
+ * <Component {...pageProps} />
1121
+ * </GrazProvider>
1122
+ * </QueryClientProvider>
1119
1123
  * );
1120
1124
  * }
1121
1125
  * ```