@moon-x/core 0.8.0 → 0.10.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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/sdk/index.d.mts +29 -8
- package/dist/sdk/index.d.ts +29 -8
- package/dist/sdk/index.js +60 -16
- package/dist/sdk/index.mjs +51 -16
- package/dist/types/index.d.mts +5 -3
- package/dist/types/index.d.ts +5 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { AccessTokenClaims, AppConfigRequest, AppConfigResponse, AttachOAuthTokenRequest, AttachOAuthTokenResponse, AuthAppearance, AuthFlow, AuthFlowComponent, AuthLoginMethod, AuthProviderConfig, BaseGetBalanceParams, BaseGetBalanceResult, BaseGetTokenAccountsParams, BaseSendTransactionParams, BaseSendTransactionResult, BaseSignMessageParams, BaseSignMessageResult, BaseSignTransactionParams, BaseSignTransactionResult, BaseTokenClaims, BaseUIOptions, BaseWalletHooks, BlockExplorer, Chain, ChainLikeWithId, ContractUIOptions, CreateWalletResponse, DefaultFundingMethod, DeleteSessionRequest, DeleteSessionResponse, DetachOAuthTokenRequest, DeviceFingerprint, DisplayMode, EmailOtpConfig, EmailOtpFlowState, EphemeralSigner, EphemeralSignerChain, EphemeralSignerScheme, EphemeralSignerWallet, EthereumChainConfig, EthereumFundingConfig, EthereumGetBalanceParams, EthereumGetBalanceResult, EthereumGetTokenAccountsByOwnerParams, EthereumGetTokenAccountsByOwnerResult, EthereumSendTransactionParams, EthereumSendTransactionRequest, EthereumSendTransactionResult, EthereumSign7702AuthorizationParams, EthereumSign7702AuthorizationResult, EthereumSignHashParams, EthereumSignHashResult, EthereumSignMessageParams, EthereumSignMessageResult, EthereumSignTransactionParams, EthereumSignTransactionResult, EthereumSignTypedDataParams, EthereumSignTypedDataResult, EthereumSwitchChainParams, ExportKeyConfig, Factor, FlexibleTheme, FundWalletConfig, FundingEvents, FundingMethod, FundingUIConfig, GetCurrentSessionRequest, GetCurrentSessionResponse, Hex, IdentityTokenClaims, IdpProvider, IsAuthenticatedRequest, IsAuthenticatedResponse, ListEphemeralSignersResult, LoginTokenBundle, LogoutRequest, LogoutResponse, MessageTypeProperty, MessageTypes, MoonKeyThemeConfig, MoonPaySignRequest, MoonPaySignResponse, MpcKeyShares, NativeCurrency, Network, OAuthRequest, OAuthResponse, OnrampFundingSettings, PasskeyEnrollConfig, PasskeySettings, PreferredCardProvider, PrefillConfig, PresenceTokenClaims, ProvisionEphemeralSignerParams, ProvisionEphemeralSignerResult, PublicEthereumWallet, PublicSessionData, PublicWallet, RefreshSessionRequest, RefreshSessionResponse, RetrieveWalletKeyRequest, RetrieveWalletKeyResponse, RevokeEphemeralSignerParams, RpcConfig, RpcUrls, SdkSettings, SendEmailOtpRequest, SendEmailOtpResponse, SendTransactionConfig, SendTransactionRequest, SessionData, SharesDeviceRequest, SharesDeviceResponse, Sign7702AuthorizationError, Sign7702AuthorizationParams, Sign7702AuthorizationResponse, Sign7702AuthorizationResult, SignMessageConfig, SignTransactionConfig, SignTypedDataError, SignTypedDataParams, SignTypedDataResponse, SignTypedDataResult, SmsSettings, SolanaChain, SolanaFundingConfig, SolanaGetBalanceParams, SolanaGetBalanceResult, SolanaGetTokenAccountsByOwnerParams, SolanaGetTokenAccountsByOwnerResult, SolanaSendTransactionParams, SolanaSendTransactionResult, SolanaSignMessageParams, SolanaSignMessageResult, SolanaSignTransactionParams, SolanaSignTransactionResult, TransactionCommitment, TransactionEncoding, TransactionUIOptions, TypedMessage, UseFundWalletInterface, UsersMePublicResponse, UsersMeRequest, UsersMeResponse, VerifiedSession, VerifyEmailOtpRequest, VerifyEmailOtpResponse, VerifyEmailOtpUser, VerifyOAuthTokenRequest, VerifyOAuthTokenResponse, VerifySiweWalletRegistrationRequest, WALLET_ERROR_CODES, Wallet, WalletChain, WalletChainType, WalletConnectConfig, WalletCreationError, WalletError, WalletErrorCode, WalletKeyRequest, WalletListEntry, WalletRegistrationNonceRequest, WalletRegistrationNonceResponse, WalletType, WalletVerifyRequest } from './types/index.mjs';
|
|
1
|
+
export { AccessTokenClaims, AppConfigRequest, AppConfigResponse, AttachOAuthTokenRequest, AttachOAuthTokenResponse, AuthAppearance, AuthFlow, AuthFlowComponent, AuthLoginMethod, AuthProviderConfig, BaseGetBalanceParams, BaseGetBalanceResult, BaseGetTokenAccountsParams, BaseSendTransactionParams, BaseSendTransactionResult, BaseSignMessageParams, BaseSignMessageResult, BaseSignTransactionParams, BaseSignTransactionResult, BaseTokenClaims, BaseUIOptions, BaseWalletHooks, BlockExplorer, Chain, ChainLikeWithId, ContractUIOptions, CreateWalletResponse, DefaultFundingMethod, DeleteSessionRequest, DeleteSessionResponse, DetachOAuthTokenRequest, DeviceFingerprint, DisplayMode, EmailOtpConfig, EmailOtpFlowState, EphemeralSigner, EphemeralSignerChain, EphemeralSignerScheme, EphemeralSignerWallet, EthereumChainConfig, EthereumFundingConfig, EthereumGetBalanceParams, EthereumGetBalanceResult, EthereumGetTokenAccountsByOwnerParams, EthereumGetTokenAccountsByOwnerResult, EthereumSendTransactionParams, EthereumSendTransactionRequest, EthereumSendTransactionResult, EthereumSign7702AuthorizationParams, EthereumSign7702AuthorizationResult, EthereumSignHashParams, EthereumSignHashResult, EthereumSignMessageParams, EthereumSignMessageResult, EthereumSignTransactionParams, EthereumSignTransactionResult, EthereumSignTypedDataParams, EthereumSignTypedDataResult, EthereumSwitchChainParams, ExportKeyConfig, Factor, FlexibleTheme, FundWalletConfig, FundingEvents, FundingMethod, FundingUIConfig, GetCurrentSessionRequest, GetCurrentSessionResponse, Hex, IdentityTokenClaims, IdpProvider, IsAuthenticatedRequest, IsAuthenticatedResponse, ListEphemeralSignersResult, LoginTokenBundle, LogoutRequest, LogoutResponse, MessageTypeProperty, MessageTypes, MoonKeyThemeConfig, MoonPaySignRequest, MoonPaySignResponse, MpcKeyShares, NativeCurrency, Network, OAuthRequest, OAuthResponse, OnrampFundingSettings, PasskeyEnrollConfig, PasskeySettings, PreferredCardProvider, PrefillConfig, PresenceTokenClaims, ProvisionEphemeralSignerParams, ProvisionEphemeralSignerResult, PublicEthereumWallet, PublicSessionData, PublicWallet, RefreshSessionRequest, RefreshSessionResponse, RetrieveWalletKeyRequest, RetrieveWalletKeyResponse, RevokeEphemeralSignerParams, RpcConfig, RpcUrls, SdkSettings, SendEmailOtpRequest, SendEmailOtpResponse, SendTransactionConfig, SendTransactionRequest, SessionData, SessionWallet, SharesDeviceRequest, SharesDeviceResponse, Sign7702AuthorizationError, Sign7702AuthorizationParams, Sign7702AuthorizationResponse, Sign7702AuthorizationResult, SignMessageConfig, SignTransactionConfig, SignTypedDataError, SignTypedDataParams, SignTypedDataResponse, SignTypedDataResult, SmsSettings, SolanaChain, SolanaFundingConfig, SolanaGetBalanceParams, SolanaGetBalanceResult, SolanaGetTokenAccountsByOwnerParams, SolanaGetTokenAccountsByOwnerResult, SolanaSendTransactionParams, SolanaSendTransactionResult, SolanaSignMessageParams, SolanaSignMessageResult, SolanaSignTransactionParams, SolanaSignTransactionResult, TransactionCommitment, TransactionEncoding, TransactionUIOptions, TypedMessage, UseFundWalletInterface, UsersMePublicResponse, UsersMeRequest, UsersMeResponse, VerifiedSession, VerifyEmailOtpRequest, VerifyEmailOtpResponse, VerifyEmailOtpUser, VerifyOAuthTokenRequest, VerifyOAuthTokenResponse, VerifySiweWalletRegistrationRequest, WALLET_ERROR_CODES, Wallet, WalletChain, WalletChainType, WalletConnectConfig, WalletCreationError, WalletError, WalletErrorCode, WalletKeyRequest, WalletListEntry, WalletRegistrationNonceRequest, WalletRegistrationNonceResponse, WalletType, WalletVerifyRequest } from './types/index.mjs';
|
|
2
2
|
export { getIframeOrigin, getIframeUrl, getMoonKeyApiUrl } from './utils/index.mjs';
|
|
3
3
|
export { F as FORWARDED_ERROR_FIELDS, P as PostMessageClient, a as PostMessageMethod, b as PostMessageServer, c as PostMessageType } from './post-message-2NAnU0Lf.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { AccessTokenClaims, AppConfigRequest, AppConfigResponse, AttachOAuthTokenRequest, AttachOAuthTokenResponse, AuthAppearance, AuthFlow, AuthFlowComponent, AuthLoginMethod, AuthProviderConfig, BaseGetBalanceParams, BaseGetBalanceResult, BaseGetTokenAccountsParams, BaseSendTransactionParams, BaseSendTransactionResult, BaseSignMessageParams, BaseSignMessageResult, BaseSignTransactionParams, BaseSignTransactionResult, BaseTokenClaims, BaseUIOptions, BaseWalletHooks, BlockExplorer, Chain, ChainLikeWithId, ContractUIOptions, CreateWalletResponse, DefaultFundingMethod, DeleteSessionRequest, DeleteSessionResponse, DetachOAuthTokenRequest, DeviceFingerprint, DisplayMode, EmailOtpConfig, EmailOtpFlowState, EphemeralSigner, EphemeralSignerChain, EphemeralSignerScheme, EphemeralSignerWallet, EthereumChainConfig, EthereumFundingConfig, EthereumGetBalanceParams, EthereumGetBalanceResult, EthereumGetTokenAccountsByOwnerParams, EthereumGetTokenAccountsByOwnerResult, EthereumSendTransactionParams, EthereumSendTransactionRequest, EthereumSendTransactionResult, EthereumSign7702AuthorizationParams, EthereumSign7702AuthorizationResult, EthereumSignHashParams, EthereumSignHashResult, EthereumSignMessageParams, EthereumSignMessageResult, EthereumSignTransactionParams, EthereumSignTransactionResult, EthereumSignTypedDataParams, EthereumSignTypedDataResult, EthereumSwitchChainParams, ExportKeyConfig, Factor, FlexibleTheme, FundWalletConfig, FundingEvents, FundingMethod, FundingUIConfig, GetCurrentSessionRequest, GetCurrentSessionResponse, Hex, IdentityTokenClaims, IdpProvider, IsAuthenticatedRequest, IsAuthenticatedResponse, ListEphemeralSignersResult, LoginTokenBundle, LogoutRequest, LogoutResponse, MessageTypeProperty, MessageTypes, MoonKeyThemeConfig, MoonPaySignRequest, MoonPaySignResponse, MpcKeyShares, NativeCurrency, Network, OAuthRequest, OAuthResponse, OnrampFundingSettings, PasskeyEnrollConfig, PasskeySettings, PreferredCardProvider, PrefillConfig, PresenceTokenClaims, ProvisionEphemeralSignerParams, ProvisionEphemeralSignerResult, PublicEthereumWallet, PublicSessionData, PublicWallet, RefreshSessionRequest, RefreshSessionResponse, RetrieveWalletKeyRequest, RetrieveWalletKeyResponse, RevokeEphemeralSignerParams, RpcConfig, RpcUrls, SdkSettings, SendEmailOtpRequest, SendEmailOtpResponse, SendTransactionConfig, SendTransactionRequest, SessionData, SharesDeviceRequest, SharesDeviceResponse, Sign7702AuthorizationError, Sign7702AuthorizationParams, Sign7702AuthorizationResponse, Sign7702AuthorizationResult, SignMessageConfig, SignTransactionConfig, SignTypedDataError, SignTypedDataParams, SignTypedDataResponse, SignTypedDataResult, SmsSettings, SolanaChain, SolanaFundingConfig, SolanaGetBalanceParams, SolanaGetBalanceResult, SolanaGetTokenAccountsByOwnerParams, SolanaGetTokenAccountsByOwnerResult, SolanaSendTransactionParams, SolanaSendTransactionResult, SolanaSignMessageParams, SolanaSignMessageResult, SolanaSignTransactionParams, SolanaSignTransactionResult, TransactionCommitment, TransactionEncoding, TransactionUIOptions, TypedMessage, UseFundWalletInterface, UsersMePublicResponse, UsersMeRequest, UsersMeResponse, VerifiedSession, VerifyEmailOtpRequest, VerifyEmailOtpResponse, VerifyEmailOtpUser, VerifyOAuthTokenRequest, VerifyOAuthTokenResponse, VerifySiweWalletRegistrationRequest, WALLET_ERROR_CODES, Wallet, WalletChain, WalletChainType, WalletConnectConfig, WalletCreationError, WalletError, WalletErrorCode, WalletKeyRequest, WalletListEntry, WalletRegistrationNonceRequest, WalletRegistrationNonceResponse, WalletType, WalletVerifyRequest } from './types/index.js';
|
|
1
|
+
export { AccessTokenClaims, AppConfigRequest, AppConfigResponse, AttachOAuthTokenRequest, AttachOAuthTokenResponse, AuthAppearance, AuthFlow, AuthFlowComponent, AuthLoginMethod, AuthProviderConfig, BaseGetBalanceParams, BaseGetBalanceResult, BaseGetTokenAccountsParams, BaseSendTransactionParams, BaseSendTransactionResult, BaseSignMessageParams, BaseSignMessageResult, BaseSignTransactionParams, BaseSignTransactionResult, BaseTokenClaims, BaseUIOptions, BaseWalletHooks, BlockExplorer, Chain, ChainLikeWithId, ContractUIOptions, CreateWalletResponse, DefaultFundingMethod, DeleteSessionRequest, DeleteSessionResponse, DetachOAuthTokenRequest, DeviceFingerprint, DisplayMode, EmailOtpConfig, EmailOtpFlowState, EphemeralSigner, EphemeralSignerChain, EphemeralSignerScheme, EphemeralSignerWallet, EthereumChainConfig, EthereumFundingConfig, EthereumGetBalanceParams, EthereumGetBalanceResult, EthereumGetTokenAccountsByOwnerParams, EthereumGetTokenAccountsByOwnerResult, EthereumSendTransactionParams, EthereumSendTransactionRequest, EthereumSendTransactionResult, EthereumSign7702AuthorizationParams, EthereumSign7702AuthorizationResult, EthereumSignHashParams, EthereumSignHashResult, EthereumSignMessageParams, EthereumSignMessageResult, EthereumSignTransactionParams, EthereumSignTransactionResult, EthereumSignTypedDataParams, EthereumSignTypedDataResult, EthereumSwitchChainParams, ExportKeyConfig, Factor, FlexibleTheme, FundWalletConfig, FundingEvents, FundingMethod, FundingUIConfig, GetCurrentSessionRequest, GetCurrentSessionResponse, Hex, IdentityTokenClaims, IdpProvider, IsAuthenticatedRequest, IsAuthenticatedResponse, ListEphemeralSignersResult, LoginTokenBundle, LogoutRequest, LogoutResponse, MessageTypeProperty, MessageTypes, MoonKeyThemeConfig, MoonPaySignRequest, MoonPaySignResponse, MpcKeyShares, NativeCurrency, Network, OAuthRequest, OAuthResponse, OnrampFundingSettings, PasskeyEnrollConfig, PasskeySettings, PreferredCardProvider, PrefillConfig, PresenceTokenClaims, ProvisionEphemeralSignerParams, ProvisionEphemeralSignerResult, PublicEthereumWallet, PublicSessionData, PublicWallet, RefreshSessionRequest, RefreshSessionResponse, RetrieveWalletKeyRequest, RetrieveWalletKeyResponse, RevokeEphemeralSignerParams, RpcConfig, RpcUrls, SdkSettings, SendEmailOtpRequest, SendEmailOtpResponse, SendTransactionConfig, SendTransactionRequest, SessionData, SessionWallet, SharesDeviceRequest, SharesDeviceResponse, Sign7702AuthorizationError, Sign7702AuthorizationParams, Sign7702AuthorizationResponse, Sign7702AuthorizationResult, SignMessageConfig, SignTransactionConfig, SignTypedDataError, SignTypedDataParams, SignTypedDataResponse, SignTypedDataResult, SmsSettings, SolanaChain, SolanaFundingConfig, SolanaGetBalanceParams, SolanaGetBalanceResult, SolanaGetTokenAccountsByOwnerParams, SolanaGetTokenAccountsByOwnerResult, SolanaSendTransactionParams, SolanaSendTransactionResult, SolanaSignMessageParams, SolanaSignMessageResult, SolanaSignTransactionParams, SolanaSignTransactionResult, TransactionCommitment, TransactionEncoding, TransactionUIOptions, TypedMessage, UseFundWalletInterface, UsersMePublicResponse, UsersMeRequest, UsersMeResponse, VerifiedSession, VerifyEmailOtpRequest, VerifyEmailOtpResponse, VerifyEmailOtpUser, VerifyOAuthTokenRequest, VerifyOAuthTokenResponse, VerifySiweWalletRegistrationRequest, WALLET_ERROR_CODES, Wallet, WalletChain, WalletChainType, WalletConnectConfig, WalletCreationError, WalletError, WalletErrorCode, WalletKeyRequest, WalletListEntry, WalletRegistrationNonceRequest, WalletRegistrationNonceResponse, WalletType, WalletVerifyRequest } from './types/index.js';
|
|
2
2
|
export { getIframeOrigin, getIframeUrl, getMoonKeyApiUrl } from './utils/index.js';
|
|
3
3
|
export { F as FORWARDED_ERROR_FIELDS, P as PostMessageClient, a as PostMessageMethod, b as PostMessageServer, c as PostMessageType } from './post-message-2NAnU0Lf.js';
|
package/dist/sdk/index.d.mts
CHANGED
|
@@ -39,11 +39,21 @@ declare const getInternalPresenceTokens: ({ transport, passkey, publishableKey,
|
|
|
39
39
|
passkey: PasskeyAssertor;
|
|
40
40
|
publishableKey: string;
|
|
41
41
|
relyingPartyOrigin: RelyingPartyOriginInput;
|
|
42
|
-
scopes?: string[];
|
|
42
|
+
scopes?: readonly string[];
|
|
43
43
|
scopeCounts?: Record<string, number>;
|
|
44
44
|
}) => Promise<GetInternalPresenceTokensResult>;
|
|
45
45
|
declare const flattenPresenceTokens: (result: Pick<GetInternalPresenceTokensResult, "tokens"> & Partial<GetInternalPresenceTokensResult>) => Record<string, string>;
|
|
46
46
|
|
|
47
|
+
type PresenceScope = "dek_bootstrap" | "keyshare_write" | "keyshare_read" | "passkey_enroll" | "passkey_remove" | "wrap_add" | "ephemeral_signer_revoke" | "sign";
|
|
48
|
+
declare const SCOPES_CREATE_WALLET: readonly PresenceScope[];
|
|
49
|
+
declare const SCOPES_IMPORT_KEY: readonly PresenceScope[];
|
|
50
|
+
declare const SCOPES_REMOVE_PASSKEY: readonly PresenceScope[];
|
|
51
|
+
declare const SCOPES_ADD_PASSKEY: readonly PresenceScope[];
|
|
52
|
+
declare const SCOPES_PROVISION_EPHEMERAL_SIGNER: readonly PresenceScope[];
|
|
53
|
+
declare const SCOPES_REVOKE_EPHEMERAL_SIGNER: readonly PresenceScope[];
|
|
54
|
+
declare const SCOPES_SIGN: readonly PresenceScope[];
|
|
55
|
+
declare const SCOPES_EXPORT_KEY: readonly PresenceScope[];
|
|
56
|
+
|
|
47
57
|
declare const getHeadlessEthereumMethods: ({ transport, passkey, publishableKey, relyingPartyOrigin, }: {
|
|
48
58
|
transport: Transport;
|
|
49
59
|
passkey: PasskeyAssertor;
|
|
@@ -178,14 +188,19 @@ interface EphemeralSignerSignInput {
|
|
|
178
188
|
rawSigningPayloadHex: string;
|
|
179
189
|
/** Defaults to now. SES rejects timestamps further than ±5 min from its clock. */
|
|
180
190
|
issuedAt?: Date;
|
|
181
|
-
/** Wallets backend base URL (no trailing slash). */
|
|
182
|
-
baseUrl: string;
|
|
183
191
|
/**
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
192
|
+
* Wallets backend base URL (no trailing slash). Optional — defaults to
|
|
193
|
+
* {@link DEFAULT_API_BASE_URL}, the standard MoonX deployment. Override
|
|
194
|
+
* only for local/dev or a non-default environment.
|
|
187
195
|
*/
|
|
188
|
-
|
|
196
|
+
baseUrl?: string;
|
|
197
|
+
/**
|
|
198
|
+
* MoonX secret key (`moon_sk_*`). The wallets backend's server-side
|
|
199
|
+
* ephemeral-signer routes (/me/wallets, /sign) are secret-key-only
|
|
200
|
+
* (RequireSecretKey), so every call needs an `Authorization: Bearer
|
|
201
|
+
* <secretKey>` header. Server-only; never expose to the browser.
|
|
202
|
+
*/
|
|
203
|
+
secretKey: string;
|
|
189
204
|
/** Optional fetch override — e.g. for Next.js route handlers or test stubs. */
|
|
190
205
|
fetchImpl?: typeof fetch;
|
|
191
206
|
}
|
|
@@ -202,6 +217,12 @@ interface EphemeralSignerSignResult {
|
|
|
202
217
|
signature?: string;
|
|
203
218
|
};
|
|
204
219
|
}
|
|
220
|
+
/**
|
|
221
|
+
* Default MoonX API base URL for the ephemeral-signer routes. Matches the
|
|
222
|
+
* node-sdk's default deployment. Callers override `baseUrl` only for local
|
|
223
|
+
* development or a non-standard environment.
|
|
224
|
+
*/
|
|
225
|
+
declare const DEFAULT_API_BASE_URL = "https://api.moonx-dev.com";
|
|
205
226
|
declare class EphemeralSignerSignError extends Error {
|
|
206
227
|
readonly status?: number | undefined;
|
|
207
228
|
readonly body?: string | undefined;
|
|
@@ -209,4 +230,4 @@ declare class EphemeralSignerSignError extends Error {
|
|
|
209
230
|
}
|
|
210
231
|
declare function signWithEphemeralSigner(input: EphemeralSignerSignInput): Promise<EphemeralSignerSignResult>;
|
|
211
232
|
|
|
212
|
-
export { type AssertPasskeyInParentResult, EphemeralSignerSignError, type EphemeralSignerSignInput, type EphemeralSignerSignResult, type GetInternalPresenceTokensResult, type GetPresenceTokenResult, KvStorage, type LoginWithCodeParams, PasskeyAssertor, RelyingPartyOriginInput, type ScopedPresenceToken, type SendCodeParams, Transport, type VerifyOAuthParams, assertPasskeyInParent, flattenPresenceTokens, getHeadlessAuthenticationMethods, getHeadlessEthereumMethods, getHeadlessGeneralMethods, getHeadlessSolanaMethods, getInternalPresenceTokens, getPresenceToken, signWithEphemeralSigner };
|
|
233
|
+
export { type AssertPasskeyInParentResult, DEFAULT_API_BASE_URL, EphemeralSignerSignError, type EphemeralSignerSignInput, type EphemeralSignerSignResult, type GetInternalPresenceTokensResult, type GetPresenceTokenResult, KvStorage, type LoginWithCodeParams, PasskeyAssertor, type PresenceScope, RelyingPartyOriginInput, SCOPES_ADD_PASSKEY, SCOPES_CREATE_WALLET, SCOPES_EXPORT_KEY, SCOPES_IMPORT_KEY, SCOPES_PROVISION_EPHEMERAL_SIGNER, SCOPES_REMOVE_PASSKEY, SCOPES_REVOKE_EPHEMERAL_SIGNER, SCOPES_SIGN, type ScopedPresenceToken, type SendCodeParams, Transport, type VerifyOAuthParams, assertPasskeyInParent, flattenPresenceTokens, getHeadlessAuthenticationMethods, getHeadlessEthereumMethods, getHeadlessGeneralMethods, getHeadlessSolanaMethods, getInternalPresenceTokens, getPresenceToken, signWithEphemeralSigner };
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -39,11 +39,21 @@ declare const getInternalPresenceTokens: ({ transport, passkey, publishableKey,
|
|
|
39
39
|
passkey: PasskeyAssertor;
|
|
40
40
|
publishableKey: string;
|
|
41
41
|
relyingPartyOrigin: RelyingPartyOriginInput;
|
|
42
|
-
scopes?: string[];
|
|
42
|
+
scopes?: readonly string[];
|
|
43
43
|
scopeCounts?: Record<string, number>;
|
|
44
44
|
}) => Promise<GetInternalPresenceTokensResult>;
|
|
45
45
|
declare const flattenPresenceTokens: (result: Pick<GetInternalPresenceTokensResult, "tokens"> & Partial<GetInternalPresenceTokensResult>) => Record<string, string>;
|
|
46
46
|
|
|
47
|
+
type PresenceScope = "dek_bootstrap" | "keyshare_write" | "keyshare_read" | "passkey_enroll" | "passkey_remove" | "wrap_add" | "ephemeral_signer_revoke" | "sign";
|
|
48
|
+
declare const SCOPES_CREATE_WALLET: readonly PresenceScope[];
|
|
49
|
+
declare const SCOPES_IMPORT_KEY: readonly PresenceScope[];
|
|
50
|
+
declare const SCOPES_REMOVE_PASSKEY: readonly PresenceScope[];
|
|
51
|
+
declare const SCOPES_ADD_PASSKEY: readonly PresenceScope[];
|
|
52
|
+
declare const SCOPES_PROVISION_EPHEMERAL_SIGNER: readonly PresenceScope[];
|
|
53
|
+
declare const SCOPES_REVOKE_EPHEMERAL_SIGNER: readonly PresenceScope[];
|
|
54
|
+
declare const SCOPES_SIGN: readonly PresenceScope[];
|
|
55
|
+
declare const SCOPES_EXPORT_KEY: readonly PresenceScope[];
|
|
56
|
+
|
|
47
57
|
declare const getHeadlessEthereumMethods: ({ transport, passkey, publishableKey, relyingPartyOrigin, }: {
|
|
48
58
|
transport: Transport;
|
|
49
59
|
passkey: PasskeyAssertor;
|
|
@@ -178,14 +188,19 @@ interface EphemeralSignerSignInput {
|
|
|
178
188
|
rawSigningPayloadHex: string;
|
|
179
189
|
/** Defaults to now. SES rejects timestamps further than ±5 min from its clock. */
|
|
180
190
|
issuedAt?: Date;
|
|
181
|
-
/** Wallets backend base URL (no trailing slash). */
|
|
182
|
-
baseUrl: string;
|
|
183
191
|
/**
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
192
|
+
* Wallets backend base URL (no trailing slash). Optional — defaults to
|
|
193
|
+
* {@link DEFAULT_API_BASE_URL}, the standard MoonX deployment. Override
|
|
194
|
+
* only for local/dev or a non-default environment.
|
|
187
195
|
*/
|
|
188
|
-
|
|
196
|
+
baseUrl?: string;
|
|
197
|
+
/**
|
|
198
|
+
* MoonX secret key (`moon_sk_*`). The wallets backend's server-side
|
|
199
|
+
* ephemeral-signer routes (/me/wallets, /sign) are secret-key-only
|
|
200
|
+
* (RequireSecretKey), so every call needs an `Authorization: Bearer
|
|
201
|
+
* <secretKey>` header. Server-only; never expose to the browser.
|
|
202
|
+
*/
|
|
203
|
+
secretKey: string;
|
|
189
204
|
/** Optional fetch override — e.g. for Next.js route handlers or test stubs. */
|
|
190
205
|
fetchImpl?: typeof fetch;
|
|
191
206
|
}
|
|
@@ -202,6 +217,12 @@ interface EphemeralSignerSignResult {
|
|
|
202
217
|
signature?: string;
|
|
203
218
|
};
|
|
204
219
|
}
|
|
220
|
+
/**
|
|
221
|
+
* Default MoonX API base URL for the ephemeral-signer routes. Matches the
|
|
222
|
+
* node-sdk's default deployment. Callers override `baseUrl` only for local
|
|
223
|
+
* development or a non-standard environment.
|
|
224
|
+
*/
|
|
225
|
+
declare const DEFAULT_API_BASE_URL = "https://api.moonx-dev.com";
|
|
205
226
|
declare class EphemeralSignerSignError extends Error {
|
|
206
227
|
readonly status?: number | undefined;
|
|
207
228
|
readonly body?: string | undefined;
|
|
@@ -209,4 +230,4 @@ declare class EphemeralSignerSignError extends Error {
|
|
|
209
230
|
}
|
|
210
231
|
declare function signWithEphemeralSigner(input: EphemeralSignerSignInput): Promise<EphemeralSignerSignResult>;
|
|
211
232
|
|
|
212
|
-
export { type AssertPasskeyInParentResult, EphemeralSignerSignError, type EphemeralSignerSignInput, type EphemeralSignerSignResult, type GetInternalPresenceTokensResult, type GetPresenceTokenResult, KvStorage, type LoginWithCodeParams, PasskeyAssertor, RelyingPartyOriginInput, type ScopedPresenceToken, type SendCodeParams, Transport, type VerifyOAuthParams, assertPasskeyInParent, flattenPresenceTokens, getHeadlessAuthenticationMethods, getHeadlessEthereumMethods, getHeadlessGeneralMethods, getHeadlessSolanaMethods, getInternalPresenceTokens, getPresenceToken, signWithEphemeralSigner };
|
|
233
|
+
export { type AssertPasskeyInParentResult, DEFAULT_API_BASE_URL, EphemeralSignerSignError, type EphemeralSignerSignInput, type EphemeralSignerSignResult, type GetInternalPresenceTokensResult, type GetPresenceTokenResult, KvStorage, type LoginWithCodeParams, PasskeyAssertor, type PresenceScope, RelyingPartyOriginInput, SCOPES_ADD_PASSKEY, SCOPES_CREATE_WALLET, SCOPES_EXPORT_KEY, SCOPES_IMPORT_KEY, SCOPES_PROVISION_EPHEMERAL_SIGNER, SCOPES_REMOVE_PASSKEY, SCOPES_REVOKE_EPHEMERAL_SIGNER, SCOPES_SIGN, type ScopedPresenceToken, type SendCodeParams, Transport, type VerifyOAuthParams, assertPasskeyInParent, flattenPresenceTokens, getHeadlessAuthenticationMethods, getHeadlessEthereumMethods, getHeadlessGeneralMethods, getHeadlessSolanaMethods, getInternalPresenceTokens, getPresenceToken, signWithEphemeralSigner };
|
package/dist/sdk/index.js
CHANGED
|
@@ -30,7 +30,16 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/sdk/index.ts
|
|
31
31
|
var sdk_exports = {};
|
|
32
32
|
__export(sdk_exports, {
|
|
33
|
+
DEFAULT_API_BASE_URL: () => DEFAULT_API_BASE_URL,
|
|
33
34
|
EphemeralSignerSignError: () => EphemeralSignerSignError,
|
|
35
|
+
SCOPES_ADD_PASSKEY: () => SCOPES_ADD_PASSKEY,
|
|
36
|
+
SCOPES_CREATE_WALLET: () => SCOPES_CREATE_WALLET,
|
|
37
|
+
SCOPES_EXPORT_KEY: () => SCOPES_EXPORT_KEY,
|
|
38
|
+
SCOPES_IMPORT_KEY: () => SCOPES_IMPORT_KEY,
|
|
39
|
+
SCOPES_PROVISION_EPHEMERAL_SIGNER: () => SCOPES_PROVISION_EPHEMERAL_SIGNER,
|
|
40
|
+
SCOPES_REMOVE_PASSKEY: () => SCOPES_REMOVE_PASSKEY,
|
|
41
|
+
SCOPES_REVOKE_EPHEMERAL_SIGNER: () => SCOPES_REVOKE_EPHEMERAL_SIGNER,
|
|
42
|
+
SCOPES_SIGN: () => SCOPES_SIGN,
|
|
34
43
|
assertPasskeyInParent: () => assertPasskeyInParent,
|
|
35
44
|
flattenPresenceTokens: () => flattenPresenceTokens,
|
|
36
45
|
getHeadlessAuthenticationMethods: () => getHeadlessAuthenticationMethods,
|
|
@@ -432,8 +441,34 @@ var flattenPresenceTokens = (result) => {
|
|
|
432
441
|
return out;
|
|
433
442
|
};
|
|
434
443
|
|
|
435
|
-
// src/sdk/
|
|
444
|
+
// src/sdk/presence-scopes.ts
|
|
445
|
+
var SCOPES_CREATE_WALLET = [
|
|
446
|
+
"dek_bootstrap",
|
|
447
|
+
"keyshare_write",
|
|
448
|
+
"sign"
|
|
449
|
+
];
|
|
450
|
+
var SCOPES_IMPORT_KEY = [
|
|
451
|
+
"dek_bootstrap",
|
|
452
|
+
"keyshare_write",
|
|
453
|
+
"sign"
|
|
454
|
+
];
|
|
455
|
+
var SCOPES_REMOVE_PASSKEY = [
|
|
456
|
+
"passkey_remove"
|
|
457
|
+
];
|
|
458
|
+
var SCOPES_ADD_PASSKEY = [
|
|
459
|
+
"passkey_enroll",
|
|
460
|
+
"wrap_add"
|
|
461
|
+
];
|
|
462
|
+
var SCOPES_PROVISION_EPHEMERAL_SIGNER = [
|
|
463
|
+
"keyshare_read"
|
|
464
|
+
];
|
|
465
|
+
var SCOPES_REVOKE_EPHEMERAL_SIGNER = [
|
|
466
|
+
"ephemeral_signer_revoke"
|
|
467
|
+
];
|
|
436
468
|
var SCOPES_SIGN = ["keyshare_read", "sign"];
|
|
469
|
+
var SCOPES_EXPORT_KEY = ["keyshare_read"];
|
|
470
|
+
|
|
471
|
+
// src/sdk/headless-ethereum.ts
|
|
437
472
|
var getHeadlessEthereumMethods = ({
|
|
438
473
|
transport,
|
|
439
474
|
passkey,
|
|
@@ -657,7 +692,6 @@ var getHeadlessEthereumMethods = ({
|
|
|
657
692
|
});
|
|
658
693
|
|
|
659
694
|
// src/sdk/headless-solana.ts
|
|
660
|
-
var SCOPES_SIGN2 = ["keyshare_read", "sign"];
|
|
661
695
|
var getHeadlessSolanaMethods = ({
|
|
662
696
|
transport,
|
|
663
697
|
passkey,
|
|
@@ -671,7 +705,7 @@ var getHeadlessSolanaMethods = ({
|
|
|
671
705
|
passkey,
|
|
672
706
|
publishableKey,
|
|
673
707
|
relyingPartyOrigin,
|
|
674
|
-
scopes:
|
|
708
|
+
scopes: SCOPES_SIGN
|
|
675
709
|
});
|
|
676
710
|
const { signature } = await transport.send(
|
|
677
711
|
PostMessageType.WALLET,
|
|
@@ -699,7 +733,7 @@ var getHeadlessSolanaMethods = ({
|
|
|
699
733
|
passkey,
|
|
700
734
|
publishableKey,
|
|
701
735
|
relyingPartyOrigin,
|
|
702
|
-
scopes:
|
|
736
|
+
scopes: SCOPES_SIGN
|
|
703
737
|
});
|
|
704
738
|
const { signedTransaction } = await transport.send(
|
|
705
739
|
PostMessageType.WALLET,
|
|
@@ -727,7 +761,7 @@ var getHeadlessSolanaMethods = ({
|
|
|
727
761
|
passkey,
|
|
728
762
|
publishableKey,
|
|
729
763
|
relyingPartyOrigin,
|
|
730
|
-
scopes:
|
|
764
|
+
scopes: SCOPES_SIGN
|
|
731
765
|
});
|
|
732
766
|
const { signedTransaction } = await transport.send(
|
|
733
767
|
PostMessageType.WALLET,
|
|
@@ -863,11 +897,6 @@ var getHeadlessAuthenticationMethods = ({
|
|
|
863
897
|
});
|
|
864
898
|
|
|
865
899
|
// src/sdk/headless-general.ts
|
|
866
|
-
var SCOPES_CREATE_WALLET = ["dek_bootstrap", "keyshare_write"];
|
|
867
|
-
var SCOPES_IMPORT_KEY = ["dek_bootstrap", "keyshare_write"];
|
|
868
|
-
var SCOPES_REMOVE_PASSKEY = ["passkey_remove"];
|
|
869
|
-
var SCOPES_PROVISION_EPHEMERAL_SIGNER = ["keyshare_read"];
|
|
870
|
-
var SCOPES_REVOKE_EPHEMERAL_SIGNER = ["ephemeral_signer_revoke"];
|
|
871
900
|
var getHeadlessGeneralMethods = ({
|
|
872
901
|
transport,
|
|
873
902
|
passkey,
|
|
@@ -1123,6 +1152,7 @@ var getHeadlessGeneralMethods = ({
|
|
|
1123
1152
|
// src/sdk/ephemeral-signer-sign.ts
|
|
1124
1153
|
var import_ed25519 = require("@noble/curves/ed25519");
|
|
1125
1154
|
var import_utils = require("@noble/hashes/utils");
|
|
1155
|
+
var DEFAULT_API_BASE_URL = "https://api.moonx-dev.com";
|
|
1126
1156
|
function normalizeBase(url) {
|
|
1127
1157
|
return url.replace(/\/+$/, "");
|
|
1128
1158
|
}
|
|
@@ -1147,7 +1177,7 @@ async function resolveBinding(input) {
|
|
|
1147
1177
|
);
|
|
1148
1178
|
const apiPrivBytes = (0, import_utils.hexToBytes)(input.apiPrivHex);
|
|
1149
1179
|
const agentSig = import_ed25519.ed25519.sign(signedBodyBytes, apiPrivBytes);
|
|
1150
|
-
const url = `${normalizeBase(input.baseUrl)}/v0/wallets/ephemeral-signers/me/wallets`;
|
|
1180
|
+
const url = `${normalizeBase(input.baseUrl || DEFAULT_API_BASE_URL)}/v0/wallets/ephemeral-signers/me/wallets`;
|
|
1151
1181
|
const fetchFn = input.fetchImpl ?? fetch;
|
|
1152
1182
|
let response;
|
|
1153
1183
|
try {
|
|
@@ -1155,7 +1185,7 @@ async function resolveBinding(input) {
|
|
|
1155
1185
|
method: "POST",
|
|
1156
1186
|
headers: {
|
|
1157
1187
|
"Content-Type": "application/json",
|
|
1158
|
-
Authorization: `
|
|
1188
|
+
Authorization: `Bearer ${input.secretKey}`
|
|
1159
1189
|
},
|
|
1160
1190
|
body: JSON.stringify({
|
|
1161
1191
|
api_pub: input.apiPubHex,
|
|
@@ -1210,9 +1240,14 @@ async function signWithEphemeralSigner(input) {
|
|
|
1210
1240
|
"rawSigningPayloadHex must be a non-empty lowercase hex string"
|
|
1211
1241
|
);
|
|
1212
1242
|
}
|
|
1213
|
-
if (!input.
|
|
1243
|
+
if (!input.secretKey) {
|
|
1244
|
+
throw new EphemeralSignerSignError(
|
|
1245
|
+
"secretKey is required: the wallets server-side ephemeral-signer routes (/me/wallets, /sign) are secret-key-only"
|
|
1246
|
+
);
|
|
1247
|
+
}
|
|
1248
|
+
if (!input.secretKey.startsWith("moon_sk_")) {
|
|
1214
1249
|
throw new EphemeralSignerSignError(
|
|
1215
|
-
"
|
|
1250
|
+
"secretKey must start with 'moon_sk_' (did you pass a publishable key?)"
|
|
1216
1251
|
);
|
|
1217
1252
|
}
|
|
1218
1253
|
const binding = await resolveBinding(input);
|
|
@@ -1233,7 +1268,7 @@ async function signWithEphemeralSigner(input) {
|
|
|
1233
1268
|
signed_body: (0, import_utils.bytesToHex)(signedBodyBytes),
|
|
1234
1269
|
agent_signature: (0, import_utils.bytesToHex)(agentSig)
|
|
1235
1270
|
};
|
|
1236
|
-
const url = `${normalizeBase(input.baseUrl)}/v0/wallets/ephemeral-signers/sign`;
|
|
1271
|
+
const url = `${normalizeBase(input.baseUrl || DEFAULT_API_BASE_URL)}/v0/wallets/ephemeral-signers/sign`;
|
|
1237
1272
|
const fetchFn = input.fetchImpl ?? fetch;
|
|
1238
1273
|
let response;
|
|
1239
1274
|
try {
|
|
@@ -1241,7 +1276,7 @@ async function signWithEphemeralSigner(input) {
|
|
|
1241
1276
|
method: "POST",
|
|
1242
1277
|
headers: {
|
|
1243
1278
|
"Content-Type": "application/json",
|
|
1244
|
-
Authorization: `
|
|
1279
|
+
Authorization: `Bearer ${input.secretKey}`
|
|
1245
1280
|
},
|
|
1246
1281
|
body: JSON.stringify(requestBody)
|
|
1247
1282
|
});
|
|
@@ -1262,7 +1297,16 @@ async function signWithEphemeralSigner(input) {
|
|
|
1262
1297
|
}
|
|
1263
1298
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1264
1299
|
0 && (module.exports = {
|
|
1300
|
+
DEFAULT_API_BASE_URL,
|
|
1265
1301
|
EphemeralSignerSignError,
|
|
1302
|
+
SCOPES_ADD_PASSKEY,
|
|
1303
|
+
SCOPES_CREATE_WALLET,
|
|
1304
|
+
SCOPES_EXPORT_KEY,
|
|
1305
|
+
SCOPES_IMPORT_KEY,
|
|
1306
|
+
SCOPES_PROVISION_EPHEMERAL_SIGNER,
|
|
1307
|
+
SCOPES_REMOVE_PASSKEY,
|
|
1308
|
+
SCOPES_REVOKE_EPHEMERAL_SIGNER,
|
|
1309
|
+
SCOPES_SIGN,
|
|
1266
1310
|
assertPasskeyInParent,
|
|
1267
1311
|
flattenPresenceTokens,
|
|
1268
1312
|
getHeadlessAuthenticationMethods,
|
package/dist/sdk/index.mjs
CHANGED
|
@@ -142,8 +142,34 @@ var flattenPresenceTokens = (result) => {
|
|
|
142
142
|
return out;
|
|
143
143
|
};
|
|
144
144
|
|
|
145
|
-
// src/sdk/
|
|
145
|
+
// src/sdk/presence-scopes.ts
|
|
146
|
+
var SCOPES_CREATE_WALLET = [
|
|
147
|
+
"dek_bootstrap",
|
|
148
|
+
"keyshare_write",
|
|
149
|
+
"sign"
|
|
150
|
+
];
|
|
151
|
+
var SCOPES_IMPORT_KEY = [
|
|
152
|
+
"dek_bootstrap",
|
|
153
|
+
"keyshare_write",
|
|
154
|
+
"sign"
|
|
155
|
+
];
|
|
156
|
+
var SCOPES_REMOVE_PASSKEY = [
|
|
157
|
+
"passkey_remove"
|
|
158
|
+
];
|
|
159
|
+
var SCOPES_ADD_PASSKEY = [
|
|
160
|
+
"passkey_enroll",
|
|
161
|
+
"wrap_add"
|
|
162
|
+
];
|
|
163
|
+
var SCOPES_PROVISION_EPHEMERAL_SIGNER = [
|
|
164
|
+
"keyshare_read"
|
|
165
|
+
];
|
|
166
|
+
var SCOPES_REVOKE_EPHEMERAL_SIGNER = [
|
|
167
|
+
"ephemeral_signer_revoke"
|
|
168
|
+
];
|
|
146
169
|
var SCOPES_SIGN = ["keyshare_read", "sign"];
|
|
170
|
+
var SCOPES_EXPORT_KEY = ["keyshare_read"];
|
|
171
|
+
|
|
172
|
+
// src/sdk/headless-ethereum.ts
|
|
147
173
|
var getHeadlessEthereumMethods = ({
|
|
148
174
|
transport,
|
|
149
175
|
passkey,
|
|
@@ -367,7 +393,6 @@ var getHeadlessEthereumMethods = ({
|
|
|
367
393
|
});
|
|
368
394
|
|
|
369
395
|
// src/sdk/headless-solana.ts
|
|
370
|
-
var SCOPES_SIGN2 = ["keyshare_read", "sign"];
|
|
371
396
|
var getHeadlessSolanaMethods = ({
|
|
372
397
|
transport,
|
|
373
398
|
passkey,
|
|
@@ -381,7 +406,7 @@ var getHeadlessSolanaMethods = ({
|
|
|
381
406
|
passkey,
|
|
382
407
|
publishableKey,
|
|
383
408
|
relyingPartyOrigin,
|
|
384
|
-
scopes:
|
|
409
|
+
scopes: SCOPES_SIGN
|
|
385
410
|
});
|
|
386
411
|
const { signature } = await transport.send(
|
|
387
412
|
PostMessageType.WALLET,
|
|
@@ -409,7 +434,7 @@ var getHeadlessSolanaMethods = ({
|
|
|
409
434
|
passkey,
|
|
410
435
|
publishableKey,
|
|
411
436
|
relyingPartyOrigin,
|
|
412
|
-
scopes:
|
|
437
|
+
scopes: SCOPES_SIGN
|
|
413
438
|
});
|
|
414
439
|
const { signedTransaction } = await transport.send(
|
|
415
440
|
PostMessageType.WALLET,
|
|
@@ -437,7 +462,7 @@ var getHeadlessSolanaMethods = ({
|
|
|
437
462
|
passkey,
|
|
438
463
|
publishableKey,
|
|
439
464
|
relyingPartyOrigin,
|
|
440
|
-
scopes:
|
|
465
|
+
scopes: SCOPES_SIGN
|
|
441
466
|
});
|
|
442
467
|
const { signedTransaction } = await transport.send(
|
|
443
468
|
PostMessageType.WALLET,
|
|
@@ -573,11 +598,6 @@ var getHeadlessAuthenticationMethods = ({
|
|
|
573
598
|
});
|
|
574
599
|
|
|
575
600
|
// src/sdk/headless-general.ts
|
|
576
|
-
var SCOPES_CREATE_WALLET = ["dek_bootstrap", "keyshare_write"];
|
|
577
|
-
var SCOPES_IMPORT_KEY = ["dek_bootstrap", "keyshare_write"];
|
|
578
|
-
var SCOPES_REMOVE_PASSKEY = ["passkey_remove"];
|
|
579
|
-
var SCOPES_PROVISION_EPHEMERAL_SIGNER = ["keyshare_read"];
|
|
580
|
-
var SCOPES_REVOKE_EPHEMERAL_SIGNER = ["ephemeral_signer_revoke"];
|
|
581
601
|
var getHeadlessGeneralMethods = ({
|
|
582
602
|
transport,
|
|
583
603
|
passkey,
|
|
@@ -833,6 +853,7 @@ var getHeadlessGeneralMethods = ({
|
|
|
833
853
|
// src/sdk/ephemeral-signer-sign.ts
|
|
834
854
|
import { ed25519 } from "@noble/curves/ed25519";
|
|
835
855
|
import { bytesToHex, hexToBytes } from "@noble/hashes/utils";
|
|
856
|
+
var DEFAULT_API_BASE_URL = "https://api.moonx-dev.com";
|
|
836
857
|
function normalizeBase(url) {
|
|
837
858
|
return url.replace(/\/+$/, "");
|
|
838
859
|
}
|
|
@@ -857,7 +878,7 @@ async function resolveBinding(input) {
|
|
|
857
878
|
);
|
|
858
879
|
const apiPrivBytes = hexToBytes(input.apiPrivHex);
|
|
859
880
|
const agentSig = ed25519.sign(signedBodyBytes, apiPrivBytes);
|
|
860
|
-
const url = `${normalizeBase(input.baseUrl)}/v0/wallets/ephemeral-signers/me/wallets`;
|
|
881
|
+
const url = `${normalizeBase(input.baseUrl || DEFAULT_API_BASE_URL)}/v0/wallets/ephemeral-signers/me/wallets`;
|
|
861
882
|
const fetchFn = input.fetchImpl ?? fetch;
|
|
862
883
|
let response;
|
|
863
884
|
try {
|
|
@@ -865,7 +886,7 @@ async function resolveBinding(input) {
|
|
|
865
886
|
method: "POST",
|
|
866
887
|
headers: {
|
|
867
888
|
"Content-Type": "application/json",
|
|
868
|
-
Authorization: `
|
|
889
|
+
Authorization: `Bearer ${input.secretKey}`
|
|
869
890
|
},
|
|
870
891
|
body: JSON.stringify({
|
|
871
892
|
api_pub: input.apiPubHex,
|
|
@@ -920,9 +941,14 @@ async function signWithEphemeralSigner(input) {
|
|
|
920
941
|
"rawSigningPayloadHex must be a non-empty lowercase hex string"
|
|
921
942
|
);
|
|
922
943
|
}
|
|
923
|
-
if (!input.
|
|
944
|
+
if (!input.secretKey) {
|
|
945
|
+
throw new EphemeralSignerSignError(
|
|
946
|
+
"secretKey is required: the wallets server-side ephemeral-signer routes (/me/wallets, /sign) are secret-key-only"
|
|
947
|
+
);
|
|
948
|
+
}
|
|
949
|
+
if (!input.secretKey.startsWith("moon_sk_")) {
|
|
924
950
|
throw new EphemeralSignerSignError(
|
|
925
|
-
"
|
|
951
|
+
"secretKey must start with 'moon_sk_' (did you pass a publishable key?)"
|
|
926
952
|
);
|
|
927
953
|
}
|
|
928
954
|
const binding = await resolveBinding(input);
|
|
@@ -943,7 +969,7 @@ async function signWithEphemeralSigner(input) {
|
|
|
943
969
|
signed_body: bytesToHex(signedBodyBytes),
|
|
944
970
|
agent_signature: bytesToHex(agentSig)
|
|
945
971
|
};
|
|
946
|
-
const url = `${normalizeBase(input.baseUrl)}/v0/wallets/ephemeral-signers/sign`;
|
|
972
|
+
const url = `${normalizeBase(input.baseUrl || DEFAULT_API_BASE_URL)}/v0/wallets/ephemeral-signers/sign`;
|
|
947
973
|
const fetchFn = input.fetchImpl ?? fetch;
|
|
948
974
|
let response;
|
|
949
975
|
try {
|
|
@@ -951,7 +977,7 @@ async function signWithEphemeralSigner(input) {
|
|
|
951
977
|
method: "POST",
|
|
952
978
|
headers: {
|
|
953
979
|
"Content-Type": "application/json",
|
|
954
|
-
Authorization: `
|
|
980
|
+
Authorization: `Bearer ${input.secretKey}`
|
|
955
981
|
},
|
|
956
982
|
body: JSON.stringify(requestBody)
|
|
957
983
|
});
|
|
@@ -971,7 +997,16 @@ async function signWithEphemeralSigner(input) {
|
|
|
971
997
|
return await response.json();
|
|
972
998
|
}
|
|
973
999
|
export {
|
|
1000
|
+
DEFAULT_API_BASE_URL,
|
|
974
1001
|
EphemeralSignerSignError,
|
|
1002
|
+
SCOPES_ADD_PASSKEY,
|
|
1003
|
+
SCOPES_CREATE_WALLET,
|
|
1004
|
+
SCOPES_EXPORT_KEY,
|
|
1005
|
+
SCOPES_IMPORT_KEY,
|
|
1006
|
+
SCOPES_PROVISION_EPHEMERAL_SIGNER,
|
|
1007
|
+
SCOPES_REMOVE_PASSKEY,
|
|
1008
|
+
SCOPES_REVOKE_EPHEMERAL_SIGNER,
|
|
1009
|
+
SCOPES_SIGN,
|
|
975
1010
|
assertPasskeyInParent,
|
|
976
1011
|
flattenPresenceTokens,
|
|
977
1012
|
getHeadlessAuthenticationMethods,
|
package/dist/types/index.d.mts
CHANGED
|
@@ -49,7 +49,6 @@ interface PublicWallet {
|
|
|
49
49
|
id: string;
|
|
50
50
|
app_id: string;
|
|
51
51
|
user_id: string;
|
|
52
|
-
key_id: string;
|
|
53
52
|
key_share: string;
|
|
54
53
|
public_address: string;
|
|
55
54
|
wallet_type: WalletChain;
|
|
@@ -57,6 +56,9 @@ interface PublicWallet {
|
|
|
57
56
|
derivation_path?: string;
|
|
58
57
|
created_at: string;
|
|
59
58
|
}
|
|
59
|
+
interface SessionWallet extends PublicWallet {
|
|
60
|
+
key_id: string;
|
|
61
|
+
}
|
|
60
62
|
interface PublicEthereumWallet extends PublicWallet {
|
|
61
63
|
chainId?: number;
|
|
62
64
|
switchChain?: (targetChainId: number) => Promise<void>;
|
|
@@ -1148,7 +1150,7 @@ interface UsersMeResponse {
|
|
|
1148
1150
|
status?: string;
|
|
1149
1151
|
created_at?: string;
|
|
1150
1152
|
emails: Email[];
|
|
1151
|
-
wallets:
|
|
1153
|
+
wallets: SessionWallet[];
|
|
1152
1154
|
}
|
|
1153
1155
|
interface UsersMePublicResponse {
|
|
1154
1156
|
user_id: string;
|
|
@@ -1326,4 +1328,4 @@ interface WalletVerifyRequest {
|
|
|
1326
1328
|
sessionExpiresIn: number;
|
|
1327
1329
|
}
|
|
1328
1330
|
|
|
1329
|
-
export { type AccessTokenClaims, type AppConfigRequest, type AppConfigResponse, type AttachOAuthTokenRequest, type AttachOAuthTokenResponse, type AuthAppearance, type AuthFlow, type AuthFlowComponent, type AuthLoginMethod, type AuthProviderConfig, type BaseGetBalanceParams, type BaseGetBalanceResult, type BaseGetTokenAccountsParams, type BaseSendTransactionParams, type BaseSendTransactionResult, type BaseSignMessageParams, type BaseSignMessageResult, type BaseSignTransactionParams, type BaseSignTransactionResult, type BaseTokenClaims, type BaseUIOptions, type BaseWalletHooks, type BlockExplorer, type Chain, type ChainLikeWithId, type ContractUIOptions, type CreateWalletResponse, type DefaultFundingMethod, type DeleteSessionRequest, type DeleteSessionResponse, type DetachOAuthTokenRequest, type DeviceFingerprint, type DisplayMode, type EmailOtpConfig, type EmailOtpFlowState, type EphemeralSigner, type EphemeralSignerChain, type EphemeralSignerScheme, type EphemeralSignerWallet, type EthereumChainConfig, type EthereumFundingConfig, type EthereumGetBalanceParams, type EthereumGetBalanceResult, type EthereumGetTokenAccountsByOwnerParams, type EthereumGetTokenAccountsByOwnerResult, type EthereumSendTransactionParams, type EthereumSendTransactionRequest, type EthereumSendTransactionResult, type EthereumSign7702AuthorizationParams, type EthereumSign7702AuthorizationResult, type EthereumSignHashParams, type EthereumSignHashResult, type EthereumSignMessageParams, type EthereumSignMessageResult, type EthereumSignTransactionParams, type EthereumSignTransactionResult, type EthereumSignTypedDataParams, type EthereumSignTypedDataResult, type EthereumSwitchChainParams, type ExportKeyConfig, type Factor, type FlexibleTheme, type FundWalletConfig, type FundingEvents, type FundingMethod, type FundingUIConfig, type GetCurrentSessionRequest, type GetCurrentSessionResponse, type Hex, type IdentityTokenClaims, type IdpProvider, type IsAuthenticatedRequest, type IsAuthenticatedResponse, type ListEphemeralSignersResult, type LoginTokenBundle, type LogoutRequest, type LogoutResponse, type MessageTypeProperty, type MessageTypes, type MoonKeyThemeConfig, type MoonPaySignRequest, type MoonPaySignResponse, type MpcKeyShares, type NativeCurrency, Network, type OAuthRequest, type OAuthResponse, type OnrampFundingSettings, type PasskeyEnrollConfig, type PasskeySettings, type PreferredCardProvider, type PrefillConfig, type PresenceTokenClaims, type ProvisionEphemeralSignerParams, type ProvisionEphemeralSignerResult, type PublicEthereumWallet, type PublicSessionData, type PublicWallet, type RefreshSessionRequest, type RefreshSessionResponse, type RetrieveWalletKeyRequest, type RetrieveWalletKeyResponse, type RevokeEphemeralSignerParams, type RpcConfig, type RpcUrls, type SdkSettings, type SendEmailOtpRequest, type SendEmailOtpResponse, type SendTransactionConfig, type SendTransactionRequest, type SessionData, type SharesDeviceRequest, type SharesDeviceResponse, type Sign7702AuthorizationError, type Sign7702AuthorizationParams, type Sign7702AuthorizationResponse, type Sign7702AuthorizationResult, type SignMessageConfig, type SignTransactionConfig, type SignTypedDataError, type SignTypedDataParams, type SignTypedDataResponse, type SignTypedDataResult, type SmsSettings, type SolanaChain, type SolanaFundingConfig, type SolanaGetBalanceParams, type SolanaGetBalanceResult, type SolanaGetTokenAccountsByOwnerParams, type SolanaGetTokenAccountsByOwnerResult, type SolanaSendTransactionParams, type SolanaSendTransactionResult, type SolanaSignMessageParams, type SolanaSignMessageResult, type SolanaSignTransactionParams, type SolanaSignTransactionResult, type TransactionCommitment, type TransactionEncoding, type TransactionUIOptions, type TypedMessage, type UseFundWalletInterface, type UsersMePublicResponse, type UsersMeRequest, type UsersMeResponse, type VerifiedSession, type VerifyEmailOtpRequest, type VerifyEmailOtpResponse, type VerifyEmailOtpUser, type VerifyOAuthTokenRequest, type VerifyOAuthTokenResponse, type VerifySiweWalletRegistrationRequest, WALLET_ERROR_CODES, type Wallet, type WalletChain, type WalletChainType, type WalletConnectConfig, WalletCreationError, type WalletError, type WalletErrorCode, type WalletKeyRequest, type WalletListEntry, type WalletRegistrationNonceRequest, type WalletRegistrationNonceResponse, type WalletType, type WalletVerifyRequest };
|
|
1331
|
+
export { type AccessTokenClaims, type AppConfigRequest, type AppConfigResponse, type AttachOAuthTokenRequest, type AttachOAuthTokenResponse, type AuthAppearance, type AuthFlow, type AuthFlowComponent, type AuthLoginMethod, type AuthProviderConfig, type BaseGetBalanceParams, type BaseGetBalanceResult, type BaseGetTokenAccountsParams, type BaseSendTransactionParams, type BaseSendTransactionResult, type BaseSignMessageParams, type BaseSignMessageResult, type BaseSignTransactionParams, type BaseSignTransactionResult, type BaseTokenClaims, type BaseUIOptions, type BaseWalletHooks, type BlockExplorer, type Chain, type ChainLikeWithId, type ContractUIOptions, type CreateWalletResponse, type DefaultFundingMethod, type DeleteSessionRequest, type DeleteSessionResponse, type DetachOAuthTokenRequest, type DeviceFingerprint, type DisplayMode, type EmailOtpConfig, type EmailOtpFlowState, type EphemeralSigner, type EphemeralSignerChain, type EphemeralSignerScheme, type EphemeralSignerWallet, type EthereumChainConfig, type EthereumFundingConfig, type EthereumGetBalanceParams, type EthereumGetBalanceResult, type EthereumGetTokenAccountsByOwnerParams, type EthereumGetTokenAccountsByOwnerResult, type EthereumSendTransactionParams, type EthereumSendTransactionRequest, type EthereumSendTransactionResult, type EthereumSign7702AuthorizationParams, type EthereumSign7702AuthorizationResult, type EthereumSignHashParams, type EthereumSignHashResult, type EthereumSignMessageParams, type EthereumSignMessageResult, type EthereumSignTransactionParams, type EthereumSignTransactionResult, type EthereumSignTypedDataParams, type EthereumSignTypedDataResult, type EthereumSwitchChainParams, type ExportKeyConfig, type Factor, type FlexibleTheme, type FundWalletConfig, type FundingEvents, type FundingMethod, type FundingUIConfig, type GetCurrentSessionRequest, type GetCurrentSessionResponse, type Hex, type IdentityTokenClaims, type IdpProvider, type IsAuthenticatedRequest, type IsAuthenticatedResponse, type ListEphemeralSignersResult, type LoginTokenBundle, type LogoutRequest, type LogoutResponse, type MessageTypeProperty, type MessageTypes, type MoonKeyThemeConfig, type MoonPaySignRequest, type MoonPaySignResponse, type MpcKeyShares, type NativeCurrency, Network, type OAuthRequest, type OAuthResponse, type OnrampFundingSettings, type PasskeyEnrollConfig, type PasskeySettings, type PreferredCardProvider, type PrefillConfig, type PresenceTokenClaims, type ProvisionEphemeralSignerParams, type ProvisionEphemeralSignerResult, type PublicEthereumWallet, type PublicSessionData, type PublicWallet, type RefreshSessionRequest, type RefreshSessionResponse, type RetrieveWalletKeyRequest, type RetrieveWalletKeyResponse, type RevokeEphemeralSignerParams, type RpcConfig, type RpcUrls, type SdkSettings, type SendEmailOtpRequest, type SendEmailOtpResponse, type SendTransactionConfig, type SendTransactionRequest, type SessionData, type SessionWallet, type SharesDeviceRequest, type SharesDeviceResponse, type Sign7702AuthorizationError, type Sign7702AuthorizationParams, type Sign7702AuthorizationResponse, type Sign7702AuthorizationResult, type SignMessageConfig, type SignTransactionConfig, type SignTypedDataError, type SignTypedDataParams, type SignTypedDataResponse, type SignTypedDataResult, type SmsSettings, type SolanaChain, type SolanaFundingConfig, type SolanaGetBalanceParams, type SolanaGetBalanceResult, type SolanaGetTokenAccountsByOwnerParams, type SolanaGetTokenAccountsByOwnerResult, type SolanaSendTransactionParams, type SolanaSendTransactionResult, type SolanaSignMessageParams, type SolanaSignMessageResult, type SolanaSignTransactionParams, type SolanaSignTransactionResult, type TransactionCommitment, type TransactionEncoding, type TransactionUIOptions, type TypedMessage, type UseFundWalletInterface, type UsersMePublicResponse, type UsersMeRequest, type UsersMeResponse, type VerifiedSession, type VerifyEmailOtpRequest, type VerifyEmailOtpResponse, type VerifyEmailOtpUser, type VerifyOAuthTokenRequest, type VerifyOAuthTokenResponse, type VerifySiweWalletRegistrationRequest, WALLET_ERROR_CODES, type Wallet, type WalletChain, type WalletChainType, type WalletConnectConfig, WalletCreationError, type WalletError, type WalletErrorCode, type WalletKeyRequest, type WalletListEntry, type WalletRegistrationNonceRequest, type WalletRegistrationNonceResponse, type WalletType, type WalletVerifyRequest };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -49,7 +49,6 @@ interface PublicWallet {
|
|
|
49
49
|
id: string;
|
|
50
50
|
app_id: string;
|
|
51
51
|
user_id: string;
|
|
52
|
-
key_id: string;
|
|
53
52
|
key_share: string;
|
|
54
53
|
public_address: string;
|
|
55
54
|
wallet_type: WalletChain;
|
|
@@ -57,6 +56,9 @@ interface PublicWallet {
|
|
|
57
56
|
derivation_path?: string;
|
|
58
57
|
created_at: string;
|
|
59
58
|
}
|
|
59
|
+
interface SessionWallet extends PublicWallet {
|
|
60
|
+
key_id: string;
|
|
61
|
+
}
|
|
60
62
|
interface PublicEthereumWallet extends PublicWallet {
|
|
61
63
|
chainId?: number;
|
|
62
64
|
switchChain?: (targetChainId: number) => Promise<void>;
|
|
@@ -1148,7 +1150,7 @@ interface UsersMeResponse {
|
|
|
1148
1150
|
status?: string;
|
|
1149
1151
|
created_at?: string;
|
|
1150
1152
|
emails: Email[];
|
|
1151
|
-
wallets:
|
|
1153
|
+
wallets: SessionWallet[];
|
|
1152
1154
|
}
|
|
1153
1155
|
interface UsersMePublicResponse {
|
|
1154
1156
|
user_id: string;
|
|
@@ -1326,4 +1328,4 @@ interface WalletVerifyRequest {
|
|
|
1326
1328
|
sessionExpiresIn: number;
|
|
1327
1329
|
}
|
|
1328
1330
|
|
|
1329
|
-
export { type AccessTokenClaims, type AppConfigRequest, type AppConfigResponse, type AttachOAuthTokenRequest, type AttachOAuthTokenResponse, type AuthAppearance, type AuthFlow, type AuthFlowComponent, type AuthLoginMethod, type AuthProviderConfig, type BaseGetBalanceParams, type BaseGetBalanceResult, type BaseGetTokenAccountsParams, type BaseSendTransactionParams, type BaseSendTransactionResult, type BaseSignMessageParams, type BaseSignMessageResult, type BaseSignTransactionParams, type BaseSignTransactionResult, type BaseTokenClaims, type BaseUIOptions, type BaseWalletHooks, type BlockExplorer, type Chain, type ChainLikeWithId, type ContractUIOptions, type CreateWalletResponse, type DefaultFundingMethod, type DeleteSessionRequest, type DeleteSessionResponse, type DetachOAuthTokenRequest, type DeviceFingerprint, type DisplayMode, type EmailOtpConfig, type EmailOtpFlowState, type EphemeralSigner, type EphemeralSignerChain, type EphemeralSignerScheme, type EphemeralSignerWallet, type EthereumChainConfig, type EthereumFundingConfig, type EthereumGetBalanceParams, type EthereumGetBalanceResult, type EthereumGetTokenAccountsByOwnerParams, type EthereumGetTokenAccountsByOwnerResult, type EthereumSendTransactionParams, type EthereumSendTransactionRequest, type EthereumSendTransactionResult, type EthereumSign7702AuthorizationParams, type EthereumSign7702AuthorizationResult, type EthereumSignHashParams, type EthereumSignHashResult, type EthereumSignMessageParams, type EthereumSignMessageResult, type EthereumSignTransactionParams, type EthereumSignTransactionResult, type EthereumSignTypedDataParams, type EthereumSignTypedDataResult, type EthereumSwitchChainParams, type ExportKeyConfig, type Factor, type FlexibleTheme, type FundWalletConfig, type FundingEvents, type FundingMethod, type FundingUIConfig, type GetCurrentSessionRequest, type GetCurrentSessionResponse, type Hex, type IdentityTokenClaims, type IdpProvider, type IsAuthenticatedRequest, type IsAuthenticatedResponse, type ListEphemeralSignersResult, type LoginTokenBundle, type LogoutRequest, type LogoutResponse, type MessageTypeProperty, type MessageTypes, type MoonKeyThemeConfig, type MoonPaySignRequest, type MoonPaySignResponse, type MpcKeyShares, type NativeCurrency, Network, type OAuthRequest, type OAuthResponse, type OnrampFundingSettings, type PasskeyEnrollConfig, type PasskeySettings, type PreferredCardProvider, type PrefillConfig, type PresenceTokenClaims, type ProvisionEphemeralSignerParams, type ProvisionEphemeralSignerResult, type PublicEthereumWallet, type PublicSessionData, type PublicWallet, type RefreshSessionRequest, type RefreshSessionResponse, type RetrieveWalletKeyRequest, type RetrieveWalletKeyResponse, type RevokeEphemeralSignerParams, type RpcConfig, type RpcUrls, type SdkSettings, type SendEmailOtpRequest, type SendEmailOtpResponse, type SendTransactionConfig, type SendTransactionRequest, type SessionData, type SharesDeviceRequest, type SharesDeviceResponse, type Sign7702AuthorizationError, type Sign7702AuthorizationParams, type Sign7702AuthorizationResponse, type Sign7702AuthorizationResult, type SignMessageConfig, type SignTransactionConfig, type SignTypedDataError, type SignTypedDataParams, type SignTypedDataResponse, type SignTypedDataResult, type SmsSettings, type SolanaChain, type SolanaFundingConfig, type SolanaGetBalanceParams, type SolanaGetBalanceResult, type SolanaGetTokenAccountsByOwnerParams, type SolanaGetTokenAccountsByOwnerResult, type SolanaSendTransactionParams, type SolanaSendTransactionResult, type SolanaSignMessageParams, type SolanaSignMessageResult, type SolanaSignTransactionParams, type SolanaSignTransactionResult, type TransactionCommitment, type TransactionEncoding, type TransactionUIOptions, type TypedMessage, type UseFundWalletInterface, type UsersMePublicResponse, type UsersMeRequest, type UsersMeResponse, type VerifiedSession, type VerifyEmailOtpRequest, type VerifyEmailOtpResponse, type VerifyEmailOtpUser, type VerifyOAuthTokenRequest, type VerifyOAuthTokenResponse, type VerifySiweWalletRegistrationRequest, WALLET_ERROR_CODES, type Wallet, type WalletChain, type WalletChainType, type WalletConnectConfig, WalletCreationError, type WalletError, type WalletErrorCode, type WalletKeyRequest, type WalletListEntry, type WalletRegistrationNonceRequest, type WalletRegistrationNonceResponse, type WalletType, type WalletVerifyRequest };
|
|
1331
|
+
export { type AccessTokenClaims, type AppConfigRequest, type AppConfigResponse, type AttachOAuthTokenRequest, type AttachOAuthTokenResponse, type AuthAppearance, type AuthFlow, type AuthFlowComponent, type AuthLoginMethod, type AuthProviderConfig, type BaseGetBalanceParams, type BaseGetBalanceResult, type BaseGetTokenAccountsParams, type BaseSendTransactionParams, type BaseSendTransactionResult, type BaseSignMessageParams, type BaseSignMessageResult, type BaseSignTransactionParams, type BaseSignTransactionResult, type BaseTokenClaims, type BaseUIOptions, type BaseWalletHooks, type BlockExplorer, type Chain, type ChainLikeWithId, type ContractUIOptions, type CreateWalletResponse, type DefaultFundingMethod, type DeleteSessionRequest, type DeleteSessionResponse, type DetachOAuthTokenRequest, type DeviceFingerprint, type DisplayMode, type EmailOtpConfig, type EmailOtpFlowState, type EphemeralSigner, type EphemeralSignerChain, type EphemeralSignerScheme, type EphemeralSignerWallet, type EthereumChainConfig, type EthereumFundingConfig, type EthereumGetBalanceParams, type EthereumGetBalanceResult, type EthereumGetTokenAccountsByOwnerParams, type EthereumGetTokenAccountsByOwnerResult, type EthereumSendTransactionParams, type EthereumSendTransactionRequest, type EthereumSendTransactionResult, type EthereumSign7702AuthorizationParams, type EthereumSign7702AuthorizationResult, type EthereumSignHashParams, type EthereumSignHashResult, type EthereumSignMessageParams, type EthereumSignMessageResult, type EthereumSignTransactionParams, type EthereumSignTransactionResult, type EthereumSignTypedDataParams, type EthereumSignTypedDataResult, type EthereumSwitchChainParams, type ExportKeyConfig, type Factor, type FlexibleTheme, type FundWalletConfig, type FundingEvents, type FundingMethod, type FundingUIConfig, type GetCurrentSessionRequest, type GetCurrentSessionResponse, type Hex, type IdentityTokenClaims, type IdpProvider, type IsAuthenticatedRequest, type IsAuthenticatedResponse, type ListEphemeralSignersResult, type LoginTokenBundle, type LogoutRequest, type LogoutResponse, type MessageTypeProperty, type MessageTypes, type MoonKeyThemeConfig, type MoonPaySignRequest, type MoonPaySignResponse, type MpcKeyShares, type NativeCurrency, Network, type OAuthRequest, type OAuthResponse, type OnrampFundingSettings, type PasskeyEnrollConfig, type PasskeySettings, type PreferredCardProvider, type PrefillConfig, type PresenceTokenClaims, type ProvisionEphemeralSignerParams, type ProvisionEphemeralSignerResult, type PublicEthereumWallet, type PublicSessionData, type PublicWallet, type RefreshSessionRequest, type RefreshSessionResponse, type RetrieveWalletKeyRequest, type RetrieveWalletKeyResponse, type RevokeEphemeralSignerParams, type RpcConfig, type RpcUrls, type SdkSettings, type SendEmailOtpRequest, type SendEmailOtpResponse, type SendTransactionConfig, type SendTransactionRequest, type SessionData, type SessionWallet, type SharesDeviceRequest, type SharesDeviceResponse, type Sign7702AuthorizationError, type Sign7702AuthorizationParams, type Sign7702AuthorizationResponse, type Sign7702AuthorizationResult, type SignMessageConfig, type SignTransactionConfig, type SignTypedDataError, type SignTypedDataParams, type SignTypedDataResponse, type SignTypedDataResult, type SmsSettings, type SolanaChain, type SolanaFundingConfig, type SolanaGetBalanceParams, type SolanaGetBalanceResult, type SolanaGetTokenAccountsByOwnerParams, type SolanaGetTokenAccountsByOwnerResult, type SolanaSendTransactionParams, type SolanaSendTransactionResult, type SolanaSignMessageParams, type SolanaSignMessageResult, type SolanaSignTransactionParams, type SolanaSignTransactionResult, type TransactionCommitment, type TransactionEncoding, type TransactionUIOptions, type TypedMessage, type UseFundWalletInterface, type UsersMePublicResponse, type UsersMeRequest, type UsersMeResponse, type VerifiedSession, type VerifyEmailOtpRequest, type VerifyEmailOtpResponse, type VerifyEmailOtpUser, type VerifyOAuthTokenRequest, type VerifyOAuthTokenResponse, type VerifySiweWalletRegistrationRequest, WALLET_ERROR_CODES, type Wallet, type WalletChain, type WalletChainType, type WalletConnectConfig, WalletCreationError, type WalletError, type WalletErrorCode, type WalletKeyRequest, type WalletListEntry, type WalletRegistrationNonceRequest, type WalletRegistrationNonceResponse, type WalletType, type WalletVerifyRequest };
|