@thru/thru-sdk 0.1.16 → 0.1.20

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.
Files changed (72) hide show
  1. package/README.md +96 -0
  2. package/dist/{chunk-FDZQR6ZZ.js → chunk-4JWHIX3Q.js} +168 -65
  3. package/dist/chunk-4JWHIX3Q.js.map +1 -0
  4. package/dist/client.d.ts +16 -3
  5. package/dist/client.js +19 -3
  6. package/dist/client.js.map +1 -1
  7. package/dist/metafile-esm.json +1 -1
  8. package/dist/sdk.d.ts +5 -4
  9. package/dist/sdk.js +1 -1
  10. package/dist/{transactions-X2KKrGw6.d.ts → transactions-CJsRFL_T.d.ts} +562 -98
  11. package/package.json +15 -4
  12. package/buf.gen.yaml +0 -12
  13. package/buf.lock +0 -9
  14. package/buf.yaml +0 -15
  15. package/dist/chunk-FDZQR6ZZ.js.map +0 -1
  16. package/proto/thru/common/v1/consensus.proto +0 -73
  17. package/proto/thru/common/v1/errors.proto +0 -65
  18. package/proto/thru/common/v1/filters.proto +0 -60
  19. package/proto/thru/common/v1/pagination.proto +0 -45
  20. package/proto/thru/core/v1/account.proto +0 -137
  21. package/proto/thru/core/v1/block.proto +0 -80
  22. package/proto/thru/core/v1/state.proto +0 -35
  23. package/proto/thru/core/v1/transaction.proto +0 -136
  24. package/proto/thru/core/v1/types.proto +0 -50
  25. package/proto/thru/services/v1/command_service.proto +0 -70
  26. package/proto/thru/services/v1/query_service.proto +0 -344
  27. package/proto/thru/services/v1/streaming_service.proto +0 -126
  28. package/thru-ts-client-sdk/client.ts +0 -10
  29. package/thru-ts-client-sdk/core/bound-client.ts +0 -135
  30. package/thru-ts-client-sdk/core/client.ts +0 -38
  31. package/thru-ts-client-sdk/defaults.ts +0 -17
  32. package/thru-ts-client-sdk/modules/accounts.ts +0 -145
  33. package/thru-ts-client-sdk/modules/blocks.ts +0 -75
  34. package/thru-ts-client-sdk/modules/events.ts +0 -20
  35. package/thru-ts-client-sdk/modules/height.ts +0 -9
  36. package/thru-ts-client-sdk/modules/helpers.ts +0 -131
  37. package/thru-ts-client-sdk/modules/keys.ts +0 -29
  38. package/thru-ts-client-sdk/modules/proofs.ts +0 -20
  39. package/thru-ts-client-sdk/modules/streaming.ts +0 -34
  40. package/thru-ts-client-sdk/modules/transactions.ts +0 -274
  41. package/thru-ts-client-sdk/proto/buf/validate/validate_pb.ts +0 -4761
  42. package/thru-ts-client-sdk/proto/google/api/annotations_pb.ts +0 -39
  43. package/thru-ts-client-sdk/proto/google/api/client_pb.ts +0 -953
  44. package/thru-ts-client-sdk/proto/google/api/field_behavior_pb.ts +0 -157
  45. package/thru-ts-client-sdk/proto/google/api/http_pb.ts +0 -474
  46. package/thru-ts-client-sdk/proto/google/api/launch_stage_pb.ts +0 -118
  47. package/thru-ts-client-sdk/proto/thru/common/v1/consensus_pb.ts +0 -163
  48. package/thru-ts-client-sdk/proto/thru/common/v1/errors_pb.ts +0 -130
  49. package/thru-ts-client-sdk/proto/thru/common/v1/filters_pb.ts +0 -81
  50. package/thru-ts-client-sdk/proto/thru/common/v1/pagination_pb.ts +0 -80
  51. package/thru-ts-client-sdk/proto/thru/core/v1/account_pb.ts +0 -358
  52. package/thru-ts-client-sdk/proto/thru/core/v1/block_pb.ts +0 -260
  53. package/thru-ts-client-sdk/proto/thru/core/v1/state_pb.ts +0 -104
  54. package/thru-ts-client-sdk/proto/thru/core/v1/transaction_pb.ts +0 -327
  55. package/thru-ts-client-sdk/proto/thru/core/v1/types_pb.ts +0 -101
  56. package/thru-ts-client-sdk/proto/thru/services/v1/command_service_pb.ts +0 -81
  57. package/thru-ts-client-sdk/proto/thru/services/v1/query_service_pb.ts +0 -813
  58. package/thru-ts-client-sdk/proto/thru/services/v1/streaming_service_pb.ts +0 -391
  59. package/thru-ts-client-sdk/sdk.ts +0 -40
  60. package/thru-ts-client-sdk/test-scripts/counter.ts +0 -216
  61. package/thru-ts-client-sdk/test-scripts/create-account.ts +0 -74
  62. package/thru-ts-client-sdk/test-scripts/get-height.ts +0 -52
  63. package/thru-ts-client-sdk/transactions/Transaction.ts +0 -240
  64. package/thru-ts-client-sdk/transactions/TransactionBuilder.ts +0 -48
  65. package/thru-ts-client-sdk/transactions/__tests__/transaction.test.ts +0 -95
  66. package/thru-ts-client-sdk/transactions/index.ts +0 -3
  67. package/thru-ts-client-sdk/transactions/types.ts +0 -64
  68. package/thru-ts-client-sdk/transactions/utils.ts +0 -132
  69. package/thru-ts-client-sdk/types/types.ts +0 -8
  70. package/thru-ts-client-sdk/utils/utils.ts +0 -27
  71. package/tsconfig.json +0 -9
  72. package/tsup.config.ts +0 -14
