@sage-protocol/sdk 0.2.8 → 0.3.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sage-protocol/sdk",
3
- "version": "0.2.8",
3
+ "version": "0.3.0",
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",
@@ -58,7 +58,6 @@
58
58
  },
59
59
  "dependencies": {
60
60
  "@merit-systems/echo-typescript-sdk": "^1.0.17",
61
- "@whetstone-research/doppler-sdk": "^0.0.1-alpha.40",
62
61
  "ai": "^5.0.52",
63
62
  "axios": "^1.11.0",
64
63
  "ethers": "^6.15.0",
package/types/index.d.ts CHANGED
@@ -147,6 +147,11 @@ export type ProposalAccess = 'council-only' | 'community-threshold';
147
147
  export type ExecutionAccess = 'council-only' | 'anyone';
148
148
  export type GovernancePlaybook = 'council-closed' | 'council-drafts' | 'community' | 'legacy' | 'custom';
149
149
 
150
+ // UX-facing labels (webapp/cli alignment)
151
+ export type GovernanceMode = 'COMMUNITY_MANAGED' | 'TEAM_MANAGED' | 'INDIVIDUAL_MANAGED';
152
+ export type ManagedScope = 'INDIVIDUAL' | 'TEAM' | 'UNKNOWN';
153
+ export type QueueWiring = 'GOVERNOR_ONLY' | 'OPERATORS_ONLY' | 'BOTH' | 'NEITHER';
154
+
150
155
  export interface GovernanceProfile {
151
156
  /** Profile version: 1=legacy (detected via heuristics), 2=explicit 3-axis profile */
152
157
  version: 1 | 2;
@@ -825,6 +830,7 @@ export interface MerkleBoost {
825
830
  totalPool: bigint;
826
831
  totalClaimed: bigint;
827
832
  merkleRoot: HashLike;
833
+ expiresAt: bigint;
828
834
  active: boolean;
829
835
  finalized: boolean;
830
836
  creator: AddressLike;
@@ -905,7 +911,6 @@ export interface BoostModule {
905
911
  }
906
912
 
907
913
  export interface PersonalModule {
908
- buildCreatePersonalRegistryTx(args: { factory: AddressLike; policy: number }): TransactionPayload;
909
914
  buildSetPriceTx(args: { marketplace: AddressLike; key: string; price: BigNumberish }): TransactionPayload;
910
915
  buildBuyTx(args: {
911
916
  marketplace: AddressLike;
@@ -1003,7 +1008,7 @@ export interface AuctionConfig {
1003
1008
  weth: AddressLike;
1004
1009
  timeBuffer: bigint;
1005
1010
  reservePrice: bigint;
1006
- minBidIncrementPercentage: bigint;
1011
+ minBidIncrementBps: bigint;
1007
1012
  duration: bigint;
1008
1013
  mintTierId: bigint;
1009
1014
  defaultTokenURI: string;
@@ -1026,7 +1031,7 @@ export interface AuctionModule {
1026
1031
  buildUnpauseTx(args: { auctionHouse: AddressLike }): TransactionPayload;
1027
1032
  buildSetTimeBufferTx(args: { auctionHouse: AddressLike; timeBuffer: BigNumberish }): TransactionPayload;
1028
1033
  buildSetReservePriceTx(args: { auctionHouse: AddressLike; reservePrice: BigNumberish }): TransactionPayload;
1029
- buildSetMinBidIncrementTx(args: { auctionHouse: AddressLike; percentage: BigNumberish }): TransactionPayload;
1034
+ buildSetMinBidIncrementTx(args: { auctionHouse: AddressLike; bps: BigNumberish }): TransactionPayload;
1030
1035
  buildSetDurationTx(args: { auctionHouse: AddressLike; duration: BigNumberish }): TransactionPayload;
1031
1036
  buildSetMintTierIdTx(args: { auctionHouse: AddressLike; tierId: BigNumberish }): TransactionPayload;
1032
1037
  buildSetDefaultTokenURITx(args: { auctionHouse: AddressLike; uri: string }): TransactionPayload;
@@ -1034,7 +1039,7 @@ export interface AuctionModule {
1034
1039
 
1035
1040
  // ============ Bounty System Types ============
1036
1041
 
1037
- export type BountyMode = 'OPEN' | 'DIRECT' | 'COMPETITIVE';
1042
+ export type BountyMode = 'DIRECT' | 'COMPETITIVE';
1038
1043
  export type BountyStatus = 'ACTIVE' | 'CLAIMED' | 'UNDER_REVIEW' | 'VOTING' | 'COMPLETED' | 'CANCELLED' | 'EXPIRED';
1039
1044
  export type LibraryAction = 'PAYMENT_ONLY' | 'ADD_TO_LIBRARY' | 'PAYMENT_AND_ADD';
1040
1045
 
@@ -1222,19 +1227,13 @@ export interface BountyModule {
1222
1227
  assignee: AddressLike;
1223
1228
  libraryKey: string;
1224
1229
  }): TransactionPayload;
1225
- // Claiming & Submission
1226
- buildClaimBountyTx(args: { bountySystem: AddressLike; bountyId: BigNumberish }): TransactionPayload;
1230
+ // Submission
1227
1231
  buildSubmitEntryTx(args: {
1228
1232
  bountySystem: AddressLike;
1229
1233
  bountyId: BigNumberish;
1230
1234
  promptIPFS: string;
1231
1235
  deliverableIPFS: string;
1232
1236
  }): TransactionPayload;
1233
- buildCompleteBountyTx(args: {
1234
- bountySystem: AddressLike;
1235
- bountyId: BigNumberish;
1236
- deliverableIPFS: string;
1237
- }): TransactionPayload;
1238
1237
  // Voting (COMPETITIVE mode)
1239
1238
  buildStartVotingTx(args: { bountySystem: AddressLike; bountyId: BigNumberish }): TransactionPayload;
1240
1239
  buildVoteTx(args: { bountySystem: AddressLike; bountyId: BigNumberish; submissionId: BigNumberish }): TransactionPayload;
@@ -1471,6 +1470,32 @@ export interface GitStorageClientConstructor {
1471
1470
 
1472
1471
  export declare const GitStorageClient: GitStorageClientConstructor;
1473
1472
 
1473
+ // ============ Library Visibility & Credit Types ============
1474
+
1475
+ export type LibraryVisibility = 'public' | 'private' | 'shared';
1476
+ export type LibraryTier = 'personal' | 'shared' | 'dao';
1477
+
1478
+ export interface LibraryLimitError {
1479
+ error: string;
1480
+ code: string;
1481
+ costCredits: number;
1482
+ currentCount: number;
1483
+ freeLimit: number;
1484
+ message: string;
1485
+ }
1486
+
1487
+ export interface InsufficientCreditsError {
1488
+ error: string;
1489
+ needed: number;
1490
+ balance: number;
1491
+ message: string;
1492
+ }
1493
+
1494
+ export interface CreditBalanceResponse {
1495
+ balance: number;
1496
+ wallet: string;
1497
+ }
1498
+
1474
1499
  export interface SageSDK {
1475
1500
  version: string;
1476
1501
  getProvider: (rpcUrl: string) => any;