github.com/diadata-org/diadata@v1.4.593/pkg/dia/helpers/stackshelper/model.go (about) 1 package stackshelper 2 3 type Block struct { 4 Height int `json:"height"` 5 Hash string `json:"hash"` 6 BlockTime int `json:"block_time"` 7 BlockTimeISO string `json:"block_time_iso"` 8 IndexBlockHash string `json:"index_block_hash"` 9 TxCount int `json:"tx_count"` 10 } 11 12 type ClarityValue struct { 13 Hex string `json:"hex"` 14 Repr string `json:"repr"` 15 } 16 17 type FunctionArg struct { 18 ClarityValue 19 Name string `json:"name"` 20 Type string `json:"type"` 21 } 22 23 type ContractCall struct { 24 ContractID string `json:"contract_id"` 25 FunctionName string `json:"function_name"` 26 FunctionArgs []FunctionArg `json:"function_args"` 27 } 28 29 type AssetLog struct { 30 ID string `json:"asset_id"` 31 EventType string `json:"asset_event_type"` 32 Sender string `json:"sender"` 33 Recipient string `json:"recipient"` 34 Amount string `json:"amount"` 35 } 36 37 type ContractLog struct { 38 ContractID string `json:"contract_id"` 39 Topic string `json:"topic"` 40 Value ClarityValue `json:"value"` 41 } 42 43 type Event struct { 44 Index int `json:"event_index"` 45 Type string `json:"event_type"` 46 Asset AssetLog `json:"asset"` 47 ContractLog ContractLog `json:"contract_log"` 48 } 49 50 type Transaction struct { 51 TxID string `json:"tx_id"` 52 SenderAddress string `json:"sender_address"` 53 BlockHash string `json:"block_hash"` 54 BlockHeight int `json:"block_height"` 55 BlockTime int `json:"block_time"` 56 TxStatus string `json:"tx_status"` 57 TxType string `json:"tx_type"` 58 TxResult ClarityValue `json:"tx_result"` 59 ContractCall ContractCall `json:"contract_call"` 60 Events []Event `json:"events"` 61 } 62 63 type GetBlockTransactionsResponse struct { 64 Limit int `json:"limit"` 65 Offset int `json:"offset"` 66 Total int `json:"total"` 67 Results []Transaction `json:"results"` 68 } 69 70 type AddressTransaction struct { 71 Tx Transaction `json:"tx"` 72 } 73 74 type GetAddressTransactionsResponse struct { 75 Limit int `json:"limit"` 76 Offset int `json:"offset"` 77 Total int `json:"total"` 78 Results []AddressTransaction `json:"results"` 79 } 80 81 type ContractValue struct { 82 Data string `json:"data"` 83 Proof string `json:"proof"` 84 } 85 86 type ContractCallArgs struct { 87 Sender string `json:"sender"` 88 Arguments []string `json:"arguments"` 89 } 90 91 type ContractCallResult struct { 92 Okay bool `json:"okay"` 93 Result string `json:"result"` 94 Cause string `json:"cause"` 95 }