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
Copy file name to clipboardExpand all lines: docs/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,7 +116,7 @@ module.exports = {
116
116
### Vue@3
117
117
118
118
Reactivity in Vue@3 [based on] Proxy class. Proxy is [not compatible] with private fields of ES
119
-
classes. AeSdk, Contract and MemoryAccount classes uses private fields, so if you make an instance of these
119
+
classes. AeSdk, Contract and AccountMemory classes uses private fields, so if you make an instance of these
120
120
classes reactive then the app may fail with
121
121
122
122
> TypeError: attempted to get private field on non-instance
@@ -126,7 +126,7 @@ to solve this issue we suggest to avoid making their instances reactive using
126
126
Vue's integrated utility: [shallowRef]. The idea is to make reactive only the
127
127
instance value, to don't make it reactive in deep.
128
128
129
-
Alternatively, [toRaw] can unwrap the proxy object, returning an unmodified instance and allowing access to its private properties by its methods. It can be useful if you need a reactive array of MemoryAccount.
129
+
Alternatively, [toRaw] can unwrap the proxy object, returning an unmodified instance and allowing access to its private properties by its methods. It can be useful if you need a reactive array of AccountMemory.
130
130
131
131
You can find both approaches used in the [æpp example].
Copy file name to clipboardExpand all lines: docs/guides/typed-data.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ corresponds to the data
34
34
35
35
## Implementation
36
36
37
-
-[AccountBase:signTypedData](https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/src/account/Base.ts#L63-L70) — calculates signature, supported in MemoryAccount and in aepp-wallet connection;
37
+
-[AccountBase:signTypedData](https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/src/account/Base.ts#L63-L70) — calculates signature, supported in AccountMemory and in aepp-wallet connection;
38
38
-[hashTypedData](https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/src/utils/typed-data.ts#L82-L96) — calculates the overall hash of typed data to sign;
39
39
-[hashJson](https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/src/utils/typed-data.ts#L10-L12) — deterministic hashing of an arbitrary JS value, used to calculate `hash(aci)`;
40
40
-[hashDomain](https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/src/utils/typed-data.ts#L56-L80) — use for debugging or to prepare the hash value for smart contract.
if (!isEncoded(address, Encoding.AccountAddress)) {
150
150
alert('The address is not valid');
151
151
return;
152
152
}
153
153
154
154
awaitaeSdk.spend(100, address);
155
155
```
156
156
157
-
Please note that this method doesn't require explicit casting `string` to [`Encoded.AccountAddress`] because [`isAddressValid`] implicitly marks `address` as `ak_${string}` in case it returns `true`.
157
+
Please note that this method doesn't require explicit casting `string` to [`Encoded.AccountAddress`] because [`isEncoded`] implicitly marks `address` as `ak_${string}` in case it returns `true`.
158
158
159
-
Additionally, you can use [`isAddressValid`] to validate data against other address types:
159
+
Additionally, you can use [`isEncoded`] to validate data against other address types:
If you don't need to handle invalid names specially then you can use [`ensureName`]:
@@ -198,7 +198,7 @@ const name = new Name(nameAsString, options);
198
198
199
199
Doing this way, [`ensureName`] will throw an exception if `nameAsString` is not a proper AENS name. TypeScript will handle `nameAsString` as `${string}.chain` in lines below [`ensureName`] invocation.
0 commit comments