@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/browser/index.mjs +548 -5180
- package/dist/index.cjs +16 -40
- package/dist/index.mjs +16 -40
- package/dist/node/index.cjs +16 -40
- package/dist/node/index.mjs +16 -40
- package/package.json +1 -1
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.
|
|
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
|
|
260
|
-
"function
|
|
261
|
-
"function
|
|
262
|
-
"function
|
|
263
|
-
"function
|
|
264
|
-
"function
|
|
265
|
-
"function
|
|
266
|
-
"
|
|
267
|
-
"
|
|
268
|
-
"
|
|
269
|
-
"
|
|
270
|
-
"
|
|
271
|
-
"
|
|
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
|
-
|
|
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.
|
|
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
|
|
266
|
-
"function
|
|
267
|
-
"function
|
|
268
|
-
"function
|
|
269
|
-
"function
|
|
270
|
-
"function
|
|
271
|
-
"function
|
|
272
|
-
"
|
|
273
|
-
"
|
|
274
|
-
"
|
|
275
|
-
"
|
|
276
|
-
"
|
|
277
|
-
"
|
|
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
|
-
|
|
307
|
+
TreasuryWrapper,
|
|
308
|
+
// Protocol treasury (replaces SageTreasury)
|
|
332
309
|
GovernanceBoostMerkle,
|
|
333
310
|
GovernanceBoostDirect,
|
|
334
|
-
BondDepository,
|
|
335
311
|
Events
|
|
336
312
|
};
|
|
337
313
|
}
|
package/dist/node/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.
|
|
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
|
|
260
|
-
"function
|
|
261
|
-
"function
|
|
262
|
-
"function
|
|
263
|
-
"function
|
|
264
|
-
"function
|
|
265
|
-
"function
|
|
266
|
-
"
|
|
267
|
-
"
|
|
268
|
-
"
|
|
269
|
-
"
|
|
270
|
-
"
|
|
271
|
-
"
|
|
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
|
-
|
|
301
|
+
TreasuryWrapper,
|
|
302
|
+
// Protocol treasury (replaces SageTreasury)
|
|
326
303
|
GovernanceBoostMerkle,
|
|
327
304
|
GovernanceBoostDirect,
|
|
328
|
-
BondDepository,
|
|
329
305
|
Events
|
|
330
306
|
};
|
|
331
307
|
}
|
package/dist/node/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.
|
|
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
|
|
266
|
-
"function
|
|
267
|
-
"function
|
|
268
|
-
"function
|
|
269
|
-
"function
|
|
270
|
-
"function
|
|
271
|
-
"function
|
|
272
|
-
"
|
|
273
|
-
"
|
|
274
|
-
"
|
|
275
|
-
"
|
|
276
|
-
"
|
|
277
|
-
"
|
|
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
|
-
|
|
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