Signature
Class: Signature
A Schnorr Signature over the Pasta Curves.
Hierarchy
↳
Signature
Table of contents
Constructors
Properties
Methods
- assertEquals
- equals
- isConstant
- toBase58
- toConstant
- toFields
- toJSON
- verify
- check
- create
- fromBase58
- fromFields
- fromJSON
- fromObject
- sizeInFields
- toAuxiliary
- toConstant
- toFields
- toInput
- toJSON
Constructors
constructor
• new Signature(...props
)
Parameters
Name | Type |
---|---|
...props | any [] |
Inherited from
Defined in
Properties
r
• r: Field
Defined in
s
• s: Scalar
Defined in
Methods
assertEquals
▸ assertEquals(x
): void
Parameters
Name | Type |
---|---|
x | Signature |
Returns
void
Inherited from
Defined in
equals
▸ equals(x
): Bool
Parameters
Name | Type |
---|---|
x | Signature |
Returns
Inherited from
Defined in
isConstant
▸ isConstant(): boolean
Returns
boolean
Inherited from
Defined in
toBase58
▸ toBase58(): string
Encodes a Signature in base58 format.
Returns
string
Defined in
toConstant
▸ toConstant(): Signature
Returns
Inherited from
Defined in
toFields
▸ toFields(): Field
[]
Returns
Field
[]
Inherited from
Defined in
toJSON
▸ toJSON(): any
Returns
any
Inherited from
Defined in
verify
▸ verify(publicKey
, msg
): Bool
Verifies the Signature using a message and the corresponding PublicKey.
Parameters
Name | Type |
---|---|
publicKey | PublicKey |
msg | Field [] |
Returns
a Bool
Defined in
check
▸ Static
check<T
>(this
, v
): void
Type parameters
Name | Type |
---|---|
T | extends AnyConstructor |
Parameters
Name | Type |
---|---|
this | T |
v | InstanceType <T > |
Returns
void
Inherited from
Defined in
create
▸ Static
create(privKey
, msg
): Signature
Signs a message using a PrivateKey.
Parameters
Name | Type |
---|---|
privKey | PrivateKey |
msg | Field [] |
Returns
Defined in
fromBase58
▸ Static
fromBase58(signatureBase58
): Signature
Decodes a base58 encoded signature into a Signature.
Parameters
Name | Type |
---|---|
signatureBase58 | string |
Returns
Defined in
fromFields
▸ Static
fromFields<T
>(this
, xs
): InstanceType
<T
>
Type parameters
Name | Type |
---|---|
T | extends AnyConstructor |
Parameters
Name | Type |
---|---|
this | T |
xs | Field [] |
Returns
InstanceType
<T
>
Inherited from
Defined in
fromJSON
▸ Static
fromJSON<T
>(this
, value
): InstanceType
<T
>
Type parameters
Name | Type |
---|---|
T | extends AnyConstructor |
Parameters
Name | Type |
---|---|
this | T |
value | any |
Returns
InstanceType
<T
>
Inherited from
Defined in
fromObject
▸ Static
fromObject<T
>(this
, value
): InstanceType
<T
>
Type parameters
Name | Type |
---|---|
T | extends AnyConstructor |
Parameters
Name | Type |
---|---|
this | T |
value | NonMethods <InstanceType <T >> |
Returns
InstanceType
<T
>
Inherited from
Defined in
sizeInFields
▸ Static
sizeInFields(): number
Returns
number
Inherited from
Defined in
toAuxiliary
▸ Static
toAuxiliary(): []
Returns
[]
Inherited from
Defined in
toConstant
▸ Static
toConstant<T
>(this
, t
): InstanceType
<T
>
Type parameters
Name | Type |
---|---|
T | extends AnyConstructor |
Parameters
Name | Type |
---|---|
this | T |
t | InstanceType <T > |
Returns
InstanceType
<T
>
Inherited from
Defined in
toFields
▸ Static
toFields<T
>(this
, v
): Field
[]
Type parameters
Name | Type |
---|---|
T | extends AnyConstructor |
Parameters
Name | Type |
---|---|
this | T |
v | InstanceType <T > |
Returns
Field
[]
Inherited from
Defined in
toInput
▸ Static
toInput<T
>(this
, v
): HashInput
Type parameters
Name | Type |
---|---|
T | extends AnyConstructor |
Parameters
Name | Type |
---|---|
this | T |
v | InstanceType <T > |
Returns
HashInput
Inherited from
Defined in
toJSON
▸ Static
toJSON<T
>(this
, v
): any
Type parameters
Name | Type |
---|---|
T | extends AnyConstructor |
Parameters
Name | Type |
---|---|
this | T |
v | InstanceType <T > |
Returns
any