-
Notifications
You must be signed in to change notification settings - Fork 571
/
codec.go
44 lines (40 loc) · 971 Bytes
/
codec.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
package types
import (
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
"github.com/cosmos/ibc-go/v4/modules/core/exported"
)
// RegisterInterfaces registers the commitment interfaces to protobuf Any.
func RegisterInterfaces(registry codectypes.InterfaceRegistry) {
registry.RegisterInterface(
"ibc.core.commitment.v1.Root",
(*exported.Root)(nil),
)
registry.RegisterInterface(
"ibc.core.commitment.v1.Prefix",
(*exported.Prefix)(nil),
)
registry.RegisterInterface(
"ibc.core.commitment.v1.Path",
(*exported.Path)(nil),
)
registry.RegisterInterface(
"ibc.core.commitment.v1.Proof",
(*exported.Proof)(nil),
)
registry.RegisterImplementations(
(*exported.Root)(nil),
&MerkleRoot{},
)
registry.RegisterImplementations(
(*exported.Prefix)(nil),
&MerklePrefix{},
)
registry.RegisterImplementations(
(*exported.Path)(nil),
&MerklePath{},
)
registry.RegisterImplementations(
(*exported.Proof)(nil),
&MerkleProof{},
)
}