getTemplate(contract, templateID)

Feature
Get information for a specific template with given template ID.

Parameters

string contract Address, string templateID

data of SuccessResponse

object template information

example

const contractAddress = "0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca";
const templateID = "adksjfxeifjkdjf";

// Note: an asynchronous request.
const credentialInfo = async () => {
  const info = await mitum.credential.getTemplate(contractAddress, templateID);
  console.log(info.data);
};
credentialInfo();

//output
{
    _hint: 'mitum-credential-template-v0.0.1',
    template_id: 'adksjfxeifjkdjf',
    template_name: 'default',
    service_date: '2023-10-12',
    expiration_date: '2023-12-31',
    template_share: true,
    multi_audit: false,
    display_name: 'SITcredentials',
    subject_key: 'SITdevcredential',
    description: 'proofofdev',
    creator: '0x07469989b2562afF5E5C3B116CD3AA5Ef814e5a1fca'
}

Last updated