Skip to content

Commit f38fd59

Browse files
authored
Updates to DSNP 1.3 items (#56)
- Propose schema for `public-key-assertion-method` changed to remove `AppendOnly` attribute. - Remove migrated `profile` announcement schema. - Fix `update` schema numbering on Paseo (verified against `npm run read` - Add testnet id for `profile-resources`
1 parent c356d56 commit f38fd59

File tree

1 file changed

+8
-22
lines changed

1 file changed

+8
-22
lines changed

dsnp/index.ts

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export const schemas = new Map<SchemaName, Deploy>([
180180
model: publicKey,
181181
modelType: "AvroBinary",
182182
payloadLocation: "Itemized",
183-
settings: ["AppendOnly", "SignatureRequired"],
183+
settings: ["SignatureRequired"],
184184
dsnpVersion: "1.3",
185185
},
186186
],
@@ -212,20 +212,19 @@ chainMapping[GENESIS_HASH_TESTNET_PASEO] = {
212212
broadcast: { "1.2": 2 },
213213
reply: { "1.2": 3 },
214214
reaction: { "1.1": 4 },
215-
update: { "1.2": 5 },
215+
update: { "1.2": 6 },
216216
"public-key-key-agreement": { "1.2": 7 },
217217
"public-follows": { "1.2": 8 },
218218
"private-follows": { "1.2": 9 },
219219
"private-connections": { "1.2": 10 },
220220
"public-key-assertion-method": { "1.3": 11 },
221-
// "profile-resources": { "1.3": TBD },
221+
"profile-resources": { "1.3": 570 },
222222
};
223223
chainMapping[GENESIS_HASH_MAINNET] = {
224224
tombstone: { "1.2": 1 },
225225
broadcast: { "1.2": 2 },
226226
reply: { "1.2": 3 },
227227
reaction: { "1.1": 4 },
228-
profile: { "1.2": 6 },
229228
update: { "1.2": 5 },
230229
"public-key-key-agreement": { "1.2": 7 },
231230
"public-follows": { "1.2": 8 },
@@ -235,25 +234,12 @@ chainMapping[GENESIS_HASH_MAINNET] = {
235234
// "profile-resources": { "1.3": TBD },
236235
};
237236
/*
238-
* Schema in "default" deployments (e.g. to a clean local chain) are
239-
* numbered according to the `schemas` array (beginning with 1). If
240-
* you have a non-standard deployment, call `setSchemaMapping()`
241-
* manually.
237+
* Schemas in "default" deployments (e.g. to a clean local node) are
238+
* generally the same as mainnet. As schemas are approved on mainnet
239+
* they will be added to the Frequency source code in
240+
* https://github.com/frequency-chain/frequency/blob/main/resources/genesis-schemas.json.
242241
*/
243-
chainMapping["default"] = {
244-
tombstone: { "1.2": 1 },
245-
broadcast: { "1.2": 2 },
246-
reply: { "1.2": 3 },
247-
reaction: { "1.1": 4 },
248-
profile: { "1.2": 5 },
249-
update: { "1.2": 6 },
250-
"public-key-key-agreement": { "1.2": 7 },
251-
"public-follows": { "1.2": 8 },
252-
"private-follows": { "1.2": 9 },
253-
"private-connections": { "1.2": 10 },
254-
"public-key-assertion-method": { "1.3": 11 },
255-
"profile-resources": { "1.3": 12 },
256-
};
242+
chainMapping["default"] = JSON.parse(JSON.stringify(chainMapping[GENESIS_HASH_MAINNET]));
257243

258244
/**
259245
* Gets the schemaId from the Frequency instance configured for

0 commit comments

Comments
 (0)