graz 0.4.0-alpha.2 → 0.4.0-alpha.3

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 CHANGED
@@ -4,12 +4,15 @@ import { Key as Key$1, Keplr, ChainInfo, KeplrSignOptions, KeplrIntereactionOpti
4
4
  import { OfflineAminoSigner, StdSignDoc, AminoSignResponse, StdSignature } from '@cosmjs/amino';
5
5
  import { WalletConnectModalConfig } from '@walletconnect/modal';
6
6
  import { SignClientTypes } from '@walletconnect/types';
7
+ import * as _tanstack_react_query from '@tanstack/react-query';
8
+ import { UseQueryResult } from '@tanstack/react-query';
9
+ import { ParaWeb } from '@getpara/web-sdk';
10
+ export { ParaWeb } from '@getpara/web-sdk';
11
+ import { ParaGrazConfig as ParaGrazConfig$1 } from '@getpara/graz-connector';
7
12
  import * as _cosmjs_cosmwasm_stargate from '@cosmjs/cosmwasm-stargate';
8
13
  import { SigningCosmWasmClient, InstantiateOptions, CosmWasmClient, InstantiateResult, ExecuteResult, SigningCosmWasmClientOptions } from '@cosmjs/cosmwasm-stargate';
9
14
  import { SigningStargateClient, StdFee, DeliverTxResponse, QueryClient, StakingExtension, StargateClient, SigningStargateClientOptions } from '@cosmjs/stargate';
10
15
  import { Height } from 'cosmjs-types/ibc/core/client/v1/client';
11
- import * as _tanstack_react_query from '@tanstack/react-query';
12
- import { UseQueryResult } from '@tanstack/react-query';
13
16
  import { BondStatusString } from '@cosmjs/stargate/build/modules/staking/queries';
14
17
  import { QueryValidatorsResponse } from 'cosmjs-types/cosmos/staking/v1beta1/query';
15
18
  import { ReactNode, FC } from 'react';
@@ -124,22 +127,6 @@ interface SuggestChainAndConnectArgs {
124
127
  }
125
128
  declare const suggestChainAndConnect: (args: SuggestChainAndConnectArgs) => Promise<ConnectResult>;
126
129
 
127
- /**
128
- * Para Web SDK client type (compatible with ParaWeb from @getpara/web-sdk)
129
- * This represents the main Para class for web interactions
130
- *
131
- * Note: Users must install @getpara/graz-integration to use Para wallet functionality
132
- *
133
- * Note: This interface only defines the minimum required properties.
134
- * The actual Para class may have additional methods and properties.
135
- */
136
- interface ParaWeb {
137
- isReady: boolean;
138
- isFarcasterMiniApp: boolean;
139
- ready(): Promise<void>;
140
- isPasskeySupported(): Promise<boolean>;
141
- logout(): Promise<void>;
142
- }
143
130
  /**
144
131
  * Para wallet entity (compatible with Wallet from @getpara/core-sdk)
145
132
  * Represents a wallet within the Para ecosystem (different from Graz Wallet)
@@ -170,15 +157,9 @@ interface ParaWallet {
170
157
  }
171
158
  /**
172
159
  * Event callbacks for Para wallet connector lifecycle events
160
+ * Extracted from @getpara/graz-connector ParaGrazConfig
173
161
  */
174
- interface ParaGrazConnectorEvents {
175
- /**
176
- * Called when chains are successfully enabled in the Para connector
177
- * @param chainIds - Array of enabled chain IDs
178
- * @param connector - The initialized Para connector instance
179
- */
180
- onEnabled?: (chainIds: string[], connector: any) => void;
181
- }
162
+ type ParaGrazConnectorEvents = NonNullable<ParaGrazConfig$1["events"]>;
182
163
  /**
183
164
  * Modal props for Para wallet UI
184
165
  * Compatible with ParaModalProps from @getpara/react-sdk-lite
@@ -229,7 +210,7 @@ interface ParaGrazConfig {
229
210
  * Should match the client used in your app's QueryClientProvider
230
211
  * Only needed when using @getpara/graz-integration with modal support
231
212
  */
232
- queryClient?: unknown;
213
+ queryClient?: _tanstack_react_query.QueryClient;
233
214
  }
