Skip to content

Commit e87590c

Browse files
committed
self-review
1 parent 2a26c62 commit e87590c

File tree

3 files changed

+9
-21
lines changed

3 files changed

+9
-21
lines changed

daml/splice-amulet-name-service/daml/Splice/Ans.daml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,6 @@ template AnsEntryContext
288288
amuletSum = result.amuletSum
289289

290290

291-
292-
293-
294291
-- | A ans entry that needs to be renewed continuously.
295292
-- Renewal recreates this contract with an updated `expiresAt` field.
296293
template AnsEntry
@@ -303,18 +300,6 @@ template AnsEntry
303300
expiresAt : Time
304301
where
305302
signatory user, dso
306-
{-
307-
308-
issuer: dso
309-
holder: user
310-
validFrom: None
311-
validUntil: Some(expiresAt)
312-
claims:
313-
cns.canton.network/name: name
314-
cns.canton.network/<name>/url: url
315-
cns.canton.network/<name>/description: description
316-
317-
-}
318303

319304
interface instance RegistryV1.CredentialRecord for AnsEntry where
320305
view = RegistryV1.CredentialRecordView with
@@ -324,6 +309,10 @@ template AnsEntry
324309
credential = RegistryV1.Credential with
325310
claims = TM.fromList [
326311
("ans.name", name),
312+
-- Make the URL and Description fields properties with the CNS name as the subject
313+
-- Not namespaced as we expect them to be defined in a CIP
314+
--
315+
-- TODO: build the separate CIP that builds ANS on top of the DSO credential registry.
327316
("ans.url#" <> name, url),
328317
("ans.description#" <> name, description)
329318
]

daml/splice-amulet-name-service/daml/Splice/AnsV2/AnsCredential.daml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ template AnsCredentialRegistry with
5353
newRecords
5454
meta = emptyMetadata
5555

56-
57-
58-
-- | A credential visible to the DSO and served by its Scan service.
56+
-- | A credential record visible to the DSO and served by its Scan service.
5957
template AnsCredentialRecord
6058
with
6159
dso : Party
@@ -65,6 +63,7 @@ template AnsCredentialRecord
6563
createdAt : Time
6664
expiresAt : Time
6765
where
66+
-- TODO: implement validation rules
6867
-- ensure validEntry this
6968

7069
signatory issuer, holder

daml/splice-api-credential-registry-v1/daml/Splice/Api/Credential/RegistryV1.daml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ data Credential = Credential with
2828
-- Implementations SHOULD ensure that claims are stored in canonical form without
2929
-- redundant '#holder' suffixes in keys.
3030
--
31-
-- Keys MUST only contain characters from [a-zA-Z0-9._:-]
32-
-- and SHOULD be namespaced in the form `dns.name/key` to avoid
31+
-- Keys MUST only contain characters from [a-zA-Z0-9._:-].
32+
-- Unless the keys are defined in an official CIP they
33+
-- must be namespaced in the form `dns.name/key` to avoid
3334
-- collisions between different usecases.
3435

35-
3636
validFrom : Optional Time
3737
-- ^ The time from which this credential is valid.
3838
validUntil : Optional Time

0 commit comments

Comments
 (0)