neox-tpke
Version:
NeoX TPKE utilities
17 lines • 724 B
TypeScript
import { Fp } from '@noble/curves/abstract/tower';
import { ProjPointType } from '@noble/curves/abstract/weierstrass';
import { ByteArray } from 'viem';
export declare function getConsensusThreshold(consensusSize: bigint): bigint;
export declare function getScaler(size: bigint, threshold: bigint): bigint;
export declare class PublicKey {
pg1: ProjPointType<Fp>;
constructor(pg1: ProjPointType<Fp>);
static fromAggregatedCommitment(aggregatedCommitment: ByteArray, scaler: bigint): PublicKey;
static fromBytes(bytes: ByteArray): PublicKey;
toBytes(): ByteArray;
encrypt(msg: ByteArray): {
encryptedKey: ByteArray;
encryptedMsg: ByteArray;
};
}
//# sourceMappingURL=index.d.ts.map