@gvnrdao/dh-sdk 0.0.166 → 0.0.205
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/LICENSE +21 -0
- package/README.md +86 -5
- package/browser/dist/397.browser.js +1 -1
- package/browser/dist/833.browser.js +1 -1
- package/browser/dist/browser.js +1 -13
- package/browser/dist/browser.js.LICENSE.txt +1 -70
- package/browser/dist/index.d.ts +3 -4
- package/browser/dist/index.d.ts.map +1 -1
- package/browser/dist/index.js +4 -3
- package/dist/constants/chunks/contract-abis.d.ts +7 -0
- package/dist/constants/chunks/deployment-addresses.d.ts +68 -0
- package/dist/constants/chunks/encrypted-provider-params.d.ts +21 -0
- package/dist/constants/chunks/environment.browser.d.ts +45 -0
- package/dist/constants/chunks/environment.d.ts +57 -0
- package/dist/constants/chunks/network-configs.d.ts +65 -0
- package/dist/constants/chunks/sdk-config.d.ts +33 -0
- package/dist/constants/chunks/sdk-limits.d.ts +66 -0
- package/dist/constants/index.d.ts +15 -0
- package/dist/graphs/client.d.ts +19 -0
- package/dist/graphs/diamond-hands.d.ts +248 -0
- package/dist/index.d.ts +47 -7391
- package/dist/index.js +4525 -16860
- package/dist/index.mjs +4489 -16801
- package/dist/interfaces/chunks/btc.i.d.ts +36 -0
- package/dist/interfaces/chunks/config.i.d.ts +250 -0
- package/dist/interfaces/chunks/contract-interactions.i.d.ts +64 -0
- package/dist/interfaces/chunks/contract-types.i.d.ts +165 -0
- package/dist/interfaces/chunks/lit-actions-results.i.d.ts +165 -0
- package/dist/interfaces/chunks/lit-actions.i.d.ts +98 -0
- package/dist/interfaces/chunks/loan-operations.i.d.ts +332 -0
- package/dist/interfaces/chunks/pkp-integration.i.d.ts +87 -0
- package/dist/interfaces/chunks/position-query.i.d.ts +76 -0
- package/dist/interfaces/chunks/requests.i.d.ts +55 -0
- package/dist/interfaces/chunks/ucd-minting.i.d.ts +34 -0
- package/dist/interfaces/chunks/utility.i.d.ts +64 -0
- package/dist/interfaces/index.d.ts +17 -0
- package/dist/modules/bitcoin/bitcoin-operations.module.d.ts +223 -0
- package/dist/modules/cache/cache-manager.module.d.ts +92 -0
- package/dist/modules/contract/contract-manager.module.d.ts +136 -0
- package/dist/modules/diamond-hands-sdk.d.ts +669 -0
- package/dist/modules/loan/loan-creator.module.d.ts +143 -0
- package/dist/modules/loan/loan-query.module.d.ts +206 -0
- package/dist/modules/mock/mock-token-manager.module.d.ts +83 -0
- package/dist/modules/pkp/pkp-manager.module.d.ts +136 -0
- package/dist/protocol/protocol-pause.d.ts +19 -0
- package/dist/server.d.ts +17 -0
- package/dist/server.js +285 -0
- package/dist/server.mjs +242 -0
- package/dist/types/authorization-params.d.ts +160 -0
- package/dist/types/branded/domain-values.d.ts +138 -0
- package/dist/types/branded/ids.d.ts +23 -0
- package/dist/types/event-types.d.ts +235 -0
- package/dist/types/graph-dtos.d.ts +228 -0
- package/dist/types/loanStatus.d.ts +10 -0
- package/dist/types/result.d.ts +120 -0
- package/dist/utils/bitcoin-address-cache.utils.d.ts +87 -0
- package/dist/utils/bitcoin-provider.utils.d.ts +48 -0
- package/dist/utils/bitcoin-signature.d.ts +20 -0
- package/dist/utils/chunks/bitcoin-utils.d.ts +75 -0
- package/dist/utils/chunks/eip1559-broadcast.utils.d.ts +24 -0
- package/dist/utils/error-handler.d.ts +106 -0
- package/dist/utils/ethers-interop.utils.d.ts +146 -0
- package/dist/utils/extend-authorization.utils.d.ts +61 -0
- package/dist/utils/lit-signature.utils.d.ts +6 -0
- package/dist/utils/logger.utils.d.ts +142 -0
- package/dist/utils/mint-authorization.utils.d.ts +224 -0
- package/dist/utils/quantum-timing.d.ts +75 -0
- package/dist/utils/signature-tempering.utils.d.ts +31 -0
- package/dist/utils/telegram-messaging.utils.d.ts +188 -0
- package/package.json +43 -22
- package/dist/index.d.mts +0 -7392
package/package.json
CHANGED
|
@@ -1,42 +1,56 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gvnrdao/dh-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.205",
|
|
4
4
|
"description": "TypeScript SDK for Diamond Hands Protocol - Bitcoin-backed lending with LIT Protocol PKPs",
|
|
5
|
-
"main": "dist/index.
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/sdk/src/index.d.ts",
|
|
7
7
|
"module": "dist/index.mjs",
|
|
8
|
-
"browser": "browser/dist/
|
|
8
|
+
"browser": "browser/dist/index.js",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
-
"types": "./dist/index.d.ts",
|
|
11
|
+
"types": "./dist/sdk/src/index.d.ts",
|
|
12
12
|
"import": "./dist/index.mjs",
|
|
13
|
-
"require": "./dist/index.
|
|
13
|
+
"require": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./server": {
|
|
16
|
+
"types": "./dist/sdk/src/server.d.ts",
|
|
17
|
+
"import": "./dist/server.mjs",
|
|
18
|
+
"require": "./dist/server.js"
|
|
14
19
|
}
|
|
15
20
|
},
|
|
16
21
|
"files": [
|
|
17
22
|
"dist/**/*",
|
|
18
23
|
"browser/dist/**/*",
|
|
19
|
-
"README.md"
|
|
24
|
+
"README.md",
|
|
25
|
+
"LICENSE"
|
|
20
26
|
],
|
|
21
27
|
"scripts": {
|
|
22
28
|
"build": "npm run sync:deployments && npm run validate:contracts && npm run build:node",
|
|
23
29
|
"build:all": "npm run sync:deployments && npm run validate:contracts && npm run build:node && npm run build:browser",
|
|
24
|
-
"build:node": "npm run sync:deployments && tsup
|
|
30
|
+
"build:node": "npm run sync:deployments && tsup && npm run build:types",
|
|
31
|
+
"build:types": "tsc -p tsconfig.build.json",
|
|
25
32
|
"build:browser": "cd browser && npm install && npm run build",
|
|
26
33
|
"sync:deployments": "node scripts/sync-deployments.js",
|
|
34
|
+
"sync:typechain": "cd ../contracts && npm run compile",
|
|
27
35
|
"validate:contracts": "node scripts/validate-contract-mapping.js",
|
|
28
36
|
"dev": "tsc --watch",
|
|
29
|
-
"
|
|
37
|
+
"typecheck": "tsc --noEmit",
|
|
38
|
+
"typecheck:strict": "tsc --noEmit -p tsconfig.strict.json",
|
|
39
|
+
"test:types": "tsc --noEmit -p tsconfig.types.json",
|
|
40
|
+
"prepublishOnly": "npm run sync:deployments && npm run validate:contracts && npm run build:node && npm run build:browser",
|
|
30
41
|
"test": "jest",
|
|
31
|
-
"test:unit": "jest
|
|
32
|
-
"test:integration": "jest
|
|
42
|
+
"test:unit": "jest tests/shared/unit",
|
|
43
|
+
"test:integration": "jest tests/shared/integration",
|
|
44
|
+
"test:e2e": "jest tests/networks/**/e2e",
|
|
45
|
+
"test:shared": "jest tests/shared",
|
|
46
|
+
"test:networks": "jest tests/networks",
|
|
33
47
|
"test:watch": "jest --watch",
|
|
34
48
|
"test:coverage": "jest --coverage",
|
|
35
49
|
"test:psm": "node test-psm-v2.js",
|
|
36
50
|
"test:position-query": "ts-node test/position-query.test.ts",
|
|
37
|
-
"test:schedule": "node test-scheduler.js",
|
|
38
51
|
"authorize:pkp": "node scripts/authorize-pkp-actions.js",
|
|
39
|
-
"lint": "eslint src
|
|
52
|
+
"lint": "eslint src --ext .ts && npm run lint:server-boundary",
|
|
53
|
+
"lint:server-boundary": "node scripts/check-pkp-mint-server-imports.mjs",
|
|
40
54
|
"clean": "rm -rf dist && rm -rf browser/dist"
|
|
41
55
|
},
|
|
42
56
|
"keywords": [
|
|
@@ -50,30 +64,37 @@
|
|
|
50
64
|
],
|
|
51
65
|
"author": "Diamond Hands Protocol",
|
|
52
66
|
"license": "MIT",
|
|
67
|
+
"engines": {
|
|
68
|
+
"node": ">=20",
|
|
69
|
+
"npm": ">=9"
|
|
70
|
+
},
|
|
71
|
+
"sideEffects": false,
|
|
53
72
|
"dependencies": {
|
|
54
|
-
"@gvnrdao/dh-lit-actions": "
|
|
55
|
-
"@gvnrdao/dh-lit-ops": "
|
|
56
|
-
"@lit-protocol/lit-node-client": "^7.3.1",
|
|
73
|
+
"@gvnrdao/dh-lit-actions": "0.0.281",
|
|
74
|
+
"@gvnrdao/dh-lit-ops": "0.0.253",
|
|
57
75
|
"@noble/hashes": "^1.5.0",
|
|
58
|
-
"axios": "^1.
|
|
76
|
+
"axios": "^1.15.2",
|
|
59
77
|
"bech32": "^2.0.0",
|
|
60
78
|
"bip66": "^2.0.0",
|
|
61
79
|
"bitcoinjs-lib": "^6.1.0",
|
|
62
80
|
"buffer": "^6.0.3",
|
|
63
81
|
"crypto-js": "^4.2.0",
|
|
64
|
-
"dotenv": "^17.2
|
|
82
|
+
"dotenv": "^17.4.2",
|
|
65
83
|
"ethers": "5.8.0",
|
|
66
|
-
"node-telegram-bot-api": "^0.
|
|
84
|
+
"node-telegram-bot-api": "^0.67.0",
|
|
67
85
|
"process": "^0.11.10",
|
|
68
|
-
"valibot": "^1.1.0"
|
|
86
|
+
"valibot": "^1.1.0",
|
|
87
|
+
"viem": "^2.48.4"
|
|
69
88
|
},
|
|
70
89
|
"devDependencies": {
|
|
90
|
+
"@babel/preset-env": "7.29.0",
|
|
71
91
|
"@types/crypto-js": "^4.2.2",
|
|
72
92
|
"@types/jest": "^29.0.0",
|
|
73
93
|
"@types/node": "^20.0.0",
|
|
74
94
|
"@types/node-telegram-bot-api": "^0.64.12",
|
|
75
95
|
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
76
96
|
"@typescript-eslint/parser": "^6.0.0",
|
|
97
|
+
"babel-jest": "^29.0.0",
|
|
77
98
|
"eslint": "^8.0.0",
|
|
78
99
|
"jest": "^29.0.0",
|
|
79
100
|
"path-browserify": "^1.0.1",
|
|
@@ -81,13 +102,13 @@
|
|
|
81
102
|
"ts-loader": "^9.5.4",
|
|
82
103
|
"ts-node": "^10.9.2",
|
|
83
104
|
"tsup": "^7.2.0",
|
|
84
|
-
"typescript": "
|
|
105
|
+
"typescript": "~5.9.3",
|
|
85
106
|
"webpack": "^5.101.3",
|
|
86
107
|
"webpack-cli": "^5.1.4"
|
|
87
108
|
},
|
|
88
109
|
"repository": {
|
|
89
110
|
"type": "git",
|
|
90
|
-
"url": "https://github.com/gvnrdao/diamond-hands.git",
|
|
111
|
+
"url": "git+https://github.com/gvnrdao/diamond-hands.git",
|
|
91
112
|
"directory": "sdk"
|
|
92
113
|
},
|
|
93
114
|
"bugs": {
|