revoke(contract, sender, holder, templateID, credentialID, currency)
Feature
Return raw operation that revokes a specific issued credential. Note : Operator of contract also can execute the function.
Parameters
string contract address,
string sender,
string holder,
string templateId,
string credential ID,
string currency ID
Return Value
object accountInformation
example
const contractAddress = "0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca";
const sender = "0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca";
const holder = "0x07469989b2562afF5E5C3B116CD3AA5Ef814e5a1fca";
const templateId = "adksjfxeifjkdjf";
const credentialId = "sefthia100";
const currencyId = "MCC";
const revokeOperation = mitum.credential.revoke(
contractAddress,
sender,
holder,
templateId,
credentialId,
currencyId,
);
console.log(revokeOperation);
// output
Operation {
id: 'mitum',
fact: RevokeFact {
hint: Hint { s: 'mitum-credential-revoke-operation-fact' },
token: Token { s: '2023-10-12 05:02:16.381 +0000 UTC' },
_hash: <Buffer 73 78 ee 35 d9 cc 6e 56 22 1f 2b cf f6 b1 46 61 18 03 82 e1 b1 0e 45 0e 17 a3 ef f6 6f 73 09 de>,
sender: Address {
s: '0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca',
type: 'mitum'
},
items: [ [RevokeItem] ]
},
hint: Hint { s: 'mitum-credential-revoke-operation' },
_factSigns: [],
_hash: <Buffer >
}Previousissue(contract, sender, data, currency)NextgetCredential(contract, templateID, credentialID)
Last updated