@cheqd/sdk 2.1.0-develop.1 → 2.2.0
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 +33 -6
- package/build/{index.d.ts → cjs/index.d.ts} +8 -3
- package/build/cjs/index.d.ts.map +1 -0
- package/build/cjs/index.js +144 -0
- package/build/cjs/index.js.map +1 -0
- package/build/{modules → cjs/modules}/_.d.ts +1 -1
- package/build/cjs/modules/_.d.ts.map +1 -0
- package/build/{modules → cjs/modules}/_.js +3 -0
- package/build/cjs/modules/_.js.map +1 -0
- package/build/{modules → cjs/modules}/did.d.ts +4 -2
- package/build/cjs/modules/did.d.ts.map +1 -0
- package/build/{modules → cjs/modules}/did.js +42 -25
- package/build/cjs/modules/did.js.map +1 -0
- package/build/{modules → cjs/modules}/resource.d.ts +2 -2
- package/build/cjs/modules/resource.d.ts.map +1 -0
- package/build/{modules → cjs/modules}/resource.js +13 -5
- package/build/cjs/modules/resource.js.map +1 -0
- package/build/cjs/querier.d.ts.map +1 -0
- package/build/cjs/querier.js.map +1 -0
- package/build/cjs/registry.d.ts.map +1 -0
- package/build/cjs/registry.js.map +1 -0
- package/build/cjs/signer.d.ts.map +1 -0
- package/build/cjs/signer.js.map +1 -0
- package/build/{types.d.ts → cjs/types.d.ts} +1 -1
- package/build/cjs/types.d.ts.map +1 -0
- package/build/cjs/types.js.map +1 -0
- package/build/cjs/utils.d.ts.map +1 -0
- package/build/{utils.js → cjs/utils.js} +2 -5
- package/build/cjs/utils.js.map +1 -0
- package/build/types/index.d.ts +45 -0
- package/build/types/index.d.ts.map +1 -0
- package/build/types/modules/_.d.ts +20 -0
- package/build/types/modules/_.d.ts.map +1 -0
- package/build/types/modules/did.d.ts +109 -0
- package/build/types/modules/did.d.ts.map +1 -0
- package/build/types/modules/resource.d.ts +62 -0
- package/build/types/modules/resource.d.ts.map +1 -0
- package/build/types/querier.d.ts +11 -0
- package/build/types/querier.d.ts.map +1 -0
- package/build/types/registry.d.ts +4 -0
- package/build/types/registry.d.ts.map +1 -0
- package/build/types/signer.d.ts +36 -0
- package/build/types/signer.d.ts.map +1 -0
- package/build/types/types.d.ts +80 -0
- package/build/types/types.d.ts.map +1 -0
- package/build/types/utils.d.ts +18 -0
- package/build/types/utils.d.ts.map +1 -0
- package/package.json +48 -25
- package/.github/ISSUE_TEMPLATE/bug-report.yml +0 -74
- package/.github/ISSUE_TEMPLATE/config.yml +0 -14
- package/.github/ISSUE_TEMPLATE/feature-request.yaml +0 -27
- package/.github/dependabot.yml +0 -42
- package/.github/linters/.commitlint.rules.js +0 -37
- package/.github/linters/.eslintrc.json +0 -18
- package/.github/linters/.markdown-lint.yml +0 -139
- package/.github/linters/mlc_config.json +0 -13
- package/.github/workflows/build.yml +0 -30
- package/.github/workflows/cleanup-actions.yml +0 -45
- package/.github/workflows/cleanup-cache-automatic.yml +0 -24
- package/.github/workflows/cleanup-cache-manual.yml +0 -21
- package/.github/workflows/codeql.yml +0 -40
- package/.github/workflows/dispatch.yml +0 -30
- package/.github/workflows/lint.yml +0 -51
- package/.github/workflows/pull-request.yml +0 -33
- package/.github/workflows/release.yml +0 -42
- package/.github/workflows/test.yml +0 -66
- package/.releaserc.json +0 -56
- package/CHANGELOG.md +0 -256
- package/CODE_OF_CONDUCT.md +0 -81
- package/NOTICE.md +0 -10
- package/SECURITY.md +0 -12
- package/build/index.d.ts.map +0 -1
- package/build/index.js +0 -97
- package/build/index.js.map +0 -1
- package/build/modules/_.d.ts.map +0 -1
- package/build/modules/_.js.map +0 -1
- package/build/modules/did.d.ts.map +0 -1
- package/build/modules/did.js.map +0 -1
- package/build/modules/resource.d.ts.map +0 -1
- package/build/modules/resource.js.map +0 -1
- package/build/querier.d.ts.map +0 -1
- package/build/querier.js.map +0 -1
- package/build/registry.d.ts.map +0 -1
- package/build/registry.js.map +0 -1
- package/build/signer.d.ts.map +0 -1
- package/build/signer.js.map +0 -1
- package/build/types.d.ts.map +0 -1
- package/build/types.js.map +0 -1
- package/build/utils.d.ts.map +0 -1
- package/build/utils.js.map +0 -1
- package/docker/Dockerfile +0 -55
- package/docker/entrypoint.sh +0 -58
- package/docker/localnet/build-latest.env +0 -7
- package/docker/localnet/container-env/observer-0.env +0 -13
- package/docker/localnet/container-env/seed-0.env +0 -17
- package/docker/localnet/container-env/validator-0.env +0 -13
- package/docker/localnet/container-env/validator-1.env +0 -13
- package/docker/localnet/container-env/validator-2.env +0 -13
- package/docker/localnet/container-env/validator-3.env +0 -13
- package/docker/localnet/docker-compose.yml +0 -281
- package/docker/localnet/gen-network-config.sh +0 -259
- package/docker/localnet/import-keys.sh +0 -31
- package/jest.config.js +0 -6
- package/src/index.ts +0 -128
- package/src/modules/_.ts +0 -55
- package/src/modules/did.ts +0 -564
- package/src/modules/resource.ts +0 -213
- package/src/querier.ts +0 -33
- package/src/registry.ts +0 -15
- package/src/signer.ts +0 -258
- package/src/types.ts +0 -101
- package/src/utils.ts +0 -243
- package/tests/index.test.ts +0 -135
- package/tests/modules/did.test.ts +0 -965
- package/tests/modules/resource.test.ts +0 -785
- package/tests/signer.test.ts +0 -179
- package/tests/testutils.test.ts +0 -24
- package/tests/utils.test.ts +0 -66
- package/tsconfig.json +0 -80
- /package/build/{querier.d.ts → cjs/querier.d.ts} +0 -0
- /package/build/{querier.js → cjs/querier.js} +0 -0
- /package/build/{registry.d.ts → cjs/registry.d.ts} +0 -0
- /package/build/{registry.js → cjs/registry.js} +0 -0
- /package/build/{signer.d.ts → cjs/signer.d.ts} +0 -0
- /package/build/{signer.js → cjs/signer.js} +0 -0
- /package/build/{types.js → cjs/types.js} +0 -0
- /package/build/{utils.d.ts → cjs/utils.d.ts} +0 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Service as ProtobufService, VerificationMethod as ProtobufVerificationMethod } from "@cheqd/ts-proto/cheqd/did/v2";
|
|
2
|
+
import { CheqdSDK } from "./index";
|
|
3
|
+
import { Coin } from "@cosmjs/proto-signing";
|
|
4
|
+
import { Signer } from "did-jwt";
|
|
5
|
+
import { QueryClient } from "@cosmjs/stargate";
|
|
6
|
+
import { DIDResolutionResult } from "did-resolver";
|
|
7
|
+
import { DidExtension } from "./modules/did";
|
|
8
|
+
import { ResourceExtension } from './modules/resource';
|
|
9
|
+
export { DIDDocument, VerificationMethod, Service, ServiceEndpoint, JsonWebKey } from "did-resolver";
|
|
10
|
+
export declare enum CheqdNetwork {
|
|
11
|
+
Mainnet = "mainnet",
|
|
12
|
+
Testnet = "testnet"
|
|
13
|
+
}
|
|
14
|
+
export type QueryExtensionSetup<T> = (base: QueryClient) => T;
|
|
15
|
+
export type CheqdExtension<K extends string, V = any> = {
|
|
16
|
+
[P in K]: (Record<P, V> & Partial<Record<Exclude<K, P>, never>>) extends infer O ? {
|
|
17
|
+
[Q in keyof O]: O[Q];
|
|
18
|
+
} : never;
|
|
19
|
+
}[K];
|
|
20
|
+
export type CheqdExtensions = DidExtension | ResourceExtension;
|
|
21
|
+
export interface IModuleMethod {
|
|
22
|
+
(...args: any[]): Promise<any>;
|
|
23
|
+
}
|
|
24
|
+
export interface IModuleMethodMap extends Record<string, IModuleMethod> {
|
|
25
|
+
}
|
|
26
|
+
export interface IContext {
|
|
27
|
+
sdk: CheqdSDK;
|
|
28
|
+
}
|
|
29
|
+
export type DIDDocumentWithMetadata = Pick<DIDResolutionResult, 'didDocument' | 'didDocumentMetadata'>;
|
|
30
|
+
export type SpecValidationResult = {
|
|
31
|
+
valid: boolean;
|
|
32
|
+
error?: string;
|
|
33
|
+
protobufVerificationMethod?: ProtobufVerificationMethod[];
|
|
34
|
+
protobufService?: ProtobufService[];
|
|
35
|
+
};
|
|
36
|
+
export declare enum VerificationMethods {
|
|
37
|
+
Ed255192020 = "Ed25519VerificationKey2020",
|
|
38
|
+
Ed255192018 = "Ed25519VerificationKey2018",
|
|
39
|
+
JWK = "JsonWebKey2020"
|
|
40
|
+
}
|
|
41
|
+
export declare enum MethodSpecificIdAlgo {
|
|
42
|
+
Base58 = "base58btc",
|
|
43
|
+
Uuid = "uuid"
|
|
44
|
+
}
|
|
45
|
+
export type TSignerAlgo = {
|
|
46
|
+
[key in VerificationMethods as string]?: (secretKey: Uint8Array) => Signer;
|
|
47
|
+
};
|
|
48
|
+
export interface ISignInputs {
|
|
49
|
+
verificationMethodId: string;
|
|
50
|
+
keyType?: 'Ed25519' | 'Secp256k1' | 'P256';
|
|
51
|
+
privateKeyHex: string;
|
|
52
|
+
}
|
|
53
|
+
export interface IKeyPair {
|
|
54
|
+
publicKey: string;
|
|
55
|
+
privateKey: string;
|
|
56
|
+
algo?: MethodSpecificIdAlgo;
|
|
57
|
+
}
|
|
58
|
+
export interface IKeyValuePair {
|
|
59
|
+
key: string;
|
|
60
|
+
value: any;
|
|
61
|
+
}
|
|
62
|
+
export type TVerificationKeyPrefix = string;
|
|
63
|
+
export type TVerificationKey<K extends TVerificationKeyPrefix, N extends number> = `${K}-${N}`;
|
|
64
|
+
export interface IVerificationKeys {
|
|
65
|
+
readonly methodSpecificId: TMethodSpecificId;
|
|
66
|
+
readonly didUrl: `did:cheqd:${CheqdNetwork}:${IVerificationKeys['methodSpecificId']}` extends string ? string : never;
|
|
67
|
+
readonly keyId: `${IVerificationKeys['didUrl']}#${TVerificationKey<TVerificationKeyPrefix, number>}`;
|
|
68
|
+
readonly publicKey: string;
|
|
69
|
+
}
|
|
70
|
+
export type TMethodSpecificId = string;
|
|
71
|
+
export interface DidStdFee {
|
|
72
|
+
readonly amount: readonly Coin[];
|
|
73
|
+
readonly gas: string;
|
|
74
|
+
payer?: string;
|
|
75
|
+
granter?: string;
|
|
76
|
+
}
|
|
77
|
+
export declare const ISignInputs: {
|
|
78
|
+
isSignInput(object: Object[]): object is ISignInputs[];
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IKeyPair, IKeyValuePair, ISignInputs, VerificationMethods, MethodSpecificIdAlgo, TVerificationKey, TVerificationKeyPrefix, CheqdNetwork, IVerificationKeys, VerificationMethod, DIDDocument, SpecValidationResult } from "./types";
|
|
2
|
+
import { KeyPair } from '@stablelib/ed25519';
|
|
3
|
+
export type TImportableEd25519Key = {
|
|
4
|
+
publicKeyHex: string;
|
|
5
|
+
privateKeyHex: string;
|
|
6
|
+
kid: string;
|
|
7
|
+
type: "Ed25519";
|
|
8
|
+
};
|
|
9
|
+
export declare function isEqualKeyValuePair(kv1: IKeyValuePair[], kv2: IKeyValuePair[]): boolean;
|
|
10
|
+
export declare function createSignInputsFromImportableEd25519Key(key: TImportableEd25519Key, verificationMethod: VerificationMethod[]): ISignInputs;
|
|
11
|
+
export declare function createKeyPairRaw(seed?: string): KeyPair;
|
|
12
|
+
export declare function createKeyPairBase64(seed?: string): IKeyPair;
|
|
13
|
+
export declare function createKeyPairHex(seed?: string): IKeyPair;
|
|
14
|
+
export declare function createVerificationKeys(publicKey: string, algo: MethodSpecificIdAlgo, key: TVerificationKey<TVerificationKeyPrefix, number>, network?: CheqdNetwork): IVerificationKeys;
|
|
15
|
+
export declare function createDidVerificationMethod(verificationMethodTypes: VerificationMethods[], verificationKeys: IVerificationKeys[]): VerificationMethod[];
|
|
16
|
+
export declare function createDidPayload(verificationMethods: VerificationMethod[], verificationKeys: IVerificationKeys[]): DIDDocument;
|
|
17
|
+
export declare function validateSpecCompliantPayload(didDocument: DIDDocument): SpecValidationResult;
|
|
18
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,QAAQ,EACR,aAAa,EACb,WAAW,EACX,mBAAmB,EAEnB,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,EACtB,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,oBAAoB,EAEvB,MAAM,SAAS,CAAA;AAOhB,OAAO,EAGH,OAAO,EACV,MAAM,oBAAoB,CAAA;AAQ3B,MAAM,MAAM,qBAAqB,GAAG;IAChC,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,SAAS,CAAA;CAClB,CAAA;AAID,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,EAAE,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,OAAO,CAEvF;AAED,wBAAgB,wCAAwC,CAAC,GAAG,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,GAAG,WAAW,CAuC1I;AAED,wBAAgB,gBAAgB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED,wBAAgB,mBAAmB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,CAM3D;AAED,wBAAgB,gBAAgB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,CAMxD;AAED,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,EAAE,GAAG,EAAE,gBAAgB,CAAC,sBAAsB,EAAE,MAAM,CAAC,EAAE,OAAO,GAAE,YAAmC,GAAG,iBAAiB,CAyB5M;AAED,wBAAgB,2BAA2B,CAAC,uBAAuB,EAAE,mBAAmB,EAAE,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,GAAG,kBAAkB,EAAE,CA8BvJ;AAED,wBAAgB,gBAAgB,CAAC,mBAAmB,EAAE,kBAAkB,EAAE,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,GAAG,WAAW,CAa9H;AAED,wBAAgB,4BAA4B,CAAC,WAAW,EAAE,WAAW,GAAG,oBAAoB,CAsD3F"}
|
package/package.json
CHANGED
|
@@ -1,16 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cheqd/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "A TypeScript SDK built with CosmJS to interact with cheqd network ledger",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Cheqd Foundation Limited (https://github.com/cheqd)",
|
|
7
7
|
"source": "src/index.ts",
|
|
8
|
-
"main": "build/index.js",
|
|
9
|
-
"types": "build/index.d.ts",
|
|
8
|
+
"main": "build/cjs/index.js",
|
|
9
|
+
"types": "build/types/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./build/types/index.d.ts",
|
|
13
|
+
"require": "./build/cjs/index.js",
|
|
14
|
+
"default": "./build/cjs/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./*": {
|
|
17
|
+
"types": "./build/types/*.d.ts",
|
|
18
|
+
"require": "./build/cjs/*.js",
|
|
19
|
+
"default": "./build/cjs/*.js"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
10
22
|
"scripts": {
|
|
11
23
|
"test": "jest --colors --passWithNoTests --maxWorkers 1 --maxConcurrency 1",
|
|
12
|
-
"test:watch": "jest --passWithNoTests --watch",
|
|
13
|
-
"build": "
|
|
24
|
+
"test:watch": "jest --colors --passWithNoTests --maxWorkers 1 --maxConcurrency 1 --watch",
|
|
25
|
+
"build": "rm -rf build && npm run build:types && npm run build:cjs",
|
|
26
|
+
"build:types": "tsc -p tsconfig.types.json",
|
|
27
|
+
"build:cjs": "tsc -p tsconfig.cjs.json"
|
|
14
28
|
},
|
|
15
29
|
"repository": "https://github.com/cheqd/sdk.git",
|
|
16
30
|
"keywords": [
|
|
@@ -25,42 +39,51 @@
|
|
|
25
39
|
"url": "https://github.com/cheqd/sdk/issues"
|
|
26
40
|
},
|
|
27
41
|
"homepage": "https://github.com/cheqd/sdk#readme",
|
|
42
|
+
"files": [
|
|
43
|
+
"build/**/*",
|
|
44
|
+
"LICENSE",
|
|
45
|
+
"package.json",
|
|
46
|
+
"README.md"
|
|
47
|
+
],
|
|
28
48
|
"dependencies": {
|
|
29
|
-
"@cheqd/ts-proto": "^2.
|
|
30
|
-
"@cosmjs/amino": "^0.29.
|
|
31
|
-
"@cosmjs/
|
|
32
|
-
"@cosmjs/
|
|
33
|
-
"@cosmjs/
|
|
34
|
-
"@cosmjs/
|
|
35
|
-
"@cosmjs/
|
|
36
|
-
"@cosmjs/
|
|
49
|
+
"@cheqd/ts-proto": "^2.2.0",
|
|
50
|
+
"@cosmjs/amino": "^0.29.5",
|
|
51
|
+
"@cosmjs/crypto": "^0.29.5",
|
|
52
|
+
"@cosmjs/encoding": "^0.29.5",
|
|
53
|
+
"@cosmjs/math": "^0.29.5",
|
|
54
|
+
"@cosmjs/proto-signing": "^0.29.5",
|
|
55
|
+
"@cosmjs/stargate": "^0.29.5",
|
|
56
|
+
"@cosmjs/tendermint-rpc": "^0.29.5",
|
|
57
|
+
"@cosmjs/utils": "^0.29.5",
|
|
37
58
|
"@stablelib/ed25519": "^1.0.3",
|
|
38
59
|
"cosmjs-types": "^0.5.2",
|
|
39
|
-
"did-jwt": "^6.
|
|
40
|
-
"did-resolver": "^4.0
|
|
41
|
-
"file-type": "^16.5.4",
|
|
60
|
+
"did-jwt": "^6.11.6",
|
|
61
|
+
"did-resolver": "^4.1.0",
|
|
42
62
|
"multiformats": "^9.9.0",
|
|
43
63
|
"uuid": "^9.0.0"
|
|
44
64
|
},
|
|
45
65
|
"devDependencies": {
|
|
46
|
-
"@semantic-release/changelog": "^6.0.
|
|
66
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
47
67
|
"@semantic-release/commit-analyzer": "^9.0.2",
|
|
48
68
|
"@semantic-release/git": "^10.0.1",
|
|
49
|
-
"@semantic-release/github": "^8.0.
|
|
50
|
-
"@semantic-release/npm": "^9.0.
|
|
69
|
+
"@semantic-release/github": "^8.0.7",
|
|
70
|
+
"@semantic-release/npm": "^9.0.2",
|
|
51
71
|
"@semantic-release/release-notes-generator": "^10.0.3",
|
|
52
|
-
"@types/jest": "^29.
|
|
53
|
-
"@types/node": "^18.11
|
|
54
|
-
"@types/uuid": "^
|
|
72
|
+
"@types/jest": "^29.5.0",
|
|
73
|
+
"@types/node": "^18.15.11",
|
|
74
|
+
"@types/uuid": "^9.0.1",
|
|
55
75
|
"conventional-changelog-conventionalcommits": "^5.0.0",
|
|
56
|
-
"jest": "^29.
|
|
57
|
-
"ts-jest": "^29.0
|
|
76
|
+
"jest": "^29.5.0",
|
|
77
|
+
"ts-jest": "^29.1.0",
|
|
58
78
|
"ts-node": "^10.9.1",
|
|
59
|
-
"typescript": "^4.9.
|
|
79
|
+
"typescript": "^4.9.5",
|
|
60
80
|
"uint8arrays": "^3.1.1"
|
|
61
81
|
},
|
|
62
82
|
"publishConfig": {
|
|
63
83
|
"registry": "https://registry.npmjs.org/",
|
|
64
84
|
"access": "public"
|
|
85
|
+
},
|
|
86
|
+
"engines": {
|
|
87
|
+
"node": ">=16.0.0"
|
|
65
88
|
}
|
|
66
89
|
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
name: Bug Report
|
|
2
|
-
description: File a bug report
|
|
3
|
-
title: "[Bug]: "
|
|
4
|
-
labels: ["bug"]
|
|
5
|
-
body:
|
|
6
|
-
- type: textarea
|
|
7
|
-
id: what-happened
|
|
8
|
-
attributes:
|
|
9
|
-
label: What went wrong?
|
|
10
|
-
description: Also tell us, what did you expect to happen?
|
|
11
|
-
placeholder: Tell us more about this potential bug.
|
|
12
|
-
validations:
|
|
13
|
-
required: true
|
|
14
|
-
body:
|
|
15
|
-
- type: textarea
|
|
16
|
-
id: repro
|
|
17
|
-
attributes:
|
|
18
|
-
label: How can we reproduce this bug?
|
|
19
|
-
description: "How do you trigger this bug? Please walk us through it step-by-step."
|
|
20
|
-
value: |
|
|
21
|
-
1.
|
|
22
|
-
2.
|
|
23
|
-
3.
|
|
24
|
-
...
|
|
25
|
-
validations:
|
|
26
|
-
required: true
|
|
27
|
-
- type: dropdown
|
|
28
|
-
id: environment
|
|
29
|
-
attributes:
|
|
30
|
-
label: Environment
|
|
31
|
-
description: What environment does this bug affect?
|
|
32
|
-
options:
|
|
33
|
-
- Mainnet
|
|
34
|
-
- Testnet
|
|
35
|
-
- Both mainnet/testnet
|
|
36
|
-
- Not applicable
|
|
37
|
-
validations:
|
|
38
|
-
required: true
|
|
39
|
-
- type: input
|
|
40
|
-
id: prevalence
|
|
41
|
-
attributes:
|
|
42
|
-
label: Bug prevalence
|
|
43
|
-
description: "How often do you or others encounter this bug?"
|
|
44
|
-
placeholder: "Whenever I visit the user account page (1-2 times a week)"
|
|
45
|
-
- type: dropdown
|
|
46
|
-
id: app-clients
|
|
47
|
-
attributes:
|
|
48
|
-
label: Which browser/client application did you encounter the bug in? (if applicable)
|
|
49
|
-
description: "Tell us what app/client you found the bug in. You can select multiple options if necessary."
|
|
50
|
-
multiple: true
|
|
51
|
-
options:
|
|
52
|
-
- Chrome / Chromium
|
|
53
|
-
- Brave
|
|
54
|
-
- Safari
|
|
55
|
-
- Microsoft Edge
|
|
56
|
-
- Mozilla Firefox
|
|
57
|
-
- API (RPC/REST/gRPC)
|
|
58
|
-
- Keplr/other wallet app
|
|
59
|
-
- Other
|
|
60
|
-
- Not applicable
|
|
61
|
-
- type: textarea
|
|
62
|
-
id: logs
|
|
63
|
-
attributes:
|
|
64
|
-
label: Relevant log output
|
|
65
|
-
description: Please copy-paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
|
|
66
|
-
render: shell
|
|
67
|
-
- type: checkboxes
|
|
68
|
-
id: terms
|
|
69
|
-
attributes:
|
|
70
|
-
label: Code of Conduct
|
|
71
|
-
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/cheqd/.github/blob/main/CODE_OF_CONDUCT.md)
|
|
72
|
-
options:
|
|
73
|
-
- label: I agree to follow this project's Code of Conduct
|
|
74
|
-
required: true
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
blank_issues_enabled: true
|
|
2
|
-
|
|
3
|
-
contact_links:
|
|
4
|
-
- name: System Status
|
|
5
|
-
url: https://status.cheqd.net
|
|
6
|
-
about: System status reporting tool for cheqd services
|
|
7
|
-
|
|
8
|
-
- name: Technical Documentation
|
|
9
|
-
url: https://docs.cheqd.io
|
|
10
|
-
about: Technical Documentation for cheqd projects
|
|
11
|
-
|
|
12
|
-
- name: Community Slack
|
|
13
|
-
url: http://cheqd.link/join-cheqd-slack
|
|
14
|
-
about: Community Slack for Q&A and discussions
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
name: Feature Request
|
|
2
|
-
description: Request a new feature
|
|
3
|
-
title: "[feature]: "
|
|
4
|
-
labels: ["feature-request"]
|
|
5
|
-
body:
|
|
6
|
-
- type: textarea
|
|
7
|
-
id: feature-info
|
|
8
|
-
attributes:
|
|
9
|
-
label: What is the feature you'd like to see?
|
|
10
|
-
description: Also tell what prompted this idea?
|
|
11
|
-
placeholder: I would like to see...
|
|
12
|
-
validations:
|
|
13
|
-
required: true
|
|
14
|
-
- type: textarea
|
|
15
|
-
id: examples
|
|
16
|
-
attributes:
|
|
17
|
-
label: Are there any examples of where similar features are available?
|
|
18
|
-
description: Feel free to provide any links, screenshots, mockups etc that would help illustrate this idea better.
|
|
19
|
-
placeholder: An example of this feature is...
|
|
20
|
-
- type: checkboxes
|
|
21
|
-
id: terms
|
|
22
|
-
attributes:
|
|
23
|
-
label: Code of Conduct
|
|
24
|
-
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/cheqd/.github/blob/main/CODE_OF_CONDUCT.md)
|
|
25
|
-
options:
|
|
26
|
-
- label: I agree to follow this project's Code of Conduct
|
|
27
|
-
required: true
|
package/.github/dependabot.yml
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
#################################
|
|
2
|
-
# GitHub Dependabot Config info #
|
|
3
|
-
#################################
|
|
4
|
-
|
|
5
|
-
version: 2
|
|
6
|
-
updates:
|
|
7
|
-
|
|
8
|
-
# Maintain dependencies for GitHub Actions
|
|
9
|
-
- package-ecosystem: "github-actions"
|
|
10
|
-
directory: "/"
|
|
11
|
-
schedule:
|
|
12
|
-
interval: "weekly"
|
|
13
|
-
|
|
14
|
-
# Maintain dependencies for NPM
|
|
15
|
-
- package-ecosystem: "npm"
|
|
16
|
-
directory: "/"
|
|
17
|
-
schedule:
|
|
18
|
-
interval: "weekly"
|
|
19
|
-
|
|
20
|
-
# Maintain dependencies for Docker
|
|
21
|
-
- package-ecosystem: "docker"
|
|
22
|
-
directory: "/"
|
|
23
|
-
schedule:
|
|
24
|
-
interval: "weekly"
|
|
25
|
-
|
|
26
|
-
# Maintain dependencies for Golang
|
|
27
|
-
- package-ecosystem: "gomod"
|
|
28
|
-
directory: "/"
|
|
29
|
-
schedule:
|
|
30
|
-
interval: "weekly"
|
|
31
|
-
|
|
32
|
-
# Maintain dependencies for Terraform
|
|
33
|
-
- package-ecosystem: "terraform"
|
|
34
|
-
directory: "/"
|
|
35
|
-
schedule:
|
|
36
|
-
interval: "weekly"
|
|
37
|
-
|
|
38
|
-
# Maintain dependencies for Python
|
|
39
|
-
- package-ecosystem: "pip"
|
|
40
|
-
directory: "/"
|
|
41
|
-
schedule:
|
|
42
|
-
interval: "weekly"
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
rules: {
|
|
3
|
-
'type-case': [2, 'always', 'lower-case'],
|
|
4
|
-
'type-empty': [2, 'never'],
|
|
5
|
-
'type-enum': [
|
|
6
|
-
2,
|
|
7
|
-
'always',
|
|
8
|
-
[
|
|
9
|
-
'build',
|
|
10
|
-
'chore',
|
|
11
|
-
'ci',
|
|
12
|
-
'docs',
|
|
13
|
-
'feat',
|
|
14
|
-
'fix',
|
|
15
|
-
'perf',
|
|
16
|
-
'refactor',
|
|
17
|
-
'revert',
|
|
18
|
-
'style',
|
|
19
|
-
'test',
|
|
20
|
-
],
|
|
21
|
-
],
|
|
22
|
-
'scope-case': [2, 'always', 'lower-case'],
|
|
23
|
-
'scope-empty': [1, 'never'],
|
|
24
|
-
'subject-case': [
|
|
25
|
-
2,
|
|
26
|
-
'always',
|
|
27
|
-
['sentence-case'],
|
|
28
|
-
],
|
|
29
|
-
'subject-empty': [1, 'never'],
|
|
30
|
-
'subject-full-stop': [1, 'never', '.'],
|
|
31
|
-
'header-max-length': [2, 'always', 100],
|
|
32
|
-
'body-leading-blank': [1, 'always'],
|
|
33
|
-
'body-max-line-length': [2, 'always', 1000],
|
|
34
|
-
'footer-leading-blank': [1, 'always'],
|
|
35
|
-
'footer-max-line-length': [2, 'always', 100],
|
|
36
|
-
},
|
|
37
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"env": {
|
|
3
|
-
"node": true,
|
|
4
|
-
"jest/globals": true
|
|
5
|
-
},
|
|
6
|
-
"extends": [
|
|
7
|
-
"eslint:recommended",
|
|
8
|
-
"plugin:@typescript-eslint/recommended",
|
|
9
|
-
"plugin:prettier/recommended"
|
|
10
|
-
],
|
|
11
|
-
"parser": "@typescript-eslint/parser",
|
|
12
|
-
"parserOptions": {
|
|
13
|
-
"ecmaVersion": 2018,
|
|
14
|
-
"sourceType": "module"
|
|
15
|
-
},
|
|
16
|
-
"plugins": ["@typescript-eslint", "jest"],
|
|
17
|
-
"rules": {}
|
|
18
|
-
}
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
default: false # includes/excludes all rules by default
|
|
2
|
-
|
|
3
|
-
# Heading levels should only increment by one level at a time <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md001>
|
|
4
|
-
MD001: true
|
|
5
|
-
|
|
6
|
-
# Heading style <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md003>
|
|
7
|
-
MD003:
|
|
8
|
-
style: 'consistent'
|
|
9
|
-
|
|
10
|
-
# Unordered list style <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md004>
|
|
11
|
-
MD004:
|
|
12
|
-
style: 'consistent'
|
|
13
|
-
|
|
14
|
-
# Inconsistent indentation for list items at the same level <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md005>
|
|
15
|
-
MD005: true
|
|
16
|
-
|
|
17
|
-
# Consider starting bulleted lists at the beginning of the line <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md006>
|
|
18
|
-
MD006: true
|
|
19
|
-
|
|
20
|
-
# Unordered list indentation <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md007>
|
|
21
|
-
MD007: false
|
|
22
|
-
|
|
23
|
-
# Trailing spaces <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md009>
|
|
24
|
-
MD009: true
|
|
25
|
-
|
|
26
|
-
# Hard tabs <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md010>
|
|
27
|
-
MD010: false
|
|
28
|
-
|
|
29
|
-
# Reversed link syntax <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md011>
|
|
30
|
-
MD011: true
|
|
31
|
-
|
|
32
|
-
# Multiple consecutive blank lines <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md012>
|
|
33
|
-
MD012:
|
|
34
|
-
maximum: 2
|
|
35
|
-
|
|
36
|
-
# Line length <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md013>
|
|
37
|
-
MD013: false
|
|
38
|
-
|
|
39
|
-
# Dollar signs used before commands without showing output <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md014>
|
|
40
|
-
MD014: true
|
|
41
|
-
|
|
42
|
-
# No space after hash on atx style heading <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md018>
|
|
43
|
-
MD018: true
|
|
44
|
-
|
|
45
|
-
# Multiple spaces after hash on atx style heading <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md019>
|
|
46
|
-
MD019: true
|
|
47
|
-
|
|
48
|
-
# No space inside hashes on closed atx style heading <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md020>
|
|
49
|
-
MD020: true
|
|
50
|
-
|
|
51
|
-
# Multiple spaces inside hashes on closed atx style heading <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md021>
|
|
52
|
-
MD021: true
|
|
53
|
-
|
|
54
|
-
# Headings should be surrounded by blank lines <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md022>
|
|
55
|
-
MD022: true
|
|
56
|
-
|
|
57
|
-
# Headings must start at the beginning of the line <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md023>
|
|
58
|
-
MD023: true
|
|
59
|
-
|
|
60
|
-
# Multiple headings with the same content <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md024>
|
|
61
|
-
MD024:
|
|
62
|
-
allow_different_nesting: true
|
|
63
|
-
|
|
64
|
-
# Multiple top level headings in the same document <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md025>
|
|
65
|
-
MD025: false
|
|
66
|
-
|
|
67
|
-
# Trailing punctuation in heading <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md026>
|
|
68
|
-
MD026: true
|
|
69
|
-
|
|
70
|
-
# Multiple spaces after blockquote symbol <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md027>
|
|
71
|
-
MD027: true
|
|
72
|
-
|
|
73
|
-
# Blank line inside blockquote <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md028>
|
|
74
|
-
MD028: false
|
|
75
|
-
|
|
76
|
-
# Ordered list item prefix <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md029>
|
|
77
|
-
MD029:
|
|
78
|
-
style: 'one_or_ordered'
|
|
79
|
-
|
|
80
|
-
# Spaces after list markers <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md030>
|
|
81
|
-
MD030: true
|
|
82
|
-
|
|
83
|
-
# Fenced code blocks should be surrounded by blank lines <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md031>
|
|
84
|
-
MD031: true
|
|
85
|
-
|
|
86
|
-
# Lists should be surrounded by blank lines <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md032>
|
|
87
|
-
MD032: true
|
|
88
|
-
|
|
89
|
-
# Inline HTML <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md033>
|
|
90
|
-
MD033:
|
|
91
|
-
allowed_elements: ['a']
|
|
92
|
-
|
|
93
|
-
# Bare URL used <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md034>
|
|
94
|
-
MD034: true
|
|
95
|
-
|
|
96
|
-
# Horizontal rule style <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md035>
|
|
97
|
-
MD035:
|
|
98
|
-
style: 'consistent'
|
|
99
|
-
|
|
100
|
-
# Emphasis used instead of a heading <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md036>
|
|
101
|
-
MD036: true
|
|
102
|
-
|
|
103
|
-
# Spaces inside emphasis markers <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md037>
|
|
104
|
-
MD037: true
|
|
105
|
-
|
|
106
|
-
# Spaces inside code span elements <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md038>
|
|
107
|
-
MD038: true
|
|
108
|
-
|
|
109
|
-
# Spaces inside link text <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md039>
|
|
110
|
-
MD039: true
|
|
111
|
-
|
|
112
|
-
# Fenced code blocks should have a language specified <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md040>
|
|
113
|
-
MD040: true
|
|
114
|
-
|
|
115
|
-
# First line in file should be a top level heading <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md041>
|
|
116
|
-
MD041: true
|
|
117
|
-
|
|
118
|
-
# No empty links <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md042>
|
|
119
|
-
MD042: true
|
|
120
|
-
|
|
121
|
-
# Required heading structure <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md043>
|
|
122
|
-
MD043: false
|
|
123
|
-
|
|
124
|
-
# Proper names should have the correct capitalization <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md044>
|
|
125
|
-
MD044: false
|
|
126
|
-
|
|
127
|
-
# Images should have alternate text (alt text) <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md045>
|
|
128
|
-
MD045: true
|
|
129
|
-
|
|
130
|
-
# Code block style <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md046>
|
|
131
|
-
MD046:
|
|
132
|
-
style: 'consistent'
|
|
133
|
-
|
|
134
|
-
# Files should end with a single newline character <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md047>
|
|
135
|
-
MD047: true
|
|
136
|
-
|
|
137
|
-
# Code fence style <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md048>
|
|
138
|
-
MD048:
|
|
139
|
-
style: 'consistent'
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
name: "Build & Test"
|
|
2
|
-
on:
|
|
3
|
-
workflow_call:
|
|
4
|
-
defaults:
|
|
5
|
-
run:
|
|
6
|
-
shell: bash
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
build:
|
|
10
|
-
name: "Build Node.js"
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v3
|
|
15
|
-
|
|
16
|
-
- uses: actions/setup-node@v3
|
|
17
|
-
with:
|
|
18
|
-
node-version: 18
|
|
19
|
-
cache: 'npm'
|
|
20
|
-
cache-dependency-path: '**/package-lock.json'
|
|
21
|
-
|
|
22
|
-
- name: "Clean install dependencies"
|
|
23
|
-
run: npm ci
|
|
24
|
-
|
|
25
|
-
- name: "Run npm build"
|
|
26
|
-
run: npm run build
|
|
27
|
-
|
|
28
|
-
# - name: "Run npm test"
|
|
29
|
-
# run: npm test
|
|
30
|
-
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
name: "Cleanup - Actions"
|
|
2
|
-
on:
|
|
3
|
-
workflow_dispatch:
|
|
4
|
-
inputs:
|
|
5
|
-
days:
|
|
6
|
-
description: 'Retain days'
|
|
7
|
-
required: true
|
|
8
|
-
type: string
|
|
9
|
-
default: 30
|
|
10
|
-
minimum_runs:
|
|
11
|
-
description: 'Minimum runs to keep for each workflow'
|
|
12
|
-
required: true
|
|
13
|
-
type: string
|
|
14
|
-
default: 0
|
|
15
|
-
delete_workflow_pattern:
|
|
16
|
-
description: 'Name/filename of workflow. Default is all.'
|
|
17
|
-
required: false
|
|
18
|
-
type: string
|
|
19
|
-
delete_workflow_by_state_pattern:
|
|
20
|
-
description: 'Remove workflow by state: active, deleted, disabled_fork, disabled_inactivity, disabled_manually'
|
|
21
|
-
required: true
|
|
22
|
-
default: All
|
|
23
|
-
type: choice
|
|
24
|
-
options:
|
|
25
|
-
- All
|
|
26
|
-
- active
|
|
27
|
-
- deleted
|
|
28
|
-
- disabled_inactivity
|
|
29
|
-
- disabled_manually
|
|
30
|
-
|
|
31
|
-
jobs:
|
|
32
|
-
|
|
33
|
-
delete-runs:
|
|
34
|
-
name: "Delete old workflow runs"
|
|
35
|
-
runs-on: ubuntu-latest
|
|
36
|
-
|
|
37
|
-
steps:
|
|
38
|
-
- uses: Mattraks/delete-workflow-runs@v2
|
|
39
|
-
with:
|
|
40
|
-
token: ${{ github.token }}
|
|
41
|
-
repository: ${{ github.repository }}
|
|
42
|
-
retain_days: ${{ github.event.inputs.days }}
|
|
43
|
-
keep_minimum_runs: ${{ github.event.inputs.minimum_runs }}
|
|
44
|
-
delete_workflow_pattern: ${{ github.event.inputs.delete_workflow_pattern }}
|
|
45
|
-
delete_workflow_by_state_pattern: ${{ github.event.inputs.delete_workflow_by_state_pattern }}
|