Skip to main content

Signature

A Schnorr Signature over the Pasta Curves.

Extends

  • CircuitValue

Constructors

new Signature()

new Signature(...props: any[]): Signature

Parameters

• ...props: any[]

Returns

Signature

Inherited from

CircuitValue.constructor

Source

lib/provable/types/circuit-value.ts:13

Properties

r

r: Field;

Source

lib/provable/crypto/signature.ts:258


s

s: Scalar;

Source

lib/provable/crypto/signature.ts:259

Methods

assertEquals()

assertEquals(x: this): void

Parameters

x: this

Returns

void

Inherited from

CircuitValue.assertEquals

Source

lib/provable/types/circuit-value.ts:130


equals()

equals(x: this): Bool

Parameters

x: this

Returns

Bool

Inherited from

CircuitValue.equals

Source

lib/provable/types/circuit-value.ts:126


isConstant()

isConstant(): boolean

Returns

boolean

Inherited from

CircuitValue.isConstant

Source

lib/provable/types/circuit-value.ts:134


toBase58()

toBase58(): string

Encodes a Signature in base58 format.

Returns

string

Source

lib/provable/crypto/signature.ts:321


toConstant()

toConstant(): this

Returns

this

Inherited from

CircuitValue.toConstant

Source

lib/provable/types/circuit-value.ts:122


toFields()

toFields(): Field[]

Returns

Field[]

Inherited from

CircuitValue.toFields

Source

lib/provable/types/circuit-value.ts:85


toJSON()

toJSON(): any

Returns

any

Inherited from

CircuitValue.toJSON

Source

lib/provable/types/circuit-value.ts:118


verify()

verify(publicKey: PublicKey, msg: Field[]): Bool

Verifies the Signature using a message and the corresponding PublicKey.

Parameters

publicKey: PublicKey

msg: Field[]

Returns

Bool

a Bool

Source

lib/provable/crypto/signature.ts:296


check()

static check<T>(this: T, v: InstanceType<T>): void

Type parameters

T extends AnyConstructor

Parameters

this: T

v: InstanceType\<T>

Returns

void

Inherited from

CircuitValue.check

Source

lib/provable/types/circuit-value.ts:163


create()

static create(privKey: PrivateKey, msg: Field[]): Signature

Signs a message using a PrivateKey.

Parameters

privKey: PrivateKey

msg: Field[]

Returns

Signature

a Signature

Source

lib/provable/crypto/signature.ts:265


empty()

static empty<T>(): InstanceType<T>

Type parameters

T extends AnyConstructor

Returns

InstanceType\<T>

Inherited from

CircuitValue.empty

Source

lib/provable/types/circuit-value.ts:218


fromBase58()

static fromBase58(signatureBase58: string): Signature

Decodes a base58 encoded signature into a Signature.

Parameters

signatureBase58: string

Returns

Signature

Source

lib/provable/crypto/signature.ts:314


fromFields()

static fromFields<T>(this: T, xs: Field[]): InstanceType<T>

Type parameters

T extends AnyConstructor

Parameters

this: T

xs: Field[]

Returns

InstanceType\<T>

Inherited from

CircuitValue.fromFields

Source

lib/provable/types/circuit-value.ts:138


fromJSON()

static fromJSON<T>(this: T, value: any): InstanceType<T>

Type parameters

T extends AnyConstructor

Parameters

this: T

value: any

Returns

InstanceType\<T>

Inherited from

CircuitValue.fromJSON

Source

lib/provable/types/circuit-value.ts:196


fromObject()

static fromObject<T>(this: T, value: NonMethods<InstanceType<T>>): InstanceType<T>

Type parameters

T extends AnyConstructor

Parameters

this: T

value: NonMethods\<InstanceType\<T>>

Returns

InstanceType\<T>

Inherited from

CircuitValue.fromObject

Source

lib/provable/types/circuit-value.ts:30


fromValue()

static fromValue<T>(this: T, value: any): InstanceType<T>

Type parameters

T extends AnyConstructor

Parameters

this: T

value: any

Returns

InstanceType\<T>

Inherited from

CircuitValue.fromValue

Source

lib/provable/types/circuit-value.ts:98


sizeInFields()

static sizeInFields(): number

Returns

number

Inherited from

CircuitValue.sizeInFields

Source

lib/provable/types/circuit-value.ts:37


toAuxiliary()

static toAuxiliary(): []

Returns

[]

Inherited from

CircuitValue.toAuxiliary

Source

lib/provable/types/circuit-value.ts:59


toConstant()

static toConstant<T>(this: T, t: InstanceType<T>): InstanceType<T>

Type parameters

T extends AnyConstructor

Parameters

this: T

t: InstanceType\<T>

Returns

InstanceType\<T>

Inherited from

CircuitValue.toConstant

Source

lib/provable/types/circuit-value.ts:177


toFields()

static toFields<T>(this: T, v: InstanceType<T>): Field[]

Type parameters

T extends AnyConstructor

Parameters

this: T

v: InstanceType\<T>

Returns

Field[]

Inherited from

CircuitValue.toFields

Source

lib/provable/types/circuit-value.ts:42


toInput()

static toInput<T>(this: T, v: InstanceType<T>): HashInput

Type parameters

T extends AnyConstructor

Parameters

this: T

v: InstanceType\<T>

Returns

HashInput

Inherited from

CircuitValue.toInput

Source

lib/provable/types/circuit-value.ts:63


toJSON()

static toJSON<T>(this: T, v: InstanceType<T>): any

Type parameters

T extends AnyConstructor

Parameters

this: T

v: InstanceType\<T>

Returns

any

Inherited from

CircuitValue.toJSON

Source

lib/provable/types/circuit-value.ts:185


toValue()

static toValue<T>(this: T, v: InstanceType<T>): any

Type parameters

T extends AnyConstructor

Parameters

this: T

v: InstanceType\<T>

Returns

any

Inherited from

CircuitValue.toValue

Source

lib/provable/types/circuit-value.ts:89