Skip to main content

PublicKey

A public key, which is also an address on the Mina network. You can derive a PublicKey directly from a PrivateKey.

Extends

  • CircuitValue

Constructors

new PublicKey()

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

Parameters

• ...props: any[]

Returns

PublicKey

Inherited from

CircuitValue.constructor

Source

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

Properties

isOdd

isOdd: Bool;

Source

lib/provable/crypto/signature.ts:138


x

x: Field;

Source

lib/provable/crypto/signature.ts:137

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


isEmpty()

isEmpty(): Bool

Checks if a PublicKey is empty.

Returns

Bool

a Bool

Source

lib/provable/crypto/signature.ts:193


toBase58()

toBase58(): string

Encodes a PublicKey in base58 format.

Returns

string

a base58 encoded PublicKey

Source

lib/provable/crypto/signature.ts:211


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


toGroup()

toGroup(): Group

Returns the Group representation of this PublicKey.

Returns

Group

A Group

Source

lib/provable/crypto/signature.ts:144


toJSON()

toJSON(): any

Returns

any

Inherited from

CircuitValue.toJSON

Source

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


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


empty()

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

Creates an empty PublicKey.

Type parameters

T extends AnyConstructor

Returns

InstanceType\<T>

an empty PublicKey

Overrides

CircuitValue.empty

Source

lib/provable/crypto/signature.ts:185


from()

static from(g: {
"isOdd": boolean | Bool;
"x": bigint | Field;
}): PublicKey

Creates a PublicKey from a JSON structure element.

Parameters

g

g.isOdd: boolean | Bool

g.x: bigint | Field

Returns

PublicKey

a PublicKey.

Source

lib/provable/crypto/signature.ts:177


fromBase58()

static fromBase58(publicKeyBase58: string): PublicKey

Decodes a base58 encoded PublicKey into a PublicKey.

Parameters

publicKeyBase58: string

Returns

PublicKey

a PublicKey

Source

lib/provable/crypto/signature.ts:202


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


fromGroup()

static fromGroup(__namedParameters: Group): PublicKey

Creates a PublicKey from a Group element.

Parameters

__namedParameters: Group

Returns

PublicKey

a PublicKey.

Source

lib/provable/crypto/signature.ts:161


fromJSON()

static fromJSON<T>(this: T, publicKey: string): InstanceType<T>

Deserializes a JSON string into a PublicKey.

Type parameters

T extends AnyConstructor

Parameters

this: T

publicKey: string

Returns

InstanceType\<T>

a JSON string

Overrides

CircuitValue.fromJSON

Source

lib/provable/crypto/signature.ts:239


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


fromPrivateKey()

static fromPrivateKey(__namedParameters: PrivateKey): PublicKey

Derives a PublicKey from a PrivateKey.

Parameters

__namedParameters: PrivateKey

Returns

PublicKey

a PublicKey.

Source

lib/provable/crypto/signature.ts:169


fromValue()

static fromValue<T>(this: T, __namedParameters: {
"isOdd": boolean | Bool;
"x": bigint | Field;
}): InstanceType<T>

Type parameters

T extends AnyConstructor

Parameters

this: T

__namedParameters

__namedParameters.isOdd: boolean | Bool

__namedParameters.x: bigint | Field

Returns

InstanceType\<T>

Overrides

CircuitValue.fromValue

Source

lib/provable/crypto/signature.ts:246


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


toBase58()

static toBase58(__namedParameters: PublicKey): string

Static method to encode a PublicKey into base58 format.

Parameters

__namedParameters: PublicKey

Returns

string

a base58 encoded PublicKey

Source

lib/provable/crypto/signature.ts:219


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(publicKey: PublicKey): string

Serializes a PublicKey into its JSON representation.

Parameters

publicKey: PublicKey

Returns

string

a JSON string

Overrides

CircuitValue.toJSON

Source

lib/provable/crypto/signature.ts:231


toValue()

static toValue(__namedParameters: PublicKey): {
"isOdd": boolean;
"x": bigint;
}

Parameters

__namedParameters: PublicKey

Returns

{
"isOdd": boolean;
"x": bigint;
}
isOdd
isOdd: boolean;
x
x: bigint;

Overrides

CircuitValue.toValue

Source

lib/provable/crypto/signature.ts:243