-
Notifications
You must be signed in to change notification settings - Fork 115
/
connector.go
18 lines (16 loc) · 939 Bytes
/
connector.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package wallet
import (
"github.com/iotaledger/goshimmer/client/wallet/packages/address"
"github.com/iotaledger/goshimmer/packages/ledgerstate"
"github.com/iotaledger/goshimmer/packages/mana"
)
// Connector represents an interface that defines how the wallet interacts with the network. A wallet can either be used
// locally on a server or it can connect remotely using the web API.
type Connector interface {
UnspentOutputs(addresses ...address.Address) (unspentOutputs OutputsByAddressAndOutputID, err error)
SendTransaction(transaction *ledgerstate.Transaction) (err error)
RequestFaucetFunds(address address.Address, powTarget int) (err error)
GetAllowedPledgeIDs() (pledgeIDMap map[mana.Type][]string, err error)
GetTransactionInclusionState(txID ledgerstate.TransactionID) (inc ledgerstate.InclusionState, err error)
GetUnspentAliasOutput(address *ledgerstate.AliasAddress) (output *ledgerstate.AliasOutput, err error)
}