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


UP_INDEX_KEY

static private UP_INDEX_KEY: string = UP_INDEX_KEY

Source

chaincode/src/services/PublicKeyService.ts:42


normalizePublicKey

static normalizePublicKey: (input) => string = normalizePublicKey

Parameters

input: string

Source

chaincode/src/services/PublicKeyService.ts:52

Methods

deleteUserProfile()

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

Parameters

ctx: GalaChainContext

ethAddress: string

Source

chaincode/src/services/PublicKeyService.ts:89


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


getPublicKey()

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

Parameters

ctx: Context

userId: string

Source

chaincode/src/services/PublicKeyService.ts:145


getPublicKeyKey()

static getPublicKeyKey(ctx, userAlias): string

Parameters

ctx: Context

userAlias: string

Source

chaincode/src/services/PublicKeyService.ts:44


getUserAddress()

static getUserAddress(publicKey, signing): string

Parameters

publicKey: string

signing: SigningScheme

Source

chaincode/src/services/PublicKeyService.ts:94


getUserProfile()

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

Parameters

ctx: Context

address: string

Source

chaincode/src/services/PublicKeyService.ts:100


getUserProfileKey()

static getUserProfileKey(ctx, ethAddress): string

Parameters

ctx: Context

ethAddress: string

Source

chaincode/src/services/PublicKeyService.ts:48


putPublicKey()

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

Parameters

ctx: GalaChainContext

publicKey: string

userAlias: string

signing: SigningScheme

Source

chaincode/src/services/PublicKeyService.ts:54


putUserProfile()

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

Parameters

ctx: GalaChainContext

address: string

userAlias: UserAlias

signing: SigningScheme

Source

chaincode/src/services/PublicKeyService.ts:69


registerUser()

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

Parameters

ctx: GalaChainContext

providedPkHex: string

ethAddress: string

userAlias: UserAlias

signing: SigningScheme

Source

chaincode/src/services/PublicKeyService.ts:195


updatePublicKey()

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

Parameters

ctx: GalaChainContext

newPkHex: string

newAddress: string

signing: SigningScheme

Source

chaincode/src/services/PublicKeyService.ts:227


updateUserRoles()

static updateUserRoles(ctx, user, roles): Promise\<void>

Parameters

ctx: GalaChainContext

user: string

roles: string[]

Source

chaincode/src/services/PublicKeyService.ts:256