Skip to main content

Function: parseSerializedSignature()

function parseSerializedSignature(serializedSignature): 
| {
signatureScheme: "Passkey";
serializedSignature: string;
signature: Uint8Array;
authenticatorData: number[];
clientDataJson: string;
userSignature: Uint8Array;
publicKey: Uint8Array;
}
| {
serializedSignature: string;
signatureScheme: "MultiSig";
multisig: MultiSigStruct;
bytes: Uint8Array;
moveAuthenticator?: undefined;
signature?: undefined;
publicKey?: undefined;
}
| {
multisig?: undefined;
serializedSignature: string;
signatureScheme: "MoveAuthenticator";
signature: Uint8Array;
moveAuthenticator: {
$kind: "V1";
V1: {
callArgs: EnumOutputShapeWithKeys<{
Pure: {
bytes: string;
};
Object: EnumOutputShapeWithKeys<{
ImmOrOwnedObject: {
objectId: string;
version: string;
digest: string;
};
SharedObject: {
objectId: string;
initialSharedVersion: string;
mutable: boolean;
};
Receiving: {
objectId: string;
version: string;
digest: string;
};
}, "ImmOrOwnedObject" | "SharedObject" | "Receiving">;
}, "Pure" | "Object">[];
typeArgs: string[];
objectToAuthenticate: EnumOutputShapeWithKeys<{
Pure: {
bytes: string;
};
Object: EnumOutputShapeWithKeys<{
ImmOrOwnedObject: {
objectId: string;
version: string;
digest: string;
};
SharedObject: {
objectId: string;
initialSharedVersion: string;
mutable: boolean;
};
Receiving: {
objectId: string;
version: string;
digest: string;
};
}, "ImmOrOwnedObject" | "SharedObject" | "Receiving">;
}, "Pure" | "Object">;
};
};
bytes: Uint8Array;
publicKey?: undefined;
}
| {
multisig?: undefined;
moveAuthenticator?: undefined;
serializedSignature: string;
signatureScheme: "ED25519" | "Secp256k1" | "Secp256r1";
signature: Uint8Array;
publicKey: Uint8Array;
bytes: Uint8Array;
};

Decodes a serialized signature into its constituent components: the signature scheme, the actual signature, and the public key

Parameters

ParameterType
serializedSignaturestring

Returns

| { signatureScheme: "Passkey"; serializedSignature: string; signature: Uint8Array; authenticatorData: number[]; clientDataJson: string; userSignature: Uint8Array; publicKey: Uint8Array; } | { serializedSignature: string; signatureScheme: "MultiSig"; multisig: MultiSigStruct; bytes: Uint8Array; moveAuthenticator?: undefined; signature?: undefined; publicKey?: undefined; } | { multisig?: undefined; serializedSignature: string; signatureScheme: "MoveAuthenticator"; signature: Uint8Array; moveAuthenticator: { $kind: "V1"; V1: { callArgs: EnumOutputShapeWithKeys<{ Pure: { bytes: string; }; Object: EnumOutputShapeWithKeys<{ ImmOrOwnedObject: { objectId: string; version: string; digest: string; }; SharedObject: { objectId: string; initialSharedVersion: string; mutable: boolean; }; Receiving: { objectId: string; version: string; digest: string; }; }, "ImmOrOwnedObject" | "SharedObject" | "Receiving">; }, "Pure" | "Object">[]; typeArgs: string[]; objectToAuthenticate: EnumOutputShapeWithKeys<{ Pure: { bytes: string; }; Object: EnumOutputShapeWithKeys<{ ImmOrOwnedObject: { objectId: string; version: string; digest: string; }; SharedObject: { objectId: string; initialSharedVersion: string; mutable: boolean; }; Receiving: { objectId: string; version: string; digest: string; }; }, "ImmOrOwnedObject" | "SharedObject" | "Receiving">; }, "Pure" | "Object">; }; }; bytes: Uint8Array; publicKey?: undefined; } | { multisig?: undefined; moveAuthenticator?: undefined; serializedSignature: string; signatureScheme: "ED25519" | "Secp256k1" | "Secp256r1"; signature: Uint8Array; publicKey: Uint8Array; bytes: Uint8Array; }