@sage-protocol/sdk 0.1.7 → 0.1.9

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/index.cjs CHANGED
@@ -14,7 +14,7 @@ var require_package = __commonJS({
14
14
  "package.json"(exports2, module2) {
15
15
  module2.exports = {
16
16
  name: "@sage-protocol/sdk",
17
- version: "0.1.4",
17
+ version: "0.1.8",
18
18
  description: "Backend-agnostic SDK for interacting with the Sage Protocol (governance, SubDAOs, tokens).",
19
19
  main: "dist/index.cjs",
20
20
  module: "dist/index.mjs",
@@ -256,20 +256,19 @@ var require_abi = __commonJS({
256
256
  var PersonalLicenseReceipt = [
257
257
  "function balanceOf(address account, uint256 id) view returns (uint256)"
258
258
  ];
259
- var SageTreasury = [
260
- "function totalReserves() view returns (uint256)",
261
- "function totalPOL() view returns (uint256)",
262
- "function totalDebt() view returns (uint256)",
263
- "function canonicalPool() view returns (address)",
264
- "function routerOrVault() view returns (address)",
265
- "function maxWithdrawalRate() view returns (uint256)",
266
- "function emergencyWithdrawalLimit() view returns (uint256)",
267
- "function getReserveTokens() view returns (address[])",
268
- "function getReserve(address token) view returns (address tokenAddress,uint256 amount,uint256 value,bool isLP,bool isActive)",
269
- "function pendingWithdrawals(uint256) view returns (address token,address recipient,uint256 amount,uint256 value,address requester,uint256 balanceBefore,uint256 recipientBalanceBefore,uint256 depositSnapshot,bool isLP,bool isEmergency,bool exists)",
270
- "function nextWithdrawalId() view returns (uint256)",
271
- "function manualPrices(address token) view returns (uint256 price,uint256 expiresAt,bool active)",
272
- "function lpContributions(address,address) view returns (uint256)"
259
+ var TreasuryWrapper = [
260
+ "function execute(address,uint256,bytes,bytes32) returns (bool)",
261
+ "function allowedTargets(address) view returns (bool)",
262
+ "function allowedSelectors(bytes4) view returns (bool)",
263
+ "function owners(address) view returns (bool)",
264
+ "function ownerCount() view returns (uint256)",
265
+ "function registry() view returns (address)",
266
+ "event TreasuryAction(address indexed caller, address indexed target, uint256 value, bytes data, bytes32 refId)",
267
+ "event AllowedTargetUpdated(address indexed target, bool allowed)",
268
+ "event AllowedSelectorUpdated(bytes4 indexed selector, bool allowed)",
269
+ "event OwnerAdded(address indexed owner)",
270
+ "event OwnerRemoved(address indexed owner)",
271
+ "event TokensSwept(address indexed token, address indexed to, uint256 amount)"
273
272
  ];
274
273
  var GovernanceBoostMerkle = [
275
274
  "function getProposalConfig(uint256) view returns (tuple(uint256 proposalId,address token,uint256 totalAmount,uint64 startTime,uint64 endTime,uint256 merkleRoot))",
@@ -281,29 +280,6 @@ var require_abi = __commonJS({
281
280
  "function create(uint256 proposalId, address token, uint256 perVoter, uint256 maxVoters)",
282
281
  "function fund(uint256 proposalId, uint256 amount)"
283
282
  ];
284
- var BondDepository = [
285
- // Core getters
286
- "function payoutToken() view returns (address)",
287
- "function principalToken() view returns (address)",
288
- "function treasury() view returns (address)",
289
- // Terms
290
- "function terms() view returns (tuple(uint256 controlVariable,uint256 minimumPrice,uint256 maxPayout,uint256 maxDebt,uint256 vestingTerm,uint256 fee))",
291
- "function totalDebt(address) view returns (uint256)",
292
- // Pricing
293
- "function bondPrice() view returns (uint256)",
294
- "function bondPrice(address) view returns (uint256)",
295
- "function bondPriceInUSD() view returns (uint256)",
296
- "function currentDebt() view returns (uint256)",
297
- "function debtRatio() view returns (uint256)",
298
- "function standardizedDebtRatio() view returns (uint256)",
299
- // User views
300
- "function bondInfo(address) view returns (tuple(uint256 payout,uint256 vesting,uint256 lastBlock,uint256 pricePaid))",
301
- "function pendingPayout(address) view returns (uint256)",
302
- "function percentVestedFor(address) view returns (uint256)",
303
- // Actions
304
- "function deposit(uint256 _amount, uint256 _maxPrice) returns (uint256 payout_)",
305
- "function redeem(address _recipient, bool _stake) returns (uint256)"
306
- ];
307
283
  var Events = {
308
284
  ProposalCreated: "event ProposalCreated(uint256 id, address proposer, address[] targets, uint256[] values, string[] signatures, bytes[] calldatas, uint256 startBlock, uint256 endBlock, string description)"
309
285
  };
@@ -322,10 +298,10 @@ var require_abi = __commonJS({
322
298
  PersonalLibraryFacet,
323
299
  PersonalMarketplace,
324
300
  PersonalLicenseReceipt,
325
- SageTreasury,
301
+ TreasuryWrapper,
302
+ // Protocol treasury (replaces SageTreasury)
326
303
  GovernanceBoostMerkle,
327
304
  GovernanceBoostDirect,
328
- BondDepository,
329
305
  Events
330
306
  };
331
307
  }
package/dist/index.mjs CHANGED
@@ -20,7 +20,7 @@ var require_package = __commonJS({
20
20
  "package.json"(exports2, module2) {
21
21
  module2.exports = {
22
22
  name: "@sage-protocol/sdk",
23
- version: "0.1.4",
23
+ version: "0.1.8",
24
24
  description: "Backend-agnostic SDK for interacting with the Sage Protocol (governance, SubDAOs, tokens).",
25
25
  main: "dist/index.cjs",
26
26
  module: "dist/index.mjs",
@@ -262,20 +262,19 @@ var require_abi = __commonJS({
262
262
  var PersonalLicenseReceipt = [
263
263
  "function balanceOf(address account, uint256 id) view returns (uint256)"
264
264
  ];
265
- var SageTreasury = [
266
- "function totalReserves() view returns (uint256)",
267
- "function totalPOL() view returns (uint256)",
268
- "function totalDebt() view returns (uint256)",
269
- "function canonicalPool() view returns (address)",
270
- "function routerOrVault() view returns (address)",
271
- "function maxWithdrawalRate() view returns (uint256)",
272
- "function emergencyWithdrawalLimit() view returns (uint256)",
273
- "function getReserveTokens() view returns (address[])",
274
- "function getReserve(address token) view returns (address tokenAddress,uint256 amount,uint256 value,bool isLP,bool isActive)",
275
- "function pendingWithdrawals(uint256) view returns (address token,address recipient,uint256 amount,uint256 value,address requester,uint256 balanceBefore,uint256 recipientBalanceBefore,uint256 depositSnapshot,bool isLP,bool isEmergency,bool exists)",
276
- "function nextWithdrawalId() view returns (uint256)",
277
- "function manualPrices(address token) view returns (uint256 price,uint256 expiresAt,bool active)",
278
- "function lpContributions(address,address) view returns (uint256)"
265
+ var TreasuryWrapper = [
266
+ "function execute(address,uint256,bytes,bytes32) returns (bool)",
267
+ "function allowedTargets(address) view returns (bool)",
268
+ "function allowedSelectors(bytes4) view returns (bool)",
269
+ "function owners(address) view returns (bool)",
270
+ "function ownerCount() view returns (uint256)",
271
+ "function registry() view returns (address)",
272
+ "event TreasuryAction(address indexed caller, address indexed target, uint256 value, bytes data, bytes32 refId)",
273
+ "event AllowedTargetUpdated(address indexed target, bool allowed)",
274
+ "event AllowedSelectorUpdated(bytes4 indexed selector, bool allowed)",
275
+ "event OwnerAdded(address indexed owner)",
276
+ "event OwnerRemoved(address indexed owner)",
277
+ "event TokensSwept(address indexed token, address indexed to, uint256 amount)"
279
278
  ];
280
279
  var GovernanceBoostMerkle = [
281
280
  "function getProposalConfig(uint256) view returns (tuple(uint256 proposalId,address token,uint256 totalAmount,uint64 startTime,uint64 endTime,uint256 merkleRoot))",
@@ -287,29 +286,6 @@ var require_abi = __commonJS({
287
286
  "function create(uint256 proposalId, address token, uint256 perVoter, uint256 maxVoters)",
288
287
  "function fund(uint256 proposalId, uint256 amount)"
289
288
  ];
290
- var BondDepository = [
291
- // Core getters
292
- "function payoutToken() view returns (address)",
293
- "function principalToken() view returns (address)",
294
- "function treasury() view returns (address)",
295
- // Terms
296
- "function terms() view returns (tuple(uint256 controlVariable,uint256 minimumPrice,uint256 maxPayout,uint256 maxDebt,uint256 vestingTerm,uint256 fee))",
297
- "function totalDebt(address) view returns (uint256)",
298
- // Pricing
299
- "function bondPrice() view returns (uint256)",
300
- "function bondPrice(address) view returns (uint256)",
301
- "function bondPriceInUSD() view returns (uint256)",
302
- "function currentDebt() view returns (uint256)",
303
- "function debtRatio() view returns (uint256)",
304
- "function standardizedDebtRatio() view returns (uint256)",
305
- // User views
306
- "function bondInfo(address) view returns (tuple(uint256 payout,uint256 vesting,uint256 lastBlock,uint256 pricePaid))",
307
- "function pendingPayout(address) view returns (uint256)",
308
- "function percentVestedFor(address) view returns (uint256)",
309
- // Actions
310
- "function deposit(uint256 _amount, uint256 _maxPrice) returns (uint256 payout_)",
311
- "function redeem(address _recipient, bool _stake) returns (uint256)"
312
- ];
313
289
  var Events = {
314
290
  ProposalCreated: "event ProposalCreated(uint256 id, address proposer, address[] targets, uint256[] values, string[] signatures, bytes[] calldatas, uint256 startBlock, uint256 endBlock, string description)"
315
291
  };
@@ -328,10 +304,10 @@ var require_abi = __commonJS({
328
304
  PersonalLibraryFacet,
329
305
  PersonalMarketplace,
330
306
  PersonalLicenseReceipt,
331
- SageTreasury,
307
+ TreasuryWrapper,
308
+ // Protocol treasury (replaces SageTreasury)
332
309
  GovernanceBoostMerkle,
333
310
  GovernanceBoostDirect,
334
- BondDepository,
335
311
  Events
336
312
  };
337
313
  }
@@ -14,7 +14,7 @@ var require_package = __commonJS({
14
14
  "package.json"(exports2, module2) {
15
15
  module2.exports = {
16
16
  name: "@sage-protocol/sdk",
17
- version: "0.1.4",
17
+ version: "0.1.8",
18
18
  description: "Backend-agnostic SDK for interacting with the Sage Protocol (governance, SubDAOs, tokens).",
19
19
  main: "dist/index.cjs",
20
20
  module: "dist/index.mjs",
@@ -256,20 +256,19 @@ var require_abi = __commonJS({
256
256
  var PersonalLicenseReceipt = [
257
257
  "function balanceOf(address account, uint256 id) view returns (uint256)"
258
258
  ];
259
- var SageTreasury = [
260
- "function totalReserves() view returns (uint256)",
261
- "function totalPOL() view returns (uint256)",
262
- "function totalDebt() view returns (uint256)",
263
- "function canonicalPool() view returns (address)",
264
- "function routerOrVault() view returns (address)",
265
- "function maxWithdrawalRate() view returns (uint256)",
266
- "function emergencyWithdrawalLimit() view returns (uint256)",
267
- "function getReserveTokens() view returns (address[])",
268
- "function getReserve(address token) view returns (address tokenAddress,uint256 amount,uint256 value,bool isLP,bool isActive)",
269
- "function pendingWithdrawals(uint256) view returns (address token,address recipient,uint256 amount,uint256 value,address requester,uint256 balanceBefore,uint256 recipientBalanceBefore,uint256 depositSnapshot,bool isLP,bool isEmergency,bool exists)",
270
- "function nextWithdrawalId() view returns (uint256)",
271
- "function manualPrices(address token) view returns (uint256 price,uint256 expiresAt,bool active)",
272
- "function lpContributions(address,address) view returns (uint256)"
259
+ var TreasuryWrapper = [
260
+ "function execute(address,uint256,bytes,bytes32) returns (bool)",
261
+ "function allowedTargets(address) view returns (bool)",
262
+ "function allowedSelectors(bytes4) view returns (bool)",
263
+ "function owners(address) view returns (bool)",
264
+ "function ownerCount() view returns (uint256)",
265
+ "function registry() view returns (address)",
266
+ "event TreasuryAction(address indexed caller, address indexed target, uint256 value, bytes data, bytes32 refId)",
267
+ "event AllowedTargetUpdated(address indexed target, bool allowed)",
268
+ "event AllowedSelectorUpdated(bytes4 indexed selector, bool allowed)",
269
+ "event OwnerAdded(address indexed owner)",
270
+ "event OwnerRemoved(address indexed owner)",
271
+ "event TokensSwept(address indexed token, address indexed to, uint256 amount)"
273
272
  ];
274
273
  var GovernanceBoostMerkle = [
275
274
  "function getProposalConfig(uint256) view returns (tuple(uint256 proposalId,address token,uint256 totalAmount,uint64 startTime,uint64 endTime,uint256 merkleRoot))",
@@ -281,29 +280,6 @@ var require_abi = __commonJS({
281
280
  "function create(uint256 proposalId, address token, uint256 perVoter, uint256 maxVoters)",
282
281
  "function fund(uint256 proposalId, uint256 amount)"
283
282
  ];
284
- var BondDepository = [
285
- // Core getters
286
- "function payoutToken() view returns (address)",
287
- "function principalToken() view returns (address)",
288
- "function treasury() view returns (address)",
289
- // Terms
290
- "function terms() view returns (tuple(uint256 controlVariable,uint256 minimumPrice,uint256 maxPayout,uint256 maxDebt,uint256 vestingTerm,uint256 fee))",
291
- "function totalDebt(address) view returns (uint256)",
292
- // Pricing
293
- "function bondPrice() view returns (uint256)",
294
- "function bondPrice(address) view returns (uint256)",
295
- "function bondPriceInUSD() view returns (uint256)",
296
- "function currentDebt() view returns (uint256)",
297
- "function debtRatio() view returns (uint256)",
298
- "function standardizedDebtRatio() view returns (uint256)",
299
- // User views
300
- "function bondInfo(address) view returns (tuple(uint256 payout,uint256 vesting,uint256 lastBlock,uint256 pricePaid))",
301
- "function pendingPayout(address) view returns (uint256)",
302
- "function percentVestedFor(address) view returns (uint256)",
303
- // Actions
304
- "function deposit(uint256 _amount, uint256 _maxPrice) returns (uint256 payout_)",
305
- "function redeem(address _recipient, bool _stake) returns (uint256)"
306
- ];
307
283
  var Events = {
308
284
  ProposalCreated: "event ProposalCreated(uint256 id, address proposer, address[] targets, uint256[] values, string[] signatures, bytes[] calldatas, uint256 startBlock, uint256 endBlock, string description)"
309
285
  };
@@ -322,10 +298,10 @@ var require_abi = __commonJS({
322
298
  PersonalLibraryFacet,
323
299
  PersonalMarketplace,
324
300
  PersonalLicenseReceipt,
325
- SageTreasury,
301
+ TreasuryWrapper,
302
+ // Protocol treasury (replaces SageTreasury)
326
303
  GovernanceBoostMerkle,
327
304
  GovernanceBoostDirect,
328
- BondDepository,
329
305
  Events
330
306
  };
331
307
  }
@@ -20,7 +20,7 @@ var require_package = __commonJS({
20
20
  "package.json"(exports2, module2) {
21
21
  module2.exports = {
22
22
  name: "@sage-protocol/sdk",
23
- version: "0.1.4",
23
+ version: "0.1.8",
24
24
  description: "Backend-agnostic SDK for interacting with the Sage Protocol (governance, SubDAOs, tokens).",
25
25
  main: "dist/index.cjs",
26
26
  module: "dist/index.mjs",
@@ -262,20 +262,19 @@ var require_abi = __commonJS({
262
262
  var PersonalLicenseReceipt = [
263
263
  "function balanceOf(address account, uint256 id) view returns (uint256)"
264
264
  ];
265
- var SageTreasury = [
266
- "function totalReserves() view returns (uint256)",
267
- "function totalPOL() view returns (uint256)",
268
- "function totalDebt() view returns (uint256)",
269
- "function canonicalPool() view returns (address)",
270
- "function routerOrVault() view returns (address)",
271
- "function maxWithdrawalRate() view returns (uint256)",
272
- "function emergencyWithdrawalLimit() view returns (uint256)",
273
- "function getReserveTokens() view returns (address[])",
274
- "function getReserve(address token) view returns (address tokenAddress,uint256 amount,uint256 value,bool isLP,bool isActive)",
275
- "function pendingWithdrawals(uint256) view returns (address token,address recipient,uint256 amount,uint256 value,address requester,uint256 balanceBefore,uint256 recipientBalanceBefore,uint256 depositSnapshot,bool isLP,bool isEmergency,bool exists)",
276
- "function nextWithdrawalId() view returns (uint256)",
277
- "function manualPrices(address token) view returns (uint256 price,uint256 expiresAt,bool active)",
278
- "function lpContributions(address,address) view returns (uint256)"
265
+ var TreasuryWrapper = [
266
+ "function execute(address,uint256,bytes,bytes32) returns (bool)",
267
+ "function allowedTargets(address) view returns (bool)",
268
+ "function allowedSelectors(bytes4) view returns (bool)",
269
+ "function owners(address) view returns (bool)",
270
+ "function ownerCount() view returns (uint256)",
271
+ "function registry() view returns (address)",
272
+ "event TreasuryAction(address indexed caller, address indexed target, uint256 value, bytes data, bytes32 refId)",
273
+ "event AllowedTargetUpdated(address indexed target, bool allowed)",
274
+ "event AllowedSelectorUpdated(bytes4 indexed selector, bool allowed)",
275
+ "event OwnerAdded(address indexed owner)",
276
+ "event OwnerRemoved(address indexed owner)",
277
+ "event TokensSwept(address indexed token, address indexed to, uint256 amount)"
279
278
  ];
280
279
  var GovernanceBoostMerkle = [
281
280
  "function getProposalConfig(uint256) view returns (tuple(uint256 proposalId,address token,uint256 totalAmount,uint64 startTime,uint64 endTime,uint256 merkleRoot))",
@@ -287,29 +286,6 @@ var require_abi = __commonJS({
287
286
  "function create(uint256 proposalId, address token, uint256 perVoter, uint256 maxVoters)",
288
287
  "function fund(uint256 proposalId, uint256 amount)"
289
288
  ];
290
- var BondDepository = [
291
- // Core getters
292
- "function payoutToken() view returns (address)",
293
- "function principalToken() view returns (address)",
294
- "function treasury() view returns (address)",
295
- // Terms
296
- "function terms() view returns (tuple(uint256 controlVariable,uint256 minimumPrice,uint256 maxPayout,uint256 maxDebt,uint256 vestingTerm,uint256 fee))",
297
- "function totalDebt(address) view returns (uint256)",
298
- // Pricing
299
- "function bondPrice() view returns (uint256)",
300
- "function bondPrice(address) view returns (uint256)",
301
- "function bondPriceInUSD() view returns (uint256)",
302
- "function currentDebt() view returns (uint256)",
303
- "function debtRatio() view returns (uint256)",
304
- "function standardizedDebtRatio() view returns (uint256)",
305
- // User views
306
- "function bondInfo(address) view returns (tuple(uint256 payout,uint256 vesting,uint256 lastBlock,uint256 pricePaid))",
307
- "function pendingPayout(address) view returns (uint256)",
308
- "function percentVestedFor(address) view returns (uint256)",
309
- // Actions
310
- "function deposit(uint256 _amount, uint256 _maxPrice) returns (uint256 payout_)",
311
- "function redeem(address _recipient, bool _stake) returns (uint256)"
312
- ];
313
289
  var Events = {
314
290
  ProposalCreated: "event ProposalCreated(uint256 id, address proposer, address[] targets, uint256[] values, string[] signatures, bytes[] calldatas, uint256 startBlock, uint256 endBlock, string description)"
315
291
  };
@@ -328,10 +304,10 @@ var require_abi = __commonJS({
328
304
  PersonalLibraryFacet,
329
305
  PersonalMarketplace,
330
306
  PersonalLicenseReceipt,
331
- SageTreasury,
307
+ TreasuryWrapper,
308
+ // Protocol treasury (replaces SageTreasury)
332
309
  GovernanceBoostMerkle,
333
310
  GovernanceBoostDirect,
334
- BondDepository,
335
311
  Events
336
312
  };
337
313
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sage-protocol/sdk",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "Backend-agnostic SDK for interacting with the Sage Protocol (governance, SubDAOs, tokens).",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",