Function govActionIdToBech32

Serializes a GovernanceActionId object into its Bech32 string representation.

This function converts a structured GovernanceActionId object (containing a transaction ID and action index) into its CIP-129 formatted Bech32 string (e.g., "gov_action1...").

Throws an error if the serialization fails.

https://cips.cardano.org/cip/CIP-129|CIP-129 for the official specification.

const govActionId = {
id: '0000000000000000000000000000000000000000000000000000000000000000',
actionIndex: 11
};
const bech32Id = govActionIdToBech32(govActionId);

console.log(bech32Id);
//-> "gov_action1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpzklpgpf"