github.com/MetalBlockchain/metalgo@v1.11.9/utils/crypto/keychain/ledger.go (about)

     1  // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved.
     2  // See the file LICENSE for licensing terms.
     3  
     4  package keychain
     5  
     6  import (
     7  	"github.com/MetalBlockchain/metalgo/ids"
     8  	"github.com/MetalBlockchain/metalgo/version"
     9  )
    10  
    11  // Ledger interface for the ledger wrapper
    12  type Ledger interface {
    13  	Version() (v *version.Semantic, err error)
    14  	Address(displayHRP string, addressIndex uint32) (ids.ShortID, error)
    15  	Addresses(addressIndices []uint32) ([]ids.ShortID, error)
    16  	SignHash(hash []byte, addressIndices []uint32) ([][]byte, error)
    17  	Sign(unsignedTxBytes []byte, addressIndices []uint32) ([][]byte, error)
    18  	Disconnect() error
    19  }