Skip to main content

Class: PublicKey

Types.PublicKey

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

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new PublicKey(...props)

Parameters

NameType
...propsany[]

Inherited from

CircuitValue.constructor

Defined in

lib/circuit_value.ts:87

Properties

isOdd

isOdd: Bool

Defined in

lib/signature.ts:86


x

x: Field

Defined in

lib/signature.ts:85

Methods

assertEquals

assertEquals(x): void

Parameters

NameType
xPublicKey

Returns

void

Inherited from

CircuitValue.assertEquals

Defined in

lib/circuit_value.ts:175


equals

equals(x): Bool

Parameters

NameType
xPublicKey

Returns

Bool

Inherited from

CircuitValue.equals

Defined in

lib/circuit_value.ts:171


isConstant

isConstant(): boolean

Returns

boolean

Inherited from

CircuitValue.isConstant

Defined in

lib/circuit_value.ts:179


isEmpty

isEmpty(): Bool

Checks if a PublicKey is empty.

Returns

Bool

a Bool

Defined in

lib/signature.ts:143


toBase58

toBase58(): string

Encodes a PublicKey in base58 format.

Returns

string

a base58 encoded PublicKey

Defined in

lib/signature.ts:160


toConstant

toConstant(): PublicKey

Returns

PublicKey

Inherited from

CircuitValue.toConstant

Defined in

lib/circuit_value.ts:167


toFields

toFields(): Field[]

Returns

Field[]

Inherited from

CircuitValue.toFields

Defined in

lib/circuit_value.ts:159


toGroup

toGroup(): Group

Returns the Group representation of this PublicKey.

Returns

Group

A Group

Defined in

lib/signature.ts:92


toJSON

toJSON(): any

Returns

any

Inherited from

CircuitValue.toJSON

Defined in

lib/circuit_value.ts:163


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:208


empty

Static empty(): PublicKey

Creates an empty PublicKey.

Returns

PublicKey

an empty PublicKey

Defined in

lib/signature.ts:135


from

Static from(g): PublicKey

Creates a PublicKey from a JSON structure element.

Parameters

NameType
gObject
g.isOddBool
g.xField

Returns

PublicKey

a PublicKey.

Defined in

lib/signature.ts:127


fromBase58

Static fromBase58(publicKeyBase58): PublicKey

Decodes a base58 encoded PublicKey into a PublicKey.

Parameters

NameType
publicKeyBase58string

Returns

PublicKey

a PublicKey

Defined in

lib/signature.ts:152


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:183


fromGroup

Static fromGroup(«destructured»): PublicKey

Creates a PublicKey from a Group element.

Parameters

NameType
«destructured»Group

Returns

PublicKey

a PublicKey.

Defined in

lib/signature.ts:110


fromJSON

Static fromJSON<T>(this, publicKey): InstanceType<T>

Deserializes a JSON string into a PublicKey.

Type parameters

NameType
Textends AnyConstructor

Parameters

NameType
thisT
publicKeystring

Returns

InstanceType<T>

a JSON string

Overrides

CircuitValue.fromJSON

Defined in

lib/signature.ts:182


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:104


fromPrivateKey

Static fromPrivateKey(«destructured»): PublicKey

Derives a PublicKey from a PrivateKey.

Parameters

NameType
«destructured»PrivateKey

Returns

PublicKey

a PublicKey.

Defined in

lib/signature.ts:119


sizeInFields

Static sizeInFields(): number

Returns

number

Inherited from

CircuitValue.sizeInFields

Defined in

lib/circuit_value.ts:111


toAuxiliary

Static toAuxiliary(): []

Returns

[]

Inherited from

CircuitValue.toAuxiliary

Defined in

lib/circuit_value.ts:133


toBase58

Static toBase58(publicKey): string

Static method to encode a PublicKey into base58 format.

Parameters

NameType
publicKeyPublicKey

Returns

string

a base58 encoded PublicKey

Defined in

lib/signature.ts:168


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:222


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:116


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:137


toJSON

Static toJSON(publicKey): string

Serializes a PublicKey into its JSON representation.

Parameters

NameType
publicKeyPublicKey

Returns

string

a JSON string

Overrides

CircuitValue.toJSON

Defined in

lib/signature.ts:175