Skip to content

Commit

Permalink
Merge pull request #124 from blinklabs-io/chore/update-bursa
Browse files Browse the repository at this point in the history
chore: update blinklabs-io/bursa to v0.7.0
  • Loading branch information
agaffney authored Jan 11, 2024
2 parents adac38b + 85b5e04 commit 0aecff7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 18 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

require (
github.com/Salvionied/apollo v1.0.10
github.com/blinklabs-io/bursa v0.6.0
github.com/blinklabs-io/bursa v0.7.0
github.com/blinklabs-io/cardano-models v0.2.0
github.com/blinklabs-io/gouroboros v0.69.2
github.com/blinklabs-io/snek v0.17.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ github.com/Salvionied/apollo v1.0.10/go.mod h1:5hgk1k4EiWmAoy2yU3q6+clmA4tgnHC4X
github.com/Salvionied/cbor/v2 v2.6.0 h1:OEwlZLiodLdNeM9wFoSydLvj6/rHRaxu5G8VzwXSeuY=
github.com/Salvionied/cbor/v2 v2.6.0/go.mod h1:oFxaUo/mQ5sG1k459nzctGdYa80jy0ZqZ9pln9C/fGw=
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
github.com/blinklabs-io/bursa v0.6.0 h1:h4INnhuKjOs+zXXOuGMMAlm+GzvMtzbPKisd3iuTDdU=
github.com/blinklabs-io/bursa v0.6.0/go.mod h1:k+fdY+TTZ1/lwPmJFPqRsdMDkCKA2OXxqVl16EJAOPk=
github.com/blinklabs-io/bursa v0.7.0 h1:i0VbHfnQ/MjStIDN6ApZYV4NWtLPcYkCmym+PcCjPgA=
github.com/blinklabs-io/bursa v0.7.0/go.mod h1:5oA7x2aBuRXnQUG/xJK64BqsJHoA+Thj0HU41BJonQI=
github.com/blinklabs-io/cardano-models v0.2.0 h1:fQ2vkvMLFgQodtFpYE73i+6+eNN5vaIB3GBIys8FsyI=
github.com/blinklabs-io/cardano-models v0.2.0/go.mod h1:iH8IqSca4WzFQIAT3Ssd3TviILfoCgaJQ8mc3JrIvwE=
github.com/blinklabs-io/gouroboros v0.69.2 h1:6FQwC1KxTPYbbugolNU03Dvm3vaCZWoceaaWLx6Skw0=
Expand Down
2 changes: 1 addition & 1 deletion internal/tx/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func createTx(blockData any, nonce [16]byte) ([]byte, error) {
if err != nil {
return nil, err
}
sKeyBytes, err := hex.DecodeString(bursa.PaymentSKey.CborHex)
sKeyBytes, err := hex.DecodeString(bursa.PaymentESKey.CborHex)
if err != nil {
return nil, err
}
Expand Down
19 changes: 5 additions & 14 deletions internal/wallet/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,14 @@ func Setup() {
panic(err)
}
}
rootKey, err := bursa.GetRootKeyFromMnemonic(mnemonic)
wallet, err := bursa.NewWallet(
mnemonic,
cfg.Network,
0, 0, 0, 0,
)
if err != nil {
panic(err)
}
accountKey := bursa.GetAccountKey(rootKey, 0)
paymentKey := bursa.GetPaymentKey(accountKey, 0)
stakeKey := bursa.GetStakeKey(accountKey, 0)
addr := bursa.GetAddress(accountKey, cfg.Network, 0)
wallet := &bursa.Wallet{
Mnemonic: mnemonic,
PaymentAddress: addr.String(),
StakeAddress: addr.ToReward().String(),
PaymentVKey: bursa.GetPaymentVKey(paymentKey),
PaymentSKey: bursa.GetPaymentSKey(paymentKey),
StakeVKey: bursa.GetStakeVKey(stakeKey),
StakeSKey: bursa.GetStakeVKey(stakeKey),
}
globalWallet = wallet
}

Expand Down

0 comments on commit 0aecff7

Please sign in to comment.