-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add basic message and notifications module (#10)
* feat: add credentials and proofs modules with dedicated functions Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * chore: upgrade aries-framework packages to 0.4.2 Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * refactor: remove isWalletImportable method Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * fix: provider import in proof module Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * fix: add agent param in all the methods Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * feat: add basic message and notifications module Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> --------- Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>
- Loading branch information
Showing
6 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import type { AdeyaAgent } from '../agent' | ||
|
||
/** | ||
* Sends a basic message to the connection with the given connection id. | ||
* | ||
* @param agent The agent instance . | ||
* @param connectionId The connection id. | ||
* @param message The message to send. | ||
*/ | ||
export const sendBasicMessage = async (agent: AdeyaAgent, connectionId: string, message: string) => { | ||
return agent.basicMessages.sendMessage(connectionId, message) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './basicMessages' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './pushNotifications' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import type { AdeyaAgent } from '../agent' | ||
import type { FcmDeviceInfo } from '@aries-framework/push-notifications' | ||
|
||
/** | ||
* Sets the device information for push notifications using the provided connection ID and device information. | ||
* | ||
* @param agent - The Adeya agent instance. | ||
* @param connectionId - The connection ID for the device. | ||
* @param deviceInfo - The device information for push notifications. | ||
* @returns void. | ||
*/ | ||
export const setPushNotificationDeviceInfo = async ( | ||
agent: AdeyaAgent, | ||
connectionId: string, | ||
deviceInfo: FcmDeviceInfo | ||
) => { | ||
return agent.modules.pushNotificationsFcm.setDeviceInfo(connectionId, deviceInfo) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters