@river-build/mls-rs-wasm
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -5,26 +5,12 @@ /* tslint:disable */ | ||
export class ApplicationMessage { | ||
private constructor(); | ||
free(): void; | ||
/** | ||
* @returns {number} | ||
*/ | ||
senderIndex(): number; | ||
/** | ||
* @returns {Uint8Array} | ||
*/ | ||
authenticatedData(): Uint8Array; | ||
/** | ||
* @returns {Uint8Array} | ||
*/ | ||
data(): Uint8Array; | ||
} | ||
export class CachedProposal { | ||
private constructor(); | ||
free(): void; | ||
/** | ||
* @returns {Uint8Array} | ||
*/ | ||
toBytes(): Uint8Array; | ||
/** | ||
* @param {Uint8Array} bytes | ||
* @returns {CachedProposal} | ||
*/ | ||
static fromBytes(bytes: Uint8Array): CachedProposal; | ||
@@ -35,55 +21,14 @@ } | ||
constructor(); | ||
/** | ||
* @param {HpkePublicKey} public_key | ||
* @param {Uint8Array} plaintext | ||
* @returns {Promise<HpkeCiphertext>} | ||
*/ | ||
seal(public_key: HpkePublicKey, plaintext: Uint8Array): Promise<HpkeCiphertext>; | ||
/** | ||
* @param {HpkeCiphertext} ciphertext | ||
* @param {HpkeSecretKey} secret_key | ||
* @param {HpkePublicKey} public_key | ||
* @returns {Promise<Uint8Array>} | ||
*/ | ||
open(ciphertext: HpkeCiphertext, secret_key: HpkeSecretKey, public_key: HpkePublicKey): Promise<Uint8Array>; | ||
/** | ||
* @param {Secret} secret | ||
* @returns {Promise<DeriveOutput>} | ||
*/ | ||
kemDerive(secret: Secret): Promise<DeriveOutput>; | ||
} | ||
export class Client { | ||
private constructor(); | ||
free(): void; | ||
/** | ||
* @param {Uint8Array} name | ||
* @param {ClientOptions | undefined} [options] | ||
* @returns {Promise<Client>} | ||
*/ | ||
static create(name: Uint8Array, options?: ClientOptions): Promise<Client>; | ||
/** | ||
* @returns {Promise<Group>} | ||
*/ | ||
createGroup(): Promise<Group>; | ||
/** | ||
* @returns {Promise<MlsMessage>} | ||
*/ | ||
generateKeyPackageMessage(): Promise<MlsMessage>; | ||
/** | ||
* @param {MlsMessage} welcome_message | ||
* @param {ExportedTree | undefined} [tree_data] | ||
* @returns {Promise<JoinOutput>} | ||
*/ | ||
joinGroup(welcome_message: MlsMessage, tree_data?: ExportedTree): Promise<JoinOutput>; | ||
/** | ||
* @param {MlsMessage} group_info_message | ||
* @param {ExportedTree | undefined} [exported_tree] | ||
* @returns {Promise<CommitExternalOutput>} | ||
*/ | ||
commitExternal(group_info_message: MlsMessage, exported_tree?: ExportedTree): Promise<CommitExternalOutput>; | ||
/** | ||
* @param {MlsMessage} group_info | ||
* @param {ExportedTree | undefined} [tree_data] | ||
* @param {Uint8Array | undefined} [authenticated_data] | ||
* @returns {Promise<MlsMessage>} | ||
*/ | ||
externalAddProposal(group_info: MlsMessage, tree_data?: ExportedTree, authenticated_data?: Uint8Array): Promise<MlsMessage>; | ||
@@ -97,33 +42,28 @@ } | ||
export class CommitExternalOutput { | ||
private constructor(); | ||
free(): void; | ||
group: Group; | ||
commit: MlsMessage; | ||
group: Group; | ||
} | ||
export class CommitMessage { | ||
private constructor(); | ||
free(): void; | ||
/** | ||
* @returns {Uint8Array} | ||
*/ | ||
authenticatedData(): Uint8Array; | ||
} | ||
export class CommitOutput { | ||
private constructor(); | ||
free(): void; | ||
readonly welcomeMessages: (MlsMessage)[]; | ||
readonly commitMessage: MlsMessage; | ||
readonly welcomeMessages: (MlsMessage)[]; | ||
} | ||
export class DeriveOutput { | ||
private constructor(); | ||
free(): void; | ||
secretKey: HpkeSecretKey; | ||
publicKey: HpkePublicKey; | ||
secretKey: HpkeSecretKey; | ||
} | ||
export class ExportedTree { | ||
private constructor(); | ||
free(): void; | ||
/** | ||
* @returns {Uint8Array} | ||
*/ | ||
toBytes(): Uint8Array; | ||
/** | ||
* @param {Uint8Array} bytes | ||
* @returns {ExportedTree} | ||
*/ | ||
static fromBytes(bytes: Uint8Array): ExportedTree; | ||
@@ -134,118 +74,39 @@ } | ||
constructor(); | ||
/** | ||
* @param {Uint8Array} group_info | ||
* @returns {Promise<ExternalGroup>} | ||
*/ | ||
observeGroup(group_info: Uint8Array): Promise<ExternalGroup>; | ||
/** | ||
* @param {ExternalSnapshot} snapshot | ||
* @returns {Promise<ExternalGroup>} | ||
*/ | ||
loadGroup(snapshot: ExternalSnapshot): Promise<ExternalGroup>; | ||
} | ||
export class ExternalGroup { | ||
private constructor(); | ||
free(): void; | ||
/** | ||
* @param {MlsMessage} message | ||
* @returns {Promise<ExternalReceivedMessage>} | ||
*/ | ||
processIncomingMessage(message: MlsMessage): Promise<ExternalReceivedMessage>; | ||
/** | ||
* @returns {ExternalSnapshot} | ||
*/ | ||
snapshot(): ExternalSnapshot; | ||
/** | ||
* @param {CachedProposal} proposal | ||
*/ | ||
insertProposal(proposal: CachedProposal): void; | ||
/** | ||
* @returns {Uint8Array} | ||
*/ | ||
exportTree(): Uint8Array; | ||
} | ||
export class ExternalReceivedMessage { | ||
private constructor(); | ||
free(): void; | ||
/** | ||
* @returns {ProposalMessage | undefined} | ||
*/ | ||
asProposalMessage(): ProposalMessage | undefined; | ||
/** | ||
* @returns {CommitMessage | undefined} | ||
*/ | ||
asCommitMessage(): CommitMessage | undefined; | ||
} | ||
export class ExternalSnapshot { | ||
private constructor(); | ||
free(): void; | ||
/** | ||
* @returns {Uint8Array} | ||
*/ | ||
toBytes(): Uint8Array; | ||
/** | ||
* @param {Uint8Array} bytes | ||
* @returns {ExternalSnapshot} | ||
*/ | ||
static fromBytes(bytes: Uint8Array): ExternalSnapshot; | ||
} | ||
export class Group { | ||
private constructor(); | ||
free(): void; | ||
/** | ||
* @param {MlsMessage} key_package | ||
* @returns {Promise<CommitOutput>} | ||
*/ | ||
addMember(key_package: MlsMessage): Promise<CommitOutput>; | ||
/** | ||
* @returns {Promise<CommitMessage>} | ||
*/ | ||
applyPendingCommit(): Promise<CommitMessage>; | ||
/** | ||
* @param {Uint8Array} message | ||
* @param {Uint8Array | undefined} [authenticated_data] | ||
* @returns {Promise<MlsMessage>} | ||
*/ | ||
encryptApplicationMessage(message: Uint8Array, authenticated_data?: Uint8Array): Promise<MlsMessage>; | ||
/** | ||
* @param {MlsMessage} message | ||
* @returns {Promise<ReceivedMessage>} | ||
*/ | ||
processIncomingMessage(message: MlsMessage): Promise<ReceivedMessage>; | ||
/** | ||
* @returns {Promise<void>} | ||
*/ | ||
writeToStorage(): Promise<void>; | ||
/** | ||
* @param {boolean} with_tree_in_extensions | ||
* @returns {Promise<MlsMessage>} | ||
*/ | ||
groupInfoMessage(with_tree_in_extensions: boolean): Promise<MlsMessage>; | ||
/** | ||
* @param {boolean} with_tree_in_extensions | ||
* @returns {Promise<MlsMessage>} | ||
*/ | ||
groupInfoMessageAllowingExtCommit(with_tree_in_extensions: boolean): Promise<MlsMessage>; | ||
/** | ||
* @param {Uint8Array | undefined} [authenticated_data] | ||
* @returns {Promise<CommitOutput>} | ||
*/ | ||
commit(authenticated_data?: Uint8Array): Promise<CommitOutput>; | ||
/** | ||
* @param {MlsMessage} key_package | ||
* @param {Uint8Array | undefined} [authenticated_data] | ||
* @returns {Promise<MlsMessage>} | ||
*/ | ||
proposeAdd(key_package: MlsMessage, authenticated_data?: Uint8Array): Promise<MlsMessage>; | ||
/** | ||
* @returns {ExportedTree} | ||
*/ | ||
exportTree(): ExportedTree; | ||
/** | ||
* @param {Uint8Array} label | ||
* @param {Uint8Array} context | ||
* @param {number} size | ||
* @returns {Promise<Uint8Array>} | ||
*/ | ||
exportSecret(label: Uint8Array, context: Uint8Array, size: number): Promise<Uint8Array>; | ||
/** | ||
* @param {Uint8Array | undefined} [context] | ||
* @returns {Promise<Secret>} | ||
*/ | ||
currentEpochSecret(context?: Uint8Array): Promise<Secret>; | ||
@@ -255,38 +116,21 @@ readonly currentEpoch: bigint; | ||
export class HpkeCiphertext { | ||
private constructor(); | ||
free(): void; | ||
/** | ||
* @returns {Uint8Array} | ||
*/ | ||
toBytes(): Uint8Array; | ||
/** | ||
* @param {Uint8Array} bytes | ||
* @returns {HpkeCiphertext} | ||
*/ | ||
static fromBytes(bytes: Uint8Array): HpkeCiphertext; | ||
} | ||
export class HpkePublicKey { | ||
private constructor(); | ||
free(): void; | ||
/** | ||
* @returns {Uint8Array} | ||
*/ | ||
toBytes(): Uint8Array; | ||
/** | ||
* @param {Uint8Array} bytes | ||
* @returns {HpkePublicKey} | ||
*/ | ||
static fromBytes(bytes: Uint8Array): HpkePublicKey; | ||
} | ||
export class HpkeSecretKey { | ||
private constructor(); | ||
free(): void; | ||
/** | ||
* @returns {Uint8Array} | ||
*/ | ||
toBytes(): Uint8Array; | ||
/** | ||
* @param {Uint8Array} bytes | ||
* @returns {HpkeSecretKey} | ||
*/ | ||
static fromBytes(bytes: Uint8Array): HpkeSecretKey; | ||
} | ||
export class JoinOutput { | ||
private constructor(); | ||
free(): void; | ||
@@ -297,45 +141,27 @@ group: Group; | ||
export class MlsMessage { | ||
private constructor(); | ||
free(): void; | ||
/** | ||
* @returns {Uint8Array} | ||
*/ | ||
toBytes(): Uint8Array; | ||
/** | ||
* @param {Uint8Array} bytes | ||
* @returns {MlsMessage} | ||
*/ | ||
static fromBytes(bytes: Uint8Array): MlsMessage; | ||
} | ||
export class NewMemberInfo { | ||
private constructor(); | ||
free(): void; | ||
} | ||
export class ProposalMessage { | ||
private constructor(); | ||
free(): void; | ||
/** | ||
* @returns {CachedProposal} | ||
*/ | ||
cached_proposal(): CachedProposal; | ||
} | ||
export class ReceivedMessage { | ||
private constructor(); | ||
free(): void; | ||
/** | ||
* @returns {ApplicationMessage | undefined} | ||
*/ | ||
asApplicationMessage(): ApplicationMessage | undefined; | ||
/** | ||
* @returns {CommitMessage | undefined} | ||
*/ | ||
asCommitMessage(): CommitMessage | undefined; | ||
} | ||
export class Secret { | ||
private constructor(); | ||
free(): void; | ||
/** | ||
* @returns {Uint8Array} | ||
*/ | ||
toBytes(): Uint8Array; | ||
/** | ||
* @param {Uint8Array} bytes | ||
* @returns {Secret} | ||
*/ | ||
static fromBytes(bytes: Uint8Array): Secret; | ||
} |
{ | ||
"name": "@river-build/mls-rs-wasm", | ||
"type": "module", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"files": [ | ||
@@ -9,4 +9,3 @@ "mls_rs_wasm_bg.wasm", | ||
"mls_rs_wasm_bg.js", | ||
"mls_rs_wasm.d.ts", | ||
"snippets/*" | ||
"mls_rs_wasm.d.ts" | ||
], | ||
@@ -19,2 +18,2 @@ "main": "mls_rs_wasm.js", | ||
] | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
7697274
6
2127