@rhinestone/1auth 0.1.1 → 0.4.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 CHANGED
@@ -1,6 +1,6 @@
1
- import { O as OneAuthClient, I as IntentSigner, W as WebAuthnSignature, a as IntentCall, S as SendIntentResult } from './client-B-HGKKaJ.mjs';
2
- export { A as AuthenticateOptions, k as AuthenticateResult, B as BalanceRequirement, z as CloseOnStatus, C as CreateSigningRequestResponse, p as EIP712Domain, r as EIP712TypeField, q as EIP712Types, E as EmbedOptions, F as ExecuteIntentResponse, w as IntentQuote, x as IntentStatus, u as IntentTokenRequest, L as LoginOptions, j as LoginResult, M as MerchantSignedIntent, y as OrchestratorStatus, h as PasskeyCredential, P as PasskeyProviderConfig, D as PrepareIntentResponse, R as RegisterOptions, i as RegisterResult, v as SendIntentOptions, G as SendSwapOptions, H as SendSwapResult, l as SignMessageOptions, m as SignMessageResult, n as SignTypedDataOptions, o as SignTypedDataResult, e as SigningError, f as SigningErrorCode, b as SigningRequestOptions, g as SigningRequestStatus, c as SigningResult, d as SigningSuccess, J as SwapQuote, K as ThemeConfig, T as TransactionAction, t as TransactionDetails, s as TransactionFees, U as UserPasskeysResponse } from './client-B-HGKKaJ.mjs';
3
- export { P as PasskeyProvider, a as PasskeyProviderOptions, c as createPasskeyProvider } from './provider-CDIRlA4y.mjs';
1
+ import { O as OneAuthClient, I as IntentSigner, W as WebAuthnSignature, a as IntentCall, S as SendIntentResult } from './client-DKuPEx83.mjs';
2
+ export { A as AuthenticateOptions, l as AuthenticateResult, B as BalanceRequirement, a3 as BatchIntentItem, a6 as BatchIntentItemResult, $ as CheckConsentOptions, a0 as CheckConsentResult, F as CloseOnStatus, k as ConnectResult, _ as ConsentData, Z as ConsentField, C as CreateSigningRequestResponse, D as DeveloperSignedIntent, q as EIP712Domain, s as EIP712TypeField, r as EIP712Types, E as EmbedOptions, H as ExecuteIntentResponse, K as IntentHistoryItem, J as IntentHistoryOptions, N as IntentHistoryResult, x as IntentQuote, y as IntentStatus, v as IntentTokenRequest, L as LoginOptions, j as LoginResult, M as MerchantSignedIntent, z as OrchestratorStatus, h as PasskeyCredential, P as PasskeyProviderConfig, a8 as PrepareBatchIntentResponse, G as PrepareIntentResponse, a7 as PreparedBatchIntent, R as RegisterOptions, i as RegisterResult, a1 as RequestConsentOptions, a2 as RequestConsentResult, a4 as SendBatchIntentOptions, a5 as SendBatchIntentResult, w as SendIntentOptions, Q as SendSwapOptions, V as SendSwapResult, m as SignMessageOptions, n as SignMessageResult, o as SignTypedDataOptions, p as SignTypedDataResult, e as SigningError, f as SigningErrorCode, b as SigningRequestOptions, g as SigningRequestStatus, c as SigningResult, d as SigningSuccess, X as SwapQuote, Y as ThemeConfig, T as TransactionAction, u as TransactionDetails, t as TransactionFees, U as UserPasskeysResponse } from './client-DKuPEx83.mjs';
3
+ export { O as OneAuthProvider, b as OneAuthProviderOptions, P as PasskeyProvider, d as PasskeyProviderOptions, c as createOneAuthProvider, a as createPasskeyProvider } from './provider-CmJarV7y.mjs';
4
4
  import { Address, LocalAccount, Chain, Transport, Hex, WalletClient, Hash } from 'viem';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import * as React from 'react';