package/package.json CHANGED
@@ -1,10 +1,14 @@
1
1
  {
2
2
  "name": "@thru/thru-sdk",
3
- "version": "0.1.16",
3
+ "version": "0.1.20",
4
4
  "type": "module",
5
5
  "main": "./dist/sdk.js",
6
6
  "types": "./dist/sdk.d.ts",
7
7
  "sideEffects": false,
8
+ "files": [
9
+ "dist",
10
+ "README.md"
11
+ ],
8
12
  "exports": {
9
13
  ".": {
10
14
  "import": "./dist/sdk.js",
@@ -21,15 +25,17 @@
21
25
  "@connectrpc/connect-web": "^2.1.0",
22
26
  "@noble/ed25519": "^2.3.0",
23
27
  "@noble/hashes": "^1.4.0",
24
- "@thru/crypto": "0.1.16",
25
- "@thru/helpers": "0.1.16"
28
+ "@thru/crypto": "0.1.20",
29
+ "@thru/helpers": "0.1.20"
26
30
  },
27
31
  "devDependencies": {
28
32
  "@bufbuild/buf": "^1.58.0",
29
33
  "@bufbuild/protoc-gen-es": "^2.9.0",
30
34
  "ts-node": "^10.9.1",
31
35
  "tsx": "^4.20.6",
32
- "typescript": "^5.9.3"
36
+ "typescript": "^5.9.3",
37
+ "vitest": "^3.2.4",
38
+ "@vitest/coverage-v8": "^3.2.4"
33
39
  },
34
40
  "scripts": {
35
41
  "get-height": "tsx --tsconfig tsconfig.json thru-ts-client-sdk/test-scripts/get-height.ts",
@@ -40,6 +46,11 @@
40
46
  "build": "tsup",
41
47
  "dev": "tsup --watch",
42
48
  "lint": "eslint src/",
49
+ "test": "vitest",
50
+ "test:watch": "vitest --watch",
51
+ "test:coverage": "vitest --coverage",
52
+ "test:run": "vitest run",
53
+ "test:ui": "vitest --ui",
43
54
  "test:transactions": "node --loader ts-node/esm --test \"thru-ts-client-sdk/transactions/__tests__/*.test.ts\"",
44
55
  "clean": "rm -rf dist"
45
56
  }
package/buf.gen.yaml DELETED
@@ -1,12 +0,0 @@
1
- version: v2
2
-
3
- managed:
4
- enabled: true
5
-
6
- plugins:
7
- - local: protoc-gen-es
8
- out: thru-ts-client-sdk/proto
9
- opt: target=ts
10
- # - remote: buf.build/grpc/web
11
- # out: thru-ts-client-sdk/proto
12
- # opt: import_style=typescript,mode=grpcwebtext
package/buf.lock DELETED
@@ -1,9 +0,0 @@
1
- # Generated by buf. DO NOT EDIT.
2
- version: v2
3
- deps:
4
- - name: buf.build/bufbuild/protovalidate
5
- commit: 52f32327d4b045a79293a6ad4e7e1236
6
- digest: b5:cbabc98d4b7b7b0447c9b15f68eeb8a7a44ef8516cb386ac5f66e7fd4062cd6723ed3f452ad8c384b851f79e33d26e7f8a94e2b807282b3def1cd966c7eace97
7
- - name: buf.build/googleapis/googleapis
8
- commit: 72c8614f3bd0466ea67931ef2c43d608
9
- digest: b5:13efeea24e633fd45327390bdee941207a8727e96cf01affb84c1e4100fd8f48a42bbd508df11930cd2884629bafad685df1ac3111bc78cdaefcd38c9371c6b1
package/buf.yaml DELETED
@@ -1,15 +0,0 @@
1
- version: v2
2
-
3
- modules:
4
- - path: proto
5
-
6
- deps:
7
- - buf.build/googleapis/googleapis
8
- - buf.build/bufbuild/protovalidate
9
-
10
- lint:
11
- use:
12
- - STANDARD
13
- breaking:
14
- use:
15
- - FILE