@privy-io/js-sdk-core 0.71.0 → 0.71.1
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/cjs/index.js +4 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/dts/index.d.mts +141 -107
- package/dist/dts/index.d.ts +141 -107
- package/dist/esm/index.mjs +4 -4
- package/dist/esm/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/dts/index.d.mts
CHANGED
|
@@ -771,46 +771,6 @@ interface Storage {
|
|
|
771
771
|
getKeys(): string[] | Promise<string[]>;
|
|
772
772
|
}
|
|
773
773
|
//#endregion
|
|
774
|
-
//#region src/utils/NonEmptyArray.d.ts
|
|
775
|
-
type NonEmptyArray<T> = [T, ...T[]];
|
|
776
|
-
//#endregion
|
|
777
|
-
//#region src/client/AppApi.d.ts
|
|
778
|
-
declare class AppApi {
|
|
779
|
-
private _smartWalletConfig;
|
|
780
|
-
getConfig(): import("@privy-io/api-types").AppResponse | undefined;
|
|
781
|
-
getSmartWalletConfig(): Promise<SmartWalletConfiguration>;
|
|
782
|
-
get appId(): string;
|
|
783
|
-
}
|
|
784
|
-
//#endregion
|
|
785
|
-
//#region src/client/CrossAppApi.d.ts
|
|
786
|
-
declare class CrossAppApi {
|
|
787
|
-
/** Defines the format of the storage key for provider access tokens */
|
|
788
|
-
private static providerAccessTokenStorageKey;
|
|
789
|
-
/**
|
|
790
|
-
* Updates the stored token information of a given cross-app provider.
|
|
791
|
-
* @param providerAppId the Privy app ID to which the oauth tokens correspond.
|
|
792
|
-
* @param tokens should be the result of cross app authentication (be it login or linking).
|
|
793
|
-
*/
|
|
794
|
-
updateOnCrossAppAuthentication(providerAppId: string, tokens: OAuthTokens): Promise<void>;
|
|
795
|
-
/**
|
|
796
|
-
* Returns the last known access token for a given cross-app provider.
|
|
797
|
-
* @param providerAppId the Privy app ID on which you want to act.
|
|
798
|
-
*/
|
|
799
|
-
getProviderAccessToken(providerAppId: string): Promise<string | null>;
|
|
800
|
-
/**
|
|
801
|
-
* Fetches the metadata of all cross-app connections for the current app.
|
|
802
|
-
*/
|
|
803
|
-
getCrossAppConnections(): Promise<import("@privy-io/api-types").CrossAppConnectionsResponse>;
|
|
804
|
-
}
|
|
805
|
-
//#endregion
|
|
806
|
-
//#region src/client/DelegatedWalletsApi.d.ts
|
|
807
|
-
declare class DelegatedWalletsApi {
|
|
808
|
-
/**
|
|
809
|
-
* Revokes delegation permission of all the wallets associated with the user.
|
|
810
|
-
*/
|
|
811
|
-
revoke(): Promise<void>;
|
|
812
|
-
}
|
|
813
|
-
//#endregion
|
|
814
774
|
//#region src/embedded/EmbeddedSolanaWalletProvider.d.ts
|
|
815
775
|
type SignMessageRequestArguments = {
|
|
816
776
|
method: 'signMessage';
|
|
@@ -864,6 +824,122 @@ declare class EmbeddedSolanaWalletProvider {
|
|
|
864
824
|
toJSON(): string;
|
|
865
825
|
}
|
|
866
826
|
//#endregion
|
|
827
|
+
//#region src/client/logger.d.ts
|
|
828
|
+
type LogLevel = 'NONE' | 'ERROR' | 'WARN' | 'INFO' | 'DEBUG';
|
|
829
|
+
/**
|
|
830
|
+
* Interface for a logger for the privy client SDK
|
|
831
|
+
*/
|
|
832
|
+
type Logger = {
|
|
833
|
+
readonly level: LogLevel;
|
|
834
|
+
readonly info: Console['log'];
|
|
835
|
+
readonly warn: Console['warn'];
|
|
836
|
+
readonly error: Console['error'];
|
|
837
|
+
readonly debug: Console['debug'];
|
|
838
|
+
};
|
|
839
|
+
//#endregion
|
|
840
|
+
//#region src/types.d.ts
|
|
841
|
+
type PrivyEmbeddedWalletProvider = EmbeddedWalletProvider;
|
|
842
|
+
type PrivyEmbeddedSolanaWalletProvider = EmbeddedSolanaWalletProvider;
|
|
843
|
+
/**
|
|
844
|
+
* How the SDK should treat the cookie mirror of the session tokens.
|
|
845
|
+
* `'default'` - write them where the environment supports it.
|
|
846
|
+
* `'never'` - do not write them at all.
|
|
847
|
+
*
|
|
848
|
+
* A third behavior, forcing writes in an environment that skips them, is deliberately
|
|
849
|
+
* not offered: the environments that skip cookies are ones where a write would land on
|
|
850
|
+
* an origin the SDK does not own.
|
|
851
|
+
*/
|
|
852
|
+
type CookieWriteBehavior = 'default' | 'never';
|
|
853
|
+
declare const EMBEDDED_WALLET_CLIENT_TYPES: readonly ['privy'];
|
|
854
|
+
type EmbeddedWalletClientType = (typeof EMBEDDED_WALLET_CLIENT_TYPES)[number];
|
|
855
|
+
declare const INJECTED_WALLET_CLIENT_TYPES: readonly ['metamask', 'phantom', 'brave_wallet', 'rainbow'];
|
|
856
|
+
type InjectedWalletClientType = (typeof INJECTED_WALLET_CLIENT_TYPES)[number];
|
|
857
|
+
declare const COINBASE_WALLET_CLIENT_TYPES: readonly ['coinbase_wallet'];
|
|
858
|
+
type CoinbaseWalletClientType = (typeof COINBASE_WALLET_CLIENT_TYPES)[number];
|
|
859
|
+
type WalletConnectWalletClientType = (typeof WALLET_CONNECT_WALLET_CLIENT_TYPES)[number];
|
|
860
|
+
declare const UNKNOWN_WALLET_CLIENT_TYPES: readonly ['unknown'];
|
|
861
|
+
type UnknownWalletClientType = (typeof UNKNOWN_WALLET_CLIENT_TYPES)[number];
|
|
862
|
+
declare const ALL_WALLET_CLIENT_TYPES: ("1inch" | "abc_wallet" | "alphawallet" | "ambire" | "arculus_wallet" | "argent" | "avacus" | "bee" | "binance" | "bitget_wallet" | "bitizen" | "blockchain" | "blocto" | "brave_wallet" | "broearn" | "burrito_wallet" | "cling_wallet" | "coin98" | "coinbase_wallet" | "copiosa" | "cryptocom" | "enjin_wallet" | "exodus" | "haha" | "internet_money_wallet" | "keyring_pro" | "kriptonio" | "kryptogo" | "mathwallet" | "metamask" | "mew_wallet" | "minerva" | "obvious" | "omni" | "phantom" | "pitaka" | "plasma_wallet" | "pltwallet" | "prema" | "privy" | "rainbow" | "safe" | "safemoon" | "safepal" | "secux" | "slingshot" | "spot" | "timeless" | "trust" | "uniswap" | "unknown" | "unstoppable" | "zengo" | "zerion")[];
|
|
863
|
+
type WalletClientType = InjectedWalletClientType | CoinbaseWalletClientType | WalletConnectWalletClientType | EmbeddedWalletClientType | UnknownWalletClientType;
|
|
864
|
+
declare const SUPPORTED_CONNECTOR_TYPES: readonly ['injected', 'wallet_connect', 'wallet_connect_v2', 'coinbase_wallet', 'embedded'];
|
|
865
|
+
type ConnectorType = (typeof SUPPORTED_CONNECTOR_TYPES)[number];
|
|
866
|
+
type WalletBranding = {
|
|
867
|
+
/** The display name for the wallet. */
|
|
868
|
+
name: string;
|
|
869
|
+
/** Unique identifier for this wallet, can be RDNS or other unique data. */
|
|
870
|
+
id: string;
|
|
871
|
+
/** Wallet brand icon url. */
|
|
872
|
+
icon?: string;
|
|
873
|
+
};
|
|
874
|
+
type ExternalWalletMetadata = {
|
|
875
|
+
/** The wallet name (e.g. MetaMask). */
|
|
876
|
+
name: string;
|
|
877
|
+
/** The wallet RDNS, falls back to the wallet name if none is available. */
|
|
878
|
+
id: string;
|
|
879
|
+
/** The wallet logo */
|
|
880
|
+
icon?: string;
|
|
881
|
+
};
|
|
882
|
+
/**
|
|
883
|
+
* Wallet to request a [Sign-In With Ethereum](https://eips.ethereum.org/EIPS/eip-4361) signature from
|
|
884
|
+
*/
|
|
885
|
+
type ExternalWallet = {
|
|
886
|
+
/** [EIP-55](https://eips.ethereum.org/EIPS/eip-55) mixed-case checksum-encoded address */
|
|
887
|
+
address: string;
|
|
888
|
+
/** [EIP-155](https://eips.ethereum.org/EIPS/eip-155) Chain ID with [CAIP-2](https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-2.md) formatting */
|
|
889
|
+
chainId: string;
|
|
890
|
+
/**
|
|
891
|
+
* The wallet client where this key-pair is stored.
|
|
892
|
+
* e.g. `metamask`, `rainbow`, `coinbase_wallet`, etc.
|
|
893
|
+
*/
|
|
894
|
+
walletClientType?: WalletClientType;
|
|
895
|
+
/**
|
|
896
|
+
* The connector used to initiate the connection with the wallet client.
|
|
897
|
+
* e.g. `injected`, `wallet_connect`, `coinbase_wallet`, etc.
|
|
898
|
+
*/
|
|
899
|
+
connectorType?: ConnectorType;
|
|
900
|
+
meta?: ExternalWalletMetadata;
|
|
901
|
+
};
|
|
902
|
+
//#endregion
|
|
903
|
+
//#region src/utils/NonEmptyArray.d.ts
|
|
904
|
+
type NonEmptyArray<T> = [T, ...T[]];
|
|
905
|
+
//#endregion
|
|
906
|
+
//#region src/client/AppApi.d.ts
|
|
907
|
+
declare class AppApi {
|
|
908
|
+
private _smartWalletConfig;
|
|
909
|
+
getConfig(): import("@privy-io/api-types").AppResponse | undefined;
|
|
910
|
+
getSmartWalletConfig(): Promise<SmartWalletConfiguration>;
|
|
911
|
+
get appId(): string;
|
|
912
|
+
}
|
|
913
|
+
//#endregion
|
|
914
|
+
//#region src/client/CrossAppApi.d.ts
|
|
915
|
+
declare class CrossAppApi {
|
|
916
|
+
/** Defines the format of the storage key for provider access tokens */
|
|
917
|
+
private static providerAccessTokenStorageKey;
|
|
918
|
+
/**
|
|
919
|
+
* Updates the stored token information of a given cross-app provider.
|
|
920
|
+
* @param providerAppId the Privy app ID to which the oauth tokens correspond.
|
|
921
|
+
* @param tokens should be the result of cross app authentication (be it login or linking).
|
|
922
|
+
*/
|
|
923
|
+
updateOnCrossAppAuthentication(providerAppId: string, tokens: OAuthTokens): Promise<void>;
|
|
924
|
+
/**
|
|
925
|
+
* Returns the last known access token for a given cross-app provider.
|
|
926
|
+
* @param providerAppId the Privy app ID on which you want to act.
|
|
927
|
+
*/
|
|
928
|
+
getProviderAccessToken(providerAppId: string): Promise<string | null>;
|
|
929
|
+
/**
|
|
930
|
+
* Fetches the metadata of all cross-app connections for the current app.
|
|
931
|
+
*/
|
|
932
|
+
getCrossAppConnections(): Promise<import("@privy-io/api-types").CrossAppConnectionsResponse>;
|
|
933
|
+
}
|
|
934
|
+
//#endregion
|
|
935
|
+
//#region src/client/DelegatedWalletsApi.d.ts
|
|
936
|
+
declare class DelegatedWalletsApi {
|
|
937
|
+
/**
|
|
938
|
+
* Revokes delegation permission of all the wallets associated with the user.
|
|
939
|
+
*/
|
|
940
|
+
revoke(): Promise<void>;
|
|
941
|
+
}
|
|
942
|
+
//#endregion
|
|
867
943
|
//#region src/embedded/EmbeddedBitcoinWalletProvider.d.ts
|
|
868
944
|
/**
|
|
869
945
|
* Privy embedded wallet provider for Bitcoin accounts.
|
|
@@ -1418,72 +1494,6 @@ declare class PhoneApi {
|
|
|
1418
1494
|
}>;
|
|
1419
1495
|
}
|
|
1420
1496
|
//#endregion
|
|
1421
|
-
//#region src/client/logger.d.ts
|
|
1422
|
-
type LogLevel = 'NONE' | 'ERROR' | 'WARN' | 'INFO' | 'DEBUG';
|
|
1423
|
-
/**
|
|
1424
|
-
* Interface for a logger for the privy client SDK
|
|
1425
|
-
*/
|
|
1426
|
-
type Logger = {
|
|
1427
|
-
readonly level: LogLevel;
|
|
1428
|
-
readonly info: Console['log'];
|
|
1429
|
-
readonly warn: Console['warn'];
|
|
1430
|
-
readonly error: Console['error'];
|
|
1431
|
-
readonly debug: Console['debug'];
|
|
1432
|
-
};
|
|
1433
|
-
//#endregion
|
|
1434
|
-
//#region src/types.d.ts
|
|
1435
|
-
type PrivyEmbeddedWalletProvider = EmbeddedWalletProvider;
|
|
1436
|
-
type PrivyEmbeddedSolanaWalletProvider = EmbeddedSolanaWalletProvider;
|
|
1437
|
-
declare const EMBEDDED_WALLET_CLIENT_TYPES: readonly ['privy'];
|
|
1438
|
-
type EmbeddedWalletClientType = (typeof EMBEDDED_WALLET_CLIENT_TYPES)[number];
|
|
1439
|
-
declare const INJECTED_WALLET_CLIENT_TYPES: readonly ['metamask', 'phantom', 'brave_wallet', 'rainbow'];
|
|
1440
|
-
type InjectedWalletClientType = (typeof INJECTED_WALLET_CLIENT_TYPES)[number];
|
|
1441
|
-
declare const COINBASE_WALLET_CLIENT_TYPES: readonly ['coinbase_wallet'];
|
|
1442
|
-
type CoinbaseWalletClientType = (typeof COINBASE_WALLET_CLIENT_TYPES)[number];
|
|
1443
|
-
type WalletConnectWalletClientType = (typeof WALLET_CONNECT_WALLET_CLIENT_TYPES)[number];
|
|
1444
|
-
declare const UNKNOWN_WALLET_CLIENT_TYPES: readonly ['unknown'];
|
|
1445
|
-
type UnknownWalletClientType = (typeof UNKNOWN_WALLET_CLIENT_TYPES)[number];
|
|
1446
|
-
declare const ALL_WALLET_CLIENT_TYPES: ("1inch" | "abc_wallet" | "alphawallet" | "ambire" | "arculus_wallet" | "argent" | "avacus" | "bee" | "binance" | "bitget_wallet" | "bitizen" | "blockchain" | "blocto" | "brave_wallet" | "broearn" | "burrito_wallet" | "cling_wallet" | "coin98" | "coinbase_wallet" | "copiosa" | "cryptocom" | "enjin_wallet" | "exodus" | "haha" | "internet_money_wallet" | "keyring_pro" | "kriptonio" | "kryptogo" | "mathwallet" | "metamask" | "mew_wallet" | "minerva" | "obvious" | "omni" | "phantom" | "pitaka" | "plasma_wallet" | "pltwallet" | "prema" | "privy" | "rainbow" | "safe" | "safemoon" | "safepal" | "secux" | "slingshot" | "spot" | "timeless" | "trust" | "uniswap" | "unknown" | "unstoppable" | "zengo" | "zerion")[];
|
|
1447
|
-
type WalletClientType = InjectedWalletClientType | CoinbaseWalletClientType | WalletConnectWalletClientType | EmbeddedWalletClientType | UnknownWalletClientType;
|
|
1448
|
-
declare const SUPPORTED_CONNECTOR_TYPES: readonly ['injected', 'wallet_connect', 'wallet_connect_v2', 'coinbase_wallet', 'embedded'];
|
|
1449
|
-
type ConnectorType = (typeof SUPPORTED_CONNECTOR_TYPES)[number];
|
|
1450
|
-
type WalletBranding = {
|
|
1451
|
-
/** The display name for the wallet. */
|
|
1452
|
-
name: string;
|
|
1453
|
-
/** Unique identifier for this wallet, can be RDNS or other unique data. */
|
|
1454
|
-
id: string;
|
|
1455
|
-
/** Wallet brand icon url. */
|
|
1456
|
-
icon?: string;
|
|
1457
|
-
};
|
|
1458
|
-
type ExternalWalletMetadata = {
|
|
1459
|
-
/** The wallet name (e.g. MetaMask). */
|
|
1460
|
-
name: string;
|
|
1461
|
-
/** The wallet RDNS, falls back to the wallet name if none is available. */
|
|
1462
|
-
id: string;
|
|
1463
|
-
/** The wallet logo */
|
|
1464
|
-
icon?: string;
|
|
1465
|
-
};
|
|
1466
|
-
/**
|
|
1467
|
-
* Wallet to request a [Sign-In With Ethereum](https://eips.ethereum.org/EIPS/eip-4361) signature from
|
|
1468
|
-
*/
|
|
1469
|
-
type ExternalWallet = {
|
|
1470
|
-
/** [EIP-55](https://eips.ethereum.org/EIPS/eip-55) mixed-case checksum-encoded address */
|
|
1471
|
-
address: string;
|
|
1472
|
-
/** [EIP-155](https://eips.ethereum.org/EIPS/eip-155) Chain ID with [CAIP-2](https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-2.md) formatting */
|
|
1473
|
-
chainId: string;
|
|
1474
|
-
/**
|
|
1475
|
-
* The wallet client where this key-pair is stored.
|
|
1476
|
-
* e.g. `metamask`, `rainbow`, `coinbase_wallet`, etc.
|
|
1477
|
-
*/
|
|
1478
|
-
walletClientType?: WalletClientType;
|
|
1479
|
-
/**
|
|
1480
|
-
* The connector used to initiate the connection with the wallet client.
|
|
1481
|
-
* e.g. `injected`, `wallet_connect`, `coinbase_wallet`, etc.
|
|
1482
|
-
*/
|
|
1483
|
-
connectorType?: ConnectorType;
|
|
1484
|
-
meta?: ExternalWalletMetadata;
|
|
1485
|
-
};
|
|
1486
|
-
//#endregion
|
|
1487
1497
|
//#region src/client/auth/SiweApi.d.ts
|
|
1488
1498
|
/**
|
|
1489
1499
|
* [Sign-In With Ethereum](https://eips.ethereum.org/EIPS/eip-4361) auth flow.
|
|
@@ -2106,6 +2116,15 @@ type PrivyOptions = {
|
|
|
2106
2116
|
* @default 'single-user'
|
|
2107
2117
|
*/
|
|
2108
2118
|
mode?: 'single-user' | 'multi-user';
|
|
2119
|
+
/**
|
|
2120
|
+
* @experimental
|
|
2121
|
+
*
|
|
2122
|
+
* How to treat the cookie mirror of the session tokens. Cookies are only read by a
|
|
2123
|
+
* same-origin server, never by Privy, so `'never'` does not affect auth.
|
|
2124
|
+
*
|
|
2125
|
+
* @default 'default'
|
|
2126
|
+
*/
|
|
2127
|
+
cookieWriteBehavior?: CookieWriteBehavior;
|
|
2109
2128
|
};
|
|
2110
2129
|
};
|
|
2111
2130
|
/**
|
|
@@ -2191,6 +2210,21 @@ declare class Privy {
|
|
|
2191
2210
|
get logger(): Logger;
|
|
2192
2211
|
}
|
|
2193
2212
|
//#endregion
|
|
2213
|
+
//#region src/utils/is-extension-context.d.ts
|
|
2214
|
+
declare const isExtensionContext: () => boolean;
|
|
2215
|
+
//#endregion
|
|
2216
|
+
//#region src/session/cookies.d.ts
|
|
2217
|
+
type CookieOptions = Cookies.CookieAttributes;
|
|
2218
|
+
declare const cookies: {
|
|
2219
|
+
get(key: string): string | undefined;
|
|
2220
|
+
set(key: string, value: string, options: CookieOptions): void;
|
|
2221
|
+
remove(key: string): void;
|
|
2222
|
+
};
|
|
2223
|
+
declare const shouldWriteSessionCookies: ({ useServerCookies, cookieWriteBehavior }: {
|
|
2224
|
+
useServerCookies: boolean | undefined;
|
|
2225
|
+
cookieWriteBehavior: CookieWriteBehavior | undefined;
|
|
2226
|
+
}) => boolean;
|
|
2227
|
+
//#endregion
|
|
2194
2228
|
//#region src/storage/LocalStorage.d.ts
|
|
2195
2229
|
declare class LocalStorage implements Storage {
|
|
2196
2230
|
get(key: string): Promise<any>;
|
|
@@ -3248,4 +3282,4 @@ declare const THIRDWEB: "thirdweb";
|
|
|
3248
3282
|
/** @deprecated {@link SmartWalletType} is a well-typed union, use the `'nexus'` literal instead */
|
|
3249
3283
|
declare const NEXUS: "nexus";
|
|
3250
3284
|
//#endregion
|
|
3251
|
-
export { ALL_WALLET_CLIENT_TYPES, BICONOMY, COINBASE_SMART_WALLET, Cluster, type CoinbaseAssetId, CoinbaseWalletClientType, type CompletedDepositAddressOrder, ConnectedStandardSolanaWallet, ConnectorType, type CountryCallingCode, type CountryCode, type CreateSiwsMessageOpts, type DepositAddressOrder, type DepositAddressPollingResult, type DepositAddressQuote, type DepositConfig, type EIP1193Provider, type EmbeddedBitcoinWalletProvider, EmbeddedProviderError, EmbeddedWalletClientType, type EmbeddedWalletConfig, type EmbeddedWalletRecoveryOptions, type EntropyIdVerifier, type ErrorMessageMap, ExternalWallet, ExternalWalletMetadata, FundingMethod, FundingProvider, type GenerateAuthorizationSignatureInput, type GenerateAuthorizationSignatureOutput, type GenerateDepositAddressInput, type GetDepositInput, IdentifierString, InMemoryCache, type IncompleteDepositAddressOrder, InjectedWalletClientType, KERNEL, LIGHT_ACCOUNT, LocalStorage, type LogLevel, type Logger, type MfaMethod, type MfaPromise, type MfaSubmitArgs, type MfaSubmitPromise, MoonpayApiError, type MoonpayTransactionStatus, type MoonpayTransactionStatusResponse, NEXUS, type OAuthProviderID, OAuthProviderType, type OnNeedsRecovery, type ParsedSolanaOffchainMessage, PaymentOption, type PollOptions, type PollResult, type PreparedTransactionRequest, PrivyApiError, PrivyClientError, PrivyConnectorError, PrivyEmbeddedSolanaWalletProvider, PrivyEmbeddedWalletErrorCode, PrivyEmbeddedWalletProvider, PrivyProviderRpcError, ProviderErrors, type Quantity, type ResolveRefundAddressError, type ResolveRefundAddressResult, SAFE, SUPPORTED_CONNECTOR_TYPES, type SetRecoveryInput, SmartWalletType, SolanaClient, SolanaCluster, SolanaSignAndSendTransactionInput, SolanaSignAndSendTransactionMode, SolanaSignAndSendTransactionOptions, SolanaSignAndSendTransactionOutput, SolanaSignMessageInput, SolanaSignMessageOutput, SolanaSignTransactionInput, SolanaSignTransactionOptions, SolanaSignTransactionOutput, SolanaStandardWallet, SolanaTransactionCommitment, SolanaUsdcAddressMap, type Storage, THIRDWEB, type TelegramAuthInput, type TelegramAuthResult, type TelegramWebAppData, UnknownWalletClientType, type UnsignedTransactionRequest, type UnsignedTransactionRequestWithChainId, UsdcAddressMap, type WaitForCompletionInput, type WaitForDepositInput, WalletBranding, WalletClientType, WalletConnectWalletClientType, addSessionSigners, buildSolanaOffchainMessage, chainToMoonpayCurrency, countryCodesAndNumbers, create, createErrorFormatter, createSiwsMessage, index_d_exports as crossApp, Privy as default, index_d_exports$1 as delegatedActions, index_d_exports$2 as depositAddress, deriveSolanaApplicationDomain, errorIndicatesMaxMfaRetries, errorIndicatesMfaCanceled, errorIndicatesMfaRateLimit, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, errorIndicatesRecoveryIsNeeded, formatLamportsAmount, formatPhoneNumber, formatTokenAmount, formatWalletAddress, formatWeiAmount, fundingMethodToMoonpayPaymentMethod, generateAuthorizationSignature, generateWalletIdempotencyKey, getAllUserEmbeddedBitcoinWallets, getAllUserEmbeddedEthereumWallets, getAllUserEmbeddedSolanaWallets, getCoinbaseOnRampUrl, getCountryCallingCode, getEntropyDetailsFromAccount, getEntropyDetailsFromUser, getIsTokenUsdc, getJsonRpcEndpointFromChain, getPhoneCountryCodeAndNumber, getPlaceholderPhoneNumber, getSolanaClusterDisplayName, getSolanaRpcEndpointForCluster, getSolanaUsdcMintAddressForCluster, getUserEmbeddedEthereumWallet, getUserEmbeddedSolanaWallet, getUserEmbeddedWallet, getUserSmartWallet, getWallet, isEmbeddedWalletAccount, isSupportedChainIdForCoinbaseOnramp, isSupportedChainIdForMoonpay, isUnifiedWallet, lastFourDigits, parseSolanaOffchainMessage, phoneNumberTypingFormatter, poll, rawSign, removeSessionSigners, rpc, throwIfInvalidRecoveryUpgradePath, toCoinbaseAssetId, toCoinbaseBlockchainFromChainId, toE164, toObjectKeys, toWalletApiUnsignedEthTransaction, updateWallet, validatePhoneNumber };
|
|
3285
|
+
export { ALL_WALLET_CLIENT_TYPES, BICONOMY, COINBASE_SMART_WALLET, Cluster, type CoinbaseAssetId, CoinbaseWalletClientType, type CompletedDepositAddressOrder, ConnectedStandardSolanaWallet, ConnectorType, CookieWriteBehavior, type CountryCallingCode, type CountryCode, type CreateSiwsMessageOpts, type DepositAddressOrder, type DepositAddressPollingResult, type DepositAddressQuote, type DepositConfig, type EIP1193Provider, type EmbeddedBitcoinWalletProvider, EmbeddedProviderError, EmbeddedWalletClientType, type EmbeddedWalletConfig, type EmbeddedWalletRecoveryOptions, type EntropyIdVerifier, type ErrorMessageMap, ExternalWallet, ExternalWalletMetadata, FundingMethod, FundingProvider, type GenerateAuthorizationSignatureInput, type GenerateAuthorizationSignatureOutput, type GenerateDepositAddressInput, type GetDepositInput, IdentifierString, InMemoryCache, type IncompleteDepositAddressOrder, InjectedWalletClientType, KERNEL, LIGHT_ACCOUNT, LocalStorage, type LogLevel, type Logger, type MfaMethod, type MfaPromise, type MfaSubmitArgs, type MfaSubmitPromise, MoonpayApiError, type MoonpayTransactionStatus, type MoonpayTransactionStatusResponse, NEXUS, type OAuthProviderID, OAuthProviderType, type OnNeedsRecovery, type ParsedSolanaOffchainMessage, PaymentOption, type PollOptions, type PollResult, type PreparedTransactionRequest, PrivyApiError, PrivyClientError, PrivyConnectorError, PrivyEmbeddedSolanaWalletProvider, PrivyEmbeddedWalletErrorCode, PrivyEmbeddedWalletProvider, PrivyProviderRpcError, ProviderErrors, type Quantity, type ResolveRefundAddressError, type ResolveRefundAddressResult, SAFE, SUPPORTED_CONNECTOR_TYPES, type SetRecoveryInput, SmartWalletType, SolanaClient, SolanaCluster, SolanaSignAndSendTransactionInput, SolanaSignAndSendTransactionMode, SolanaSignAndSendTransactionOptions, SolanaSignAndSendTransactionOutput, SolanaSignMessageInput, SolanaSignMessageOutput, SolanaSignTransactionInput, SolanaSignTransactionOptions, SolanaSignTransactionOutput, SolanaStandardWallet, SolanaTransactionCommitment, SolanaUsdcAddressMap, type Storage, THIRDWEB, type TelegramAuthInput, type TelegramAuthResult, type TelegramWebAppData, UnknownWalletClientType, type UnsignedTransactionRequest, type UnsignedTransactionRequestWithChainId, UsdcAddressMap, type WaitForCompletionInput, type WaitForDepositInput, WalletBranding, WalletClientType, WalletConnectWalletClientType, addSessionSigners, buildSolanaOffchainMessage, chainToMoonpayCurrency, cookies, countryCodesAndNumbers, create, createErrorFormatter, createSiwsMessage, index_d_exports as crossApp, Privy as default, index_d_exports$1 as delegatedActions, index_d_exports$2 as depositAddress, deriveSolanaApplicationDomain, errorIndicatesMaxMfaRetries, errorIndicatesMfaCanceled, errorIndicatesMfaRateLimit, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, errorIndicatesRecoveryIsNeeded, formatLamportsAmount, formatPhoneNumber, formatTokenAmount, formatWalletAddress, formatWeiAmount, fundingMethodToMoonpayPaymentMethod, generateAuthorizationSignature, generateWalletIdempotencyKey, getAllUserEmbeddedBitcoinWallets, getAllUserEmbeddedEthereumWallets, getAllUserEmbeddedSolanaWallets, getCoinbaseOnRampUrl, getCountryCallingCode, getEntropyDetailsFromAccount, getEntropyDetailsFromUser, getIsTokenUsdc, getJsonRpcEndpointFromChain, getPhoneCountryCodeAndNumber, getPlaceholderPhoneNumber, getSolanaClusterDisplayName, getSolanaRpcEndpointForCluster, getSolanaUsdcMintAddressForCluster, getUserEmbeddedEthereumWallet, getUserEmbeddedSolanaWallet, getUserEmbeddedWallet, getUserSmartWallet, getWallet, isEmbeddedWalletAccount, isExtensionContext, isSupportedChainIdForCoinbaseOnramp, isSupportedChainIdForMoonpay, isUnifiedWallet, lastFourDigits, parseSolanaOffchainMessage, phoneNumberTypingFormatter, poll, rawSign, removeSessionSigners, rpc, shouldWriteSessionCookies, throwIfInvalidRecoveryUpgradePath, toCoinbaseAssetId, toCoinbaseBlockchainFromChainId, toE164, toObjectKeys, toWalletApiUnsignedEthTransaction, updateWallet, validatePhoneNumber };
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -771,46 +771,6 @@ interface Storage {
|
|
|
771
771
|
getKeys(): string[] | Promise<string[]>;
|
|
772
772
|
}
|
|
773
773
|
//#endregion
|
|
774
|
-
//#region src/utils/NonEmptyArray.d.ts
|
|
775
|
-
type NonEmptyArray<T> = [T, ...T[]];
|
|
776
|
-
//#endregion
|
|
777
|
-
//#region src/client/AppApi.d.ts
|
|
778
|
-
declare class AppApi {
|
|
779
|
-
private _smartWalletConfig;
|
|
780
|
-
getConfig(): import("@privy-io/api-types").AppResponse | undefined;
|
|
781
|
-
getSmartWalletConfig(): Promise<SmartWalletConfiguration>;
|
|
782
|
-
get appId(): string;
|
|
783
|
-
}
|
|
784
|
-
//#endregion
|
|
785
|
-
//#region src/client/CrossAppApi.d.ts
|
|
786
|
-
declare class CrossAppApi {
|
|
787
|
-
/** Defines the format of the storage key for provider access tokens */
|
|
788
|
-
private static providerAccessTokenStorageKey;
|
|
789
|
-
/**
|
|
790
|
-
* Updates the stored token information of a given cross-app provider.
|
|
791
|
-
* @param providerAppId the Privy app ID to which the oauth tokens correspond.
|
|
792
|
-
* @param tokens should be the result of cross app authentication (be it login or linking).
|
|
793
|
-
*/
|
|
794
|
-
updateOnCrossAppAuthentication(providerAppId: string, tokens: OAuthTokens): Promise<void>;
|
|
795
|
-
/**
|
|
796
|
-
* Returns the last known access token for a given cross-app provider.
|
|
797
|
-
* @param providerAppId the Privy app ID on which you want to act.
|
|
798
|
-
*/
|
|
799
|
-
getProviderAccessToken(providerAppId: string): Promise<string | null>;
|
|
800
|
-
/**
|
|
801
|
-
* Fetches the metadata of all cross-app connections for the current app.
|
|
802
|
-
*/
|
|
803
|
-
getCrossAppConnections(): Promise<import("@privy-io/api-types").CrossAppConnectionsResponse>;
|
|
804
|
-
}
|
|
805
|
-
//#endregion
|
|
806
|
-
//#region src/client/DelegatedWalletsApi.d.ts
|
|
807
|
-
declare class DelegatedWalletsApi {
|
|
808
|
-
/**
|
|
809
|
-
* Revokes delegation permission of all the wallets associated with the user.
|
|
810
|
-
*/
|
|
811
|
-
revoke(): Promise<void>;
|
|
812
|
-
}
|
|
813
|
-
//#endregion
|
|
814
774
|
//#region src/embedded/EmbeddedSolanaWalletProvider.d.ts
|
|
815
775
|
type SignMessageRequestArguments = {
|
|
816
776
|
method: 'signMessage';
|
|
@@ -864,6 +824,122 @@ declare class EmbeddedSolanaWalletProvider {
|
|
|
864
824
|
toJSON(): string;
|
|
865
825
|
}
|
|
866
826
|
//#endregion
|
|
827
|
+
//#region src/client/logger.d.ts
|
|
828
|
+
type LogLevel = 'NONE' | 'ERROR' | 'WARN' | 'INFO' | 'DEBUG';
|
|
829
|
+
/**
|
|
830
|
+
* Interface for a logger for the privy client SDK
|
|
831
|
+
*/
|
|
832
|
+
type Logger = {
|
|
833
|
+
readonly level: LogLevel;
|
|
834
|
+
readonly info: Console['log'];
|
|
835
|
+
readonly warn: Console['warn'];
|
|
836
|
+
readonly error: Console['error'];
|
|
837
|
+
readonly debug: Console['debug'];
|
|
838
|
+
};
|
|
839
|
+
//#endregion
|
|
840
|
+
//#region src/types.d.ts
|
|
841
|
+
type PrivyEmbeddedWalletProvider = EmbeddedWalletProvider;
|
|
842
|
+
type PrivyEmbeddedSolanaWalletProvider = EmbeddedSolanaWalletProvider;
|
|
843
|
+
/**
|
|
844
|
+
* How the SDK should treat the cookie mirror of the session tokens.
|
|
845
|
+
* `'default'` - write them where the environment supports it.
|
|
846
|
+
* `'never'` - do not write them at all.
|
|
847
|
+
*
|
|
848
|
+
* A third behavior, forcing writes in an environment that skips them, is deliberately
|
|
849
|
+
* not offered: the environments that skip cookies are ones where a write would land on
|
|
850
|
+
* an origin the SDK does not own.
|
|
851
|
+
*/
|
|
852
|
+
type CookieWriteBehavior = 'default' | 'never';
|
|
853
|
+
declare const EMBEDDED_WALLET_CLIENT_TYPES: readonly ['privy'];
|
|
854
|
+
type EmbeddedWalletClientType = (typeof EMBEDDED_WALLET_CLIENT_TYPES)[number];
|
|
855
|
+
declare const INJECTED_WALLET_CLIENT_TYPES: readonly ['metamask', 'phantom', 'brave_wallet', 'rainbow'];
|
|
856
|
+
type InjectedWalletClientType = (typeof INJECTED_WALLET_CLIENT_TYPES)[number];
|
|
857
|
+
declare const COINBASE_WALLET_CLIENT_TYPES: readonly ['coinbase_wallet'];
|
|
858
|
+
type CoinbaseWalletClientType = (typeof COINBASE_WALLET_CLIENT_TYPES)[number];
|
|
859
|
+
type WalletConnectWalletClientType = (typeof WALLET_CONNECT_WALLET_CLIENT_TYPES)[number];
|
|
860
|
+
declare const UNKNOWN_WALLET_CLIENT_TYPES: readonly ['unknown'];
|
|
861
|
+
type UnknownWalletClientType = (typeof UNKNOWN_WALLET_CLIENT_TYPES)[number];
|
|
862
|
+
declare const ALL_WALLET_CLIENT_TYPES: ("1inch" | "abc_wallet" | "alphawallet" | "ambire" | "arculus_wallet" | "argent" | "avacus" | "bee" | "binance" | "bitget_wallet" | "bitizen" | "blockchain" | "blocto" | "brave_wallet" | "broearn" | "burrito_wallet" | "cling_wallet" | "coin98" | "coinbase_wallet" | "copiosa" | "cryptocom" | "enjin_wallet" | "exodus" | "haha" | "internet_money_wallet" | "keyring_pro" | "kriptonio" | "kryptogo" | "mathwallet" | "metamask" | "mew_wallet" | "minerva" | "obvious" | "omni" | "phantom" | "pitaka" | "plasma_wallet" | "pltwallet" | "prema" | "privy" | "rainbow" | "safe" | "safemoon" | "safepal" | "secux" | "slingshot" | "spot" | "timeless" | "trust" | "uniswap" | "unknown" | "unstoppable" | "zengo" | "zerion")[];
|
|
863
|
+
type WalletClientType = InjectedWalletClientType | CoinbaseWalletClientType | WalletConnectWalletClientType | EmbeddedWalletClientType | UnknownWalletClientType;
|
|
864
|
+
declare const SUPPORTED_CONNECTOR_TYPES: readonly ['injected', 'wallet_connect', 'wallet_connect_v2', 'coinbase_wallet', 'embedded'];
|
|
865
|
+
type ConnectorType = (typeof SUPPORTED_CONNECTOR_TYPES)[number];
|
|
866
|
+
type WalletBranding = {
|
|
867
|
+
/** The display name for the wallet. */
|
|
868
|
+
name: string;
|
|
869
|
+
/** Unique identifier for this wallet, can be RDNS or other unique data. */
|
|
870
|
+
id: string;
|
|
871
|
+
/** Wallet brand icon url. */
|
|
872
|
+
icon?: string;
|
|
873
|
+
};
|
|
874
|
+
type ExternalWalletMetadata = {
|
|
875
|
+
/** The wallet name (e.g. MetaMask). */
|
|
876
|
+
name: string;
|
|
877
|
+
/** The wallet RDNS, falls back to the wallet name if none is available. */
|
|
878
|
+
id: string;
|
|
879
|
+
/** The wallet logo */
|
|
880
|
+
icon?: string;
|
|
881
|
+
};
|
|
882
|
+
/**
|
|
883
|
+
* Wallet to request a [Sign-In With Ethereum](https://eips.ethereum.org/EIPS/eip-4361) signature from
|
|
884
|
+
*/
|
|
885
|
+
type ExternalWallet = {
|
|
886
|
+
/** [EIP-55](https://eips.ethereum.org/EIPS/eip-55) mixed-case checksum-encoded address */
|
|
887
|
+
address: string;
|
|
888
|
+
/** [EIP-155](https://eips.ethereum.org/EIPS/eip-155) Chain ID with [CAIP-2](https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-2.md) formatting */
|
|
889
|
+
chainId: string;
|
|
890
|
+
/**
|
|
891
|
+
* The wallet client where this key-pair is stored.
|
|
892
|
+
* e.g. `metamask`, `rainbow`, `coinbase_wallet`, etc.
|
|
893
|
+
*/
|
|
894
|
+
walletClientType?: WalletClientType;
|
|
895
|
+
/**
|
|
896
|
+
* The connector used to initiate the connection with the wallet client.
|
|
897
|
+
* e.g. `injected`, `wallet_connect`, `coinbase_wallet`, etc.
|
|
898
|
+
*/
|
|
899
|
+
connectorType?: ConnectorType;
|
|
900
|
+
meta?: ExternalWalletMetadata;
|
|
901
|
+
};
|
|
902
|
+
//#endregion
|
|
903
|
+
//#region src/utils/NonEmptyArray.d.ts
|
|
904
|
+
type NonEmptyArray<T> = [T, ...T[]];
|
|
905
|
+
//#endregion
|
|
906
|
+
//#region src/client/AppApi.d.ts
|
|
907
|
+
declare class AppApi {
|
|
908
|
+
private _smartWalletConfig;
|
|
909
|
+
getConfig(): import("@privy-io/api-types").AppResponse | undefined;
|
|
910
|
+
getSmartWalletConfig(): Promise<SmartWalletConfiguration>;
|
|
911
|
+
get appId(): string;
|
|
912
|
+
}
|
|
913
|
+
//#endregion
|
|
914
|
+
//#region src/client/CrossAppApi.d.ts
|
|
915
|
+
declare class CrossAppApi {
|
|
916
|
+
/** Defines the format of the storage key for provider access tokens */
|
|
917
|
+
private static providerAccessTokenStorageKey;
|
|
918
|
+
/**
|
|
919
|
+
* Updates the stored token information of a given cross-app provider.
|
|
920
|
+
* @param providerAppId the Privy app ID to which the oauth tokens correspond.
|
|
921
|
+
* @param tokens should be the result of cross app authentication (be it login or linking).
|
|
922
|
+
*/
|
|
923
|
+
updateOnCrossAppAuthentication(providerAppId: string, tokens: OAuthTokens): Promise<void>;
|
|
924
|
+
/**
|
|
925
|
+
* Returns the last known access token for a given cross-app provider.
|
|
926
|
+
* @param providerAppId the Privy app ID on which you want to act.
|
|
927
|
+
*/
|
|
928
|
+
getProviderAccessToken(providerAppId: string): Promise<string | null>;
|
|
929
|
+
/**
|
|
930
|
+
* Fetches the metadata of all cross-app connections for the current app.
|
|
931
|
+
*/
|
|
932
|
+
getCrossAppConnections(): Promise<import("@privy-io/api-types").CrossAppConnectionsResponse>;
|
|
933
|
+
}
|
|
934
|
+
//#endregion
|
|
935
|
+
//#region src/client/DelegatedWalletsApi.d.ts
|
|
936
|
+
declare class DelegatedWalletsApi {
|
|
937
|
+
/**
|
|
938
|
+
* Revokes delegation permission of all the wallets associated with the user.
|
|
939
|
+
*/
|
|
940
|
+
revoke(): Promise<void>;
|
|
941
|
+
}
|
|
942
|
+
//#endregion
|
|
867
943
|
//#region src/embedded/EmbeddedBitcoinWalletProvider.d.ts
|
|
868
944
|
/**
|
|
869
945
|
* Privy embedded wallet provider for Bitcoin accounts.
|
|
@@ -1418,72 +1494,6 @@ declare class PhoneApi {
|
|
|
1418
1494
|
}>;
|
|
1419
1495
|
}
|
|
1420
1496
|
//#endregion
|
|
1421
|
-
//#region src/client/logger.d.ts
|
|
1422
|
-
type LogLevel = 'NONE' | 'ERROR' | 'WARN' | 'INFO' | 'DEBUG';
|
|
1423
|
-
/**
|
|
1424
|
-
* Interface for a logger for the privy client SDK
|
|
1425
|
-
*/
|
|
1426
|
-
type Logger = {
|
|
1427
|
-
readonly level: LogLevel;
|
|
1428
|
-
readonly info: Console['log'];
|
|
1429
|
-
readonly warn: Console['warn'];
|
|
1430
|
-
readonly error: Console['error'];
|
|
1431
|
-
readonly debug: Console['debug'];
|
|
1432
|
-
};
|
|
1433
|
-
//#endregion
|
|
1434
|
-
//#region src/types.d.ts
|
|
1435
|
-
type PrivyEmbeddedWalletProvider = EmbeddedWalletProvider;
|
|
1436
|
-
type PrivyEmbeddedSolanaWalletProvider = EmbeddedSolanaWalletProvider;
|
|
1437
|
-
declare const EMBEDDED_WALLET_CLIENT_TYPES: readonly ['privy'];
|
|
1438
|
-
type EmbeddedWalletClientType = (typeof EMBEDDED_WALLET_CLIENT_TYPES)[number];
|
|
1439
|
-
declare const INJECTED_WALLET_CLIENT_TYPES: readonly ['metamask', 'phantom', 'brave_wallet', 'rainbow'];
|
|
1440
|
-
type InjectedWalletClientType = (typeof INJECTED_WALLET_CLIENT_TYPES)[number];
|
|
1441
|
-
declare const COINBASE_WALLET_CLIENT_TYPES: readonly ['coinbase_wallet'];
|
|
1442
|
-
type CoinbaseWalletClientType = (typeof COINBASE_WALLET_CLIENT_TYPES)[number];
|
|
1443
|
-
type WalletConnectWalletClientType = (typeof WALLET_CONNECT_WALLET_CLIENT_TYPES)[number];
|
|
1444
|
-
declare const UNKNOWN_WALLET_CLIENT_TYPES: readonly ['unknown'];
|
|
1445
|
-
type UnknownWalletClientType = (typeof UNKNOWN_WALLET_CLIENT_TYPES)[number];
|
|
1446
|
-
declare const ALL_WALLET_CLIENT_TYPES: ("1inch" | "abc_wallet" | "alphawallet" | "ambire" | "arculus_wallet" | "argent" | "avacus" | "bee" | "binance" | "bitget_wallet" | "bitizen" | "blockchain" | "blocto" | "brave_wallet" | "broearn" | "burrito_wallet" | "cling_wallet" | "coin98" | "coinbase_wallet" | "copiosa" | "cryptocom" | "enjin_wallet" | "exodus" | "haha" | "internet_money_wallet" | "keyring_pro" | "kriptonio" | "kryptogo" | "mathwallet" | "metamask" | "mew_wallet" | "minerva" | "obvious" | "omni" | "phantom" | "pitaka" | "plasma_wallet" | "pltwallet" | "prema" | "privy" | "rainbow" | "safe" | "safemoon" | "safepal" | "secux" | "slingshot" | "spot" | "timeless" | "trust" | "uniswap" | "unknown" | "unstoppable" | "zengo" | "zerion")[];
|
|
1447
|
-
type WalletClientType = InjectedWalletClientType | CoinbaseWalletClientType | WalletConnectWalletClientType | EmbeddedWalletClientType | UnknownWalletClientType;
|
|
1448
|
-
declare const SUPPORTED_CONNECTOR_TYPES: readonly ['injected', 'wallet_connect', 'wallet_connect_v2', 'coinbase_wallet', 'embedded'];
|
|
1449
|
-
type ConnectorType = (typeof SUPPORTED_CONNECTOR_TYPES)[number];
|
|
1450
|
-
type WalletBranding = {
|
|
1451
|
-
/** The display name for the wallet. */
|
|
1452
|
-
name: string;
|
|
1453
|
-
/** Unique identifier for this wallet, can be RDNS or other unique data. */
|
|
1454
|
-
id: string;
|
|
1455
|
-
/** Wallet brand icon url. */
|
|
1456
|
-
icon?: string;
|
|
1457
|
-
};
|
|
1458
|
-
type ExternalWalletMetadata = {
|
|
1459
|
-
/** The wallet name (e.g. MetaMask). */
|
|
1460
|
-
name: string;
|
|
1461
|
-
/** The wallet RDNS, falls back to the wallet name if none is available. */
|
|
1462
|
-
id: string;
|
|
1463
|
-
/** The wallet logo */
|
|
1464
|
-
icon?: string;
|
|
1465
|
-
};
|
|
1466
|
-
/**
|
|
1467
|
-
* Wallet to request a [Sign-In With Ethereum](https://eips.ethereum.org/EIPS/eip-4361) signature from
|
|
1468
|
-
*/
|
|
1469
|
-
type ExternalWallet = {
|
|
1470
|
-
/** [EIP-55](https://eips.ethereum.org/EIPS/eip-55) mixed-case checksum-encoded address */
|
|
1471
|
-
address: string;
|
|
1472
|
-
/** [EIP-155](https://eips.ethereum.org/EIPS/eip-155) Chain ID with [CAIP-2](https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-2.md) formatting */
|
|
1473
|
-
chainId: string;
|
|
1474
|
-
/**
|
|
1475
|
-
* The wallet client where this key-pair is stored.
|
|
1476
|
-
* e.g. `metamask`, `rainbow`, `coinbase_wallet`, etc.
|
|
1477
|
-
*/
|
|
1478
|
-
walletClientType?: WalletClientType;
|
|
1479
|
-
/**
|
|
1480
|
-
* The connector used to initiate the connection with the wallet client.
|
|
1481
|
-
* e.g. `injected`, `wallet_connect`, `coinbase_wallet`, etc.
|
|
1482
|
-
*/
|
|
1483
|
-
connectorType?: ConnectorType;
|
|
1484
|
-
meta?: ExternalWalletMetadata;
|
|
1485
|
-
};
|
|
1486
|
-
//#endregion
|
|
1487
1497
|
//#region src/client/auth/SiweApi.d.ts
|
|
1488
1498
|
/**
|
|
1489
1499
|
* [Sign-In With Ethereum](https://eips.ethereum.org/EIPS/eip-4361) auth flow.
|
|
@@ -2106,6 +2116,15 @@ type PrivyOptions = {
|
|
|
2106
2116
|
* @default 'single-user'
|
|
2107
2117
|
*/
|
|
2108
2118
|
mode?: 'single-user' | 'multi-user';
|
|
2119
|
+
/**
|
|
2120
|
+
* @experimental
|
|
2121
|
+
*
|
|
2122
|
+
* How to treat the cookie mirror of the session tokens. Cookies are only read by a
|
|
2123
|
+
* same-origin server, never by Privy, so `'never'` does not affect auth.
|
|
2124
|
+
*
|
|
2125
|
+
* @default 'default'
|
|
2126
|
+
*/
|
|
2127
|
+
cookieWriteBehavior?: CookieWriteBehavior;
|
|
2109
2128
|
};
|
|
2110
2129
|
};
|
|
2111
2130
|
/**
|
|
@@ -2191,6 +2210,21 @@ declare class Privy {
|
|
|
2191
2210
|
get logger(): Logger;
|
|
2192
2211
|
}
|
|
2193
2212
|
//#endregion
|
|
2213
|
+
//#region src/utils/is-extension-context.d.ts
|
|
2214
|
+
declare const isExtensionContext: () => boolean;
|
|
2215
|
+
//#endregion
|
|
2216
|
+
//#region src/session/cookies.d.ts
|
|
2217
|
+
type CookieOptions = Cookies.CookieAttributes;
|
|
2218
|
+
declare const cookies: {
|
|
2219
|
+
get(key: string): string | undefined;
|
|
2220
|
+
set(key: string, value: string, options: CookieOptions): void;
|
|
2221
|
+
remove(key: string): void;
|
|
2222
|
+
};
|
|
2223
|
+
declare const shouldWriteSessionCookies: ({ useServerCookies, cookieWriteBehavior }: {
|
|
2224
|
+
useServerCookies: boolean | undefined;
|
|
2225
|
+
cookieWriteBehavior: CookieWriteBehavior | undefined;
|
|
2226
|
+
}) => boolean;
|
|
2227
|
+
//#endregion
|
|
2194
2228
|
//#region src/storage/LocalStorage.d.ts
|
|
2195
2229
|
declare class LocalStorage implements Storage {
|
|
2196
2230
|
get(key: string): Promise<any>;
|
|
@@ -3248,4 +3282,4 @@ declare const THIRDWEB: "thirdweb";
|
|
|
3248
3282
|
/** @deprecated {@link SmartWalletType} is a well-typed union, use the `'nexus'` literal instead */
|
|
3249
3283
|
declare const NEXUS: "nexus";
|
|
3250
3284
|
//#endregion
|
|
3251
|
-
export { ALL_WALLET_CLIENT_TYPES, BICONOMY, COINBASE_SMART_WALLET, Cluster, type CoinbaseAssetId, CoinbaseWalletClientType, type CompletedDepositAddressOrder, ConnectedStandardSolanaWallet, ConnectorType, type CountryCallingCode, type CountryCode, type CreateSiwsMessageOpts, type DepositAddressOrder, type DepositAddressPollingResult, type DepositAddressQuote, type DepositConfig, type EIP1193Provider, type EmbeddedBitcoinWalletProvider, EmbeddedProviderError, EmbeddedWalletClientType, type EmbeddedWalletConfig, type EmbeddedWalletRecoveryOptions, type EntropyIdVerifier, type ErrorMessageMap, ExternalWallet, ExternalWalletMetadata, FundingMethod, FundingProvider, type GenerateAuthorizationSignatureInput, type GenerateAuthorizationSignatureOutput, type GenerateDepositAddressInput, type GetDepositInput, IdentifierString, InMemoryCache, type IncompleteDepositAddressOrder, InjectedWalletClientType, KERNEL, LIGHT_ACCOUNT, LocalStorage, type LogLevel, type Logger, type MfaMethod, type MfaPromise, type MfaSubmitArgs, type MfaSubmitPromise, MoonpayApiError, type MoonpayTransactionStatus, type MoonpayTransactionStatusResponse, NEXUS, type OAuthProviderID, OAuthProviderType, type OnNeedsRecovery, type ParsedSolanaOffchainMessage, PaymentOption, type PollOptions, type PollResult, type PreparedTransactionRequest, PrivyApiError, PrivyClientError, PrivyConnectorError, PrivyEmbeddedSolanaWalletProvider, PrivyEmbeddedWalletErrorCode, PrivyEmbeddedWalletProvider, PrivyProviderRpcError, ProviderErrors, type Quantity, type ResolveRefundAddressError, type ResolveRefundAddressResult, SAFE, SUPPORTED_CONNECTOR_TYPES, type SetRecoveryInput, SmartWalletType, SolanaClient, SolanaCluster, SolanaSignAndSendTransactionInput, SolanaSignAndSendTransactionMode, SolanaSignAndSendTransactionOptions, SolanaSignAndSendTransactionOutput, SolanaSignMessageInput, SolanaSignMessageOutput, SolanaSignTransactionInput, SolanaSignTransactionOptions, SolanaSignTransactionOutput, SolanaStandardWallet, SolanaTransactionCommitment, SolanaUsdcAddressMap, type Storage, THIRDWEB, type TelegramAuthInput, type TelegramAuthResult, type TelegramWebAppData, UnknownWalletClientType, type UnsignedTransactionRequest, type UnsignedTransactionRequestWithChainId, UsdcAddressMap, type WaitForCompletionInput, type WaitForDepositInput, WalletBranding, WalletClientType, WalletConnectWalletClientType, addSessionSigners, buildSolanaOffchainMessage, chainToMoonpayCurrency, countryCodesAndNumbers, create, createErrorFormatter, createSiwsMessage, index_d_exports as crossApp, Privy as default, index_d_exports$1 as delegatedActions, index_d_exports$2 as depositAddress, deriveSolanaApplicationDomain, errorIndicatesMaxMfaRetries, errorIndicatesMfaCanceled, errorIndicatesMfaRateLimit, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, errorIndicatesRecoveryIsNeeded, formatLamportsAmount, formatPhoneNumber, formatTokenAmount, formatWalletAddress, formatWeiAmount, fundingMethodToMoonpayPaymentMethod, generateAuthorizationSignature, generateWalletIdempotencyKey, getAllUserEmbeddedBitcoinWallets, getAllUserEmbeddedEthereumWallets, getAllUserEmbeddedSolanaWallets, getCoinbaseOnRampUrl, getCountryCallingCode, getEntropyDetailsFromAccount, getEntropyDetailsFromUser, getIsTokenUsdc, getJsonRpcEndpointFromChain, getPhoneCountryCodeAndNumber, getPlaceholderPhoneNumber, getSolanaClusterDisplayName, getSolanaRpcEndpointForCluster, getSolanaUsdcMintAddressForCluster, getUserEmbeddedEthereumWallet, getUserEmbeddedSolanaWallet, getUserEmbeddedWallet, getUserSmartWallet, getWallet, isEmbeddedWalletAccount, isSupportedChainIdForCoinbaseOnramp, isSupportedChainIdForMoonpay, isUnifiedWallet, lastFourDigits, parseSolanaOffchainMessage, phoneNumberTypingFormatter, poll, rawSign, removeSessionSigners, rpc, throwIfInvalidRecoveryUpgradePath, toCoinbaseAssetId, toCoinbaseBlockchainFromChainId, toE164, toObjectKeys, toWalletApiUnsignedEthTransaction, updateWallet, validatePhoneNumber };
|
|
3285
|
+
export { ALL_WALLET_CLIENT_TYPES, BICONOMY, COINBASE_SMART_WALLET, Cluster, type CoinbaseAssetId, CoinbaseWalletClientType, type CompletedDepositAddressOrder, ConnectedStandardSolanaWallet, ConnectorType, CookieWriteBehavior, type CountryCallingCode, type CountryCode, type CreateSiwsMessageOpts, type DepositAddressOrder, type DepositAddressPollingResult, type DepositAddressQuote, type DepositConfig, type EIP1193Provider, type EmbeddedBitcoinWalletProvider, EmbeddedProviderError, EmbeddedWalletClientType, type EmbeddedWalletConfig, type EmbeddedWalletRecoveryOptions, type EntropyIdVerifier, type ErrorMessageMap, ExternalWallet, ExternalWalletMetadata, FundingMethod, FundingProvider, type GenerateAuthorizationSignatureInput, type GenerateAuthorizationSignatureOutput, type GenerateDepositAddressInput, type GetDepositInput, IdentifierString, InMemoryCache, type IncompleteDepositAddressOrder, InjectedWalletClientType, KERNEL, LIGHT_ACCOUNT, LocalStorage, type LogLevel, type Logger, type MfaMethod, type MfaPromise, type MfaSubmitArgs, type MfaSubmitPromise, MoonpayApiError, type MoonpayTransactionStatus, type MoonpayTransactionStatusResponse, NEXUS, type OAuthProviderID, OAuthProviderType, type OnNeedsRecovery, type ParsedSolanaOffchainMessage, PaymentOption, type PollOptions, type PollResult, type PreparedTransactionRequest, PrivyApiError, PrivyClientError, PrivyConnectorError, PrivyEmbeddedSolanaWalletProvider, PrivyEmbeddedWalletErrorCode, PrivyEmbeddedWalletProvider, PrivyProviderRpcError, ProviderErrors, type Quantity, type ResolveRefundAddressError, type ResolveRefundAddressResult, SAFE, SUPPORTED_CONNECTOR_TYPES, type SetRecoveryInput, SmartWalletType, SolanaClient, SolanaCluster, SolanaSignAndSendTransactionInput, SolanaSignAndSendTransactionMode, SolanaSignAndSendTransactionOptions, SolanaSignAndSendTransactionOutput, SolanaSignMessageInput, SolanaSignMessageOutput, SolanaSignTransactionInput, SolanaSignTransactionOptions, SolanaSignTransactionOutput, SolanaStandardWallet, SolanaTransactionCommitment, SolanaUsdcAddressMap, type Storage, THIRDWEB, type TelegramAuthInput, type TelegramAuthResult, type TelegramWebAppData, UnknownWalletClientType, type UnsignedTransactionRequest, type UnsignedTransactionRequestWithChainId, UsdcAddressMap, type WaitForCompletionInput, type WaitForDepositInput, WalletBranding, WalletClientType, WalletConnectWalletClientType, addSessionSigners, buildSolanaOffchainMessage, chainToMoonpayCurrency, cookies, countryCodesAndNumbers, create, createErrorFormatter, createSiwsMessage, index_d_exports as crossApp, Privy as default, index_d_exports$1 as delegatedActions, index_d_exports$2 as depositAddress, deriveSolanaApplicationDomain, errorIndicatesMaxMfaRetries, errorIndicatesMfaCanceled, errorIndicatesMfaRateLimit, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, errorIndicatesRecoveryIsNeeded, formatLamportsAmount, formatPhoneNumber, formatTokenAmount, formatWalletAddress, formatWeiAmount, fundingMethodToMoonpayPaymentMethod, generateAuthorizationSignature, generateWalletIdempotencyKey, getAllUserEmbeddedBitcoinWallets, getAllUserEmbeddedEthereumWallets, getAllUserEmbeddedSolanaWallets, getCoinbaseOnRampUrl, getCountryCallingCode, getEntropyDetailsFromAccount, getEntropyDetailsFromUser, getIsTokenUsdc, getJsonRpcEndpointFromChain, getPhoneCountryCodeAndNumber, getPlaceholderPhoneNumber, getSolanaClusterDisplayName, getSolanaRpcEndpointForCluster, getSolanaUsdcMintAddressForCluster, getUserEmbeddedEthereumWallet, getUserEmbeddedSolanaWallet, getUserEmbeddedWallet, getUserSmartWallet, getWallet, isEmbeddedWalletAccount, isExtensionContext, isSupportedChainIdForCoinbaseOnramp, isSupportedChainIdForMoonpay, isUnifiedWallet, lastFourDigits, parseSolanaOffchainMessage, phoneNumberTypingFormatter, poll, rawSign, removeSessionSigners, rpc, shouldWriteSessionCookies, throwIfInvalidRecoveryUpgradePath, toCoinbaseAssetId, toCoinbaseBlockchainFromChainId, toE164, toObjectKeys, toWalletApiUnsignedEthTransaction, updateWallet, validatePhoneNumber };
|