-
Notifications
You must be signed in to change notification settings - Fork 13
/
transfers.go
115 lines (85 loc) · 2.57 KB
/
transfers.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
// Copyright (c) 2014-2018 Bitmark Inc.
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package transactionrecord
import (
"github.com/bitmark-inc/bitmarkd/account"
"github.com/bitmark-inc/bitmarkd/currency"
"github.com/bitmark-inc/bitmarkd/merkle"
)
// for unratified
func (transfer *BitmarkTransferUnratified) GetLink() merkle.Digest {
return transfer.Link
}
func (transfer *BitmarkTransferUnratified) GetPayment() *Payment {
return transfer.Escrow
}
func (transfer *BitmarkTransferUnratified) GetOwner() *account.Account {
return transfer.Owner
}
func (transfer *BitmarkTransferUnratified) GetCurrencies() currency.Map {
return nil
}
func (transfer *BitmarkTransferUnratified) GetSignature() account.Signature {
return transfer.Signature
}
func (transfer *BitmarkTransferUnratified) GetCountersignature() account.Signature {
return nil
}
// for countersigned
func (transfer *BitmarkTransferCountersigned) GetLink() merkle.Digest {
return transfer.Link
}
func (transfer *BitmarkTransferCountersigned) GetPayment() *Payment {
return transfer.Escrow
}
func (transfer *BitmarkTransferCountersigned) GetOwner() *account.Account {
return transfer.Owner
}
func (transfer *BitmarkTransferCountersigned) GetCurrencies() currency.Map {
return nil
}
func (transfer *BitmarkTransferCountersigned) GetSignature() account.Signature {
return transfer.Signature
}
func (transfer *BitmarkTransferCountersigned) GetCountersignature() account.Signature {
return transfer.Countersignature
}
// for block owner transfer
func (transfer *BlockOwnerTransfer) GetLink() merkle.Digest {
return transfer.Link
}
func (transfer *BlockOwnerTransfer) GetPayment() *Payment {
return transfer.Escrow
}
func (transfer *BlockOwnerTransfer) GetOwner() *account.Account {
return transfer.Owner
}
func (transfer *BlockOwnerTransfer) GetCurrencies() currency.Map {
return transfer.Payments
}
func (transfer *BlockOwnerTransfer) GetSignature() account.Signature {
return transfer.Signature
}
func (transfer *BlockOwnerTransfer) GetCountersignature() account.Signature {
return transfer.Countersignature
}
// for share
func (share *BitmarkShare) GetLink() merkle.Digest {
return share.Link
}
func (share *BitmarkShare) GetPayment() *Payment {
return nil
}
func (share *BitmarkShare) GetOwner() *account.Account {
return nil
}
func (share *BitmarkShare) GetCurrencies() currency.Map {
return nil
}
func (share *BitmarkShare) GetSignature() account.Signature {
return share.Signature
}
func (share *BitmarkShare) GetCountersignature() account.Signature {
return nil
}