Remove go bindings example (#341)

This commit is contained in:
Justin Traglia 2023-08-15 16:08:54 -05:00 committed by GitHub
parent 9e68a47f9c
commit 7b500394f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 0 additions and 51 deletions

View File

@ -15,17 +15,6 @@ This package requires `1.19rc1` or later. Version `1.19beta1` and before will
not work. These versions have a linking issue and are unable to see `blst`
functions.
## Example
For reference, see the `example` module in this directory. You can test it out with `go run`:
```
user@system ~/c-kzg-4844/bindings/go/example $ go run .
go: downloading github.com/ethereum/c-kzg-4844 v0.0.0-20230407130613-fd0a51aa35bc
go: downloading github.com/supranational/blst v0.3.11-0.20230406105308-e9dfc5ee724b
88f1aea383b825371cb98acfbae6c81cce601a2e3129461c3c2b816409af8f3e5080db165fd327db687b3ed632153a62
```
## Tests
Run the tests with this command:

View File

@ -1,7 +0,0 @@
module example
go 1.19
require github.com/ethereum/c-kzg-4844 v0.1.1-0.20230512134437-6d21a0ea981b
require github.com/supranational/blst v0.3.11-0.20230406105308-e9dfc5ee724b // indirect

View File

@ -1,8 +0,0 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/ethereum/c-kzg-4844 v0.1.1-0.20230512134437-6d21a0ea981b h1:+eVyrHcAbV9fTONHBQ28Q+R/prNPa+AqISwlLBy4S7g=
github.com/ethereum/c-kzg-4844 v0.1.1-0.20230512134437-6d21a0ea981b/go.mod h1:WI2Nd82DMZAAZI1wV2neKGost9EKjvbpQR9OqE5Qqa8=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/supranational/blst v0.3.11-0.20230406105308-e9dfc5ee724b h1:u49mjRnygnB34h8OKbnNJFVUtWSKIKb1KukdV8bILUM=
github.com/supranational/blst v0.3.11-0.20230406105308-e9dfc5ee724b/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

View File

@ -1,25 +0,0 @@
package main
import (
"encoding/hex"
"fmt"
ckzg "github.com/ethereum/c-kzg-4844/bindings/go"
)
var TrustedSetupPath = "../../../src/trusted_setup.txt"
func main() {
err := ckzg.LoadTrustedSetupFile(TrustedSetupPath)
if err != nil {
panic("failed to load trusted setup")
}
defer ckzg.FreeTrustedSetup()
blob := ckzg.Blob{1, 2, 3}
commitment, err := ckzg.BlobToKZGCommitment(blob)
if err != nil {
panic("failed to get commitment for blob")
}
fmt.Println(hex.EncodeToString(commitment[:]))
}