Governance

Proposal Management 

 Create a new governance proposal. 

 HTTP Request 

 POST /api/v1/vaults/{vaultId}/proposals 

 Sample Request 

 {

 "proposer": "user_wallet123",

 "proposal_details": {

 "title": "Liquidate Asset A",

 "description": "Sell asset A for 90% of its floor price.",

 "action_type": "sell_asset",

 "affected_assets": [

 {

 "policy_id": "policy12345",

 "asset_name": "ExampleAsset"

 }

 ]

 },

 "governance_thresholds": {

 "creation_threshold": 5,

 "start_threshold": 10,

 "vote_threshold": 50,

 "execution_threshold": 60

 }

} 

 Sample Response (201: Created) 

 {

 "vault_id": "vault123",

 "proposal_id": "proposal789",

 "transaction": {

 "tx_hash": "de1234abc567890def1234567890abcdef1234567890abcdef12345678",

 "status": "confirmed",

 "block_height": 1234575

 },

 "status": "created",

 "thresholds_met": {

 "creation_threshold": true

 },

 "created_at": "2024-11-23T12:00:00Z"

} 

 Submit Vote 

 Submit a vote on a proposal. 

 HTTP Request 

 POST /api/v1/proposals/{proposalId}/votes 

 Sample Request 

 {

 "voter": {

 "wallet_address": "addr1q9voter123",

 "staked_ft_amount": 1000

 },

 "vote": "yes"

} 

 Sample Response (200: OK) 

 {

 "vault_id": "vault123",

 "proposal_id": "proposal789",

 "voter": "addr1q9voter123",

 "transaction": {

 "tx_hash": "ab567890abcdef1234567890abcdef1234567890abcdef1234567890",

 "status": "confirmed",

 "block_height": 1234580

 },

 "vote": "yes",

 "staked_ft_amount": 1000,

 "status": "vote_recorded",

 "updated_at": "2024-11-23T13:00:00Z"

} 

 Execute Proposal 

 Execute an approved proposal. 

 Endpoint 

 POST /api/v1/proposals/{proposalId}/execute 

 Sample Request 

 {

 "executing_user": "user_wallet123",

 "cosigners": [

 "wallet_cosigner1",

 "wallet_cosigner2"

 ],

 "action": {

 "type": "sell_asset",

 "details": {

 "policy_id": "policy12345",

 "asset_name": "ExampleAsset",

 "price": 900000

 }

 }

} 

 Sample Response (200: OK) 

 {

 "vault_id": "vault123",

 "proposal_id": "proposal789",

 "transaction": {

 "tx_hash": "cd1234567890abcdef1234567890abcdef1234567890abcdef123456",

 "status": "confirmed",

 "block_height": 1234585

 },

 "status": "executed",

 "executed_by": "user_wallet123",

 "cosigners": [

 "wallet_cosigner1",

 "wallet_cosigner2"

 ],

 "action": {

 "type": "sell_asset",

 "details": {

 "policy_id": "policy12345",

 "asset_name": "ExampleAsset",

 "price": 900000

 }

 },

 "executed_at": "2024-11-23T14:00:00Z"

}