Skip to content
Snippets Groups Projects
  • Angelo Capossele's avatar
    ed435f7d
    Adds a HTTP API to query and create transactions (#95) · ed435f7d
    Angelo Capossele authored
    * :art: moves all webapi into one
    
    * :art: adds public key log
    
    * :art: changes txRequest to getTrytes
    
    * :art: rename packages
    
    * :pencil: adds comments
    
    * :art: changes status to error
    
    * :recycle: removes duration from API - getTrytes converts trits to trytes - set default spammer TPS to 1
    
    Fix: Allow starting a node with gossip disabled (#97)
    
    * fix: remove selection flag and use gossip plugin
    
    * Upgrade hive.go
    
    feat: improve logging
    
    feat: improve analysis status
    
    chore: remove unused packages (#99)
    
    Fix: Use docker specific config (#100)
    
    * Use docker specific config
    
    * Format JSON
    
    :heavy_minus_sign: removes status
    
    :art: adds omitempty
    
    :lipstick: updates style import
    
    :sparkles: adds getNeighbors API
    
    :sparkles: adds getTransaction
    
    :heavy_minus_sign: removes addEndpoint
    
    * :construction: WIP
    
    * :construction: WIP
    
    * :sparkles: adds txs per address
    
    * :sparkles: adds findTransactions API
    ed435f7d
    History
    Adds a HTTP API to query and create transactions (#95)
    Angelo Capossele authored
    * :art: moves all webapi into one
    
    * :art: adds public key log
    
    * :art: changes txRequest to getTrytes
    
    * :art: rename packages
    
    * :pencil: adds comments
    
    * :art: changes status to error
    
    * :recycle: removes duration from API - getTrytes converts trits to trytes - set default spammer TPS to 1
    
    Fix: Allow starting a node with gossip disabled (#97)
    
    * fix: remove selection flag and use gossip plugin
    
    * Upgrade hive.go
    
    feat: improve logging
    
    feat: improve analysis status
    
    chore: remove unused packages (#99)
    
    Fix: Use docker specific config (#100)
    
    * Use docker specific config
    
    * Format JSON
    
    :heavy_minus_sign: removes status
    
    :art: adds omitempty
    
    :lipstick: updates style import
    
    :sparkles: adds getNeighbors API
    
    :sparkles: adds getTransaction
    
    :heavy_minus_sign: removes addEndpoint
    
    * :construction: WIP
    
    * :construction: WIP
    
    * :sparkles: adds txs per address
    
    * :sparkles: adds findTransactions API
constants.go 979 B
package value_transaction

import (
	"strings"

	"github.com/iotaledger/iota.go/trinary"
)

const (
	ADDRESS_OFFSET                    = 0
	VALUE_OFFSET                      = ADDRESS_END
	TIMESTAMP_OFFSET                  = VALUE_END
	SIGNATURE_MESSAGE_FRAGMENT_OFFSET = TIMESTAMP_END

	ADDRESS_SIZE                    = 243
	VALUE_SIZE                      = 81
	TIMESTAMP_SIZE                  = 27
	SIGNATURE_MESSAGE_FRAGMENT_SIZE = 6561
	BUNDLE_ESSENCE_SIZE             = ADDRESS_SIZE + VALUE_SIZE + SIGNATURE_MESSAGE_FRAGMENT_SIZE

	ADDRESS_END                    = ADDRESS_OFFSET + ADDRESS_SIZE
	VALUE_END                      = VALUE_OFFSET + VALUE_SIZE
	TIMESTAMP_END                  = TIMESTAMP_OFFSET + TIMESTAMP_SIZE
	SIGNATURE_MESSAGE_FRAGMENT_END = SIGNATURE_MESSAGE_FRAGMENT_OFFSET + SIGNATURE_MESSAGE_FRAGMENT_SIZE

	TOTAL_SIZE = SIGNATURE_MESSAGE_FRAGMENT_END
)

var (
	EMPTY_SIGNATURE = trinary.Trytes(strings.Repeat("9", SIGNATURE_MESSAGE_FRAGMENT_SIZE/3))
)