models

package
v0.0.0-...-3f353b6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2018 License: MIT Imports: 0 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Confirmations     int64         `json:"Confirmations"`
	Hash              string        `json:"Hash"`
	Index             int64         `json:"Index"`
	Merkleroot        string        `json:"Merkleroot"`
	NextBlockHash     string        `json:"Nextblockhash"`
	NextConsensus     string        `json:"Nextconsensus"`
	Nonce             string        `json:"Nonce"`
	PreviousBlockHash string        `json:"Previousblockhash"`
	Size              int64         `json:"Size"`
	Time              int64         `json:"Time"`
	Version           int64         `json:"Version"`
	Script            Script        `json:"Script"`
	Transactions      []Transaction `json:"Tx"`
}

Block holds all the data about a particular block on the blockchain.

type Script

type Script struct {
	Invocation   string `json:"Invocation"`
	Verification string `json:"Verification"`
}

Script holds all data about the scripts used.

type Transaction

type Transaction struct {
	ID         string        `json:"Txid"`
	Size       int64         `json:"Size"`
	Type       string        `json:"Type"`
	Version    int64         `json:"Version"`
	Attributes []interface{} `json:"Attributes"` // 💩
	Vin        []Vin         `json:"Vin"`
	Vout       []Vout        `json:"Vout"`
	SysFee     string        `json:"Sys_fee"`
	NetFee     string        `json:"Net_fee"`
	Scripts    []Script      `json:"Scripts"`
	Nonce      int64         `json:"Nonce"`
}

Transaction holds all data about a transaction on the blockchain.

type Vin

type Vin struct {
	TransactionID string `json:"Txid"`
	Vout          int    `json:"Vout"`
}

Vin is holds data about the transaction input.

type Vout

type Vout struct {
	Address string `json:"Address"`
	Asset   string `json:"Asset"`
	N       int    `json:"N"`
	Value   string `json:"Value"`
}

Vout holds data about the transaction outputs.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL