@opendatalabs/vana-sdk 3.1.0 → 3.2.0-canary.255a8bf

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 (103) hide show
  1. package/README.md +2 -1
  2. package/dist/account/personal-server-lite-owner-binding.cjs +81 -0
  3. package/dist/account/personal-server-lite-owner-binding.cjs.map +1 -0
  4. package/dist/account/personal-server-lite-owner-binding.d.ts +30 -0
  5. package/dist/account/personal-server-lite-owner-binding.js +59 -0
  6. package/dist/account/personal-server-lite-owner-binding.js.map +1 -0
  7. package/dist/account/personal-server-lite-owner-binding.test.d.ts +1 -0
  8. package/dist/account/personal-server-registration.cjs +263 -0
  9. package/dist/account/personal-server-registration.cjs.map +1 -0
  10. package/dist/account/personal-server-registration.d.ts +66 -0
  11. package/dist/account/personal-server-registration.js +240 -0
  12. package/dist/account/personal-server-registration.js.map +1 -0
  13. package/dist/account/personal-server-registration.test.d.ts +1 -0
  14. package/dist/auth/errors.js +1 -1
  15. package/dist/auth/oauth-client.js +2 -2
  16. package/dist/auth/web3-signed-builder.js +1 -1
  17. package/dist/auth/web3-signed.js +3 -3
  18. package/dist/browser.js +1 -1
  19. package/dist/chains/definitions.js +1 -1
  20. package/dist/chains/index.js +1 -1
  21. package/dist/chains.browser.js +1 -1
  22. package/dist/chains.js +1 -1
  23. package/dist/chains.node.js +1 -1
  24. package/dist/contracts/contractController.js +4 -4
  25. package/dist/core/client.js +1 -1
  26. package/dist/crypto/ecies/base.js +3 -3
  27. package/dist/crypto/ecies/browser.js +1 -1
  28. package/dist/crypto/ecies/index.js +1 -1
  29. package/dist/crypto/ecies/interface.js +1 -1
  30. package/dist/crypto/ecies/node.js +1 -1
  31. package/dist/crypto/services/WalletKeyEncryptionService.js +1 -1
  32. package/dist/generated/abi/index.js +26 -26
  33. package/dist/index.browser.d.ts +9 -3
  34. package/dist/index.browser.js +768 -72
  35. package/dist/index.browser.js.map +4 -4
  36. package/dist/index.node.cjs +798 -73
  37. package/dist/index.node.cjs.map +4 -4
  38. package/dist/index.node.d.ts +9 -3
  39. package/dist/index.node.js +768 -72
  40. package/dist/index.node.js.map +4 -4
  41. package/dist/node.js +1 -1
  42. package/dist/platform/browser-only.js +1 -1
  43. package/dist/platform/browser-safe.js +1 -1
  44. package/dist/platform/browser.js +6 -6
  45. package/dist/platform/index.js +4 -4
  46. package/dist/platform/node.js +8 -8
  47. package/dist/platform/utils.js +2 -2
  48. package/dist/platform.browser.js +3 -3
  49. package/dist/platform.js +4 -4
  50. package/dist/platform.node.js +4 -4
  51. package/dist/protocol/eip712.cjs +58 -3
  52. package/dist/protocol/eip712.cjs.map +1 -1
  53. package/dist/protocol/eip712.d.ts +99 -7
  54. package/dist/protocol/eip712.js +52 -3
  55. package/dist/protocol/eip712.js.map +1 -1
  56. package/dist/protocol/escrow-deposit.cjs +89 -0
  57. package/dist/protocol/escrow-deposit.cjs.map +1 -0
  58. package/dist/protocol/escrow-deposit.d.ts +47 -0
  59. package/dist/protocol/escrow-deposit.js +60 -0
  60. package/dist/protocol/escrow-deposit.js.map +1 -0
  61. package/dist/protocol/escrow-deposit.test.d.ts +1 -0
  62. package/dist/protocol/escrow-flow.test.d.ts +21 -0
  63. package/dist/protocol/fee-registry.cjs +89 -0
  64. package/dist/protocol/fee-registry.cjs.map +1 -0
  65. package/dist/protocol/fee-registry.d.ts +105 -0
  66. package/dist/protocol/fee-registry.js +63 -0
  67. package/dist/protocol/fee-registry.js.map +1 -0
  68. package/dist/protocol/fee-registry.test.d.ts +1 -0
  69. package/dist/protocol/gateway.cjs +124 -3
  70. package/dist/protocol/gateway.cjs.map +1 -1
  71. package/dist/protocol/gateway.d.ts +196 -16
  72. package/dist/protocol/gateway.js +124 -3
  73. package/dist/protocol/gateway.js.map +1 -1
  74. package/dist/protocol/grants.cjs +24 -64
  75. package/dist/protocol/grants.cjs.map +1 -1
  76. package/dist/protocol/grants.d.ts +6 -13
  77. package/dist/protocol/grants.js +25 -64
  78. package/dist/protocol/grants.js.map +1 -1
  79. package/dist/protocol/personal-server-lite-owner-binding.cjs +93 -0
  80. package/dist/protocol/personal-server-lite-owner-binding.cjs.map +1 -0
  81. package/dist/protocol/personal-server-lite-owner-binding.d.ts +44 -0
  82. package/dist/protocol/personal-server-lite-owner-binding.js +65 -0
  83. package/dist/protocol/personal-server-lite-owner-binding.js.map +1 -0
  84. package/dist/protocol/personal-server-lite-owner-binding.test.d.ts +1 -0
  85. package/dist/protocol/personal-server-registration.cjs +122 -0
  86. package/dist/protocol/personal-server-registration.cjs.map +1 -0
  87. package/dist/protocol/personal-server-registration.d.ts +62 -0
  88. package/dist/protocol/personal-server-registration.js +97 -0
  89. package/dist/protocol/personal-server-registration.js.map +1 -0
  90. package/dist/protocol/personal-server-registration.test.d.ts +1 -0
  91. package/dist/storage/default.js +1 -1
  92. package/dist/storage/index.js +10 -10
  93. package/dist/storage/manager.js +1 -1
  94. package/dist/storage/providers/callback-storage.js +1 -1
  95. package/dist/storage/providers/dropbox.js +1 -1
  96. package/dist/storage/providers/google-drive.js +1 -1
  97. package/dist/storage/providers/ipfs.js +2 -2
  98. package/dist/storage/providers/pinata.js +1 -1
  99. package/dist/storage/providers/r2.js +1 -1
  100. package/dist/storage/providers/vana-storage.js +2 -2
  101. package/dist/types/index.js +2 -2
  102. package/dist/types.js +1 -1
  103. package/package.json +6 -3
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  StorageError
3
- } from "../../types/storage";
3
+ } from "../../types/storage.js";
4
4
  class CallbackStorage {
5
5
  /**
6
6
  * Creates a new callback-based storage provider.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  StorageError
3
- } from "../index";
3
+ } from "../index.js";
4
4
  class DropboxStorage {
5
5
  constructor(config) {
6
6
  this.config = config;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  StorageError
3
- } from "../index";
3
+ } from "../index.js";
4
4
  class GoogleDriveStorage {
5
5
  constructor(config) {
6
6
  this.config = config;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  StorageError
3
- } from "../index";
4
- import { toBase64 } from "../../utils/encoding";
3
+ } from "../index.js";
4
+ import { toBase64 } from "../../utils/encoding.js";
5
5
  class IpfsStorage {
6
6
  constructor(config) {
7
7
  this.config = config;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  StorageError
3
- } from "../index";
3
+ } from "../index.js";
4
4
  class PinataStorage {
5
5
  constructor(config) {
6
6
  this.config = config;
@@ -2,7 +2,7 @@ import { hmac } from "@noble/hashes/hmac";
2
2
  import { sha256 } from "@noble/hashes/sha2";
3
3
  import {
4
4
  StorageError
5
- } from "../index";
5
+ } from "../index.js";
6
6
  const SERVICE = "s3";
7
7
  const DEFAULT_REGION = "auto";
8
8
  class R2Storage {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  StorageError
3
- } from "../index";
3
+ } from "../index.js";
4
4
  import {
5
5
  buildWeb3SignedHeader
6
- } from "../../auth/web3-signed-builder";
6
+ } from "../../auth/web3-signed-builder.js";
7
7
  const DEFAULT_ENDPOINT = "https://storage.vana.org";
8
8
  const BLOB_PATH_PREFIX = "/v1/blobs";
9
9
  const DEFAULT_TOKEN_TTL_SECONDS = 300;
@@ -1,5 +1,5 @@
1
- import { isVanaChainId, isVanaChain } from "./chains";
2
- import { StorageError } from "./storage";
1
+ import { isVanaChainId, isVanaChain } from "./chains.js";
2
+ import { StorageError } from "./storage.js";
3
3
  export {
4
4
  StorageError,
5
5
  isVanaChain,
package/dist/types.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./types/index";
1
+ export * from "./types/index.js";
2
2
  //# sourceMappingURL=types.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opendatalabs/vana-sdk",
3
- "version": "3.1.0",
3
+ "version": "3.2.0-canary.255a8bf",
4
4
  "description": "A TypeScript library for interacting with Vana Network smart contracts.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -87,11 +87,13 @@
87
87
  "build:node": "tsup --config tsup.config.ts",
88
88
  "build:browser": "tsup --config tsup-browser.config.ts",
89
89
  "build:entries": "tsx scripts/bundle-entry-points.ts",
90
- "build": "npm run clean && npm run build:types && npm run build:node && npm run build:browser && npm run build:entries",
90
+ "build:fix-esm": "tsx scripts/fix-esm-import-extensions.ts",
91
+ "build": "npm run clean && npm run build:types && npm run build:node && npm run build:browser && npm run build:entries && npm run build:fix-esm",
91
92
  "dev": "npm run build -- --watch",
92
93
  "lint": "eslint .",
93
94
  "lint:fix": "eslint . --fix",
94
95
  "typecheck": "tsc -p tsconfig.json",
96
+ "validate:package-imports": "npm run build && tsx scripts/validate-package-imports.ts",
95
97
  "validate:types": "rimraf test-dist && tsc -p tsconfig.build.json --outDir test-dist && test -f test-dist/index.node.d.ts && test -f test-dist/index.browser.d.ts && echo '✅ Type declarations can be generated' && rimraf test-dist || (echo '❌ Failed to generate type declarations' && rimraf test-dist && exit 1)",
96
98
  "test": "vitest",
97
99
  "test:verbose": "vitest --reporter=verbose",
@@ -99,7 +101,8 @@
99
101
  "test:coverage:verbose": "vitest run --coverage --reporter=verbose --coverage.reporter=text",
100
102
  "discover-addresses": "tsx scripts/discover-addresses.ts",
101
103
  "fetch-abis": "tsx scripts/fetch-abis.ts",
102
- "generate": "npm run discover-addresses && npm run fetch-abis"
104
+ "generate": "npm run discover-addresses && npm run fetch-abis",
105
+ "e2e:deposit": "tsx scripts/e2e-escrow-deposit.ts"
103
106
  },
104
107
  "keywords": [
105
108
  "vana",