Prerequesite Steps

Prior to creating a policy there are a few steps that need to be done first. Please see below for the prerequesite steps:

New Standard Registry registration

POST /api/v1/accounts/register

Request Body

Name
Type
Description

username*

String

njkqur8x

password*

String

test

role*

String

STANDARD_REGISTRY

{
  username: string
  password: string
  password_confirmation: string
  role: string
}

Authentication Process

Login

POST /api/v1/accounts/login

Request Body

Name
Type
Description

username*

String

StandardRegistry

password*

String

test

"username": "StandardRegistry",
    "did": "did:hedera:testnet:5jDN1zBJPjjQhRDZ4MV3q5CFUVM99WvfJ3zMLLhLS2yk_0.0.7495695",
    "role": "STANDARD_REGISTRY",
    "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9....."

Access Token

POST /api/v1/accounts/access-token

Request Body

Name
Type
Description

refreshToken*

String

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.......

{
    "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9......
}

Account Session

GET /api/v1/accounts/session

Headers

Name
Type
Description

Authorization Bearer

String

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9......

 "_id": "659e8127db770133c0d8fb26",
    "createDate": "2024-01-10T11:36:07.320Z",
    "updateDate": "2024-01-23T13:53:36.347Z",
    "username": "StandardRegistry",
    "password": "9f86d081884c7d659.....",
    "did": "did:hedera:testnet:5jDN1zBJPjjQhRDZ4MV3q5CFUVM99.....",
    "walletToken": "",
    "hederaAccountId": "0.0.749...",
    "role": "STANDARD_REGISTRY",
    "refreshToken": "a0dbe6f.....",
    "id": "659e8127db770133c..."

Account Creations

Hedera account creation

GET /api/v1/demo/random-key

{
    
	"id":"0.0.29511776",
	"key":"302e020100300506032b6570042204200c8d2abbdd9aee64eed6e4891c276aa50248ab182c0cd7dfbec8506e5eaaaef8"

}

Address book creation

PUT /api/v1/profile

Request Body

Name
Type
Description

hederaAccountId*

String

0.0.29511776

hederaAccountKey*

String

302e020100300506032b6570042204200c8d2abbdd9aee64eed6e4891c276aa50248ab182c0cd7dfbec8506e5eaaaef8

name*

String

DD

type*

String

StandardRegistry

context*

String

aopnetname*

String

Test Identity SDK appnet

didSrverURL*

URL

didTopicMemo*

String

Test Identity SDK appnet DID topic

vcTopicMemo*

String

Test Identity SDK appnet DID topic

iRec schema creation

POST /api/v1/schemas

Request Body

Name
Type
Description

uuid*

String

d018a6ce-71f0-4bc5-9380-6bae4d4bb5bb

status*

String

DRAFT

readonly*

String

False

name*

String

iRec

description*

String

iRec Application Form

entity*

String

VC

owner

String

version

String

document*

String

{"$id":"#d018a6ce-71f0-4bc5-9380-6bae4d4bb5bb","$comment":"{ \"term\": \"d018a6ce-71f0-4bc5-9380-6bae4d4bb5bb\", \"@id\": \"https://localhost/schema#d018a6ce-71f0-4bc5-9380-6bae4d4bb5bb\" }","title":"iRec","description":"iRec application form","type":"object","properties":{"@context":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"readOnly":true},"type":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"readOnly":true},"id":{"type":"string","readOnly":true},"field0":{"title":"Test field","description":"Test field","readOnly":false,"$comment":"{ \"term\": \"field0\", \"@id\": \"https://www.schema.org/text\" }","type":"string"},"field1":{"title":"Required field","description":"Required field","readOnly":false,"$comment":"{ \"term\": \"field1\", \"@id\": \"https://www.schema.org/text\" }","type":"string"},"field2":{"title":"Multiple field","description":"Multiple field","readOnly":false,"type":"array","items":{"type":"string"},"$comment":"{ \"term\": \"field2\", \"@id\": \"https://www.schema.org/text\" }"},"policyId":{"title":"policyId","description":"policyId","readOnly":true,"$comment":"{ \"term\": \"policyId\", \"@id\": \"https://www.schema.org/text\" }","type":"string"}},"required":["@context","type","field1","policyId"],"additionalProperties":false}

{
    ...
	{
		"id":"61ee7ecd9c02660014fa662e",
		...
	}
}

iRec schema publish

PUT /api/v1/schemas/61ee7ecd9c02660014fa662e/publish

Request Body

Name
Type
Description

version*

String

{"version":"1.0.0"}

Token creation

POST /api/v1/tokens

Request Body

Name
Type
Description

tokenName*

String

iRec

tokenSymbol*

String

iRec

tokenType*

String

fungible

decimals*

String

2

initialsupply*

String

0

enableAdmin

Boolean

true

changeSupply

Boolean

true

enableFreeze

Boolean

true

enableKYC

Boolean

true

enableWipe

Boolean

true

{
    
		"id":"61ee817b9c02660014fa662f",
		"tokenId":"0.0.29511821",
		...
	
}

Last updated