@avalabs/avacloud-waas-react 1.0.10 → 1.0.14-nightly.20250704

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/README.md CHANGED
@@ -73,9 +73,9 @@ The main provider component that wraps your application and provides wallet cont
73
73
 
74
74
  ```tsx
75
75
  <AvaCloudWalletProvider
76
- orgId="your-avacloud-org-id" // Required
77
- chainId={43113}
78
- darkMode={false}
76
+ orgId="your-avacloud-org-id" // Required - your AvaCloud organization ID
77
+ chainId={43113} // Optional - defaults to Avalanche Fuji Testnet
78
+ darkMode={false} // Optional - theme mode for UI components
79
79
  onAuthSuccess={(user) => console.log('Auth success', user)}
80
80
  onAuthError={(error) => console.error('Auth error', error)}
81
81
  onWalletUpdate={(wallet) => console.log('Wallet updated', wallet)}
@@ -88,13 +88,13 @@ The main provider component that wraps your application and provides wallet cont
88
88
 
89
89
  | Prop | Type | Description |
90
90
  |------|------|-------------|
91
- | `orgId` | `string` | Required AvaCloud organization ID |
92
- | `env` | `'local' \| 'development' \| 'prod'` | (Optional) Environment to use. Defaults to 'prod'. |
93
- | `chainId` | `number` | (Optional) EVM chain ID to use (defaults to Avalanche Fuji Testnet - 43113) |
94
- | `darkMode` | `boolean` | (Optional) Whether to use dark mode for UI components |
95
- | `onAuthSuccess` | `(user: Auth0User) => void` | (Optional) Callback called when authentication is successful |
96
- | `onAuthError` | `(error: Error) => void` | (Optional) Callback called when authentication fails |
97
- | `onWalletUpdate` | `(wallet: WalletInfo) => void` | (Optional) Callback called when wallet information is updated |
91
+ | `orgId` | `string` | **Required** - Your AvaCloud organization ID used to fetch wallet configuration |
92
+ | `env` | `'local' \| 'development' \| 'prod'` | Environment to use (default: `'prod'`) |
93
+ | `chainId` | `number` | EVM chain ID (default: `43113` - Avalanche Fuji Testnet) |
94
+ | `darkMode` | `boolean` | Enable dark mode for UI components (default: `false`) |
95
+ | `onAuthSuccess` | `(user: Auth0User) => void` | Callback on successful authentication |
96
+ | `onAuthError` | `(error: Error) => void` | Callback on authentication error |
97
+ | `onWalletUpdate` | `(wallet: WalletInfo) => void` | Callback when wallet information updates |
98
98
 
99
99
  ### UI Components
100
100
 
@@ -209,6 +209,176 @@ Hook for accessing and setting the current chain ID.
209
209
  const { chainId, setChainId } = useChainId();
210
210
  ```
211
211
 
