Skip to content
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

chore: merge achainable:amount shemas #15

Merged
merged 3 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions dist/schemas/11-token-holder/1-0-0.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
"src": {
"type": "string",
"enum": [
"$is_contract_creator",
"$is_eth_holder",
"$is_lit_holder",
"$is_dot_holder",
Expand Down
164 changes: 0 additions & 164 deletions dist/schemas/12-contract-creator/1-0-0.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/13-idhub-evm-version-early-bird/1-0-0.json",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/12-idhub-evm-version-early-bird/1-0-0.json",
"title": "IDHub EVM Version Early Bird",
"description": "The user is an early bird user of the IdentityHub EVM version and has generated at least 1 credential during 2023 Aug 14th ~ Aug 21st.",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/14-oneblock-student-phase-12/1-0-0.json",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/13-oneblock-student-phase-12/1-0-0.json",
"title": "OneBlock+ Student Phase 12",
"description": "You participated/ completed/ were an \"outstanding student\" in the course co-created by OneBlock+ and Parity: \"Introduction to Substrate Blockchain Development, Phase 12\"",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/15-uniswap-v2-v3-user/1-0-0.json",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/14-uniswap-v2-v3-user/1-0-0.json",
"title": "You are a trader or liquidity provider of Uniswap V2 or V3.",
"description": "You are a trader or liquidity provider of Uniswap V2 or V3. Uniswap V2 Factory Contract: 0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f. Uniswap V3 Factory Contract: 0x1f98431c8ad98523631ae4a59f267346ea31f984.\", \"Uniswap V2/V3 User\"",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/16-generic-discord-role/1-0-0.json",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/15-generic-discord-role/1-0-0.json",
"title": "You have certain role on Litentry Official Discord Server.",
"description": "You have a role that entitles you as \"Litentry & Contest Legend\", \"Litentry & Popularity Award of Score Contest\", \"Litentry & Contest Participant\", \"Litentry & SORA Quiz Attendee\", or \"Litentry & SORA Quiz Master\"",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/17-bnb-domain-holding-amount/1-0-0.json",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/16-bnb-domain-holding-amount/1-0-0.json",
"title": "BNB domain holding amount.",
"description": "The amount of .bnb domain you are holding",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/18-bnb-3d-4d-club-domain-holding-amount/1-0-0.json",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/17-bnb-3d-4d-club-domain-holding-amount/1-0-0.json",
"title": "BNB 3D/4D club domain holding amount.",
"description": "The amount of .BNB 999/10k club domains you are holding",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/19-token-holding-amount/1-0-0.json",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/18-token-holding-amount/1-0-0.json",
"title": "Token holding amount",
"description": "The amount of a particular token you are holding",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/20-weirdoghostgang-holder/1-0-0.json",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/19-weirdoghostgang-holder/1-0-0.json",
"title": "WeirdoGhostGang Holder",
"description": "You are WeirdoGhostGang NFT holder",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/21-vip3-card-holder/1-0-0.json",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/20-vip3-card-holder/1-0-0.json",
"title": "VIP3 Gold/ Silver Card Holder",
"description": "You are VIP3 Gold/ Silver Card Holder",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/22-token-holding-amount-list/1-0-0.json",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/21-token-holding-amount-list/1-0-0.json",
"title": "Token holding amount list",
"description": "The amount of a particular token you are holding",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/23-evm-holding-amount/1-0-0.json",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/22-evm-holding-amount/1-0-0.json",
"title": "Token holding amount",
"description": "The amount of a particular token you are holding",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/24-mirror-contributor/1-0-0.json",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/23-mirror-contributor/1-0-0.json",
"title": "Mirror Contributor",
"description": "You are a publisher on Mirror / You have published a certain amount of posts on Mirror",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/25-crypto-summary/1-0-0.json",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/24-crypto-summary/1-0-0.json",
"title": "IDHub Crypto Summary",
"description": "Generate a summary of your on-chain identity",
"type": "object",
Expand Down
1 change: 0 additions & 1 deletion dist/schemas/25-crypto-summary/latest.json

This file was deleted.

1 change: 1 addition & 0 deletions packages/schemas/src/lib/11-token-holder/1-0-0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const schema: JSONSchema7 = {
assertion.clause({
src: [
// https://github.com/litentry/litentry-parachain/blob/dev/tee-worker/litentry/core/assertion-build/src/achainable/amount.rs
'$is_contract_creator',
'$is_eth_holder',
'$is_lit_holder',
'$is_dot_holder',
Expand Down
31 changes: 0 additions & 31 deletions packages/schemas/src/lib/12-contract-creator/1-0-0.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import * as fs from 'fs';
import { ajv } from '../ajv';
import { schema } from './1-0-0';

describe('13-idhub-evm-version-early-bird/1-0-0', () => {
describe('12-idhub-evm-version-early-bird/1-0-0', () => {
it('should work', () => {
const validate = ajv.compile(schema);
expect(validate.errors).toBeNull();

const json = JSON.parse(
fs.readFileSync(
'examples/13-idhub-evm-version-early-bird/idhub-evm-version-early-bird.json',
'examples/12-idhub-evm-version-early-bird/idhub-evm-version-early-bird.json',
'utf8'
)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { credentialSubject, assertion } from '../schema-helpers';
export const schema: JSONSchema7 = {
...base,

$id: resolveGitHubPath('13-idhub-evm-version-early-bird/1-0-0.json'),
$id: resolveGitHubPath('12-idhub-evm-version-early-bird/1-0-0.json'),

title: 'IDHub EVM Version Early Bird',
description:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { globSync as glob } from 'fast-glob';
import { ajv } from '../ajv';
import { schema } from './1-0-0';

const jsonFiles = glob('examples/14-oneblock-student-phase-12/*.json');
const jsonFiles = glob('examples/13-oneblock-student-phase-12/*.json');

const validate = ajv.compile(schema);

describe('14-oneblock-student-phase-12/1-0-0', () => {
describe('13-oneblock-student-phase-12/1-0-0', () => {
it.each(jsonFiles)('should work for %s', (example) => {
expect(validate.errors).toBeNull();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { credentialSubject, assertion } from '../schema-helpers';
export const schema: JSONSchema7 = {
...base,

$id: resolveGitHubPath('14-oneblock-student-phase-12/1-0-0.json'),
$id: resolveGitHubPath('13-oneblock-student-phase-12/1-0-0.json'),

title: 'OneBlock+ Student Phase 12',
description:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { globSync as glob } from 'fast-glob';
import { ajv } from '../ajv';
import { schema } from './1-0-0';

const jsonFiles = glob('examples/15-uniswap-v2-v3-user/*.json');
const jsonFiles = glob('examples/14-uniswap-v2-v3-user/*.json');

const validate = ajv.compile(schema);

describe('15-uniswap-v2-v3-user/1-0-0', () => {
describe('14-uniswap-v2-v3-user/1-0-0', () => {
it.each(jsonFiles)('should work for %s', (example) => {
expect(validate.errors).toBeNull();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { credentialSubject, assertion } from '../schema-helpers';
export const schema: JSONSchema7 = {
...base,

$id: resolveGitHubPath('15-uniswap-v2-v3-user/1-0-0.json'),
$id: resolveGitHubPath('14-uniswap-v2-v3-user/1-0-0.json'),

title: 'You are a trader or liquidity provider of Uniswap V2 or V3.',
description:
Expand Down
Loading
Loading