forked from rubblelabs/ripple
/
interface.go
54 lines (46 loc) · 864 Bytes
/
interface.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package data
import (
"io"
)
type Hashable interface {
GetType() string
Prefix() HashPrefix
GetHash() *Hash256
}
type SignerAgent interface {
Hashable
InitialiseForSigning()
InitialiseForMultiSigning()
SigningPrefix() HashPrefix
GetPublicKey() *PublicKey
GetSignature() *VariableLength
AddSignature(*Signer)
}
type Router interface {
Hashable
SuppressionId() Hash256
}
type Storer interface {
Hashable
Ledger() uint32
NodeType() NodeType
NodeId() *Hash256
}
type LedgerEntry interface {
Storer
GetLedgerEntryType() LedgerEntryType
GetLedgerIndex() *Hash256
GetPreviousTxnId() *Hash256
Affects(Account) bool
}
type Transaction interface {
SignerAgent
GetTransactionType() TransactionType
SortSigners([]SignerEntries)
GetBase() *TxBase
PathSet() PathSet
}
type Wire interface {
Unmarshal(Reader) error
Marshal(io.Writer) error
}