@sage-protocol/sdk 0.1.10 → 0.1.11
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 +1 -7
- package/dist/index.cjs +3 -9
- package/dist/index.mjs +3 -9
- package/dist/node/index.cjs +3 -9
- package/dist/node/index.mjs +3 -9
- package/package.json +1 -1
package/dist/browser/index.mjs
CHANGED
|
@@ -143,13 +143,7 @@ var require_abi = __commonJS({
|
|
|
143
143
|
"function stats() view returns (uint128 totalSubDAOsCreated, uint128 totalBurnedForCreation)",
|
|
144
144
|
// On-chain enumeration fallback (naming follows FactoryCoreFacet)
|
|
145
145
|
"function getSubDAOCount() view returns (uint256)",
|
|
146
|
-
"function subDaos(uint256) view returns (address)"
|
|
147
|
-
// ISubDAOFactory interface functions
|
|
148
|
-
"function getAllSubDAOs() view returns (address[])",
|
|
149
|
-
"function getSubDAORegistry(address subdaoAddress) view returns (address)",
|
|
150
|
-
"function getRegistrySubDAO(address registryAddress) view returns (address)",
|
|
151
|
-
"function getFactoryStats() view returns (uint256 totalSubDAOs, uint256 totalBurned, uint256 averageBurnPerSubDAO)",
|
|
152
|
-
"function isSubDAO(address subdaoAddress) view returns (bool)"
|
|
146
|
+
"function subDaos(uint256) view returns (address)"
|
|
153
147
|
];
|
|
154
148
|
var FactoryWrite = [
|
|
155
149
|
"function createSubDAO(string name, string description, uint8 accessModel, uint256 minStakeAmount, uint256 burnAmount) returns (address subDAO, address registry)",
|
package/dist/index.cjs
CHANGED
|
@@ -143,13 +143,7 @@ var require_abi = __commonJS({
|
|
|
143
143
|
"function stats() view returns (uint128 totalSubDAOsCreated, uint128 totalBurnedForCreation)",
|
|
144
144
|
// On-chain enumeration fallback (naming follows FactoryCoreFacet)
|
|
145
145
|
"function getSubDAOCount() view returns (uint256)",
|
|
146
|
-
"function subDaos(uint256) view returns (address)"
|
|
147
|
-
// ISubDAOFactory interface functions
|
|
148
|
-
"function getAllSubDAOs() view returns (address[])",
|
|
149
|
-
"function getSubDAORegistry(address subdaoAddress) view returns (address)",
|
|
150
|
-
"function getRegistrySubDAO(address registryAddress) view returns (address)",
|
|
151
|
-
"function getFactoryStats() view returns (uint256 totalSubDAOs, uint256 totalBurned, uint256 averageBurnPerSubDAO)",
|
|
152
|
-
"function isSubDAO(address subdaoAddress) view returns (bool)"
|
|
146
|
+
"function subDaos(uint256) view returns (address)"
|
|
153
147
|
];
|
|
154
148
|
var FactoryWrite = [
|
|
155
149
|
"function createSubDAO(string name, string description, uint8 accessModel, uint256 minStakeAmount, uint256 burnAmount) returns (address subDAO, address registry)",
|
|
@@ -2516,7 +2510,7 @@ var require_governance = __commonJS({
|
|
|
2516
2510
|
/**
|
|
2517
2511
|
* Detect governance mode and operator status.
|
|
2518
2512
|
* Heuristics mirror CLI detectGovMode.
|
|
2519
|
-
* Returns { operator: boolean, governance: '
|
|
2513
|
+
* Returns { operator: boolean, governance: 'Personal'|'Community'|'Unknown', governor, timelock, subdao, stakeRequired, depositWei }
|
|
2520
2514
|
*/
|
|
2521
2515
|
detectMode: async function detectMode({ provider, governor, timelock: timelock2, subdao: subdao2 }) {
|
|
2522
2516
|
const out = {
|
|
@@ -2536,7 +2530,7 @@ var require_governance = __commonJS({
|
|
|
2536
2530
|
if (!timelock2) out.timelock = await sub.timelock();
|
|
2537
2531
|
try {
|
|
2538
2532
|
const mode = await sub.getGovernanceMode();
|
|
2539
|
-
out.governance = Number(mode) === 0 ? "
|
|
2533
|
+
out.governance = Number(mode) === 0 ? "Personal" : "Community";
|
|
2540
2534
|
} catch (_) {
|
|
2541
2535
|
}
|
|
2542
2536
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -149,13 +149,7 @@ var require_abi = __commonJS({
|
|
|
149
149
|
"function stats() view returns (uint128 totalSubDAOsCreated, uint128 totalBurnedForCreation)",
|
|
150
150
|
// On-chain enumeration fallback (naming follows FactoryCoreFacet)
|
|
151
151
|
"function getSubDAOCount() view returns (uint256)",
|
|
152
|
-
"function subDaos(uint256) view returns (address)"
|
|
153
|
-
// ISubDAOFactory interface functions
|
|
154
|
-
"function getAllSubDAOs() view returns (address[])",
|
|
155
|
-
"function getSubDAORegistry(address subdaoAddress) view returns (address)",
|
|
156
|
-
"function getRegistrySubDAO(address registryAddress) view returns (address)",
|
|
157
|
-
"function getFactoryStats() view returns (uint256 totalSubDAOs, uint256 totalBurned, uint256 averageBurnPerSubDAO)",
|
|
158
|
-
"function isSubDAO(address subdaoAddress) view returns (bool)"
|
|
152
|
+
"function subDaos(uint256) view returns (address)"
|
|
159
153
|
];
|
|
160
154
|
var FactoryWrite = [
|
|
161
155
|
"function createSubDAO(string name, string description, uint8 accessModel, uint256 minStakeAmount, uint256 burnAmount) returns (address subDAO, address registry)",
|
|
@@ -2522,7 +2516,7 @@ var require_governance = __commonJS({
|
|
|
2522
2516
|
/**
|
|
2523
2517
|
* Detect governance mode and operator status.
|
|
2524
2518
|
* Heuristics mirror CLI detectGovMode.
|
|
2525
|
-
* Returns { operator: boolean, governance: '
|
|
2519
|
+
* Returns { operator: boolean, governance: 'Personal'|'Community'|'Unknown', governor, timelock, subdao, stakeRequired, depositWei }
|
|
2526
2520
|
*/
|
|
2527
2521
|
detectMode: async function detectMode({ provider, governor, timelock, subdao }) {
|
|
2528
2522
|
const out = {
|
|
@@ -2542,7 +2536,7 @@ var require_governance = __commonJS({
|
|
|
2542
2536
|
if (!timelock) out.timelock = await sub.timelock();
|
|
2543
2537
|
try {
|
|
2544
2538
|
const mode = await sub.getGovernanceMode();
|
|
2545
|
-
out.governance = Number(mode) === 0 ? "
|
|
2539
|
+
out.governance = Number(mode) === 0 ? "Personal" : "Community";
|
|
2546
2540
|
} catch (_) {
|
|
2547
2541
|
}
|
|
2548
2542
|
}
|
package/dist/node/index.cjs
CHANGED
|
@@ -143,13 +143,7 @@ var require_abi = __commonJS({
|
|
|
143
143
|
"function stats() view returns (uint128 totalSubDAOsCreated, uint128 totalBurnedForCreation)",
|
|
144
144
|
// On-chain enumeration fallback (naming follows FactoryCoreFacet)
|
|
145
145
|
"function getSubDAOCount() view returns (uint256)",
|
|
146
|
-
"function subDaos(uint256) view returns (address)"
|
|
147
|
-
// ISubDAOFactory interface functions
|
|
148
|
-
"function getAllSubDAOs() view returns (address[])",
|
|
149
|
-
"function getSubDAORegistry(address subdaoAddress) view returns (address)",
|
|
150
|
-
"function getRegistrySubDAO(address registryAddress) view returns (address)",
|
|
151
|
-
"function getFactoryStats() view returns (uint256 totalSubDAOs, uint256 totalBurned, uint256 averageBurnPerSubDAO)",
|
|
152
|
-
"function isSubDAO(address subdaoAddress) view returns (bool)"
|
|
146
|
+
"function subDaos(uint256) view returns (address)"
|
|
153
147
|
];
|
|
154
148
|
var FactoryWrite = [
|
|
155
149
|
"function createSubDAO(string name, string description, uint8 accessModel, uint256 minStakeAmount, uint256 burnAmount) returns (address subDAO, address registry)",
|
|
@@ -2516,7 +2510,7 @@ var require_governance = __commonJS({
|
|
|
2516
2510
|
/**
|
|
2517
2511
|
* Detect governance mode and operator status.
|
|
2518
2512
|
* Heuristics mirror CLI detectGovMode.
|
|
2519
|
-
* Returns { operator: boolean, governance: '
|
|
2513
|
+
* Returns { operator: boolean, governance: 'Personal'|'Community'|'Unknown', governor, timelock, subdao, stakeRequired, depositWei }
|
|
2520
2514
|
*/
|
|
2521
2515
|
detectMode: async function detectMode({ provider, governor, timelock, subdao }) {
|
|
2522
2516
|
const out = {
|
|
@@ -2536,7 +2530,7 @@ var require_governance = __commonJS({
|
|
|
2536
2530
|
if (!timelock) out.timelock = await sub.timelock();
|
|
2537
2531
|
try {
|
|
2538
2532
|
const mode = await sub.getGovernanceMode();
|
|
2539
|
-
out.governance = Number(mode) === 0 ? "
|
|
2533
|
+
out.governance = Number(mode) === 0 ? "Personal" : "Community";
|
|
2540
2534
|
} catch (_) {
|
|
2541
2535
|
}
|
|
2542
2536
|
}
|
package/dist/node/index.mjs
CHANGED
|
@@ -149,13 +149,7 @@ var require_abi = __commonJS({
|
|
|
149
149
|
"function stats() view returns (uint128 totalSubDAOsCreated, uint128 totalBurnedForCreation)",
|
|
150
150
|
// On-chain enumeration fallback (naming follows FactoryCoreFacet)
|
|
151
151
|
"function getSubDAOCount() view returns (uint256)",
|
|
152
|
-
"function subDaos(uint256) view returns (address)"
|
|
153
|
-
// ISubDAOFactory interface functions
|
|
154
|
-
"function getAllSubDAOs() view returns (address[])",
|
|
155
|
-
"function getSubDAORegistry(address subdaoAddress) view returns (address)",
|
|
156
|
-
"function getRegistrySubDAO(address registryAddress) view returns (address)",
|
|
157
|
-
"function getFactoryStats() view returns (uint256 totalSubDAOs, uint256 totalBurned, uint256 averageBurnPerSubDAO)",
|
|
158
|
-
"function isSubDAO(address subdaoAddress) view returns (bool)"
|
|
152
|
+
"function subDaos(uint256) view returns (address)"
|
|
159
153
|
];
|
|
160
154
|
var FactoryWrite = [
|
|
161
155
|
"function createSubDAO(string name, string description, uint8 accessModel, uint256 minStakeAmount, uint256 burnAmount) returns (address subDAO, address registry)",
|
|
@@ -2522,7 +2516,7 @@ var require_governance = __commonJS({
|
|
|
2522
2516
|
/**
|
|
2523
2517
|
* Detect governance mode and operator status.
|
|
2524
2518
|
* Heuristics mirror CLI detectGovMode.
|
|
2525
|
-
* Returns { operator: boolean, governance: '
|
|
2519
|
+
* Returns { operator: boolean, governance: 'Personal'|'Community'|'Unknown', governor, timelock, subdao, stakeRequired, depositWei }
|
|
2526
2520
|
*/
|
|
2527
2521
|
detectMode: async function detectMode({ provider, governor, timelock, subdao }) {
|
|
2528
2522
|
const out = {
|
|
@@ -2542,7 +2536,7 @@ var require_governance = __commonJS({
|
|
|
2542
2536
|
if (!timelock) out.timelock = await sub.timelock();
|
|
2543
2537
|
try {
|
|
2544
2538
|
const mode = await sub.getGovernanceMode();
|
|
2545
|
-
out.governance = Number(mode) === 0 ? "
|
|
2539
|
+
out.governance = Number(mode) === 0 ? "Personal" : "Community";
|
|
2546
2540
|
} catch (_) {
|
|
2547
2541
|
}
|
|
2548
2542
|
}
|
package/package.json
CHANGED