Issuer server guide(JAVA)
This is the Issuer SDK (Java) server guide document.
Issuer API
KeyManager Unlock
The private key is readable through IWKeyManager Class.
String keyManagerFile = "key.wallet";
String keyManagerPass = "keywalletPassword";
IWKeyManager keyManager = new IWKeyManager(keyManagerFile, keyManagerPass);
keyManager.unLock(keyManagerPass, new OnUnLockListener() {
@Override
public void onSuccess() {
System.out.println("KeyManager Unlock onSuccess");
}
@Override
public void onFail(int errCode) {
System.out.println("KeyManager Unlock onFail:" + errCode);
}
@Override
public void onCancel() {
System.out.println("KeyManager Unlock onCancel");
}
});Read DID Document
DID document can be read through the IWDIDFile class.
Use getData() function to transfer to the Jason string.
BlockChain node settings
BlockChain node settings can be set through the ServerInfo class.
VC Issuing API
VC issuance consists of 2 steps.
vcInit: Initial settings of the VC issuance.
Depending on the issuance, if there is no token transaction by the user, vcReg will initiate internally.
vcReg: Register the created VC to the BlockChain
VC Init
VcInitParam Class
ServerInfo- BlockChain node server informationIWKeyManager- private key Wallet managementmainKeyId- Stored KeyID in the KeyManager for signingvcRequestJson- VC creation request string(JSON)issuerDidFile- Issuer DID file pathvcTypeCode- VC TYPE Code
IssuerApi.vcInit Class - Init Api
vcInit(VcInitParam vcInitParam)
VcResult Class - Result Class
issueCost- VC issuance cost(optional)status- status information (required)0 = VC creation incomplete
1 = VC creation completed
vcComplete- Completed VC(required)vcDefCode- VC Code(optional)
VC Reg
An API for the VC to register finally on the Blockchain.
VcRegParam Class - Reg Data
ServerInfo- BlockChain Node server informationkeyManager- Private key Wallet managementmainKeyId- Stored KeyID in the KeyManager for signingvcInitResultJson- VC Init result data (Json)issuerDidFile- File path Issuer DIDtxId- Token Transfer TX ID
IssuerApi.vcReg Class - Init API
vcReg(VcRegParam vcRegParam)
VcResult Class - Result Class
issueCost- VC issuing cost (optional)status- status info (required)0 = VC creation incomplete
1 = VC creation completed
vcComplete- Completed VC (essensial)vcDefCode- VC code (optional)
Last updated
Was this helpful?