UNPKG

cardano-web3-utils

Version:
24 lines (23 loc) 894 B
import CSL from '@emurgo/cardano-serialization-lib-nodejs'; import MSG from '@emurgo/cardano-message-signing-nodejs'; /** * Create a COSE Key structure from a private key * * @param {CSL.PrivateKey} privateKey - private key to extract the public key * @returns */ export declare function createCOSEKey(privateKey: CSL.PrivateKey): MSG.COSEKey; export declare function createCOSESign1Signature(payload: object, address: CSL.RewardAddress, privateKey: CSL.PrivateKey): MSG.COSESign1; /** * * @param {number} accountNumber - Number between 0 and 255 for mocking private key * @returns */ export declare function createFakePrivateKey(accountNumber: number): CSL.PrivateKey; /** * * @param {CSL.PrivateKey} privateKey * @param {CSL.NetworkId} networkId * @returns */ export declare function createRewardAddress(privateKey: CSL.PrivateKey, networkId: CSL.NetworkId): CSL.RewardAddress;