@gala-chain/chaincode • Readme | API
@gala-chain/chaincode / PublicKeyService
Class: PublicKeyService
Constructors
new PublicKeyService()
new PublicKeyService():
PublicKeyService
Returns
Properties
PK_INDEX_KEY
static
private
PK_INDEX_KEY:string
Source
chaincode/src/services/PublicKeyService.ts:31
UP_INDEX_KEY
static
private
UP_INDEX_KEY:string
Source
chaincode/src/services/PublicKeyService.ts:32
normalizePublicKey()
static
normalizePublicKey: (input
) =>string
Parameters
• input: string
Returns
string
Source
chaincode/src/services/PublicKeyService.ts:42
Methods
deleteUserProfile()
static
deleteUserProfile(ctx
,ethAddress
):Promise
\<void
>
Parameters
• ctx: GalaChainContext
• ethAddress: string
Returns
Promise
\<void
>
Source
chaincode/src/services/PublicKeyService.ts:65
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
Returns
Promise
\<PublicKey
>
Source
chaincode/src/services/PublicKeyService.ts:129
getPublicKey()
static
getPublicKey(ctx
,userId
):Promise
\<undefined
|PublicKey
>
Parameters
• ctx: Context
• userId: string
Returns
Promise
\<undefined
| PublicKey
>
Source
chaincode/src/services/PublicKeyService.ts:101
getPublicKeyKey()
static
private
getPublicKeyKey(ctx
,userId
):string
Parameters
• ctx: Context
• userId: string
Returns
string
Source
chaincode/src/services/PublicKeyService.ts:34
getUserProfile()
static
getUserProfile(ctx
,ethAddress
):Promise
\<undefined
|UserProfile
>
Parameters
• ctx: Context
• ethAddress: string
Returns
Promise
\<undefined
| UserProfile
>
Source
chaincode/src/services/PublicKeyService.ts:70
getUserProfileKey()
static
private
getUserProfileKey(ctx
,ethAddress
):string
Parameters
• ctx: Context
• ethAddress: string
Returns
string
Source
chaincode/src/services/PublicKeyService.ts:38
putPublicKey()
static
putPublicKey(ctx
,publicKey
,userId
?):Promise
\<void
>
Parameters
• ctx: GalaChainContext
• publicKey: string
• userId?: string
Returns
Promise
\<void
>
Source
chaincode/src/services/PublicKeyService.ts:44
putUserProfile()
static
putUserProfile(ctx
,ethAddress
,userAlias
):Promise
\<void
>
Parameters
• ctx: GalaChainContext
• ethAddress: string
• userAlias: string
Returns
Promise
\<void
>