Governance
Proposal Management
Create a new governance proposal.
HTTP Request
POST /api/v1/vaults/{vaultId}/proposals
Sample Request
{
"type"proposer": "ASSET_SALE"user_wallet123",
"settings"proposal_details": {
"votingPhase"title": "24:00:00"Liquidate Asset A",
"lockPhase"description": "12:00:00"Sell asset A for 90% of its floor price.",
"executionPhase"action_type": "24:00:00"sell_asset",
"assets"affected_assets": [
{
"asset_123"]policy_id": "policy12345",
"effects"asset_name": "ExampleAsset"
}
]
},
"governance_thresholds": {
"type"creation_threshold": "LIST",5,
"parameters"start_threshold": {10,
"marketplace"vote_threshold": "jpg.store",50,
"price"execution_threshold": "100000",
"duration": "168:00:00"
}
}60
}
}
Sample Response (201: Created)
{
"status"vault_id": "success"vault123",
"data"proposal_id": "proposal789",
"transaction": {
"proposalId"tx_hash": "prop_789"de1234abc567890def1234567890abcdef1234567890abcdef12345678",
"timeline"status": "confirmed",
"block_height": 1234575
},
"status": "created",
"thresholds_met": {
"created"creation_threshold": "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"true
},
"thresholds": {
"vote"created_at": "50.00",
"execution": "75.00"
}
}2024-11-23T12:00:00Z"
}
Submit Vote
Submit a vote on a proposal.
HTTP Request
POST /api/v1/proposals/{proposalId}/votes
Sample Request
{
"wallet"voter": {
"wallet_address": "addr_voter123...addr1q9voter123",
"staked_ft_amount": 1000
},
"vote": "APPROVE",
"amount": "1000"yes"
}
Sample Response (200: OK)
{
"status"vault_id": "success"vault123",
"data"proposal_id": "proposal789",
"voter": "addr1q9voter123",
"transaction": {
"voteId"tx_hash": "vote_456"ab567890abcdef1234567890abcdef1234567890abcdef1234567890",
"votingPower"status": "1000"confirmed",
"currentTotals"block_height": {
"approve": "75000",
"reject": "25000",
"totalVoted": "100000",
"quorum": "65.00"1234580
},
"transactionHash"vote": "tx_hash789...yes",
"staked_ft_amount": }1000,
"status": "vote_recorded",
"updated_at": "2024-11-23T13:00:00Z"
}
Execute Proposal
Execute an approved proposal.
HTTP RequestEndpoint
POST /api/v1/proposals/{proposalId}/execute
Sample Request
{
"executing_user": "user_wallet123",
"cosigners": [
"addr_signer1..."wallet_cosigner1",
"addr_signer2...wallet_cosigner2"
],
"]action": {
"type": "sell_asset",
"details": {
"policy_id": "policy12345",
"asset_name": "ExampleAsset",
"price": 900000
}
}
}
Sample Response (200: OK)
{
"status"vault_id": "success"vault123",
"data"proposal_id": "proposal789",
"transaction": {
"executionId"tx_hash": "exec_123"cd1234567890abcdef1234567890abcdef1234567890abcdef123456",
"status": "IN_PROGRESS"confirmed",
"effects"block_height": 1234585
},
"status": "executed",
"executed_by": "user_wallet123",
"cosigners": [
"wallet_cosigner1",
"wallet_cosigner2"
],
"action": {
"type": "LIST"sell_asset",
"status": "COMPLETED",
"transactionHash": "tx_hash101...",
"marketplace": "jpg.store",
"listingId": "list_789"
}],
"timestamps"details": {
"started"policy_id": "policy12345",
"asset_name": "ExampleAsset",
"price": 900000
}
},
"executed_at": "2024-12-12T10:11-23T14:00:00Z",
"completed": "2024-12-12T10:05:00Z"
}
}
}