diff --git a/code-examples/core_features/claiming/1_claiming.ts b/code-examples/core_features/claiming/1_claiming.ts index a8826822a..aa950882b 100644 --- a/code-examples/core_features/claiming/1_claiming.ts +++ b/code-examples/core_features/claiming/1_claiming.ts @@ -2,7 +2,7 @@ import { CType } from '@kiltprotocol/core' export async function main(): Promise<CType> { const ctype = CType.fromSchema({ - $schema: 'http://kilt-protocol.org/draft-01/ctype#', + $schema: 'ipns://k51qzi5uqu5dkglos1mtdukd4axyhwav7e98bga8g2nptrkgcbj9506ruoadiz/v1/ctype.json', title: 'Drivers License', properties: { name: { diff --git a/code-examples/core_features/did/9_did.ts b/code-examples/core_features/did/9_did.ts index 6e067a68f..a93aaeacf 100644 --- a/code-examples/core_features/did/9_did.ts +++ b/code-examples/core_features/did/9_did.ts @@ -76,7 +76,7 @@ function getRandomCType(): CType { // Random factor ensures that each created CType is unique and does not already exist on chain. const randomFactor = UUID.generate() return CType.fromSchema({ - $schema: 'http://kilt-protocol.org/draft-01/ctype#', + $schema: 'ipns://k51qzi5uqu5dkglos1mtdukd4axyhwav7e98bga8g2nptrkgcbj9506ruoadiz/v1/ctype.json', title: `CType ${randomFactor}`, properties: { name: { diff --git a/code-examples/workshop/attester/ctypeSchema.ts b/code-examples/workshop/attester/ctypeSchema.ts index a2c431392..35b6e811d 100644 --- a/code-examples/workshop/attester/ctypeSchema.ts +++ b/code-examples/workshop/attester/ctypeSchema.ts @@ -3,7 +3,7 @@ import * as Kilt from '@kiltprotocol/sdk-js' // returns CTYPE from a schema export function getCtypeSchema(): Kilt.CType { return Kilt.CType.fromSchema({ - $schema: 'http://kilt-protocol.org/draft-01/ctype#', + $schema: 'ipns://k51qzi5uqu5dkglos1mtdukd4axyhwav7e98bga8g2nptrkgcbj9506ruoadiz/v1/ctype.json', title: 'Drivers License', properties: { name: { diff --git a/docs/sdk/0-core-feature/2_ctypes.md b/docs/sdk/0-core-feature/2_ctypes.md index 1294f5432..2380ff953 100644 --- a/docs/sdk/0-core-feature/2_ctypes.md +++ b/docs/sdk/0-core-feature/2_ctypes.md @@ -10,7 +10,7 @@ title: CTypes KILT uses [JSON-Schema](https://json-schema.org/) (currently draft-07) to validate and annotate data in a strict format. This data format for [CType models](https://github.com/KILTprotocol/sdk-js/blob/develop/packages/core/src/ctype/CTypeSchema.ts) forms a CType with the definition of its characteristics. The following are all required properties of the schema, with no additional properties allowed: - Identifier: `$id` in the format `kilt:ctype:0x{cTypeHash}` -- KILT specific JSON-Schema: '[http://kilt-protocol.org/draft-01/ctype-input#](http://kilt-protocol.org/draft-01/ctype-input#)' +- KILT specific JSON-Schema: [`ipns://k51qzi5uqu5dkglos1mtdukd4axyhwav7e98bga8g2nptrkgcbj9506ruoadiz/v1/ctype.json`](https://ipfs.io/ipns/k51qzi5uqu5dkglos1mtdukd4axyhwav7e98bga8g2nptrkgcbj9506ruoadiz/v1/ctype.json) - Title: defines a user-friendly name for the CType that makes it easier for users to contextualise - Properties: Each property is the attribute the claimer wishes to have attested by the attester. @@ -29,7 +29,7 @@ When making a claim for a CType, all the following properties are required: ```js { $id: 'kilt:ctype:0xda3861a45e0197f3ca145c2c209f9126e5053fas503e459af4255cf8011d51010', - $schema: 'http://kilt-protocol.org/draft-01/ctype#', + $schema: 'ipns://k51qzi5uqu5dkglos1mtdukd4axyhwav7e98bga8g2nptrkgcbj9506ruoadiz/v1/ctype.json', title: 'CtypeModel 2', properties: { name: { type: 'string' }, @@ -50,7 +50,7 @@ A claim from a nested CType requires the given CType, a list of comprised schema ```js nested = { $id: 'kilt:ctype:0xda3861a45e0197f3ca145c2c20f9f126e5053fas503e459af4255cf8011d51010', - $schema: 'http://kilt-protocol.org/draft-01/ctype#', + $schema: 'ipns://k51qzi5uqu5dkglos1mtdukd4axyhwav7e98bga8g2nptrkgcbj9506ruoadiz/v1/ctype.json', title: 'KYC and Passport', type: 'object', properties: { diff --git a/docs/sdk/1-workshop/03-attester/03-ctype.md b/docs/sdk/1-workshop/03-attester/03-ctype.md index 4a42ef7da..ffc0ed0a5 100644 --- a/docs/sdk/1-workshop/03-attester/03-ctype.md +++ b/docs/sdk/1-workshop/03-attester/03-ctype.md @@ -36,7 +36,7 @@ For example, a very basic CType for a driver's license could look like this: { "schema": { "$id": "kilt:ctype:0xd8ad043d91d8fdbc382ee0ce33dc96af4ee62ab2d20f7980c49d3e577d80e5f5", - "$schema": "http://kilt-protocol.org/draft-01/ctype#", + "$schema": "ipns://k51qzi5uqu5dkglos1mtdukd4axyhwav7e98bga8g2nptrkgcbj9506ruoadiz/v1/ctype.json", "title": "Drivers License", "properties": { "name": {