Skip to content

@gala-chain/chaincodeAPI


API > PublicKeyService

Class: PublicKeyService

Contents

Constructors

new PublicKeyService()

new PublicKeyService(): PublicKeyService

Properties

PK_INDEX_KEY

static private PK_INDEX_KEY: string = PK_INDEX_KEY

Source

chaincode/src/services/PublicKeyService.ts:40


UP_INDEX_KEY

static private UP_INDEX_KEY: string = UP_INDEX_KEY

Source

chaincode/src/services/PublicKeyService.ts:41


normalizePublicKey

static normalizePublicKey: (input) => string = normalizePublicKey

Parameters

input: string

Source

chaincode/src/services/PublicKeyService.ts:51

Methods

deleteUserProfile()

static deleteUserProfile(ctx, ethAddress): Promise\<void>

Parameters

ctx: GalaChainContext

ethAddress: string

Source

chaincode/src/services/PublicKeyService.ts:88


ensurePublicKeySignatureIsValid()

static ensurePublicKeySignatureIsValid(ctx, userId, dto): Promise\<PublicKey>

Verifies if the data is properly signed. Throws exception instead.

Parameters

ctx: GalaChainContext

userId: string

dto: ChainCallDTO

Source

chaincode/src/services/PublicKeyService.ts:168


getPublicKey()

static getPublicKey(ctx, userId): Promise\<undefined | PublicKey>

Parameters

ctx: Context

userId: string

Source

chaincode/src/services/PublicKeyService.ts:138


getPublicKeyKey()

static private getPublicKeyKey(ctx, userAlias): string

Parameters

ctx: Context

userAlias: string

Source

chaincode/src/services/PublicKeyService.ts:43


getUserAddress()

static getUserAddress(publicKey, signing): string

Parameters

publicKey: string

signing: SigningScheme

Source

chaincode/src/services/PublicKeyService.ts:93


getUserProfile()

static getUserProfile(ctx, address): Promise\<undefined | UserProfile>

Parameters

ctx: Context

address: string

Source

chaincode/src/services/PublicKeyService.ts:99


getUserProfileKey()

static private getUserProfileKey(ctx, ethAddress): string

Parameters

ctx: Context

ethAddress: string

Source

chaincode/src/services/PublicKeyService.ts:47


putPublicKey()

static putPublicKey(ctx, publicKey, userAlias, signing): Promise\<void>

Parameters

ctx: GalaChainContext

publicKey: string

userAlias: string

signing: SigningScheme

Source

chaincode/src/services/PublicKeyService.ts:53


putUserProfile()

static putUserProfile(ctx, address, userAlias, signing): Promise\<void>

Parameters

ctx: GalaChainContext

address: string

userAlias: string

signing: SigningScheme

Source

chaincode/src/services/PublicKeyService.ts:68


registerUser()

static registerUser(ctx, providedPkHex, ethAddress, userAlias, signing): Promise\<GalaChainResponse\<string>>

Parameters

ctx: GalaChainContext

providedPkHex: string

ethAddress: string

userAlias: string

signing: SigningScheme

Source

chaincode/src/services/PublicKeyService.ts:188


updatePublicKey()

static updatePublicKey(ctx, newPkHex, newAddress, signing): Promise\<void>

Parameters

ctx: GalaChainContext

newPkHex: string

newAddress: string

signing: SigningScheme

Source

chaincode/src/services/PublicKeyService.ts:220