@rhinestone/1auth 0.7.0 → 0.7.2
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 +149 -34
- package/dist/{chunk-THKG3FAG.mjs → chunk-UXBBB7AV.mjs} +4 -4
- package/dist/{client-F4DnFM8d.d.mts → client-DvtGr2xn.d.mts} +2 -2
- package/dist/{client-B_CzDa_I.d.ts → client-Ewr_7x-d.d.ts} +2 -2
- package/dist/headless.d.mts +2 -2
- package/dist/headless.d.ts +2 -2
- package/dist/headless.js +1 -1
- package/dist/headless.js.map +1 -1
- package/dist/headless.mjs +1 -1
- package/dist/headless.mjs.map +1 -1
- package/dist/index.d.mts +9 -50
- package/dist/index.d.ts +9 -50
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -10
- package/dist/index.mjs.map +1 -1
- package/dist/{provider-Cd7Ip5L-.d.ts → provider-BRHZoB8U.d.ts} +2 -2
- package/dist/{provider-IvYXPMpk.d.mts → provider-NYl0jlHw.d.mts} +2 -2
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/server.d.mts +3 -3
- package/dist/server.d.ts +3 -3
- package/dist/server.js +54 -5
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +4 -0
- package/dist/server.mjs.map +1 -1
- package/dist/{types-U_dwxbtS.d.mts → types-C0jKNT_t.d.mts} +1 -1
- package/dist/{types-U_dwxbtS.d.ts → types-C0jKNT_t.d.ts} +1 -1
- package/dist/{verify-BLgZzwmJ.d.ts → verify-CnOwPq78.d.ts} +44 -3
- package/dist/{verify-C8-a5c3K.d.mts → verify-aWdi5O2z.d.mts} +44 -3
- package/dist/wagmi.d.mts +3 -3
- package/dist/wagmi.d.ts +3 -3
- package/dist/wagmi.mjs +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-THKG3FAG.mjs.map → chunk-UXBBB7AV.mjs.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Address, Chain, Transport, Hex } from 'viem';
|
|
2
|
-
import { aa as ThemeConfig, S as SponsorshipConfig, W as WebAuthnSignature } from './types-
|
|
2
|
+
import { aa as ThemeConfig, S as SponsorshipConfig, W as WebAuthnSignature } from './types-C0jKNT_t.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Configuration for creating a passkey-enabled WalletClient
|
|
@@ -9,7 +9,7 @@ interface PasskeyWalletClientConfig {
|
|
|
9
9
|
accountAddress: Address;
|
|
10
10
|
/** Optional username hint for legacy passkey accounts. */
|
|
11
11
|
username?: string;
|
|
12
|
-
/** Base URL of the auth API (defaults to https://passkey.1auth.
|
|
12
|
+
/** Base URL of the auth API (defaults to https://passkey.1auth.app) */
|
|
13
13
|
providerUrl?: string;
|
|
14
14
|
/** Client identifier for this application */
|
|
15
15
|
clientId: string;
|
|
@@ -101,6 +101,47 @@ declare function encodeWebAuthnSignature(sig: WebAuthnSignature): Hex;
|
|
|
101
101
|
*/
|
|
102
102
|
declare function hashCalls(calls: TransactionCall[]): Hex;
|
|
103
103
|
|
|
104
|
+
/**
|
|
105
|
+
* @file Chain and token registry for the 1auth SDK.
|
|
106
|
+
*
|
|
107
|
+
* Wraps `@rhinestone/shared-configs` chain/token data and combines it with
|
|
108
|
+
* viem's chain definitions to expose a filtered, testnet-aware registry.
|
|
109
|
+
* Consumers can look up supported chains and tokens, resolve token addresses
|
|
110
|
+
* by symbol, and retrieve chain metadata such as explorer URLs and default RPC
|
|
111
|
+
* endpoints.
|
|
112
|
+
*
|
|
113
|
+
* Testnet inclusion is controlled by the `includeTestnets` option on each
|
|
114
|
+
* function or, as a project-wide default, by the environment variables
|
|
115
|
+
* `NEXT_PUBLIC_ORCHESTRATOR_USE_TESTNETS` or `ORCHESTRATOR_USE_TESTNETS`.
|
|
116
|
+
*/
|
|
117
|
+
|
|
118
|
+
type TokenConfig = {
|
|
119
|
+
symbol: string;
|
|
120
|
+
address: Address;
|
|
121
|
+
decimals: number;
|
|
122
|
+
};
|
|
123
|
+
type ChainFilterOptions = {
|
|
124
|
+
includeTestnets?: boolean;
|
|
125
|
+
chainIds?: number[];
|
|
126
|
+
};
|
|
127
|
+
declare function getSupportedChainIds(options?: ChainFilterOptions): number[];
|
|
128
|
+
declare function getSupportedChains(options?: ChainFilterOptions): Chain[];
|
|
129
|
+
declare function getAllSupportedChainsAndTokens(options?: ChainFilterOptions): Array<{
|
|
130
|
+
chainId: number;
|
|
131
|
+
tokens: TokenConfig[];
|
|
132
|
+
}>;
|
|
133
|
+
declare function getChainById(chainId: number): Chain;
|
|
134
|
+
declare function getChainExplorerUrl(chainId: number): string | undefined;
|
|
135
|
+
declare function getChainRpcUrl(chainId: number): string | undefined;
|
|
136
|
+
declare function getSupportedTokens(chainId: number): TokenConfig[];
|
|
137
|
+
declare function getSupportedTokenSymbols(chainId: number): string[];
|
|
138
|
+
declare function getTokenAddress(symbolOrAddress: string, chainId: number): Address;
|
|
139
|
+
declare function getTokenDecimals(symbolOrAddress: string, chainId: number): number;
|
|
140
|
+
declare function resolveTokenAddress(token: string, chainId: number): Address;
|
|
141
|
+
declare function isTestnet(chainId: number): boolean;
|
|
142
|
+
declare function getTokenSymbol(tokenAddress: Address, chainId: number): string;
|
|
143
|
+
declare function isTokenAddressSupported(tokenAddress: Address, chainId: number): boolean;
|
|
144
|
+
|
|
104
145
|
/**
|
|
105
146
|
* The EIP-191 prefix used for personal message signing.
|
|
106
147
|
* This is the standard Ethereum message prefix for `personal_sign`.
|
|
@@ -147,4 +188,4 @@ declare function hashMessage(message: string): `0x${string}`;
|
|
|
147
188
|
*/
|
|
148
189
|
declare function verifyMessageHash(message: string, signedHash: string | undefined): boolean;
|
|
149
190
|
|
|
150
|
-
export { ETHEREUM_MESSAGE_PREFIX as E, type PasskeyWalletClientConfig as P, type SendCallsParams as S, type TransactionCall as T,
|
|
191
|
+
export { type ChainFilterOptions as C, ETHEREUM_MESSAGE_PREFIX as E, type PasskeyWalletClientConfig as P, type SendCallsParams as S, type TransactionCall as T, getSupportedChains as a, getAllSupportedChainsAndTokens as b, getSupportedTokens as c, getSupportedTokenSymbols as d, encodeWebAuthnSignature as e, getChainById as f, getSupportedChainIds as g, hashCalls as h, getChainExplorerUrl as i, getChainRpcUrl as j, isTestnet as k, getTokenAddress as l, getTokenSymbol as m, getTokenDecimals as n, isTokenAddressSupported as o, type TokenConfig as p, hashMessage as q, resolveTokenAddress as r, verifyMessageHash as v };
|
package/dist/wagmi.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _wagmi_core from '@wagmi/core';
|
|
2
|
-
import { O as OneAuthProvider } from './provider-
|
|
3
|
-
import { O as OneAuthClient } from './client-
|
|
4
|
-
import './types-
|
|
2
|
+
import { O as OneAuthProvider } from './provider-NYl0jlHw.mjs';
|
|
3
|
+
import { O as OneAuthClient } from './client-DvtGr2xn.mjs';
|
|
4
|
+
import './types-C0jKNT_t.mjs';
|
|
5
5
|
import 'viem';
|
|
6
6
|
import '@rhinestone/sdk';
|
|
7
7
|
|
package/dist/wagmi.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _wagmi_core from '@wagmi/core';
|
|
2
|
-
import { O as OneAuthProvider } from './provider-
|
|
3
|
-
import { O as OneAuthClient } from './client-
|
|
4
|
-
import './types-
|
|
2
|
+
import { O as OneAuthProvider } from './provider-BRHZoB8U.js';
|
|
3
|
+
import { O as OneAuthClient } from './client-Ewr_7x-d.js';
|
|
4
|
+
import './types-C0jKNT_t.js';
|
|
5
5
|
import 'viem';
|
|
6
6
|
import '@rhinestone/sdk';
|
|
7
7
|
|
package/dist/wagmi.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createOneAuthProvider
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-GUAI55LL.mjs";
|
|
3
|
+
} from "./chunk-UXBBB7AV.mjs";
|
|
5
4
|
import "./chunk-N6KE5CII.mjs";
|
|
5
|
+
import "./chunk-GUAI55LL.mjs";
|
|
6
6
|
|
|
7
7
|
// src/wagmi.ts
|
|
8
8
|
import { createConnector } from "@wagmi/core";
|
package/package.json
CHANGED
|
File without changes
|