@opendatalabs/vana-sdk
Version:
A TypeScript library for interacting with Vana Network smart contracts.
1,201 lines • 22 kB
JavaScript
"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 VanaPoolStakingImplementation_exports = {};
__export(VanaPoolStakingImplementation_exports, {
VanaPoolStakingABI: () => VanaPoolStakingABI,
default: () => VanaPoolStakingImplementation_default
});
module.exports = __toCommonJS(VanaPoolStakingImplementation_exports);
const VanaPoolStakingABI = [
{
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: [],
name: "CannotRemoveRegistrationStake",
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: "EntityNotActive",
type: "error"
},
{
inputs: [],
name: "EntityNotFound",
type: "error"
},
{
inputs: [],
name: "ExpectedPause",
type: "error"
},
{
inputs: [],
name: "FailedInnerCall",
type: "error"
},
{
inputs: [],
name: "InsufficientShares",
type: "error"
},
{
inputs: [],
name: "InsufficientStakeAmount",
type: "error"
},
{
inputs: [],
name: "InvalidAddress",
type: "error"
},
{
inputs: [],
name: "InvalidAmount",
type: "error"
},
{
inputs: [],
name: "InvalidBondingPeriod",
type: "error"
},
{
inputs: [],
name: "InvalidEntity",
type: "error"
},
{
inputs: [],
name: "InvalidInitialization",
type: "error"
},
{
inputs: [],
name: "InvalidRecipient",
type: "error"
},
{
inputs: [],
name: "InvalidSlippage",
type: "error"
},
{
inputs: [],
name: "NotAuthorized",
type: "error"
},
{
inputs: [],
name: "NotEntityOwner",
type: "error"
},
{
inputs: [],
name: "NotInitializing",
type: "error"
},
{
inputs: [],
name: "ReentrancyGuardReentrantCall",
type: "error"
},
{
inputs: [],
name: "TransferFailed",
type: "error"
},
{
inputs: [],
name: "UUPSUnauthorizedCallContext",
type: "error"
},
{
inputs: [
{
internalType: "bytes32",
name: "slot",
type: "bytes32"
}
],
name: "UUPSUnsupportedProxiableUUID",
type: "error"
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "uint256",
name: "newBondingPeriod",
type: "uint256"
}
],
name: "BondingPeriodUpdated",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "uint256",
name: "entityId",
type: "uint256"
},
{
indexed: true,
internalType: "address",
name: "ownerAddress",
type: "address"
}
],
name: "EntityStakeRegistered",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "uint64",
name: "version",
type: "uint64"
}
],
name: "Initialized",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "uint256",
name: "newMinStake",
type: "uint256"
}
],
name: "MinStakeUpdated",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "account",
type: "address"
}
],
name: "Paused",
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: true,
internalType: "uint256",
name: "entityId",
type: "uint256"
},
{
indexed: true,
internalType: "address",
name: "staker",
type: "address"
},
{
indexed: false,
internalType: "uint256",
name: "amount",
type: "uint256"
},
{
indexed: false,
internalType: "uint256",
name: "sharesIssued",
type: "uint256"
}
],
name: "Staked",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "account",
type: "address"
}
],
name: "Unpaused",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "uint256",
name: "entityId",
type: "uint256"
},
{
indexed: true,
internalType: "address",
name: "staker",
type: "address"
},
{
indexed: false,
internalType: "uint256",
name: "amount",
type: "uint256"
},
{
indexed: false,
internalType: "uint256",
name: "sharesBurned",
type: "uint256"
}
],
name: "Unstaked",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "implementation",
type: "address"
}
],
name: "Upgraded",
type: "event"
},
{
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: "MAX_BONDING_PERIOD",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "UPGRADE_INTERFACE_VERSION",
outputs: [
{
internalType: "string",
name: "",
type: "string"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "VANA_POOL_ENTITY_ROLE",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "uint256",
name: "index",
type: "uint256"
}
],
name: "activeStakersListAt",
outputs: [
{
internalType: "address",
name: "",
type: "address"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "activeStakersListCount",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "uint256",
name: "from",
type: "uint256"
},
{
internalType: "uint256",
name: "to",
type: "uint256"
}
],
name: "activeStakersListValues",
outputs: [
{
internalType: "address[]",
name: "",
type: "address[]"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "bondingPeriod",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "staker",
type: "address"
},
{
internalType: "uint256",
name: "entityId",
type: "uint256"
}
],
name: "getAccruingInterest",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "staker",
type: "address"
},
{
internalType: "uint256",
name: "entityId",
type: "uint256"
}
],
name: "getEarnedRewards",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "staker",
type: "address"
},
{
internalType: "uint256",
name: "entityId",
type: "uint256"
}
],
name: "getMaxUnstakeAmount",
outputs: [
{
internalType: "uint256",
name: "maxVana",
type: "uint256"
},
{
internalType: "uint256",
name: "maxShares",
type: "uint256"
},
{
internalType: "uint256",
name: "limitingFactor",
type: "uint256"
},
{
internalType: "bool",
name: "isInBondingPeriod",
type: "bool"
}
],
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: "uint256",
name: "index",
type: "uint256"
}
],
name: "inactiveStakersListAt",
outputs: [
{
internalType: "address",
name: "",
type: "address"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "inactiveStakersListCount",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "uint256",
name: "from",
type: "uint256"
},
{
internalType: "uint256",
name: "to",
type: "uint256"
}
],
name: "inactiveStakersListValues",
outputs: [
{
internalType: "address[]",
name: "",
type: "address[]"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "trustedForwarderAddress",
type: "address"
},
{
internalType: "address",
name: "ownerAddress",
type: "address"
},
{
internalType: "uint256",
name: "initialMinStake",
type: "uint256"
}
],
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: [],
name: "minStakeAmount",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
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: "uint256",
name: "entityId",
type: "uint256"
},
{
internalType: "address",
name: "ownerAddress",
type: "address"
},
{
internalType: "uint256",
name: "registrationStake",
type: "uint256"
}
],
name: "registerEntityStake",
outputs: [],
stateMutability: "nonpayable",
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: "uint256",
name: "entityId",
type: "uint256"
},
{
internalType: "address",
name: "recipient",
type: "address"
},
{
internalType: "uint256",
name: "shareAmountMin",
type: "uint256"
}
],
name: "stake",
outputs: [],
stateMutability: "payable",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "staker",
type: "address"
},
{
internalType: "uint256",
name: "entityId",
type: "uint256"
}
],
name: "stakerEntities",
outputs: [
{
components: [
{
internalType: "uint256",
name: "shares",
type: "uint256"
},
{
internalType: "uint256",
name: "costBasis",
type: "uint256"
},
{
internalType: "uint256",
name: "rewardEligibilityTimestamp",
type: "uint256"
},
{
internalType: "uint256",
name: "realizedRewards",
type: "uint256"
},
{
internalType: "uint256",
name: "vestedRewards",
type: "uint256"
}
],
internalType: "struct IVanaPoolStaking.StakerEntity",
name: "",
type: "tuple"
}
],
stateMutability: "view",
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: "uint256",
name: "entityId",
type: "uint256"
},
{
internalType: "uint256",
name: "shareAmount",
type: "uint256"
},
{
internalType: "uint256",
name: "vanaAmountMin",
type: "uint256"
}
],
name: "unstake",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{
internalType: "uint256",
name: "entityId",
type: "uint256"
},
{
internalType: "uint256",
name: "vanaAmount",
type: "uint256"
},
{
internalType: "uint256",
name: "shareAmountMax",
type: "uint256"
}
],
name: "unstakeVana",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{
internalType: "uint256",
name: "newBondingPeriod",
type: "uint256"
}
],
name: "updateBondingPeriod",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{
internalType: "uint256",
name: "newMinStake",
type: "uint256"
}
],
name: "updateMinStakeAmount",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "trustedForwarderAddress",
type: "address"
}
],
name: "updateTrustedForwarder",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "newVanaPoolEntityAddress",
type: "address"
}
],
name: "updateVanaPoolEntity",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "newVanaPoolTreasuryAddress",
type: "address"
}
],
name: "updateVanaPoolTreasury",
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: "vanaPoolEntity",
outputs: [
{
internalType: "contract IVanaPoolEntity",
name: "",
type: "address"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "vanaPoolTreasury",
outputs: [
{
internalType: "contract IVanaPoolTreasury",
name: "",
type: "address"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "version",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "pure",
type: "function"
}
];
var VanaPoolStakingImplementation_default = VanaPoolStakingABI;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
VanaPoolStakingABI
});
//# sourceMappingURL=VanaPoolStakingImplementation.cjs.map