@hypercerts-org/lexicon 0.10.0-beta.0 → 0.10.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +126 -13
- package/dist/exports.d.ts +1018 -0
- package/dist/exports.d.ts.map +1 -0
- package/dist/generated/exports.d.ts +1018 -0
- package/dist/generated/exports.d.ts.map +1 -0
- package/dist/generated/lexicons.d.ts +1805 -0
- package/dist/generated/lexicons.d.ts.map +1 -0
- package/dist/generated/types/app/certified/badge/award.d.ts +24 -0
- package/dist/generated/types/app/certified/badge/award.d.ts.map +1 -0
- package/dist/generated/types/app/certified/badge/definition.d.ts +25 -0
- package/dist/generated/types/app/certified/badge/definition.d.ts.map +1 -0
- package/dist/generated/types/app/certified/badge/response.d.ts +20 -0
- package/dist/generated/types/app/certified/badge/response.d.ts.map +1 -0
- package/dist/generated/types/app/certified/defs.d.ts +3 -0
- package/dist/generated/types/app/certified/defs.d.ts.map +1 -0
- package/dist/generated/types/app/certified/location.d.ts +29 -0
- package/dist/generated/types/app/certified/location.d.ts.map +1 -0
- package/dist/generated/types/com/atproto/repo/strongRef.d.ts +12 -0
- package/dist/generated/types/com/atproto/repo/strongRef.d.ts.map +1 -0
- package/dist/generated/types/org/hypercerts/claim/activity.d.ts +57 -0
- package/dist/generated/types/org/hypercerts/claim/activity.d.ts.map +1 -0
- package/dist/generated/types/org/hypercerts/claim/collection.d.ts +25 -0
- package/dist/generated/types/org/hypercerts/claim/collection.d.ts.map +1 -0
- package/dist/generated/types/org/hypercerts/claim/contribution.d.ts +24 -0
- package/dist/generated/types/org/hypercerts/claim/contribution.d.ts.map +1 -0
- package/dist/generated/types/org/hypercerts/claim/evaluation.d.ts +43 -0
- package/dist/generated/types/org/hypercerts/claim/evaluation.d.ts.map +1 -0
- package/dist/generated/types/org/hypercerts/claim/evidence.d.ts +29 -0
- package/dist/generated/types/org/hypercerts/claim/evidence.d.ts.map +1 -0
- package/dist/generated/types/org/hypercerts/claim/measurement.d.ts +30 -0
- package/dist/generated/types/org/hypercerts/claim/measurement.d.ts.map +1 -0
- package/dist/generated/types/org/hypercerts/claim/project.d.ts +29 -0
- package/dist/generated/types/org/hypercerts/claim/project.d.ts.map +1 -0
- package/dist/generated/types/org/hypercerts/claim/rights.d.ts +25 -0
- package/dist/generated/types/org/hypercerts/claim/rights.d.ts.map +1 -0
- package/dist/generated/types/org/hypercerts/defs.d.ts +45 -0
- package/dist/generated/types/org/hypercerts/defs.d.ts.map +1 -0
- package/dist/generated/types/org/hypercerts/funding/receipt.d.ts +34 -0
- package/dist/generated/types/org/hypercerts/funding/receipt.d.ts.map +1 -0
- package/dist/generated/types/pub/leaflet/pages/linearDocument.d.ts +2 -0
- package/dist/generated/types/pub/leaflet/pages/linearDocument.d.ts.map +1 -0
- package/dist/generated/util.d.ts +37 -0
- package/dist/generated/util.d.ts.map +1 -0
- package/dist/index.cjs +2636 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.mjs +2560 -0
- package/dist/index.mjs.map +1 -0
- package/dist/lexicons.cjs +1002 -0
- package/dist/lexicons.cjs.map +1 -0
- package/dist/lexicons.d.ts +1805 -0
- package/dist/lexicons.d.ts.map +1 -0
- package/dist/lexicons.mjs +996 -0
- package/dist/lexicons.mjs.map +1 -0
- package/dist/types/app/certified/badge/award.d.ts +24 -0
- package/dist/types/app/certified/badge/award.d.ts.map +1 -0
- package/dist/types/app/certified/badge/definition.d.ts +25 -0
- package/dist/types/app/certified/badge/definition.d.ts.map +1 -0
- package/dist/types/app/certified/badge/response.d.ts +20 -0
- package/dist/types/app/certified/badge/response.d.ts.map +1 -0
- package/dist/types/app/certified/defs.d.ts +3 -0
- package/dist/types/app/certified/defs.d.ts.map +1 -0
- package/dist/types/app/certified/location.d.ts +29 -0
- package/dist/types/app/certified/location.d.ts.map +1 -0
- package/dist/types/com/atproto/repo/strongRef.d.ts +12 -0
- package/dist/types/com/atproto/repo/strongRef.d.ts.map +1 -0
- package/dist/types/org/hypercerts/claim/activity.d.ts +57 -0
- package/dist/types/org/hypercerts/claim/activity.d.ts.map +1 -0
- package/dist/types/org/hypercerts/claim/collection.d.ts +25 -0
- package/dist/types/org/hypercerts/claim/collection.d.ts.map +1 -0
- package/dist/types/org/hypercerts/claim/contribution.d.ts +24 -0
- package/dist/types/org/hypercerts/claim/contribution.d.ts.map +1 -0
- package/dist/types/org/hypercerts/claim/evaluation.d.ts +43 -0
- package/dist/types/org/hypercerts/claim/evaluation.d.ts.map +1 -0
- package/dist/types/org/hypercerts/claim/evidence.d.ts +29 -0
- package/dist/types/org/hypercerts/claim/evidence.d.ts.map +1 -0
- package/dist/types/org/hypercerts/claim/measurement.d.ts +30 -0
- package/dist/types/org/hypercerts/claim/measurement.d.ts.map +1 -0
- package/dist/types/org/hypercerts/claim/project.d.ts +29 -0
- package/dist/types/org/hypercerts/claim/project.d.ts.map +1 -0
- package/dist/types/org/hypercerts/claim/rights.d.ts +25 -0
- package/dist/types/org/hypercerts/claim/rights.d.ts.map +1 -0
- package/dist/types/org/hypercerts/defs.d.ts +45 -0
- package/dist/types/org/hypercerts/defs.d.ts.map +1 -0
- package/dist/types/org/hypercerts/funding/receipt.d.ts +34 -0
- package/dist/types/org/hypercerts/funding/receipt.d.ts.map +1 -0
- package/dist/types/pub/leaflet/pages/linearDocument.d.ts +2 -0
- package/dist/types/pub/leaflet/pages/linearDocument.d.ts.map +1 -0
- package/dist/util.d.ts +37 -0
- package/dist/util.d.ts.map +1 -0
- package/package.json +48 -21
- package/README.md.orig +0 -267
- package/types/index.ts +0 -1257
- package/types/lexicons.ts +0 -1071
- package/types/types/app/certified/badge/award.ts +0 -48
- package/types/types/app/certified/badge/definition.ts +0 -49
- package/types/types/app/certified/badge/response.ts +0 -44
- package/types/types/app/certified/defs.ts +0 -14
- package/types/types/app/certified/location.ts +0 -49
- package/types/types/com/atproto/repo/strongRef.ts +0 -31
- package/types/types/org/hypercerts/claim/activity.ts +0 -99
- package/types/types/org/hypercerts/claim/collection.ts +0 -49
- package/types/types/org/hypercerts/claim/contribution.ts +0 -48
- package/types/types/org/hypercerts/claim/evaluation.ts +0 -77
- package/types/types/org/hypercerts/claim/evidence.ts +0 -53
- package/types/types/org/hypercerts/claim/measurement.ts +0 -54
- package/types/types/org/hypercerts/claim/project.ts +0 -53
- package/types/types/org/hypercerts/claim/rights.ts +0 -49
- package/types/types/org/hypercerts/defs.ts +0 -96
- package/types/types/org/hypercerts/funding/receipt.ts +0 -58
- package/types/util.ts +0 -82
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { type ValidationResult } from '@atproto/lexicon';
|
|
5
|
+
import { type $Typed } from '../../../../util';
|
|
6
|
+
import type * as OrgHypercertsDefs from '../defs.js';
|
|
7
|
+
export interface Main {
|
|
8
|
+
$type: 'org.hypercerts.claim.rights';
|
|
9
|
+
/** Full name of the rights */
|
|
10
|
+
rightsName: string;
|
|
11
|
+
/** Short rights identifier for easier search */
|
|
12
|
+
rightsType: string;
|
|
13
|
+
/** Description of the rights of this hypercert */
|
|
14
|
+
rightsDescription: string;
|
|
15
|
+
attachment?: $Typed<OrgHypercertsDefs.Uri> | $Typed<OrgHypercertsDefs.SmallBlob> | {
|
|
16
|
+
$type: string;
|
|
17
|
+
};
|
|
18
|
+
/** Client-declared timestamp when this record was originally created */
|
|
19
|
+
createdAt: string;
|
|
20
|
+
[k: string]: unknown;
|
|
21
|
+
}
|
|
22
|
+
export declare function isMain<V>(v: V): v is import("../../../../util").$TypedObject<V, "org.hypercerts.claim.rights", "main">;
|
|
23
|
+
export declare function validateMain<V>(v: V): ValidationResult<Main & V>;
|
|
24
|
+
export { type Main as Record, isMain as isRecord, validateMain as validateRecord, };
|
|
25
|
+
//# sourceMappingURL=rights.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rights.d.ts","sourceRoot":"","sources":["../../../../../generated/types/org/hypercerts/claim/rights.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAGjE,OAAO,EACL,KAAK,MAAM,EAGZ,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,KAAK,iBAAiB,MAAM,YAAY,CAAA;AAMpD,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,6BAA6B,CAAA;IACpC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,gDAAgD;IAChD,UAAU,EAAE,MAAM,CAAA;IAClB,kDAAkD;IAClD,iBAAiB,EAAE,MAAM,CAAA;IACzB,UAAU,CAAC,EACP,MAAM,CAAC,iBAAiB,CAAC,GAAG,CAAC,GAC7B,MAAM,CAAC,iBAAiB,CAAC,SAAS,CAAC,GACnC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IACrB,wEAAwE;IACxE,SAAS,EAAE,MAAM,CAAA;IACjB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAID,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,0FAE7B;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,8BAEnC;AAED,OAAO,EACL,KAAK,IAAI,IAAI,MAAM,EACnB,MAAM,IAAI,QAAQ,EAClB,YAAY,IAAI,cAAc,GAC/B,CAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { type ValidationResult, BlobRef } from '@atproto/lexicon';
|
|
5
|
+
/** Object containing a URI to external data */
|
|
6
|
+
export interface Uri {
|
|
7
|
+
$type?: 'org.hypercerts.defs#uri';
|
|
8
|
+
/** URI to external data */
|
|
9
|
+
uri: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function isUri<V>(v: V): v is import("../../../util").$TypedObject<V, "org.hypercerts.defs", "uri">;
|
|
12
|
+
export declare function validateUri<V>(v: V): ValidationResult<Uri & V>;
|
|
13
|
+
/** Object containing a blob to external data */
|
|
14
|
+
export interface SmallBlob {
|
|
15
|
+
$type?: 'org.hypercerts.defs#smallBlob';
|
|
16
|
+
/** Blob to external data (up to 10MB) */
|
|
17
|
+
blob: BlobRef;
|
|
18
|
+
}
|
|
19
|
+
export declare function isSmallBlob<V>(v: V): v is import("../../../util").$TypedObject<V, "org.hypercerts.defs", "smallBlob">;
|
|
20
|
+
export declare function validateSmallBlob<V>(v: V): ValidationResult<SmallBlob & V>;
|
|
21
|
+
/** Object containing a blob to external data */
|
|
22
|
+
export interface LargeBlob {
|
|
23
|
+
$type?: 'org.hypercerts.defs#largeBlob';
|
|
24
|
+
/** Blob to external data (up to 100MB) */
|
|
25
|
+
blob: BlobRef;
|
|
26
|
+
}
|
|
27
|
+
export declare function isLargeBlob<V>(v: V): v is import("../../../util").$TypedObject<V, "org.hypercerts.defs", "largeBlob">;
|
|
28
|
+
export declare function validateLargeBlob<V>(v: V): ValidationResult<LargeBlob & V>;
|
|
29
|
+
/** Object containing a small image */
|
|
30
|
+
export interface SmallImage {
|
|
31
|
+
$type?: 'org.hypercerts.defs#smallImage';
|
|
32
|
+
/** Image (up to 5MB) */
|
|
33
|
+
image: BlobRef;
|
|
34
|
+
}
|
|
35
|
+
export declare function isSmallImage<V>(v: V): v is import("../../../util").$TypedObject<V, "org.hypercerts.defs", "smallImage">;
|
|
36
|
+
export declare function validateSmallImage<V>(v: V): ValidationResult<SmallImage & V>;
|
|
37
|
+
/** Object containing a large image */
|
|
38
|
+
export interface LargeImage {
|
|
39
|
+
$type?: 'org.hypercerts.defs#largeImage';
|
|
40
|
+
/** Image (up to 10MB) */
|
|
41
|
+
image: BlobRef;
|
|
42
|
+
}
|
|
43
|
+
export declare function isLargeImage<V>(v: V): v is import("../../../util").$TypedObject<V, "org.hypercerts.defs", "largeImage">;
|
|
44
|
+
export declare function validateLargeImage<V>(v: V): ValidationResult<LargeImage & V>;
|
|
45
|
+
//# sourceMappingURL=defs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../generated/types/org/hypercerts/defs.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,gBAAgB,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AASjE,+CAA+C;AAC/C,MAAM,WAAW,GAAG;IAClB,KAAK,CAAC,EAAE,yBAAyB,CAAA;IACjC,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAA;CACZ;AAID,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,8EAE5B;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,6BAElC;AAED,gDAAgD;AAChD,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,+BAA+B,CAAA;IACvC,yCAAyC;IACzC,IAAI,EAAE,OAAO,CAAA;CACd;AAID,wBAAgB,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,oFAElC;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,mCAExC;AAED,gDAAgD;AAChD,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,+BAA+B,CAAA;IACvC,0CAA0C;IAC1C,IAAI,EAAE,OAAO,CAAA;CACd;AAID,wBAAgB,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,oFAElC;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,mCAExC;AAED,sCAAsC;AACtC,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,gCAAgC,CAAA;IACxC,wBAAwB;IACxB,KAAK,EAAE,OAAO,CAAA;CACf;AAID,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,qFAEnC;AAED,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,oCAEzC;AAED,sCAAsC;AACtC,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,gCAAgC,CAAA;IACxC,yBAAyB;IACzB,KAAK,EAAE,OAAO,CAAA;CACf;AAID,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,qFAEnC;AAED,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,oCAEzC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { type ValidationResult } from '@atproto/lexicon';
|
|
5
|
+
import type * as AppCertifiedDefs from '../../../app/certified/defs.js';
|
|
6
|
+
export interface Main {
|
|
7
|
+
$type: 'org.hypercerts.funding.receipt';
|
|
8
|
+
from: AppCertifiedDefs.Did;
|
|
9
|
+
/** The recipient of the funds. Can be identified by DID or a clear-text name. */
|
|
10
|
+
to: string;
|
|
11
|
+
/** Amount of funding received. */
|
|
12
|
+
amount: string;
|
|
13
|
+
/** Currency of the payment (e.g. EUR, USD, ETH). */
|
|
14
|
+
currency: string;
|
|
15
|
+
/** How the funds were transferred (e.g. bank_transfer, credit_card, onchain, cash, check, payment_processor). */
|
|
16
|
+
paymentRail?: string;
|
|
17
|
+
/** Optional network within the payment rail (e.g. arbitrum, ethereum, sepa, visa, paypal). */
|
|
18
|
+
paymentNetwork?: string;
|
|
19
|
+
/** Identifier of the underlying payment transaction (e.g. bank reference, onchain transaction hash, or processor-specific ID). Use paymentNetwork to specify the network where applicable. */
|
|
20
|
+
transactionId?: string;
|
|
21
|
+
/** Optional reference to the activity, project, or organization this funding relates to. */
|
|
22
|
+
for?: string;
|
|
23
|
+
/** Optional notes or additional context for this funding receipt. */
|
|
24
|
+
notes?: string;
|
|
25
|
+
/** Timestamp when the payment occurred. */
|
|
26
|
+
occurredAt?: string;
|
|
27
|
+
/** Client-declared timestamp when this receipt record was created. */
|
|
28
|
+
createdAt: string;
|
|
29
|
+
[k: string]: unknown;
|
|
30
|
+
}
|
|
31
|
+
export declare function isMain<V>(v: V): v is import("../../../../util").$TypedObject<V, "org.hypercerts.funding.receipt", "main">;
|
|
32
|
+
export declare function validateMain<V>(v: V): ValidationResult<Main & V>;
|
|
33
|
+
export { type Main as Record, isMain as isRecord, validateMain as validateRecord, };
|
|
34
|
+
//# sourceMappingURL=receipt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receipt.d.ts","sourceRoot":"","sources":["../../../../../generated/types/org/hypercerts/funding/receipt.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAQjE,OAAO,KAAK,KAAK,gBAAgB,MAAM,gCAAgC,CAAA;AAMvE,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,gCAAgC,CAAA;IACvC,IAAI,EAAE,gBAAgB,CAAC,GAAG,CAAA;IAC1B,iFAAiF;IACjF,EAAE,EAAE,MAAM,CAAA;IACV,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAA;IACd,oDAAoD;IACpD,QAAQ,EAAE,MAAM,CAAA;IAChB,iHAAiH;IACjH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8FAA8F;IAC9F,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,8LAA8L;IAC9L,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,4FAA4F;IAC5F,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,sEAAsE;IACtE,SAAS,EAAE,MAAM,CAAA;IACjB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAID,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,6FAE7B;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,8BAEnC;AAED,OAAO,EACL,KAAK,IAAI,IAAI,MAAM,EACnB,MAAM,IAAI,QAAQ,EAClB,YAAY,IAAI,cAAc,GAC/B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linearDocument.d.ts","sourceRoot":"","sources":["../../../../../generated/types/pub/leaflet/pages/linearDocument.ts"],"names":[],"mappings":"AAEA,cAAc,4CAA4C,CAAC"}
|
package/dist/util.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { type ValidationResult } from '@atproto/lexicon';
|
|
5
|
+
export type OmitKey<T, K extends keyof T> = {
|
|
6
|
+
[K2 in keyof T as K2 extends K ? never : K2]: T[K2];
|
|
7
|
+
};
|
|
8
|
+
export type $Typed<V, T extends string = string> = V & {
|
|
9
|
+
$type: T;
|
|
10
|
+
};
|
|
11
|
+
export type Un$Typed<V extends {
|
|
12
|
+
$type?: string;
|
|
13
|
+
}> = OmitKey<V, '$type'>;
|
|
14
|
+
export type $Type<Id extends string, Hash extends string> = Hash extends 'main' ? Id : `${Id}#${Hash}`;
|
|
15
|
+
export type $TypedObject<V, Id extends string, Hash extends string> = V extends {
|
|
16
|
+
$type: $Type<Id, Hash>;
|
|
17
|
+
} ? V : V extends {
|
|
18
|
+
$type?: string;
|
|
19
|
+
} ? V extends {
|
|
20
|
+
$type?: infer T extends $Type<Id, Hash>;
|
|
21
|
+
} ? V & {
|
|
22
|
+
$type: T;
|
|
23
|
+
} : never : V & {
|
|
24
|
+
$type: $Type<Id, Hash>;
|
|
25
|
+
};
|
|
26
|
+
export declare function is$typed<V, Id extends string, Hash extends string>(v: V, id: Id, hash: Hash): v is $TypedObject<V, Id, Hash>;
|
|
27
|
+
export declare function maybe$typed<V, Id extends string, Hash extends string>(v: V, id: Id, hash: Hash): v is V & object & {
|
|
28
|
+
$type?: $Type<Id, Hash>;
|
|
29
|
+
};
|
|
30
|
+
export type Validator<R = unknown> = (v: unknown) => ValidationResult<R>;
|
|
31
|
+
export type ValidatorParam<V extends Validator> = V extends Validator<infer R> ? R : never;
|
|
32
|
+
/**
|
|
33
|
+
* Utility function that allows to convert a "validate*" utility function into a
|
|
34
|
+
* type predicate.
|
|
35
|
+
*/
|
|
36
|
+
export declare function asPredicate<V extends Validator>(validate: V): <T>(v: T) => v is T & ValidatorParam<V>;
|
|
37
|
+
//# sourceMappingURL=util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../generated/util.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAExD,MAAM,MAAM,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI;KACzC,EAAE,IAAI,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,KAAK,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC;CACpD,CAAA;AAED,MAAM,MAAM,MAAM,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,CAAC,GAAG;IAAE,KAAK,EAAE,CAAC,CAAA;CAAE,CAAA;AACnE,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,IAAI,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;AAExE,MAAM,MAAM,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,IAAI,SAAS,MAAM,IAAI,IAAI,SAAS,MAAM,GAC3E,EAAE,GACF,GAAG,EAAE,IAAI,IAAI,EAAE,CAAA;AAqBnB,MAAM,MAAM,YAAY,CACtB,CAAC,EACD,EAAE,SAAS,MAAM,EACjB,IAAI,SAAS,MAAM,IACjB,CAAC,SAAS;IACZ,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;CACvB,GACG,CAAC,GACD,CAAC,SAAS;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAC1B,CAAC,SAAS;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC,SAAS,KAAK,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;CAAE,GACnD,CAAC,GAAG;IAAE,KAAK,EAAE,CAAC,CAAA;CAAE,GAChB,KAAK,GACP,CAAC,GAAG;IAAE,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;CAAE,CAAA;AAEpC,wBAAgB,QAAQ,CAAC,CAAC,EAAE,EAAE,SAAS,MAAM,EAAE,IAAI,SAAS,MAAM,EAChE,CAAC,EAAE,CAAC,EACJ,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,GACT,CAAC,IAAI,YAAY,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,CAEhC;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,EAAE,SAAS,MAAM,EAAE,IAAI,SAAS,MAAM,EACnE,CAAC,EAAE,CAAC,EACJ,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,GACT,CAAC,IAAI,CAAC,GAAG,MAAM,GAAG;IAAE,KAAK,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;CAAE,CAK/C;AAED,MAAM,MAAM,SAAS,CAAC,CAAC,GAAG,OAAO,IAAI,CAAC,CAAC,EAAE,OAAO,KAAK,gBAAgB,CAAC,CAAC,CAAC,CAAA;AACxE,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,SAAS,IAC5C,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AAE1C;;;GAGG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,SAAS,EAAE,QAAQ,EAAE,CAAC,IACzC,CAAC,EAAE,GAAG,CAAC,KAAG,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAGtD"}
|
package/package.json
CHANGED
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hypercerts-org/lexicon",
|
|
3
|
-
"version": "0.10.0-beta.
|
|
3
|
+
"version": "0.10.0-beta.1",
|
|
4
4
|
"description": "ATProto lexicon definitions and TypeScript types for the Hypercerts protocol",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "./
|
|
7
|
-
"
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.mjs",
|
|
8
|
+
"types": "./dist/exports.d.ts",
|
|
8
9
|
"exports": {
|
|
9
10
|
".": {
|
|
10
|
-
"types": "./
|
|
11
|
-
"import": "./
|
|
12
|
-
|
|
11
|
+
"types": "./dist/exports.d.ts",
|
|
12
|
+
"import": "./dist/index.mjs",
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./lexicons": {
|
|
16
|
+
"types": "./dist/lexicons.d.ts",
|
|
17
|
+
"import": "./dist/lexicons.mjs",
|
|
18
|
+
"require": "./dist/lexicons.cjs"
|
|
19
|
+
},
|
|
20
|
+
"./package.json": "./package.json"
|
|
13
21
|
},
|
|
14
22
|
"files": [
|
|
15
|
-
"
|
|
23
|
+
"dist",
|
|
16
24
|
"lexicons"
|
|
17
25
|
],
|
|
18
26
|
"keywords": [
|
|
@@ -25,35 +33,54 @@
|
|
|
25
33
|
"license": "MIT",
|
|
26
34
|
"repository": {
|
|
27
35
|
"type": "git",
|
|
28
|
-
"url": ""
|
|
36
|
+
"url": "https://github.com/hypercerts-org/hypercerts-lexicon"
|
|
29
37
|
},
|
|
30
38
|
"scripts": {
|
|
31
39
|
"list": "find ./lexicons -name '*.json'",
|
|
32
|
-
"check": "npm run gen-api",
|
|
33
|
-
"
|
|
40
|
+
"check": "npm run gen-api && npm run lint && npm run typecheck && npm run build",
|
|
41
|
+
"build": "rollup -c && npm run build:types",
|
|
42
|
+
"build:types": "tsc --project tsconfig.build.json",
|
|
43
|
+
"gen-api": "find ./lexicons -name '*.json' | xargs lex gen-api --yes ./generated && ./scripts/create-shims.sh && npm run gen-index",
|
|
34
44
|
"gen-md": "find ./lexicons -name '*.json' | xargs lex gen-md --yes ./lexicons.md",
|
|
35
|
-
"gen-ts": "
|
|
45
|
+
"//gen-ts": "UNUSED - use gen-api instead",
|
|
46
|
+
"gen-ts": "find ./lexicons -name '*.json' | xargs lex gen-ts-obj > generated/DO-NOT-USE-lexicons.ts",
|
|
47
|
+
"gen-index": "node ./scripts/generate-exports.js",
|
|
36
48
|
"lex": "lex",
|
|
37
49
|
"format": "prettier --write .",
|
|
38
50
|
"format:check": "prettier --check .",
|
|
39
|
-
"lint": "npm run format:check",
|
|
40
|
-
"
|
|
51
|
+
"lint": "npm run format:check && npm run eslint",
|
|
52
|
+
"eslint": "eslint generated/exports.ts",
|
|
53
|
+
"typecheck": "tsc --noEmit",
|
|
54
|
+
"clean": "rm -rf dist generated",
|
|
55
|
+
"prepublishOnly": "npm run check",
|
|
41
56
|
"changeset": "changeset",
|
|
42
|
-
"version-packages": "changeset version",
|
|
57
|
+
"version-packages": "changeset version && npm install --package-lock-only",
|
|
43
58
|
"release": "npm run check && changeset publish"
|
|
44
59
|
},
|
|
45
60
|
"dependencies": {
|
|
46
|
-
"@
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"@atproto/xrpc": "*",
|
|
50
|
-
"@atproto/lexicon": "*"
|
|
61
|
+
"@atcute/leaflet": "^1.0.15",
|
|
62
|
+
"@atproto/lexicon": "^0.6.0",
|
|
63
|
+
"multiformats": "^13.3.6"
|
|
51
64
|
},
|
|
52
65
|
"devDependencies": {
|
|
66
|
+
"@atproto/lex-cli": "^0.9.5",
|
|
53
67
|
"@atproto/xrpc": "^0.7.5",
|
|
54
|
-
"@atproto/lexicon": "^0.5.1",
|
|
55
68
|
"@changesets/changelog-github": "^0.5.2",
|
|
56
69
|
"@changesets/cli": "^2.29.8",
|
|
57
|
-
"
|
|
70
|
+
"@eslint/js": "^9.39.2",
|
|
71
|
+
"@rollup/plugin-commonjs": "^29.0.0",
|
|
72
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
73
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
74
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
75
|
+
"eslint": "^9.39.2",
|
|
76
|
+
"globals": "^17.0.0",
|
|
77
|
+
"prettier": "^3.2.5",
|
|
78
|
+
"rollup": "^4.53.3",
|
|
79
|
+
"tslib": "^2.8.1",
|
|
80
|
+
"typescript": "^5.7.2",
|
|
81
|
+
"typescript-eslint": "^8.51.0"
|
|
82
|
+
},
|
|
83
|
+
"peerDependencies": {
|
|
84
|
+
"@atproto/xrpc": "*"
|
|
58
85
|
}
|
|
59
86
|
}
|
package/README.md.orig
DELETED
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
# Hypercerts Lexicon Documentation
|
|
2
|
-
|
|
3
|
-
This repository contains ATProto lexicon definitions for the
|
|
4
|
-
Hypercerts protocol. Each lexicon defines a record type that can be
|
|
5
|
-
stored on the ATProto network.
|
|
6
|
-
|
|
7
|
-
## Entity Relationship Diagram
|
|
8
|
-
|
|
9
|
-

|
|
10
|
-
|
|
11
|
-
<details>
|
|
12
|
-
<summary>View ERD with field details</summary>
|
|
13
|
-
|
|
14
|
-

|
|
15
|
-
|
|
16
|
-
</details>
|
|
17
|
-
|
|
18
|
-
## Installation
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
npm i @hypercerts-org/lexicon
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Usage
|
|
25
|
-
|
|
26
|
-
```typescript
|
|
27
|
-
import { AtpBaseClient } from '@hypercerts-org/lexicon'
|
|
28
|
-
import type { HypercertClaim } from '@hypercerts-org/lexicon'
|
|
29
|
-
|
|
30
|
-
const client = new AtpBaseClient({
|
|
31
|
-
service: 'https://bsky.social',
|
|
32
|
-
headers: { Authorization: `Bearer ${token}` }
|
|
33
|
-
})
|
|
34
|
-
|
|
35
|
-
const hypercert: HypercertClaim = {
|
|
36
|
-
$type: 'org.hypercerts.claim.activity',
|
|
37
|
-
title: 'My Impact Work',
|
|
38
|
-
shortDescription: 'Description here',
|
|
39
|
-
workScope: 'Scope of work',
|
|
40
|
-
startDate: '2023-01-01T00:00:00Z',
|
|
41
|
-
endDate: '2023-12-31T23:59:59Z',
|
|
42
|
-
createdAt: new Date().toISOString()
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
await client.org.hypercerts.claim.activity.create(
|
|
46
|
-
{ repo: 'did:plc:example' },
|
|
47
|
-
hypercert
|
|
48
|
-
)
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Certified Lexicons
|
|
52
|
-
|
|
53
|
-
Certified lexicons are common/shared lexicons that can be used across multiple protocols.
|
|
54
|
-
|
|
55
|
-
### Common Definitions
|
|
56
|
-
|
|
57
|
-
**Lexicon ID:** `org.hypercerts.defs`
|
|
58
|
-
|
|
59
|
-
**Description:** Common type definitions used across all certified protocols.
|
|
60
|
-
|
|
61
|
-
#### Defs
|
|
62
|
-
|
|
63
|
-
| Def | Type | Description | Comments |
|
|
64
|
-
|--------------|----------|-------------------------------------------|-----------------------------------------|
|
|
65
|
-
| `uri` | `object` | Object containing a URI to external data | Has `uri` property (string, format uri) |
|
|
66
|
-
| `smallBlob` | `object` | Object containing a blob to external data | Has `blob` property (blob, up to 10MB) |
|
|
67
|
-
| `largeBlob` | `object` | Object containing a blob to external data | Has `blob` property (blob, up to 100MB) |
|
|
68
|
-
| `smallImage` | `object` | Object containing a small image | Has `image` property (blob, up to 5MB) |
|
|
69
|
-
| `largeImage` | `object` | Object containing a large image | Has `image` property (blob, up to 10MB) |
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
### Location Lexicon
|
|
74
|
-
|
|
75
|
-
**Lexicon ID:** `app.certified.location`
|
|
76
|
-
|
|
77
|
-
**Description:** A location reference for use across certified protocols. For more information about
|
|
78
|
-
|
|
79
|
-
**Key:** `any`
|
|
80
|
-
|
|
81
|
-
#### Properties
|
|
82
|
-
|
|
83
|
-
| Property | Type | Required | Description | Comments |
|
|
84
|
-
| -------------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------- | -------- |
|
|
85
|
-
| `lpVersion` | `string` | ✅ | The version of the Location Protocol | |
|
|
86
|
-
| `srs` | `string` | ✅ | The Spatial Reference System URI (e.g., http://www.opengis.net/def/crs/OGC/1.3/CRS84) that defines the coordinate system. | |
|
|
87
|
-
| `locationType` | `string` | ✅ | An identifier for the format of the location data (e.g., coordinate-decimal, geojson-point) | |
|
|
88
|
-
| `location` | `union` | ✅ | The location of where the work was performed as a URI or blob. | |
|
|
89
|
-
| `name` | `string` | ❌ | Optional name for this location | |
|
|
90
|
-
| `description` | `string` | ❌ | Optional description for this location | |
|
|
91
|
-
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## Hypercerts Lexicons
|
|
96
|
-
|
|
97
|
-
Hypercerts-specific lexicons for tracking impact work and claims.
|
|
98
|
-
|
|
99
|
-
### Hypercerts Activity Claim
|
|
100
|
-
|
|
101
|
-
**Lexicon ID:** `org.hypercerts.claim.activity`
|
|
102
|
-
|
|
103
|
-
**Description:** The main lexicon where everything is connected to. This is the hypercert record that tracks impact work.
|
|
104
|
-
|
|
105
|
-
**Key:** `any`
|
|
106
|
-
|
|
107
|
-
#### Properties
|
|
108
|
-
|
|
109
|
-
| Property | Type | Required | Description | Comments |
|
|
110
|
-
| ------------------- | -------- | -------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
|
|
111
|
-
| `title` | `string` | ✅ | Title of the hypercert | |
|
|
112
|
-
| `shortDescription` | `string` | ✅ | Short blurb of the impact work done. | |
|
|
113
|
-
| `description` | `string` | ❌ | Optional longer description of the impact work done. | |
|
|
114
|
-
| `image` | `union` | ❌ | The hypercert visual representation as a URI or image blob | |
|
|
115
|
-
| `workScope` | `object` | ❌ | Logical scope of the work using label-based conditions | Object with `allOf`, `anyOf`, `noneOf` arrays of labels |
|
|
116
|
-
| `startDate` | `string` | ✅ | When the work began | |
|
|
117
|
-
| `endDate` | `string` | ✅ | When the work ended | |
|
|
118
|
-
| `contributions` | `array` | ❌ | A strong reference to the contributions done to create the impact in the hypercerts | References must conform to `org.hypercerts.claim.contribution` |
|
|
119
|
-
| `rights` | `ref` | ❌ | A strong reference to the rights that this hypercert has | References must conform to `org.hypercerts.claim.rights` |
|
|
120
|
-
| `location` | `ref` | ❌ | A strong reference to the location where the work for done hypercert was located | References must conform to `app.certified.location` |
|
|
121
|
-
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |
|
|
122
|
-
|
|
123
|
-
---
|
|
124
|
-
|
|
125
|
-
### Hypercerts Contribution
|
|
126
|
-
|
|
127
|
-
**Lexicon ID:** `org.hypercerts.claim.contribution`
|
|
128
|
-
|
|
129
|
-
**Description:** A contribution made toward a hypercert's impact.
|
|
130
|
-
|
|
131
|
-
**Key:** `any`
|
|
132
|
-
|
|
133
|
-
#### Properties
|
|
134
|
-
|
|
135
|
-
| Property | Type | Required | Description | Comments |
|
|
136
|
-
| ------------------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
|
137
|
-
| `role` | `string` | ❌ | Role or title of the contributor(s). | |
|
|
138
|
-
| `contributors` | `array` | ✅ | List of the contributors (names, pseudonyms, or DIDs). If multiple contributors are stored in the same hypercertContribution, then they would have the exact same role. | |
|
|
139
|
-
| `description` | `string` | ❌ | What the contribution concretely achieved | |
|
|
140
|
-
| `startDate` | `string` | ❌ | When this contribution started. This should be a subset of the hypercert timeframe. | |
|
|
141
|
-
| `endDate` | `string` | ❌ | When this contribution finished. This should be a subset of the hypercert timeframe. | |
|
|
142
|
-
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |
|
|
143
|
-
|
|
144
|
-
---
|
|
145
|
-
|
|
146
|
-
### Hypercerts Evaluation
|
|
147
|
-
|
|
148
|
-
**Lexicon ID:** `org.hypercerts.claim.evaluation`
|
|
149
|
-
|
|
150
|
-
**Description:** An evaluation of a hypercert or other claim
|
|
151
|
-
|
|
152
|
-
**Key:** `tid`
|
|
153
|
-
|
|
154
|
-
#### Properties
|
|
155
|
-
|
|
156
|
-
| Property | Type | Required | Description | Comments |
|
|
157
|
-
| ------------- | -------- | -------- | -------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
158
|
-
| `subject` | `ref` | ✅ | A strong reference to the evaluated claim | (e.g measurement, hypercert, contribution, etc) |
|
|
159
|
-
| `evaluators` | `array` | ✅ | DIDs of the evaluators | |
|
|
160
|
-
| `evaluations` | `array` | ❌ | Evaluation data (URIs or blobs) containing detailed reports or methodology | |
|
|
161
|
-
| `summary` | `string` | ✅ | Brief evaluation summary | |
|
|
162
|
-
| `location` | `ref` | ❌ | An optional reference for georeferenced evaluations | References must conform to `app.certified.location` |
|
|
163
|
-
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |
|
|
164
|
-
|
|
165
|
-
---
|
|
166
|
-
|
|
167
|
-
### Hypercerts Evidence
|
|
168
|
-
|
|
169
|
-
**Lexicon ID:** `org.hypercerts.claim.evidence`
|
|
170
|
-
|
|
171
|
-
**Description:** A piece of evidence supporting a hypercert claim
|
|
172
|
-
|
|
173
|
-
**Key:** `any`
|
|
174
|
-
|
|
175
|
-
#### Properties
|
|
176
|
-
|
|
177
|
-
| Property | Type | Required | Description | Comments |
|
|
178
|
-
|--------------------|----------|----------|----------------------------------------------------------------------------|-------------------------------------------------------------------------------------|
|
|
179
|
-
| `activity` | `ref` | ❌ | A strong reference to the activity this evidence is for | The record referenced must conform with the lexicon `org.hypercerts.claim.activity` |
|
|
180
|
-
| `content` | `union` | ✅ | A piece of evidence (URI or blobs) supporting a hypercert claim | |
|
|
181
|
-
| `title` | `string` | ✅ | Title to describe the nature of the evidence | |
|
|
182
|
-
| `shortDescription` | `string` | ❌ | Short description explaining what this evidence demonstrates or proves | |
|
|
183
|
-
| `description` | `string` | ❌ | Optional longer description describing the impact claim evidence. | |
|
|
184
|
-
| `createdAt` | `string` | ✅ | Client-declared timestamp when this hypercert claim was originally created | |
|
|
185
|
-
|
|
186
|
-
---
|
|
187
|
-
|
|
188
|
-
### org.hypercerts.claim.measurement
|
|
189
|
-
|
|
190
|
-
**Lexicon ID:** `org.hypercerts.claim.measurement`
|
|
191
|
-
|
|
192
|
-
**Description:** External measurement data supporting a hypercert claim
|
|
193
|
-
|
|
194
|
-
**Key:** `tid`
|
|
195
|
-
|
|
196
|
-
#### Properties
|
|
197
|
-
|
|
198
|
-
| Property | Type | Required | Description | Comments |
|
|
199
|
-
| ---------------------- | -------- | -------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
|
200
|
-
| `activity` | `ref` | ✅ | A strong reference to the activity that this measurement is for | The record referenced must conform with the lexicon `org.hypercerts.claim.activity` |
|
|
201
|
-
| `measurers` | `array` | ✅ | DIDs of the entity (or entities) that measured this data | |
|
|
202
|
-
| `metric` | `string` | ✅ | The metric being measured | |
|
|
203
|
-
| `value` | `string` | ✅ | The measured value | |
|
|
204
|
-
| `measurementMethodType`| `string` | ❌ | Short identifier for the measurement methodology | |
|
|
205
|
-
| `measurementMethodURI` | `string` | ❌ | URI to methodology documentation, standard protocol, or measurement procedure | |
|
|
206
|
-
| `evidenceURI` | `array` | ❌ | URIs to supporting evidence or data | |
|
|
207
|
-
| `location` | `ref` | ❌ | A strong reference to the location where the measurement was taken | References must conform to `app.certified.location` |
|
|
208
|
-
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |
|
|
209
|
-
|
|
210
|
-
---
|
|
211
|
-
|
|
212
|
-
### org.hypercerts.claim.collection
|
|
213
|
-
|
|
214
|
-
**Lexicon ID:** `org.hypercerts.claim.collection`
|
|
215
|
-
|
|
216
|
-
**Description:** A collection/group of hypercerts that have a specific property.
|
|
217
|
-
|
|
218
|
-
**Key:** `tid`
|
|
219
|
-
|
|
220
|
-
#### Properties
|
|
221
|
-
|
|
222
|
-
| Property | Type | Required | Description | Comments |
|
|
223
|
-
| ------------------ | -------- | -------- | ----------------------------------------------------------------------- | --------------------------------- |
|
|
224
|
-
| `title` | `string` | ✅ | The title of this collection | |
|
|
225
|
-
| `shortDescription` | `string` | ❌ | A short description of this collection | |
|
|
226
|
-
| `coverPhoto` | `union` | ❌ | The cover photo of this collection (either in URI format or in a blob). | |
|
|
227
|
-
| `claims` | `array` | ✅ | Array of claims with their associated weights in this collection | Each item references `#claimItem` |
|
|
228
|
-
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |
|
|
229
|
-
|
|
230
|
-
#### Defs
|
|
231
|
-
|
|
232
|
-
##### claimItem
|
|
233
|
-
|
|
234
|
-
| Property | Type | Required | Description | Comments |
|
|
235
|
-
| -------- | -------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
|
|
236
|
-
| `claim` | `ref` | ✅ | A strong reference to a hypercert claim record. This claim must conform to the lexicon org.hypercerts.claim.activity | |
|
|
237
|
-
| `weight` | `string` | ✅ | The weight/importance of this hypercert claim in the collection (a percentage from 0-100, stored as a string to avoid float precision issues). The total claim weights should add up to 100. | |
|
|
238
|
-
|
|
239
|
-
---
|
|
240
|
-
|
|
241
|
-
### org.hypercerts.claim.rights
|
|
242
|
-
|
|
243
|
-
**Lexicon ID:** `org.hypercerts.claim.rights`
|
|
244
|
-
|
|
245
|
-
**Description:** Describes the rights that a user has with a hypercert, such as whether it can be sold, transferred, and under what conditions.
|
|
246
|
-
|
|
247
|
-
**Key:** `any`
|
|
248
|
-
|
|
249
|
-
#### Properties
|
|
250
|
-
|
|
251
|
-
| Property | Type | Required | Description | Comments |
|
|
252
|
-
| ------------------- | -------- | -------- | ----------------------------------------------------------------- | -------- |
|
|
253
|
-
| `rightsName` | `string` | ✅ | Full name of the rights | |
|
|
254
|
-
| `rightsType` | `string` | ✅ | Short rights identifier for easier search | |
|
|
255
|
-
| `rightsDescription` | `string` | ✅ | Description of the rights of this hypercert | |
|
|
256
|
-
| `attachment` | `union` | ❌ | An attachment to define the rights further, e.g. a legal document | URI or blob |
|
|
257
|
-
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |
|
|
258
|
-
|
|
259
|
-
---
|
|
260
|
-
|
|
261
|
-
## Notes
|
|
262
|
-
|
|
263
|
-
- All timestamps use the `datetime` format (ISO 8601)
|
|
264
|
-
- Strong references (`com.atproto.repo.strongRef`) include both the URI and CID of the referenced record
|
|
265
|
-
- Union types allow multiple possible formats (e.g., URI or blob)
|
|
266
|
-
- Array items may have constraints like `maxLength` to limit the number of elements
|
|
267
|
-
- String fields may have both `maxLength` (bytes) and `maxGraphemes` (Unicode grapheme clusters) constraints
|