Skip to content

Commit

Permalink
feature: added kms wallet auto detection
Browse files Browse the repository at this point in the history
  • Loading branch information
YarikRevich committed Dec 6, 2024
1 parent 5cd6fe5 commit 5eefd9d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
11 changes: 10 additions & 1 deletion cmd/gateway/zcn/initSDK.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,22 @@ func initializeSDK(configDir, allocid string, nonce int64) error {
zcncore.SetLogLevel(3)
sdk.SetLogLevel(3)

err = client.InitSDK(string(walletBytes), cfg.BlockWorker, cfg.ChainID, cfg.SignatureScheme, nonce, false, true, cfg.MinSubmit, cfg.MinConfirmation, cfg.ConfirmationChainLength, cfg.SharderConsensous)
err = client.InitSDK("{}", cfg.BlockWorker, cfg.ChainID, cfg.SignatureScheme, nonce, false, cfg.MinSubmit, cfg.MinConfirmation, cfg.ConfirmationChainLength, cfg.SharderConsensous)
if err != nil {
return err
}

conf.InitClientConfig(&cfg)

err = zcncore.SetGeneralWalletInfo(string(walletBytes), cfg.SignatureScheme)
if err != nil {
return err
}

if client.GetClient().IsSplit {
zcncore.RegisterZauthServer(cfg.ZauthServer)
}

sdk.SetNumBlockDownloads(100)
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toolchain go1.22.5
require (
cloud.google.com/go/storage v1.28.1
github.com/0chain/errors v1.0.3
github.com/0chain/gosdk v1.18.0
github.com/0chain/gosdk v1.18.12-0.20241205003726-a738be4e1f20
github.com/Azure/azure-pipeline-go v0.2.2
github.com/Azure/azure-storage-blob-go v0.10.0
github.com/Shopify/sarama v1.28.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ github.com/0chain/errors v1.0.3 h1:QQZPFxTfnMcRdt32DXbzRQIfGWmBsKoEdszKQDb0rRM=
github.com/0chain/errors v1.0.3/go.mod h1:xymD6nVgrbgttWwkpSCfLLEJbFO6iHGQwk/yeSuYkIc=
github.com/0chain/gosdk v1.18.0 h1:6mSiUFb4liT50wdsx59tEWMHKWkKQUlZT91ouQAeKcc=
github.com/0chain/gosdk v1.18.0/go.mod h1:8unFy9Dx2YyPKMYPDGR3MFhUEymbAfQcRDm9bobVLGw=
github.com/0chain/gosdk v1.18.12-0.20241205003726-a738be4e1f20 h1:wEI5RrWGZAJ5NdPYA2qJGy8Q99igsNr3hS+0+UpGERI=
github.com/0chain/gosdk v1.18.12-0.20241205003726-a738be4e1f20/go.mod h1:8unFy9Dx2YyPKMYPDGR3MFhUEymbAfQcRDm9bobVLGw=
github.com/Azure/azure-amqp-common-go/v2 v2.1.0/go.mod h1:R8rea+gJRuJR6QxTir/XuEd+YuKoUiazDC/N96FiDEU=
github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4=
github.com/Azure/azure-pipeline-go v0.2.2 h1:6oiIS9yaG6XCCzhgAgKFfIWyo4LLCiDhZot6ltoThhY=
Expand Down

0 comments on commit 5eefd9d

Please sign in to comment.