212
+ ### useGaslessTransaction
213
+
214
+ Hook for sending gasless (meta-)transactions through AvaCloud's gas relayer.
215
+
216
+ ```tsx
217
+ import { useGaslessTransaction, useGlacier } from '@avalabs/avacloud-waas-react';
218
+
219
+ function CounterExample() {
220
+ // Retrieve the current subnet RPC URL from Glacier
221
+ const { blockchain } = useGlacier();
222
+
223
+ const gaslessConfig = {
224
+ relayerUrl: 'https://gas-relayer.avax-test.network/printedapr/testnet/rpc', // AvaCloud relayer RPC
225
+ subnetRpcUrl: blockchain?.rpcUrl || '', // Target subnet RPC
226
+ forwarderAddress: '0x52ec85e43d09889b2bf9e431935356e06f023680', // AvaCloud forwarder
227
+ domainName: 'Counter',
228
+ domainVersion: '1',
229
+ requestType: 'Message',
230
+ suffixType: 'bytes32', // Optional – request suffix type
231
+ suffixName: 'XMKUCJONOFSUSFCYHTYHCLX', // Optional – request suffix name
232
+ } as const;
233
+
234
+ // Counter contract information
235
+ const COUNTER_CONTRACT_ADDRESS = '0xe4bB5F15dc278197FcE9B21e5aC0442a95e25b5f';
236
+ const COUNTER_INCREMENT_ABI = [
237
+ {
238
+ inputs: [],
239
+ name: 'increment',
240
+ outputs: [],
241
+ stateMutability: 'nonpayable',
242
+ type: 'function',
243
+ },
244
+ ] as const;
245
+
246
+ const {
247
+ sendGaslessTransaction,
248
+ isLoading,
249
+ error,
250
+ txHash,
251
+ reset,
252
+ } = useGaslessTransaction({
253
+ gaslessConfig,
254
+ contractAddress: COUNTER_CONTRACT_ADDRESS,
255
+ abi: COUNTER_INCREMENT_ABI,
256
+ });
257
+
258
+ const handleIncrement = () =>
259
+ sendGaslessTransaction({ functionName: 'increment' });
260
+
261
+ return (
262
+ <div>
263
+ <button onClick={handleIncrement} disabled={isLoading}>
264
+ Increment counter (no gas)
265
+ </button>
266
+
267
+ {isLoading && <p>Sending transaction…</p>}
268
+ {txHash && <p>Transaction hash: {txHash}</p>}
269
+ {error && <p style={{ color: 'red' }}>{error}</p>}
270
+
271
+ <button onClick={reset}>Reset</button>
272
+ </div>
273
+ );
274
+ }
275
+ ```
276
+
277
+ **Parameters returned by the hook**
278
+
279
+ | Property | Type | Description |
280
+ |----------|------|-------------|
281
+ | `sendGaslessTransaction` | `(params: { functionName: string; args?: unknown[]; abi?: unknown; contractAddress?: string }) => Promise<void>` | Sends the meta-transaction |
282
+ | `isLoading` | `boolean` | `true` while the transaction is being prepared or broadcast |
283
+ | `error` | `string \| null` | Error message, if any |
284
+ | `txHash` | `string \| null` | Transaction hash once broadcast |
285
+ | `reset` | `() => void` | Resets the hook state |
286
+
287
+
288
+ ## WAGMI Integration
289
+
290
+ This SDK includes a WAGMI connector that allows you to use AvaCloud wallets with WAGMI (React Ethereum Library).
291
+
292
+ ### Prerequisites
293
+
294
+ Install the required WAGMI dependencies:
295
+
296
+ ```bash
297
+ npm install wagmi viem@2.x @tanstack/react-query
298
+ ```
299
+
300
+ ### Setting up WAGMI with AvaCloud
301
+
302
+ ```tsx
303
+ import { WagmiProvider, createConfig } from 'wagmi';
304
+ import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
305
+ import { avaCloudWallet } from '@avalabs/avacloud-waas-react';
306
+ import { avalancheFuji } from 'wagmi/chains';
307
+ import { http } from 'wagmi';
308
+
309
+ const queryClient = new QueryClient();
310
+
311
+ const config = createConfig({
312
+ chains: [avalancheFuji],
313
+ connectors: [
314
+ avaCloudWallet(),
315
+ ],
316
+ transports: {
317
+ [avalancheFuji.id]: http(),
318
+ },
319
+ });
320
+
321
+ function App() {
322
+ return (
323
+ <QueryClientProvider client={queryClient}>
324
+ <WagmiProvider config={config}>
325
+ <AvaCloudWalletProvider orgId="your-avacloud-org-id">
326
+ <YourApp />
327
+ </AvaCloudWalletProvider>
328
+ </WagmiProvider>
329
+ </QueryClientProvider>
330
+ );
331
+ }
332
+ ```
333
+
334
+ ### Using WAGMI Hooks
335
+
336
+ Once configured, use standard WAGMI hooks with your AvaCloud wallet:
337
+
338
+ ```tsx
339
+ import { useAccount, useConnect, useDisconnect, useSignMessage } from 'wagmi';
340
+
341
+ function WagmiExample() {
342
+ const { address, isConnected } = useAccount();
343
+ const { connect, connectors } = useConnect();
344
+ const { disconnect } = useDisconnect();
345
+ const { signMessage } = useSignMessage();
346
+
347
+ const handleConnect = () => {
348
+ const avaCloudConnector = connectors.find(c => c.id === 'avaCloudWallet');
349
+ if (avaCloudConnector) {
350
+ connect({ connector: avaCloudConnector });
351
+ }
352
+ };
353
+
354
+ const handleSign = async () => {
355
+ const signature = await signMessage({ message: 'Hello from WAGMI!' });
356
+ console.log('Signature:', signature);
357
+ };
358
+
359
+ return (
360
+ <div>
361
+ {isConnected ? (
362
+ <>
363
+ <p>Connected: {address}</p>
364
+ <button onClick={() => disconnect()}>Disconnect</button>
365
+ <button onClick={handleSign}>Sign Message</button>
366
+ </>
367
+ ) : (
368
+ <button onClick={handleConnect}>Connect AvaCloud Wallet</button>
369
+ )}
370
+ </div>
371
+ );
372
+ }
373
+ ```
374
+
375
+ ### Important Notes
376
+
377
+ - The AvaCloud WAGMI connector requires the `AvaCloudWalletProvider` to be present in your component tree
378
+ - Authentication is still managed through the AvaCloud SDK's authentication flow
379
+ - The connector automatically syncs with the wallet state from `AvaCloudWalletProvider`
380
+ - All standard WAGMI hooks and functionality are supported
381
+
212
382
  ## Advanced Usage
