Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Latest commit

 

History

History
40 lines (37 loc) · 997 Bytes

README.md

File metadata and controls

40 lines (37 loc) · 997 Bytes

KRNL mock token authority

A lightweight token-authority for experimenting with the KRNL ecosystem.

Local run

go run main.go

Endpoints

/register-dapp

Generates two key pairs and saves them into secrets.json. It signs the secret and returns it to the user as an accessToken with the public key of the token authority which should be used for smart-contract deployments. Note: each call generates a new key pair.

Request

{
    "dappName": "<the name of the dapp>"
}

Response

{
    "accessToken": "<signed dapp name as access token>",
    "tokenAuthorityPublicKey" : "<token auth public key>"
}

/tx-request

Generates the signatureToken, by signing the passed message if the provided accessToken is valid.

Request

{
    "accessToken": "<access token from the register dapp call>",
    "message": "<requested FaaS functionalities>"
}

Response

{
    "signatureToken": "<signed message>"
}