234
215
  /**
235
216
  * Para wallet connector interface
@@ -1800,4 +1781,4 @@ declare const useGrazEvents: () => null;
1800
1781
  */
1801
1782
  declare const GrazEvents: FC;
1802
1783
 
1803
- export { type ActionChainId, type AddChainArgs, type CactusCosmosWallet, type ConfigureGrazArgs, type ConnectArgs, type ConnectResult, type Dictionary, type ExecuteContractArgs, type ExecuteContractMutationArgs, GrazEvents, GrazProvider, type GrazProviderProps, type InstantiateContractArgs, type InstantiateContractMutationArgs, type Key, type KnownKeys, type Maybe, type OfflineSigners, type ParaGrazConfig, type ParaGrazConnector, type ParaGrazConnectorEvents, type ParaModalProps, type ParaWallet, type ParaWeb, 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, connect, defineChainInfo, defineChains, disconnect, executeContract, getAvailableWallets, getCactusCosmos, getChainInfo, getChainInfos, getCosmostation, getKeplr, getLeap, getMetamaskSnapLeap, getOfflineSigners, getOkx, getPara, getQueryRaw, getQuerySmart, getRecentChainIds, getRecentChains, getVectis, getWCCosmostation, getWCKeplr, getWCLeap, getWallet, getWalletConnect, instantiateContract, isLeapDappBrowser, isLeapSnaps, isPara, isWalletConnect, reconnect, sendIbcTokens, sendTokens, 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, useStargateClient, useStargateSigningClient, useSuggestChain, useSuggestChainAndConnect };
1784
+ export { type ActionChainId, type AddChainArgs, type CactusCosmosWallet, type ConfigureGrazArgs, type ConnectArgs, type ConnectResult, type Dictionary, type ExecuteContractArgs, type ExecuteContractMutationArgs, GrazEvents, GrazProvider, type GrazProviderProps, type InstantiateContractArgs, type InstantiateContractMutationArgs, type Key, type KnownKeys, 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, connect, defineChainInfo, defineChains, disconnect, executeContract, getAvailableWallets, getCactusCosmos, getChainInfo, getChainInfos, getCosmostation, getKeplr, getLeap, getMetamaskSnapLeap, getOfflineSigners, getOkx, getPara, getQueryRaw, getQuerySmart, getRecentChainIds, getRecentChains, getVectis, getWCCosmostation, getWCKeplr, getWCLeap, getWallet, getWalletConnect, instantiateContract, isLeapDappBrowser, isLeapSnaps, isPara, isWalletConnect, reconnect, sendIbcTokens, sendTokens, 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, useStargateClient, useStargateSigningClient, useSuggestChain, useSuggestChainAndConnect };
package/dist/index.d.ts CHANGED
@@ -4,12 +4,15 @@ import { Key as Key$1, Keplr, ChainInfo, KeplrSignOptions, KeplrIntereactionOpti
4
4
  import { OfflineAminoSigner, StdSignDoc, AminoSignResponse, StdSignature } from '@cosmjs/amino';
5
5
  import { WalletConnectModalConfig } from '@walletconnect/modal';
6
6
  import { SignClientTypes } from '@walletconnect/types';
7
+ import * as _tanstack_react_query from '@tanstack/react-query';
8
+ import { UseQueryResult } from '@tanstack/react-query';
9
+ import { ParaWeb } from '@getpara/web-sdk';
10
+ export { ParaWeb } from '@getpara/web-sdk';
11
+ import { ParaGrazConfig as ParaGrazConfig$1 } from '@getpara/graz-connector';
7
12
  import * as _cosmjs_cosmwasm_stargate from '@cosmjs/cosmwasm-stargate';
8
13
  import { SigningCosmWasmClient, InstantiateOptions, CosmWasmClient, InstantiateResult, ExecuteResult, SigningCosmWasmClientOptions } from '@cosmjs/cosmwasm-stargate';
9
14
  import { SigningStargateClient, StdFee, DeliverTxResponse, QueryClient, StakingExtension, StargateClient, SigningStargateClientOptions } from '@cosmjs/stargate';
10
15
  import { Height } from 'cosmjs-types/ibc/core/client/v1/client';
11
- import * as _tanstack_react_query from '@tanstack/react-query';
12
- import { UseQueryResult } from '@tanstack/react-query';
13
16
  import { BondStatusString } from '@cosmjs/stargate/build/modules/staking/queries';
14
17
  import { QueryValidatorsResponse } from 'cosmjs-types/cosmos/staking/v1beta1/query';
15
18
  import { ReactNode, FC } from 'react';
@@ -124,22 +127,6 @@ interface SuggestChainAndConnectArgs {
124
127
  }
125
128
  declare const suggestChainAndConnect: (args: SuggestChainAndConnectArgs) => Promise<ConnectResult>;
126
129
 
127
- /**
128
- * Para Web SDK client type (compatible with ParaWeb from @getpara/web-sdk)
129
- * This represents the main Para class for web interactions
130
- *
131
- * Note: Users must install @getpara/graz-integration to use Para wallet functionality
132
- *
133
- * Note: This interface only defines the minimum required properties.
134
- * The actual Para class may have additional methods and properties.
135
- */
136
- interface ParaWeb {
137
- isReady: boolean;
138
- isFarcasterMiniApp: boolean;
139
- ready(): Promise<void>;
140
- isPasskeySupported(): Promise<boolean>;
141
- logout(): Promise<void>;
142
- }
143
130
  /**
144
131
  * Para wallet entity (compatible with Wallet from @getpara/core-sdk)
145
132
  * Represents a wallet within the Para ecosystem (different from Graz Wallet)
@@ -170,15 +157,9 @@ interface ParaWallet {
170
157
  }
171
158
  /**
172
159
  * Event callbacks for Para wallet connector lifecycle events
160
+ * Extracted from @getpara/graz-connector ParaGrazConfig
173
161
  */
174
- interface ParaGrazConnectorEvents {
175
- /**
176
- * Called when chains are successfully enabled in the Para connector
177
- * @param chainIds - Array of enabled chain IDs
178
- * @param connector - The initialized Para connector instance
179
- */
180
- onEnabled?: (chainIds: string[], connector: any) => void;
181
- }
162
+ type ParaGrazConnectorEvents = NonNullable<ParaGrazConfig$1["events"]>;
182
163
  /**
183
164
  * Modal props for Para wallet UI
184
165
  * Compatible with ParaModalProps from @getpara/react-sdk-lite
@@ -229,7 +210,7 @@ interface ParaGrazConfig {
229
210
  * Should match the client used in your app's QueryClientProvider
230
211
  * Only needed when using @getpara/graz-integration with modal support
231
212
  */
232
- queryClient?: unknown;
213
+ queryClient?: _tanstack_react_query.QueryClient;
233
214
  }
