@@ -230,12 +230,51 @@ export const TxInfoSchema = Schema.Struct({
230230 } )
231231 )
232232 ) ,
233- //TODO: add Schema.Struct
234233 // https://preprod.koios.rest/#post-/tx_info
235- voting_procedures : Schema . Array ( Schema . Object ) ,
236- //TODO: add Schema.Struct
234+ voting_procedures : Schema . NullOr (
235+ Schema . Array (
236+ Schema . Struct ( {
237+ proposal_tx_hash : Schema . String ,
238+ proposal_index : Schema . Number ,
239+ voter_role : Schema . Literal ( "ConstitutionalCommittee" , "DRep" , "SPO" ) ,
240+ voter : Schema . String ,
241+ voter_hex : Schema . String ,
242+ vote : Schema . Literal ( "Yes" , "No" , "Abstain" )
243+ } )
244+ )
245+ ) ,
237246 // https://preprod.koios.rest/#post-/tx_info
238- proposal_procedures : Schema . Object
247+ proposal_procedures : Schema . NullOr (
248+ Schema . Array (
249+ Schema . Struct ( {
250+ index : Schema . Number ,
251+ type : Schema . Literal (
252+ "ParameterChange" ,
253+ "HardForkInitiation" ,
254+ "TreasuryWithdrawals" ,
255+ "NoConfidence" ,
256+ "NewCommittee" ,
257+ "NewConstitution" ,
258+ "InfoAction"
259+ ) ,
260+ description : Schema . Object ,
261+ deposit : Schema . String ,
262+ return_address : Schema . String ,
263+ expiration : Schema . NullOr ( Schema . Number ) ,
264+ meta_url : Schema . NullOr ( Schema . String ) ,
265+ meta_hash : Schema . NullOr ( Schema . String ) ,
266+ withdrawal : Schema . NullOr (
267+ Schema . Array (
268+ Schema . Struct ( {
269+ stake_address : Schema . String ,
270+ amount : Schema . String
271+ } )
272+ )
273+ ) ,
274+ param_proposal : Schema . NullOr ( Schema . Object )
275+ } )
276+ )
277+ )
239278} )
240279
241280export interface TxInfo extends Schema . Schema . Type < typeof TxInfoSchema > { }
0 commit comments