Skip to main content
Version: 11.x

Function: getPackedPublicKey()

getPackedPublicKey(publicKey): string[]

Defined in: s2morrow/keys.ts:538

The 29 felts of the account constructor argument pk_packed.

Parameters​

publicKey​

string | Uint8Array<ArrayBufferLike>

the NIST public key (897 bytes), or its hex string

Returns​

string[]

the 29 felts, as hex strings

Throws​

when the public key is invalid

Example​

const { publicKey } = falcon512.generateKeyPair();
const result = falcon512.getPackedPublicKey(publicKey);
// result = ['0x…', …] (29 felts)