@cheqd/sdk 1.4.0-develop.1 → 1.4.0-develop.3
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/.github/linters/mlc_config.json +11 -1
- package/.github/workflows/build.yml +1 -1
- package/.github/workflows/cleanup-actions.yml +45 -0
- package/.github/workflows/cleanup-cache-automatic.yml +24 -0
- package/.github/workflows/cleanup-cache-manual.yml +21 -0
- package/.github/workflows/lint.yml +0 -2
- package/.github/workflows/release.yml +2 -2
- package/CHANGELOG.md +19 -3
- package/package.json +20 -20
- package/tests/modules/did.test.ts +1 -1
- package/tests/modules/resource.test.ts +1 -2
- package/tsconfig.json +1 -1
|
@@ -0,0 +1,45 @@
|
|
|
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 }}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: "Cache Cleanup - Automatic"
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
types:
|
|
5
|
+
- closed
|
|
6
|
+
defaults:
|
|
7
|
+
run:
|
|
8
|
+
shell: bash
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
|
|
13
|
+
cache-purge:
|
|
14
|
+
name: "Purge Actions cache"
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
|
|
19
|
+
- name: "Delete Branch Cache Action"
|
|
20
|
+
uses: snnaplab/delete-branch-cache-action@v1.0.0
|
|
21
|
+
with:
|
|
22
|
+
# Specify explicitly because the ref at the time of merging will be a branch name such as 'main', 'develop'
|
|
23
|
+
ref: refs/pull/${{ github.event.number }}/merge
|
|
24
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: "Cache Cleanup - Manual"
|
|
2
|
+
on:
|
|
3
|
+
workflow_dispatch:
|
|
4
|
+
inputs:
|
|
5
|
+
dry-run:
|
|
6
|
+
description: "Dry run only?"
|
|
7
|
+
required: true
|
|
8
|
+
type: boolean
|
|
9
|
+
default: false
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
|
|
13
|
+
delete-caches:
|
|
14
|
+
name: "Delete Actions caches"
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- name: "Wipe Github Actions cache"
|
|
19
|
+
uses: easimon/wipe-cache@v1
|
|
20
|
+
with:
|
|
21
|
+
dry-run: ${{ github.event.inputs.dry-run }}
|
|
@@ -18,13 +18,13 @@ jobs:
|
|
|
18
18
|
|
|
19
19
|
- uses: actions/setup-node@v3
|
|
20
20
|
with:
|
|
21
|
-
node-version:
|
|
21
|
+
node-version: 18
|
|
22
22
|
cache: 'npm'
|
|
23
23
|
cache-dependency-path: '**/package-lock.json'
|
|
24
24
|
|
|
25
25
|
- name: "Obtain Github App token"
|
|
26
26
|
id: app-token
|
|
27
|
-
uses: getsentry/action-github-app-token@
|
|
27
|
+
uses: getsentry/action-github-app-token@v2.0.0
|
|
28
28
|
with:
|
|
29
29
|
app_id: ${{ secrets.BOT_APP_ID }}
|
|
30
30
|
private_key: ${{ secrets.BOT_APP_PRIVATE_KEY }}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [1.4.0-develop.
|
|
3
|
+
## [1.4.0-develop.3](https://github.com/cheqd/sdk/compare/1.4.0-develop.2...1.4.0-develop.3) (2022-11-08)
|
|
4
4
|
|
|
5
|
+
## [1.4.0-develop.2](https://github.com/cheqd/sdk/compare/1.4.0-develop.1...1.4.0-develop.2) (2022-11-01)
|
|
5
6
|
|
|
6
|
-
###
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
* **deps:** Downgraded `uint8arrays` due to export config clash ([2e30906](https://github.com/cheqd/sdk/commit/2e3090624e505b666b038828f3453753fd887b58))
|
|
10
|
+
* **deps:** Fixed imports deriving from bumps ([2cccc75](https://github.com/cheqd/sdk/commit/2cccc75090543fec8aff222ba3b19db9afc14b6a))
|
|
11
|
+
|
|
12
|
+
## [1.3.13](https://github.com/cheqd/sdk/compare/1.3.12...1.3.13) (2022-11-08)
|
|
13
|
+
|
|
14
|
+
## [1.3.12](https://github.com/cheqd/sdk/compare/1.3.11...1.3.12) (2022-10-31)
|
|
15
|
+
|
|
16
|
+
## [1.3.11](https://github.com/cheqd/sdk/compare/1.3.10...1.3.11) (2022-10-31)
|
|
17
|
+
|
|
18
|
+
## [1.3.10](https://github.com/cheqd/sdk/compare/1.3.9...1.3.10) (2022-10-27)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
7
22
|
|
|
8
|
-
*
|
|
23
|
+
* **deps:** Downgraded `uint8arrays` due to export config clash ([2e30906](https://github.com/cheqd/sdk/commit/2e3090624e505b666b038828f3453753fd887b58))
|
|
24
|
+
* **deps:** Fixed imports deriving from bumps ([2cccc75](https://github.com/cheqd/sdk/commit/2cccc75090543fec8aff222ba3b19db9afc14b6a))
|
|
9
25
|
|
|
10
26
|
## [1.3.9](https://github.com/cheqd/sdk/compare/1.3.8...1.3.9) (2022-10-26)
|
|
11
27
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cheqd/sdk",
|
|
3
|
-
"version": "1.4.0-develop.
|
|
3
|
+
"version": "1.4.0-develop.3",
|
|
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)",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"main": "build/index.js",
|
|
9
9
|
"types": "build/index.d.ts",
|
|
10
10
|
"scripts": {
|
|
11
|
-
"test": "jest --passWithNoTests --maxWorkers 1 --
|
|
11
|
+
"test": "jest --passWithNoTests --maxWorkers 1 --maxConcurrency 1",
|
|
12
12
|
"test:watch": "jest --passWithNoTests --watch",
|
|
13
13
|
"build": "tsc"
|
|
14
14
|
},
|
|
@@ -25,24 +25,8 @@
|
|
|
25
25
|
"url": "https://github.com/cheqd/sdk/issues"
|
|
26
26
|
},
|
|
27
27
|
"homepage": "https://github.com/cheqd/sdk#readme",
|
|
28
|
-
"devDependencies": {
|
|
29
|
-
"@semantic-release/changelog": "^6.0.1",
|
|
30
|
-
"@semantic-release/commit-analyzer": "^9.0.2",
|
|
31
|
-
"@semantic-release/git": "^10.0.1",
|
|
32
|
-
"@semantic-release/github": "^8.0.6",
|
|
33
|
-
"@semantic-release/npm": "^9.0.1",
|
|
34
|
-
"@semantic-release/release-notes-generator": "^10.0.3",
|
|
35
|
-
"@types/jest": "^28.1.8",
|
|
36
|
-
"@types/node": "^18.11.5",
|
|
37
|
-
"@types/uuid": "^8.3.4",
|
|
38
|
-
"conventional-changelog-conventionalcommits": "^5.0.0",
|
|
39
|
-
"jest": "^28.1.3",
|
|
40
|
-
"ts-jest": "^28.0.8",
|
|
41
|
-
"ts-node": "^10.9.1",
|
|
42
|
-
"typescript": "^4.8.4"
|
|
43
|
-
},
|
|
44
28
|
"dependencies": {
|
|
45
|
-
"@cheqd/ts-proto": "^1.0.
|
|
29
|
+
"@cheqd/ts-proto": "^1.0.15",
|
|
46
30
|
"@cosmjs/amino": "^0.29.3",
|
|
47
31
|
"@cosmjs/encoding": "^0.29.3",
|
|
48
32
|
"@cosmjs/math": "^0.29.3",
|
|
@@ -54,9 +38,25 @@
|
|
|
54
38
|
"cosmjs-types": "^0.5.2",
|
|
55
39
|
"did-jwt": "^6.9.0",
|
|
56
40
|
"multiformats": "^9.9.0",
|
|
57
|
-
"uint8arrays": "^3.1.1",
|
|
58
41
|
"uuid": "^9.0.0"
|
|
59
42
|
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@semantic-release/changelog": "^6.0.1",
|
|
45
|
+
"@semantic-release/commit-analyzer": "^9.0.2",
|
|
46
|
+
"@semantic-release/git": "^10.0.1",
|
|
47
|
+
"@semantic-release/github": "^8.0.6",
|
|
48
|
+
"@semantic-release/npm": "^9.0.1",
|
|
49
|
+
"@semantic-release/release-notes-generator": "^10.0.3",
|
|
50
|
+
"@types/jest": "^29.2.2",
|
|
51
|
+
"@types/node": "^18.11.9",
|
|
52
|
+
"@types/uuid": "^8.3.4",
|
|
53
|
+
"conventional-changelog-conventionalcommits": "^5.0.0",
|
|
54
|
+
"jest": "^29.3.0",
|
|
55
|
+
"ts-jest": "^29.0.3",
|
|
56
|
+
"ts-node": "^10.9.1",
|
|
57
|
+
"typescript": "^4.8.4",
|
|
58
|
+
"uint8arrays": "^3.1.1"
|
|
59
|
+
},
|
|
60
60
|
"publishConfig": {
|
|
61
61
|
"registry": "https://registry.npmjs.org/",
|
|
62
62
|
"access": "public"
|
|
@@ -8,7 +8,7 @@ import { CheqdSigningStargateClient } from "../../src/signer"
|
|
|
8
8
|
import { DidStdFee, ISignInputs, MethodSpecificIdAlgo, VerificationMethods } from "../../src/types"
|
|
9
9
|
import { createDidPayload, createDidVerificationMethod, createKeyPairBase64, createVerificationKeys, exampleCheqdNetwork, faucet } from "../testutils.test"
|
|
10
10
|
|
|
11
|
-
const defaultAsyncTxTimeout =
|
|
11
|
+
const defaultAsyncTxTimeout = 30000
|
|
12
12
|
|
|
13
13
|
describe('DIDModule', () => {
|
|
14
14
|
describe('constructor', () => {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DirectSecp256k1HdWallet, GeneratedType } from "@cosmjs/proto-signing"
|
|
2
2
|
import { DeliverTxResponse } from "@cosmjs/stargate"
|
|
3
|
-
import { sign } from "@stablelib/ed25519"
|
|
4
3
|
import { fromString, toString } from 'uint8arrays'
|
|
5
4
|
import { DIDModule, ResourceModule } from "../../src"
|
|
6
5
|
import { createDefaultCheqdRegistry } from "../../src/registry"
|
|
@@ -10,7 +9,7 @@ import { createDidPayload, createDidVerificationMethod, createKeyPairBase64, cre
|
|
|
10
9
|
import { MsgCreateResourcePayload } from '@cheqd/ts-proto/resource/v1/tx';
|
|
11
10
|
import { randomUUID } from "crypto"
|
|
12
11
|
|
|
13
|
-
const defaultAsyncTxTimeout =
|
|
12
|
+
const defaultAsyncTxTimeout = 30000
|
|
14
13
|
|
|
15
14
|
describe('ResourceModule', () => {
|
|
16
15
|
describe('constructor', () => {
|
package/tsconfig.json
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
// "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
|
|
43
43
|
|
|
44
44
|
/* Module Resolution Options */
|
|
45
|
-
|
|
45
|
+
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
|
46
46
|
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
|
47
47
|
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
|
48
48
|
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|