<p>I suggest using <a href="https://github.com/shareslake/cardanocli-js" rel="nofollow noreferrer"><code>cardanocli-js</code></a> to generate the KES signature file.</p>
<p>You can do it like this:</p>
<pre><code>const CardanocliJs = require(&quot;cardanocli-js&quot;);

const shelleyGenesisPath = &quot;/path/to/your/testnet-shelley-genesis.json&quot;;
const options = {
  shelleyGenesisPath,
  network: &quot;testnet-magic 1097911063&quot;
};

const cardanocliJs = new CardanocliJs(options);

const nodeKeyGenKES = cardanocliJs.nodeKeyGenKES(stakePoolName);
</code></pre>

CC BY-SA 4.0
2022-06-01T02:47:31.483Z
2022-06-01T02:47:31.483Z
Falcon Stakepool
<p>Cardano Serialization Lib has this class:</p>
<pre><code>export class KESSignature {
  free(): void;
/**
* @returns {Uint8Array}
*/
  to_bytes(): Uint8Array;
/**
* @param {Uint8Array} bytes
* @returns {KESSignature}
*/
  static from_bytes(bytes: Uint8Array): KESSignature;
}
</code></pre>
<p>What <code>Uint8Array</code> should I provide to the <code>from_bytes</code> method to obtain a valid <code>KESSignature</code>?</p>

<stake-pool><cardano-serialization-lib><signing-key-file>
How can I generate a KES Signature using cardano-serialization-lib?
# How can I generate a KES Signature using cardano-serialization-lib?

(Asked by: username_0 on 2022-04-20)

Cardano Serialization Lib has this class:
export class KESSignature {
  free(): void;
/**
* @returns {Uint8Array}
*/
  to_bytes(): Uint8Array;
/**
* @param {Uint8Array} bytes
* @returns {KESSignature}
*/
  static from_bytes(bytes: Uint8Array): KESSignature;
}

What Uint8Array should I provide to the from_bytes method to obtain a valid KESSignature?

**Tags:** stake-pool, cardano-serialization-lib, signing-key-file

---

## 1 answers

### Answer by username_0 on 2022-06-01. Score: 0 | Accepted answer

I suggest using cardanocli-js to generate the KES signature file.
You can do it like this:
const CardanocliJs = require("cardanocli-js");

const shelleyGenesisPath = "/path/to/your/testnet-shelley-genesis.json";
const options = {
  shelleyGenesisPath,
  network: "testnet-magic 1097911063"
};

const cardanocliJs = new CardanocliJs(options);

const nodeKeyGenKES = cardanocliJs.nodeKeyGenKES(stakePoolName);


---

