Skip to main content

Governance

Proposal Management

Create a new governance proposal.

HTTP Request
POST /api/v1/vaults/{vaultId}/proposals
Sample Request
{
  "type": "ASSET_SALE",
  "settings": {
    "votingPhase": "24:00:00",
    "lockPhase": "12:00:00",
    "executionPhase": "24:00:00",
    "assets": ["asset_123"],
    "effects": {
      "type": "LIST",
      "parameters": {
        "marketplace": "jpg.store",
        "price": "100000",
        "duration": "168:00:00"
      }
    }
  }
}
Sample Response
{
  "status": "success",
  "data": {
    "proposalId": "prop_789",
    "timeline": {
      "created": "2024-12-10T00:00:00Z",
      "votingStart": "2024-12-10T00:00:00Z",
      "votingEnd": "2024-12-11T00:00:00Z",
      "lockStart": "2024-12-11T00:00:00Z",
      "lockEnd": "2024-12-11T12:00:00Z",
      "executionEnd": "2024-12-12T12:00:00Z"
    },
    "thresholds": {
      "vote": "50.00",
      "execution": "75.00"
    }
  }
}

Submit Vote

Submit a vote on a proposal.

HTTP Request
POST /api/v1/proposals/{proposalId}/votes
Sample Request
{
  "wallet": "addr_voter123...",
  "vote": "APPROVE",
  "amount": "1000"
}
Sample Response
{
  "status": "success",
  "data": {
    "voteId": "vote_456",
    "votingPower": "1000",
    "currentTotals": {
      "approve": "75000",
      "reject": "25000",
      "totalVoted": "100000",
      "quorum": "65.00"
    },
    "transactionHash": "tx_hash789..."
  }
}

Execute Proposal

Execute an approved proposal.

HTTP Request
POST /api/v1/proposals/{proposalId}/execute
Sample Request
{
  "cosigners": ["addr_signer1...", "addr_signer2..."]
}
Sample Response
{
  "status": "success",
  "data": {
    "executionId": "exec_123",
    "status": "IN_PROGRESS",
    "effects": [{
      "type": "LIST",
      "status": "COMPLETED",
      "transactionHash": "tx_hash101...",
      "marketplace": "jpg.store",
      "listingId": "list_789"
    }],
    "timestamps": {
      "started": "2024-12-12T10:00:00Z",
      "completed": "2024-12-12T10:05:00Z"
    }
  }
}