Skip to content
Snippets Groups Projects
Select Git revision
  • 682a9a1bc962fb2436a6dd063baae8905561c74f
  • develop default protected
  • congestioncontrol
  • merge-v-data-collection-spammer-0.8.2
  • WIP-merge-v-data-collection-spammer-0.8.2
  • merge-v-data-collection-spammer-0.7.7
  • tmp
  • test-masterpow-fixing
  • test-masterpow
  • test-echo
  • v-data-collection
  • v-data-collection-spammer
  • tmp-dump-spam-info
  • dump-msg-info-0.3.1
  • test-dump-message-info
  • spammer-exprandom
  • extra/tutorial
  • without_tipselection
  • hacking-docker-network
  • hacking-docker-network-0.2.3
  • master
  • v0.2.3
22 results

address.go

Blame
  • user avatar
    Hans Moog authored and GitHub committed
    * Refactor: cleaned up unused files
    
    * Refactor: changing branches (need to commit)
    
    * Refactor: refactored some code
    
    * Feat: finished signature scheme for value transactions
    
    * Fix: fix broken merge
    
    * Refactor: refactored some code
    
    * Refactor: refactored transaction marshaling and unmarshaling
    
    * Fix: fixed missing err check
    
    * Feat: added payload string method
    
    * Feat: added Bytes() method to transactionid
    
    * Feat: refactored the marshaling
    
    * Refactor: refactored serialization code
    
    * Feat: started implementing the payload metadata
    
    * Docs: added some doc comments
    
    * Docs: added some additional docs
    
    * Feat: added a CachedObject of the payloadmetadata + added comments
    
    * Feat: updated hive.go + added further models
    
    * Feat: pc died - rescued files from disk
    
    * Feat: further models implemented
    
    * Feat: added missing model for value tangle
    
    * Feat: started writing test cases for value tangle
    
    * Feat: started to adjust marshaling of transaction
    
    * Feat: refactored marshaling of payload
    
    * Feat: intermediary commit before bigger refactor
    
    * Feat: removed identity package
    
    * Fix: fixed bugs due to refactor
    
    * Fix: fixed further bugs
    
    * Fix: fixed further bugs
    
    * Fix: hopefully last bugs :p
    
    * Feat: changed time marshal to use nanoseconds
    
    * Fix: fixed time marshaling
    
    * Fix: fixed serialization bug
    
    * Docs: added a comment to handling the zero value
    
    * Refactor: refactored transaction to separate issuerKey
    
    * Feat: added a parse method for Signatures
    
    * Feat: updated to latest hive.go
    682a9a1b
    History
    address.go 819 B
    package address
    
    import (
    	"github.com/mr-tron/base58"
    	"golang.org/x/crypto/blake2b"
    
    	"github.com/iotaledger/goshimmer/packages/binary/signature/ed25119"
    )
    
    type AddressVersion = byte
    
    type AddressDigest = []byte
    
    type Address [Length]byte
    
    func New(bytes []byte) (address Address) {
    	copy(address[:], bytes)
    
    	return
    }
    
    func FromED25519PubKey(key ed25119.PublicKey) (address Address) {
    	digest := blake2b.Sum256(key[:])
    
    	address[0] = 0
    	copy(address[1:], digest[:])
    
    	return
    }
    
    func (address *Address) GetVersion() AddressVersion {
    	return address[0]
    }
    
    func (address *Address) GetDigest() AddressDigest {
    	return address[1:]
    }
    
    func (address Address) ToBytes() []byte {
    	return address[:]
    }
    
    func (address Address) String() string {
    	return "Address(" + base58.Encode(address.ToBytes()) + ")"
    }
    
    const Length = 33