UNPKG

@aptos-labs/siwa

Version:
35 lines 1.62 kB
import type { PublicKey, Signature } from "@aptos-labs/ts-sdk"; import type { AptosSignInBoundFields, AptosSignInInput, AptosSignInOutput } from "@aptos-labs/wallet-standard"; export declare const CURRENT_SERIALIZATION_VERSION = "3"; export type SerializationVersion = "3"; export type SerializedAptosSignInOutput = { version: "3"; type: string; signature: string; input: AptosSignInInput & AptosSignInBoundFields; publicKey: string; }; export type DeserializedAptosSignInOutput = { version: "3"; type: string; signature: Signature; input: AptosSignInInput & AptosSignInBoundFields; publicKey: PublicKey; }; /** * A helper function that serializes a `AptosSignInOutput` to a versioned `SerializedAptosSignInOutput`. This format is used to help transfer * the `AptosSignInOutput` from the frontend to the backend. * * @param output - The `AptosSignInOutput` to serialize. * @returns The serialized `AptosSignInOutput`. */ export declare const serializeSignInOutput: (output: Pick<AptosSignInOutput, "type" | "signature" | "input" | "account">) => SerializedAptosSignInOutput; /** * A helper function that deserializes a `SerializedAptosSignInOutput` to a `AptosSignInOutput`. This format is used to help transfer * the `AptosSignInOutput` from the backend to the frontend. * * @param serialized - The `SerializedAptosSignInOutput` to deserialize. * @returns The deserialized `AptosSignInOutput`. */ export declare const deserializeSignInOutput: (serialized: SerializedAptosSignInOutput) => Promise<DeserializedAptosSignInOutput>; //# sourceMappingURL=serializers.d.ts.map