@@ -46,13 +46,15 @@ var blockchains = []string{
46
46
BIRITA ,
47
47
Agoric ,
48
48
Klaytn ,
49
+ HEDERA ,
49
50
}
50
51
51
52
type Params struct {
52
53
Endpoint string `json:"endpoint"`
53
54
Addresses []string `json:"addresses"`
54
55
Topics []string `json:"topics"`
55
56
AccountIds []string `json:"accountIds"`
57
+ AccountId string `json:"accountId"`
56
58
Address string `json:"address"`
57
59
UpkeepID string `json:"upkeepId"`
58
60
ServiceName string `json:"serviceName"`
@@ -98,6 +100,8 @@ func CreateClientManager(sub store.Subscription) (subscriber.ISubscriber, error)
98
100
return createKeeperSubscriber (sub )
99
101
case BIRITA :
100
102
return createBSNIritaSubscriber (sub )
103
+ case HEDERA :
104
+ return createHederaSubscriber (sub ), nil
101
105
}
102
106
103
107
return nil , errors .New ("unknown blockchain type for Client subscription" )
@@ -106,7 +110,7 @@ func CreateClientManager(sub store.Subscription) (subscriber.ISubscriber, error)
106
110
func GetConnectionType (endpoint store.Endpoint ) (subscriber.Type , error ) {
107
111
switch endpoint .Type {
108
112
// Add blockchain implementations that encapsulate entire connection here
109
- case XTZ , ONT , IOTX , Keeper , BIRITA :
113
+ case XTZ , ONT , IOTX , Keeper , BIRITA , HEDERA :
110
114
return subscriber .Client , nil
111
115
default :
112
116
u , err := url .Parse (endpoint .Url )
@@ -177,6 +181,10 @@ func GetValidations(t string, params Params) []int {
177
181
return []int {
178
182
1 ,
179
183
}
184
+ case HEDERA :
185
+ return []int {
186
+ len (params .AccountId ),
187
+ }
180
188
}
181
189
182
190
return nil
@@ -228,6 +236,10 @@ func CreateSubscription(sub *store.Subscription, params Params) {
228
236
}
229
237
case Agoric :
230
238
sub .Agoric = store.AgoricSubscription {}
239
+ case HEDERA :
240
+ sub .Hedera = store.HederaSubscription {
241
+ AccountId : params .AccountId ,
242
+ }
231
243
}
232
244
}
233
245
0 commit comments