Skip to content

Updates to DSNP 1.3 items #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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