@privy-io/react-auth 1.75.1 → 1.76.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/esm/index.js +387 -312
- package/dist/index.d.ts +26 -4
- package/dist/index.js +389 -314
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { ExternalProvider, StaticJsonRpcProvider, Web3Provider, TransactionRespo
|
|
|
4
4
|
import { CountryCode } from 'libphonenumber-js/min';
|
|
5
5
|
import { AbstractProvider } from 'web3-core';
|
|
6
6
|
import EventEmitter from 'eventemitter3';
|
|
7
|
-
import { PasskeyAuthenticateInputType } from '@privy-io/public-api';
|
|
7
|
+
import { PasskeyAuthenticateInputType, PrivyCoinbaseOnRampInitInput, PrivyCoinbaseOnRampInitResponse, PrivyCoinbaseOnRampStatusResponse } from '@privy-io/public-api';
|
|
8
8
|
import { TypedMessage as TypedMessage$1, MessageTypes as MessageTypes$1 } from '@metamask/eth-sig-util';
|
|
9
9
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
10
10
|
import { TurnstileProps } from '@marsidev/react-turnstile';
|
|
@@ -947,6 +947,7 @@ interface ValidSessionResponse {
|
|
|
947
947
|
user: GetCurrentUserResponse;
|
|
948
948
|
token: string;
|
|
949
949
|
refresh_token: string | null;
|
|
950
|
+
identity_token?: string;
|
|
950
951
|
is_new_user?: boolean;
|
|
951
952
|
session_update_action?: 'set' | 'ignore' | 'clear';
|
|
952
953
|
oauth_tokens?: {
|
|
@@ -1126,7 +1127,7 @@ declare class PrivyClient {
|
|
|
1126
1127
|
}>;
|
|
1127
1128
|
link(): Promise<{
|
|
1128
1129
|
user: User | null;
|
|
1129
|
-
oAuthTokens
|
|
1130
|
+
oAuthTokens: OAuthTokens | undefined;
|
|
1130
1131
|
}>;
|
|
1131
1132
|
storeProviderAccessToken(appId: string, providerAccessToken: string | null): void;
|
|
1132
1133
|
getProviderAccessToken(appId: string): string | null;
|
|
@@ -1149,8 +1150,8 @@ declare class PrivyClient {
|
|
|
1149
1150
|
};
|
|
1150
1151
|
userVerification: UserVerificationRequirement;
|
|
1151
1152
|
}>;
|
|
1152
|
-
unlinkEmail(address: string): Promise<User>;
|
|
1153
1153
|
acceptTerms(): Promise<User>;
|
|
1154
|
+
unlinkEmail(address: string): Promise<User>;
|
|
1154
1155
|
unlinkPhone(phoneNumber: string): Promise<User>;
|
|
1155
1156
|
unlinkWallet(address: string): Promise<User>;
|
|
1156
1157
|
unlinkOAuth(provider: OAuthProviderType | `privy:${string}`, subject: string): Promise<User>;
|
|
@@ -1168,6 +1169,10 @@ declare class PrivyClient {
|
|
|
1168
1169
|
};
|
|
1169
1170
|
}): Promise<void>;
|
|
1170
1171
|
signMoonpayOnRampUrl(signRequestData: MoonpaySignRequest): Promise<MoonpaySignResponse>;
|
|
1172
|
+
initCoinbaseOnRamp(input: PrivyCoinbaseOnRampInitInput): Promise<PrivyCoinbaseOnRampInitResponse>;
|
|
1173
|
+
getCoinbaseOnRampStatus({ partnerUserId, }: {
|
|
1174
|
+
partnerUserId: string;
|
|
1175
|
+
}): Promise<PrivyCoinbaseOnRampStatusResponse>;
|
|
1171
1176
|
/** DATA METHODS */
|
|
1172
1177
|
/**
|
|
1173
1178
|
* Fetches the currently authenticed user from the API or
|
|
@@ -3453,6 +3458,21 @@ interface PrivyEvents {
|
|
|
3453
3458
|
user: User;
|
|
3454
3459
|
}) => void;
|
|
3455
3460
|
};
|
|
3461
|
+
fundWallet: {
|
|
3462
|
+
/**
|
|
3463
|
+
* Callback that will execute when a funding flow is exited. This fires when a user closes a funding flow modal, for any reason.
|
|
3464
|
+
*
|
|
3465
|
+
* @param fundingMethod {@link FundingMethod} The funding method associated with the flow at time of exit. If the user had not yet selected
|
|
3466
|
+
* @param balance {@link BigNumber} The value for the funded wallet at the point of user exit.
|
|
3467
|
+
* a recovery method, this will be null.
|
|
3468
|
+
*/
|
|
3469
|
+
onUserExited?: (o: {
|
|
3470
|
+
address: string;
|
|
3471
|
+
chain: Chain;
|
|
3472
|
+
fundingMethod: FundingMethod | 'manual' | null;
|
|
3473
|
+
balance: bigint | undefined;
|
|
3474
|
+
}) => void;
|
|
3475
|
+
};
|
|
3456
3476
|
}
|
|
3457
3477
|
|
|
3458
3478
|
/**
|
|
@@ -3800,9 +3820,11 @@ interface UseFundWalletInterface {
|
|
|
3800
3820
|
}
|
|
3801
3821
|
/**
|
|
3802
3822
|
* Hook to fund a wallet via Privy's fiat on-ramp integration given the wallet address.
|
|
3823
|
+
*
|
|
3824
|
+
* @param callbacks.onUserExited {@link PrivyEvents} Callback that will execute when a funding flow is exited. This fires when a user closes a funding flow modal, for any reason.
|
|
3803
3825
|
* @returns fundWallet - function to on-ramp funds to any given wallet
|
|
3804
3826
|
*/
|
|
3805
|
-
declare const useFundWallet: () => UseFundWalletInterface;
|
|
3827
|
+
declare const useFundWallet: (callbacks?: PrivyEvents['fundWallet']) => UseFundWalletInterface;
|
|
3806
3828
|
|
|
3807
3829
|
/**
|
|
3808
3830
|
* Hook to create and interact with Solana wallets. This currently only supports an embedded Solana wallet and no
|