Serializes a Serializable
value to its BCS representation.
This function is the TypeScript SDK equivalent of bcs::to_bytes
in Move.
the BCS representation of the Serializable instance as a byte buffer.
Converts the BCS-serialized bytes of a value into a Hex instance. This function provides a Hex representation of the BCS-serialized data for easier handling and manipulation.
A Hex instance with the BCS-serialized bytes loaded into its underlying Uint8Array.
Readonly
jwkThe address that contains the JWK set to be used for verification.
Readonly
keylessThe inner public key which contains the standard Keyless public key.
Get the authentication key for the federated keyless public key
AuthenticationKey
Get the public key as a hex string with a 0x prefix.
The public key in hex format.
Get the raw public key bytes
Verifies a signed data with a public key
The JWK to use for verification.
The keyless configuration to use for verification.
message
The signature
true if the signature is valid
Static
createCreates a FederatedKeylessPublicKey from the JWT components plus pepper
the client ID of the application
the iss of the identity
The pepper used to maintain privacy of the account
the key to use to get the uidVal in the JWT token
the value of the uidKey in the JWT token
FederatedKeylessPublicKey
Returns the hex string representation of the Serializable
value without the 0x prefix.
the hex format as a string without 0x
prefix.
Verifies a keyless signature for a given message. It will fetch the keyless configuration and the JWK to use for verification from the appropriate network as defined by the aptosConfig.
The aptos config to use for fetching the keyless configuration.
The message to verify the signature against.
Optional
options?: { throwErrorWithReason?: boolean }Optional
throwErrorWithReason?: booleanWhether to throw an error with the reason for the failure instead of returning false.
The signature to verify.
true if the signature is valid
Static
deserializeStatic
fromStatic
isStatic
is
Represents the FederatedKeylessPublicKey public key
These keys use an on-chain address as a source of truth for the JWK used to verify signatures.
FederatedKeylessPublicKey authentication key is represented in the SDK as
AnyPublicKey
.