234
215
  /**
235
216
  * Para wallet connector interface
@@ -1800,4 +1781,4 @@ declare const useGrazEvents: () => null;
1800
1781
  */
1801
1782
  declare const GrazEvents: FC;
1802
1783
 
1803
- export { type ActionChainId, type AddChainArgs, type CactusCosmosWallet, type ConfigureGrazArgs, type ConnectArgs, type ConnectResult, type Dictionary, type ExecuteContractArgs, type ExecuteContractMutationArgs, GrazEvents, GrazProvider, type GrazProviderProps, type InstantiateContractArgs, type InstantiateContractMutationArgs, type Key, type KnownKeys, type Maybe, type OfflineSigners, type ParaGrazConfig, type ParaGrazConnector, type ParaGrazConnectorEvents, type ParaModalProps, type ParaWallet, type ParaWeb, 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, connect, defineChainInfo, defineChains, disconnect, executeContract, getAvailableWallets, getCactusCosmos, getChainInfo, getChainInfos, getCosmostation, getKeplr, getLeap, getMetamaskSnapLeap, getOfflineSigners, getOkx, getPara, getQueryRaw, getQuerySmart, getRecentChainIds, getRecentChains, getVectis, getWCCosmostation, getWCKeplr, getWCLeap, getWallet, getWalletConnect, instantiateContract, isLeapDappBrowser, isLeapSnaps, isPara, isWalletConnect, reconnect, sendIbcTokens, sendTokens, 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, useStargateClient, useStargateSigningClient, useSuggestChain, useSuggestChainAndConnect };
1784
+ export { type ActionChainId, type AddChainArgs, type CactusCosmosWallet, type ConfigureGrazArgs, type ConnectArgs, type ConnectResult, type Dictionary, type ExecuteContractArgs, type ExecuteContractMutationArgs, GrazEvents, GrazProvider, type GrazProviderProps, type InstantiateContractArgs, type InstantiateContractMutationArgs, type Key, type KnownKeys, 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, connect, defineChainInfo, defineChains, disconnect, executeContract, getAvailableWallets, getCactusCosmos, getChainInfo, getChainInfos, getCosmostation, getKeplr, getLeap, getMetamaskSnapLeap, getOfflineSigners, getOkx, getPara, getQueryRaw, getQuerySmart, getRecentChainIds, getRecentChains, getVectis, getWCCosmostation, getWCKeplr, getWCLeap, getWallet, getWalletConnect, instantiateContract, isLeapDappBrowser, isLeapSnaps, isPara, isWalletConnect, reconnect, sendIbcTokens, sendTokens, 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, useStargateClient, useStargateSigningClient, useSuggestChain, useSuggestChainAndConnect };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "graz",
3
3
  "description": "React hooks for Cosmos",
