@bsv/message-box-client 1.1.9 → 1.1.11
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.
- package/dist/cjs/package.json +5 -5
- package/dist/cjs/src/MessageBoxClient.js +707 -87
- package/dist/cjs/src/MessageBoxClient.js.map +1 -1
- package/dist/cjs/src/PeerPayClient.js +61 -28
- package/dist/cjs/src/PeerPayClient.js.map +1 -1
- package/dist/cjs/src/Utils/logger.js +22 -21
- package/dist/cjs/src/Utils/logger.js.map +1 -1
- package/dist/cjs/src/types/permissions.js +6 -0
- package/dist/cjs/src/types/permissions.js.map +1 -0
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/src/MessageBoxClient.js +593 -12
- package/dist/esm/src/MessageBoxClient.js.map +1 -1
- package/dist/esm/src/PeerPayClient.js +1 -1
- package/dist/esm/src/PeerPayClient.js.map +1 -1
- package/dist/esm/src/Utils/logger.js +17 -19
- package/dist/esm/src/Utils/logger.js.map +1 -1
- package/dist/esm/src/types/permissions.js +5 -0
- package/dist/esm/src/types/permissions.js.map +1 -0
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/types/src/MessageBoxClient.d.ts +218 -13
- package/dist/types/src/MessageBoxClient.d.ts.map +1 -1
- package/dist/types/src/PeerPayClient.d.ts.map +1 -1
- package/dist/types/src/Utils/logger.d.ts +5 -8
- package/dist/types/src/Utils/logger.d.ts.map +1 -1
- package/dist/types/src/types/permissions.d.ts +75 -0
- package/dist/types/src/types/permissions.d.ts.map +1 -0
- package/dist/types/src/types.d.ts +71 -2
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/dist/umd/bundle.js +1 -1
- package/package.json +5 -5
- package/src/MessageBoxClient.ts +732 -24
- package/src/PeerPayClient.ts +11 -11
- package/src/Utils/logger.ts +17 -19
- package/src/types/permissions.ts +81 -0
- package/src/types.ts +77 -2
|
@@ -21,16 +21,10 @@
|
|
|
21
21
|
* @author Project Babbage
|
|
22
22
|
* @license Open BSV License
|
|
23
23
|
*/
|
|
24
|
-
import { AuthFetch,
|
|
24
|
+
import { AuthFetch, PubKeyHex } from '@bsv/sdk';
|
|
25
25
|
import { AuthSocketClient } from '@bsv/authsocket-client';
|
|
26
|
-
import { AcknowledgeMessageParams, ListMessagesParams, MessageBoxClientOptions, PeerMessage, SendMessageParams, SendMessageResponse } from './types.js';
|
|
27
|
-
|
|
28
|
-
host: string;
|
|
29
|
-
txid: HexString;
|
|
30
|
-
outputIndex: number;
|
|
31
|
-
lockingScript: LockingScript;
|
|
32
|
-
beef: BEEF;
|
|
33
|
-
}
|
|
26
|
+
import { AcknowledgeMessageParams, AdvertisementToken, ListMessagesParams, MessageBoxClientOptions, PeerMessage, SendMessageParams, SendMessageResponse, DeviceRegistrationParams, DeviceRegistrationResponse, RegisteredDevice } from './types.js';
|
|
27
|
+
import { SetMessageBoxPermissionParams, GetMessageBoxPermissionParams, MessageBoxPermission, MessageBoxQuote, ListPermissionsParams, GetQuoteParams } from './types/permissions.js';
|
|
34
28
|
/**
|
|
35
29
|
* @class MessageBoxClient
|
|
36
30
|
* @description
|
|
@@ -72,7 +66,7 @@ export declare class MessageBoxClient {
|
|
|
72
66
|
* @constructor
|
|
73
67
|
* @param {Object} options - Initialization options for the MessageBoxClient.
|
|
74
68
|
* @param {string} [options.host] - The base URL of the MessageBox server. If omitted, defaults to mainnet/testnet hosts.
|
|
75
|
-
* @param {
|
|
69
|
+
* @param {WalletInterface} options.walletClient - Wallet instance used for authentication, signing, and encryption.
|
|
76
70
|
* @param {boolean} [options.enableLogging=false] - Whether to enable detailed debug logging to the console.
|
|
77
71
|
* @param {'local' | 'mainnet' | 'testnet'} [options.networkPreset='mainnet'] - Overlay network preset used for routing and advertisement lookup.
|
|
78
72
|
*
|
|
@@ -289,7 +283,7 @@ export declare class MessageBoxClient {
|
|
|
289
283
|
* body: { amount: 1000 }
|
|
290
284
|
* })
|
|
291
285
|
*/
|
|
292
|
-
sendLiveMessage({ recipient, messageBox, body, messageId, skipEncryption }: SendMessageParams): Promise<SendMessageResponse>;
|
|
286
|
+
sendLiveMessage({ recipient, messageBox, body, messageId, skipEncryption, checkPermissions }: SendMessageParams): Promise<SendMessageResponse>;
|
|
293
287
|
/**
|
|
294
288
|
* @method leaveRoom
|
|
295
289
|
* @async
|
|
@@ -402,9 +396,16 @@ export declare class MessageBoxClient {
|
|
|
402
396
|
*
|
|
403
397
|
* Each message is:
|
|
404
398
|
* - Parsed and, if encrypted, decrypted using AES-256-GCM via BRC-2-compliant ECDH key derivation and symmetric encryption.
|
|
399
|
+
* - Automatically processed for payments: if the message includes recipient fee payments, they are internalized using `walletClient.internalizeAction()`.
|
|
405
400
|
* - Returned as a normalized `PeerMessage` with readable string body content.
|
|
406
401
|
*
|
|
407
|
-
*
|
|
402
|
+
* Payment Processing:
|
|
403
|
+
* - Detects messages that include payment data (from paid message delivery).
|
|
404
|
+
* - Automatically internalizes recipient payment outputs, allowing you to receive payments without additional API calls.
|
|
405
|
+
* - Only recipient payments are stored with messages - delivery fees are already processed by the server.
|
|
406
|
+
* - Continues processing messages even if payment internalization fails.
|
|
407
|
+
*
|
|
408
|
+
* Decryption automatically derives a shared secret using the sender's identity key and the receiver's child private key.
|
|
408
409
|
* If the sender is the same as the recipient, the `counterparty` is set to `'self'`.
|
|
409
410
|
*
|
|
410
411
|
* @throws {Error} If no messageBox is specified, the request fails, or the server returns an error.
|
|
@@ -412,6 +413,7 @@ export declare class MessageBoxClient {
|
|
|
412
413
|
* @example
|
|
413
414
|
* const messages = await client.listMessages({ messageBox: 'inbox' })
|
|
414
415
|
* messages.forEach(msg => console.log(msg.sender, msg.body))
|
|
416
|
+
* // Payments included with messages are automatically received
|
|
415
417
|
*/
|
|
416
418
|
listMessages({ messageBox, host }: ListMessagesParams): Promise<PeerMessage[]>;
|
|
417
419
|
/**
|
|
@@ -436,6 +438,209 @@ export declare class MessageBoxClient {
|
|
|
436
438
|
* await client.acknowledgeMessage({ messageIds: ['msg123', 'msg456'] })
|
|
437
439
|
*/
|
|
438
440
|
acknowledgeMessage({ messageIds, host }: AcknowledgeMessageParams): Promise<string>;
|
|
441
|
+
/**
|
|
442
|
+
* @method setMessageBoxPermission
|
|
443
|
+
* @async
|
|
444
|
+
* @param {SetMessageBoxPermissionParams} params - Permission configuration
|
|
445
|
+
* @param {string} [overrideHost] - Optional host override
|
|
446
|
+
* @returns {Promise<void>} Permission status after setting
|
|
447
|
+
*
|
|
448
|
+
* @description
|
|
449
|
+
* Sets permission for receiving messages in a specific messageBox.
|
|
450
|
+
* Can set sender-specific permissions or box-wide defaults.
|
|
451
|
+
*
|
|
452
|
+
* @example
|
|
453
|
+
* // Set box-wide default: allow notifications for 10 sats
|
|
454
|
+
* await client.setMessageBoxPermission({ messageBox: 'notifications', recipientFee: 10 })
|
|
455
|
+
*
|
|
456
|
+
* // Block specific sender
|
|
457
|
+
* await client.setMessageBoxPermission({
|
|
458
|
+
* messageBox: 'notifications',
|
|
459
|
+
* sender: '03abc123...',
|
|
460
|
+
* recipientFee: -1
|
|
461
|
+
* })
|
|
462
|
+
*/
|
|
463
|
+
setMessageBoxPermission(params: SetMessageBoxPermissionParams, overrideHost?: string): Promise<void>;
|
|
464
|
+
/**
|
|
465
|
+
* @method getMessageBoxPermission
|
|
466
|
+
* @async
|
|
467
|
+
* @param {GetMessageBoxPermissionParams} params - Permission query parameters
|
|
468
|
+
* @param {string} [overrideHost] - Optional host override
|
|
469
|
+
* @returns {Promise<MessageBoxPermission | null>} Permission data (null if not set)
|
|
470
|
+
*
|
|
471
|
+
* @description
|
|
472
|
+
* Gets current permission data for a sender/messageBox combination.
|
|
473
|
+
* Returns null if no permission is set.
|
|
474
|
+
*
|
|
475
|
+
* @example
|
|
476
|
+
* const status = await client.getMessageBoxPermission({
|
|
477
|
+
* recipient: '03def456...',
|
|
478
|
+
* messageBox: 'notifications',
|
|
479
|
+
* sender: '03abc123...'
|
|
480
|
+
* })
|
|
481
|
+
*/
|
|
482
|
+
getMessageBoxPermission(params: GetMessageBoxPermissionParams, overrideHost?: string): Promise<MessageBoxPermission | null>;
|
|
483
|
+
/**
|
|
484
|
+
* @method getMessageBoxQuote
|
|
485
|
+
* @async
|
|
486
|
+
* @param {GetQuoteParams} params - Quote request parameters
|
|
487
|
+
* @returns {Promise<MessageBoxQuote>} Fee quote and permission status
|
|
488
|
+
*
|
|
489
|
+
* @description
|
|
490
|
+
* Gets a fee quote for sending a message, including delivery and recipient fees.
|
|
491
|
+
*
|
|
492
|
+
* @example
|
|
493
|
+
* const quote = await client.getMessageBoxQuote({
|
|
494
|
+
* recipient: '03def456...',
|
|
495
|
+
* messageBox: 'notifications'
|
|
496
|
+
* })
|
|
497
|
+
*/
|
|
498
|
+
getMessageBoxQuote(params: GetQuoteParams, overrideHost?: string): Promise<MessageBoxQuote>;
|
|
499
|
+
/**
|
|
500
|
+
* @method listMessageBoxPermissions
|
|
501
|
+
* @async
|
|
502
|
+
* @param {ListPermissionsParams} [params] - Optional filtering and pagination parameters
|
|
503
|
+
* @returns {Promise<MessageBoxPermission[]>} List of current permissions
|
|
504
|
+
*
|
|
505
|
+
* @description
|
|
506
|
+
* Lists permissions for the authenticated user's messageBoxes with optional pagination.
|
|
507
|
+
*
|
|
508
|
+
* @example
|
|
509
|
+
* // List all permissions
|
|
510
|
+
* const all = await client.listMessageBoxPermissions()
|
|
511
|
+
*
|
|
512
|
+
* // List only notification permissions with pagination
|
|
513
|
+
* const notifications = await client.listMessageBoxPermissions({
|
|
514
|
+
* messageBox: 'notifications',
|
|
515
|
+
* limit: 50,
|
|
516
|
+
* offset: 0
|
|
517
|
+
* })
|
|
518
|
+
*/
|
|
519
|
+
listMessageBoxPermissions(params?: ListPermissionsParams, overrideHost?: string): Promise<MessageBoxPermission[]>;
|
|
520
|
+
/**
|
|
521
|
+
* @method allowNotificationsFromPeer
|
|
522
|
+
* @async
|
|
523
|
+
* @param {PubKeyHex} identityKey - Sender's identity key to allow
|
|
524
|
+
* @param {number} [recipientFee=0] - Fee to charge (0 for always allow)
|
|
525
|
+
* @param {string} [overrideHost] - Optional host override
|
|
526
|
+
* @returns {Promise<void>} Permission status after allowing
|
|
527
|
+
*
|
|
528
|
+
* @description
|
|
529
|
+
* Convenience method to allow notifications from a specific peer.
|
|
530
|
+
*
|
|
531
|
+
* @example
|
|
532
|
+
* await client.allowNotificationsFromPeer('03abc123...') // Always allow
|
|
533
|
+
* await client.allowNotificationsFromPeer('03def456...', 5) // Allow for 5 sats
|
|
534
|
+
*/
|
|
535
|
+
allowNotificationsFromPeer(identityKey: PubKeyHex, recipientFee?: number, overrideHost?: string): Promise<void>;
|
|
536
|
+
/**
|
|
537
|
+
* @method denyNotificationsFromPeer
|
|
538
|
+
* @async
|
|
539
|
+
* @param {PubKeyHex} identityKey - Sender's identity key to block
|
|
540
|
+
* @returns {Promise<void>} Permission status after denying
|
|
541
|
+
*
|
|
542
|
+
* @description
|
|
543
|
+
* Convenience method to block notifications from a specific peer.
|
|
544
|
+
*
|
|
545
|
+
* @example
|
|
546
|
+
* await client.denyNotificationsFromPeer('03spam123...')
|
|
547
|
+
*/
|
|
548
|
+
denyNotificationsFromPeer(identityKey: PubKeyHex, overrideHost?: string): Promise<void>;
|
|
549
|
+
/**
|
|
550
|
+
* @method checkPeerNotificationStatus
|
|
551
|
+
* @async
|
|
552
|
+
* @param {PubKeyHex} identityKey - Sender's identity key to check
|
|
553
|
+
* @returns {Promise<MessageBoxPermission>} Current permission status
|
|
554
|
+
*
|
|
555
|
+
* @description
|
|
556
|
+
* Convenience method to check notification permission for a specific peer.
|
|
557
|
+
*
|
|
558
|
+
* @example
|
|
559
|
+
* const status = await client.checkPeerNotificationStatus('03abc123...')
|
|
560
|
+
* console.log(status.allowed) // true/false
|
|
561
|
+
*/
|
|
562
|
+
checkPeerNotificationStatus(identityKey: PubKeyHex, overrideHost?: string): Promise<MessageBoxPermission | null>;
|
|
563
|
+
/**
|
|
564
|
+
* @method listPeerNotifications
|
|
565
|
+
* @async
|
|
566
|
+
* @returns {Promise<MessageBoxPermission[]>} List of notification permissions
|
|
567
|
+
*
|
|
568
|
+
* @description
|
|
569
|
+
* Convenience method to list all notification permissions.
|
|
570
|
+
*
|
|
571
|
+
* @example
|
|
572
|
+
* const notifications = await client.listPeerNotifications()
|
|
573
|
+
*/
|
|
574
|
+
listPeerNotifications(overrideHost?: string): Promise<MessageBoxPermission[]>;
|
|
575
|
+
/**
|
|
576
|
+
* @method sendNotification
|
|
577
|
+
* @async
|
|
578
|
+
* @param {PubKeyHex} recipient - Recipient's identity key
|
|
579
|
+
* @param {string | object} body - Notification content
|
|
580
|
+
* @param {string} [overrideHost] - Optional host override
|
|
581
|
+
* @returns {Promise<SendMessageResponse>} Send result
|
|
582
|
+
*
|
|
583
|
+
* @description
|
|
584
|
+
* Convenience method to send a notification with automatic quote fetching and payment handling.
|
|
585
|
+
* Automatically determines the required payment amount and creates the payment if needed.
|
|
586
|
+
*
|
|
587
|
+
* @example
|
|
588
|
+
* // Send notification (auto-determines payment needed)
|
|
589
|
+
* await client.sendNotification('03def456...', 'Hello!')
|
|
590
|
+
*
|
|
591
|
+
* // Send with maximum payment limit for safety
|
|
592
|
+
* await client.sendNotification('03def456...', { title: 'Alert', body: 'Important update' }, 50)
|
|
593
|
+
*/
|
|
594
|
+
sendNotification(recipient: PubKeyHex, body: string | object, overrideHost?: string): Promise<SendMessageResponse>;
|
|
595
|
+
/**
|
|
596
|
+
* Register a device for FCM push notifications.
|
|
597
|
+
*
|
|
598
|
+
* @async
|
|
599
|
+
* @param {DeviceRegistrationParams} params - Device registration parameters
|
|
600
|
+
* @param {string} [overrideHost] - Optional host override
|
|
601
|
+
* @returns {Promise<DeviceRegistrationResponse>} Registration response
|
|
602
|
+
*
|
|
603
|
+
* @description
|
|
604
|
+
* Registers a device with the message box server to receive FCM push notifications.
|
|
605
|
+
* The FCM token is obtained from Firebase SDK on the client side.
|
|
606
|
+
*
|
|
607
|
+
* @example
|
|
608
|
+
* const result = await client.registerDevice({
|
|
609
|
+
* fcmToken: 'eBo8F...',
|
|
610
|
+
* platform: 'ios',
|
|
611
|
+
* deviceId: 'iPhone15Pro'
|
|
612
|
+
* })
|
|
613
|
+
*/
|
|
614
|
+
registerDevice(params: DeviceRegistrationParams, overrideHost?: string): Promise<DeviceRegistrationResponse>;
|
|
615
|
+
/**
|
|
616
|
+
* List all registered devices for push notifications.
|
|
617
|
+
*
|
|
618
|
+
* @async
|
|
619
|
+
* @param {string} [overrideHost] - Optional host override
|
|
620
|
+
* @returns {Promise<RegisteredDevice[]>} Array of registered devices
|
|
621
|
+
*
|
|
622
|
+
* @description
|
|
623
|
+
* Retrieves all devices registered by the authenticated user for FCM push notifications.
|
|
624
|
+
* Only shows devices belonging to the current user (authenticated via AuthFetch).
|
|
625
|
+
*
|
|
626
|
+
* @example
|
|
627
|
+
* const devices = await client.listRegisteredDevices()
|
|
628
|
+
* console.log(`Found ${devices.length} registered devices`)
|
|
629
|
+
* devices.forEach(device => {
|
|
630
|
+
* console.log(`Device: ${device.platform} - ${device.fcmToken}`)
|
|
631
|
+
* })
|
|
632
|
+
*/
|
|
633
|
+
listRegisteredDevices(overrideHost?: string): Promise<RegisteredDevice[]>;
|
|
634
|
+
private static getStatusFromFee;
|
|
635
|
+
/**
|
|
636
|
+
* Creates payment transaction for message delivery fees
|
|
637
|
+
* TODO: Consider consolidating payment generating logic with a util PeerPayClient can use as well.
|
|
638
|
+
* @private
|
|
639
|
+
* @param {string} recipient - Recipient identity key
|
|
640
|
+
* @param {MessageBoxQuote} quote - Fee quote with delivery and recipient fees
|
|
641
|
+
* @param {string} description - Description for the payment transaction
|
|
642
|
+
* @returns {Promise<Payment>} Payment transaction data
|
|
643
|
+
*/
|
|
644
|
+
private createMessagePayment;
|
|
439
645
|
}
|
|
440
|
-
export {};
|
|
441
646
|
//# sourceMappingURL=MessageBoxClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageBoxClient.d.ts","sourceRoot":"","sources":["../../../src/MessageBoxClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAEL,SAAS,EAMT,
|
|
1
|
+
{"version":3,"file":"MessageBoxClient.d.ts","sourceRoot":"","sources":["../../../src/MessageBoxClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAEL,SAAS,EAMT,SAAS,EASV,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAEzD,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAoB,kBAAkB,EAAE,uBAAuB,EAAW,WAAW,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,gBAAgB,EAAuB,MAAM,YAAY,CAAA;AACnS,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,EAC7B,oBAAoB,EACpB,eAAe,EACf,qBAAqB,EACrB,cAAc,EACf,MAAM,wBAAwB,CAAA;AAK/B;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,IAAI,CAAQ;IACpB,SAAgB,SAAS,EAAE,SAAS,CAAA;IACpC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAiB;IAC9C,OAAO,CAAC,MAAM,CAAC,CAAqC;IACpD,OAAO,CAAC,aAAa,CAAC,CAAQ;IAC9B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAyB;IACrD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAgB;IAC/C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAiC;IAC/D,OAAO,CAAC,WAAW,CAAQ;IAE3B;;;;;;;;;;;;;;;;;;;;;;;OAuBG;gBACS,OAAO,GAAE,uBAA4B;IA4BjD;;;;;;;;;;;;;;;;;;;;;OAqBG;IACG,IAAI,CA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GAAG,OAAO,CAAC,GAAG,CAAC;IA8B3D;;;;;;;;;OASG;IACG,aAAa,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAoD5D;;;;;;;OAOG;IACG,oBAAoB,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;CAazD"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
static warn(...args: unknown[]): void;
|
|
7
|
-
static error(...args: unknown[]): void;
|
|
8
|
-
}
|
|
1
|
+
export declare function enable(): void;
|
|
2
|
+
export declare function disable(): void;
|
|
3
|
+
export declare function log(...args: unknown[]): void;
|
|
4
|
+
export declare function warn(...args: unknown[]): void;
|
|
5
|
+
export declare function error(...args: unknown[]): void;
|
|
9
6
|
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../src/Utils/logger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../src/Utils/logger.ts"],"names":[],"mappings":"AAEA,wBAAgB,MAAM,IAAK,IAAI,CAE9B;AAED,wBAAgB,OAAO,IAAK,IAAI,CAE/B;AAED,wBAAgB,GAAG,CAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAI7C;AAED,wBAAgB,IAAI,CAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAI9C;AAED,wBAAgB,KAAK,CAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAE/C"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Permission and fee management types for MessageBox system
|
|
3
|
+
*/
|
|
4
|
+
import { PubKeyHex } from '@bsv/sdk';
|
|
5
|
+
/**
|
|
6
|
+
* Parameters for setting message box permissions
|
|
7
|
+
*/
|
|
8
|
+
export interface SetMessageBoxPermissionParams {
|
|
9
|
+
/** The messageBox type (e.g., 'notifications', 'inbox') */
|
|
10
|
+
messageBox: string;
|
|
11
|
+
/** Optional sender - if omitted, sets box-wide default */
|
|
12
|
+
sender?: string;
|
|
13
|
+
/** Recipient fee: -1=block all, 0=always allow, >0=satoshi amount required */
|
|
14
|
+
recipientFee: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Parameters for getting message box permissions
|
|
18
|
+
*/
|
|
19
|
+
export interface GetMessageBoxPermissionParams {
|
|
20
|
+
/** The recipient's identity key */
|
|
21
|
+
recipient: string;
|
|
22
|
+
/** The messageBox type */
|
|
23
|
+
messageBox: string;
|
|
24
|
+
/** Optional sender - if omitted, gets box-wide default */
|
|
25
|
+
sender?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Permission response from server
|
|
29
|
+
*/
|
|
30
|
+
export interface MessageBoxPermission {
|
|
31
|
+
/** Sender identity key (null for box-wide defaults) */
|
|
32
|
+
sender: string | null;
|
|
33
|
+
/** MessageBox type */
|
|
34
|
+
messageBox: string;
|
|
35
|
+
/** Recipient fee setting */
|
|
36
|
+
recipientFee: number;
|
|
37
|
+
/** Permission status derived from recipientFee */
|
|
38
|
+
status: 'always_allow' | 'blocked' | 'payment_required';
|
|
39
|
+
/** Creation timestamp */
|
|
40
|
+
createdAt: string;
|
|
41
|
+
/** Last update timestamp */
|
|
42
|
+
updatedAt: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Fee quote response
|
|
46
|
+
*/
|
|
47
|
+
export interface MessageBoxQuote {
|
|
48
|
+
/** Server delivery fee */
|
|
49
|
+
deliveryFee: number;
|
|
50
|
+
/** Recipient fee */
|
|
51
|
+
recipientFee: number;
|
|
52
|
+
/** Delivery agent identity key */
|
|
53
|
+
deliveryAgentIdentityKey: PubKeyHex;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Parameters for listing permissions
|
|
57
|
+
*/
|
|
58
|
+
export interface ListPermissionsParams {
|
|
59
|
+
/** Optional messageBox filter */
|
|
60
|
+
messageBox?: string;
|
|
61
|
+
/** Optional pagination limit */
|
|
62
|
+
limit?: number;
|
|
63
|
+
/** Optional pagination offset */
|
|
64
|
+
offset?: number;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Parameters for getting fee quote
|
|
68
|
+
*/
|
|
69
|
+
export interface GetQuoteParams {
|
|
70
|
+
/** Recipient identity key */
|
|
71
|
+
recipient: string;
|
|
72
|
+
/** MessageBox type */
|
|
73
|
+
messageBox: string;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=permissions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../../../src/types/permissions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEpC;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,2DAA2D;IAC3D,UAAU,EAAE,MAAM,CAAA;IAClB,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,8EAA8E;IAC9E,YAAY,EAAE,MAAM,CAAA;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,mCAAmC;IACnC,SAAS,EAAE,MAAM,CAAA;IACjB,0BAA0B;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,uDAAuD;IACvD,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,sBAAsB;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,4BAA4B;IAC5B,YAAY,EAAE,MAAM,CAAA;IACpB,kDAAkD;IAClD,MAAM,EAAE,cAAc,GAAG,SAAS,GAAG,kBAAkB,CAAA;IACvD,yBAAyB;IACzB,SAAS,EAAE,MAAM,CAAA;IACjB,4BAA4B;IAC5B,SAAS,EAAE,MAAM,CAAA;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,0BAA0B;IAC1B,WAAW,EAAE,MAAM,CAAA;IACnB,oBAAoB;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,kCAAkC;IAClC,wBAAwB,EAAE,SAAS,CAAA;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,iCAAiC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,6BAA6B;IAC7B,SAAS,EAAE,MAAM,CAAA;IACjB,sBAAsB;IACtB,UAAU,EAAE,MAAM,CAAA;CACnB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Base64String,
|
|
1
|
+
import { AtomicBEEF, Base64String, BasketStringUnder300Bytes, BEEF, BooleanDefaultTrue, DescriptionString5to50Bytes, HexString, LabelStringUnder300Bytes, LockingScript, OutputTagStringUnder300Bytes, PositiveIntegerOrZero, PubKeyHex, WalletInterface } from '@bsv/sdk';
|
|
2
2
|
/**
|
|
3
3
|
* Configuration options for initializing a MessageBoxClient.
|
|
4
4
|
*/
|
|
@@ -7,7 +7,7 @@ export interface MessageBoxClientOptions {
|
|
|
7
7
|
* Wallet instance used for auth, identity, and encryption.
|
|
8
8
|
* If not provided, a new WalletClient will be created.
|
|
9
9
|
*/
|
|
10
|
-
walletClient?:
|
|
10
|
+
walletClient?: WalletInterface;
|
|
11
11
|
/**
|
|
12
12
|
* Base URL of the MessageBox server.
|
|
13
13
|
* @default 'https://messagebox.babbage.systems'
|
|
@@ -56,6 +56,8 @@ export interface SendMessageParams {
|
|
|
56
56
|
body: string | object;
|
|
57
57
|
messageId?: string;
|
|
58
58
|
skipEncryption?: boolean;
|
|
59
|
+
/** Optional: Enable permission and fee checking (default: false for backwards compatibility) */
|
|
60
|
+
checkPermissions?: boolean;
|
|
59
61
|
}
|
|
60
62
|
/**
|
|
61
63
|
* Server response structure for successful message delivery.
|
|
@@ -96,4 +98,71 @@ export interface ListMessagesParams {
|
|
|
96
98
|
export interface EncryptedMessage {
|
|
97
99
|
encryptedMessage: Base64String;
|
|
98
100
|
}
|
|
101
|
+
export interface AdvertisementToken {
|
|
102
|
+
host: string;
|
|
103
|
+
txid: HexString;
|
|
104
|
+
outputIndex: number;
|
|
105
|
+
lockingScript: LockingScript;
|
|
106
|
+
beef: BEEF;
|
|
107
|
+
}
|
|
108
|
+
export interface Payment {
|
|
109
|
+
tx: AtomicBEEF;
|
|
110
|
+
outputs: Array<{
|
|
111
|
+
outputIndex: PositiveIntegerOrZero;
|
|
112
|
+
protocol: 'wallet payment' | 'basket insertion';
|
|
113
|
+
paymentRemittance?: {
|
|
114
|
+
derivationPrefix: Base64String;
|
|
115
|
+
derivationSuffix: Base64String;
|
|
116
|
+
senderIdentityKey: PubKeyHex;
|
|
117
|
+
};
|
|
118
|
+
insertionRemittance?: {
|
|
119
|
+
basket: BasketStringUnder300Bytes;
|
|
120
|
+
customInstructions?: string;
|
|
121
|
+
tags?: OutputTagStringUnder300Bytes[];
|
|
122
|
+
};
|
|
123
|
+
}>;
|
|
124
|
+
description: DescriptionString5to50Bytes;
|
|
125
|
+
labels?: LabelStringUnder300Bytes[];
|
|
126
|
+
seekPermission?: BooleanDefaultTrue;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Device registration parameters for FCM notifications
|
|
130
|
+
*/
|
|
131
|
+
export interface DeviceRegistrationParams {
|
|
132
|
+
/** FCM token from Firebase SDK */
|
|
133
|
+
fcmToken: string;
|
|
134
|
+
/** Optional device identifier */
|
|
135
|
+
deviceId?: string;
|
|
136
|
+
/** Optional platform type */
|
|
137
|
+
platform?: 'ios' | 'android' | 'web';
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Device registration response
|
|
141
|
+
*/
|
|
142
|
+
export interface DeviceRegistrationResponse {
|
|
143
|
+
status: string;
|
|
144
|
+
message: string;
|
|
145
|
+
deviceId: number;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Registered device information
|
|
149
|
+
*/
|
|
150
|
+
export interface RegisteredDevice {
|
|
151
|
+
id: number;
|
|
152
|
+
deviceId: string | null;
|
|
153
|
+
platform: string | null;
|
|
154
|
+
fcmToken: string;
|
|
155
|
+
active: boolean;
|
|
156
|
+
createdAt: string;
|
|
157
|
+
updatedAt: string;
|
|
158
|
+
lastUsed: string;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Response from listing registered devices
|
|
162
|
+
*/
|
|
163
|
+
export interface ListDevicesResponse {
|
|
164
|
+
status: string;
|
|
165
|
+
devices: RegisteredDevice[];
|
|
166
|
+
description?: string;
|
|
167
|
+
}
|
|
99
168
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,yBAAyB,EAAE,IAAI,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,SAAS,EAAE,wBAAwB,EAAE,aAAa,EAAE,4BAA4B,EAAE,qBAAqB,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE1Q;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,YAAY,CAAC,EAAE,eAAe,CAAA;IAE9B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;OAGG;IACH,aAA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