@privy-io/react-auth 1.63.0 → 1.64.0-beta-20240503221045

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.ts CHANGED
@@ -311,44 +311,16 @@ type FarcasterSignerInitRequestDataType = {
311
311
  mfaMethod: string | null;
312
312
  relyingParty: string;
313
313
  };
314
- type FarcasterSubmitCastRequestDataType = {
314
+ type FarcasterSignRequestDataType = {
315
315
  address: string;
316
316
  hdWalletIndex: number | null;
317
317
  accessToken: string;
318
318
  mfaCode: string | PasskeyAuthenticateInputType['authenticator_response'] | null;
319
319
  mfaMethod: string | null;
320
320
  relyingParty: string;
321
- payload: any;
322
- fid: bigint;
323
- };
324
- type FarcasterRemoveCastRequestDataType = {
325
- address: string;
326
- hdWalletIndex: number | null;
327
- accessToken: string;
328
- mfaCode: string | PasskeyAuthenticateInputType['authenticator_response'] | null;
329
- mfaMethod: string | null;
330
- relyingParty: string;
331
- payload: any;
332
- fid: bigint;
333
- };
334
- type FarcasterReactToCastRequestDataType = {
335
- address: string;
336
- hdWalletIndex: number | null;
337
- accessToken: string;
338
- mfaCode: string | PasskeyAuthenticateInputType['authenticator_response'] | null;
339
- mfaMethod: string | null;
340
- relyingParty?: string;
341
- payload: any;
342
- fid: bigint;
343
- };
344
- type FarcasterLinkRequestDataType = {
345
- address: string;
346
- hdWalletIndex: number | null;
347
- accessToken: string;
348
- mfaCode: string | PasskeyAuthenticateInputType['authenticator_response'] | null;
349
- mfaMethod: string | null;
350
- relyingParty?: string;
351
- payload: any;
321
+ payload: {
322
+ hash: string;
323
+ };
352
324
  fid: bigint;
353
325
  };
354
326
  type WalletCreateResponseDataType = {
@@ -377,25 +349,9 @@ type MfaSubmitEnrollmentResponseDataType = Record<string, never>;
377
349
  type MfaUnenrollResponseDataType = Record<string, never>;
378
350
  type MfaClearResponseDataType = Record<string, never>;
379
351
  type FarcasterSignerInitResponseDataType = PrivyFarcasterSignerInitResponse;
380
- type FarcasterSubmitCastResponseDataType = {
381
- response: {
382
- hash: string;
383
- };
384
- };
385
- type FarcasterRemoveCastResponseDataType = {
386
- response: {
387
- hash: string;
388
- };
389
- };
390
- type FarcasterReactToCastResponseDataType = {
391
- response: {
392
- hash: string;
393
- };
394
- };
395
- type FarcasterLinkResponseDataType = {
396
- response: {
397
- hash: string;
398
- };
352
+ type FarcasterSignResponseDataType = {
353
+ hash: string;
354
+ signature: string;
399
355
  };
400
356
  declare const PrivyIframeErrorTypes: readonly ["error", "invalid_request_arguments", "wallet_not_on_device", "invalid_recovery_pin", "insufficient_funds", "missing_or_invalid_mfa", "mfa_verification_max_attempts_reached", "mfa_timeout", "twilio_verification_failed"];
401
357
  type PrivyIframeErrorTypesType = (typeof PrivyIframeErrorTypes)[number];
@@ -411,11 +367,7 @@ interface EmbeddedWalletProxy {
411
367
  unenrollMfa: (data: MfaUnenrollRequestDataType) => Promise<MfaUnenrollResponseDataType>;
412
368
  clearMfa: (data: MfaClearRequestDataType) => Promise<MfaClearResponseDataType>;
413
369
  initFarcasterSigner: (data: FarcasterSignerInitRequestDataType) => Promise<FarcasterSignerInitResponseDataType>;
414
- submitCast: (data: FarcasterSubmitCastRequestDataType) => Promise<FarcasterSubmitCastResponseDataType>;
415
- removeCast: (data: FarcasterRemoveCastRequestDataType) => Promise<FarcasterRemoveCastResponseDataType>;
416
- reactToCast: (data: FarcasterReactToCastRequestDataType) => Promise<FarcasterReactToCastResponseDataType>;
417
- submitLink: (data: FarcasterLinkRequestDataType) => Promise<FarcasterLinkResponseDataType>;
418
- removeLink: (data: FarcasterLinkRequestDataType) => Promise<FarcasterLinkResponseDataType>;
370
+ signFarcasterMessage: (data: FarcasterSignRequestDataType) => Promise<FarcasterSignResponseDataType>;
419
371
  }
420
372
 
421
373
  declare abstract class PrivyError extends Error {
@@ -3406,53 +3358,9 @@ declare function useToken(callbacks?: PrivyEvents['accessToken']): {
3406
3358
  * @experimental
3407
3359
  */
3408
3360
  declare function useExperimentalFarcasterSigner(): {
3409
- followUser: (opts: {
3410
- fid: number;
3411
- }) => Promise<{
3412
- hash: string;
3413
- }>;
3414
- unfollowUser: (opts: {
3415
- fid: number;
3416
- }) => Promise<{
3417
- hash: string;
3418
- }>;
3419
- submitCast: (opts: {
3420
- mentions?: number[] | undefined;
3421
- parentCastId?: {
3422
- fid: number;
3423
- hash: string;
3424
- } | undefined;
3425
- parentUrl?: string | undefined;
3426
- text: string;
3427
- mentionsPositions?: number[] | undefined;
3428
- embeds?: {
3429
- url?: string | undefined;
3430
- castId?: {
3431
- fid: number;
3432
- hash: string;
3433
- } | undefined;
3434
- }[] | undefined;
3435
- }) => Promise<{
3436
- hash: string;
3437
- }>;
3438
- removeCast: (opts: {
3439
- castHash: string;
3440
- }) => Promise<{
3441
- hash: string;
3442
- }>;
3443
- likeCast: (opts: {
3444
- castHash: string;
3445
- castAuthorFid: number;
3446
- }) => Promise<{
3447
- hash: string;
3448
- }>;
3449
- recastCast: (opts: {
3450
- castHash: string;
3451
- castAuthorFid: number;
3452
- }) => Promise<{
3453
- hash: string;
3454
- }>;
3455
- requestFarcasterSigner: () => Promise<void>;
3361
+ getFarcasterSignerPublicKey: () => Promise<Uint8Array>;
3362
+ signFarcasterMessage: (messageHash: Uint8Array) => Promise<Uint8Array>;
3363
+ requestFarcasterSignerFromWarpcast: () => Promise<void>;
3456
3364
  };
3457
3365
 
3458
3366
  /**