graz 0.1.31 → 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 +0 -0
- package/dist/index.d.mts +41 -39
- package/dist/index.d.ts +41 -39
- package/dist/index.js +69 -69
- package/dist/index.mjs +5 -5
- package/package.json +12 -11
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
|
|
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;
|
|
@@ -549,11 +549,11 @@ type UseConnectChainArgs = MutationEventArgs<ConnectArgs, ConnectResult>;
|
|
|
549
549
|
declare const useConnect: ({ onError, onLoading, onSuccess }?: UseConnectChainArgs) => {
|
|
550
550
|
connect: (args?: ConnectArgs) => void;
|
|
551
551
|
connectAsync: (args?: ConnectArgs) => Promise<ConnectResult>;
|
|
552
|
-
error:
|
|
552
|
+
error: Error | null;
|
|
553
553
|
isLoading: boolean;
|
|
554
554
|
isSuccess: boolean;
|
|
555
555
|
isSupported: boolean;
|
|
556
|
-
status: "error" | "success" | "
|
|
556
|
+
status: "error" | "success" | "pending" | "idle";
|
|
557
557
|
};
|
|
558
558
|
/**
|
|
559
559
|
* graz mutation hook to execute wallet disconnection with optional arguments to
|
|
@@ -586,10 +586,10 @@ declare const useDisconnect: ({ onError, onLoading, onSuccess }?: MutationEventA
|
|
|
586
586
|
disconnectAsync: (args?: {
|
|
587
587
|
chainId?: ChainId$1;
|
|
588
588
|
}) => Promise<void>;
|
|
589
|
-
error:
|
|
589
|
+
error: Error | null;
|
|
590
590
|
isLoading: boolean;
|
|
591
591
|
isSuccess: boolean;
|
|
592
|
-
status: "error" | "success" | "
|
|
592
|
+
status: "error" | "success" | "pending" | "idle";
|
|
593
593
|
};
|
|
594
594
|
/**
|
|
595
595
|
* graz hook to retrieve offline signer objects (default, amino enabled, and auto).
|
|
@@ -779,12 +779,12 @@ type UseSuggestChainArgs = MutationEventArgs<ChainInfo>;
|
|
|
779
779
|
* ```
|
|
780
780
|
*/
|
|
781
781
|
declare const useSuggestChain: ({ onError, onLoading, onSuccess }?: UseSuggestChainArgs) => {
|
|
782
|
-
error:
|
|
782
|
+
error: Error | null;
|
|
783
783
|
isLoading: boolean;
|
|
784
784
|
isSuccess: boolean;
|
|
785
|
-
suggest:
|
|
786
|
-
suggestAsync:
|
|
787
|
-
status: "error" | "success" | "
|
|
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";
|
|
788
788
|
};
|
|
789
789
|
type UseSuggestChainAndConnectArgs = MutationEventArgs<SuggestChainAndConnectArgs, ConnectResult>;
|
|
790
790
|
/**
|
|
@@ -818,13 +818,13 @@ type UseSuggestChainAndConnectArgs = MutationEventArgs<SuggestChainAndConnectArg
|
|
|
818
818
|
* ```
|
|
819
819
|
*/
|
|
820
820
|
declare const useSuggestChainAndConnect: ({ onError, onLoading, onSuccess }?: UseSuggestChainAndConnectArgs) => {
|
|
821
|
-
error:
|
|
821
|
+
error: Error | null;
|
|
822
822
|
isLoading: boolean;
|
|
823
823
|
isSuccess: boolean;
|
|
824
824
|
isSupported: boolean;
|
|
825
|
-
status: "error" | "success" | "
|
|
826
|
-
suggestAndConnect:
|
|
827
|
-
suggestAndConnectAsync:
|
|
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>;
|
|
828
828
|
};
|
|
829
829
|
|
|
830
830
|
/**
|
|
@@ -905,12 +905,12 @@ declare const useTendermintClient: <T extends "tm34" | "tm37", TMulti extends Mu
|
|
|
905
905
|
* @see {@link sendTokens}
|
|
906
906
|
*/
|
|
907
907
|
declare const useSendTokens: ({ onError, onLoading, onSuccess, }?: MutationEventArgs<SendTokensArgs, DeliverTxResponse>) => {
|
|
908
|
-
error:
|
|
908
|
+
error: Error | null;
|
|
909
909
|
isLoading: boolean;
|
|
910
910
|
isSuccess: boolean;
|
|
911
|
-
sendTokens:
|
|
912
|
-
sendTokensAsync:
|
|
913
|
-
status: "error" | "success" | "
|
|
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";
|
|
914
914
|
};
|
|
915
915
|
/**
|
|
916
916
|
* graz mutation hook to send IBC tokens. Note: if `senderAddress` undefined, it will use current connected account address.
|
|
@@ -933,12 +933,12 @@ declare const useSendTokens: ({ onError, onLoading, onSuccess, }?: MutationEvent
|
|
|
933
933
|
* ```
|
|
934
934
|
*/
|
|
935
935
|
declare const useSendIbcTokens: ({ onError, onLoading, onSuccess, }?: MutationEventArgs<SendIbcTokensArgs, DeliverTxResponse>) => {
|
|
936
|
-
error:
|
|
936
|
+
error: Error | null;
|
|
937
937
|
isLoading: boolean;
|
|
938
938
|
isSuccess: boolean;
|
|
939
|
-
sendIbcTokens:
|
|
940
|
-
sendIbcTokensAsync:
|
|
941
|
-
status: "error" | "success" | "
|
|
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";
|
|
942
942
|
};
|
|
943
943
|
type UseInstantiateContractArgs<Message extends Record<string, unknown>> = {
|
|
944
944
|
codeId: number;
|
|
@@ -965,12 +965,12 @@ type UseInstantiateContractArgs<Message extends Record<string, unknown>> = {
|
|
|
965
965
|
* ```
|
|
966
966
|
*/
|
|
967
967
|
declare const useInstantiateContract: <Message extends Record<string, unknown>>({ codeId, onError, onLoading, onSuccess, }: UseInstantiateContractArgs<Message>) => {
|
|
968
|
-
error:
|
|
968
|
+
error: Error | null;
|
|
969
969
|
isLoading: boolean;
|
|
970
970
|
isSuccess: boolean;
|
|
971
|
-
instantiateContract:
|
|
972
|
-
instantiateContractAsync:
|
|
973
|
-
status: "error" | "success" | "
|
|
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";
|
|
974
974
|
};
|
|
975
975
|
type UseExecuteContractArgs<Message extends Record<string, unknown>> = {
|
|
976
976
|
contractAddress: string;
|
|
@@ -1006,12 +1006,12 @@ type UseExecuteContractArgs<Message extends Record<string, unknown>> = {
|
|
|
1006
1006
|
* ```
|
|
1007
1007
|
*/
|
|
1008
1008
|
declare const useExecuteContract: <Message extends Record<string, unknown>>({ contractAddress, onError, onLoading, onSuccess, }: UseExecuteContractArgs<Message>) => {
|
|
1009
|
-
error:
|
|
1009
|
+
error: Error | null;
|
|
1010
1010
|
isLoading: boolean;
|
|
1011
1011
|
isSuccess: boolean;
|
|
1012
|
-
executeContract:
|
|
1013
|
-
executeContractAsync:
|
|
1014
|
-
status: "error" | "success" | "
|
|
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";
|
|
1015
1015
|
};
|
|
1016
1016
|
/**
|
|
1017
1017
|
* graz query hook for dispatching a "smart" query to a CosmWasm smart
|
|
@@ -1103,21 +1103,23 @@ declare const useActiveWalletType: () => {
|
|
|
1103
1103
|
*/
|
|
1104
1104
|
declare const useCheckWallet: (type?: WalletType) => UseQueryResult<boolean>;
|
|
1105
1105
|
|
|
1106
|
-
|
|
1106
|
+
interface GrazProviderProps {
|
|
1107
1107
|
grazOptions: ConfigureGrazArgs;
|
|
1108
|
-
|
|
1108
|
+
children: ReactNode;
|
|
1109
|
+
}
|
|
1109
1110
|
/**
|
|
1110
|
-
* Provider component
|
|
1111
|
-
*
|
|
1112
|
-
*
|
|
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`.
|
|
1113
1113
|
* @example
|
|
1114
1114
|
* ```tsx
|
|
1115
1115
|
* // example next.js application in _app.tsx
|
|
1116
1116
|
* export default function CustomApp({ Component, pageProps }: AppProps) {
|
|
1117
1117
|
* return (
|
|
1118
|
-
* <
|
|
1119
|
-
* <
|
|
1120
|
-
*
|
|
1118
|
+
* <QueryClientProvider queryClient={queryClient}>
|
|
1119
|
+
* <GrazProvider grazOptions={grazOptions}>
|
|
1120
|
+
* <Component {...pageProps} />
|
|
1121
|
+
* </GrazProvider>
|
|
1122
|
+
* </QueryClientProvider>
|
|
1121
1123
|
* );
|
|
1122
1124
|
* }
|
|
1123
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
|
|
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;
|
|
@@ -549,11 +549,11 @@ type UseConnectChainArgs = MutationEventArgs<ConnectArgs, ConnectResult>;
|
|
|
549
549
|
declare const useConnect: ({ onError, onLoading, onSuccess }?: UseConnectChainArgs) => {
|
|
550
550
|
connect: (args?: ConnectArgs) => void;
|
|
551
551
|
connectAsync: (args?: ConnectArgs) => Promise<ConnectResult>;
|
|
552
|
-
error:
|
|
552
|
+
error: Error | null;
|
|
553
553
|
isLoading: boolean;
|
|
554
554
|
isSuccess: boolean;
|
|
555
555
|
isSupported: boolean;
|
|
556
|
-
status: "error" | "success" | "
|
|
556
|
+
status: "error" | "success" | "pending" | "idle";
|
|
557
557
|
};
|
|
558
558
|
/**
|
|
559
559
|
* graz mutation hook to execute wallet disconnection with optional arguments to
|
|
@@ -586,10 +586,10 @@ declare const useDisconnect: ({ onError, onLoading, onSuccess }?: MutationEventA
|
|
|
586
586
|
disconnectAsync: (args?: {
|
|
587
587
|
chainId?: ChainId$1;
|
|
588
588
|
}) => Promise<void>;
|
|
589
|
-
error:
|
|
589
|
+
error: Error | null;
|
|
590
590
|
isLoading: boolean;
|
|
591
591
|
isSuccess: boolean;
|
|
592
|
-
status: "error" | "success" | "
|
|
592
|
+
status: "error" | "success" | "pending" | "idle";
|
|
593
593
|
};
|
|
594
594
|
/**
|
|
595
595
|
* graz hook to retrieve offline signer objects (default, amino enabled, and auto).
|
|
@@ -779,12 +779,12 @@ type UseSuggestChainArgs = MutationEventArgs<ChainInfo>;
|
|
|
779
779
|
* ```
|
|
780
780
|
*/
|
|
781
781
|
declare const useSuggestChain: ({ onError, onLoading, onSuccess }?: UseSuggestChainArgs) => {
|
|
782
|
-
error:
|
|
782
|
+
error: Error | null;
|
|
783
783
|
isLoading: boolean;
|
|
784
784
|
isSuccess: boolean;
|
|
785
|
-
suggest:
|
|
786
|
-
suggestAsync:
|
|
787
|
-
status: "error" | "success" | "
|
|
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";
|
|
788
788
|
};
|
|
789
789
|
type UseSuggestChainAndConnectArgs = MutationEventArgs<SuggestChainAndConnectArgs, ConnectResult>;
|
|
790
790
|
/**
|
|
@@ -818,13 +818,13 @@ type UseSuggestChainAndConnectArgs = MutationEventArgs<SuggestChainAndConnectArg
|
|
|
818
818
|
* ```
|
|
819
819
|
*/
|
|
820
820
|
declare const useSuggestChainAndConnect: ({ onError, onLoading, onSuccess }?: UseSuggestChainAndConnectArgs) => {
|
|
821
|
-
error:
|
|
821
|
+
error: Error | null;
|
|
822
822
|
isLoading: boolean;
|
|
823
823
|
isSuccess: boolean;
|
|
824
824
|
isSupported: boolean;
|
|
825
|
-
status: "error" | "success" | "
|
|
826
|
-
suggestAndConnect:
|
|
827
|
-
suggestAndConnectAsync:
|
|
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>;
|
|
828
828
|
};
|
|
829
829
|
|
|
830
830
|
/**
|
|
@@ -905,12 +905,12 @@ declare const useTendermintClient: <T extends "tm34" | "tm37", TMulti extends Mu
|
|
|
905
905
|
* @see {@link sendTokens}
|
|
906
906
|
*/
|
|
907
907
|
declare const useSendTokens: ({ onError, onLoading, onSuccess, }?: MutationEventArgs<SendTokensArgs, DeliverTxResponse>) => {
|
|
908
|
-
error:
|
|
908
|
+
error: Error | null;
|
|
909
909
|
isLoading: boolean;
|
|
910
910
|
isSuccess: boolean;
|
|
911
|
-
sendTokens:
|
|
912
|
-
sendTokensAsync:
|
|
913
|
-
status: "error" | "success" | "
|
|
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";
|
|
914
914
|
};
|
|
915
915
|
/**
|
|
916
916
|
* graz mutation hook to send IBC tokens. Note: if `senderAddress` undefined, it will use current connected account address.
|
|
@@ -933,12 +933,12 @@ declare const useSendTokens: ({ onError, onLoading, onSuccess, }?: MutationEvent
|
|
|
933
933
|
* ```
|
|
934
934
|
*/
|
|
935
935
|
declare const useSendIbcTokens: ({ onError, onLoading, onSuccess, }?: MutationEventArgs<SendIbcTokensArgs, DeliverTxResponse>) => {
|
|
936
|
-
error:
|
|
936
|
+
error: Error | null;
|
|
937
937
|
isLoading: boolean;
|
|
938
938
|
isSuccess: boolean;
|
|
939
|
-
sendIbcTokens:
|
|
940
|
-
sendIbcTokensAsync:
|
|
941
|
-
status: "error" | "success" | "
|
|
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";
|
|
942
942
|
};
|
|
943
943
|
type UseInstantiateContractArgs<Message extends Record<string, unknown>> = {
|
|
944
944
|
codeId: number;
|
|
@@ -965,12 +965,12 @@ type UseInstantiateContractArgs<Message extends Record<string, unknown>> = {
|
|
|
965
965
|
* ```
|
|
966
966
|
*/
|
|
967
967
|
declare const useInstantiateContract: <Message extends Record<string, unknown>>({ codeId, onError, onLoading, onSuccess, }: UseInstantiateContractArgs<Message>) => {
|
|
968
|
-
error:
|
|
968
|
+
error: Error | null;
|
|
969
969
|
isLoading: boolean;
|
|
970
970
|
isSuccess: boolean;
|
|
971
|
-
instantiateContract:
|
|
972
|
-
instantiateContractAsync:
|
|
973
|
-
status: "error" | "success" | "
|
|
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";
|
|
974
974
|
};
|
|
975
975
|
type UseExecuteContractArgs<Message extends Record<string, unknown>> = {
|
|
976
976
|
contractAddress: string;
|
|
@@ -1006,12 +1006,12 @@ type UseExecuteContractArgs<Message extends Record<string, unknown>> = {
|
|
|
1006
1006
|
* ```
|
|
1007
1007
|
*/
|
|
1008
1008
|
declare const useExecuteContract: <Message extends Record<string, unknown>>({ contractAddress, onError, onLoading, onSuccess, }: UseExecuteContractArgs<Message>) => {
|
|
1009
|
-
error:
|
|
1009
|
+
error: Error | null;
|
|
1010
1010
|
isLoading: boolean;
|
|
1011
1011
|
isSuccess: boolean;
|
|
1012
|
-
executeContract:
|
|
1013
|
-
executeContractAsync:
|
|
1014
|
-
status: "error" | "success" | "
|
|
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";
|
|
1015
1015
|
};
|
|
1016
1016
|
/**
|
|
1017
1017
|
* graz query hook for dispatching a "smart" query to a CosmWasm smart
|
|
@@ -1103,21 +1103,23 @@ declare const useActiveWalletType: () => {
|
|
|
1103
1103
|
*/
|
|
1104
1104
|
declare const useCheckWallet: (type?: WalletType) => UseQueryResult<boolean>;
|
|
1105
1105
|
|
|
1106
|
-
|
|
1106
|
+
interface GrazProviderProps {
|
|
1107
1107
|
grazOptions: ConfigureGrazArgs;
|
|
1108
|
-
|
|
1108
|
+
children: ReactNode;
|
|
1109
|
+
}
|
|
1109
1110
|
/**
|
|
1110
|
-
* Provider component
|
|
1111
|
-
*
|
|
1112
|
-
*
|
|
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`.
|
|
1113
1113
|
* @example
|
|
1114
1114
|
* ```tsx
|
|
1115
1115
|
* // example next.js application in _app.tsx
|
|
1116
1116
|
* export default function CustomApp({ Component, pageProps }: AppProps) {
|
|
1117
1117
|
* return (
|
|
1118
|
-
* <
|
|
1119
|
-
* <
|
|
1120
|
-
*
|
|
1118
|
+
* <QueryClientProvider queryClient={queryClient}>
|
|
1119
|
+
* <GrazProvider grazOptions={grazOptions}>
|
|
1120
|
+
* <Component {...pageProps} />
|
|
1121
|
+
* </GrazProvider>
|
|
1122
|
+
* </QueryClientProvider>
|
|
1121
1123
|
* );
|
|
1122
1124
|
* }
|
|
1123
1125
|
* ```
|