Aller au contenu

IFrameRpcSchema

Ce contenu n’est pas encore disponible dans votre langue.

IFrameRpcSchema = [{ Method: "frak_listenToWalletStatus"; Parameters?: undefined; ReturnType: WalletStatusReturnType; }, { Method: "frak_displayModal"; Parameters: [ModalRpcStepsInput, ModalRpcMetadata | undefined, FrakWalletSdkConfig["metadata"], string]; ReturnType: ModalRpcStepsResultType; }, { Method: "frak_prepareSso"; Parameters: [PrepareSsoParamsType, string, string]; ReturnType: PrepareSsoReturnType; }, { Method: "frak_openSso"; Parameters: [OpenSsoParamsType, string, string]; ReturnType: OpenSsoReturnType; }, { Method: "frak_getMerchantInformation"; Parameters?: undefined; ReturnType: GetMerchantInformationReturnType; }, { Method: "frak_displayEmbeddedWallet"; Parameters: [DisplayEmbeddedWalletParamsType, FrakWalletSdkConfig["metadata"], string]; ReturnType: DisplayEmbeddedWalletResultType; }, { Method: "frak_sendInteraction"; Parameters: [SendInteractionParamsType, { clientId?: string; }]; ReturnType: undefined; }, { Method: "frak_getUserReferralStatus"; Parameters?: undefined; ReturnType: UserReferralStatusType | null; }, { Method: "frak_displaySharingPage"; Parameters: [DisplaySharingPageParamsType, FrakWalletSdkConfig["metadata"], string]; ReturnType: DisplaySharingPageResultType; }, { Method: "frak_getMergeToken"; Parameters?: undefined; ReturnType: string | null; }]

Defined in: types/rpc.ts:70

RPC interface that’s used for the iframe communication

Define all the methods available within the iFrame RPC client with response type annotations

Each method in the schema now includes a ResponseType field that indicates:

  • “promise”: One-shot request that resolves once
  • “stream”: Streaming request that can emit multiple values
  • Params: None
  • Returns: WalletStatusReturnType
  • Response Type: stream (emits updates when wallet status changes)