You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 30, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: apps/nextra/pages/en/build/sdks/ts-sdk/account/account-abstraction.mdx
+23-23Lines changed: 23 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ An enum variant defining the authentication data to be passed to the authenticat
58
58
59
59
```move
60
60
enum AbstractionAuthData has copy, drop {
61
-
V1 {
61
+
V1 {
62
62
digest: vector<u8>, // SHA3-256 hash of the signing message
63
63
authenticator: vector<u8> // Custom auth data (e.g., signatures)
64
64
},
@@ -113,7 +113,7 @@ const abstractedAccount = new AbstractedAccount({
113
113
114
114
### 1. Deploy Authentication Module
115
115
116
-
In this example, we will deploy the `hello_world_authenticator` module. The `authenticate` function takes an `AbstractionAuthData` and returns a `signer`
116
+
In this example, we will deploy the `hello_world_authenticator` module. The `authenticate` function takes an `AbstractionAuthData` and returns a `signer`
117
117
if the authentication is successful, otherwise it aborts the transaction. The authentication logic will only allow transactions that have an authenticator equal to `"hello world"`.
To deploy the module, you can use the following commands from the [Aptos CLI](../../../../build/cli). We assume that you already have set up a workspace with `aptos init` and
135
+
To deploy the module, you can use the following commands from the [Aptos CLI](../../../../build/cli). We assume that you already have set up a workspace with `aptos init` and
136
136
declared the named addresses in your `Move.toml` file.
Assuming that the account does not have account abstraction enabled, you need to enable the authentication function for the account. This can be done by calling
173
-
the `enableAccountAbstractionTransaction` function. This creates a raw transaction that needs to be signed and submitted to the network. In this example, `alice`
172
+
Assuming that the account does not have account abstraction enabled, you need to enable the authentication function for the account. This can be done by calling
173
+
the `enableAccountAbstractionTransaction` function. This creates a raw transaction that needs to be signed and submitted to the network. In this example, `alice`
174
174
will be the account that will be enabled.
175
175
176
176
```ts
@@ -267,7 +267,7 @@ console.log("Coin transfer transaction submitted! ", pendingCoinTransferTransact
267
267
268
268
### 7. Conclusion
269
269
270
-
To verify that you have successfully sign and submitted the transaction using the abstracted account, you can use the explorer to check the transaction. If the
270
+
To verify that you have successfully sign and submitted the transaction using the abstracted account, you can use the explorer to check the transaction. If the
271
271
transaction signature contains a `function_info` and `auth_data` field, it means you succesfully used account abstraction! The full E2E demo can be found [here](https://github.com/aptos-labs/aptos-ts-sdk/blob/main/examples/typescript/public_key_authenticator_account_abstraction.ts).
The `authenticate` function is the main function that allows users to authenticate on behalf of somebody else using account abstraction. The `authenticator`
454
454
will contain the **public key** and a **signature** of the user. We will verify that the public key is permitted and that the signature is valid.
455
455
456
-
The signature is the result of signing the `digest`. The `digest` is the sha256 hash of the **signing message** which contains information about the transaction.
456
+
The signature is the result of signing the `digest`. The `digest` is the sha256 hash of the **signing message** which contains information about the transaction.
457
457
By signing the `digest`, we confirm that the user has approved the specific transaction that was submitted.
To deploy the module, you can use the following commands from the [Aptos CLI](../../../../build/cli). We assume that you already have set up a workspace with `aptos init` and
493
+
To deploy the module, you can use the following commands from the [Aptos CLI](../../../../build/cli). We assume that you already have set up a workspace with `aptos init` and
494
494
declared the named addresses in your `Move.toml` file.
Assuming that the account does not have account abstraction enabled, we need to enable the authentication function for the account. This can be done by calling
532
-
the `enableAccountAbstractionTransaction` function. This creates a raw transaction that needs to be signed and submitted to the network. In this example, `alice`
531
+
Assuming that the account does not have account abstraction enabled, we need to enable the authentication function for the account. This can be done by calling
532
+
the `enableAccountAbstractionTransaction` function. This creates a raw transaction that needs to be signed and submitted to the network. In this example, `alice`
533
533
will be the account that will be enabled.
534
534
535
535
```ts
@@ -617,7 +617,7 @@ console.log("Coin transfer transaction submitted! ", pendingCoinTransferTransact
617
617
618
618
### 8. Conclusion
619
619
620
-
To verify that you have successfully sign and submitted the transaction using the abstracted account, you can use the explorer to check the transaction. If the
620
+
To verify that you have successfully sign and submitted the transaction using the abstracted account, you can use the explorer to check the transaction. If the
621
621
transaction signature contains a `function_info` and `auth_data` field, it means you succesfully used account abstraction! The full E2E demo can be found [here](https://github.com/aptos-labs/aptos-ts-sdk/blob/main/examples/typescript/public_key_authenticator_account_abstraction.ts)
Applications that want to leverage account abstraction will want to provide a user experience that allows users to check if the account has account abstraction enabled,
644
+
Applications that want to leverage account abstraction will want to provide a user experience that allows users to check if the account has account abstraction enabled,
0 commit comments