Skip to main content

Signature

o1js / Modules / Signature

Class: Signature

A Schnorr Signature over the Pasta Curves.

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Signature(...props)

Parameters

NameType
...propsany[]

Inherited from

CircuitValue.constructor

Defined in

lib/circuit-value.ts:79

Properties

r

r: Field

Defined in

lib/signature.ts:247


s

s: Scalar

Defined in

lib/signature.ts:248

Methods

assertEquals

assertEquals(x): void

Parameters

NameType
xSignature

Returns

void

Inherited from

CircuitValue.assertEquals

Defined in

lib/circuit-value.ts:167


equals

equals(x): Bool

Parameters

NameType
xSignature

Returns

Bool

Inherited from

CircuitValue.equals

Defined in

lib/circuit-value.ts:163


isConstant

isConstant(): boolean

Returns

boolean

Inherited from

CircuitValue.isConstant

Defined in

lib/circuit-value.ts:171


toBase58

toBase58(): string

Encodes a Signature in base58 format.

Returns

string

Defined in

lib/signature.ts:314


toConstant

toConstant(): Signature

Returns

Signature

Inherited from

CircuitValue.toConstant

Defined in

lib/circuit-value.ts:159


toFields

toFields(): Field[]

Returns

Field[]

Inherited from

CircuitValue.toFields

Defined in

lib/circuit-value.ts:151


toJSON

toJSON(): any

Returns

any

Inherited from

CircuitValue.toJSON

Defined in

lib/circuit-value.ts:155


verify

verify(publicKey, msg): Bool

Verifies the Signature using a message and the corresponding PublicKey.

Parameters

NameType
publicKeyPublicKey
msgField[]

Returns

Bool

a Bool

Defined in

lib/signature.ts:285


check

Static check\<T>(this, v): void

Type parameters

NameType
Textends AnyConstructor

Parameters

NameType
thisT
vInstanceType\<T>

Returns

void

Inherited from

CircuitValue.check

Defined in

lib/circuit-value.ts:200


create

Static create(privKey, msg): Signature

Signs a message using a PrivateKey.

Parameters

NameType
privKeyPrivateKey
msgField[]

Returns

Signature

a Signature

Defined in

lib/signature.ts:254


empty

Static empty\<T>(): InstanceType\<T>

Type parameters

NameType
Textends AnyConstructor

Returns

InstanceType\<T>

Inherited from

CircuitValue.empty

Defined in

lib/circuit-value.ts:255


fromBase58

Static fromBase58(signatureBase58): Signature

Decodes a base58 encoded signature into a Signature.

Parameters

NameType
signatureBase58string

Returns

Signature

Defined in

lib/signature.ts:304


fromFields

Static fromFields\<T>(this, xs): InstanceType\<T>

Type parameters

NameType
Textends AnyConstructor

Parameters

NameType
thisT
xsField[]

Returns

InstanceType\<T>

Inherited from

CircuitValue.fromFields

Defined in

lib/circuit-value.ts:175


fromJSON

Static fromJSON\<T>(this, value): InstanceType\<T>

Type parameters

NameType
Textends AnyConstructor

Parameters

NameType
thisT
valueany

Returns

InstanceType\<T>

Inherited from

CircuitValue.fromJSON

Defined in

lib/circuit-value.ts:233


fromObject

Static fromObject\<T>(this, value): InstanceType\<T>

Type parameters

NameType
Textends AnyConstructor

Parameters

NameType
thisT
valueNonMethods\<InstanceType\<T>>

Returns

InstanceType\<T>

Inherited from

CircuitValue.fromObject

Defined in

lib/circuit-value.ts:96


sizeInFields

Static sizeInFields(): number

Returns

number

Inherited from

CircuitValue.sizeInFields

Defined in

lib/circuit-value.ts:103


toAuxiliary

Static toAuxiliary(): []

Returns

[]

Inherited from

CircuitValue.toAuxiliary

Defined in

lib/circuit-value.ts:125


toConstant

Static toConstant\<T>(this, t): InstanceType\<T>

Type parameters

NameType
Textends AnyConstructor

Parameters

NameType
thisT
tInstanceType\<T>

Returns

InstanceType\<T>

Inherited from

CircuitValue.toConstant

Defined in

lib/circuit-value.ts:214


toFields

Static toFields\<T>(this, v): Field[]

Type parameters

NameType
Textends AnyConstructor

Parameters

NameType
thisT
vInstanceType\<T>

Returns

Field[]

Inherited from

CircuitValue.toFields

Defined in

lib/circuit-value.ts:108


toInput

Static toInput\<T>(this, v): HashInput

Type parameters

NameType
Textends AnyConstructor

Parameters

NameType
thisT
vInstanceType\<T>

Returns

HashInput

Inherited from

CircuitValue.toInput

Defined in

lib/circuit-value.ts:129


toJSON

Static toJSON\<T>(this, v): any

Type parameters

NameType
Textends AnyConstructor

Parameters

NameType
thisT
vInstanceType\<T>

Returns

any

Inherited from

CircuitValue.toJSON

Defined in

lib/circuit-value.ts:222