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

Properties

isOdd

isOdd: Bool

Defined in

lib/signature.ts:80


x

x: Field

Defined in

lib/signature.ts:79

Methods

assertEquals

assertEquals(x): void

Parameters

NameType
xPublicKey

Returns

void

Inherited from

CircuitValue.assertEquals

Defined in

lib/circuit_value.ts:152


equals

equals(x): Bool

Parameters

NameType
xPublicKey

Returns

Bool

Inherited from

CircuitValue.equals

Defined in

lib/circuit_value.ts:148


isConstant

isConstant(): boolean

Returns

boolean

Inherited from

CircuitValue.isConstant

Defined in

lib/circuit_value.ts:156


isEmpty

isEmpty(): Bool

Checks if a PublicKey is empty.

Returns

Bool

a Bool

Defined in

lib/signature.ts:137


toBase58

toBase58(): string

Encodes a PublicKey in base58 format.

Returns

string

a base58 encoded PublicKey

Defined in

lib/signature.ts:154


toConstant

toConstant(): PublicKey

Returns

PublicKey

Inherited from

CircuitValue.toConstant

Defined in

lib/circuit_value.ts:144


toFields

toFields(): Field[]

Returns

Field[]

Inherited from

CircuitValue.toFields

Defined in

lib/circuit_value.ts:136


toGroup

toGroup(): Group

Returns the Group representation of this PublicKey.

Returns

Group

A Group

Defined in

lib/signature.ts:86


toJSON

toJSON(): any

Returns

any

Inherited from

CircuitValue.toJSON

Defined in

lib/circuit_value.ts:140


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


empty

Static empty(): PublicKey

Creates an empty PublicKey.

Returns

PublicKey

an empty PublicKey

Defined in

lib/signature.ts:129


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


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


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


fromGroup

Static fromGroup(__namedParameters): PublicKey

Creates a PublicKey from a Group element.

Parameters

NameType
__namedParametersGroup

Returns

PublicKey

a PublicKey.

Defined in

lib/signature.ts:104


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


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


fromPrivateKey

Static fromPrivateKey(__namedParameters): PublicKey

Derives a PublicKey from a PrivateKey.

Parameters

NameType
__namedParametersPrivateKey

Returns

PublicKey

a PublicKey.

Defined in

lib/signature.ts:113


sizeInFields

Static sizeInFields(): number

Returns

number

Inherited from

CircuitValue.sizeInFields

Defined in

lib/circuit_value.ts:88


toAuxiliary

Static toAuxiliary(): []

Returns

[]

Inherited from

CircuitValue.toAuxiliary

Defined in

lib/circuit_value.ts:110


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


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


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


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


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