UNPKG

@opendatalabs/vana-sdk

Version:

A TypeScript library for interacting with Vana Network smart contracts.

1,328 lines 25.2 kB
"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var DataRegistryImplementation_exports = {}; __export(DataRegistryImplementation_exports, { DataRegistryABI: () => DataRegistryABI, default: () => DataRegistryImplementation_default }); module.exports = __toCommonJS(DataRegistryImplementation_exports); const DataRegistryABI = [ { inputs: [], stateMutability: "nonpayable", type: "constructor" }, { inputs: [], name: "AccessControlBadConfirmation", type: "error" }, { inputs: [ { internalType: "address", name: "account", type: "address" }, { internalType: "bytes32", name: "neededRole", type: "bytes32" } ], name: "AccessControlUnauthorizedAccount", type: "error" }, { inputs: [ { internalType: "address", name: "target", type: "address" } ], name: "AddressEmptyCode", type: "error" }, { inputs: [ { internalType: "address", name: "implementation", type: "address" } ], name: "ERC1967InvalidImplementation", type: "error" }, { inputs: [], name: "ERC1967NonPayable", type: "error" }, { inputs: [], name: "EnforcedPause", type: "error" }, { inputs: [], name: "ExpectedPause", type: "error" }, { inputs: [], name: "FailedInnerCall", type: "error" }, { inputs: [], name: "FileNotFound", type: "error" }, { inputs: [], name: "FileUrlAlreadyUsed", type: "error" }, { inputs: [], name: "InvalidInitialization", type: "error" }, { inputs: [ { internalType: "uint256", name: "schemaId", type: "uint256" } ], name: "InvalidSchemaId", type: "error" }, { inputs: [], name: "InvalidUrl", type: "error" }, { inputs: [], name: "NoPermission", type: "error" }, { inputs: [], name: "NotFileOwner", type: "error" }, { inputs: [], name: "NotInitializing", type: "error" }, { inputs: [], name: "UUPSUnauthorizedCallContext", type: "error" }, { inputs: [ { internalType: "bytes32", name: "slot", type: "bytes32" } ], name: "UUPSUnsupportedProxiableUUID", type: "error" }, { anonymous: false, inputs: [ { indexed: true, internalType: "uint256", name: "fileId", type: "uint256" }, { indexed: true, internalType: "address", name: "ownerAddress", type: "address" }, { indexed: false, internalType: "string", name: "url", type: "string" } ], name: "FileAdded", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "uint256", name: "fileId", type: "uint256" }, { indexed: true, internalType: "address", name: "ownerAddress", type: "address" }, { indexed: false, internalType: "string", name: "url", type: "string" }, { indexed: false, internalType: "uint256", name: "schemaId", type: "uint256" } ], name: "FileAddedV2", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint64", name: "version", type: "uint64" } ], name: "Initialized", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "account", type: "address" } ], name: "Paused", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "uint256", name: "fileId", type: "uint256" }, { indexed: true, internalType: "address", name: "account", type: "address" } ], name: "PermissionGranted", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "uint256", name: "fileId", type: "uint256" }, { indexed: true, internalType: "address", name: "ownerAddress", type: "address" }, { indexed: false, internalType: "uint256", name: "proofIndex", type: "uint256" }, { indexed: true, internalType: "uint256", name: "dlpId", type: "uint256" }, { indexed: false, internalType: "uint256", name: "score", type: "uint256" }, { indexed: false, internalType: "string", name: "proofUrl", type: "string" } ], name: "ProofAdded", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "uint256", name: "fileId", type: "uint256" }, { indexed: true, internalType: "uint256", name: "refinerId", type: "uint256" }, { indexed: false, internalType: "string", name: "url", type: "string" } ], name: "RefinementAdded", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "uint256", name: "fileId", type: "uint256" }, { indexed: true, internalType: "uint256", name: "refinerId", type: "uint256" }, { indexed: false, internalType: "string", name: "url", type: "string" } ], name: "RefinementUpdated", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "bytes32", name: "role", type: "bytes32" }, { indexed: true, internalType: "bytes32", name: "previousAdminRole", type: "bytes32" }, { indexed: true, internalType: "bytes32", name: "newAdminRole", type: "bytes32" } ], name: "RoleAdminChanged", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "bytes32", name: "role", type: "bytes32" }, { indexed: true, internalType: "address", name: "account", type: "address" }, { indexed: true, internalType: "address", name: "sender", type: "address" } ], name: "RoleGranted", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "bytes32", name: "role", type: "bytes32" }, { indexed: true, internalType: "address", name: "account", type: "address" }, { indexed: true, internalType: "address", name: "sender", type: "address" } ], name: "RoleRevoked", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "account", type: "address" } ], name: "Unpaused", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "implementation", type: "address" } ], name: "Upgraded", type: "event" }, { inputs: [], name: "DATA_PORTABILITY_ROLE", outputs: [ { internalType: "bytes32", name: "", type: "bytes32" } ], stateMutability: "view", type: "function" }, { inputs: [], name: "DEFAULT_ADMIN_ROLE", outputs: [ { internalType: "bytes32", name: "", type: "bytes32" } ], stateMutability: "view", type: "function" }, { inputs: [], name: "MAINTAINER_ROLE", outputs: [ { internalType: "bytes32", name: "", type: "bytes32" } ], stateMutability: "view", type: "function" }, { inputs: [], name: "REFINEMENT_SERVICE_ROLE", outputs: [ { internalType: "bytes32", name: "", type: "bytes32" } ], stateMutability: "view", type: "function" }, { inputs: [], name: "UPGRADE_INTERFACE_VERSION", outputs: [ { internalType: "string", name: "", type: "string" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "string", name: "url", type: "string" } ], name: "addFile", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "uint256", name: "fileId", type: "uint256" }, { internalType: "address", name: "account", type: "address" }, { internalType: "string", name: "key", type: "string" } ], name: "addFilePermission", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "uint256", name: "fileId", type: "uint256" }, { components: [ { internalType: "address", name: "account", type: "address" }, { internalType: "string", name: "key", type: "string" } ], internalType: "struct IDataRegistry.Permission[]", name: "permissions", type: "tuple[]" }, { internalType: "uint256", name: "schemaId", type: "uint256" } ], name: "addFilePermissionsAndSchema", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "string", name: "url", type: "string" }, { internalType: "address", name: "ownerAddress", type: "address" }, { components: [ { internalType: "address", name: "account", type: "address" }, { internalType: "string", name: "key", type: "string" } ], internalType: "struct IDataRegistry.Permission[]", name: "permissions", type: "tuple[]" } ], name: "addFileWithPermissions", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "string", name: "url", type: "string" }, { internalType: "address", name: "ownerAddress", type: "address" }, { components: [ { internalType: "address", name: "account", type: "address" }, { internalType: "string", name: "key", type: "string" } ], internalType: "struct IDataRegistry.Permission[]", name: "permissions", type: "tuple[]" }, { internalType: "uint256", name: "schemaId", type: "uint256" } ], name: "addFileWithPermissionsAndSchema", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "string", name: "url", type: "string" }, { internalType: "uint256", name: "schemaId", type: "uint256" } ], name: "addFileWithSchema", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "uint256", name: "fileId", type: "uint256" }, { components: [ { internalType: "bytes", name: "signature", type: "bytes" }, { components: [ { internalType: "uint256", name: "score", type: "uint256" }, { internalType: "uint256", name: "dlpId", type: "uint256" }, { internalType: "string", name: "metadata", type: "string" }, { internalType: "string", name: "proofUrl", type: "string" }, { internalType: "string", name: "instruction", type: "string" } ], internalType: "struct IDataRegistry.ProofData", name: "data", type: "tuple" } ], internalType: "struct IDataRegistry.Proof", name: "proof", type: "tuple" } ], name: "addProof", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "uint256", name: "fileId", type: "uint256" }, { internalType: "uint256", name: "refinerId", type: "uint256" }, { internalType: "string", name: "url", type: "string" }, { internalType: "address", name: "account", type: "address" }, { internalType: "string", name: "key", type: "string" } ], name: "addRefinementWithPermission", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [], name: "dataRefinerRegistry", outputs: [ { internalType: "contract IDataRefinerRegistry", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [], name: "emitLegacyEvents", outputs: [ { internalType: "bool", name: "", type: "bool" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "string", name: "url", type: "string" } ], name: "fileIdByUrl", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "fileId", type: "uint256" }, { internalType: "address", name: "account", type: "address" } ], name: "filePermissions", outputs: [ { internalType: "string", name: "", type: "string" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "fileId", type: "uint256" }, { internalType: "uint256", name: "index", type: "uint256" } ], name: "fileProofs", outputs: [ { components: [ { internalType: "bytes", name: "signature", type: "bytes" }, { components: [ { internalType: "uint256", name: "score", type: "uint256" }, { internalType: "uint256", name: "dlpId", type: "uint256" }, { internalType: "string", name: "metadata", type: "string" }, { internalType: "string", name: "proofUrl", type: "string" }, { internalType: "string", name: "instruction", type: "string" } ], internalType: "struct IDataRegistry.ProofData", name: "data", type: "tuple" } ], internalType: "struct IDataRegistry.Proof", name: "", type: "tuple" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "fileId", type: "uint256" }, { internalType: "uint256", name: "refinerId", type: "uint256" } ], name: "fileRefinements", outputs: [ { internalType: "string", name: "", type: "string" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "fileId", type: "uint256" } ], name: "files", outputs: [ { components: [ { internalType: "uint256", name: "id", type: "uint256" }, { internalType: "address", name: "ownerAddress", type: "address" }, { internalType: "string", name: "url", type: "string" }, { internalType: "uint256", name: "schemaId", type: "uint256" }, { internalType: "uint256", name: "addedAtBlock", type: "uint256" } ], internalType: "struct IDataRegistry.FileResponse", name: "", type: "tuple" } ], stateMutability: "view", type: "function" }, { inputs: [], name: "filesCount", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "bytes32", name: "role", type: "bytes32" } ], name: "getRoleAdmin", outputs: [ { internalType: "bytes32", name: "", type: "bytes32" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "bytes32", name: "role", type: "bytes32" }, { internalType: "address", name: "account", type: "address" } ], name: "grantRole", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "bytes32", name: "role", type: "bytes32" }, { internalType: "address", name: "account", type: "address" } ], name: "hasRole", outputs: [ { internalType: "bool", name: "", type: "bool" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "address", name: "trustedForwarderAddress", type: "address" }, { internalType: "address", name: "ownerAddress", type: "address" } ], name: "initialize", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "forwarder", type: "address" } ], name: "isTrustedForwarder", outputs: [ { internalType: "bool", name: "", type: "bool" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "bytes[]", name: "data", type: "bytes[]" } ], name: "multicall", outputs: [ { internalType: "bytes[]", name: "results", type: "bytes[]" } ], stateMutability: "nonpayable", type: "function" }, { inputs: [], name: "pause", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [], name: "paused", outputs: [ { internalType: "bool", name: "", type: "bool" } ], stateMutability: "view", type: "function" }, { inputs: [], name: "proxiableUUID", outputs: [ { internalType: "bytes32", name: "", type: "bytes32" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "bytes32", name: "role", type: "bytes32" }, { internalType: "address", name: "callerConfirmation", type: "address" } ], name: "renounceRole", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "bytes32", name: "role", type: "bytes32" }, { internalType: "address", name: "account", type: "address" } ], name: "revokeRole", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "bytes32", name: "role", type: "bytes32" }, { internalType: "bytes32", name: "adminRole", type: "bytes32" } ], name: "setRoleAdmin", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "bytes4", name: "interfaceId", type: "bytes4" } ], name: "supportsInterface", outputs: [ { internalType: "bool", name: "", type: "bool" } ], stateMutability: "view", type: "function" }, { inputs: [], name: "trustedForwarder", outputs: [ { internalType: "address", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [], name: "unpause", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "contract IDataRefinerRegistry", name: "newDataRefinerRegistry", type: "address" } ], name: "updateDataRefinerRegistry", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "bool", name: "newEmitLegacyEvents", type: "bool" } ], name: "updateEmitLegacyEvents", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "trustedForwarderAddress", type: "address" } ], name: "updateTrustedForwarder", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "newImplementation", type: "address" }, { internalType: "bytes", name: "data", type: "bytes" } ], name: "upgradeToAndCall", outputs: [], stateMutability: "payable", type: "function" }, { inputs: [], name: "version", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "pure", type: "function" } ]; var DataRegistryImplementation_default = DataRegistryABI; // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { DataRegistryABI }); //# sourceMappingURL=DataRegistryImplementation.cjs.map