Skip to content

@gala-chain/connectAPI


API > PublicKeyApi

Class: PublicKeyApi

API client for public key and user profile operations on the GalaChain network. Handles user registration, profile management, and public key updates.

Contents

Extends

Constructors

new PublicKeyApi(chainCodeUrl, connection)

new PublicKeyApi(chainCodeUrl, connection): PublicKeyApi

Creates a new PublicKeyApi instance.

Parameters

chainCodeUrl: string

The URL of the public key chaincode service

connection: GalaChainProvider

The GalaChain provider for network communication

Overrides

GalaChainBaseApi.constructor

Source

chain-connect/src/chainApis/PublicKeyApi.ts:38

Properties

chainCodeUrl

protected chainCodeUrl: string

The URL of the chaincode service

Inherited from

GalaChainBaseApi.chainCodeUrl

Source

chain-connect/src/chainApis/GalaChainBaseApi.ts:31


connection

protected connection: GalaChainProvider

The GalaChain provider for network communication

Inherited from

GalaChainBaseApi.connection

Source

chain-connect/src/chainApis/GalaChainBaseApi.ts:32

Methods

DryRun()

DryRun(dto): Promise\<GalaChainResponseSuccess\<DryRunResult>>

Performs a dry run of a chaincode operation without committing to the ledger.

Parameters

dto: PublicProperties\<ConstructorArgs\<DryRunDto>>

The dry run request parameters

Returns

Promise resolving to the dry run results

Inherited from

GalaChainBaseApi.DryRun

Source

chain-connect/src/chainApis/GalaChainBaseApi.ts:40


GetMyProfile()

GetMyProfile(message?, signature?): Promise\<GalaChainResponseSuccess\<UserProfile>>

Retrieves the current user's profile information.

Parameters

message?: string

Optional message for authentication

signature?: string

Optional signature for the message

Returns

Promise resolving to the user's profile

Source

chain-connect/src/chainApis/PublicKeyApi.ts:49


GetObjectByKey()

GetObjectByKey\<T>(dto): Promise\<GalaChainResponseSuccess\<T>>

Retrieves an object from the blockchain by its key.

Type parameters

T = Record\<string, unknown>

The expected type of the retrieved object

Parameters

dto: PublicProperties\<ConstructorArgs\<GetObjectDto>>

The object key request parameters

Returns

Promise resolving to the retrieved object

Inherited from

GalaChainBaseApi.GetObjectByKey

Source

chain-connect/src/chainApis/GalaChainBaseApi.ts:61


GetObjectHistory()

GetObjectHistory\<T>(dto): Promise\<GalaChainResponseSuccess\<T>>

Retrieves the history of changes for an object from the blockchain.

Type parameters

T = Record\<string, unknown>

The expected type of the historical objects

Parameters

dto: PublicProperties\<ConstructorArgs\<GetObjectHistoryDto>>

The object history request parameters

Returns

Promise resolving to the object's history

Inherited from

GalaChainBaseApi.GetObjectHistory

Source

chain-connect/src/chainApis/GalaChainBaseApi.ts:77


RegisterEthUser()

RegisterEthUser(dto): Promise\<GalaChainResponseSuccess\<string>>

Registers a new Ethereum user on the GalaChain network.

Parameters

dto: RegisterEthUserRequest

The Ethereum user registration request data

Returns

Promise resolving to registration confirmation

Source

chain-connect/src/chainApis/PublicKeyApi.ts:81


RegisterUser()

RegisterUser(dto): Promise\<GalaChainResponseSuccess\<string>>

Registers a new user on the GalaChain network.

Parameters

dto: RegisterUserRequest

The user registration request data

Returns

Promise resolving to registration confirmation

Source

chain-connect/src/chainApis/PublicKeyApi.ts:66


UpdatePublicKey()

UpdatePublicKey(dto): Promise\<GalaChainResponseSuccess\<void>>

Updates the public key for the current user.

Parameters

dto: UpdatePublicKeyRequest

The public key update request data

Returns

Promise resolving when the update is complete

Source

chain-connect/src/chainApis/PublicKeyApi.ts:96