@@ -28,7 +28,7 @@ interface PasskeyWalletClientConfig {
28
28
  clientId: string;
29
29
  /** Optional URL of the dialog UI */
30
30
  dialogUrl?: string;
31
- /** Optional signer for merchant-protected intents */
31
+ /** Optional signer for developer-protected intents */
32
32
  signIntent?: IntentSigner;
33
33
  /** Chain configuration */
34
34
  chain: Chain;
@@ -64,6 +64,11 @@ interface SendCallsParams {
64
64
  calls: TransactionCall[];
65
65
  /** Optional chain id override */
66
66
  chainId?: number;
67
+ /** Optional token requests for orchestrator output (what tokens/amounts to deliver) */
68
+ tokenRequests?: {
69
+ token: string;
70
+ amount: bigint;
71
+ }[];
67
72
  }
68
73
 
69
74
  /**
@@ -223,18 +228,22 @@ declare function getTokenSymbol(tokenAddress: Address, chainId: number): string;
223
228
  declare function isTokenAddressSupported(tokenAddress: Address, chainId: number): boolean;
224
229
 
225
230
  /**
226
- * The domain separator prefix used for passkey message signing.
227
- * This ensures message signatures cannot be replayed for transaction signing.
231
+ * The EIP-191 prefix used for personal message signing.
232
+ * This is the standard Ethereum message prefix for `personal_sign`.
228
233
  */
229
- declare const PASSKEY_MESSAGE_PREFIX = "\u0019Passkey Signed Message:\n";
234
+ declare const ETHEREUM_MESSAGE_PREFIX = "\u0019Ethereum Signed Message:\n";
230
235
  /**
231
- * Hash a message with the passkey domain separator.
236
+ * @deprecated Use ETHEREUM_MESSAGE_PREFIX instead. Kept for backwards compatibility.
237
+ */
238
+ declare const PASSKEY_MESSAGE_PREFIX = "\u0019Ethereum Signed Message:\n";
239
+ /**
240
+ * Hash a message with the EIP-191 Ethereum prefix.
232
241
  *
233
242
  * This is the same hashing function used by the passkey sign dialog.
234
243
  * Use this to verify that the `signedHash` returned from `signMessage()`
235
244
  * matches your original message.
236
245
  *
237
- * Format: keccak256("\x19Passkey Signed Message:\n" + len + message)
246
+ * Format: keccak256("\x19Ethereum Signed Message:\n" + len + message)
238
247
  *
239
248
  * @example
240
249
  * ```typescript
@@ -268,4 +277,4 @@ declare function hashMessage(message: string): `0x${string}`;
268
277
  */
269
278
  declare function verifyMessageHash(message: string, signedHash: string | undefined): boolean;
270
279
 
271
- export { type BatchQueueContextValue, BatchQueueProvider, type BatchQueueProviderProps, BatchQueueWidget, type BatchQueueWidgetProps, type BatchedCall, type ChainFilterOptions, IntentCall, IntentSigner, OneAuthClient, PASSKEY_MESSAGE_PREFIX, type PasskeyAccount, OneAuthClient as PasskeyProviderClient, type PasskeyWalletClient, type PasskeyWalletClientConfig, type SendCallsParams, SendIntentResult, type TokenConfig, type TransactionCall, WebAuthnSignature, createPasskeyAccount, createPasskeyWalletClient, encodeWebAuthnSignature, getAllSupportedChainsAndTokens, getChainById, getChainExplorerUrl, getChainName, getChainRpcUrl, getSupportedChainIds, getSupportedChains, getSupportedTokenSymbols, getSupportedTokens, getTokenSymbol, hashCalls, hashMessage, isTestnet, isTokenAddressSupported, resolveTokenAddress, useBatchQueue, verifyMessageHash };
280
+ export { type BatchQueueContextValue, BatchQueueProvider, type BatchQueueProviderProps, BatchQueueWidget, type BatchQueueWidgetProps, type BatchedCall, type ChainFilterOptions, ETHEREUM_MESSAGE_PREFIX, IntentCall, IntentSigner, OneAuthClient, PASSKEY_MESSAGE_PREFIX, type PasskeyAccount, OneAuthClient as PasskeyProviderClient, type PasskeyWalletClient, type PasskeyWalletClientConfig, type SendCallsParams, SendIntentResult, type TokenConfig, type TransactionCall, WebAuthnSignature, createPasskeyAccount, createPasskeyWalletClient, encodeWebAuthnSignature, getAllSupportedChainsAndTokens, getChainById, getChainExplorerUrl, getChainName, getChainRpcUrl, getSupportedChainIds, getSupportedChains, getSupportedTokenSymbols, getSupportedTokens, getTokenSymbol, hashCalls, hashMessage, isTestnet, isTokenAddressSupported, resolveTokenAddress, useBatchQueue, verifyMessageHash };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { O as OneAuthClient, I as IntentSigner, W as WebAuthnSignature, a as IntentCall, S as SendIntentResult } from './client-B-HGKKaJ.js';
2
- export { A as AuthenticateOptions, k as AuthenticateResult, B as BalanceRequirement, z as CloseOnStatus, C as CreateSigningRequestResponse, p as EIP712Domain, r as EIP712TypeField, q as EIP712Types, E as EmbedOptions, F as ExecuteIntentResponse, w as IntentQuote, x as IntentStatus, u as IntentTokenRequest, L as LoginOptions, j as LoginResult, M as MerchantSignedIntent, y as OrchestratorStatus, h as PasskeyCredential, P as PasskeyProviderConfig, D as PrepareIntentResponse, R as RegisterOptions, i as RegisterResult, v as SendIntentOptions, G as SendSwapOptions, H as SendSwapResult, l as SignMessageOptions, m as SignMessageResult, n as SignTypedDataOptions, o as SignTypedDataResult, e as SigningError, f as SigningErrorCode, b as SigningRequestOptions, g as SigningRequestStatus, c as SigningResult, d as SigningSuccess, J as SwapQuote, K as ThemeConfig, T as TransactionAction, t as TransactionDetails, s as TransactionFees, U as UserPasskeysResponse } from './client-B-HGKKaJ.js';
3
- export { P as PasskeyProvider, a as PasskeyProviderOptions, c as createPasskeyProvider } from './provider-Cy1StrOe.js';
1
+ import { O as OneAuthClient, I as IntentSigner, W as WebAuthnSignature, a as IntentCall, S as SendIntentResult } from './client-DKuPEx83.js';
2
+ export { A as AuthenticateOptions, l as AuthenticateResult, B as BalanceRequirement, a3 as BatchIntentItem, a6 as BatchIntentItemResult, $ as CheckConsentOptions, a0 as CheckConsentResult, F as CloseOnStatus, k as ConnectResult, _ as ConsentData, Z as ConsentField, C as CreateSigningRequestResponse, D as DeveloperSignedIntent, q as EIP712Domain, s as EIP712TypeField, r as EIP712Types, E as EmbedOptions, H as ExecuteIntentResponse, K as IntentHistoryItem, J as IntentHistoryOptions, N as IntentHistoryResult, x as IntentQuote, y as IntentStatus, v as IntentTokenRequest, L as LoginOptions, j as LoginResult, M as MerchantSignedIntent, z as OrchestratorStatus, h as PasskeyCredential, P as PasskeyProviderConfig, a8 as PrepareBatchIntentResponse, G as PrepareIntentResponse, a7 as PreparedBatchIntent, R as RegisterOptions, i as RegisterResult, a1 as RequestConsentOptions, a2 as RequestConsentResult, a4 as SendBatchIntentOptions, a5 as SendBatchIntentResult, w as SendIntentOptions, Q as SendSwapOptions, V as SendSwapResult, m as SignMessageOptions, n as SignMessageResult, o as SignTypedDataOptions, p as SignTypedDataResult, e as SigningError, f as SigningErrorCode, b as SigningRequestOptions, g as SigningRequestStatus, c as SigningResult, d as SigningSuccess, X as SwapQuote, Y as ThemeConfig, T as TransactionAction, u as TransactionDetails, t as TransactionFees, U as UserPasskeysResponse } from './client-DKuPEx83.js';
3
+ export { O as OneAuthProvider, b as OneAuthProviderOptions, P as PasskeyProvider, d as PasskeyProviderOptions, c as createOneAuthProvider, a as createPasskeyProvider } from './provider-Dj5l4bWn.js';
4
4
  import { Address, LocalAccount, Chain, Transport, Hex, WalletClient, Hash } from 'viem';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import * as React from 'react';
@@ -28,7 +28,7 @@ interface PasskeyWalletClientConfig {
28
28
  clientId: string;
29
29
  /** Optional URL of the dialog UI */
30
30
  dialogUrl?: string;
31
- /** Optional signer for merchant-protected intents */
31
+ /** Optional signer for developer-protected intents */
32
32
  signIntent?: IntentSigner;
33
33
  /** Chain configuration */
34
34
  chain: Chain;
@@ -64,6 +64,11 @@ interface SendCallsParams {
64
64
  calls: TransactionCall[];
65
65
  /** Optional chain id override */
66
66
  chainId?: number;
67
+ /** Optional token requests for orchestrator output (what tokens/amounts to deliver) */
68
+ tokenRequests?: {
69
+ token: string;
70
+ amount: bigint;
71
+ }[];
67
72
  }
68
73
 
69
74
  /**
@@ -223,18 +228,22 @@ declare function getTokenSymbol(tokenAddress: Address, chainId: number): string;
223
228
  declare function isTokenAddressSupported(tokenAddress: Address, chainId: number): boolean;
224
229
 
225
230
  /**
226
- * The domain separator prefix used for passkey message signing.
227
- * This ensures message signatures cannot be replayed for transaction signing.
231
+ * The EIP-191 prefix used for personal message signing.
232
+ * This is the standard Ethereum message prefix for `personal_sign`.
228
233
  */
229
- declare const PASSKEY_MESSAGE_PREFIX = "\u0019Passkey Signed Message:\n";
234
+ declare const ETHEREUM_MESSAGE_PREFIX = "\u0019Ethereum Signed Message:\n";
230
235
  /**
231
- * Hash a message with the passkey domain separator.
236
+ * @deprecated Use ETHEREUM_MESSAGE_PREFIX instead. Kept for backwards compatibility.
237
+ */
238
+ declare const PASSKEY_MESSAGE_PREFIX = "\u0019Ethereum Signed Message:\n";
239
+ /**
240
+ * Hash a message with the EIP-191 Ethereum prefix.
232
241
  *
233
242
  * This is the same hashing function used by the passkey sign dialog.
234
243
  * Use this to verify that the `signedHash` returned from `signMessage()`
235
244
  * matches your original message.
236
245
  *
237
- * Format: keccak256("\x19Passkey Signed Message:\n" + len + message)
246
+ * Format: keccak256("\x19Ethereum Signed Message:\n" + len + message)
238
247
  *
239
248
  * @example
240
249
  * ```typescript
@@ -268,4 +277,4 @@ declare function hashMessage(message: string): `0x${string}`;
268
277
  */
269
278
  declare function verifyMessageHash(message: string, signedHash: string | undefined): boolean;
270
279
 
271
- export { type BatchQueueContextValue, BatchQueueProvider, type BatchQueueProviderProps, BatchQueueWidget, type BatchQueueWidgetProps, type BatchedCall, type ChainFilterOptions, IntentCall, IntentSigner, OneAuthClient, PASSKEY_MESSAGE_PREFIX, type PasskeyAccount, OneAuthClient as PasskeyProviderClient, type PasskeyWalletClient, type PasskeyWalletClientConfig, type SendCallsParams, SendIntentResult, type TokenConfig, type TransactionCall, WebAuthnSignature, createPasskeyAccount, createPasskeyWalletClient, encodeWebAuthnSignature, getAllSupportedChainsAndTokens, getChainById, getChainExplorerUrl, getChainName, getChainRpcUrl, getSupportedChainIds, getSupportedChains, getSupportedTokenSymbols, getSupportedTokens, getTokenSymbol, hashCalls, hashMessage, isTestnet, isTokenAddressSupported, resolveTokenAddress, useBatchQueue, verifyMessageHash };
280
+ export { type BatchQueueContextValue, BatchQueueProvider, type BatchQueueProviderProps, BatchQueueWidget, type BatchQueueWidgetProps, type BatchedCall, type ChainFilterOptions, ETHEREUM_MESSAGE_PREFIX, IntentCall, IntentSigner, OneAuthClient, PASSKEY_MESSAGE_PREFIX, type PasskeyAccount, OneAuthClient as PasskeyProviderClient, type PasskeyWalletClient, type PasskeyWalletClientConfig, type SendCallsParams, SendIntentResult, type TokenConfig, type TransactionCall, WebAuthnSignature, createPasskeyAccount, createPasskeyWalletClient, encodeWebAuthnSignature, getAllSupportedChainsAndTokens, getChainById, getChainExplorerUrl, getChainName, getChainRpcUrl, getSupportedChainIds, getSupportedChains, getSupportedTokenSymbols, getSupportedTokens, getTokenSymbol, hashCalls, hashMessage, isTestnet, isTokenAddressSupported, resolveTokenAddress, useBatchQueue, verifyMessageHash };