From 268721bfe770d224660448c5e0814342aa0b79e5 Mon Sep 17 00:00:00 2001 From: IsaccoSordo Date: Thu, 8 Feb 2024 14:29:45 +0100 Subject: [PATCH] fix: add text --- src/docs/guides/active-account.mdx | 2 +- src/docs/guides/broadcast-request.mdx | 2 ++ src/docs/guides/fa1.2-transfer.mdx | 2 ++ src/docs/guides/fa2-transfer.mdx | 2 ++ src/docs/guides/network.mdx | 3 ++ src/docs/guides/sign-payload.mdx | 3 ++ src/docs/guides/subscribe-to-event.mdx | 40 ++++++++++++++++++++++++++ 7 files changed, 53 insertions(+), 1 deletion(-) diff --git a/src/docs/guides/active-account.mdx b/src/docs/guides/active-account.mdx index cfc0b6b0..03104046 100644 --- a/src/docs/guides/active-account.mdx +++ b/src/docs/guides/active-account.mdx @@ -5,7 +5,7 @@ title: Active Account import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; -The 'Active Account' feature in the Beacon SDK is crucial for your dApp to interact effectively with the user's wallet. +The `Active Account` feature in the Beacon SDK is crucial for your dApp to interact effectively with the user's wallet. Here's how it works: - `getActiveAccount`: This function returns the current active account. Use it to check the user's active account when they first start using your dApp. diff --git a/src/docs/guides/broadcast-request.mdx b/src/docs/guides/broadcast-request.mdx index 3a724a9b..f75a5c0f 100644 --- a/src/docs/guides/broadcast-request.mdx +++ b/src/docs/guides/broadcast-request.mdx @@ -5,6 +5,8 @@ title: Broadcast Request import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; +Broadcast Request is a feature in Beacon SDK that enables applications to send transaction requests to the blockchain. This is primarily used for broadcasting signed transactions to the network. + +These events provide developers with hooks to respond to changes, errors, user interactions, and other significant occurrences in the application flow.
+Understanding and handling these events correctly is crucial for building robust and user-friendly decentralized applications.
+Below is a list of events that the Beacon SDK can emit, each representing a specific scenario or response in the application's interaction with the blockchain and its users.
+ +### Events + +This list serves as a guide to comprehensively manage application behavior and user experience in various situations: + +1. `PERMISSION_REQUEST_SENT`: Fired when a permission request is sent to the user. +2. `PERMISSION_REQUEST_SUCCESS`: Triggered when a permission request is successfully granted by the user. +3. `PERMISSION_REQUEST_ERROR`: Occurs when there is an error in the permission request process. +4. `PROOF_OF_EVENT_CHALLENGE_REQUEST_SENT`: Emitted when a request for a proof of event challenge is sent. +5. `PROOF_OF_EVENT_CHALLENGE_REQUEST_SUCCESS`: Triggered when a proof of event challenge request is successfully completed. +6. `PROOF_OF_EVENT_CHALLENGE_REQUEST_ERROR`: Occurs when there is an error in the proof of event challenge request process. +7. `OPERATION_REQUEST_SENT`: Fired when an operation request (like a transaction) is sent. +8. `OPERATION_REQUEST_SUCCESS`: Triggered when an operation request is successfully processed. +9. `OPERATION_REQUEST_ERROR`: Occurs when there is an error in processing an operation request. +10. `SIGN_REQUEST_SENT`: Emitted when a request to sign a payload is sent. +11. `SIGN_REQUEST_SUCCESS`: Triggered when a sign request is successfully completed. +12. `SIGN_REQUEST_ERROR`: Occurs when there is an error in the sign request process. +13. `BROADCAST_REQUEST_SENT`: Fired when a request to broadcast a transaction to the network is sent. +14. `BROADCAST_REQUEST_SUCCESS`: Triggered when a broadcast request is successfully completed. +15. `BROADCAST_REQUEST_ERROR`: Occurs when there is an error in the broadcast request process. +16. `ACKNOWLEDGE_RECEIVED`: Emitted when an acknowledgement from the user is received. +17. `LOCAL_RATE_LIMIT_REACHED`: Triggered when a local rate limit is reached. +18. `NO_PERMISSIONS`: Occurs when no permissions are granted for the requested operation. +19. `ACTIVE_ACCOUNT_SET`: Fired when an active account is set in the application. +20. `ACTIVE_TRANSPORT_SET`: Triggered when an active transport layer is set. +21. `SHOW_PREPARE`: Emitted when the UI is being prepared to show some content or process. +22. `HIDE_UI`: Occurs when the UI is hidden. +23. `INVALID_ACTIVE_ACCOUNT_STATE`: Fired when there's an invalid state in the active account. +24. `PAIR_INIT`: Emitted at the initiation of a pairing process. +25. `PAIR_SUCCESS`: Triggered when a pairing process completes successfully. +26. `CHANNEL_CLOSED`: Occurs when a communication channel is closed. +27. `INTERNAL_ERROR`: Fired when an internal error occurs within the SDK. +28. `UNKNOWN`: Triggered for any unknown events. + +### Example +