UNPKG

@pokt-network/pocket-js

Version:

Pocket-js core package with the main functionalities to interact with the Pocket Network.

33 lines 1.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TxSignature = void 0; var belt_1 = require("@tendermint/belt"); /** * Represents a given signature for a Transaction */ var TxSignature = /** @class */ (function () { /** * @param pubKey {Buffer} public key of the signer * @param signature {Buffer} the signature */ function TxSignature(pubKey, signature) { this.PUBLIC_KEY_TYPE = "crypto/ed25519_public_key"; this.pubKey = pubKey; this.signature = signature; } /** * Encodes the object to it's Amino encodable form */ TxSignature.prototype.toPosmintStdSignature = function () { return { pub_key: { type: this.PUBLIC_KEY_TYPE, value: belt_1.bytesToBase64(this.pubKey).toString() }, signature: belt_1.bytesToBase64(this.signature).toString() }; }; return TxSignature; }()); exports.TxSignature = TxSignature; //# sourceMappingURL=tx-signature.js.map