4
- "version": "0.4.0-alpha.2",
4
+ "version": "0.4.0-alpha.3",
5
5
  "author": "Nur Fikri <kikiding.space@gmail.com>",
6
6
  "repository": "https://github.com/graz-sh/graz.git",
7
7
  "homepage": "https://github.com/graz-sh/graz",
@@ -33,19 +33,6 @@
33
33
  "env.d.ts"
34
34
  ],
35
35
  "sideEffects": false,
36
- "scripts": {
37
- "build": "tsup",
38
- "clean": "rm -rf dist/*",
39
- "cli": "node dist/cli.js",
40
- "dev": "tsup --watch",
41
- "lint": "eslint --fix \"src/**/*.{ts,tsx}\"",
42
- "prepublishOnly": "pnpm build",
43
- "test": "vitest run",
44
- "test:cli": "vitest run src/__tests__/cli.test.ts",
45
- "test:watch": "vitest",
46
- "test:ui": "vitest --ui",
47
- "type-check": "tsc --noEmit"
48
- },
49
36
  "peerDependencies": {
50
37
  "@tanstack/react-query": ">=5.0.0",
51
38
  "react": ">=17",
@@ -72,6 +59,8 @@
72
59
  "zustand": "5.0.4"
73
60
  },
74
61
  "devDependencies": {
62
+ "@getpara/graz-connector": "2.0.0-alpha.51",
63
+ "@getpara/web-sdk": "2.0.0-alpha.51",
75
64
  "@types/node": "^18.17.15",
76
65
  "@types/react": "^18.2.21",
77
66
  "@vitest/ui": "^1.0.0",
@@ -89,5 +78,17 @@
89
78
  "graz-sh",
90
79
  "use-keplr"
91
80
  ],
92
- "license": "MIT"
93
- }
81
+ "license": "MIT",
82
+ "scripts": {
83
+ "build": "tsup",
84
+ "clean": "rm -rf dist/*",
85
+ "cli": "node dist/cli.js",
86
+ "dev": "tsup --watch",
87
+ "lint": "eslint --fix \"src/**/*.{ts,tsx}\"",
88
+ "test": "vitest run",
89
+ "test:cli": "vitest run src/__tests__/cli.test.ts",
90
+ "test:watch": "vitest",
91
+ "test:ui": "vitest --ui",
92
+ "type-check": "tsc --noEmit"
93
+ }
94
+ }