Skip to content

Commit 65f624b

Browse files
authored
Merge pull request #10 from LumeraProtocol/inj-sig
Added multi-chan keyring; added injective keys
2 parents 32d0f03 + ff9597a commit 65f624b

7 files changed

Lines changed: 622 additions & 6 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
GO ?= go
1010
GOLANGCI_LINT ?= golangci-lint
1111
BUILD_DIR ?= build
12-
EXAMPLES ?= action-approve cascade-upload cascade-download query-actions claim-tokens ica-request-tx ica-approve-tx
12+
EXAMPLES ?= action-approve cascade-upload cascade-download query-actions claim-tokens ica-request-tx ica-approve-tx ica-request-verify
1313

1414
# Default target: build SDK and examples
1515
all: sdk examples ## Build SDK (compile packages) and all examples

examples/ica-request-tx/main.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
"github.com/LumeraProtocol/sdk-go/constants"
1616
"github.com/LumeraProtocol/sdk-go/ica"
1717
sdkcrypto "github.com/LumeraProtocol/sdk-go/pkg/crypto"
18+
1819
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
1920
)
2021

@@ -31,6 +32,7 @@ func main() {
3132
icaAddress := flag.String("ica-address", "", "ICA address on Lumera (host chain)")
3233
grpcAddr := flag.String("grpc-addr", "", "Lumera gRPC address (host:port)")
3334
chainID := flag.String("chain-id", "", "Lumera chain ID")
35+
keyringType := flag.String("keyring-type", "lumera", "Keyring type: lumera|injective")
3436

3537
// IBC params
3638
connectionID := flag.String("connection-id", "connection-0", "IBC connection ID on controller chain")
@@ -63,8 +65,13 @@ func main() {
6365
os.Exit(1)
6466
}
6567

66-
params := sdkcrypto.KeyringParams{AppName: "lumera", Backend: *keyringBackend, Dir: *keyringDir}
67-
kr, err := sdkcrypto.NewKeyring(params)
68+
// Choose app name based on keyring type
69+
appName := "lumera"
70+
if *keyringType == "injective" {
71+
appName = "injectived"
72+
}
73+
74+
kr, err := sdkcrypto.NewMultiChainKeyring(appName, *keyringBackend, *keyringDir)
6875
if err != nil {
6976
fmt.Printf("open keyring: %v\n", err)
7077
os.Exit(1)

0 commit comments

Comments
 (0)