@opendatalabs/vana-sdk 0.1.0-alpha.d7fc764 → 0.1.0-alpha.dc68f39
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/dist/__tests__/waitForTransactionEvents.test.d.ts +1 -0
- package/dist/browser.d.ts +4 -2
- package/dist/chains/definitions.cjs +9 -6
- package/dist/chains/definitions.cjs.map +1 -1
- package/dist/chains/definitions.d.ts +9 -11
- package/dist/chains/definitions.js +9 -6
- package/dist/chains/definitions.js.map +1 -1
- package/dist/chains/index.d.ts +5 -2
- package/dist/chains.browser.d.ts +8 -2
- package/dist/chains.d.ts +8 -2
- package/dist/chains.node.d.ts +8 -2
- package/dist/config/addresses.d.ts +8 -24
- package/dist/config/chains.d.ts +9 -13
- package/dist/config/default-services.cjs +60 -0
- package/dist/config/default-services.cjs.map +1 -0
- package/dist/config/default-services.d.ts +46 -0
- package/dist/config/default-services.js +33 -0
- package/dist/config/default-services.js.map +1 -0
- package/dist/config/default-services.test.d.ts +1 -0
- package/dist/config/features.d.ts +1 -3
- package/dist/config/tests/addresses.test.d.ts +1 -0
- package/dist/contracts/contractController.cjs +3 -3
- package/dist/contracts/contractController.cjs.map +1 -1
- package/dist/contracts/contractController.d.ts +11 -28
- package/dist/contracts/contractController.js +4 -7
- package/dist/contracts/contractController.js.map +1 -1
- package/dist/contracts/tests/contractController.test.d.ts +1 -0
- package/dist/controllers/__tests__/schemas-edge-cases.test.d.ts +1 -0
- package/dist/controllers/base.cjs +83 -0
- package/dist/controllers/base.cjs.map +1 -0
- package/dist/controllers/base.d.ts +84 -0
- package/dist/controllers/base.js +59 -0
- package/dist/controllers/base.js.map +1 -0
- package/dist/controllers/data-error-handling.test.d.ts +1 -0
- package/dist/controllers/data.cjs +415 -172
- package/dist/controllers/data.cjs.map +1 -1
- package/dist/controllers/data.d.ts +149 -76
- package/dist/controllers/data.js +415 -172
- package/dist/controllers/data.js.map +1 -1
- package/dist/controllers/permissions.cjs +508 -257
- package/dist/controllers/permissions.cjs.map +1 -1
- package/dist/controllers/permissions.d.ts +1348 -25
- package/dist/controllers/permissions.js +508 -257
- package/dist/controllers/permissions.js.map +1 -1
- package/dist/controllers/protocol.cjs +15 -11
- package/dist/controllers/protocol.cjs.map +1 -1
- package/dist/controllers/protocol.d.ts +7 -35
- package/dist/controllers/protocol.js +15 -14
- package/dist/controllers/protocol.js.map +1 -1
- package/dist/controllers/schemas.cjs +69 -54
- package/dist/controllers/schemas.cjs.map +1 -1
- package/dist/controllers/schemas.d.ts +9 -36
- package/dist/controllers/schemas.js +69 -54
- package/dist/controllers/schemas.js.map +1 -1
- package/dist/controllers/server-additional.test.d.ts +1 -0
- package/dist/controllers/server.cjs +15 -10
- package/dist/controllers/server.cjs.map +1 -1
- package/dist/controllers/server.d.ts +7 -33
- package/dist/controllers/server.js +15 -10
- package/dist/controllers/server.js.map +1 -1
- package/dist/core/apiClient.cjs +15 -12
- package/dist/core/apiClient.cjs.map +1 -1
- package/dist/core/apiClient.d.ts +5 -9
- package/dist/core/apiClient.js +19 -19
- package/dist/core/apiClient.js.map +1 -1
- package/dist/core/client.cjs +7 -7
- package/dist/core/client.cjs.map +1 -1
- package/dist/core/client.d.ts +6 -9
- package/dist/core/client.js +7 -7
- package/dist/core/client.js.map +1 -1
- package/dist/core/core.test.d.ts +1 -0
- package/dist/core/generics.cjs +11 -9
- package/dist/core/generics.cjs.map +1 -1
- package/dist/core/generics.d.ts +9 -13
- package/dist/core/generics.js +22 -29
- package/dist/core/generics.js.map +1 -1
- package/dist/core/tests/apiClient.test.d.ts +1 -0
- package/dist/core/tests/client.test.d.ts +1 -0
- package/dist/core/tests/generics.test.d.ts +1 -0
- package/dist/core.cjs +114 -48
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.ts +40 -65
- package/dist/core.js +127 -74
- package/dist/core.js.map +1 -1
- package/dist/crypto/ecies/__tests__/base.test.d.ts +4 -0
- package/dist/crypto/ecies/__tests__/compatibility.test.d.ts +8 -0
- package/dist/crypto/ecies/__tests__/constants.test.d.ts +4 -0
- package/dist/crypto/ecies/__tests__/native-parity.test.d.ts +7 -0
- package/dist/crypto/ecies/__tests__/normalization.test.d.ts +1 -0
- package/dist/crypto/ecies/__tests__/test-vectors.d.ts +2 -4
- package/dist/crypto/ecies/base.cjs +4 -3
- package/dist/crypto/ecies/base.cjs.map +1 -1
- package/dist/crypto/ecies/base.d.ts +2 -5
- package/dist/crypto/ecies/base.js +12 -15
- package/dist/crypto/ecies/base.js.map +1 -1
- package/dist/crypto/ecies/browser.cjs +2 -1
- package/dist/crypto/ecies/browser.cjs.map +1 -1
- package/dist/crypto/ecies/browser.d.ts +2 -7
- package/dist/crypto/ecies/browser.js +2 -1
- package/dist/crypto/ecies/browser.js.map +1 -1
- package/dist/crypto/ecies/constants.d.ts +7 -9
- package/dist/crypto/ecies/index.d.ts +8 -1
- package/dist/crypto/ecies/interface.cjs +4 -5
- package/dist/crypto/ecies/interface.cjs.map +1 -1
- package/dist/crypto/ecies/interface.d.ts +9 -11
- package/dist/crypto/ecies/interface.js +4 -5
- package/dist/crypto/ecies/interface.js.map +1 -1
- package/dist/crypto/ecies/node.cjs +3 -2
- package/dist/crypto/ecies/node.cjs.map +1 -1
- package/dist/crypto/ecies/node.d.ts +2 -7
- package/dist/crypto/ecies/node.js +11 -16
- package/dist/crypto/ecies/node.js.map +1 -1
- package/dist/crypto/ecies/test-vectors/eccrypto-vectors.json +72 -0
- package/dist/crypto/ecies/utils.cjs +2 -41
- package/dist/crypto/ecies/utils.cjs.map +1 -1
- package/dist/crypto/ecies/utils.d.ts +3 -40
- package/dist/crypto/ecies/utils.js +1 -35
- package/dist/crypto/ecies/utils.js.map +1 -1
- package/dist/crypto/services/WalletKeyEncryptionService.cjs +2 -2
- package/dist/crypto/services/WalletKeyEncryptionService.cjs.map +1 -1
- package/dist/crypto/services/WalletKeyEncryptionService.d.ts +3 -7
- package/dist/crypto/services/WalletKeyEncryptionService.js +5 -9
- package/dist/crypto/services/WalletKeyEncryptionService.js.map +1 -1
- package/dist/crypto/services/WalletKeyEncryptionService.test.d.ts +1 -0
- package/dist/diagnostics.d.ts +1 -3
- package/dist/diagnostics.test.d.ts +1 -0
- package/dist/errors.cjs +16 -0
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +53 -15
- package/dist/errors.js +18 -6
- package/dist/errors.js.map +1 -1
- package/dist/generated/abi/ComputeEngineImplementation.d.ts +2 -3
- package/dist/generated/abi/ComputeInstructionRegistryImplementation.d.ts +2 -3
- package/dist/generated/abi/DATFactoryImplementation.d.ts +2 -3
- package/dist/generated/abi/DATImplementation.d.ts +2 -3
- package/dist/generated/abi/DATPausableImplementation.d.ts +2 -3
- package/dist/generated/abi/DATVotesImplementation.d.ts +2 -3
- package/dist/generated/abi/DLPPerformanceImplementation.d.ts +2 -3
- package/dist/generated/abi/DLPRegistryImplementation.d.ts +2 -3
- package/dist/generated/abi/DLPRegistryTreasuryImplementation.d.ts +2 -3
- package/dist/generated/abi/DLPRewardDeployerImplementation.d.ts +2 -3
- package/dist/generated/abi/DLPRewardDeployerTreasuryImplementation.d.ts +2 -3
- package/dist/generated/abi/DLPRewardSwapImplementation.d.ts +2 -3
- package/dist/generated/abi/DLPRootImplementation.d.ts +1 -3
- package/dist/generated/abi/DLPTreasuryImplementation.d.ts +2 -3
- package/dist/generated/abi/DataLiquidityPoolImplementation.d.ts +1 -3
- package/dist/generated/abi/DataPortabilityGranteesImplementation.d.ts +2 -3
- package/dist/generated/abi/DataPortabilityPermissionsImplementation.d.ts +2 -3
- package/dist/generated/abi/DataPortabilityServersImplementation.d.ts +2 -3
- package/dist/generated/abi/DataRefinerRegistryImplementation.d.ts +2 -3
- package/dist/generated/abi/DataRegistryImplementation.cjs +13 -0
- package/dist/generated/abi/DataRegistryImplementation.cjs.map +1 -1
- package/dist/generated/abi/DataRegistryImplementation.d.ts +12 -3
- package/dist/generated/abi/DataRegistryImplementation.js +13 -0
- package/dist/generated/abi/DataRegistryImplementation.js.map +1 -1
- package/dist/generated/abi/QueryEngineImplementation.d.ts +2 -3
- package/dist/generated/abi/SwapHelperImplementation.d.ts +2 -3
- package/dist/generated/abi/TeePoolDedicatedGpuImplementation.d.ts +2 -3
- package/dist/generated/abi/TeePoolDedicatedStandardImplementation.d.ts +2 -3
- package/dist/generated/abi/TeePoolEphemeralStandardImplementation.d.ts +2 -3
- package/dist/generated/abi/TeePoolImplementation.d.ts +2 -3
- package/dist/generated/abi/TeePoolPersistentGpuImplementation.d.ts +2 -3
- package/dist/generated/abi/TeePoolPersistentStandardImplementation.d.ts +2 -3
- package/dist/generated/abi/TeePoolPhalaImplementation.d.ts +2 -3
- package/dist/generated/abi/VanaEpochImplementation.d.ts +2 -3
- package/dist/generated/abi/VanaPoolEntityImplementation.d.ts +2 -3
- package/dist/generated/abi/VanaPoolStakingImplementation.d.ts +2 -3
- package/dist/generated/abi/VanaPoolTreasuryImplementation.d.ts +2 -3
- package/dist/generated/abi/index.cjs +42 -0
- package/dist/generated/abi/index.cjs.map +1 -1
- package/dist/generated/abi/index.d.ts +47 -18
- package/dist/generated/abi/index.js +21 -0
- package/dist/generated/abi/index.js.map +1 -1
- package/dist/generated/event-types.cjs +17 -0
- package/dist/generated/event-types.cjs.map +1 -0
- package/dist/generated/event-types.d.ts +854 -0
- package/dist/generated/event-types.js +1 -0
- package/dist/generated/event-types.js.map +1 -0
- package/dist/generated/eventRegistry.cjs +3351 -0
- package/dist/generated/eventRegistry.cjs.map +1 -0
- package/dist/generated/eventRegistry.d.ts +14 -0
- package/dist/generated/eventRegistry.js +3326 -0
- package/dist/generated/eventRegistry.js.map +1 -0
- package/dist/generated/server/server-exports.d.ts +19 -21
- package/dist/generated/server/server.cjs.map +1 -1
- package/dist/generated/server/server.d.ts +113 -87
- package/dist/generated/subgraph.d.ts +329 -332
- package/dist/index.browser.d.ts +48 -73
- package/dist/index.browser.js +12 -0
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/index.node.cjs +9 -0
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.d.ts +181 -64
- package/dist/index.node.js +10 -0
- package/dist/index.node.js.map +1 -1
- package/dist/node.d.ts +4 -2
- package/dist/platform/browser-only.d.ts +5 -8
- package/dist/platform/browser-only.test.d.ts +1 -0
- package/dist/platform/browser-safe.d.ts +6 -9
- package/dist/platform/browser-safe.test.d.ts +1 -0
- package/dist/platform/browser.cjs +7 -6
- package/dist/platform/browser.cjs.map +1 -1
- package/dist/platform/browser.d.ts +3 -6
- package/dist/platform/browser.js +19 -27
- package/dist/platform/browser.js.map +1 -1
- package/dist/platform/browser.test.d.ts +1 -0
- package/dist/platform/index.d.ts +11 -5
- package/dist/platform/interface.d.ts +6 -8
- package/dist/platform/node.d.ts +3 -7
- package/dist/platform/node.js +12 -19
- package/dist/platform/node.js.map +1 -1
- package/dist/platform/ports/openpgp-port.cjs +74 -0
- package/dist/platform/ports/openpgp-port.cjs.map +1 -0
- package/dist/platform/ports/openpgp-port.d.ts +13 -0
- package/dist/platform/ports/openpgp-port.js +59 -0
- package/dist/platform/ports/openpgp-port.js.map +1 -0
- package/dist/platform/ports/pgp-port.cjs +17 -0
- package/dist/platform/ports/pgp-port.cjs.map +1 -0
- package/dist/platform/ports/pgp-port.d.ts +35 -0
- package/dist/platform/ports/pgp-port.js +1 -0
- package/dist/platform/ports/pgp-port.js.map +1 -0
- package/dist/platform/shared/error-utils.d.ts +2 -4
- package/dist/platform/shared/pgp-utils.cjs +2 -2
- package/dist/platform/shared/pgp-utils.cjs.map +1 -1
- package/dist/platform/shared/pgp-utils.d.ts +3 -5
- package/dist/platform/shared/pgp-utils.js +2 -2
- package/dist/platform/shared/pgp-utils.js.map +1 -1
- package/dist/platform/shared/stream-utils.d.ts +1 -3
- package/dist/platform/utils.d.ts +6 -10
- package/dist/platform/utils.test.d.ts +1 -0
- package/dist/platform.browser.d.ts +9 -4
- package/dist/platform.d.ts +11 -5
- package/dist/platform.node.d.ts +10 -5
- package/dist/schemas/dataSchema.schema.json +53 -0
- package/dist/schemas/grantFile.schema.json +43 -0
- package/dist/server/handler.cjs.map +1 -1
- package/dist/server/handler.d.ts +8 -203
- package/dist/server/handler.js.map +1 -1
- package/dist/storage/index.d.ts +56 -10
- package/dist/storage/manager.cjs +6 -6
- package/dist/storage/manager.cjs.map +1 -1
- package/dist/storage/manager.d.ts +2 -5
- package/dist/storage/manager.js +5 -12
- package/dist/storage/manager.js.map +1 -1
- package/dist/storage/providers/callback-storage.cjs +3 -3
- package/dist/storage/providers/callback-storage.cjs.map +1 -1
- package/dist/storage/providers/callback-storage.d.ts +3 -9
- package/dist/storage/providers/callback-storage.js +3 -3
- package/dist/storage/providers/callback-storage.js.map +1 -1
- package/dist/storage/providers/google-drive.cjs +2 -2
- package/dist/storage/providers/google-drive.cjs.map +1 -1
- package/dist/storage/providers/google-drive.d.ts +3 -7
- package/dist/storage/providers/google-drive.js +4 -7
- package/dist/storage/providers/google-drive.js.map +1 -1
- package/dist/storage/providers/google-drive.test.d.ts +1 -0
- package/dist/storage/providers/ipfs.cjs +5 -5
- package/dist/storage/providers/ipfs.cjs.map +1 -1
- package/dist/storage/providers/ipfs.d.ts +3 -6
- package/dist/storage/providers/ipfs.js +7 -10
- package/dist/storage/providers/ipfs.js.map +1 -1
- package/dist/storage/providers/pinata.cjs +6 -6
- package/dist/storage/providers/pinata.cjs.map +1 -1
- package/dist/storage/providers/pinata.d.ts +5 -8
- package/dist/storage/providers/pinata.js +8 -11
- package/dist/storage/providers/pinata.js.map +1 -1
- package/dist/storage/tests/callbackStorage.test.d.ts +1 -0
- package/dist/storage/tests/googleDriveStorage.test.d.ts +1 -0
- package/dist/storage/tests/ipfsStorage.test.d.ts +1 -0
- package/dist/storage/tests/pinataStorage.test.d.ts +1 -0
- package/dist/storage/tests/storageManager.test.d.ts +1 -0
- package/dist/tests/abi.test.d.ts +1 -0
- package/dist/tests/chains-definitions.test.d.ts +1 -0
- package/dist/tests/core-encryption.test.d.ts +1 -0
- package/dist/tests/core-extended.test.d.ts +1 -0
- package/dist/tests/core-generics-coverage.test.d.ts +1 -0
- package/dist/tests/coverage-boost.test.d.ts +1 -0
- package/dist/tests/crypto-cross-platform-compatibility.test.d.ts +1 -0
- package/dist/tests/data-addfile-permissions-schema.test.d.ts +1 -0
- package/dist/tests/data-additional-methods.test.d.ts +1 -0
- package/dist/tests/data-controller-edge-cases.test.d.ts +1 -0
- package/dist/tests/data-ipfs-gateways.test.d.ts +1 -0
- package/dist/tests/data-relayer.test.d.ts +1 -0
- package/dist/tests/data-schema-validation.test.d.ts +1 -0
- package/dist/tests/data-simple-methods.test.d.ts +1 -0
- package/dist/tests/data.test.d.ts +1 -0
- package/dist/tests/demo-integration.test.d.ts +1 -0
- package/dist/tests/demo-trusted-server-integration.test.d.ts +1 -0
- package/dist/tests/download-relayer.test.d.ts +1 -0
- package/dist/tests/dual-mode-permissions.test.d.ts +1 -0
- package/dist/tests/dual-mode-trusted-servers.test.d.ts +1 -0
- package/dist/tests/encryption-correct-implementation.test.d.ts +1 -0
- package/dist/tests/encryption-coverage.test.d.ts +1 -0
- package/dist/tests/encryption-edge-cases.test.d.ts +1 -0
- package/dist/tests/encryption-utils-updated.test.d.ts +1 -0
- package/dist/tests/errors-coverage.test.d.ts +1 -0
- package/dist/tests/errors.test.d.ts +1 -0
- package/dist/tests/factories/mockFactory.d.ts +316 -0
- package/dist/tests/fakes/FakeStorageManager.d.ts +200 -0
- package/dist/tests/fakes/FakeStorageManager.test.d.ts +1 -0
- package/dist/tests/fakes/FakeWaitForTransactionEvents.d.ts +170 -0
- package/dist/tests/fakes/FakeWaitForTransactionEvents.test.d.ts +1 -0
- package/dist/tests/fakes/fake-pgp-port.d.ts +13 -0
- package/dist/tests/grantValidation-edge-cases.test.d.ts +1 -0
- package/dist/tests/grantValidation-unreachable-branch.test.d.ts +1 -0
- package/dist/tests/helper-methods.test.d.ts +1 -0
- package/dist/tests/helpers/platformTestHelpers.d.ts +106 -0
- package/dist/tests/helpers/typedMocks.d.ts +64 -0
- package/dist/tests/index-browser.test.d.ts +1 -0
- package/dist/tests/index-node.test.d.ts +1 -0
- package/dist/tests/index.test.d.ts +1 -0
- package/dist/tests/mocks/platformAdapter.d.ts +12 -0
- package/dist/tests/new-permissions-methods.test.d.ts +1 -0
- package/dist/tests/no-buffer-browser.test.d.ts +1 -0
- package/dist/tests/permissions-grantee.test.d.ts +1 -0
- package/dist/tests/permissions-schema-validation.test.d.ts +1 -0
- package/dist/tests/permissions-server-files.test.d.ts +1 -0
- package/dist/tests/permissions-transaction-options.test.d.ts +1 -0
- package/dist/tests/permissions-trust-servers.test.d.ts +1 -0
- package/dist/tests/permissions.test.d.ts +1 -0
- package/dist/tests/personal.test.d.ts +1 -0
- package/dist/tests/platform-browser.test.d.ts +1 -0
- package/dist/tests/platform-crypto-expanded.test.d.ts +1 -0
- package/dist/tests/platform-crypto.test.d.ts +1 -0
- package/dist/tests/platform-index.test.d.ts +1 -0
- package/dist/tests/platform-node.test.d.ts +1 -0
- package/dist/tests/platform-shared-utils.test.d.ts +1 -0
- package/dist/tests/platform-updated.test.d.ts +1 -0
- package/dist/tests/protocol-additional-methods.test.d.ts +1 -0
- package/dist/tests/protocol.test.d.ts +1 -0
- package/dist/tests/read-only-mode.test.d.ts +1 -0
- package/dist/tests/schemas.test.d.ts +1 -0
- package/dist/tests/server-handler.test.d.ts +1 -0
- package/dist/tests/setup.d.ts +7 -0
- package/dist/tests/signatureFormatter.test.d.ts +1 -0
- package/dist/tests/trusted-server-queries.test.d.ts +1 -0
- package/dist/tests/typedDataConverter.test.d.ts +1 -0
- package/dist/tests/types-contracts.test.d.ts +1 -0
- package/dist/tests/types-data.test.d.ts +1 -0
- package/dist/tests/types-external-apis.test.d.ts +1 -0
- package/dist/tests/types-generics.test.d.ts +1 -0
- package/dist/tests/types-permissions.test.d.ts +1 -0
- package/dist/tests/types-upload-params.test.d.ts +1 -0
- package/dist/tests/types.test.d.ts +1 -0
- package/dist/tests/utils-formatters.test.d.ts +1 -0
- package/dist/tests/utils-grantFiles-edge-cases.test.d.ts +1 -0
- package/dist/tests/utils-grantFiles-validation.test.d.ts +1 -0
- package/dist/tests/utils-grantFiles.test.d.ts +1 -0
- package/dist/tests/utils-grantValidation-consolidated.test.d.ts +1 -0
- package/dist/tests/utils-grants.test.d.ts +1 -0
- package/dist/tests/utils-ipfs-additional.test.d.ts +1 -0
- package/dist/tests/utils-ipfs.test.d.ts +4 -0
- package/dist/tests/utils-schemaValidation.test.d.ts +1 -0
- package/dist/tests/vana.test.d.ts +1 -0
- package/dist/tests/wallet-crypto-compatibility.test.d.ts +1 -0
- package/dist/types/blockchain.cjs +17 -0
- package/dist/types/blockchain.cjs.map +1 -0
- package/dist/types/blockchain.d.ts +57 -0
- package/dist/types/blockchain.js +1 -0
- package/dist/types/blockchain.js.map +1 -0
- package/dist/types/chains-additional.test.d.ts +1 -0
- package/dist/types/chains.d.ts +6 -9
- package/dist/types/config.cjs +10 -0
- package/dist/types/config.cjs.map +1 -1
- package/dist/types/config.d.ts +161 -54
- package/dist/types/config.js +8 -0
- package/dist/types/config.js.map +1 -1
- package/dist/types/contracts.cjs.map +1 -1
- package/dist/types/contracts.d.ts +8 -11
- package/dist/types/controller-context.cjs +17 -0
- package/dist/types/controller-context.cjs.map +1 -0
- package/dist/types/controller-context.d.ts +64 -0
- package/dist/types/controller-context.js +1 -0
- package/dist/types/controller-context.js.map +1 -0
- package/dist/types/data.cjs.map +1 -1
- package/dist/types/data.d.ts +107 -39
- package/dist/types/external-apis.d.ts +10 -12
- package/dist/types/generics.d.ts +35 -38
- package/dist/types/index.cjs +5 -4
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.ts +20 -34
- package/dist/types/index.js +9 -2
- package/dist/types/index.js.map +1 -1
- package/dist/types/operations.cjs +2 -2
- package/dist/types/operations.cjs.map +1 -1
- package/dist/types/operations.d.ts +32 -28
- package/dist/types/operations.js +2 -2
- package/dist/types/operations.js.map +1 -1
- package/dist/types/permissions.d.ts +55 -58
- package/dist/types/personal.cjs.map +1 -1
- package/dist/types/personal.d.ts +6 -8
- package/dist/types/relayer.d.ts +15 -18
- package/dist/types/storage.d.ts +6 -8
- package/dist/types/storage.js +2 -5
- package/dist/types/storage.js.map +1 -1
- package/dist/types/transactionResults.cjs.map +1 -1
- package/dist/types/transactionResults.d.ts +193 -25
- package/dist/types/utils.cjs.map +1 -1
- package/dist/types/utils.d.ts +26 -25
- package/dist/types.d.ts +4 -40
- package/dist/utils/__tests__/parseTransaction.test.d.ts +1 -0
- package/dist/utils/__tests__/pojo-serialization.test.d.ts +1 -0
- package/dist/utils/__tests__/signatureCache.test.d.ts +1 -0
- package/dist/utils/__tests__/transaction-edge-cases.test.d.ts +1 -0
- package/dist/utils/__tests__/transactionHelpers.test.d.ts +1 -0
- package/dist/utils/__tests__/urlResolver.test.d.ts +4 -0
- package/dist/utils/blockchain/registry.cjs +2 -2
- package/dist/utils/blockchain/registry.cjs.map +1 -1
- package/dist/utils/blockchain/registry.d.ts +6 -8
- package/dist/utils/blockchain/registry.js +2 -2
- package/dist/utils/blockchain/registry.js.map +1 -1
- package/dist/utils/blockchain/registry.test.d.ts +1 -0
- package/dist/utils/crypto-utils.cjs +0 -12
- package/dist/utils/crypto-utils.cjs.map +1 -1
- package/dist/utils/crypto-utils.d.ts +9 -27
- package/dist/utils/crypto-utils.js +0 -11
- package/dist/utils/crypto-utils.js.map +1 -1
- package/dist/utils/crypto-utils.test.d.ts +1 -0
- package/dist/utils/download.cjs +3 -3
- package/dist/utils/download.cjs.map +1 -1
- package/dist/utils/download.d.ts +13 -14
- package/dist/utils/download.js +2 -2
- package/dist/utils/download.js.map +1 -1
- package/dist/utils/encoding.cjs +1 -1
- package/dist/utils/encoding.cjs.map +1 -1
- package/dist/utils/encoding.d.ts +4 -6
- package/dist/utils/encoding.js +1 -1
- package/dist/utils/encoding.js.map +1 -1
- package/dist/utils/encoding.test.d.ts +1 -0
- package/dist/utils/encryption.cjs +16 -10
- package/dist/utils/encryption.cjs.map +1 -1
- package/dist/utils/encryption.d.ts +13 -17
- package/dist/utils/encryption.js +16 -10
- package/dist/utils/encryption.js.map +1 -1
- package/dist/utils/formatters.cjs +4 -2
- package/dist/utils/formatters.cjs.map +1 -1
- package/dist/utils/formatters.d.ts +4 -6
- package/dist/utils/formatters.js +4 -2
- package/dist/utils/formatters.js.map +1 -1
- package/dist/utils/grantFiles.cjs +7 -4
- package/dist/utils/grantFiles.cjs.map +1 -1
- package/dist/utils/grantFiles.d.ts +6 -10
- package/dist/utils/grantFiles.js +7 -4
- package/dist/utils/grantFiles.js.map +1 -1
- package/dist/utils/grantValidation.cjs +1 -1
- package/dist/utils/grantValidation.cjs.map +1 -1
- package/dist/utils/grantValidation.d.ts +14 -17
- package/dist/utils/grantValidation.js +1 -1
- package/dist/utils/grantValidation.js.map +1 -1
- package/dist/utils/grants.cjs +1 -1
- package/dist/utils/grants.cjs.map +1 -1
- package/dist/utils/grants.d.ts +10 -13
- package/dist/utils/grants.js +1 -1
- package/dist/utils/grants.js.map +1 -1
- package/dist/utils/ipfs.d.ts +8 -10
- package/dist/utils/lazy-import.cjs +4 -6
- package/dist/utils/lazy-import.cjs.map +1 -1
- package/dist/utils/lazy-import.d.ts +1 -3
- package/dist/utils/lazy-import.js +4 -6
- package/dist/utils/lazy-import.js.map +1 -1
- package/dist/utils/multicall.cjs +4 -2
- package/dist/utils/multicall.cjs.map +1 -1
- package/dist/utils/multicall.d.ts +5 -8
- package/dist/utils/multicall.js +4 -2
- package/dist/utils/multicall.js.map +1 -1
- package/dist/utils/parseTransactionPojo.cjs +87 -0
- package/dist/utils/parseTransactionPojo.cjs.map +1 -0
- package/dist/utils/parseTransactionPojo.d.ts +31 -0
- package/dist/utils/parseTransactionPojo.js +63 -0
- package/dist/utils/parseTransactionPojo.js.map +1 -0
- package/dist/utils/schemaValidation.cjs +5 -5
- package/dist/utils/schemaValidation.cjs.map +1 -1
- package/dist/utils/schemaValidation.d.ts +8 -12
- package/dist/utils/schemaValidation.js +7 -10
- package/dist/utils/schemaValidation.js.map +1 -1
- package/dist/utils/signatureCache.cjs +1 -2
- package/dist/utils/signatureCache.cjs.map +1 -1
- package/dist/utils/signatureCache.d.ts +4 -7
- package/dist/utils/signatureCache.js +4 -8
- package/dist/utils/signatureCache.js.map +1 -1
- package/dist/utils/signatureFormatter.cjs +6 -9
- package/dist/utils/signatureFormatter.cjs.map +1 -1
- package/dist/utils/signatureFormatter.d.ts +2 -5
- package/dist/utils/signatureFormatter.js +6 -9
- package/dist/utils/signatureFormatter.js.map +1 -1
- package/dist/utils/tests/multicall.test.d.ts +1 -0
- package/dist/utils/transactionHelpers.cjs +54 -0
- package/dist/utils/transactionHelpers.cjs.map +1 -0
- package/dist/utils/transactionHelpers.d.ts +80 -0
- package/dist/utils/transactionHelpers.js +29 -0
- package/dist/utils/transactionHelpers.js.map +1 -0
- package/dist/utils/typeGuards.cjs +109 -0
- package/dist/utils/typeGuards.cjs.map +1 -0
- package/dist/utils/typeGuards.d.ts +138 -0
- package/dist/utils/typeGuards.js +74 -0
- package/dist/utils/typeGuards.js.map +1 -0
- package/dist/utils/typedDataConverter.d.ts +3 -6
- package/dist/utils/urlResolver.cjs +1 -1
- package/dist/utils/urlResolver.cjs.map +1 -1
- package/dist/utils/urlResolver.d.ts +2 -4
- package/dist/utils/urlResolver.js +2 -2
- package/dist/utils/urlResolver.js.map +1 -1
- package/dist/utils/wallet.cjs +62 -0
- package/dist/utils/wallet.cjs.map +1 -0
- package/dist/utils/wallet.d.ts +32 -0
- package/dist/utils/wallet.js +36 -0
- package/dist/utils/wallet.js.map +1 -0
- package/dist/{chains.browser.cjs → utils/withEvents.cjs} +22 -15
- package/dist/utils/withEvents.cjs.map +1 -0
- package/dist/utils/withEvents.d.ts +56 -0
- package/dist/utils/withEvents.js +18 -0
- package/dist/utils/withEvents.js.map +1 -0
- package/package.json +23 -13
- package/dist/browser.d.cts +0 -2
- package/dist/chains/definitions.d.cts +0 -53
- package/dist/chains/index.d.cts +0 -2
- package/dist/chains.browser.cjs.map +0 -1
- package/dist/chains.browser.d.cts +0 -2
- package/dist/chains.d.cts +0 -2
- package/dist/chains.node.d.cts +0 -2
- package/dist/config/addresses.d.cts +0 -380
- package/dist/config/chains.d.cts +0 -85
- package/dist/config/eventMappings.cjs +0 -114
- package/dist/config/eventMappings.cjs.map +0 -1
- package/dist/config/eventMappings.d.cts +0 -108
- package/dist/config/eventMappings.d.ts +0 -108
- package/dist/config/eventMappings.js +0 -90
- package/dist/config/eventMappings.js.map +0 -1
- package/dist/config/features.d.cts +0 -64
- package/dist/contracts/contractController.d.cts +0 -96
- package/dist/controllers/data.d.cts +0 -941
- package/dist/controllers/permissions.d.cts +0 -25
- package/dist/controllers/protocol.d.cts +0 -167
- package/dist/controllers/schemas.d.cts +0 -272
- package/dist/controllers/server.d.cts +0 -243
- package/dist/core/apiClient.d.cts +0 -165
- package/dist/core/client.d.cts +0 -92
- package/dist/core/generics.d.cts +0 -120
- package/dist/core.d.cts +0 -466
- package/dist/crypto/ecies/__tests__/test-vectors.d.cts +0 -40
- package/dist/crypto/ecies/base.d.cts +0 -143
- package/dist/crypto/ecies/browser.d.cts +0 -48
- package/dist/crypto/ecies/constants.d.cts +0 -122
- package/dist/crypto/ecies/index.d.cts +0 -1
- package/dist/crypto/ecies/interface.d.cts +0 -176
- package/dist/crypto/ecies/node.d.cts +0 -50
- package/dist/crypto/ecies/utils.d.cts +0 -67
- package/dist/crypto/services/WalletKeyEncryptionService.d.cts +0 -92
- package/dist/diagnostics.d.cts +0 -26
- package/dist/errors.d.cts +0 -350
- package/dist/generated/abi/ComputeEngineImplementation.d.cts +0 -996
- package/dist/generated/abi/ComputeInstructionRegistryImplementation.d.cts +0 -545
- package/dist/generated/abi/DATFactoryImplementation.d.cts +0 -661
- package/dist/generated/abi/DATImplementation.d.cts +0 -693
- package/dist/generated/abi/DATPausableImplementation.d.cts +0 -1145
- package/dist/generated/abi/DATVotesImplementation.d.cts +0 -1095
- package/dist/generated/abi/DLPPerformanceImplementation.d.cts +0 -883
- package/dist/generated/abi/DLPRegistryImplementation.d.cts +0 -1123
- package/dist/generated/abi/DLPRegistryTreasuryImplementation.d.cts +0 -452
- package/dist/generated/abi/DLPRewardDeployerImplementation.d.cts +0 -714
- package/dist/generated/abi/DLPRewardDeployerTreasuryImplementation.d.cts +0 -452
- package/dist/generated/abi/DLPRewardSwapImplementation.d.cts +0 -706
- package/dist/generated/abi/DLPRootImplementation.d.cts +0 -1248
- package/dist/generated/abi/DLPTreasuryImplementation.d.cts +0 -452
- package/dist/generated/abi/DataLiquidityPoolImplementation.d.cts +0 -737
- package/dist/generated/abi/DataPortabilityGranteesImplementation.d.cts +0 -661
- package/dist/generated/abi/DataPortabilityPermissionsImplementation.d.cts +0 -989
- package/dist/generated/abi/DataPortabilityServersImplementation.d.cts +0 -1086
- package/dist/generated/abi/DataRefinerRegistryImplementation.d.cts +0 -737
- package/dist/generated/abi/DataRegistryImplementation.d.cts +0 -1004
- package/dist/generated/abi/QueryEngineImplementation.d.cts +0 -1001
- package/dist/generated/abi/SwapHelperImplementation.d.cts +0 -764
- package/dist/generated/abi/TeePoolDedicatedGpuImplementation.d.cts +0 -701
- package/dist/generated/abi/TeePoolDedicatedStandardImplementation.d.cts +0 -701
- package/dist/generated/abi/TeePoolEphemeralStandardImplementation.d.cts +0 -701
- package/dist/generated/abi/TeePoolImplementation.d.cts +0 -993
- package/dist/generated/abi/TeePoolPersistentGpuImplementation.d.cts +0 -701
- package/dist/generated/abi/TeePoolPersistentStandardImplementation.d.cts +0 -701
- package/dist/generated/abi/TeePoolPhalaImplementation.d.cts +0 -993
- package/dist/generated/abi/VanaEpochImplementation.d.cts +0 -900
- package/dist/generated/abi/VanaPoolEntityImplementation.d.cts +0 -934
- package/dist/generated/abi/VanaPoolStakingImplementation.d.cts +0 -693
- package/dist/generated/abi/VanaPoolTreasuryImplementation.d.cts +0 -394
- package/dist/generated/abi/index.d.cts +0 -26516
- package/dist/generated/server/server-exports.d.cts +0 -21
- package/dist/generated/server/server.d.cts +0 -512
- package/dist/generated/subgraph.d.cts +0 -5981
- package/dist/index.browser.cjs +0 -151
- package/dist/index.browser.cjs.map +0 -1
- package/dist/index.browser.d.cts +0 -177
- package/dist/index.d.cts +0 -2
- package/dist/index.node.d.cts +0 -64
- package/dist/node.d.cts +0 -2
- package/dist/permissions-DNKPu_G0.d.cts +0 -1666
- package/dist/permissions-eo8YeLGf.d.ts +0 -1666
- package/dist/platform/browser-only.d.cts +0 -25
- package/dist/platform/browser-safe.d.cts +0 -32
- package/dist/platform/browser.d.cts +0 -74
- package/dist/platform/index.d.cts +0 -5
- package/dist/platform/interface.d.cts +0 -218
- package/dist/platform/node.d.cts +0 -27
- package/dist/platform/shared/error-utils.d.cts +0 -25
- package/dist/platform/shared/pgp-utils.d.cts +0 -61
- package/dist/platform/shared/stream-utils.d.cts +0 -16
- package/dist/platform/utils.d.cts +0 -53
- package/dist/platform.browser.cjs +0 -41
- package/dist/platform.browser.cjs.map +0 -1
- package/dist/platform.browser.d.cts +0 -4
- package/dist/platform.d.cts +0 -5
- package/dist/platform.node.d.cts +0 -5
- package/dist/server/handler.d.cts +0 -282
- package/dist/storage/index.d.cts +0 -10
- package/dist/storage/manager.d.cts +0 -150
- package/dist/storage/providers/callback-storage.d.cts +0 -100
- package/dist/storage/providers/google-drive.d.cts +0 -156
- package/dist/storage/providers/ipfs.d.cts +0 -163
- package/dist/storage/providers/pinata.d.cts +0 -173
- package/dist/types/chains.d.cts +0 -34
- package/dist/types/config.d.cts +0 -726
- package/dist/types/contracts.d.cts +0 -68
- package/dist/types/data.d.cts +0 -694
- package/dist/types/eccrypto-js.d.d.cts +0 -13
- package/dist/types/eccrypto-js.d.d.ts +0 -13
- package/dist/types/external-apis.d.cts +0 -186
- package/dist/types/generics.d.cts +0 -450
- package/dist/types/index.d.cts +0 -34
- package/dist/types/operations.d.cts +0 -108
- package/dist/types/permissions.d.cts +0 -957
- package/dist/types/personal.d.cts +0 -40
- package/dist/types/relayer.d.cts +0 -284
- package/dist/types/storage.d.cts +0 -131
- package/dist/types/transactionResults.d.cts +0 -25
- package/dist/types/utils.d.cts +0 -819
- package/dist/types.d.cts +0 -66
- package/dist/utils/blockchain/registry.d.cts +0 -34
- package/dist/utils/crypto-utils.d.cts +0 -118
- package/dist/utils/download.d.cts +0 -41
- package/dist/utils/encoding.d.cts +0 -54
- package/dist/utils/encryption.d.cts +0 -275
- package/dist/utils/eventParsing.cjs +0 -111
- package/dist/utils/eventParsing.cjs.map +0 -1
- package/dist/utils/eventParsing.d.cts +0 -60
- package/dist/utils/eventParsing.d.ts +0 -60
- package/dist/utils/eventParsing.js +0 -86
- package/dist/utils/eventParsing.js.map +0 -1
- package/dist/utils/formatters.d.cts +0 -120
- package/dist/utils/grantFiles.d.cts +0 -186
- package/dist/utils/grantValidation.d.cts +0 -150
- package/dist/utils/grants.d.cts +0 -70
- package/dist/utils/ipfs.d.cts +0 -90
- package/dist/utils/lazy-import.d.cts +0 -20
- package/dist/utils/multicall.d.cts +0 -129
- package/dist/utils/schemaValidation.d.cts +0 -172
- package/dist/utils/signatureCache.d.cts +0 -134
- package/dist/utils/signatureFormatter.d.cts +0 -39
- package/dist/utils/transactionParsing.cjs +0 -84
- package/dist/utils/transactionParsing.cjs.map +0 -1
- package/dist/utils/transactionParsing.d.cts +0 -25
- package/dist/utils/transactionParsing.d.ts +0 -25
- package/dist/utils/transactionParsing.js +0 -62
- package/dist/utils/transactionParsing.js.map +0 -1
- package/dist/utils/typedDataConverter.d.cts +0 -13
- package/dist/utils/urlResolver.d.cts +0 -40
package/dist/types/generics.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import type { Address, Hash } from "viem";
|
|
3
2
|
/**
|
|
4
3
|
* Generic request pattern for all SDK operations
|
|
5
4
|
*
|
|
6
5
|
* @category Reference
|
|
7
6
|
*/
|
|
8
|
-
interface GenericRequest<TParams = unknown, TOptions = unknown> {
|
|
7
|
+
export interface GenericRequest<TParams = unknown, TOptions = unknown> {
|
|
9
8
|
/** Request parameters */
|
|
10
9
|
params: TParams;
|
|
11
10
|
/** Additional request options */
|
|
@@ -16,7 +15,7 @@ interface GenericRequest<TParams = unknown, TOptions = unknown> {
|
|
|
16
15
|
*
|
|
17
16
|
* @category Reference
|
|
18
17
|
*/
|
|
19
|
-
interface GenericResponse<TData = unknown, TMeta = unknown> {
|
|
18
|
+
export interface GenericResponse<TData = unknown, TMeta = unknown> {
|
|
20
19
|
/** Response data */
|
|
21
20
|
data: TData;
|
|
22
21
|
/** Response metadata */
|
|
@@ -35,7 +34,7 @@ interface GenericResponse<TData = unknown, TMeta = unknown> {
|
|
|
35
34
|
*
|
|
36
35
|
* @category Reference
|
|
37
36
|
*/
|
|
38
|
-
interface AsyncResult<T> {
|
|
37
|
+
export interface AsyncResult<T> {
|
|
39
38
|
/** Operation result */
|
|
40
39
|
result: T;
|
|
41
40
|
/** Transaction hash if applicable */
|
|
@@ -50,7 +49,7 @@ interface AsyncResult<T> {
|
|
|
50
49
|
*
|
|
51
50
|
* @category Reference
|
|
52
51
|
*/
|
|
53
|
-
interface ContractCall<TArgs extends readonly unknown[] = readonly unknown[]> {
|
|
52
|
+
export interface ContractCall<TArgs extends readonly unknown[] = readonly unknown[]> {
|
|
54
53
|
/** Contract method name */
|
|
55
54
|
method: string;
|
|
56
55
|
/** Method arguments */
|
|
@@ -70,7 +69,7 @@ interface ContractCall<TArgs extends readonly unknown[] = readonly unknown[]> {
|
|
|
70
69
|
*
|
|
71
70
|
* @category Reference
|
|
72
71
|
*/
|
|
73
|
-
interface EventFilter<TEventArgs = unknown> {
|
|
72
|
+
export interface EventFilter<TEventArgs = unknown> {
|
|
74
73
|
/** Event name */
|
|
75
74
|
event: string;
|
|
76
75
|
/** Event arguments filter */
|
|
@@ -87,7 +86,7 @@ interface EventFilter<TEventArgs = unknown> {
|
|
|
87
86
|
*
|
|
88
87
|
* @category Reference
|
|
89
88
|
*/
|
|
90
|
-
interface EventLog<TArgs = unknown> {
|
|
89
|
+
export interface EventLog<TArgs = unknown> {
|
|
91
90
|
/** Event name */
|
|
92
91
|
event: string;
|
|
93
92
|
/** Event arguments */
|
|
@@ -108,7 +107,7 @@ interface EventLog<TArgs = unknown> {
|
|
|
108
107
|
*
|
|
109
108
|
* @category Reference
|
|
110
109
|
*/
|
|
111
|
-
interface ControllerContext<TClient = unknown, TConfig = unknown> {
|
|
110
|
+
export interface ControllerContext<TClient = unknown, TConfig = unknown> {
|
|
112
111
|
/** Client instance */
|
|
113
112
|
client: TClient;
|
|
114
113
|
/** Configuration */
|
|
@@ -121,7 +120,7 @@ interface ControllerContext<TClient = unknown, TConfig = unknown> {
|
|
|
121
120
|
*
|
|
122
121
|
* @category Reference
|
|
123
122
|
*/
|
|
124
|
-
interface Controller<TContext = unknown> {
|
|
123
|
+
export interface Controller<TContext = unknown> {
|
|
125
124
|
/** Controller context */
|
|
126
125
|
readonly context: TContext;
|
|
127
126
|
}
|
|
@@ -130,7 +129,7 @@ interface Controller<TContext = unknown> {
|
|
|
130
129
|
*
|
|
131
130
|
* @category Reference
|
|
132
131
|
*/
|
|
133
|
-
interface StorageProvider<TConfig = unknown, TOptions = unknown> {
|
|
132
|
+
export interface StorageProvider<TConfig = unknown, TOptions = unknown> {
|
|
134
133
|
/** Provider name */
|
|
135
134
|
readonly name: string;
|
|
136
135
|
/** Provider configuration */
|
|
@@ -157,7 +156,7 @@ interface StorageProvider<TConfig = unknown, TOptions = unknown> {
|
|
|
157
156
|
*
|
|
158
157
|
* @category Reference
|
|
159
158
|
*/
|
|
160
|
-
interface Cache<TKey = string, TValue = unknown> {
|
|
159
|
+
export interface Cache<TKey = string, TValue = unknown> {
|
|
161
160
|
/** Get value from cache */
|
|
162
161
|
get(key: TKey): Promise<TValue | undefined>;
|
|
163
162
|
/** Set value in cache */
|
|
@@ -174,7 +173,7 @@ interface Cache<TKey = string, TValue = unknown> {
|
|
|
174
173
|
*
|
|
175
174
|
* @category Reference
|
|
176
175
|
*/
|
|
177
|
-
interface RetryConfig<TError = Error> {
|
|
176
|
+
export interface RetryConfig<TError = Error> {
|
|
178
177
|
/** Maximum retry attempts */
|
|
179
178
|
maxAttempts: number;
|
|
180
179
|
/** Base delay in milliseconds */
|
|
@@ -193,7 +192,7 @@ interface RetryConfig<TError = Error> {
|
|
|
193
192
|
*
|
|
194
193
|
* @category Reference
|
|
195
194
|
*/
|
|
196
|
-
interface RateLimiterConfig {
|
|
195
|
+
export interface RateLimiterConfig {
|
|
197
196
|
/** Requests per time window */
|
|
198
197
|
requestsPerWindow: number;
|
|
199
198
|
/** Time window in milliseconds */
|
|
@@ -206,7 +205,7 @@ interface RateLimiterConfig {
|
|
|
206
205
|
*
|
|
207
206
|
* @category Reference
|
|
208
207
|
*/
|
|
209
|
-
interface Middleware<TRequest = unknown, TResponse = unknown> {
|
|
208
|
+
export interface Middleware<TRequest = unknown, TResponse = unknown> {
|
|
210
209
|
/** Middleware name */
|
|
211
210
|
readonly name: string;
|
|
212
211
|
/** Process request */
|
|
@@ -221,7 +220,7 @@ interface Middleware<TRequest = unknown, TResponse = unknown> {
|
|
|
221
220
|
*
|
|
222
221
|
* @category Reference
|
|
223
222
|
*/
|
|
224
|
-
interface Plugin<TConfig = unknown> {
|
|
223
|
+
export interface Plugin<TConfig = unknown> {
|
|
225
224
|
/** Plugin name */
|
|
226
225
|
readonly name: string;
|
|
227
226
|
/** Plugin version */
|
|
@@ -238,7 +237,7 @@ interface Plugin<TConfig = unknown> {
|
|
|
238
237
|
*
|
|
239
238
|
* @category Reference
|
|
240
239
|
*/
|
|
241
|
-
interface Factory<T, TParams = unknown> {
|
|
240
|
+
export interface Factory<T, TParams = unknown> {
|
|
242
241
|
/** Create instance */
|
|
243
242
|
create(params: TParams): T;
|
|
244
243
|
/** Create multiple instances */
|
|
@@ -251,7 +250,7 @@ interface Factory<T, TParams = unknown> {
|
|
|
251
250
|
*
|
|
252
251
|
* @category Reference
|
|
253
252
|
*/
|
|
254
|
-
interface Repository<TEntity, TKey = string | number> {
|
|
253
|
+
export interface Repository<TEntity, TKey = string | number> {
|
|
255
254
|
/** Find by ID */
|
|
256
255
|
findById(id: TKey): Promise<TEntity | undefined>;
|
|
257
256
|
/** Find all entities */
|
|
@@ -282,7 +281,7 @@ interface Repository<TEntity, TKey = string | number> {
|
|
|
282
281
|
*
|
|
283
282
|
* @category Reference
|
|
284
283
|
*/
|
|
285
|
-
interface Validator<T> {
|
|
284
|
+
export interface Validator<T> {
|
|
286
285
|
/** Validate value */
|
|
287
286
|
validate(value: unknown): value is T;
|
|
288
287
|
/** Get validation errors */
|
|
@@ -295,7 +294,7 @@ interface Validator<T> {
|
|
|
295
294
|
*
|
|
296
295
|
* @category Reference
|
|
297
296
|
*/
|
|
298
|
-
interface Transformer<TInput, TOutput> {
|
|
297
|
+
export interface Transformer<TInput, TOutput> {
|
|
299
298
|
/** Transform input to output */
|
|
300
299
|
transform(input: TInput): TOutput | Promise<TOutput>;
|
|
301
300
|
/** Reverse transform output to input */
|
|
@@ -306,7 +305,7 @@ interface Transformer<TInput, TOutput> {
|
|
|
306
305
|
*
|
|
307
306
|
* @category Reference
|
|
308
307
|
*/
|
|
309
|
-
interface Service<TConfig = unknown> {
|
|
308
|
+
export interface Service<TConfig = unknown> {
|
|
310
309
|
/** Service name */
|
|
311
310
|
readonly name: string;
|
|
312
311
|
/** Service configuration */
|
|
@@ -330,7 +329,7 @@ interface Service<TConfig = unknown> {
|
|
|
330
329
|
*
|
|
331
330
|
* @category Reference
|
|
332
331
|
*/
|
|
333
|
-
interface Observer<TEvent = unknown> {
|
|
332
|
+
export interface Observer<TEvent = unknown> {
|
|
334
333
|
/** Handle event */
|
|
335
334
|
notify(event: TEvent): void | Promise<void>;
|
|
336
335
|
}
|
|
@@ -339,7 +338,7 @@ interface Observer<TEvent = unknown> {
|
|
|
339
338
|
*
|
|
340
339
|
* @category Reference
|
|
341
340
|
*/
|
|
342
|
-
interface Observable<TEvent = unknown> {
|
|
341
|
+
export interface Observable<TEvent = unknown> {
|
|
343
342
|
/** Subscribe to events */
|
|
344
343
|
subscribe(observer: Observer<TEvent>): () => void;
|
|
345
344
|
/** Unsubscribe from events */
|
|
@@ -352,7 +351,7 @@ interface Observable<TEvent = unknown> {
|
|
|
352
351
|
*
|
|
353
352
|
* @category Reference
|
|
354
353
|
*/
|
|
355
|
-
interface StateMachine<TState, TEvent> {
|
|
354
|
+
export interface StateMachine<TState, TEvent> {
|
|
356
355
|
/** Current state */
|
|
357
356
|
readonly currentState: TState;
|
|
358
357
|
/** Transition to new state */
|
|
@@ -367,25 +366,25 @@ interface StateMachine<TState, TEvent> {
|
|
|
367
366
|
*
|
|
368
367
|
* @category Reference
|
|
369
368
|
*/
|
|
370
|
-
type ConditionalOptional<T, K extends keyof T, Condition extends boolean> = Condition extends true ? Omit<T, K> & Partial<Pick<T, K>> : T;
|
|
369
|
+
export type ConditionalOptional<T, K extends keyof T, Condition extends boolean> = Condition extends true ? Omit<T, K> & Partial<Pick<T, K>> : T;
|
|
371
370
|
/**
|
|
372
371
|
* Helper type to extract promise result type
|
|
373
372
|
*
|
|
374
373
|
* @category Reference
|
|
375
374
|
*/
|
|
376
|
-
type PromiseResult<T> = T extends Promise<infer U> ? U : T;
|
|
375
|
+
export type PromiseResult<T> = T extends Promise<infer U> ? U : T;
|
|
377
376
|
/**
|
|
378
377
|
* Helper type to create a union of all possible keys
|
|
379
378
|
*
|
|
380
379
|
* @category Reference
|
|
381
380
|
*/
|
|
382
|
-
type AllKeys<T> = T extends unknown ? keyof T : never;
|
|
381
|
+
export type AllKeys<T> = T extends unknown ? keyof T : never;
|
|
383
382
|
/**
|
|
384
383
|
* Helper type to create a deep partial type
|
|
385
384
|
*
|
|
386
385
|
* @category Reference
|
|
387
386
|
*/
|
|
388
|
-
type DeepPartial<T> = {
|
|
387
|
+
export type DeepPartial<T> = {
|
|
389
388
|
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
390
389
|
};
|
|
391
390
|
/**
|
|
@@ -393,7 +392,7 @@ type DeepPartial<T> = {
|
|
|
393
392
|
*
|
|
394
393
|
* @category Reference
|
|
395
394
|
*/
|
|
396
|
-
type DeepReadonly<T> = {
|
|
395
|
+
export type DeepReadonly<T> = {
|
|
397
396
|
readonly [P in keyof T]: T[P] extends object ? DeepReadonly<T[P]> : T[P];
|
|
398
397
|
};
|
|
399
398
|
/**
|
|
@@ -401,25 +400,25 @@ type DeepReadonly<T> = {
|
|
|
401
400
|
*
|
|
402
401
|
* @category Reference
|
|
403
402
|
*/
|
|
404
|
-
type RequireKeys<T, K extends keyof T> = Required<Pick<T, K>> & Omit<T, K>;
|
|
403
|
+
export type RequireKeys<T, K extends keyof T> = Required<Pick<T, K>> & Omit<T, K>;
|
|
405
404
|
/**
|
|
406
405
|
* Helper type to create an optional type with specific keys
|
|
407
406
|
*
|
|
408
407
|
* @category Reference
|
|
409
408
|
*/
|
|
410
|
-
type OptionalKeys<T, K extends keyof T> = Partial<Pick<T, K>> & Omit<T, K>;
|
|
409
|
+
export type OptionalKeys<T, K extends keyof T> = Partial<Pick<T, K>> & Omit<T, K>;
|
|
411
410
|
/**
|
|
412
411
|
* Helper type to exclude null and undefined
|
|
413
412
|
*
|
|
414
413
|
* @category Reference
|
|
415
414
|
*/
|
|
416
|
-
type NonNullable<T> = T extends null | undefined ? never : T;
|
|
415
|
+
export type NonNullable<T> = T extends null | undefined ? never : T;
|
|
417
416
|
/**
|
|
418
417
|
* Helper type to create a type with only specific keys
|
|
419
418
|
*
|
|
420
419
|
* @category Reference
|
|
421
420
|
*/
|
|
422
|
-
type PickByType<T, U> = {
|
|
421
|
+
export type PickByType<T, U> = {
|
|
423
422
|
[K in keyof T as T[K] extends U ? K : never]: T[K];
|
|
424
423
|
};
|
|
425
424
|
/**
|
|
@@ -427,7 +426,7 @@ type PickByType<T, U> = {
|
|
|
427
426
|
*
|
|
428
427
|
* @category Reference
|
|
429
428
|
*/
|
|
430
|
-
type OmitByType<T, U> = {
|
|
429
|
+
export type OmitByType<T, U> = {
|
|
431
430
|
[K in keyof T as T[K] extends U ? never : K]: T[K];
|
|
432
431
|
};
|
|
433
432
|
/**
|
|
@@ -435,7 +434,7 @@ type OmitByType<T, U> = {
|
|
|
435
434
|
*
|
|
436
435
|
* @category Reference
|
|
437
436
|
*/
|
|
438
|
-
type Brand<T, B> = T & {
|
|
437
|
+
export type Brand<T, B> = T & {
|
|
439
438
|
readonly __brand: B;
|
|
440
439
|
};
|
|
441
440
|
/**
|
|
@@ -443,8 +442,6 @@ type Brand<T, B> = T & {
|
|
|
443
442
|
*
|
|
444
443
|
* @category Reference
|
|
445
444
|
*/
|
|
446
|
-
type Nominal<T, N extends string> = T & {
|
|
445
|
+
export type Nominal<T, N extends string> = T & {
|
|
447
446
|
readonly __nominal: N;
|
|
448
447
|
};
|
|
449
|
-
|
|
450
|
-
export type { AllKeys, AsyncResult, Brand, Cache, ConditionalOptional, ContractCall, Controller, ControllerContext, DeepPartial, DeepReadonly, EventFilter, EventLog, Factory, GenericRequest, GenericResponse, Middleware, Nominal, NonNullable, Observable, Observer, OmitByType, OptionalKeys, PickByType, Plugin, PromiseResult, RateLimiterConfig, Repository, RequireKeys, RetryConfig, Service, StateMachine, StorageProvider, Transformer, Validator };
|
package/dist/types/index.cjs
CHANGED
|
@@ -15,7 +15,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
}
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
19
|
var types_exports = {};
|
|
21
20
|
__export(types_exports, {
|
|
@@ -25,7 +24,9 @@ __export(types_exports, {
|
|
|
25
24
|
fetchAndValidateSchema: () => import_schemaValidation.fetchAndValidateSchema,
|
|
26
25
|
hasStorageConfig: () => import_config.hasStorageConfig,
|
|
27
26
|
isAPIResponse: () => import_external_apis.isAPIResponse,
|
|
27
|
+
isAddressOnlyConfig: () => import_config.isAddressOnlyConfig,
|
|
28
28
|
isChainConfig: () => import_config.isChainConfig,
|
|
29
|
+
isReadOnlyConfig: () => import_config.isReadOnlyConfig,
|
|
29
30
|
isReplicateAPIResponse: () => import_external_apis.isReplicateAPIResponse,
|
|
30
31
|
isVanaChain: () => import_chains.isVanaChain,
|
|
31
32
|
isVanaChainId: () => import_chains.isVanaChainId,
|
|
@@ -40,7 +41,6 @@ var import_config = require("./config");
|
|
|
40
41
|
var import_chains = require("./chains");
|
|
41
42
|
var import_storage = require("./storage");
|
|
42
43
|
var import_schemaValidation = require("../utils/schemaValidation");
|
|
43
|
-
__reExport(types_exports, require("../generated/server/server-exports"), module.exports);
|
|
44
44
|
var import_external_apis = require("./external-apis");
|
|
45
45
|
// Annotate the CommonJS export names for ESM import in node:
|
|
46
46
|
0 && (module.exports = {
|
|
@@ -50,7 +50,9 @@ var import_external_apis = require("./external-apis");
|
|
|
50
50
|
fetchAndValidateSchema,
|
|
51
51
|
hasStorageConfig,
|
|
52
52
|
isAPIResponse,
|
|
53
|
+
isAddressOnlyConfig,
|
|
53
54
|
isChainConfig,
|
|
55
|
+
isReadOnlyConfig,
|
|
54
56
|
isReplicateAPIResponse,
|
|
55
57
|
isVanaChain,
|
|
56
58
|
isVanaChainId,
|
|
@@ -58,7 +60,6 @@ var import_external_apis = require("./external-apis");
|
|
|
58
60
|
parseReplicateOutput,
|
|
59
61
|
safeParseJSON,
|
|
60
62
|
validateDataAgainstSchema,
|
|
61
|
-
validateDataSchemaAgainstMetaSchema
|
|
62
|
-
...require("../generated/server/server-exports")
|
|
63
|
+
validateDataSchemaAgainstMetaSchema
|
|
63
64
|
});
|
|
64
65
|
//# sourceMappingURL=index.cjs.map
|
package/dist/types/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["// Configuration types\nexport type {\n BaseConfig,\n BaseConfigWithStorage,\n WalletConfig,\n WalletConfigWithStorage,\n ChainConfig,\n ChainConfigWithStorage,\n VanaConfig,\n VanaConfigWithStorage,\n RuntimeConfig,\n StorageConfig,\n ConfigValidationOptions,\n ConfigValidationResult,\n RelayerCallbacks,\n DownloadRelayerCallbacks,\n StorageRequiredMarker,\n} from \"./config\";\n\nexport {
|
|
1
|
+
{"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["// Configuration types\nexport type {\n BaseConfig,\n BaseConfigWithStorage,\n WalletConfig,\n WalletConfigWithStorage,\n ChainConfig,\n ChainConfigWithStorage,\n VanaConfig,\n VanaConfigWithStorage,\n VanaConfigWithWallet,\n VanaConfigReadOnly,\n VanaConfigAddressOnly,\n VanaConfigWithWalletWithStorage,\n VanaConfigReadOnlyWithStorage,\n VanaConfigAddressOnlyWithStorage,\n RuntimeConfig,\n StorageConfig,\n ConfigValidationOptions,\n ConfigValidationResult,\n RelayerCallbacks,\n DownloadRelayerCallbacks,\n StorageRequiredMarker,\n} from \"./config\";\n\nexport {\n isWalletConfig,\n isChainConfig,\n isReadOnlyConfig,\n isAddressOnlyConfig,\n hasStorageConfig,\n} from \"./config\";\n\n// Chain types\nexport type { VanaChainId, VanaChain } from \"./chains\";\n\nexport { isVanaChainId, isVanaChain } from \"./chains\";\n\n// Contract types\nexport type {\n VanaContractName,\n ContractInfo,\n ContractDeployment,\n VanaContractInstance,\n ContractAddresses,\n ContractMethodParams,\n ContractMethodReturnType,\n} from \"./contracts\";\n\n// Note: VanaContract and ContractAbis are exported directly from src/index.ts\n// to avoid circular dependencies. Do not re-export them here.\n\n// Storage types\nexport type {\n StorageProvider,\n StorageUploadResult,\n StorageFile,\n StorageListOptions,\n StorageProviderConfig,\n} from \"./storage\";\n\nexport { StorageError } from \"./storage\";\n\n// Data types\nexport type {\n UserFile,\n FileMetadata,\n UploadParams,\n FilePermissionParams,\n LegacyPermissionParams,\n EncryptedUploadParams,\n UnencryptedUploadParams,\n UploadResult,\n UploadFileParams,\n UploadFileResult,\n UploadEncryptedFileResult,\n EncryptionInfo,\n GetUserFilesParams,\n GetFileParams,\n EncryptFileOptions,\n EncryptFileResult,\n DecryptFileOptions,\n UploadFileWithPermissionsParams,\n AddFilePermissionParams,\n DecryptFileWithPermissionOptions,\n DownloadFileParams,\n DownloadFileResult,\n DeleteFileParams,\n DeleteFileResult,\n FileAccessPermissions,\n FileSharingConfig,\n BatchUploadParams,\n BatchUploadResult,\n SchemaMetadata,\n CompleteSchema,\n Schema,\n Refiner,\n AddSchemaParams,\n AddSchemaResult,\n AddRefinerParams,\n AddRefinerResult,\n UpdateSchemaIdParams,\n UpdateSchemaIdResult,\n TrustedServer,\n GetUserTrustedServersParams,\n} from \"./data\";\n\n// Schema types\nexport type {\n CreateSchemaParams,\n CreateSchemaResult,\n} from \"../controllers/schemas\";\n\n// Schema validation types\nexport type { DataSchema } from \"../utils/schemaValidation\";\nexport {\n SchemaValidationError,\n SchemaValidator,\n validateDataSchemaAgainstMetaSchema,\n validateDataAgainstSchema,\n fetchAndValidateSchema,\n} from \"../utils/schemaValidation\";\n\n// Permission types\nexport type {\n OnChainPermissionGrant,\n GetUserPermissionsOptions,\n GrantPermissionParams,\n RevokePermissionParams,\n CheckPermissionParams,\n PermissionCheckResult,\n PermissionGrantDomain,\n PermissionGrantMessage,\n PermissionInputMessage,\n SimplifiedPermissionMessage,\n GrantFile,\n PermissionGrantTypedData,\n RevokePermissionTypedData,\n GenericTypedData,\n TypedDataPrimaryType,\n SpecificTypedData,\n PermissionOperation,\n PermissionStatus,\n QueryPermissionsParams,\n PermissionQueryResult,\n PermissionAnalytics,\n PermissionEvent,\n GrantedPermission,\n Server,\n AddAndTrustServerParams,\n TrustServerParams,\n UntrustServerParams,\n AddAndTrustServerInput,\n TrustServerInput,\n UntrustServerInput,\n AddAndTrustServerTypedData,\n TrustServerTypedData,\n UntrustServerTypedData,\n PermissionInfo,\n RevokePermissionInput,\n TrustedServerInfo,\n PaginatedTrustedServers,\n TrustedServerQueryOptions,\n BatchServerInfoResult,\n ServerTrustStatus,\n ServerInfo,\n Grantee,\n GranteeInfo,\n RegisterGranteeParams,\n RegisterGranteeInput,\n RegisterGranteeTypedData,\n GranteeQueryOptions,\n PaginatedGrantees,\n ServerFilesAndPermissionParams,\n ServerFilesAndPermissionTypedData,\n Permission,\n} from \"./permissions\";\n\n// Personal server types\nexport type {\n PostRequestParams,\n CreateOperationParams,\n InitPersonalServerParams,\n PersonalServerIdentity,\n} from \"./personal\";\n\n// Server API types (auto-generated via fetch-server-types.ts)\nexport type * from \"../generated/server/server-exports\";\n\n// External API types\nexport type {\n ReplicateAPIResponse,\n ReplicateStatus,\n PinataUploadResponse,\n PinataPin,\n PinataListResponse,\n APIResponse,\n} from \"./external-apis\";\n\nexport {\n isReplicateAPIResponse,\n isAPIResponse,\n safeParseJSON,\n parseReplicateOutput,\n} from \"./external-apis\";\n\n// Relayer types\nexport type {\n RelayerStorageResponse,\n RelayerTransactionResponse,\n RelayerStoreParams,\n RelayerSubmitParams,\n RelayerStatus,\n RelayerConfig,\n RelayerRequestOptions,\n RelayerErrorResponse,\n RelayerQueueInfo,\n RelayerTransactionStatus,\n RelayerMetrics,\n RelayerWebhookConfig,\n RelayerWebhookPayload,\n} from \"./relayer\";\n\n// Utility types\nexport type {\n PartialExcept,\n RequiredExcept,\n Awaited,\n MaybePromise,\n MaybeArray,\n PaginationParams,\n PaginationResult,\n BlockRange,\n TransactionOptions,\n TransactionReceipt,\n ApiResponse,\n CacheConfig,\n ValidationResult,\n StatusInfo,\n RateLimitInfo,\n UploadProgress,\n NetworkInfo,\n GasEstimate,\n TimeRange,\n} from \"./utils\";\n\n// Generic types for extensibility\nexport type {\n GenericRequest,\n GenericResponse,\n AsyncResult,\n ContractCall,\n EventFilter,\n EventLog,\n ControllerContext,\n Controller,\n Cache,\n RetryConfig,\n RateLimiterConfig,\n Middleware,\n Plugin,\n Factory,\n Repository,\n Validator,\n Transformer,\n Service,\n Observer,\n Observable,\n StateMachine,\n ConditionalOptional,\n PromiseResult,\n AllKeys,\n DeepPartial,\n DeepReadonly,\n RequireKeys,\n OptionalKeys,\n NonNullable,\n PickByType,\n OmitByType,\n Brand,\n Nominal,\n} from \"./generics\";\n\n// Re-export viem types that are commonly used\nexport type {\n Address,\n Hash,\n Abi,\n Chain,\n WalletClient,\n PublicClient,\n Account,\n GetContractReturnType,\n} from \"viem\";\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAyBA,oBAMO;AAKP,oBAA2C;AAyB3C,qBAA6B;AAsD7B,8BAMO;AA8EP,2BAKO;","names":[]}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,34 +1,20 @@
|
|
|
1
|
-
export { BaseConfig, BaseConfigWithStorage, ChainConfig, ChainConfigWithStorage,
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
import '../generated/abi/DataPortabilityPermissionsImplementation.js';
|
|
22
|
-
import '../generated/abi/DataPortabilityServersImplementation.js';
|
|
23
|
-
import '../generated/abi/DataPortabilityGranteesImplementation.js';
|
|
24
|
-
import '../generated/abi/VanaEpochImplementation.js';
|
|
25
|
-
import '../generated/abi/DLPRegistryImplementation.js';
|
|
26
|
-
import '../generated/abi/DLPTreasuryImplementation.js';
|
|
27
|
-
import '../generated/abi/DLPRewardDeployerTreasuryImplementation.js';
|
|
28
|
-
import '../generated/abi/DLPPerformanceImplementation.js';
|
|
29
|
-
import '../generated/abi/DLPRewardDeployerImplementation.js';
|
|
30
|
-
import '../generated/abi/DLPRootImplementation.js';
|
|
31
|
-
import '../generated/abi/DataLiquidityPoolImplementation.js';
|
|
32
|
-
import '../generated/abi/DLPRegistryTreasuryImplementation.js';
|
|
33
|
-
import '../storage/manager.js';
|
|
34
|
-
import '../platform/interface.js';
|
|
1
|
+
export type { BaseConfig, BaseConfigWithStorage, WalletConfig, WalletConfigWithStorage, ChainConfig, ChainConfigWithStorage, VanaConfig, VanaConfigWithStorage, VanaConfigWithWallet, VanaConfigReadOnly, VanaConfigAddressOnly, VanaConfigWithWalletWithStorage, VanaConfigReadOnlyWithStorage, VanaConfigAddressOnlyWithStorage, RuntimeConfig, StorageConfig, ConfigValidationOptions, ConfigValidationResult, RelayerCallbacks, DownloadRelayerCallbacks, StorageRequiredMarker, } from "./config";
|
|
2
|
+
export { isWalletConfig, isChainConfig, isReadOnlyConfig, isAddressOnlyConfig, hasStorageConfig, } from "./config";
|
|
3
|
+
export type { VanaChainId, VanaChain } from "./chains";
|
|
4
|
+
export { isVanaChainId, isVanaChain } from "./chains";
|
|
5
|
+
export type { VanaContractName, ContractInfo, ContractDeployment, VanaContractInstance, ContractAddresses, ContractMethodParams, ContractMethodReturnType, } from "./contracts";
|
|
6
|
+
export type { StorageProvider, StorageUploadResult, StorageFile, StorageListOptions, StorageProviderConfig, } from "./storage";
|
|
7
|
+
export { StorageError } from "./storage";
|
|
8
|
+
export type { UserFile, FileMetadata, UploadParams, FilePermissionParams, LegacyPermissionParams, EncryptedUploadParams, UnencryptedUploadParams, UploadResult, UploadFileParams, UploadFileResult, UploadEncryptedFileResult, EncryptionInfo, GetUserFilesParams, GetFileParams, EncryptFileOptions, EncryptFileResult, DecryptFileOptions, UploadFileWithPermissionsParams, AddFilePermissionParams, DecryptFileWithPermissionOptions, DownloadFileParams, DownloadFileResult, DeleteFileParams, DeleteFileResult, FileAccessPermissions, FileSharingConfig, BatchUploadParams, BatchUploadResult, SchemaMetadata, CompleteSchema, Schema, Refiner, AddSchemaParams, AddSchemaResult, AddRefinerParams, AddRefinerResult, UpdateSchemaIdParams, UpdateSchemaIdResult, TrustedServer, GetUserTrustedServersParams, } from "./data";
|
|
9
|
+
export type { CreateSchemaParams, CreateSchemaResult, } from "../controllers/schemas";
|
|
10
|
+
export type { DataSchema } from "../utils/schemaValidation";
|
|
11
|
+
export { SchemaValidationError, SchemaValidator, validateDataSchemaAgainstMetaSchema, validateDataAgainstSchema, fetchAndValidateSchema, } from "../utils/schemaValidation";
|
|
12
|
+
export type { OnChainPermissionGrant, GetUserPermissionsOptions, GrantPermissionParams, RevokePermissionParams, CheckPermissionParams, PermissionCheckResult, PermissionGrantDomain, PermissionGrantMessage, PermissionInputMessage, SimplifiedPermissionMessage, GrantFile, PermissionGrantTypedData, RevokePermissionTypedData, GenericTypedData, TypedDataPrimaryType, SpecificTypedData, PermissionOperation, PermissionStatus, QueryPermissionsParams, PermissionQueryResult, PermissionAnalytics, PermissionEvent, GrantedPermission, Server, AddAndTrustServerParams, TrustServerParams, UntrustServerParams, AddAndTrustServerInput, TrustServerInput, UntrustServerInput, AddAndTrustServerTypedData, TrustServerTypedData, UntrustServerTypedData, PermissionInfo, RevokePermissionInput, TrustedServerInfo, PaginatedTrustedServers, TrustedServerQueryOptions, BatchServerInfoResult, ServerTrustStatus, ServerInfo, Grantee, GranteeInfo, RegisterGranteeParams, RegisterGranteeInput, RegisterGranteeTypedData, GranteeQueryOptions, PaginatedGrantees, ServerFilesAndPermissionParams, ServerFilesAndPermissionTypedData, Permission, } from "./permissions";
|
|
13
|
+
export type { PostRequestParams, CreateOperationParams, InitPersonalServerParams, PersonalServerIdentity, } from "./personal";
|
|
14
|
+
export type * from "../generated/server/server-exports";
|
|
15
|
+
export type { ReplicateAPIResponse, ReplicateStatus, PinataUploadResponse, PinataPin, PinataListResponse, APIResponse, } from "./external-apis";
|
|
16
|
+
export { isReplicateAPIResponse, isAPIResponse, safeParseJSON, parseReplicateOutput, } from "./external-apis";
|
|
17
|
+
export type { RelayerStorageResponse, RelayerTransactionResponse, RelayerStoreParams, RelayerSubmitParams, RelayerStatus, RelayerConfig, RelayerRequestOptions, RelayerErrorResponse, RelayerQueueInfo, RelayerTransactionStatus, RelayerMetrics, RelayerWebhookConfig, RelayerWebhookPayload, } from "./relayer";
|
|
18
|
+
export type { PartialExcept, RequiredExcept, Awaited, MaybePromise, MaybeArray, PaginationParams, PaginationResult, BlockRange, TransactionOptions, TransactionReceipt, ApiResponse, CacheConfig, ValidationResult, StatusInfo, RateLimitInfo, UploadProgress, NetworkInfo, GasEstimate, TimeRange, } from "./utils";
|
|
19
|
+
export type { GenericRequest, GenericResponse, AsyncResult, ContractCall, EventFilter, EventLog, ControllerContext, Controller, Cache, RetryConfig, RateLimiterConfig, Middleware, Plugin, Factory, Repository, Validator, Transformer, Service, Observer, Observable, StateMachine, ConditionalOptional, PromiseResult, AllKeys, DeepPartial, DeepReadonly, RequireKeys, OptionalKeys, NonNullable, PickByType, OmitByType, Brand, Nominal, } from "./generics";
|
|
20
|
+
export type { Address, Hash, Abi, Chain, WalletClient, PublicClient, Account, GetContractReturnType, } from "viem";
|
package/dist/types/index.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
isWalletConfig,
|
|
3
|
+
isChainConfig,
|
|
4
|
+
isReadOnlyConfig,
|
|
5
|
+
isAddressOnlyConfig,
|
|
6
|
+
hasStorageConfig
|
|
7
|
+
} from "./config";
|
|
2
8
|
import { isVanaChainId, isVanaChain } from "./chains";
|
|
3
9
|
import { StorageError } from "./storage";
|
|
4
10
|
import {
|
|
@@ -8,7 +14,6 @@ import {
|
|
|
8
14
|
validateDataAgainstSchema,
|
|
9
15
|
fetchAndValidateSchema
|
|
10
16
|
} from "../utils/schemaValidation";
|
|
11
|
-
export * from "../generated/server/server-exports";
|
|
12
17
|
import {
|
|
13
18
|
isReplicateAPIResponse,
|
|
14
19
|
isAPIResponse,
|
|
@@ -22,7 +27,9 @@ export {
|
|
|
22
27
|
fetchAndValidateSchema,
|
|
23
28
|
hasStorageConfig,
|
|
24
29
|
isAPIResponse,
|
|
30
|
+
isAddressOnlyConfig,
|
|
25
31
|
isChainConfig,
|
|
32
|
+
isReadOnlyConfig,
|
|
26
33
|
isReplicateAPIResponse,
|
|
27
34
|
isVanaChain,
|
|
28
35
|
isVanaChainId,
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["// Configuration types\nexport type {\n BaseConfig,\n BaseConfigWithStorage,\n WalletConfig,\n WalletConfigWithStorage,\n ChainConfig,\n ChainConfigWithStorage,\n VanaConfig,\n VanaConfigWithStorage,\n RuntimeConfig,\n StorageConfig,\n ConfigValidationOptions,\n ConfigValidationResult,\n RelayerCallbacks,\n DownloadRelayerCallbacks,\n StorageRequiredMarker,\n} from \"./config\";\n\nexport {
|
|
1
|
+
{"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["// Configuration types\nexport type {\n BaseConfig,\n BaseConfigWithStorage,\n WalletConfig,\n WalletConfigWithStorage,\n ChainConfig,\n ChainConfigWithStorage,\n VanaConfig,\n VanaConfigWithStorage,\n VanaConfigWithWallet,\n VanaConfigReadOnly,\n VanaConfigAddressOnly,\n VanaConfigWithWalletWithStorage,\n VanaConfigReadOnlyWithStorage,\n VanaConfigAddressOnlyWithStorage,\n RuntimeConfig,\n StorageConfig,\n ConfigValidationOptions,\n ConfigValidationResult,\n RelayerCallbacks,\n DownloadRelayerCallbacks,\n StorageRequiredMarker,\n} from \"./config\";\n\nexport {\n isWalletConfig,\n isChainConfig,\n isReadOnlyConfig,\n isAddressOnlyConfig,\n hasStorageConfig,\n} from \"./config\";\n\n// Chain types\nexport type { VanaChainId, VanaChain } from \"./chains\";\n\nexport { isVanaChainId, isVanaChain } from \"./chains\";\n\n// Contract types\nexport type {\n VanaContractName,\n ContractInfo,\n ContractDeployment,\n VanaContractInstance,\n ContractAddresses,\n ContractMethodParams,\n ContractMethodReturnType,\n} from \"./contracts\";\n\n// Note: VanaContract and ContractAbis are exported directly from src/index.ts\n// to avoid circular dependencies. Do not re-export them here.\n\n// Storage types\nexport type {\n StorageProvider,\n StorageUploadResult,\n StorageFile,\n StorageListOptions,\n StorageProviderConfig,\n} from \"./storage\";\n\nexport { StorageError } from \"./storage\";\n\n// Data types\nexport type {\n UserFile,\n FileMetadata,\n UploadParams,\n FilePermissionParams,\n LegacyPermissionParams,\n EncryptedUploadParams,\n UnencryptedUploadParams,\n UploadResult,\n UploadFileParams,\n UploadFileResult,\n UploadEncryptedFileResult,\n EncryptionInfo,\n GetUserFilesParams,\n GetFileParams,\n EncryptFileOptions,\n EncryptFileResult,\n DecryptFileOptions,\n UploadFileWithPermissionsParams,\n AddFilePermissionParams,\n DecryptFileWithPermissionOptions,\n DownloadFileParams,\n DownloadFileResult,\n DeleteFileParams,\n DeleteFileResult,\n FileAccessPermissions,\n FileSharingConfig,\n BatchUploadParams,\n BatchUploadResult,\n SchemaMetadata,\n CompleteSchema,\n Schema,\n Refiner,\n AddSchemaParams,\n AddSchemaResult,\n AddRefinerParams,\n AddRefinerResult,\n UpdateSchemaIdParams,\n UpdateSchemaIdResult,\n TrustedServer,\n GetUserTrustedServersParams,\n} from \"./data\";\n\n// Schema types\nexport type {\n CreateSchemaParams,\n CreateSchemaResult,\n} from \"../controllers/schemas\";\n\n// Schema validation types\nexport type { DataSchema } from \"../utils/schemaValidation\";\nexport {\n SchemaValidationError,\n SchemaValidator,\n validateDataSchemaAgainstMetaSchema,\n validateDataAgainstSchema,\n fetchAndValidateSchema,\n} from \"../utils/schemaValidation\";\n\n// Permission types\nexport type {\n OnChainPermissionGrant,\n GetUserPermissionsOptions,\n GrantPermissionParams,\n RevokePermissionParams,\n CheckPermissionParams,\n PermissionCheckResult,\n PermissionGrantDomain,\n PermissionGrantMessage,\n PermissionInputMessage,\n SimplifiedPermissionMessage,\n GrantFile,\n PermissionGrantTypedData,\n RevokePermissionTypedData,\n GenericTypedData,\n TypedDataPrimaryType,\n SpecificTypedData,\n PermissionOperation,\n PermissionStatus,\n QueryPermissionsParams,\n PermissionQueryResult,\n PermissionAnalytics,\n PermissionEvent,\n GrantedPermission,\n Server,\n AddAndTrustServerParams,\n TrustServerParams,\n UntrustServerParams,\n AddAndTrustServerInput,\n TrustServerInput,\n UntrustServerInput,\n AddAndTrustServerTypedData,\n TrustServerTypedData,\n UntrustServerTypedData,\n PermissionInfo,\n RevokePermissionInput,\n TrustedServerInfo,\n PaginatedTrustedServers,\n TrustedServerQueryOptions,\n BatchServerInfoResult,\n ServerTrustStatus,\n ServerInfo,\n Grantee,\n GranteeInfo,\n RegisterGranteeParams,\n RegisterGranteeInput,\n RegisterGranteeTypedData,\n GranteeQueryOptions,\n PaginatedGrantees,\n ServerFilesAndPermissionParams,\n ServerFilesAndPermissionTypedData,\n Permission,\n} from \"./permissions\";\n\n// Personal server types\nexport type {\n PostRequestParams,\n CreateOperationParams,\n InitPersonalServerParams,\n PersonalServerIdentity,\n} from \"./personal\";\n\n// Server API types (auto-generated via fetch-server-types.ts)\nexport type * from \"../generated/server/server-exports\";\n\n// External API types\nexport type {\n ReplicateAPIResponse,\n ReplicateStatus,\n PinataUploadResponse,\n PinataPin,\n PinataListResponse,\n APIResponse,\n} from \"./external-apis\";\n\nexport {\n isReplicateAPIResponse,\n isAPIResponse,\n safeParseJSON,\n parseReplicateOutput,\n} from \"./external-apis\";\n\n// Relayer types\nexport type {\n RelayerStorageResponse,\n RelayerTransactionResponse,\n RelayerStoreParams,\n RelayerSubmitParams,\n RelayerStatus,\n RelayerConfig,\n RelayerRequestOptions,\n RelayerErrorResponse,\n RelayerQueueInfo,\n RelayerTransactionStatus,\n RelayerMetrics,\n RelayerWebhookConfig,\n RelayerWebhookPayload,\n} from \"./relayer\";\n\n// Utility types\nexport type {\n PartialExcept,\n RequiredExcept,\n Awaited,\n MaybePromise,\n MaybeArray,\n PaginationParams,\n PaginationResult,\n BlockRange,\n TransactionOptions,\n TransactionReceipt,\n ApiResponse,\n CacheConfig,\n ValidationResult,\n StatusInfo,\n RateLimitInfo,\n UploadProgress,\n NetworkInfo,\n GasEstimate,\n TimeRange,\n} from \"./utils\";\n\n// Generic types for extensibility\nexport type {\n GenericRequest,\n GenericResponse,\n AsyncResult,\n ContractCall,\n EventFilter,\n EventLog,\n ControllerContext,\n Controller,\n Cache,\n RetryConfig,\n RateLimiterConfig,\n Middleware,\n Plugin,\n Factory,\n Repository,\n Validator,\n Transformer,\n Service,\n Observer,\n Observable,\n StateMachine,\n ConditionalOptional,\n PromiseResult,\n AllKeys,\n DeepPartial,\n DeepReadonly,\n RequireKeys,\n OptionalKeys,\n NonNullable,\n PickByType,\n OmitByType,\n Brand,\n Nominal,\n} from \"./generics\";\n\n// Re-export viem types that are commonly used\nexport type {\n Address,\n Hash,\n Abi,\n Chain,\n WalletClient,\n PublicClient,\n Account,\n GetContractReturnType,\n} from \"viem\";\n"],"mappings":"AAyBA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAKP,SAAS,eAAe,mBAAmB;AAyB3C,SAAS,oBAAoB;AAsD7B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AA8EP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":[]}
|
|
@@ -32,7 +32,7 @@ function isTransactionResult(obj) {
|
|
|
32
32
|
if (typeof obj !== "object" || obj === null || !("hash" in obj)) {
|
|
33
33
|
return false;
|
|
34
34
|
}
|
|
35
|
-
const hash = obj
|
|
35
|
+
const { hash } = obj;
|
|
36
36
|
return typeof hash === "string" && hash.startsWith("0x");
|
|
37
37
|
}
|
|
38
38
|
function toOperation(response) {
|
|
@@ -42,7 +42,7 @@ function toOperation(response) {
|
|
|
42
42
|
createdAt: Date.now(),
|
|
43
43
|
// Server doesn't provide this, so we use current time
|
|
44
44
|
result: response.status === "succeeded" ? response.result : void 0,
|
|
45
|
-
error: response.status === "failed" ? response.result
|
|
45
|
+
error: response.status === "failed" ? response.result ?? void 0 : void 0
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
function getOperationId(opOrId) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/operations.ts"],"sourcesContent":["import type { Hash, TransactionReceipt as ViemReceipt, Address } from \"viem\";\nimport type { GetOperationResponse } from \"../generated/server/server-exports\";\n\n/**\n * Server operation result as a plain object.\n * Fully serializable for API responses and cross-process communication.\n */\nexport interface Operation<T = unknown> {\n /** Unique operation identifier */\n id: string;\n /** Current operation status */\n status: \"starting\" | \"running\" | \"succeeded\" | \"failed\" | \"canceled\";\n /** Unix timestamp when operation was created */\n createdAt: number;\n /** Unix timestamp when operation was last updated */\n updatedAt?: number;\n /** Operation result when status is 'succeeded' */\n result?: T;\n /** Error message when status is 'failed' */\n error?: string;\n /** Additional operation metadata */\n metadata?: Record<string, unknown>;\n}\n\n/**\n *
|
|
1
|
+
{"version":3,"sources":["../../src/types/operations.ts"],"sourcesContent":["import type { Hash, TransactionReceipt as ViemReceipt, Address } from \"viem\";\nimport type { GetOperationResponse } from \"../generated/server/server-exports\";\nimport type { Contract, Fn } from \"../generated/event-types\";\n\n/**\n * Server operation result as a plain object.\n * Fully serializable for API responses and cross-process communication.\n */\nexport interface Operation<T = unknown> {\n /** Unique operation identifier */\n id: string;\n /** Current operation status */\n status: \"starting\" | \"running\" | \"succeeded\" | \"failed\" | \"canceled\";\n /** Unix timestamp when operation was created */\n createdAt: number;\n /** Unix timestamp when operation was last updated */\n updatedAt?: number;\n /** Operation result when status is 'succeeded' */\n result?: T;\n /** Error message when status is 'failed' */\n error?: string;\n /** Additional operation metadata */\n metadata?: Record<string, unknown>;\n}\n\n/**\n * Represents a submitted blockchain transaction as a self-describing POJO.\n *\n * @remarks\n * Transaction results MUST include contract and function for proper event parsing.\n * This is a strongly-typed, heuristic-free design following POJO architecture.\n */\nexport interface TransactionResult<\n C extends Contract = Contract,\n F extends Fn<C> = Fn<C>,\n> {\n /** Transaction hash for tracking and confirmation */\n hash: Hash;\n /** Sender's wallet address */\n from: Address;\n /** Contract that was called (required for event parsing) */\n contract: C;\n /** Function that was called (required for event parsing) */\n fn: F;\n /** Network chain ID where transaction was submitted */\n chainId?: number;\n /** Transaction value in wei (for payable functions) */\n value?: bigint;\n /** Transaction sequence number for the sender */\n nonce?: number;\n /** Contract address (if different from standard deployment) */\n to?: Address;\n}\n\n/**\n * Extended transaction receipt with Vana-specific fields\n */\nexport interface TransactionReceipt extends ViemReceipt {\n /** Parsed event data if available */\n events?: unknown;\n}\n\n/**\n * Options for polling operations\n */\nexport interface PollingOptions {\n /** Polling interval in milliseconds (default: 500) */\n pollingInterval?: number;\n /** Maximum time to wait in milliseconds (default: 30000) */\n timeout?: number;\n}\n\n/**\n * Options for waiting for transaction confirmation\n */\nexport interface TransactionWaitOptions {\n /** Number of confirmations to wait for (default: 1) */\n confirmations?: number;\n /** Polling interval in milliseconds (default: 1000) */\n pollingInterval?: number;\n /** Maximum time to wait in milliseconds (default: 30000) */\n timeout?: number;\n}\n\n/**\n * Validates whether an object conforms to the Operation interface.\n *\n * @param obj - The object to validate as an Operation.\n * @returns `true` if the object has required Operation properties, `false` otherwise.\n */\nexport function isOperation(obj: unknown): obj is Operation {\n return (\n typeof obj === \"object\" &&\n obj !== null &&\n \"id\" in obj &&\n \"status\" in obj &&\n typeof (obj as Record<string, unknown>).id === \"string\" &&\n typeof (obj as Record<string, unknown>).status === \"string\"\n );\n}\n\n/**\n * Validates whether an object conforms to the TransactionResult interface.\n *\n * @param obj - The object to validate as a TransactionResult.\n * @returns `true` if the object has a valid transaction hash, `false` otherwise.\n */\nexport function isTransactionResult(obj: unknown): obj is TransactionResult {\n if (typeof obj !== \"object\" || obj === null || !(\"hash\" in obj)) {\n return false;\n }\n const { hash } = obj as Record<string, unknown>;\n return typeof hash === \"string\" && hash.startsWith(\"0x\");\n}\n\n/**\n * Converts a server response to an Operation POJO.\n *\n * @param response - The raw server response containing operation status data.\n * @returns An Operation object with normalized fields for client consumption.\n */\nexport function toOperation<T>(response: GetOperationResponse): Operation<T> {\n return {\n id: response.id,\n status: response.status as Operation[\"status\"],\n createdAt: Date.now(), // Server doesn't provide this, so we use current time\n result:\n response.status === \"succeeded\" ? (response.result as T) : undefined,\n error:\n response.status === \"failed\" ? (response.result ?? undefined) : undefined,\n };\n}\n\n/**\n * Extracts the operation ID from flexible input types.\n *\n * @param opOrId - An Operation object containing an `id` field or a raw operation ID string.\n * @returns The operation ID string for use in API calls.\n */\nexport function getOperationId(opOrId: Operation | string): string {\n return typeof opOrId === \"string\" ? opOrId : opOrId.id;\n}\n\n/**\n * Extracts the transaction hash from flexible input types.\n *\n * @param txOrHash - A TransactionResult object, any object with a `hash` field, or a raw hash string.\n * @returns The transaction hash as a `0x`-prefixed string.\n */\nexport function getTransactionHash(\n txOrHash: TransactionResult | { hash: Hash } | Hash,\n): Hash {\n if (typeof txOrHash === \"string\") {\n return txOrHash;\n }\n return txOrHash.hash;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA0FO,SAAS,YAAY,KAAgC;AAC1D,SACE,OAAO,QAAQ,YACf,QAAQ,QACR,QAAQ,OACR,YAAY,OACZ,OAAQ,IAAgC,OAAO,YAC/C,OAAQ,IAAgC,WAAW;AAEvD;AAQO,SAAS,oBAAoB,KAAwC;AAC1E,MAAI,OAAO,QAAQ,YAAY,QAAQ,QAAQ,EAAE,UAAU,MAAM;AAC/D,WAAO;AAAA,EACT;AACA,QAAM,EAAE,KAAK,IAAI;AACjB,SAAO,OAAO,SAAS,YAAY,KAAK,WAAW,IAAI;AACzD;AAQO,SAAS,YAAe,UAA8C;AAC3E,SAAO;AAAA,IACL,IAAI,SAAS;AAAA,IACb,QAAQ,SAAS;AAAA,IACjB,WAAW,KAAK,IAAI;AAAA;AAAA,IACpB,QACE,SAAS,WAAW,cAAe,SAAS,SAAe;AAAA,IAC7D,OACE,SAAS,WAAW,WAAY,SAAS,UAAU,SAAa;AAAA,EACpE;AACF;AAQO,SAAS,eAAe,QAAoC;AACjE,SAAO,OAAO,WAAW,WAAW,SAAS,OAAO;AACtD;AAQO,SAAS,mBACd,UACM;AACN,MAAI,OAAO,aAAa,UAAU;AAChC,WAAO;AAAA,EACT;AACA,SAAO,SAAS;AAClB;","names":[]}
|