Skip to content

Commit 77c91fa

Browse files
committed
add prototyp.BigInt#SetUint64 and #SetBigInt, and upgrade gnark dep
1 parent 273ad66 commit 77c91fa

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ require (
2727
github.com/btcsuite/btcd/btcec/v2 v2.3.5 // indirect
2828
github.com/btcsuite/btcd/btcutil v1.1.6 // indirect
2929
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect
30-
github.com/consensys/gnark-crypto v0.19.1 // indirect
30+
github.com/consensys/gnark-crypto v0.19.2 // indirect
3131
github.com/crate-crypto/go-eth-kzg v1.4.0 // indirect
3232
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect
3333
github.com/deckarep/golang-set/v2 v2.8.0 // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go.work.sum

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/prototyp/bigint.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,18 @@ func (b BigInt) Cmp(n *big.Int) int {
179179
return bp.Cmp(n)
180180
}
181181

182+
func (b BigInt) SetUint64(n uint64) BigInt {
183+
bp := (*big.Int)(&b)
184+
bp.SetUint64(n)
185+
return b
186+
}
187+
188+
func (b BigInt) SetBigInt(n *big.Int) BigInt {
189+
bp := (*big.Int)(&b)
190+
bp.Set(n)
191+
return b
192+
}
193+
182194
var (
183195
_bi = BigInt{}
184196
_ encoding.BinaryMarshaler = _bi

0 commit comments

Comments
 (0)