Skip to content

Commit 54cbe25

Browse files
committed
Small Bugfix Release 1.16.1
Default output description for a CIP36 Catalyst Voting .vkey was 'unknown Vote Verification Key' and is now 'Catalyst Vote Verification Key'
1 parent e792768 commit 54cbe25

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/cardano-signer.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//define name and version
22
const appname = "cardano-signer"
3-
const version = "1.16.0"
3+
const version = "1.16.1"
44

55
//external dependencies
66
const CardanoWasm = require("@emurgo/cardano-serialization-lib-nodejs")
@@ -1411,16 +1411,6 @@ async function main() {
14111411

14121412
case '1694H/1815H': //CIP36 voting keys
14131413

1414-
var skeyContent = `{ "type": "CIP36VoteExtendedSigningKey_ed25519", "description": "${vote_purpose_description} Vote Signing Key", "cborHex": "${prvKeyCbor}" }`;
1415-
if ( args['vkey-extended'] === true ) {
1416-
var vkeyContent = `{ "type": "CIP36VoteExtendedVerificationKey_ed25519", "description": "${vote_purpose_description} Vote Verification Key", "cborHex": "${pubKeyCbor}" }`;
1417-
} else {
1418-
var vkeyContent = `{ "type": "CIP36VoteVerificationKey_ed25519", "description": "${vote_purpose_description} Vote Verification Key", "cborHex": "${pubKeyCbor}" }`;
1419-
}
1420-
//generate the keys also in bech format
1421-
var prvKeyBech = bech32.encode("cvote_sk", bech32.toWords(Buffer.from(prvKeyHex, "hex")), 256); //encode in bech32 with a raised limit to 256 words because of the extralong privatekey (128bytes)
1422-
var pubKeyBech = bech32.encode("cvote_vk", bech32.toWords(Buffer.from(pubKeyHex, "hex")), 128); //encode in bech32 with a raised limit to 128 words because of the longer publickey (64bytes)
1423-
14241414
//get the --vote-purpose parameter, set default = 0
14251415
var vote_purpose_param = args['vote-purpose'];
14261416
if ( typeof vote_purpose_param === 'undefined' ) { vote_purpose = 0 } //if not defined, set it to default=0
@@ -1432,6 +1422,16 @@ async function main() {
14321422
case 0: var vote_purpose_description="Catalyst"; break;
14331423
default: var vote_purpose_description="Unknown";
14341424
}
1425+
1426+
var skeyContent = `{ "type": "CIP36VoteExtendedSigningKey_ed25519", "description": "${vote_purpose_description} Vote Signing Key", "cborHex": "${prvKeyCbor}" }`;
1427+
if ( args['vkey-extended'] === true ) {
1428+
var vkeyContent = `{ "type": "CIP36VoteExtendedVerificationKey_ed25519", "description": "${vote_purpose_description} Vote Verification Key", "cborHex": "${pubKeyCbor}" }`;
1429+
} else {
1430+
var vkeyContent = `{ "type": "CIP36VoteVerificationKey_ed25519", "description": "${vote_purpose_description} Vote Verification Key", "cborHex": "${pubKeyCbor}" }`;
1431+
}
1432+
//generate the keys also in bech format
1433+
var prvKeyBech = bech32.encode("cvote_sk", bech32.toWords(Buffer.from(prvKeyHex, "hex")), 256); //encode in bech32 with a raised limit to 256 words because of the extralong privatekey (128bytes)
1434+
var pubKeyBech = bech32.encode("cvote_vk", bech32.toWords(Buffer.from(pubKeyHex, "hex")), 128); //encode in bech32 with a raised limit to 128 words because of the longer publickey (64bytes)
14351435
break;
14361436

14371437

src/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cardano-signer",
3-
"version": "1.16.0",
3+
"version": "1.16.1",
44
"description": "cardano-signer signs a given data(hex/text/file) with a signing key(hex/bech/file) or verify the signature via a public key(hex/bech/file). it can also produce a cip-8/cip-30/cip-36 conform payload signing/verification. can produce ed25519 keys from mnemonic for payment, staking, drep, constitutional commitee cold/hot keys, etc...",
55
"main": "cardano-signer.js",
66
"scripts": {

0 commit comments

Comments
 (0)