213
383
 
214
384
  ### Theme Customization
@@ -274,30 +444,4 @@ We welcome contributions! Please see [CONTRIBUTING.md](https://github.com/ava-la
274
444
 
275
445
  ## License
276
446
 
277
- MIT © [Ava Labs, Inc.](https://github.com/ava-labs)
278
-
279
- ## Using the AvaCloud Organization ID
280
-
281
- The `AvaCloudWalletProvider` requires an AvaCloud organization ID (`orgId`). This is used to fetch the organization configuration from the AvaCloud API, which includes the mapping to the appropriate wallet service organization ID used for wallet operations.
282
-
283
- ```jsx
284
- import { AvaCloudWalletProvider } from '@avalabs/avacloud-waas-react';
285
-
286
- function App() {
287
- return (
288
- <AvaCloudWalletProvider
289
- orgId="your-avacloud-org-id" // Required AvaCloud organization ID
290
- >
291
- <YourApp />
292
- </AvaCloudWalletProvider>
293
- );
294
- }
295
- ```
296
-
297
- When provided, the `orgId` will be used to:
298
-
299
- 1. Fetch the organization configuration from the AvaCloud API
300
- 2. Map to the appropriate wallet service organization ID
301
- 3. Use the mapped ID for wallet operations
302
-
303
- This enables organizations to have their AvaCloud identity seamlessly map to their WaaS wallets.
447
+ MIT © [Ava Labs, Inc.](https://github.com/ava-labs)
package/dist/index.d.mts CHANGED
@@ -1,9 +1,11 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as _cubist_labs_cubesigner_sdk from '@cubist-labs/cubesigner-sdk';
3
- import { IdentityProof, CubeSignerClient } from '@cubist-labs/cubesigner-sdk';
4
- import { PropsWithChildren, ButtonHTMLAttributes } from 'react';
3
+ import { CubeSignerClient, IdentityProof } from '@cubist-labs/cubesigner-sdk';
4
+ import { PropsWithChildren, ButtonHTMLAttributes, ReactNode } from 'react';
5
5
  import { ButtonProps } from '@avalabs/core-k2-components';
6
- import { Hex, TransactionRequest, Signature, Hash } from 'viem';
6
+ import { Hex, Signature, TransactionRequest, Hash } from 'viem';
7
+ import * as _tanstack_react_query_build_legacy_types from '@tanstack/react-query/build/legacy/types';
8
+ import { CreateConnectorFn } from '@wagmi/core';
7
9
 
8
10
  /**
9
11
  * Cubist wallet information
@@ -365,6 +367,32 @@ interface WalletCardProps {
365
367
  }
366
368
  declare function WalletCard({ onClose }: WalletCardProps): react_jsx_runtime.JSX.Element | null;
367
369
 
370
+ interface BlockchainData {
371
+ chainId: string;
372
+ chainName: string;
373
+ description: string;
374
+ platformChainId: string;
375
+ subnetId: string;
376
+ vmId: string;
377
+ vmName: string;
378
+ explorerUrl: string;
379
+ rpcUrl: string;
380
+ wsUrl: string;
381
+ isTestnet: boolean;
382
+ utilityAddresses: {
383
+ multicall: string;
384
+ };
385
+ networkToken: {
386
+ name: string;
387
+ symbol: string;
388
+ decimals: number;
389
+ logoUri: string;
390
+ description: string;
391
+ };
392
+ chainLogoUri: string;
393
+ private: boolean;
394
+ enabledFeatures: string[];
395
+ }
368
396
  interface TokenReputation {
369
397
  verified: boolean;
370
398
  popular: boolean;
@@ -518,4 +546,77 @@ interface UseUserWalletsResult {
518
546
  }
519
547
  declare function useUserWallets(): UseUserWalletsResult;
520
548
 
521
- export { type AddAccountMessage, type AdminPortalSettings, type Auth0User, type AuthMessage, type AuthMessagePayload, type AuthStateUpdateMessage, type AuthStatusMessage, type AvaCloudEnvironment, type AvaCloudWalletContextType, AvaCloudWalletProvider, type AvaCloudWalletProviderProps, type BaseAuthMessage, type CheckAuthStatusMessage, type CubistWalletInfo, type ErrorMessage, ExportView, type GetOidcMessage, type IframeReadyMessage, LoginButton, type LoginRequestMessage, type LogoutRequestMessage, type MessageType, type OrgConfig, type ReceiveOidcMessage, ReceiveView, type RegisterMessage, type RegisterPayload, type RegisterSuccessMessage, SendView, type SignupRequestMessage, ThemeProvider, TokensView, type UserInfo, UserProfile, VM, WalletButton, WalletCard, WalletDisplay, type WalletInfo, type WalletKeysErrorMessage, type WalletKeysUpdateMessage, useAuth, useAvaCloudWallet, useChainId, usePostMessage, useSignMessage, useSignTransaction, useThemeMode, useTransferTokens, useUserWallets };
549
+ declare function useGlacier(): {
550
+ balance: string;
551
+ isLoadingBalance: boolean;
552
+ currencySymbol: string;
553
+ blockchain: BlockchainData | undefined;
554
+ };
555
+ declare function useBlockchain(chainId: string): _tanstack_react_query_build_legacy_types.UseQueryResult<BlockchainData, Error>;
556
+
557
+ declare function avaCloudWallet(): CreateConnectorFn;
558
+
559
+ interface GaslessConfig {
560
+ /** URL of the AvaCloud gasless relayer RPC endpoint */
561
+ relayerUrl: string;
562
+ /** Public JSON-RPC endpoint of the target subnet */
563
+ subnetRpcUrl: string;
564
+ /** Forwarder contract address provided by AvaCloud */
565
+ forwarderAddress: string;
566
+ /** EIP-712 domain name, e.g. "domain" */
567
+ domainName: string;
568
+ /** EIP-712 domain version, e.g. "1" */
569
+ domainVersion: string;
570
+ /** Primary type for the request, e.g. "Message" */
571
+ requestType: string;
572
+ /** Suffix for the request in format "type name" (e.g. "bytes32 XMKUCJONOFSUSFCYHTYHCLX") */
573
+ suffix?: string;
574
+ }
575
+ interface FetchGaslessConfigParams {
576
+ orgId: string;
577
+ subnetId: string;
578
+ }
579
+ interface GaslessProviderProps {
580
+ children: ReactNode;
581
+ /** Optional pre-fetched config (skip network fetch when supplied) */
582
+ config?: GaslessConfig;
583
+ /** Parameters required to fetch config from the auth service */
584
+ fetchParams?: FetchGaslessConfigParams;
585
+ }
586
+ /**
587
+ * GaslessProvider – supplies gasless relayer configuration to hooks
588
+ *
589
+ * NOTE: For security reasons, this provider expects the configuration to be
590
+ * provided by the integrator. The intention is that your backend (or
591
+ * another trusted environment) fetches the relayer configuration via
592
+ * AvaCloud's internal endpoint and forwards the non-sensitive parts
593
+ * (relayer URL, forwarder address, etc.) to the browser.
594
+ */
595
+ declare function GaslessProvider({ children, config, fetchParams }: GaslessProviderProps): react_jsx_runtime.JSX.Element;
596
+
597
+ interface GaslessTxState {
598
+ isLoading: boolean;
599
+ error: string | null;
600
+ txHash: string | null;
601
+ }
602
+ interface SendGaslessTransactionParams {
603
+ functionName: string;
604
+ args?: unknown[];
605
+ abi?: unknown;
606
+ contractAddress?: string;
607
+ }
608
+ interface UseGaslessTransactionReturn extends GaslessTxState {
609
+ sendGaslessTransaction: (params: SendGaslessTransactionParams) => Promise<void>;
610
+ reset: () => void;
611
+ }
612
+ interface UseGaslessTransactionOptions {
613
+ /** Gasless transaction configuration */
614
+ gaslessConfig: GaslessConfig;
615
+ /** Default contract address (can be overridden per call) */
616
+ contractAddress?: string;
617
+ /** Default ABI (can be overridden per call) */
618
+ abi?: unknown;
619
+ }
620
+ declare function useGaslessTransaction({ gaslessConfig, contractAddress: defaultContractAddress, abi: defaultAbi }: UseGaslessTransactionOptions): UseGaslessTransactionReturn;
621
+
622
+ export { type AddAccountMessage, type AdminPortalSettings, type Auth0User, type AuthMessage, type AuthMessagePayload, type AuthStateUpdateMessage, type AuthStatusMessage, type AvaCloudEnvironment, type AvaCloudWalletContextType, AvaCloudWalletProvider, type AvaCloudWalletProviderProps, type BaseAuthMessage, type CheckAuthStatusMessage, type CubistWalletInfo, type ErrorMessage, ExportView, GaslessProvider, type GetOidcMessage, type IframeReadyMessage, LoginButton, type LoginRequestMessage, type LogoutRequestMessage, type MessageType, type OrgConfig, type ReceiveOidcMessage, ReceiveView, type RegisterMessage, type RegisterPayload, type RegisterSuccessMessage, SendView, type SignupRequestMessage, ThemeProvider, TokensView, type UserInfo, UserProfile, VM, WalletButton, WalletCard, WalletDisplay, type WalletInfo, type WalletKeysErrorMessage, type WalletKeysUpdateMessage, avaCloudWallet, useAuth, useAvaCloudWallet, useBlockchain, useChainId, useGaslessTransaction, useGlacier, usePostMessage, useSignMessage, useSignTransaction, useThemeMode, useTransferTokens, useUserWallets };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as _cubist_labs_cubesigner_sdk from '@cubist-labs/cubesigner-sdk';
3
- import { IdentityProof, CubeSignerClient } from '@cubist-labs/cubesigner-sdk';
4
- import { PropsWithChildren, ButtonHTMLAttributes } from 'react';
3
+ import { CubeSignerClient, IdentityProof } from '@cubist-labs/cubesigner-sdk';
4
+ import { PropsWithChildren, ButtonHTMLAttributes, ReactNode } from 'react';
5
5
  import { ButtonProps } from '@avalabs/core-k2-components';
6
- import { Hex, TransactionRequest, Signature, Hash } from 'viem';
6
+ import { Hex, Signature, TransactionRequest, Hash } from 'viem';
7
+ import * as _tanstack_react_query_build_legacy_types from '@tanstack/react-query/build/legacy/types';
8
+ import { CreateConnectorFn } from '@wagmi/core';
7
9
 
8
10
  /**
9
11
  * Cubist wallet information
@@ -365,6 +367,32 @@ interface WalletCardProps {
365
367
  }
366
368
  declare function WalletCard({ onClose }: WalletCardProps): react_jsx_runtime.JSX.Element | null;
367
369
 
370
+ interface BlockchainData {
371
+ chainId: string;
372
+ chainName: string;
373
+ description: string;
374
+ platformChainId: string;
375
+ subnetId: string;
376
+ vmId: string;
377
+ vmName: string;
378
+ explorerUrl: string;
379
+ rpcUrl: string;
380
+ wsUrl: string;
381
+ isTestnet: boolean;
382
+ utilityAddresses: {
383
+ multicall: string;
384
+ };
385
+ networkToken: {
386
+ name: string;
387
+ symbol: string;
388
+ decimals: number;
389
+ logoUri: string;
390
+ description: string;
391
+ };
392
+ chainLogoUri: string;
393
+ private: boolean;
394
+ enabledFeatures: string[];
395
+ }
368
396
  interface TokenReputation {
369
397
  verified: boolean;
370
398
  popular: boolean;
@@ -518,4 +546,77 @@ interface UseUserWalletsResult {
518
546
  }
519
547
  declare function useUserWallets(): UseUserWalletsResult;
520
548
 
521
- export { type AddAccountMessage, type AdminPortalSettings, type Auth0User, type AuthMessage, type AuthMessagePayload, type AuthStateUpdateMessage, type AuthStatusMessage, type AvaCloudEnvironment, type AvaCloudWalletContextType, AvaCloudWalletProvider, type AvaCloudWalletProviderProps, type BaseAuthMessage, type CheckAuthStatusMessage, type CubistWalletInfo, type ErrorMessage, ExportView, type GetOidcMessage, type IframeReadyMessage, LoginButton, type LoginRequestMessage, type LogoutRequestMessage, type MessageType, type OrgConfig, type ReceiveOidcMessage, ReceiveView, type RegisterMessage, type RegisterPayload, type RegisterSuccessMessage, SendView, type SignupRequestMessage, ThemeProvider, TokensView, type UserInfo, UserProfile, VM, WalletButton, WalletCard, WalletDisplay, type WalletInfo, type WalletKeysErrorMessage, type WalletKeysUpdateMessage, useAuth, useAvaCloudWallet, useChainId, usePostMessage, useSignMessage, useSignTransaction, useThemeMode, useTransferTokens, useUserWallets };
549
+ declare function useGlacier(): {
550
+ balance: string;
551
+ isLoadingBalance: boolean;
552
+ currencySymbol: string;
553
+ blockchain: BlockchainData | undefined;
554
+ };
555
+ declare function useBlockchain(chainId: string): _tanstack_react_query_build_legacy_types.UseQueryResult<BlockchainData, Error>;
556
+
557
+ declare function avaCloudWallet(): CreateConnectorFn;
558
+
559
+ interface GaslessConfig {
560
+ /** URL of the AvaCloud gasless relayer RPC endpoint */
561
+ relayerUrl: string;
562
+ /** Public JSON-RPC endpoint of the target subnet */
563
+ subnetRpcUrl: string;
564
+ /** Forwarder contract address provided by AvaCloud */
565
+ forwarderAddress: string;
566
+ /** EIP-712 domain name, e.g. "domain" */
567
+ domainName: string;
568
+ /** EIP-712 domain version, e.g. "1" */
569
+ domainVersion: string;
570
+ /** Primary type for the request, e.g. "Message" */
571
+ requestType: string;
572
+ /** Suffix for the request in format "type name" (e.g. "bytes32 XMKUCJONOFSUSFCYHTYHCLX") */
573
+ suffix?: string;
574
+ }
575
+ interface FetchGaslessConfigParams {
576
+ orgId: string;
577
+ subnetId: string;
578
+ }
579
+ interface GaslessProviderProps {
580
+ children: ReactNode;
581
+ /** Optional pre-fetched config (skip network fetch when supplied) */
582
+ config?: GaslessConfig;
583
+ /** Parameters required to fetch config from the auth service */
584
+ fetchParams?: FetchGaslessConfigParams;
585
+ }
586
+ /**
587
+ * GaslessProvider – supplies gasless relayer configuration to hooks
588
+ *
589
+ * NOTE: For security reasons, this provider expects the configuration to be
590
+ * provided by the integrator. The intention is that your backend (or
591
+ * another trusted environment) fetches the relayer configuration via
592
+ * AvaCloud's internal endpoint and forwards the non-sensitive parts
593
+ * (relayer URL, forwarder address, etc.) to the browser.
594
+ */
595
+ declare function GaslessProvider({ children, config, fetchParams }: GaslessProviderProps): react_jsx_runtime.JSX.Element;
596
+
597
+ interface GaslessTxState {
598
+ isLoading: boolean;
599
+ error: string | null;
600
+ txHash: string | null;
601
+ }
602
+ interface SendGaslessTransactionParams {
603
+ functionName: string;
604
+ args?: unknown[];
605
+ abi?: unknown;
606
+ contractAddress?: string;
607
+ }
608
+ interface UseGaslessTransactionReturn extends GaslessTxState {
609
+ sendGaslessTransaction: (params: SendGaslessTransactionParams) => Promise<void>;
610
+ reset: () => void;
611
+ }
612
+ interface UseGaslessTransactionOptions {
613
+ /** Gasless transaction configuration */
614
+ gaslessConfig: GaslessConfig;
615
+ /** Default contract address (can be overridden per call) */
616
+ contractAddress?: string;
617
+ /** Default ABI (can be overridden per call) */
618
+ abi?: unknown;
619
+ }
620
+ declare function useGaslessTransaction({ gaslessConfig, contractAddress: defaultContractAddress, abi: defaultAbi }: UseGaslessTransactionOptions): UseGaslessTransactionReturn;
621
+
622
+ export { type AddAccountMessage, type AdminPortalSettings, type Auth0User, type AuthMessage, type AuthMessagePayload, type AuthStateUpdateMessage, type AuthStatusMessage, type AvaCloudEnvironment, type AvaCloudWalletContextType, AvaCloudWalletProvider, type AvaCloudWalletProviderProps, type BaseAuthMessage, type CheckAuthStatusMessage, type CubistWalletInfo, type ErrorMessage, ExportView, GaslessProvider, type GetOidcMessage, type IframeReadyMessage, LoginButton, type LoginRequestMessage, type LogoutRequestMessage, type MessageType, type OrgConfig, type ReceiveOidcMessage, ReceiveView, type RegisterMessage, type RegisterPayload, type RegisterSuccessMessage, SendView, type SignupRequestMessage, ThemeProvider, TokensView, type UserInfo, UserProfile, VM, WalletButton, WalletCard, WalletDisplay, type WalletInfo, type WalletKeysErrorMessage, type WalletKeysUpdateMessage, avaCloudWallet, useAuth, useAvaCloudWallet, useBlockchain, useChainId, useGaslessTransaction, useGlacier, usePostMessage, useSignMessage, useSignTransaction, useThemeMode, useTransferTokens, useUserWallets };