@majikah/majik-message 0.1.17 → 0.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -107,7 +107,7 @@ export declare class MajikMessage {
107
107
  * Single recipient → solo envelope. Two or more → group envelope.
108
108
  * Returns a scanner-ready string: ~*$MJKMSG:<base64>
109
109
  */
110
- composeMessage(recipientIds: string[], plaintext: string, cache?: boolean): Promise<string>;
110
+ composeMessage(recipientPublicKeys: MajikMessagePublicKey[], plaintext: string, cache?: boolean): Promise<string>;
111
111
  /**
112
112
  * Decrypt a MessageEnvelope (from scanner or cache).
113
113
  * Tries all own accounts for group envelopes.
@@ -414,10 +414,10 @@ export class MajikMessage {
414
414
  * Single recipient → solo envelope. Two or more → group envelope.
415
415
  * Returns a scanner-ready string: ~*$MJKMSG:<base64>
416
416
  */
417
- async composeMessage(recipientIds, plaintext, cache = true) {
418
- if (!recipientIds.length)
417
+ async composeMessage(recipientPublicKeys, plaintext, cache = true) {
418
+ if (!recipientPublicKeys.length)
419
419
  throw new Error("At least one recipient is required");
420
- const recipients = await this._resolveRecipients(recipientIds);
420
+ const recipients = await this._resolveRecipientsByPublicKey(recipientPublicKeys);
421
421
  const sender = this.getActiveAccount();
422
422
  const envelope = await MajikEnvelope.encrypt({
423
423
  plaintext,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@majikah/majik-message",
3
3
  "type": "module",
4
4
  "description": "Encrypt and decrypt messages on any website or platform. Secure chats with keypairs and seed-based accounts. Open source.",
5
- "version": "0.1.17",
5
+ "version": "0.1.18",
6
6
  "license": "Apache-2.0",
7
7
  "author": "Zelijah",
8
8
  "main": "./dist/index.js",