Transports.js Documentation

Functions

newTransport()

Creates a new Transport

getCurrentTransport()transport

Returns the current Transport (the last created -> showcase function)

currentHarvest()harvest

Returns the current Harvest (the latest created -> showcase function)

getHarvest(transport)harvest

Gets the added Harvest from the transport

getID(transport)ID

Returns the ID of a transport

transportAsJson(transport)json

Builds a JSON file with data from the transport

loadSingleTransportCard(transport)output

Loads a single transport card template and data

addTransportCard(transport)

Adds a transport card to the DOM

getTransportCards()

Adds all transports as cards to the DOM

openTransport(address)

Opends the Details Modal and loads a single transport

addData(transport)openTransport(transport)

Adds a Data transaction to a transport

addHarvest(transport)

Adds Grapes from a Harvest to a transport

getTotalTransactionCount(address)

Gets the total amount of transactions to this contract

getTransactionSenderAtIndex(address, index)sender

Gets a specific transaction sender with an index

getTransactionDataAtIndex(address, index)data

Gets the data of a transaction with an index

getTransactionTimeAtIndex(address, index)time

Gets the timestamp of a transaction

getAllTransactions(address)json

Gets all transactions made to this contract

newTransport()

Creates a new Transport

Kind: global function

getCurrentTransport() ⇒ transport

Returns the current Transport (the last created -> showcase function)

Kind: global function Returns: transport - The address of the transport contract

currentHarvest() ⇒ harvest

Returns the current Harvest (the latest created -> showcase function)

Kind: global function Returns: harvest - The address of the harvest contract

getHarvest(transport) ⇒ harvest

Gets the added Harvest from the transport

Kind: global function Returns: harvest - Address of the harvest

Param Type Description
transport \* Address of the transport

getID(transport) ⇒ ID

Returns the ID of a transport

Kind: global function Returns: ID - The ID

Param Type Description
transport \* Address of the transport contract

transportAsJson(transport) ⇒ json

Builds a JSON file with data from the transport

Kind: global function Returns: json - JSON data

Param Type Description
transport \* Address of the contract

loadSingleTransportCard(transport) ⇒ output

Loads a single transport card template and data

Kind: global function Returns: output - The transport as card element

Param Type Description
transport \* Address of the transport contract

addTransportCard(transport)

Adds a transport card to the DOM

Kind: global function

Param Type Description
transport \* Address of the transport contract

getTransportCards()

Adds all transports as cards to the DOM

Kind: global function

openTransport(address)

Opends the Details Modal and loads a single transport

Kind: global function

Param Type Description
address \* Address of the transport to load

addData(transport) ⇒ openTransport(transport)

Adds a Data transaction to a transport

Kind: global function

Param Type Description
transport \* The address of the transport

addHarvest(transport)

Adds Grapes from a Harvest to a transport

Kind: global function

Param Type Description
transport \* The address of the transport contract

getTotalTransactionCount(address) ⇒

Gets the total amount of transactions to this contract

Kind: global function Returns: Integer value of the total transactions

Param Type Description
address \* Address of the contract

getTransactionSenderAtIndex(address, index) ⇒ sender

Gets a specific transaction sender with an index

Kind: global function Returns: sender - Address of the sender

Param Type Description
address \* Address of the contract
index \* Integer value as index

getTransactionDataAtIndex(address, index) ⇒ data

Gets the data of a transaction with an index

Kind: global function Returns: data - String of the data

Param Type Description
address \* Address of the contract
index \* Integer value as index

getTransactionTimeAtIndex(address, index) ⇒ time

Gets the timestamp of a transaction

Kind: global function Returns: time - Readable timestamp

Param Type Description
address \* Address of the contract
index \* Integer value as index

getAllTransactions(address) ⇒ json

Gets all transactions made to this contract

Kind: global function Returns: json - Json file with all transactions

Param Type Description
address \* Address of the contract