@cheqd/sdk 5.1.0-develop.5 → 5.1.0-develop.7

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.
@@ -24,7 +24,7 @@ export declare function createDidVerificationMethod(verificationMethodTypes: Ver
24
24
  export declare function createDidPayload(verificationMethods: VerificationMethod[], verificationKeys: IVerificationKeys[]): DIDDocument;
25
25
  export declare function validateSpecCompliantPayload(didDocument: DIDDocument): SpecValidationResult;
26
26
  export declare function createCosmosPayerWallet(cosmosPayerSeed: string): Promise<DirectSecp256k1HdWallet | DirectSecp256k1Wallet>;
27
- export declare function toMultibaseRaw(key: Uint8Array): import("multiformats-cjs/bases/base").Multibase<"z">;
27
+ export declare function toMultibaseRaw(key: Uint8Array): import("multiformats/bases/base").Multibase<"z">;
28
28
  export declare function createMsgCreateDidDocPayloadToSign(didPayload: DIDDocument, versionId: string): Promise<Uint8Array<ArrayBufferLike>>;
29
29
  export declare const createMsgUpdateDidDocPayloadToSign: typeof createMsgCreateDidDocPayloadToSign;
30
30
  export declare function createMsgDeactivateDidDocPayloadToSign(didPayload: DIDDocument, versionId?: string): Uint8Array<ArrayBufferLike>;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../cjs/src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,QAAQ,EACR,aAAa,EACb,WAAW,EACX,mBAAmB,EAEnB,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,EACtB,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,oBAAoB,EAEpB,MAAM,SAAS,CAAC;AAIjB,OAAO,EAA4C,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC3F,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAC3F,OAAO,EAAE,eAAe,IAAI,CAAC,EAAU,MAAM,oBAAoB,CAAC;AAWlE,OAAO,EAAE,wBAAwB,EAA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  "description": "A TypeScript SDK built with CosmJS to interact with the cheqd network ledger",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Cheqd Foundation Limited (https://github.com/cheqd)",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "scripts": {
24
24
  "clean": "rm -rf node_modules && rm -rf esm/node_modules && rm -rf cjs/node_modules && rm -f package-lock.json",
25
- "build": "rm -rf build && npm run build:esm && npm run build:cjs && npm run build:types && cp preinstall.js build/preinstall.js && cp preinstall.js build/esm/preinstall.js && cp preinstall.js build/cjs/preinstall.js",
25
+ "build": "rm -rf build && npm run build:esm && npm run build:cjs && npm run build:types",
26
26
  "build:esm": "cd esm && tsc -p tsconfig.json && cp package.json ../build/esm/package.json",
27
27
  "build:cjs": "cd cjs && tsc -p tsconfig.json && cp package.json ../build/cjs/package.json",
28
28
  "build:types": "cd esm && tsc -p tsconfig.types.json",
@@ -30,7 +30,7 @@
30
30
  "test:esm": "cd esm && npm test",
31
31
  "test:cjs": "cd cjs && npm test",
32
32
  "format": "prettier --write '**/*.{js,ts,cjs,mjs,json}'",
33
- "preinstall": "node preinstall.js"
33
+ "prepare": "husky"
34
34
  },
35
35
  "workspaces": [
36
36
  "esm",
@@ -65,11 +65,19 @@
65
65
  "@semantic-release/release-notes-generator": "^12.1.0",
66
66
  "@types/jest": "^29.5.12",
67
67
  "conventional-changelog-conventionalcommits": "^7.0.2",
68
+ "husky": "^9.1.7",
68
69
  "jest": "^29.7.0",
69
70
  "prettier": "^3.3.3",
70
71
  "semantic-release": "^22.0.12",
71
72
  "ts-jest": "^29.2.5",
72
- "typescript": "^5.5.4"
73
+ "typescript": "^5.5.4",
74
+ "@types/node": "^20.16.5",
75
+ "@types/uuid": "^10.0.0",
76
+ "cross-env": "^7.0.3",
77
+ "uint8arrays": "^5.1.0",
78
+ "@types/node-cjs": "npm:@types/node@^18.19.47",
79
+ "@types/uuid-cjs": "npm:@types/uuid@^10.0.0",
80
+ "uint8arrays-cjs": "npm:uint8arrays@^3.1.1"
73
81
  },
74
82
  "publishConfig": {
75
83
  "registry": "https://registry.npmjs.org/",
@@ -77,43 +85,43 @@
77
85
  },
78
86
  "dependencies": {
79
87
  "@cheqd/ts-proto": "^4.0.0",
80
- "@cosmjs/amino": "^0.32.4",
81
- "@cosmjs/crypto": "^0.32.4",
82
- "@cosmjs/encoding": "^0.32.4",
83
- "@cosmjs/math": "^0.32.4",
84
- "@cosmjs/proto-signing": "^0.32.4",
85
- "@cosmjs/stargate": "^0.32.4",
86
- "@cosmjs/tendermint-rpc": "^0.32.4",
87
- "@cosmjs/utils": "^0.32.4",
88
- "@stablelib/ed25519": "^1.0.3",
89
- "@types/secp256k1": "^4.0.6",
90
- "cosmjs-types": "^0.9.0",
91
- "did-jwt": "^8.0.4",
92
- "did-resolver": "^4.1.0",
93
- "exponential-backoff": "^3.1.1",
94
- "file-type": "^19.5.0",
95
- "multiformats": "^13.3.0",
96
- "secp256k1": "^5.0.0",
97
- "uuid": "^10.0.0",
98
88
  "@cheqd/ts-proto-cjs": "npm:@cheqd/ts-proto@~2.4.0",
89
+ "@cosmjs/amino": "^0.32.4",
99
90
  "@cosmjs/amino-cjs": "npm:@cosmjs/amino@~0.30.1",
91
+ "@cosmjs/crypto": "^0.32.4",
100
92
  "@cosmjs/crypto-cjs": "npm:@cosmjs/crypto@~0.30.1",
93
+ "@cosmjs/encoding": "^0.32.4",
101
94
  "@cosmjs/encoding-cjs": "npm:@cosmjs/encoding@~0.30.1",
95
+ "@cosmjs/math": "^0.32.4",
102
96
  "@cosmjs/math-cjs": "npm:@cosmjs/math@~0.30.1",
97
+ "@cosmjs/proto-signing": "^0.32.4",
103
98
  "@cosmjs/proto-signing-cjs": "npm:@cosmjs/proto-signing@~0.30.1",
99
+ "@cosmjs/stargate": "^0.32.4",
104
100
  "@cosmjs/stargate-cjs": "npm:@cosmjs/stargate@~0.30.1",
101
+ "@cosmjs/tendermint-rpc": "^0.32.4",
105
102
  "@cosmjs/tendermint-rpc-cjs": "npm:@cosmjs/tendermint-rpc@~0.30.1",
103
+ "@cosmjs/utils": "^0.32.4",
106
104
  "@cosmjs/utils-cjs": "npm:@cosmjs/utils@~0.30.1",
105
+ "@stablelib/ed25519": "^1.0.3",
107
106
  "@stablelib/ed25519-cjs": "npm:@stablelib/ed25519@^1.0.3",
107
+ "@types/secp256k1": "^4.0.6",
108
108
  "@types/secp256k1-cjs": "npm:@types/secp256k1@^4.0.6",
109
+ "cosmjs-types": "^0.9.0",
109
110
  "cosmjs-types-cjs": "npm:cosmjs-types@^0.7.2",
111
+ "did-jwt": "^8.0.4",
110
112
  "did-jwt-cjs": "npm:did-jwt@^8.0.4",
113
+ "did-resolver": "^4.1.0",
111
114
  "did-resolver-cjs": "npm:did-resolver@^4.1.0",
115
+ "exponential-backoff": "^3.1.1",
112
116
  "exponential-backoff-cjs": "npm:exponential-backoff@^3.1.1",
117
+ "file-type": "^19.5.0",
113
118
  "file-type-cjs": "npm:file-type@^16.5.4",
114
119
  "long-cjs": "npm:long@^4.0.0",
120
+ "multiformats": "^13.3.0",
115
121
  "multiformats-cjs": "npm:multiformats@^9.9.0",
122
+ "secp256k1": "^5.0.0",
116
123
  "secp256k1-cjs": "npm:secp256k1@^5.0.0",
124
+ "uuid": "^10.0.0",
117
125
  "uuid-cjs": "npm:uuid@^10.0.0"
118
126
  }
119
- }
127
+ }
@@ -1,24 +0,0 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
-
4
- const rootPackageJsonPath = path.resolve(__dirname, 'package.json');
5
- const esmPackageJsonPath = path.resolve(__dirname, 'esm', 'package.json');
6
- const cjsPackageJsonPath = path.resolve(__dirname, 'cjs', 'package.json');
7
-
8
- function addSuffixedDependencies(packageJsonPath, suffix = '') {
9
- const rootPackageJson = JSON.parse(fs.readFileSync(rootPackageJsonPath, 'utf-8'));
10
- const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
11
- const dependencies = packageJson.dependencies || {};
12
-
13
- rootPackageJson.dependencies = rootPackageJson.dependencies || {};
14
-
15
- for (const [dep, version] of Object.entries(dependencies)) {
16
- const suffixedDep = suffix ? `${dep}${suffix}` : dep;
17
- rootPackageJson.dependencies[suffixedDep] = suffix ? `npm:${dep}@${version}` : version;
18
- }
19
-
20
- fs.writeFileSync(rootPackageJsonPath, JSON.stringify(rootPackageJson, null, 4));
21
- }
22
-
23
- addSuffixedDependencies(esmPackageJsonPath);
24
- addSuffixedDependencies(cjsPackageJsonPath, '-cjs');
@@ -1,24 +0,0 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
-
4
- const rootPackageJsonPath = path.resolve(__dirname, 'package.json');
5
- const esmPackageJsonPath = path.resolve(__dirname, 'esm', 'package.json');
6
- const cjsPackageJsonPath = path.resolve(__dirname, 'cjs', 'package.json');
7
-
8
- function addSuffixedDependencies(packageJsonPath, suffix = '') {
9
- const rootPackageJson = JSON.parse(fs.readFileSync(rootPackageJsonPath, 'utf-8'));
10
- const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
11
- const dependencies = packageJson.dependencies || {};
12
-
13
- rootPackageJson.dependencies = rootPackageJson.dependencies || {};
14
-
15
- for (const [dep, version] of Object.entries(dependencies)) {
16
- const suffixedDep = suffix ? `${dep}${suffix}` : dep;
17
- rootPackageJson.dependencies[suffixedDep] = suffix ? `npm:${dep}@${version}` : version;
18
- }
19
-
20
- fs.writeFileSync(rootPackageJsonPath, JSON.stringify(rootPackageJson, null, 4));
21
- }
22
-
23
- addSuffixedDependencies(esmPackageJsonPath);
24
- addSuffixedDependencies(cjsPackageJsonPath, '-cjs');
@@ -1,24 +0,0 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
-
4
- const rootPackageJsonPath = path.resolve(__dirname, 'package.json');
5
- const esmPackageJsonPath = path.resolve(__dirname, 'esm', 'package.json');
6
- const cjsPackageJsonPath = path.resolve(__dirname, 'cjs', 'package.json');
7
-
8
- function addSuffixedDependencies(packageJsonPath, suffix = '') {
9
- const rootPackageJson = JSON.parse(fs.readFileSync(rootPackageJsonPath, 'utf-8'));
10
- const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
11
- const dependencies = packageJson.dependencies || {};
12
-
13
- rootPackageJson.dependencies = rootPackageJson.dependencies || {};
14
-
15
- for (const [dep, version] of Object.entries(dependencies)) {
16
- const suffixedDep = suffix ? `${dep}${suffix}` : dep;
17
- rootPackageJson.dependencies[suffixedDep] = suffix ? `npm:${dep}@${version}` : version;
18
- }
19
-
20
- fs.writeFileSync(rootPackageJsonPath, JSON.stringify(rootPackageJson, null, 4));
21
- }
22
-
23
- addSuffixedDependencies(esmPackageJsonPath);
24
- addSuffixedDependencies(cjsPackageJsonPath, '-cjs');
package/preinstall.js DELETED
@@ -1,24 +0,0 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
-
4
- const rootPackageJsonPath = path.resolve(__dirname, 'package.json');
5
- const esmPackageJsonPath = path.resolve(__dirname, 'esm', 'package.json');
6
- const cjsPackageJsonPath = path.resolve(__dirname, 'cjs', 'package.json');
7
-
8
- function addSuffixedDependencies(packageJsonPath, suffix = '') {
9
- const rootPackageJson = JSON.parse(fs.readFileSync(rootPackageJsonPath, 'utf-8'));
10
- const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
11
- const dependencies = packageJson.dependencies || {};
12
-
13
- rootPackageJson.dependencies = rootPackageJson.dependencies || {};
14
-
15
- for (const [dep, version] of Object.entries(dependencies)) {
16
- const suffixedDep = suffix ? `${dep}${suffix}` : dep;
17
- rootPackageJson.dependencies[suffixedDep] = suffix ? `npm:${dep}@${version}` : version;
18
- }
19
-
20
- fs.writeFileSync(rootPackageJsonPath, JSON.stringify(rootPackageJson, null, 4));
21
- }
22
-
23
- addSuffixedDependencies(esmPackageJsonPath);
24
- addSuffixedDependencies(cjsPackageJsonPath, '-cjs');