Skip to content

SignaturePreAuthorized

Utilities for TIP-1165 pre-authorized access key signatures: a keychain signature bundled with the signed key authorization for its access key, so verifiers can accept it before the access key is registered onchain.

Functions

NameDescription
SignaturePreAuthorized.assertAsserts that a value is a valid pre-authorized signature.
SignaturePreAuthorized.fromInstantiates a TIP-1165 pre-authorized signature from its wrapped or unwrapped form.
SignaturePreAuthorized.unwrapParses a TIP-1165 pre-authorized signature into its keychain signature and signed key authorization.
SignaturePreAuthorized.validateValidates a wrapped pre-authorized signature. Returns true if it decodes strictly, false otherwise.
SignaturePreAuthorized.wrapSerializes a TIP-1165 pre-authorized signature: rlp([keychain_signature, signed_key_authorization]) ‖ magic.

Errors

NameDescription
SignaturePreAuthorized.InvalidUnwrappedSignatureErrorThrown when an unwrapped pre-authorized signature is malformed.
SignaturePreAuthorized.InvalidWrappedSignatureErrorThrown when a wrapped pre-authorized signature is invalid.

Types

NameDescription
SignaturePreAuthorized.UnwrappedUnwrapped TIP-1165 pre-authorized signature.
SignaturePreAuthorized.WrappedWrapped TIP-1165 pre-authorized signature.