Adds support for versioned profiles
* Add zkgroup library * tsconfig.json: Prettier wants to mess it up. :0( * Initial take on versioned profile fetches * Fix up the logging in getProfiles() - warn instead of error * Introduce new VERSIONED_PROFILE_FETCH flag * Update zkgroup dependency to v0.5.0 * Fix lint-deps - new zkgroup library brought in new debug dep * ts/zkgroup: Introduce some commonly-used helper functions * Update to latest serverPublicParams * Don't derive profileKeyVersion unless flag is set
This commit is contained in:
parent
5f0c07eec2
commit
c1dfe3e5b4
14 changed files with 591 additions and 25 deletions
|
@ -17,10 +17,19 @@ export function typedArrayToArrayBuffer(typedArray: Uint8Array): ArrayBuffer {
|
|||
export function arrayBufferToBase64(arrayBuffer: ArrayBuffer) {
|
||||
return window.dcodeIO.ByteBuffer.wrap(arrayBuffer).toString('base64');
|
||||
}
|
||||
|
||||
export function arrayBufferToHex(arrayBuffer: ArrayBuffer) {
|
||||
return window.dcodeIO.ByteBuffer.wrap(arrayBuffer).toString('hex');
|
||||
}
|
||||
|
||||
export function base64ToArrayBuffer(base64string: string) {
|
||||
return window.dcodeIO.ByteBuffer.wrap(base64string, 'base64').toArrayBuffer();
|
||||
}
|
||||
|
||||
export function hexToArrayBuffer(hexString: string) {
|
||||
return window.dcodeIO.ByteBuffer.wrap(hexString, 'hex').toArrayBuffer();
|
||||
}
|
||||
|
||||
export function fromEncodedBinaryToArrayBuffer(key: string) {
|
||||
return window.dcodeIO.ByteBuffer.wrap(key, 'binary').toArrayBuffer();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue