Skip to content

Commit

Permalink
Updates to DSNP 1.3 items (#56)
Browse files Browse the repository at this point in the history
- 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`
  • Loading branch information
wesbiggs authored Aug 29, 2024
1 parent c356d56 commit f38fd59
Showing 1 changed file with 8 additions and 22 deletions.
30 changes: 8 additions & 22 deletions dsnp/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export const schemas = new Map<SchemaName, Deploy>([
model: publicKey,
modelType: "AvroBinary",
payloadLocation: "Itemized",
settings: ["AppendOnly", "SignatureRequired"],
settings: ["SignatureRequired"],
dsnpVersion: "1.3",
},
],
Expand Down Expand Up @@ -212,20 +212,19 @@ chainMapping[GENESIS_HASH_TESTNET_PASEO] = {
broadcast: { "1.2": 2 },
reply: { "1.2": 3 },
reaction: { "1.1": 4 },
update: { "1.2": 5 },
update: { "1.2": 6 },
"public-key-key-agreement": { "1.2": 7 },
"public-follows": { "1.2": 8 },
"private-follows": { "1.2": 9 },
"private-connections": { "1.2": 10 },
"public-key-assertion-method": { "1.3": 11 },
// "profile-resources": { "1.3": TBD },
"profile-resources": { "1.3": 570 },
};
chainMapping[GENESIS_HASH_MAINNET] = {
tombstone: { "1.2": 1 },
broadcast: { "1.2": 2 },
reply: { "1.2": 3 },
reaction: { "1.1": 4 },
profile: { "1.2": 6 },
update: { "1.2": 5 },
"public-key-key-agreement": { "1.2": 7 },
"public-follows": { "1.2": 8 },
Expand All @@ -235,25 +234,12 @@ chainMapping[GENESIS_HASH_MAINNET] = {
// "profile-resources": { "1.3": TBD },
};
/*
* Schema in "default" deployments (e.g. to a clean local chain) are
* numbered according to the `schemas` array (beginning with 1). If
* you have a non-standard deployment, call `setSchemaMapping()`
* manually.
* Schemas in "default" deployments (e.g. to a clean local node) are
* generally the same as mainnet. As schemas are approved on mainnet
* they will be added to the Frequency source code in
* https://github.com/frequency-chain/frequency/blob/main/resources/genesis-schemas.json.
*/
chainMapping["default"] = {
tombstone: { "1.2": 1 },
broadcast: { "1.2": 2 },
reply: { "1.2": 3 },
reaction: { "1.1": 4 },
profile: { "1.2": 5 },
update: { "1.2": 6 },
"public-key-key-agreement": { "1.2": 7 },
"public-follows": { "1.2": 8 },
"private-follows": { "1.2": 9 },
"private-connections": { "1.2": 10 },
"public-key-assertion-method": { "1.3": 11 },
"profile-resources": { "1.3": 12 },
};
chainMapping["default"] = JSON.parse(JSON.stringify(chainMapping[GENESIS_HASH_MAINNET]));

/**
* Gets the schemaId from the Frequency instance configured for
Expand Down

0 comments on commit f38fd59

Please sign in to comment.