New build script (old deps were wonky)

This commit is contained in:
2024-11-22 14:31:15 +09:00
parent 1cff73c0e5
commit 543a304a43
5 changed files with 54 additions and 87 deletions
+19 -62
View File
@@ -14,7 +14,6 @@ The out-of-the-box namespaces are:
- [Address](#address)
- [AENS](#aens)
- [AENSv2](#aensv2)
- [Auth](#auth)
- [Bits](#bits)
- [Bytes](#bytes)
@@ -31,7 +30,6 @@ The following ones need to be included as regular files with `.aes` suffix, for
include "List.aes"
```
- [AENSCompat](#aenscompat)
- [Bitwise](#bitwise)
- [BLS12_381](#bls12_381)
- [Func](#func)
@@ -88,27 +86,6 @@ Cast address to contract type C (where `C` is a contract)
### AENS
The old AENS namespace, kept in the compiler to be able to interact with
contracts from before Ceres, compiled using aesophia compiler version 7.x and
earlier. Used in [AENSCompat](#aenscompat) when converting between old and new
pointers.
#### Types
##### name
```
datatype name = Name(address, Chain.ttl, map(string, AENS.pointee))
```
##### pointee
```
datatype pointee = AccountPt(address) | ContractPt(address) | ChannelPt(address)
```
### AENSv2
Note: introduced in v8.0
The following functionality is available for interacting with the
@@ -122,7 +99,7 @@ i.e. the signature material should be prefixed by the network id.
##### name
```
datatype name = Name(address, Chain.ttl, map(string, AENSv2.pointee))
datatype name = Name(address, Chain.ttl, map(string, AENS.pointee))
```
@@ -139,7 +116,7 @@ Sophia itself does _not_ check for this.
##### resolve
```
AENSv2.resolve(name : string, key : string) : option('a)
AENS.resolve(name : string, key : string) : option('a)
```
Name resolution. Here `name` should be a registered name and `key` one of the attributes
@@ -150,29 +127,29 @@ type checked against this type at run time.
##### lookup
```
AENSv2.lookup(name : string) : option(AENSv2.name)
AENS.lookup(name : string) : option(AENS.name)
```
If `name` is an active name `AENSv2.lookup` returns a name object.
If `name` is an active name `AENS.lookup` returns a name object.
The three arguments to `Name` are `owner`, `expiry` and a map of the
`pointees` for the name. Note: the expiry of the name is always a fixed TTL.
For example:
```
let Some(AENSv2.Name(owner, FixedTTL(expiry), ptrs)) = AENSv2.lookup("example.chain")
let Some(AENS.Name(owner, FixedTTL(expiry), ptrs)) = AENS.lookup("example.chain")
```
Note: Changed to produce `AENSv2.name` in v8.0 (Ceres protocol upgrade).
Note: Changed to produce `AENS.name` in v8.0
##### preclaim
```
AENSv2.preclaim(owner : address, commitment_hash : hash, <signature : signature>) : unit
AENS.preclaim(owner : address, commitment_hash : hash, <signature : signature>) : unit
```
The [signature](./sophia_features.md#delegation-signature) should be a
serialized structure containing `network id`, `owner address`, and
`Contract.address`.
From Ceres (i.e. FATE VM version 3) the
The
[signature](./sophia_features.md#delegation-signature) can also be generic
(allowing _all_, existing and future, names to be delegated with one
signature), i.e. containing `network id`, `owner address`, `Contract.address`.
@@ -180,14 +157,14 @@ signature), i.e. containing `network id`, `owner address`, `Contract.address`.
##### claim
```
AENSv2.claim(owner : address, name : string, salt : int, name_fee : int, <signature : signature>) : unit
AENS.claim(owner : address, name : string, salt : int, name_fee : int, <signature : signature>) : unit
```
The [signature](./sophia_features.md#delegation-signature) should be a
serialized structure containing `network id`, `owner address`, and
`Contract.address`. Using the private key of `owner address` for signing.
From Ceres (i.e. FATE VM version 3) the
The
[signature](./sophia_features.md#delegation-signature) can also be generic
(allowing _all_, existing and future, names to be delegated with one
signature), i.e. containing `network id`, `owner address`, `name_hash`, and
@@ -196,7 +173,7 @@ signature), i.e. containing `network id`, `owner address`, `name_hash`, and
##### transfer
```
AENSv2.transfer(owner : address, new_owner : address, name : string, <signature : signature>) : unit
AENS.transfer(owner : address, new_owner : address, name : string, <signature : signature>) : unit
```
Transfers name to the new owner.
@@ -205,7 +182,7 @@ The [signature](./sophia_features.md#delegation-signature) should be a
serialized structure containing `network id`, `owner address`, and
`Contract.address`. Using the private key of `owner address` for signing.
From Ceres (i.e. FATE VM version 3) the
The
[signature](./sophia_features.md#delegation-signature) can also be generic
(allowing _all_, existing and future, names to be delegated with one
signature), i.e. containing `network id`, `owner address`, `name_hash`, and
@@ -214,7 +191,7 @@ signature), i.e. containing `network id`, `owner address`, `name_hash`, and
##### revoke
```
AENSv2.revoke(owner : address, name : string, <signature : signature>) : unit
AENS.revoke(owner : address, name : string, <signature : signature>) : unit
```
Revokes the name to extend the ownership time.
@@ -223,7 +200,7 @@ The [signature](./sophia_features.md#delegation-signature) should be a
serialized structure containing `network id`, `owner address`, and
`Contract.address`. Using the private key of `owner address` for signing.
From Ceres (i.e. FATE VM version 3) the
The
[signature](./sophia_features.md#delegation-signature) can also be generic
(allowing _all_, existing and future, names to be delegated with one
signature), i.e. containing `network id`, `owner address`, `name_hash`, and
@@ -232,21 +209,21 @@ signature), i.e. containing `network id`, `owner address`, `name_hash`, and
##### update
```
AENSv2.update(owner : address, name : string, expiry : option(Chain.ttl), client_ttl : option(int),
new_ptrs : option(map(string, AENSv2.pointee)), <signature : signature>) : unit
AENS.update(owner : address, name : string, expiry : option(Chain.ttl), client_ttl : option(int),
new_ptrs : option(map(string, AENS.pointee)), <signature : signature>) : unit
```
Updates the name. If the optional parameters are set to `None` that parameter
will not be updated, for example if `None` is passed as `expiry` the expiry
block of the name is not changed.
Note: Changed to consume `AENSv2.pointee` in v8.0 (Ceres protocol upgrade).
Note: Changed to consume `AENS.pointee` in v8.0
The [signature](./sophia_features.md#delegation-signature) should be a
serialized structure containing `network id`, `owner address`, and
`Contract.address`. Using the private key of `owner address` for signing.
From Ceres (i.e. FATE VM version 3) the
The
[signature](./sophia_features.md#delegation-signature) can also be generic
(allowing _all_, existing and future, names to be delegated with one
signature), i.e. containing `network id`, `owner address`, `name_hash`, and
@@ -289,10 +266,7 @@ namespace Chain =
Auth.tx_hash : option(hash)
```
Gets the transaction hash during authentication. Note: `Auth.tx_hash`
computation differs between protocol versions (changed in Ceres!), see
[serialisation](https://gitlab.com/ioecs/protocol/-/blob/master/serializations.md)
specification for details.
Gets the transaction hash during authentication.
### Bits
@@ -934,23 +908,6 @@ Turns a list of pairs of form `(key, value)` into a map
These need to be explicitly included (with `.aes` suffix)
### AENSCompat
#### pointee\_to\_V2
```
AENSCompat.pointee_to_V2(p : AENS.pointee) : AENSv2.pointee
```
Translate old pointee format to new, this is always possible.
#### pointee\_from\_V2
```
AENSCompat.pointee_from_V2(p2 : AENSv2.pointee) : option(AENS.pointee)
```
Translate new pointee format to old, `DataPt` can't be translated, so `None` is returned in this case.
### BLS12\_381
#### Types