message-signing/CoseSign.ts
CoseSign overview
COSE_Sign multi-signature structures (RFC 8152).
Implements COSE_Sign for multi-signature messages with separate signature headers.
Added in v2.0.0
Table of contents
Constructors
coseSignBuilderNew
Create a new COSESignBuilder.
Signature
export declare const coseSignBuilderNew: (
headers: Headers,
payload: Uint8Array,
isPayloadExternal: boolean
) => COSESignBuilderAdded in v2.0.0
coseSignNew
Create a new COSESign.
Signature
export declare const coseSignNew: (
headers: Headers,
payload: Uint8Array | undefined,
signatures: ReadonlyArray<COSESignature>
) => COSESignAdded in v2.0.0
coseSignatureNew
Create a new COSESignature.
Signature
export declare const coseSignatureNew: (headers: Headers, signature: Ed25519Signature.Ed25519Signature) => COSESignatureAdded in v2.0.0
Model
COSESign (class)
COSE_Sign structure (RFC 8152) - multi-signature message.
Signature
export declare class COSESignAdded in v2.0.0
toJSON (method)
Signature
toJSON()toString (method)
Signature
toString(): string[Inspectable.NodeInspectSymbol] (method)
Signature
[Inspectable.NodeInspectSymbol](): unknown[Equal.symbol] (method)
Signature
[Equal.symbol](that: unknown): boolean[Hash.symbol] (method)
Signature
[Hash.symbol](): numberCOSESignBuilder (class)
Builder for creating COSE_Sign structures (multi-signature).
Signature
export declare class COSESignBuilderAdded in v2.0.0
setExternalAad (method)
Set external additional authenticated data.
Signature
setExternalAad(externalAad: Uint8Array): thisAdded in v2.0.0
hashPayloadWith224 (method)
Hash the payload with blake2b-224 and update headers.
Signature
hashPayloadWith224(): thisAdded in v2.0.0
makeDataToSign (method)
Create the data that needs to be signed (Sig_structure).
Signature
makeDataToSign(): Uint8ArrayAdded in v2.0.0
build (method)
Build the final COSESign structure with the provided signatures.
Signature
build(signatures: ReadonlyArray<COSESignature>): COSESignAdded in v2.0.0
COSESignature (class)
Single COSE signature (for multi-signature COSESign).
Signature
export declare class COSESignatureAdded in v2.0.0
toJSON (method)
Signature
toJSON()toString (method)
Signature
toString(): string[Inspectable.NodeInspectSymbol] (method)
Signature
[Inspectable.NodeInspectSymbol](): unknown[Equal.symbol] (method)
Signature
[Equal.symbol](that: unknown): boolean[Hash.symbol] (method)
Signature
[Hash.symbol](): numberSchemas
COSESignFromCBORBytes
CBOR bytes transformation schema for COSESign.
Signature
export declare const COSESignFromCBORBytes: (
options?: CBOR.CodecOptions
) => Schema.transformOrFail<
Schema.transformOrFail<
typeof Schema.Uint8ArrayFromSelf,
Schema.declare<CBOR.CBOR, CBOR.CBOR, readonly [], never>,
never
>,
Schema.SchemaClass<COSESign, COSESign, never>,
never
>Added in v2.0.0
COSESignFromCBORHex
CBOR hex transformation schema for COSESign.
Signature
export declare const COSESignFromCBORHex: (
options?: CBOR.CodecOptions
) => Schema.transform<
Schema.Schema<Uint8Array, string, never>,
Schema.transformOrFail<
Schema.transformOrFail<
typeof Schema.Uint8ArrayFromSelf,
Schema.declare<CBOR.CBOR, CBOR.CBOR, readonly [], never>,
never
>,
Schema.SchemaClass<COSESign, COSESign, never>,
never
>
>Added in v2.0.0
COSESignatureFromCBORBytes
CBOR bytes transformation schema for COSESignature.
Signature
export declare const COSESignatureFromCBORBytes: (
options?: CBOR.CodecOptions
) => Schema.transformOrFail<
Schema.transformOrFail<
typeof Schema.Uint8ArrayFromSelf,
Schema.declare<CBOR.CBOR, CBOR.CBOR, readonly [], never>,
never
>,
Schema.SchemaClass<COSESignature, COSESignature, never>,
never
>Added in v2.0.0