diff --git a/.github/workflows/baisc_checks.yml b/.github/workflows/baisc_checks.yml index 5379d51a28..7c25ad1405 100644 --- a/.github/workflows/baisc_checks.yml +++ b/.github/workflows/baisc_checks.yml @@ -27,26 +27,15 @@ jobs: - name: tests-shared run: make test-venus-shared - - name: compatible-checks + - name: compatible all run: | make compatible-all - git --no-pager diff - git --no-pager diff --quiet - - name: check api docs + - name: gen all run: | - make api-docs - git --no-pager diff - git --no-pager diff --quiet + make gen-all - - name: check cbor-gen + - name: detect changes run: | - make cborgen - git --no-pager diff - git --no-pager diff --quiet - - - name: check mock pai - run: | - make mock-api-gen - git --no-pager diff - git --no-pager diff --quiet + git status --porcelain + test -z "$(git status --porcelain)" diff --git a/Makefile b/Makefile index cd061ebeb4..b6ac10a97b 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,8 @@ clean: rm -rf ./extern/filecoin-ffi rm -rf ./extern/test-vectors +gen-all: cborgen gogen inline-gen api-gen api-docs-gen + gen-asset: go-bindata -pkg=asset -o ./fixtures/asset/asset.go ./fixtures/_assets/car/ ./fixtures/_assets/proof-params/ ./fixtures/_assets/arch-diagram.monopic gofmt -s -l -w ./fixtures/asset/asset.go @@ -45,14 +47,12 @@ inline-gen: test-venus-shared: cd venus-shared && go test -covermode=set ./... -gen-api: - cd ./venus-devtool/ && go run ./api-gen/ - gofmt -s -l -w ./venus-shared/api/chain/v0/proxy_gen.go; - gofmt -s -l -w ./venus-shared/api/chain/v1/proxy_gen.go +api-gen: + cd ./venus-devtool/ && go run ./api-gen/ proxy v0APIDoc = ../venus-shared/api/v0-api-document.md v1APIDoc = ../venus-shared/api/v1-api-document.md -api-docs: +api-docs-gen: cd ./venus-devtool/ && go run ./api-docs-gen/cmd ../venus-shared/api/chain/v0/fullnode.go FullNode v0 ../venus-shared/api/chain/v0 $(v0APIDoc) cd ./venus-devtool/ && go run ./api-docs-gen/cmd ../venus-shared/api/chain/v1/fullnode.go FullNode v1 ../venus-shared/api/chain/v1 $(v1APIDoc) diff --git a/venus-devtool/api-gen/main.go b/venus-devtool/api-gen/main.go new file mode 100644 index 0000000000..21ed0d0df7 --- /dev/null +++ b/venus-devtool/api-gen/main.go @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "os" + + "github.com/urfave/cli/v2" +) + +func main() { + app := &cli.App{ + Name: "api-gen", + Usage: "generate api related codes for venus-shared", + EnableBashCompletion: true, + Flags: []cli.Flag{}, + Commands: []*cli.Command{ + proxyCmd, + }, + } + + app.Setup() + + if err := app.Run(os.Args); err != nil { + fmt.Fprintf(os.Stderr, "ERR: %v\n", err) // nolint: errcheck + } +} diff --git a/venus-devtool/api-gen/proxy.go b/venus-devtool/api-gen/proxy.go new file mode 100644 index 0000000000..b1f92a7cbd --- /dev/null +++ b/venus-devtool/api-gen/proxy.go @@ -0,0 +1,364 @@ +package main + +import ( + "bytes" + "fmt" + "go/ast" + "go/format" + "go/printer" + "io" + "io/ioutil" + "log" + "path/filepath" + "strings" + + "github.com/urfave/cli/v2" + + "github.com/filecoin-project/venus/venus-devtool/util" +) + +func init() { + for _, capi := range util.ChainAPIPairs { + proxyTargets = append(proxyTargets, capi.Venus) + } +} + +var proxyTargets []util.APIMeta + +var proxyCmd = &cli.Command{ + Name: "proxy", + Flags: []cli.Flag{}, + Action: func(cctx *cli.Context) error { + for _, target := range proxyTargets { + err := genProxyForAPI(target) + if err != nil { + log.Fatalf("got error while generating proxy codes for %s: %s", target.Type, err) + } + } + return nil + }, +} + +func genProxyForAPI(t util.APIMeta) error { + opt := t.ParseOpt + opt.ResolveImports = true + ifaceMetas, astMeta, err := util.ParseInterfaceMetas(opt) + if err != nil { + return err + } + + ifaceMap := map[string]*util.InterfaceMeta{} + done := map[string]struct{}{} + deps := map[string]util.ImportMeta{} + + for i := range ifaceMetas { + ifaceMeta := ifaceMetas[i] + ifaceMap[ifaceMeta.Name] = ifaceMeta + } + + apiName := t.Type.Name() + api, has := ifaceMap[apiName] + if !has { + return fmt.Errorf("api %s not found", apiName) + } + + var contentBuffer bytes.Buffer + + err = writeForInterface(apiName, astMeta, ifaceMap, deps, done, &contentBuffer) + if err != nil { + return fmt.Errorf("gen for api interface %s: %w", apiName, err) + } + + var fileBuffer bytes.Buffer + + fmt.Fprintf(&fileBuffer, "// Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen. DO NOT EDIT.\npackage %s\n\n", api.Pkg.Name) + + err = writeImports(deps, &fileBuffer) + if err != nil { + return fmt.Errorf("gen imports: %w", err) + } + + _, err = io.Copy(&fileBuffer, &contentBuffer) + if err != nil { + return fmt.Errorf("copy contents into output: %w", err) + } + + formatted, err := format.Source(fileBuffer.Bytes()) + if err != nil { + return fmt.Errorf("format source content: %w", err) + } + + outputFile := filepath.Join(astMeta.Location, "proxy_gen.go") + err = ioutil.WriteFile(outputFile, formatted, 0644) + if err != nil { + return fmt.Errorf("write to output %s: %w", outputFile, err) + } + + return nil +} + +func writeImports(deps map[string]util.ImportMeta, dst *bytes.Buffer) error { + imports := [3][][2]string{} + + for iname, imeta := range deps { + alias := "" + base := filepath.Base(imeta.Path) + if iname != base { + alias = iname + } + + imp := [2]string{alias, imeta.Path} + idx := 0 + if !imeta.IsStd { + idx++ + if strings.HasPrefix(imeta.Path, "github.com/filecoin-project/venus/") { + idx++ + } + } + + imports[idx] = append(imports[idx], imp) + + } + + fmt.Fprintln(dst, "import (") + for _, impGroup := range imports { + for _, imp := range impGroup { + _, err := fmt.Fprintf(dst, "\t%s \"%s\"\n", imp[0], imp[1]) + if err != nil { + return fmt.Errorf("write import for %#v: %w", imp, err) + } + } + + fmt.Fprintln(dst, "") + } + + fmt.Fprintln(dst, ")") + return nil +} + +func writeForInterface(name string, astMeta *util.ASTMeta, ifaces map[string]*util.InterfaceMeta, deps map[string]util.ImportMeta, done map[string]struct{}, dst *bytes.Buffer) error { + if _, has := done[name]; has { + return nil + } + + iface, has := ifaces[name] + if !has { + return fmt.Errorf("%s not found", name) + } + + for _, nested := range iface.Nested { + if err := writeForInterface(nested, astMeta, ifaces, deps, done, dst); err != nil { + return fmt.Errorf("gen nested interface for %s: %w", name, err) + } + } + + if err := writeStruct(dst, iface, astMeta); err != nil { + return fmt.Errorf("gen struct for %s: %w", name, err) + } + + if err := writeMethods(dst, iface, astMeta, deps); err != nil { + return fmt.Errorf("gen methods for %s: %w", name, err) + } + + done[name] = struct{}{} + return nil +} + +const ( + structHeadFormat = ` +type %s struct { +` + + structTail = ` +} + +` + + structInternalHead = ` + Internal struct { +` + + structInternalTail = ` + } +` +) + +func structName(ifaceName string) string { + return ifaceName + "Struct" +} + +func writeStruct(dst *bytes.Buffer, ifaceMeta *util.InterfaceMeta, astMeta *util.ASTMeta) error { + fmt.Fprintf(dst, structHeadFormat, structName(ifaceMeta.Name)) + + for _, nested := range ifaceMeta.Nested { + fmt.Fprintf(dst, "\t%s\n", structName(nested)) + } + + if len(ifaceMeta.Defined) > 0 { + fmt.Fprint(dst, structInternalHead) + + for _, meth := range ifaceMeta.Defined { + fmt.Fprintf(dst, "\t\t%s ", meth.Name) + + err := printer.Fprint(dst, astMeta.FileSet, meth.FuncType) + if err != nil { + return fmt.Errorf("write func %s: %w", meth.Name, err) + } + + fmt.Fprintf(dst, " `perm:\"%s\"`\n", util.GetAPIMethodPerm(meth)) + } + + fmt.Fprint(dst, structInternalTail) + } + + fmt.Fprint(dst, structTail) + return nil +} + +func writeMethods(dst *bytes.Buffer, ifaceMeta *util.InterfaceMeta, astMeta *util.ASTMeta, deps map[string]util.ImportMeta) error { + var typBuf bytes.Buffer + for _, meth := range ifaceMeta.Defined { + err := writeMethodBody(dst, &typBuf, ifaceMeta, meth, astMeta, deps) + if err != nil { + return fmt.Errorf("write method for %s.%s: %w", ifaceMeta.Name, meth.Name, err) + } + } + fmt.Fprintln(dst, "") + return nil +} + +func resolveDep(typ ast.Expr, ifaceMeta *util.InterfaceMeta, deps map[string]util.ImportMeta) error { + var selector *ast.SelectorExpr + + switch t := typ.(type) { + case *ast.Ident: + return nil + + case *ast.SelectorExpr: + selector = t + + case *ast.MapType: + if err := resolveDep(t.Key, ifaceMeta, deps); err != nil { + return fmt.Errorf("resolve key dep for type %T: %w", typ, err) + } + + if err := resolveDep(t.Value, ifaceMeta, deps); err != nil { + return fmt.Errorf("resolve value dep for type %T: %w", typ, err) + } + + return nil + + case *ast.ArrayType: + if err := resolveDep(t.Elt, ifaceMeta, deps); err != nil { + return fmt.Errorf("resolve element dep for type %T: %w", typ, err) + } + + return nil + + case *ast.ChanType: + if err := resolveDep(t.Value, ifaceMeta, deps); err != nil { + return fmt.Errorf("resolve chan value dep for type %T: %w", typ, err) + } + + return nil + + case *ast.StarExpr: + if err := resolveDep(t.X, ifaceMeta, deps); err != nil { + return fmt.Errorf("resolve ptr dep for type %T: %w", typ, err) + } + + return nil + + default: + return fmt.Errorf("found unexpected type: %T", typ) + } + + if selector == nil { + return fmt.Errorf("should be a *ast.SelectorExpr, found %T", typ) + } + + selector, ok := typ.(*ast.SelectorExpr) + if !ok { + return nil + } + + xident, ok := selector.X.(*ast.Ident) + if !ok || xident.Name == "" { + return nil + + } + + importMeta, has := ifaceMeta.File.Imports[xident.Name] + if !has { + return fmt.Errorf("package for selector %s not found in file %s", xident.Name, ifaceMeta.File.Name) + } + + prev, has := deps[xident.Name] + if !has { + deps[xident.Name] = importMeta + return nil + } + + if prev.Path != importMeta.Path { + return fmt.Errorf("found duplicate package name %s for %s and %s", xident.Name, prev.Path, importMeta.Path) + } + + return nil +} + +func writeMethodBody(dst *bytes.Buffer, typBuf *bytes.Buffer, ifaceMeta *util.InterfaceMeta, methMeta util.InterfaceMethodMeta, astMeta *util.ASTMeta, deps map[string]util.ImportMeta) error { + paramNum := 0 + callNames := []string{} + params := []string{} + for pi, paramList := range methMeta.FuncType.Params.List { + if err := resolveDep(paramList.Type, ifaceMeta, deps); err != nil { + return fmt.Errorf("resolve dep for #%d param: %w", pi, err) + } + + typBuf.Reset() + err := printer.Fprint(typBuf, astMeta.FileSet, paramList.Type) + if err != nil { + return fmt.Errorf("write #%d param type: %w", pi, err) + } + + nameCount := len(paramList.Names) + if nameCount == 0 { + nameCount = 1 + } + + names := make([]string, nameCount) + for i := range names { + names[i] = fmt.Sprintf("p%d", paramNum) + paramNum++ + } + + callNames = append(callNames, names...) + params = append(params, strings.Join(names, ", ")+" "+typBuf.String()) + } + + results := []string{} + for ri, resultList := range methMeta.FuncType.Results.List { + if err := resolveDep(resultList.Type, ifaceMeta, deps); err != nil { + return fmt.Errorf("resolve dep for #%d result: %w", ri, err) + } + + typBuf.Reset() + err := printer.Fprint(typBuf, astMeta.FileSet, resultList.Type) + if err != nil { + return fmt.Errorf("write #%d result type: %w", ri, err) + } + + count := len(resultList.Names) + if count == 0 { + count = 1 + } + + for i := 0; i < count; i++ { + results = append(results, typBuf.String()) + } + } + + sname := structName(ifaceMeta.Name) + fmt.Fprintf(dst, "func(s *%s) %s(%s) (%s) { return s.Internal.%s(%s) }\n", sname, methMeta.Name, strings.Join(params, ", "), strings.Join(results, ", "), methMeta.Name, strings.Join(callNames, ", ")) + return nil +} diff --git a/venus-devtool/api-gen/proxygen.go b/venus-devtool/api-gen/proxygen.go deleted file mode 100644 index a5d05e3b00..0000000000 --- a/venus-devtool/api-gen/proxygen.go +++ /dev/null @@ -1,502 +0,0 @@ -package main - -import ( - "encoding/json" - "fmt" - "go/ast" - "go/build" - "go/parser" - "go/token" - "io/fs" - "io/ioutil" - "os" - "path" - "path/filepath" - "strings" - "text/template" - "unicode" - - _ "github.com/filecoin-project/lotus/api" - "golang.org/x/xerrors" -) - -const ( - VenusSharedPath = "../venus-shared" - GenAPIFileName = "proxy_gen.go" -) - -var ( - VenusAPIPath = path.Join("../venus-shared", "api") - VenusCompatibleCheckFile = path.Join(VenusSharedPath, "compatible-checks/api-permission.json") - VenusV0APiFile = path.Join(VenusAPIPath, "chain/v0", GenAPIFileName) - VenusV1ApiFile = path.Join(VenusAPIPath, "chain/v1", GenAPIFileName) -) - -type ruleKey = string - -const ( - rkPerm ruleKey = "perm" -) - -type methodMeta struct { - node ast.Node - ftype *ast.FuncType -} - -type Visitor struct { - Methods map[string]map[string]*methodMeta - Include map[string][]string -} - -func (v *Visitor) Visit(node ast.Node) ast.Visitor { - st, ok := node.(*ast.TypeSpec) - if !ok { - return v - } - - iface, ok := st.Type.(*ast.InterfaceType) - if !ok { - return v - } - if v.Methods[st.Name.Name] == nil { - v.Methods[st.Name.Name] = map[string]*methodMeta{} - } - for _, m := range iface.Methods.List { - switch ft := m.Type.(type) { - case *ast.Ident: - v.Include[st.Name.Name] = append(v.Include[st.Name.Name], ft.Name) - case *ast.FuncType: - v.Methods[st.Name.Name][m.Names[0].Name] = &methodMeta{ - node: m, - ftype: ft, - } - } - } - - return v -} - -func main() { - var arg string - if len(os.Args) > 1 { - arg = os.Args[1] - } - - onlyCompare := arg == "compare" - lpath := lotusAPIPath() - - infos := struct { - V0 *stableMethodInfo - V1 *stableMethodInfo - }{ - V0: v0API(lpath, onlyCompare), - V1: v1API(lpath, onlyCompare), - } - - data, err := json.MarshalIndent(infos, "", "\t") - checkError(err) - err = ioutil.WriteFile(VenusCompatibleCheckFile, data, 0666) - checkError(err) -} - -func v0API(lpath string, onlyCompare bool) *stableMethodInfo { - apiFilePaths := []string{ - path.Join(lpath, "v0api/full.go"), - path.Join(lpath, "api_common.go"), - path.Join(lpath, "api_net.go"), - } - fmt.Println("v0 lotus api file: ", apiFilePaths) - - bmp, err := benchmarkMethodPerm(apiFilePaths) - checkError(err) - // outputWithJSON(bmp, "v0 benchmarkMethodPerm: ") - - mm, err := methodMetaFromInterface(path.Join(VenusAPIPath, "chain/v0"), "v0", "v0") - checkError(err) - - smi := check(bmp, mm) - outputWithJSON(smi, "v0 api StableMethodInfo: ") - - if !onlyCompare { - checkError(doTemplate(VenusV0APiFile, mm, templ)) - } - - return smi -} - -func v1API(lpath string, onlyCompare bool) *stableMethodInfo { - apiFilePaths := []string{ - path.Join(lpath, "api_full.go"), - path.Join(lpath, "api_common.go"), - path.Join(lpath, "api_net.go"), - } - fmt.Println("v1 lotus api file: ", apiFilePaths) - - bmp, err := benchmarkMethodPerm(apiFilePaths) - checkError(err) - // outputWithJSON(bmp, "v1 benchmarkMethodPerm: ") - - mm, err := methodMetaFromInterface(path.Join(VenusAPIPath, "/chain/v1"), "v1", "v1") - checkError(err) - - smi := check(bmp, mm) - outputWithJSON(smi, "v1 api StableMethodInfo: ") - - if !onlyCompare { - checkError(doTemplate(VenusV1ApiFile, mm, templ)) - } - - return smi -} - -func lotusAPIPath() string { - lAPIPath := "../lotus/api" - pkg, err := build.Import("github.com/filecoin-project/lotus/api", ".", build.FindOnly) - if err == nil { - lAPIPath = pkg.Dir - } - return lAPIPath -} - -func benchmarkMethodPerm(apiFilePaths []string) (map[string]string, error) { - fset := token.NewFileSet() - files := make([]*ast.File, 0, len(apiFilePaths)) - visitor := &Visitor{make(map[string]map[string]*methodMeta), map[string][]string{}} - - for _, fpath := range apiFilePaths { - f, err := parser.ParseFile(fset, fpath, nil, parser.AllErrors|parser.ParseComments) - if err != nil { - return nil, err - } - files = append(files, f) - ast.Walk(visitor, f) - } - - perms := make(map[string]string) - for _, f := range files { - cmap := ast.NewCommentMap(fset, f, f.Comments) - for _, methods := range visitor.Methods { - for mname, node := range methods { - filteredComments := cmap.Filter(node.node).Comments() - if len(filteredComments) > 0 { - cmt := filteredComments[len(filteredComments)-1].List[0].Text - if !strings.Contains(cmt, "perm:") { - fmt.Println("lotus method not found perm: ", mname) - continue - } - pairs := strings.Split(cmt, ":") - if len(pairs) != 2 { - continue - } - perms[mname] = pairs[1] - } - } - } - } - - return perms, nil -} - -type methodInfo struct { - Name string - node ast.Node - Tags map[string][]string - NamedParams, ParamNames, Results, DefRes string -} -type strinfo struct { - Name string - Methods map[string]*methodInfo - Include []string -} -type meta struct { - Infos map[string]*strinfo - Imports map[string]string - OutPkg string -} - -func filter(f fs.FileInfo) bool { - return f.Name() != GenAPIFileName -} - -func methodMetaFromInterface(rootPath string, pkg, outpkg string) (*meta, error) { - fset := token.NewFileSet() - apiDir, err := filepath.Abs(rootPath) - if err != nil { - return nil, err - } - - visitor := &Visitor{make(map[string]map[string]*methodMeta), map[string][]string{}} - m := &meta{ - OutPkg: outpkg, - Infos: map[string]*strinfo{}, - Imports: map[string]string{}, - } - // filter := isGoFile - pkgs, err := parser.ParseDir(fset, apiDir, filter, parser.AllErrors|parser.ParseComments) - if err != nil { - return nil, err - } - ap := pkgs[pkg] - - ast.Walk(visitor, ap) - ignoreMethods := map[string][]string{} - for k, f := range ap.Files { - if strings.HasSuffix(k, "blockstore.go") { - fmt.Println(k) - } - - var replacedPkgName = make(map[string]string) - - cmap := ast.NewCommentMap(fset, f, f.Comments) - for _, im := range f.Imports { - m.Imports[im.Path.Value] = im.Path.Value - if im.Name != nil { - replacedPkgName[im.Name.Name] = "x" - m.Imports[im.Path.Value] = im.Name.Name + " " + m.Imports[im.Path.Value] - } - } - - for ifname, methods := range visitor.Methods { - if _, ok := m.Infos[ifname]; !ok { - m.Infos[ifname] = &strinfo{ - Name: ifname, - Methods: map[string]*methodInfo{}, - Include: visitor.Include[ifname], - } - } - info := m.Infos[ifname] - for mname, node := range methods { - filteredComments := cmap.Filter(node.node).Comments() - if _, ok := info.Methods[mname]; !ok { - var params, pnames []string - for _, param := range node.ftype.Params.List { - pstr, err := typeName(param.Type, outpkg) - if err != nil { - return nil, err - } - - c := len(param.Names) - if c == 0 { - c = 1 - } - - for i := 0; i < c; i++ { - pname := fmt.Sprintf("p%d", len(params)) - pnames = append(pnames, pname) - params = append(params, pname+" "+pstr) - } - } - - var results []string - for _, result := range node.ftype.Results.List { - if exp, isok := result.Type.(*ast.SelectorExpr); isok && mname == "ChainStatObj" { - x, _ := json.MarshalIndent(exp, "", " ") - fmt.Printf("%s\n", string(x)) - } - rs, err := typeName(result.Type, outpkg) - if err != nil { - return nil, err - } - results = append(results, rs) - } - - defRes := "" - if len(results) > 1 { - defRes = results[0] - switch { - case defRes[0] == '*' || defRes[0] == '<', defRes == "interface{}": - defRes = "nil" - case defRes == "bool": - defRes = "false" - case defRes == "string": - defRes = `""` - case defRes == "int", defRes == "int64", defRes == "uint64", defRes == "uint": - defRes = "0" - default: - defRes = "*new(" + defRes + ")" - } - defRes += ", " - } - - info.Methods[mname] = &methodInfo{ - Name: mname, - node: node.node, - Tags: map[string][]string{}, - NamedParams: strings.Join(params, ", "), - ParamNames: strings.Join(pnames, ", "), - Results: strings.Join(results, ", "), - DefRes: defRes, - } - } - - // try to parse tag info - if len(filteredComments) > 0 { - lastComment := filteredComments[len(filteredComments)-1] - // eg. cmt = `//perm:read` - cmt := lastComment.List[len(lastComment.List)-1].Text - cmt = strings.Replace(cmt, "//", "", 1) - info.Methods[mname].Tags[rkPerm] = strings.Split(cmt, ":") - } - } - } - } - for ifname, mnames := range ignoreMethods { - for _, mname := range mnames { - delete(m.Infos[ifname].Methods, mname) - } - } - - return m, nil -} - -func typeName(e ast.Expr, pkg string) (string, error) { - switch t := e.(type) { - case *ast.SelectorExpr: - return t.X.(*ast.Ident).Name + "." + t.Sel.Name, nil - case *ast.Ident: - pstr := t.Name - if !unicode.IsLower(rune(pstr[0])) && pkg != "client" { - pstr = "client." + pstr // todo src pkg name - } - return pstr, nil - case *ast.ArrayType: - subt, err := typeName(t.Elt, pkg) - if err != nil { - return "", err - } - return "[]" + subt, nil - case *ast.StarExpr: - subt, err := typeName(t.X, pkg) - if err != nil { - return "", err - } - return "*" + subt, nil - case *ast.MapType: - k, err := typeName(t.Key, pkg) - if err != nil { - return "", err - } - v, err := typeName(t.Value, pkg) - if err != nil { - return "", err - } - return "map[" + k + "]" + v, nil - case *ast.StructType: - if len(t.Fields.List) != 0 { - return "", xerrors.Errorf("can't struct") - } - return "struct{}", nil - case *ast.InterfaceType: - if len(t.Methods.List) != 0 { - return "", xerrors.Errorf("can't interface") - } - return "interface{}", nil - case *ast.ChanType: - subt, err := typeName(t.Value, pkg) - if err != nil { - return "", err - } - if t.Dir == ast.SEND { - subt = "->chan " + subt - } else { - subt = "<-chan " + subt - } - return subt, nil - default: - return "", xerrors.Errorf("unknown type") - } -} - -type stableMethodInfo struct { - // Lotus and Venus both have functions and the same permissions - Common map[string]string - // Venus has functions that Lotus does not - Extend map[string]string - // Lotus has functions that Venus does not - Loss map[string]string - // Both Lotus and venus has functions but the permissions are different - Gap map[string]string -} - -func newStableMethodInfo() *stableMethodInfo { - return &stableMethodInfo{ - Common: make(map[string]string), - Extend: make(map[string]string), - Loss: make(map[string]string), - Gap: make(map[string]string), - } -} - -func check(bmp map[string]string, m *meta) *stableMethodInfo { - smi := newStableMethodInfo() - vMethodPerms := make(map[string]string) - for _, info := range m.Infos { - for _, one := range info.Methods { - mperm := one.Tags[rkPerm][1] - vMethodPerms[one.Name] = mperm - if perm, ok := bmp[one.Name]; ok { - if mperm != perm { - smi.Gap[one.Name] = fmt.Sprintf("venus:%s lotus:%s", mperm, perm) - continue - } - smi.Common[one.Name] = mperm - } else { - smi.Extend[one.Name] = mperm - } - } - } - for m, p := range bmp { - if _, ok := vMethodPerms[m]; !ok { - smi.Loss[m] = p - } - } - - return smi -} - -func doTemplate(outfile string, info interface{}, templ string) error { - w, err := os.OpenFile(outfile, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0666) - if err != nil { - return err - } - t := template.Must(template.New(""). - Funcs(template.FuncMap{}).Parse(templ)) - - return t.Execute(w, info) -} - -var templ = `// Code generated by github.com/filecoin-project/tools/gen/api. DO NOT EDIT. - -package {{.OutPkg}} - -import ( -{{range .Imports}} {{.}} -{{end}}) -{{range .Infos}} {{$name := .Name}} -type {{.Name}}Struct struct { -{{range .Include}} {{.}}Struct -{{end}}{{ if gt (len .Methods) 0 }} Internal struct { {{range .Methods}} - {{.Name}} func({{.NamedParams}}) ({{.Results}}) ` + "`" + `{{range .Tags}}{{index . 0}}:"{{index . 1}}"{{end}}` + "`" + ` -{{end}} } -{{end}}} - -{{range .Methods}}func(s *{{$name}}Struct) {{.Name}} ({{.NamedParams}}) ({{.Results}}){ - return s.Internal.{{.Name}}({{.ParamNames}}) -} - -{{end}} {{end}} -` - -func checkError(err error) { - if err != nil { - panic(err) - } -} - -func outputWithJSON(obj interface{}, comment string) { - b, err := json.MarshalIndent(obj, "", "\t") - if err != nil { - fmt.Println("json marshal error: ", err) - } - fmt.Println(comment, "\n", string(b)) -} diff --git a/venus-devtool/compatible/apis/checksum.go b/venus-devtool/compatible/apis/checksum.go index 3ca79dcb3b..0f97a50925 100644 --- a/venus-devtool/compatible/apis/checksum.go +++ b/venus-devtool/compatible/apis/checksum.go @@ -17,7 +17,7 @@ var checksumCmd = &cli.Command{ Flags: []cli.Flag{}, Action: func(cctx *cli.Context) error { var buf bytes.Buffer - for _, pair := range util.APIPairs { + for _, pair := range util.ChainAPIPairs { rt := pair.Lotus.Type fmt.Printf("%s:\n", rt) for mi := 0; mi < rt.NumMethod(); mi++ { diff --git a/venus-devtool/compatible/apis/diff.go b/venus-devtool/compatible/apis/diff.go index a45a2a4114..0b26bdb61b 100644 --- a/venus-devtool/compatible/apis/diff.go +++ b/venus-devtool/compatible/apis/diff.go @@ -16,7 +16,7 @@ var diffCmd = &cli.Command{ Name: "diff", Flags: []cli.Flag{}, Action: func(cctx *cli.Context) error { - for _, pair := range util.APIPairs { + for _, pair := range util.ChainAPIPairs { showDiff(pair.Venus.Type, pair.Lotus.Type) } return nil diff --git a/venus-devtool/compatible/apis/perm.go b/venus-devtool/compatible/apis/perm.go index 9db33ca20d..ba85e16f12 100644 --- a/venus-devtool/compatible/apis/perm.go +++ b/venus-devtool/compatible/apis/perm.go @@ -3,7 +3,6 @@ package main import ( "fmt" "log" - "strings" "github.com/urfave/cli/v2" @@ -14,7 +13,7 @@ var permCmd = &cli.Command{ Name: "perm", Flags: []cli.Flag{}, Action: func(cctx *cli.Context) error { - for _, pair := range util.APIPairs { + for _, pair := range util.ChainAPIPairs { originMetas, err := parsePermMetas(pair.Lotus.ParseOpt) if err != nil { log.Fatalln("parse lotus api interfaces:", err) @@ -60,7 +59,7 @@ type permMeta struct { } func parsePermMetas(opt util.InterfaceParseOption) ([]permMeta, error) { - ifaceMetas, err := util.ParseInterfaceMetas(opt) + ifaceMetas, _, err := util.ParseInterfaceMetas(opt) if err != nil { return nil, err } @@ -72,31 +71,10 @@ func parsePermMetas(opt util.InterfaceParseOption) ([]permMeta, error) { pkg: opt.ImportPath, iface: iface.Name, meth: ifMeth.Name, - perm: getPerms(ifMeth), + perm: util.GetAPIMethodPerm(ifMeth), }) } } return permMetas, nil } - -func getPerms(m util.InterfaceMethodMeta) string { - permStr := "" - - if cmtNum := len(m.Comments); cmtNum > 0 { - if itemNum := len(m.Comments[cmtNum-1].List); itemNum > 0 { - if strings.HasPrefix(m.Comments[cmtNum-1].List[0].Text, "//") { - permStr = m.Comments[cmtNum-1].List[0].Text[2:] - } - } - } - - for _, piece := range strings.Split(permStr, " ") { - trimmed := strings.TrimSpace(piece) - if strings.HasPrefix(trimmed, "perm:") { - return trimmed[5:] - } - } - - return "" -} diff --git a/venus-devtool/util/api_meta.go b/venus-devtool/util/api_meta.go index 5c7a5bed15..cbbb00b334 100644 --- a/venus-devtool/util/api_meta.go +++ b/venus-devtool/util/api_meta.go @@ -2,6 +2,7 @@ package util import ( "reflect" + "strings" "github.com/filecoin-project/lotus/api/v0api" "github.com/filecoin-project/lotus/api/v1api" @@ -10,7 +11,7 @@ import ( "github.com/filecoin-project/venus/venus-shared/api/chain/v1" ) -var APIPairs = []struct { +var ChainAPIPairs = []struct { Ver int Lotus APIMeta Venus APIMeta @@ -51,9 +52,30 @@ var APIPairs = []struct { }, } -var LatestAPIPair = APIPairs[len(APIPairs)-1] +var LatestChainAPIPair = ChainAPIPairs[len(ChainAPIPairs)-1] type APIMeta struct { Type reflect.Type ParseOpt InterfaceParseOption } + +func GetAPIMethodPerm(m InterfaceMethodMeta) string { + permStr := "" + + if cmtNum := len(m.Comments); cmtNum > 0 { + if itemNum := len(m.Comments[cmtNum-1].List); itemNum > 0 { + if strings.HasPrefix(m.Comments[cmtNum-1].List[0].Text, "//") { + permStr = m.Comments[cmtNum-1].List[0].Text[2:] + } + } + } + + for _, piece := range strings.Split(permStr, " ") { + trimmed := strings.TrimSpace(piece) + if strings.HasPrefix(trimmed, "perm:") { + return trimmed[5:] + } + } + + return "" +} diff --git a/venus-devtool/util/import.go b/venus-devtool/util/import.go index cbcd115ef8..906c73b795 100644 --- a/venus-devtool/util/import.go +++ b/venus-devtool/util/import.go @@ -2,13 +2,47 @@ package util import ( "go/build" + "sync" ) -func FindLocationForImportPath(path string) (string, error) { - pkg, err := build.Import(path, ".", build.FindOnly) - if err != nil { - return "", err +type PackageBuildInfo struct { + *build.Package + Err error +} + +var pkgCache = struct { + sync.RWMutex + found map[string]PackageBuildInfo +}{ + found: map[string]PackageBuildInfo{}, +} + +func FindPackage(importPath string) PackageBuildInfo { + pkgCache.RLock() + found, ok := pkgCache.found[importPath] + pkgCache.RUnlock() + + if !ok { + pkgCache.Lock() + pkg, err := build.Import(importPath, ".", 0) + + found = PackageBuildInfo{ + Package: pkg, + Err: err, + } + + pkgCache.found[importPath] = found + pkgCache.Unlock() + } + + return found +} + +func FindPackageLocation(importPath string) (string, error) { + found := FindPackage(importPath) + if found.Err != nil { + return "", found.Err } - return pkg.Dir, nil + return found.Dir, nil } diff --git a/venus-devtool/util/interface.go b/venus-devtool/util/interface.go index 0c836a24a7..35d28a6aeb 100644 --- a/venus-devtool/util/interface.go +++ b/venus-devtool/util/interface.go @@ -1,6 +1,7 @@ package util import ( + "fmt" "go/ast" "go/parser" "go/token" @@ -8,18 +9,40 @@ import ( "strings" ) +type ASTMeta struct { + Location string + *token.FileSet +} + type InterfaceParseOption struct { - ImportPath string - IncludeAll bool - Included []string + ImportPath string + IncludeAll bool + Included []string + ResolveImports bool +} + +type PackageMeta struct { + Name string + *ast.Package +} + +type ImportMeta struct { + Path string + IsStd bool +} + +type FileMeta struct { + Name string + *ast.File + Imports map[string]ImportMeta } type InterfaceMeta struct { - Pkg string - File string - Name string - Defined []InterfaceMethodMeta - Included []string + Pkg PackageMeta + File FileMeta + Name string + Defined []InterfaceMethodMeta + Nested []string } type InterfaceMethodMeta struct { @@ -30,8 +53,8 @@ type InterfaceMethodMeta struct { } type ifaceMetaVisitor struct { - pname string - fname string + pkg PackageMeta + file FileMeta included map[string]struct{} includAll bool comments ast.CommentMap @@ -58,8 +81,8 @@ func (iv *ifaceMetaVisitor) Visit(node ast.Node) ast.Visitor { if !ok { ifaceIdx = len(iv.ifaces) iv.ifaces = append(iv.ifaces, &InterfaceMeta{ - Pkg: iv.pname, - File: iv.fname, + Pkg: iv.pkg, + File: iv.file, Name: st.Name.Name, }) } @@ -69,7 +92,7 @@ func (iv *ifaceMetaVisitor) Visit(node ast.Node) ast.Visitor { for _, m := range iface.Methods.List { switch meth := m.Type.(type) { case *ast.Ident: - ifaceMeta.Included = append(ifaceMeta.Included, meth.Name) + ifaceMeta.Nested = append(ifaceMeta.Nested, meth.Name) case *ast.FuncType: ifaceMeta.Defined = append(ifaceMeta.Defined, InterfaceMethodMeta{ @@ -84,16 +107,47 @@ func (iv *ifaceMetaVisitor) Visit(node ast.Node) ast.Visitor { return iv } -func ParseInterfaceMetas(opt InterfaceParseOption) ([]*InterfaceMeta, error) { - location, err := FindLocationForImportPath(opt.ImportPath) +func genFileMeta(name string, file *ast.File, resolveImports bool) (FileMeta, error) { + imports := map[string]ImportMeta{} + if resolveImports { + + for _, imp := range file.Imports { + importPath := imp.Path.Value[1 : len(imp.Path.Value)-1] + found := FindPackage(importPath) + if found.Err != nil { + return FileMeta{}, fmt.Errorf("find package for %s: %w", importPath, found.Err) + } + + importMeta := ImportMeta{ + Path: importPath, + IsStd: strings.HasPrefix(found.Dir, found.SrcRoot), + } + + if imp.Name != nil && imp.Name.Name != "" { + imports[imp.Name.Name] = importMeta + } else { + imports[found.Name] = importMeta + } + } + } + + return FileMeta{ + Name: name, + File: file, + Imports: imports, + }, nil +} + +func ParseInterfaceMetas(opt InterfaceParseOption) ([]*InterfaceMeta, *ASTMeta, error) { + location, err := FindPackageLocation(opt.ImportPath) if err != nil { - return nil, err + return nil, nil, err } fset := token.NewFileSet() pkgs, err := parser.ParseDir(fset, location, nil, parser.AllErrors|parser.ParseComments) if err != nil { - return nil, err + return nil, nil, err } var metas []*InterfaceMeta @@ -109,14 +163,22 @@ func ParseInterfaceMetas(opt InterfaceParseOption) ([]*InterfaceMeta, error) { } visitor := &ifaceMetaVisitor{ - pname: pname, + pkg: PackageMeta{ + Name: pname, + Package: pkg, + }, included: included, includAll: opt.IncludeAll, ifaceIdxes: map[string]int{}, } for fname, file := range pkg.Files { - visitor.fname = fname + fileMeta, err := genFileMeta(fname, file, opt.ResolveImports) + if err != nil { + return nil, nil, fmt.Errorf("gen file meta for %s: %w", fname, err) + } + + visitor.file = fileMeta visitor.comments = ast.NewCommentMap(fset, file, file.Comments) ast.Walk(visitor, file) } @@ -126,11 +188,11 @@ func ParseInterfaceMetas(opt InterfaceParseOption) ([]*InterfaceMeta, error) { sort.Slice(metas, func(i, j int) bool { if metas[i].Pkg != metas[j].Pkg { - return metas[i].Pkg < metas[j].Pkg + return metas[i].Pkg.Name < metas[j].Pkg.Name } - if metas[i].File != metas[j].File { - return metas[i].File < metas[j].File + if metas[i].File.Name != metas[j].File.Name { + return metas[i].File.Name < metas[j].File.Name } return metas[i].Name < metas[j].Name @@ -142,5 +204,8 @@ func ParseInterfaceMetas(opt InterfaceParseOption) ([]*InterfaceMeta, error) { }) } - return metas, nil + return metas, &ASTMeta{ + Location: location, + FileSet: fset, + }, nil } diff --git a/venus-shared/api/chain/v0/fullnode.go b/venus-shared/api/chain/v0/fullnode.go index bd4498132a..031e0ca1e9 100644 --- a/venus-shared/api/chain/v0/fullnode.go +++ b/venus-shared/api/chain/v0/fullnode.go @@ -1,7 +1,5 @@ package v0 -//go:generate go run github.com/golang/mock/mockgen@v1.6.0 -destination=./mock/full.go -package=mock . FullNode - type FullNode interface { IBlockStore IChain diff --git a/venus-shared/api/chain/v0/proxy_gen.go b/venus-shared/api/chain/v0/proxy_gen.go index 792485f109..26110abff0 100644 --- a/venus-shared/api/chain/v0/proxy_gen.go +++ b/venus-shared/api/chain/v0/proxy_gen.go @@ -1,43 +1,52 @@ -// Code generated by github.com/filecoin-project/tools/gen/api. DO NOT EDIT. - +// Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen. DO NOT EDIT. package v0 import ( "context" - "github.com/filecoin-project/go-address" - "github.com/filecoin-project/go-bitfield" + "time" + + address "github.com/filecoin-project/go-address" + bitfield "github.com/filecoin-project/go-bitfield" "github.com/filecoin-project/go-jsonrpc/auth" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/go-state-types/dline" "github.com/filecoin-project/go-state-types/network" - "github.com/filecoin-project/venus/venus-shared/actors/builtin/miner" - "github.com/filecoin-project/venus/venus-shared/types" - "github.com/ipfs/go-cid" + cid "github.com/ipfs/go-cid" "github.com/libp2p/go-libp2p-core/metrics" "github.com/libp2p/go-libp2p-core/peer" ma "github.com/multiformats/go-multiaddr" - "time" + + "github.com/filecoin-project/venus/venus-shared/actors/builtin/miner" + "github.com/filecoin-project/venus/venus-shared/types" ) -type FullNodeStruct struct { - IBlockStoreStruct - IChainStruct - IMarketStruct - IMiningStruct - IMessagePoolStruct - IMultiSigStruct - INetworkStruct - IPaychanStruct - ISyncerStruct - IWalletStruct - IJwtAuthAPIStruct +type IBlockStoreStruct struct { + Internal struct { + ChainDeleteObj func(ctx context.Context, obj cid.Cid) error `perm:"admin"` + ChainHasObj func(ctx context.Context, obj cid.Cid) (bool, error) `perm:"read"` + ChainReadObj func(ctx context.Context, cid cid.Cid) ([]byte, error) `perm:"read"` + ChainStatObj func(ctx context.Context, obj cid.Cid, base cid.Cid) (types.ObjStat, error) `perm:"read"` + } +} + +func (s *IBlockStoreStruct) ChainDeleteObj(p0 context.Context, p1 cid.Cid) error { + return s.Internal.ChainDeleteObj(p0, p1) +} +func (s *IBlockStoreStruct) ChainHasObj(p0 context.Context, p1 cid.Cid) (bool, error) { + return s.Internal.ChainHasObj(p0, p1) +} +func (s *IBlockStoreStruct) ChainReadObj(p0 context.Context, p1 cid.Cid) ([]byte, error) { + return s.Internal.ChainReadObj(p0, p1) +} +func (s *IBlockStoreStruct) ChainStatObj(p0 context.Context, p1 cid.Cid, p2 cid.Cid) (types.ObjStat, error) { + return s.Internal.ChainStatObj(p0, p1, p2) } type IAccountStruct struct { Internal struct { - StateAccountKey func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (address.Address, error) `perm:"read"` + StateAccountKey func(ctx context.Context, addr address.Address, tsk types.TipSetKey) (address.Address, error) `perm:"read"` } } @@ -47,23 +56,21 @@ func (s *IAccountStruct) StateAccountKey(p0 context.Context, p1 address.Address, type IActorStruct struct { Internal struct { - ListActor func(p0 context.Context) (map[address.Address]*types.Actor, error) `perm:"read"` - - StateGetActor func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*types.Actor, error) `perm:"read"` + ListActor func(ctx context.Context) (map[address.Address]*types.Actor, error) `perm:"read"` + StateGetActor func(ctx context.Context, actor address.Address, tsk types.TipSetKey) (*types.Actor, error) `perm:"read"` } } func (s *IActorStruct) ListActor(p0 context.Context) (map[address.Address]*types.Actor, error) { return s.Internal.ListActor(p0) } - func (s *IActorStruct) StateGetActor(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*types.Actor, error) { return s.Internal.StateGetActor(p0, p1, p2) } type IBeaconStruct struct { Internal struct { - BeaconGetEntry func(p0 context.Context, p1 abi.ChainEpoch) (*types.BeaconEntry, error) `perm:"read"` + BeaconGetEntry func(ctx context.Context, epoch abi.ChainEpoch) (*types.BeaconEntry, error) `perm:"read"` } } @@ -71,1012 +78,702 @@ func (s *IBeaconStruct) BeaconGetEntry(p0 context.Context, p1 abi.ChainEpoch) (* return s.Internal.BeaconGetEntry(p0, p1) } -type IBlockStoreStruct struct { +type IMinerStateStruct struct { Internal struct { - ChainDeleteObj func(p0 context.Context, p1 cid.Cid) error `perm:"admin"` - - ChainHasObj func(p0 context.Context, p1 cid.Cid) (bool, error) `perm:"read"` - - ChainReadObj func(p0 context.Context, p1 cid.Cid) ([]byte, error) `perm:"read"` - - ChainStatObj func(p0 context.Context, p1 cid.Cid, p2 cid.Cid) (types.ObjStat, error) `perm:"read"` + StateCirculatingSupply func(ctx context.Context, tsk types.TipSetKey) (abi.TokenAmount, error) `perm:"read"` + StateDealProviderCollateralBounds func(ctx context.Context, size abi.PaddedPieceSize, verified bool, tsk types.TipSetKey) (types.DealCollateralBounds, error) `perm:"read"` + StateListActors func(ctx context.Context, tsk types.TipSetKey) ([]address.Address, error) `perm:"read"` + StateListMiners func(ctx context.Context, tsk types.TipSetKey) ([]address.Address, error) `perm:"read"` + StateLookupID func(ctx context.Context, addr address.Address, tsk types.TipSetKey) (address.Address, error) `perm:"read"` + StateMarketBalance func(ctx context.Context, addr address.Address, tsk types.TipSetKey) (types.MarketBalance, error) `perm:"read"` + StateMarketDeals func(ctx context.Context, tsk types.TipSetKey) (map[string]types.MarketDeal, error) `perm:"read"` + StateMarketStorageDeal func(ctx context.Context, dealID abi.DealID, tsk types.TipSetKey) (*types.MarketDeal, error) `perm:"read"` + StateMinerActiveSectors func(ctx context.Context, maddr address.Address, tsk types.TipSetKey) ([]*miner.SectorOnChainInfo, error) `perm:"read"` + StateMinerAvailableBalance func(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (big.Int, error) `perm:"read"` + StateMinerDeadlines func(ctx context.Context, maddr address.Address, tsk types.TipSetKey) ([]types.Deadline, error) `perm:"read"` + StateMinerFaults func(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (bitfield.BitField, error) `perm:"read"` + StateMinerInfo func(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (miner.MinerInfo, error) `perm:"read"` + StateMinerInitialPledgeCollateral func(ctx context.Context, maddr address.Address, pci miner.SectorPreCommitInfo, tsk types.TipSetKey) (big.Int, error) `perm:"read"` + StateMinerPartitions func(ctx context.Context, maddr address.Address, dlIdx uint64, tsk types.TipSetKey) ([]types.Partition, error) `perm:"read"` + StateMinerPower func(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*types.MinerPower, error) `perm:"read"` + StateMinerPreCommitDepositForPower func(ctx context.Context, maddr address.Address, pci miner.SectorPreCommitInfo, tsk types.TipSetKey) (big.Int, error) `perm:"read"` + StateMinerProvingDeadline func(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (*dline.Info, error) `perm:"read"` + StateMinerRecoveries func(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (bitfield.BitField, error) `perm:"read"` + StateMinerSectorAllocated func(ctx context.Context, maddr address.Address, s abi.SectorNumber, tsk types.TipSetKey) (bool, error) `perm:"read"` + StateMinerSectorCount func(ctx context.Context, addr address.Address, tsk types.TipSetKey) (types.MinerSectors, error) `perm:"read"` + StateMinerSectorSize func(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (abi.SectorSize, error) `perm:"read"` + StateMinerSectors func(ctx context.Context, maddr address.Address, sectorNos *bitfield.BitField, tsk types.TipSetKey) ([]*miner.SectorOnChainInfo, error) `perm:"read"` + StateMinerWorkerAddress func(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (address.Address, error) `perm:"read"` + StateSectorExpiration func(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tsk types.TipSetKey) (*miner.SectorExpiration, error) `perm:"read"` + StateSectorGetInfo func(ctx context.Context, maddr address.Address, n abi.SectorNumber, tsk types.TipSetKey) (*miner.SectorOnChainInfo, error) `perm:"read"` + StateSectorPartition func(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tsk types.TipSetKey) (*miner.SectorLocation, error) `perm:"read"` + StateSectorPreCommitInfo func(ctx context.Context, maddr address.Address, n abi.SectorNumber, tsk types.TipSetKey) (miner.SectorPreCommitOnChainInfo, error) `perm:"read"` + StateVMCirculatingSupplyInternal func(ctx context.Context, tsk types.TipSetKey) (types.CirculatingSupply, error) `perm:"read"` + StateVerifiedClientStatus func(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*abi.StoragePower, error) `perm:"read"` } } -func (s *IBlockStoreStruct) ChainDeleteObj(p0 context.Context, p1 cid.Cid) error { - return s.Internal.ChainDeleteObj(p0, p1) +func (s *IMinerStateStruct) StateCirculatingSupply(p0 context.Context, p1 types.TipSetKey) (abi.TokenAmount, error) { + return s.Internal.StateCirculatingSupply(p0, p1) } - -func (s *IBlockStoreStruct) ChainHasObj(p0 context.Context, p1 cid.Cid) (bool, error) { - return s.Internal.ChainHasObj(p0, p1) +func (s *IMinerStateStruct) StateDealProviderCollateralBounds(p0 context.Context, p1 abi.PaddedPieceSize, p2 bool, p3 types.TipSetKey) (types.DealCollateralBounds, error) { + return s.Internal.StateDealProviderCollateralBounds(p0, p1, p2, p3) } - -func (s *IBlockStoreStruct) ChainReadObj(p0 context.Context, p1 cid.Cid) ([]byte, error) { - return s.Internal.ChainReadObj(p0, p1) +func (s *IMinerStateStruct) StateListActors(p0 context.Context, p1 types.TipSetKey) ([]address.Address, error) { + return s.Internal.StateListActors(p0, p1) } - -func (s *IBlockStoreStruct) ChainStatObj(p0 context.Context, p1 cid.Cid, p2 cid.Cid) (types.ObjStat, error) { - return s.Internal.ChainStatObj(p0, p1, p2) +func (s *IMinerStateStruct) StateListMiners(p0 context.Context, p1 types.TipSetKey) ([]address.Address, error) { + return s.Internal.StateListMiners(p0, p1) } - -type IChainStruct struct { - IAccountStruct - IActorStruct - IBeaconStruct - IMinerStateStruct - IChainInfoStruct +func (s *IMinerStateStruct) StateLookupID(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (address.Address, error) { + return s.Internal.StateLookupID(p0, p1, p2) +} +func (s *IMinerStateStruct) StateMarketBalance(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (types.MarketBalance, error) { + return s.Internal.StateMarketBalance(p0, p1, p2) +} +func (s *IMinerStateStruct) StateMarketDeals(p0 context.Context, p1 types.TipSetKey) (map[string]types.MarketDeal, error) { + return s.Internal.StateMarketDeals(p0, p1) +} +func (s *IMinerStateStruct) StateMarketStorageDeal(p0 context.Context, p1 abi.DealID, p2 types.TipSetKey) (*types.MarketDeal, error) { + return s.Internal.StateMarketStorageDeal(p0, p1, p2) +} +func (s *IMinerStateStruct) StateMinerActiveSectors(p0 context.Context, p1 address.Address, p2 types.TipSetKey) ([]*miner.SectorOnChainInfo, error) { + return s.Internal.StateMinerActiveSectors(p0, p1, p2) +} +func (s *IMinerStateStruct) StateMinerAvailableBalance(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (big.Int, error) { + return s.Internal.StateMinerAvailableBalance(p0, p1, p2) +} +func (s *IMinerStateStruct) StateMinerDeadlines(p0 context.Context, p1 address.Address, p2 types.TipSetKey) ([]types.Deadline, error) { + return s.Internal.StateMinerDeadlines(p0, p1, p2) +} +func (s *IMinerStateStruct) StateMinerFaults(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (bitfield.BitField, error) { + return s.Internal.StateMinerFaults(p0, p1, p2) +} +func (s *IMinerStateStruct) StateMinerInfo(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (miner.MinerInfo, error) { + return s.Internal.StateMinerInfo(p0, p1, p2) +} +func (s *IMinerStateStruct) StateMinerInitialPledgeCollateral(p0 context.Context, p1 address.Address, p2 miner.SectorPreCommitInfo, p3 types.TipSetKey) (big.Int, error) { + return s.Internal.StateMinerInitialPledgeCollateral(p0, p1, p2, p3) +} +func (s *IMinerStateStruct) StateMinerPartitions(p0 context.Context, p1 address.Address, p2 uint64, p3 types.TipSetKey) ([]types.Partition, error) { + return s.Internal.StateMinerPartitions(p0, p1, p2, p3) +} +func (s *IMinerStateStruct) StateMinerPower(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*types.MinerPower, error) { + return s.Internal.StateMinerPower(p0, p1, p2) +} +func (s *IMinerStateStruct) StateMinerPreCommitDepositForPower(p0 context.Context, p1 address.Address, p2 miner.SectorPreCommitInfo, p3 types.TipSetKey) (big.Int, error) { + return s.Internal.StateMinerPreCommitDepositForPower(p0, p1, p2, p3) +} +func (s *IMinerStateStruct) StateMinerProvingDeadline(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*dline.Info, error) { + return s.Internal.StateMinerProvingDeadline(p0, p1, p2) +} +func (s *IMinerStateStruct) StateMinerRecoveries(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (bitfield.BitField, error) { + return s.Internal.StateMinerRecoveries(p0, p1, p2) +} +func (s *IMinerStateStruct) StateMinerSectorAllocated(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (bool, error) { + return s.Internal.StateMinerSectorAllocated(p0, p1, p2, p3) +} +func (s *IMinerStateStruct) StateMinerSectorCount(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (types.MinerSectors, error) { + return s.Internal.StateMinerSectorCount(p0, p1, p2) +} +func (s *IMinerStateStruct) StateMinerSectorSize(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (abi.SectorSize, error) { + return s.Internal.StateMinerSectorSize(p0, p1, p2) +} +func (s *IMinerStateStruct) StateMinerSectors(p0 context.Context, p1 address.Address, p2 *bitfield.BitField, p3 types.TipSetKey) ([]*miner.SectorOnChainInfo, error) { + return s.Internal.StateMinerSectors(p0, p1, p2, p3) +} +func (s *IMinerStateStruct) StateMinerWorkerAddress(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (address.Address, error) { + return s.Internal.StateMinerWorkerAddress(p0, p1, p2) +} +func (s *IMinerStateStruct) StateSectorExpiration(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorExpiration, error) { + return s.Internal.StateSectorExpiration(p0, p1, p2, p3) +} +func (s *IMinerStateStruct) StateSectorGetInfo(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorOnChainInfo, error) { + return s.Internal.StateSectorGetInfo(p0, p1, p2, p3) +} +func (s *IMinerStateStruct) StateSectorPartition(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorLocation, error) { + return s.Internal.StateSectorPartition(p0, p1, p2, p3) +} +func (s *IMinerStateStruct) StateSectorPreCommitInfo(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (miner.SectorPreCommitOnChainInfo, error) { + return s.Internal.StateSectorPreCommitInfo(p0, p1, p2, p3) +} +func (s *IMinerStateStruct) StateVMCirculatingSupplyInternal(p0 context.Context, p1 types.TipSetKey) (types.CirculatingSupply, error) { + return s.Internal.StateVMCirculatingSupplyInternal(p0, p1) +} +func (s *IMinerStateStruct) StateVerifiedClientStatus(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*abi.StoragePower, error) { + return s.Internal.StateVerifiedClientStatus(p0, p1, p2) } type IChainInfoStruct struct { Internal struct { - BlockTime func(p0 context.Context) time.Duration `perm:"read"` - - ChainExport func(p0 context.Context, p1 abi.ChainEpoch, p2 bool, p3 types.TipSetKey) (<-chan []byte, error) `perm:"read"` - - ChainGetBlock func(p0 context.Context, p1 cid.Cid) (*types.BlockHeader, error) `perm:"read"` - - ChainGetBlockMessages func(p0 context.Context, p1 cid.Cid) (*types.BlockMessages, error) `perm:"read"` - - ChainGetMessage func(p0 context.Context, p1 cid.Cid) (*types.Message, error) `perm:"read"` - - ChainGetMessagesInTipset func(p0 context.Context, p1 types.TipSetKey) ([]types.MessageCID, error) `perm:"read"` - - ChainGetParentMessages func(p0 context.Context, p1 cid.Cid) ([]types.MessageCID, error) `perm:"read"` - - ChainGetParentReceipts func(p0 context.Context, p1 cid.Cid) ([]*types.MessageReceipt, error) `perm:"read"` - - ChainGetPath func(p0 context.Context, p1 types.TipSetKey, p2 types.TipSetKey) ([]*types.HeadChange, error) `perm:"read"` - - ChainGetRandomnessFromBeacon func(p0 context.Context, p1 types.TipSetKey, p2 crypto.DomainSeparationTag, p3 abi.ChainEpoch, p4 []byte) (abi.Randomness, error) `perm:"read"` - - ChainGetRandomnessFromTickets func(p0 context.Context, p1 types.TipSetKey, p2 crypto.DomainSeparationTag, p3 abi.ChainEpoch, p4 []byte) (abi.Randomness, error) `perm:"read"` - - ChainGetReceipts func(p0 context.Context, p1 cid.Cid) ([]types.MessageReceipt, error) `perm:"read"` - - ChainGetTipSet func(p0 context.Context, p1 types.TipSetKey) (*types.TipSet, error) `perm:"read"` - - ChainGetTipSetByHeight func(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) (*types.TipSet, error) `perm:"read"` - - ChainHead func(p0 context.Context) (*types.TipSet, error) `perm:"read"` - - ChainList func(p0 context.Context, p1 types.TipSetKey, p2 int) ([]types.TipSetKey, error) `perm:"read"` - - ChainNotify func(p0 context.Context) (<-chan []*types.HeadChange, error) `perm:"read"` - - ChainSetHead func(p0 context.Context, p1 types.TipSetKey) error `perm:"admin"` - - GetActor func(p0 context.Context, p1 address.Address) (*types.Actor, error) `perm:"read"` - - GetEntry func(p0 context.Context, p1 abi.ChainEpoch, p2 uint64) (*types.BeaconEntry, error) `perm:"read"` - - GetFullBlock func(p0 context.Context, p1 cid.Cid) (*types.FullBlock, error) `perm:"read"` - - GetParentStateRootActor func(p0 context.Context, p1 *types.TipSet, p2 address.Address) (*types.Actor, error) `perm:"read"` - - MessageWait func(p0 context.Context, p1 cid.Cid, p2 abi.ChainEpoch, p3 abi.ChainEpoch) (*types.ChainMessage, error) `perm:"read"` - - ProtocolParameters func(p0 context.Context) (*types.ProtocolParams, error) `perm:"read"` - - ResolveToKeyAddr func(p0 context.Context, p1 address.Address, p2 *types.TipSet) (address.Address, error) `perm:"read"` - - StateGetReceipt func(p0 context.Context, p1 cid.Cid, p2 types.TipSetKey) (*types.MessageReceipt, error) `perm:"read"` - - StateNetworkName func(p0 context.Context) (types.NetworkName, error) `perm:"read"` - - StateNetworkVersion func(p0 context.Context, p1 types.TipSetKey) (network.Version, error) `perm:"read"` - - StateSearchMsg func(p0 context.Context, p1 cid.Cid) (*types.MsgLookup, error) `perm:"read"` - - StateSearchMsgLimited func(p0 context.Context, p1 cid.Cid, p2 abi.ChainEpoch) (*types.MsgLookup, error) `perm:"read"` - - StateVerifiedRegistryRootKey func(p0 context.Context, p1 types.TipSetKey) (address.Address, error) `perm:"read"` - - StateVerifierStatus func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*abi.StoragePower, error) `perm:"read"` - - StateWaitMsg func(p0 context.Context, p1 cid.Cid, p2 uint64) (*types.MsgLookup, error) `perm:"read"` - - StateWaitMsgLimited func(p0 context.Context, p1 cid.Cid, p2 uint64, p3 abi.ChainEpoch) (*types.MsgLookup, error) `perm:"read"` - - VerifyEntry func(p0 *types.BeaconEntry, p1 *types.BeaconEntry, p2 abi.ChainEpoch) bool `perm:"read"` + BlockTime func(ctx context.Context) time.Duration `perm:"read"` + ChainExport func(context.Context, abi.ChainEpoch, bool, types.TipSetKey) (<-chan []byte, error) `perm:"read"` + ChainGetBlock func(ctx context.Context, id cid.Cid) (*types.BlockHeader, error) `perm:"read"` + ChainGetBlockMessages func(ctx context.Context, bid cid.Cid) (*types.BlockMessages, error) `perm:"read"` + ChainGetMessage func(ctx context.Context, msgID cid.Cid) (*types.Message, error) `perm:"read"` + ChainGetMessagesInTipset func(ctx context.Context, key types.TipSetKey) ([]types.MessageCID, error) `perm:"read"` + ChainGetParentMessages func(ctx context.Context, bcid cid.Cid) ([]types.MessageCID, error) `perm:"read"` + ChainGetParentReceipts func(ctx context.Context, bcid cid.Cid) ([]*types.MessageReceipt, error) `perm:"read"` + ChainGetPath func(ctx context.Context, from types.TipSetKey, to types.TipSetKey) ([]*types.HeadChange, error) `perm:"read"` + ChainGetRandomnessFromBeacon func(ctx context.Context, key types.TipSetKey, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte) (abi.Randomness, error) `perm:"read"` + ChainGetRandomnessFromTickets func(ctx context.Context, tsk types.TipSetKey, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte) (abi.Randomness, error) `perm:"read"` + ChainGetReceipts func(ctx context.Context, id cid.Cid) ([]types.MessageReceipt, error) `perm:"read"` + ChainGetTipSet func(ctx context.Context, key types.TipSetKey) (*types.TipSet, error) `perm:"read"` + ChainGetTipSetByHeight func(ctx context.Context, height abi.ChainEpoch, tsk types.TipSetKey) (*types.TipSet, error) `perm:"read"` + ChainHead func(ctx context.Context) (*types.TipSet, error) `perm:"read"` + ChainList func(ctx context.Context, tsKey types.TipSetKey, count int) ([]types.TipSetKey, error) `perm:"read"` + ChainNotify func(ctx context.Context) (<-chan []*types.HeadChange, error) `perm:"read"` + ChainSetHead func(ctx context.Context, key types.TipSetKey) error `perm:"admin"` + GetActor func(ctx context.Context, addr address.Address) (*types.Actor, error) `perm:"read"` + GetEntry func(ctx context.Context, height abi.ChainEpoch, round uint64) (*types.BeaconEntry, error) `perm:"read"` + GetFullBlock func(ctx context.Context, id cid.Cid) (*types.FullBlock, error) `perm:"read"` + GetParentStateRootActor func(ctx context.Context, ts *types.TipSet, addr address.Address) (*types.Actor, error) `perm:"read"` + MessageWait func(ctx context.Context, msgCid cid.Cid, confidence, lookback abi.ChainEpoch) (*types.ChainMessage, error) `perm:"read"` + ProtocolParameters func(ctx context.Context) (*types.ProtocolParams, error) `perm:"read"` + ResolveToKeyAddr func(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error) `perm:"read"` + StateGetReceipt func(ctx context.Context, msg cid.Cid, from types.TipSetKey) (*types.MessageReceipt, error) `perm:"read"` + StateNetworkName func(ctx context.Context) (types.NetworkName, error) `perm:"read"` + StateNetworkVersion func(ctx context.Context, tsk types.TipSetKey) (network.Version, error) `perm:"read"` + StateSearchMsg func(ctx context.Context, msg cid.Cid) (*types.MsgLookup, error) `perm:"read"` + StateSearchMsgLimited func(ctx context.Context, cid cid.Cid, limit abi.ChainEpoch) (*types.MsgLookup, error) `perm:"read"` + StateVerifiedRegistryRootKey func(ctx context.Context, tsk types.TipSetKey) (address.Address, error) `perm:"read"` + StateVerifierStatus func(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*abi.StoragePower, error) `perm:"read"` + StateWaitMsg func(ctx context.Context, cid cid.Cid, confidence uint64) (*types.MsgLookup, error) `perm:"read"` + StateWaitMsgLimited func(ctx context.Context, cid cid.Cid, confidence uint64, limit abi.ChainEpoch) (*types.MsgLookup, error) `perm:"read"` + VerifyEntry func(parent, child *types.BeaconEntry, height abi.ChainEpoch) bool `perm:"read"` } } func (s *IChainInfoStruct) BlockTime(p0 context.Context) time.Duration { return s.Internal.BlockTime(p0) } - func (s *IChainInfoStruct) ChainExport(p0 context.Context, p1 abi.ChainEpoch, p2 bool, p3 types.TipSetKey) (<-chan []byte, error) { return s.Internal.ChainExport(p0, p1, p2, p3) } - func (s *IChainInfoStruct) ChainGetBlock(p0 context.Context, p1 cid.Cid) (*types.BlockHeader, error) { return s.Internal.ChainGetBlock(p0, p1) } - func (s *IChainInfoStruct) ChainGetBlockMessages(p0 context.Context, p1 cid.Cid) (*types.BlockMessages, error) { return s.Internal.ChainGetBlockMessages(p0, p1) } - func (s *IChainInfoStruct) ChainGetMessage(p0 context.Context, p1 cid.Cid) (*types.Message, error) { return s.Internal.ChainGetMessage(p0, p1) } - func (s *IChainInfoStruct) ChainGetMessagesInTipset(p0 context.Context, p1 types.TipSetKey) ([]types.MessageCID, error) { return s.Internal.ChainGetMessagesInTipset(p0, p1) } - func (s *IChainInfoStruct) ChainGetParentMessages(p0 context.Context, p1 cid.Cid) ([]types.MessageCID, error) { return s.Internal.ChainGetParentMessages(p0, p1) } - func (s *IChainInfoStruct) ChainGetParentReceipts(p0 context.Context, p1 cid.Cid) ([]*types.MessageReceipt, error) { return s.Internal.ChainGetParentReceipts(p0, p1) } - func (s *IChainInfoStruct) ChainGetPath(p0 context.Context, p1 types.TipSetKey, p2 types.TipSetKey) ([]*types.HeadChange, error) { return s.Internal.ChainGetPath(p0, p1, p2) } - func (s *IChainInfoStruct) ChainGetRandomnessFromBeacon(p0 context.Context, p1 types.TipSetKey, p2 crypto.DomainSeparationTag, p3 abi.ChainEpoch, p4 []byte) (abi.Randomness, error) { return s.Internal.ChainGetRandomnessFromBeacon(p0, p1, p2, p3, p4) } - func (s *IChainInfoStruct) ChainGetRandomnessFromTickets(p0 context.Context, p1 types.TipSetKey, p2 crypto.DomainSeparationTag, p3 abi.ChainEpoch, p4 []byte) (abi.Randomness, error) { return s.Internal.ChainGetRandomnessFromTickets(p0, p1, p2, p3, p4) } - func (s *IChainInfoStruct) ChainGetReceipts(p0 context.Context, p1 cid.Cid) ([]types.MessageReceipt, error) { return s.Internal.ChainGetReceipts(p0, p1) } - func (s *IChainInfoStruct) ChainGetTipSet(p0 context.Context, p1 types.TipSetKey) (*types.TipSet, error) { return s.Internal.ChainGetTipSet(p0, p1) } - func (s *IChainInfoStruct) ChainGetTipSetByHeight(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) (*types.TipSet, error) { return s.Internal.ChainGetTipSetByHeight(p0, p1, p2) } - func (s *IChainInfoStruct) ChainHead(p0 context.Context) (*types.TipSet, error) { return s.Internal.ChainHead(p0) } - func (s *IChainInfoStruct) ChainList(p0 context.Context, p1 types.TipSetKey, p2 int) ([]types.TipSetKey, error) { return s.Internal.ChainList(p0, p1, p2) } - func (s *IChainInfoStruct) ChainNotify(p0 context.Context) (<-chan []*types.HeadChange, error) { return s.Internal.ChainNotify(p0) } - func (s *IChainInfoStruct) ChainSetHead(p0 context.Context, p1 types.TipSetKey) error { return s.Internal.ChainSetHead(p0, p1) } - func (s *IChainInfoStruct) GetActor(p0 context.Context, p1 address.Address) (*types.Actor, error) { return s.Internal.GetActor(p0, p1) } - func (s *IChainInfoStruct) GetEntry(p0 context.Context, p1 abi.ChainEpoch, p2 uint64) (*types.BeaconEntry, error) { return s.Internal.GetEntry(p0, p1, p2) } - func (s *IChainInfoStruct) GetFullBlock(p0 context.Context, p1 cid.Cid) (*types.FullBlock, error) { return s.Internal.GetFullBlock(p0, p1) } - func (s *IChainInfoStruct) GetParentStateRootActor(p0 context.Context, p1 *types.TipSet, p2 address.Address) (*types.Actor, error) { return s.Internal.GetParentStateRootActor(p0, p1, p2) } - -func (s *IChainInfoStruct) MessageWait(p0 context.Context, p1 cid.Cid, p2 abi.ChainEpoch, p3 abi.ChainEpoch) (*types.ChainMessage, error) { +func (s *IChainInfoStruct) MessageWait(p0 context.Context, p1 cid.Cid, p2, p3 abi.ChainEpoch) (*types.ChainMessage, error) { return s.Internal.MessageWait(p0, p1, p2, p3) } - func (s *IChainInfoStruct) ProtocolParameters(p0 context.Context) (*types.ProtocolParams, error) { return s.Internal.ProtocolParameters(p0) } - func (s *IChainInfoStruct) ResolveToKeyAddr(p0 context.Context, p1 address.Address, p2 *types.TipSet) (address.Address, error) { return s.Internal.ResolveToKeyAddr(p0, p1, p2) } - func (s *IChainInfoStruct) StateGetReceipt(p0 context.Context, p1 cid.Cid, p2 types.TipSetKey) (*types.MessageReceipt, error) { return s.Internal.StateGetReceipt(p0, p1, p2) } - func (s *IChainInfoStruct) StateNetworkName(p0 context.Context) (types.NetworkName, error) { return s.Internal.StateNetworkName(p0) } - func (s *IChainInfoStruct) StateNetworkVersion(p0 context.Context, p1 types.TipSetKey) (network.Version, error) { return s.Internal.StateNetworkVersion(p0, p1) } - func (s *IChainInfoStruct) StateSearchMsg(p0 context.Context, p1 cid.Cid) (*types.MsgLookup, error) { return s.Internal.StateSearchMsg(p0, p1) } - -func (s *IChainInfoStruct) StateSearchMsgLimited(p0 context.Context, p1 cid.Cid, p2 abi.ChainEpoch) (*types.MsgLookup, error) { - return s.Internal.StateSearchMsgLimited(p0, p1, p2) -} - -func (s *IChainInfoStruct) StateVerifiedRegistryRootKey(p0 context.Context, p1 types.TipSetKey) (address.Address, error) { - return s.Internal.StateVerifiedRegistryRootKey(p0, p1) -} - -func (s *IChainInfoStruct) StateVerifierStatus(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*abi.StoragePower, error) { - return s.Internal.StateVerifierStatus(p0, p1, p2) -} - -func (s *IChainInfoStruct) StateWaitMsg(p0 context.Context, p1 cid.Cid, p2 uint64) (*types.MsgLookup, error) { - return s.Internal.StateWaitMsg(p0, p1, p2) -} - -func (s *IChainInfoStruct) StateWaitMsgLimited(p0 context.Context, p1 cid.Cid, p2 uint64, p3 abi.ChainEpoch) (*types.MsgLookup, error) { - return s.Internal.StateWaitMsgLimited(p0, p1, p2, p3) -} - -func (s *IChainInfoStruct) VerifyEntry(p0 *types.BeaconEntry, p1 *types.BeaconEntry, p2 abi.ChainEpoch) bool { - return s.Internal.VerifyEntry(p0, p1, p2) -} - -type IJwtAuthAPIStruct struct { - Internal struct { - AuthNew func(p0 context.Context, p1 []auth.Permission) ([]byte, error) `perm:"admin"` - - Verify func(p0 context.Context, p1 string, p2 string) ([]auth.Permission, error) `perm:"read"` - } -} - -func (s *IJwtAuthAPIStruct) AuthNew(p0 context.Context, p1 []auth.Permission) ([]byte, error) { - return s.Internal.AuthNew(p0, p1) -} - -func (s *IJwtAuthAPIStruct) Verify(p0 context.Context, p1 string, p2 string) ([]auth.Permission, error) { - return s.Internal.Verify(p0, p1, p2) -} - -type IMarketStruct struct { - Internal struct { - StateMarketParticipants func(p0 context.Context, p1 types.TipSetKey) (map[string]types.MarketBalance, error) `perm:"read"` - } -} - -func (s *IMarketStruct) StateMarketParticipants(p0 context.Context, p1 types.TipSetKey) (map[string]types.MarketBalance, error) { - return s.Internal.StateMarketParticipants(p0, p1) -} - -type IMessagePoolStruct struct { - Internal struct { - GasBatchEstimateMessageGas func(p0 context.Context, p1 []*types.EstimateMessage, p2 uint64, p3 types.TipSetKey) ([]*types.EstimateResult, error) `perm:"read"` - - GasEstimateFeeCap func(p0 context.Context, p1 *types.Message, p2 int64, p3 types.TipSetKey) (big.Int, error) `perm:"read"` - - GasEstimateGasLimit func(p0 context.Context, p1 *types.Message, p2 types.TipSetKey) (int64, error) `perm:"read"` - - GasEstimateGasPremium func(p0 context.Context, p1 uint64, p2 address.Address, p3 int64, p4 types.TipSetKey) (big.Int, error) `perm:"read"` - - GasEstimateMessageGas func(p0 context.Context, p1 *types.Message, p2 *types.MessageSendSpec, p3 types.TipSetKey) (*types.Message, error) `perm:"read"` - - MpoolBatchPush func(p0 context.Context, p1 []*types.SignedMessage) ([]cid.Cid, error) `perm:"write"` - - MpoolBatchPushMessage func(p0 context.Context, p1 []*types.Message, p2 *types.MessageSendSpec) ([]*types.SignedMessage, error) `perm:"sign"` - - MpoolBatchPushUntrusted func(p0 context.Context, p1 []*types.SignedMessage) ([]cid.Cid, error) `perm:"write"` - - MpoolClear func(p0 context.Context, p1 bool) error `perm:"write"` - - MpoolDeleteByAdress func(p0 context.Context, p1 address.Address) error `perm:"admin"` - - MpoolGetConfig func(p0 context.Context) (*types.MpoolConfig, error) `perm:"read"` - - MpoolGetNonce func(p0 context.Context, p1 address.Address) (uint64, error) `perm:"read"` - - MpoolPending func(p0 context.Context, p1 types.TipSetKey) ([]*types.SignedMessage, error) `perm:"read"` - - MpoolPublishByAddr func(p0 context.Context, p1 address.Address) error `perm:"admin"` - - MpoolPublishMessage func(p0 context.Context, p1 *types.SignedMessage) error `perm:"admin"` - - MpoolPush func(p0 context.Context, p1 *types.SignedMessage) (cid.Cid, error) `perm:"write"` - - MpoolPushMessage func(p0 context.Context, p1 *types.Message, p2 *types.MessageSendSpec) (*types.SignedMessage, error) `perm:"sign"` - - MpoolPushUntrusted func(p0 context.Context, p1 *types.SignedMessage) (cid.Cid, error) `perm:"write"` - - MpoolSelect func(p0 context.Context, p1 types.TipSetKey, p2 float64) ([]*types.SignedMessage, error) `perm:"read"` - - MpoolSelects func(p0 context.Context, p1 types.TipSetKey, p2 []float64) ([][]*types.SignedMessage, error) `perm:"read"` - - MpoolSetConfig func(p0 context.Context, p1 *types.MpoolConfig) error `perm:"admin"` - - MpoolSub func(p0 context.Context) (<-chan types.MpoolUpdate, error) `perm:"read"` - } -} - -func (s *IMessagePoolStruct) GasBatchEstimateMessageGas(p0 context.Context, p1 []*types.EstimateMessage, p2 uint64, p3 types.TipSetKey) ([]*types.EstimateResult, error) { - return s.Internal.GasBatchEstimateMessageGas(p0, p1, p2, p3) -} - -func (s *IMessagePoolStruct) GasEstimateFeeCap(p0 context.Context, p1 *types.Message, p2 int64, p3 types.TipSetKey) (big.Int, error) { - return s.Internal.GasEstimateFeeCap(p0, p1, p2, p3) -} - -func (s *IMessagePoolStruct) GasEstimateGasLimit(p0 context.Context, p1 *types.Message, p2 types.TipSetKey) (int64, error) { - return s.Internal.GasEstimateGasLimit(p0, p1, p2) -} - -func (s *IMessagePoolStruct) GasEstimateGasPremium(p0 context.Context, p1 uint64, p2 address.Address, p3 int64, p4 types.TipSetKey) (big.Int, error) { - return s.Internal.GasEstimateGasPremium(p0, p1, p2, p3, p4) -} - -func (s *IMessagePoolStruct) GasEstimateMessageGas(p0 context.Context, p1 *types.Message, p2 *types.MessageSendSpec, p3 types.TipSetKey) (*types.Message, error) { - return s.Internal.GasEstimateMessageGas(p0, p1, p2, p3) -} - -func (s *IMessagePoolStruct) MpoolBatchPush(p0 context.Context, p1 []*types.SignedMessage) ([]cid.Cid, error) { - return s.Internal.MpoolBatchPush(p0, p1) -} - -func (s *IMessagePoolStruct) MpoolBatchPushMessage(p0 context.Context, p1 []*types.Message, p2 *types.MessageSendSpec) ([]*types.SignedMessage, error) { - return s.Internal.MpoolBatchPushMessage(p0, p1, p2) -} - -func (s *IMessagePoolStruct) MpoolBatchPushUntrusted(p0 context.Context, p1 []*types.SignedMessage) ([]cid.Cid, error) { - return s.Internal.MpoolBatchPushUntrusted(p0, p1) -} - -func (s *IMessagePoolStruct) MpoolClear(p0 context.Context, p1 bool) error { - return s.Internal.MpoolClear(p0, p1) -} - -func (s *IMessagePoolStruct) MpoolDeleteByAdress(p0 context.Context, p1 address.Address) error { - return s.Internal.MpoolDeleteByAdress(p0, p1) -} - -func (s *IMessagePoolStruct) MpoolGetConfig(p0 context.Context) (*types.MpoolConfig, error) { - return s.Internal.MpoolGetConfig(p0) -} - -func (s *IMessagePoolStruct) MpoolGetNonce(p0 context.Context, p1 address.Address) (uint64, error) { - return s.Internal.MpoolGetNonce(p0, p1) -} - -func (s *IMessagePoolStruct) MpoolPending(p0 context.Context, p1 types.TipSetKey) ([]*types.SignedMessage, error) { - return s.Internal.MpoolPending(p0, p1) -} - -func (s *IMessagePoolStruct) MpoolPublishByAddr(p0 context.Context, p1 address.Address) error { - return s.Internal.MpoolPublishByAddr(p0, p1) -} - -func (s *IMessagePoolStruct) MpoolPublishMessage(p0 context.Context, p1 *types.SignedMessage) error { - return s.Internal.MpoolPublishMessage(p0, p1) -} - -func (s *IMessagePoolStruct) MpoolPush(p0 context.Context, p1 *types.SignedMessage) (cid.Cid, error) { - return s.Internal.MpoolPush(p0, p1) -} - -func (s *IMessagePoolStruct) MpoolPushMessage(p0 context.Context, p1 *types.Message, p2 *types.MessageSendSpec) (*types.SignedMessage, error) { - return s.Internal.MpoolPushMessage(p0, p1, p2) -} - -func (s *IMessagePoolStruct) MpoolPushUntrusted(p0 context.Context, p1 *types.SignedMessage) (cid.Cid, error) { - return s.Internal.MpoolPushUntrusted(p0, p1) -} - -func (s *IMessagePoolStruct) MpoolSelect(p0 context.Context, p1 types.TipSetKey, p2 float64) ([]*types.SignedMessage, error) { - return s.Internal.MpoolSelect(p0, p1, p2) -} - -func (s *IMessagePoolStruct) MpoolSelects(p0 context.Context, p1 types.TipSetKey, p2 []float64) ([][]*types.SignedMessage, error) { - return s.Internal.MpoolSelects(p0, p1, p2) -} - -func (s *IMessagePoolStruct) MpoolSetConfig(p0 context.Context, p1 *types.MpoolConfig) error { - return s.Internal.MpoolSetConfig(p0, p1) -} - -func (s *IMessagePoolStruct) MpoolSub(p0 context.Context) (<-chan types.MpoolUpdate, error) { - return s.Internal.MpoolSub(p0) -} - -type IMinerStateStruct struct { - Internal struct { - StateCirculatingSupply func(p0 context.Context, p1 types.TipSetKey) (abi.TokenAmount, error) `perm:"read"` - - StateDealProviderCollateralBounds func(p0 context.Context, p1 abi.PaddedPieceSize, p2 bool, p3 types.TipSetKey) (types.DealCollateralBounds, error) `perm:"read"` - - StateListActors func(p0 context.Context, p1 types.TipSetKey) ([]address.Address, error) `perm:"read"` - - StateListMiners func(p0 context.Context, p1 types.TipSetKey) ([]address.Address, error) `perm:"read"` - - StateLookupID func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (address.Address, error) `perm:"read"` - - StateMarketBalance func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (types.MarketBalance, error) `perm:"read"` - - StateMarketDeals func(p0 context.Context, p1 types.TipSetKey) (map[string]types.MarketDeal, error) `perm:"read"` - - StateMarketStorageDeal func(p0 context.Context, p1 abi.DealID, p2 types.TipSetKey) (*types.MarketDeal, error) `perm:"read"` - - StateMinerActiveSectors func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) ([]*miner.SectorOnChainInfo, error) `perm:"read"` - - StateMinerAvailableBalance func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (big.Int, error) `perm:"read"` - - StateMinerDeadlines func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) ([]types.Deadline, error) `perm:"read"` - - StateMinerFaults func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (bitfield.BitField, error) `perm:"read"` - - StateMinerInfo func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (miner.MinerInfo, error) `perm:"read"` - - StateMinerInitialPledgeCollateral func(p0 context.Context, p1 address.Address, p2 miner.SectorPreCommitInfo, p3 types.TipSetKey) (big.Int, error) `perm:"read"` - - StateMinerPartitions func(p0 context.Context, p1 address.Address, p2 uint64, p3 types.TipSetKey) ([]types.Partition, error) `perm:"read"` - - StateMinerPower func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*types.MinerPower, error) `perm:"read"` - - StateMinerPreCommitDepositForPower func(p0 context.Context, p1 address.Address, p2 miner.SectorPreCommitInfo, p3 types.TipSetKey) (big.Int, error) `perm:"read"` - - StateMinerProvingDeadline func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*dline.Info, error) `perm:"read"` - - StateMinerRecoveries func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (bitfield.BitField, error) `perm:"read"` - - StateMinerSectorAllocated func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (bool, error) `perm:"read"` - - StateMinerSectorCount func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (types.MinerSectors, error) `perm:"read"` - - StateMinerSectorSize func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (abi.SectorSize, error) `perm:"read"` - - StateMinerSectors func(p0 context.Context, p1 address.Address, p2 *bitfield.BitField, p3 types.TipSetKey) ([]*miner.SectorOnChainInfo, error) `perm:"read"` - - StateMinerWorkerAddress func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (address.Address, error) `perm:"read"` - - StateSectorExpiration func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorExpiration, error) `perm:"read"` - - StateSectorGetInfo func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorOnChainInfo, error) `perm:"read"` - - StateSectorPartition func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorLocation, error) `perm:"read"` - - StateSectorPreCommitInfo func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (miner.SectorPreCommitOnChainInfo, error) `perm:"read"` - - StateVMCirculatingSupplyInternal func(p0 context.Context, p1 types.TipSetKey) (types.CirculatingSupply, error) `perm:"read"` - - StateVerifiedClientStatus func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*abi.StoragePower, error) `perm:"read"` - } -} - -func (s *IMinerStateStruct) StateCirculatingSupply(p0 context.Context, p1 types.TipSetKey) (abi.TokenAmount, error) { - return s.Internal.StateCirculatingSupply(p0, p1) -} - -func (s *IMinerStateStruct) StateDealProviderCollateralBounds(p0 context.Context, p1 abi.PaddedPieceSize, p2 bool, p3 types.TipSetKey) (types.DealCollateralBounds, error) { - return s.Internal.StateDealProviderCollateralBounds(p0, p1, p2, p3) -} - -func (s *IMinerStateStruct) StateListActors(p0 context.Context, p1 types.TipSetKey) ([]address.Address, error) { - return s.Internal.StateListActors(p0, p1) -} - -func (s *IMinerStateStruct) StateListMiners(p0 context.Context, p1 types.TipSetKey) ([]address.Address, error) { - return s.Internal.StateListMiners(p0, p1) -} - -func (s *IMinerStateStruct) StateLookupID(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (address.Address, error) { - return s.Internal.StateLookupID(p0, p1, p2) -} - -func (s *IMinerStateStruct) StateMarketBalance(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (types.MarketBalance, error) { - return s.Internal.StateMarketBalance(p0, p1, p2) -} - -func (s *IMinerStateStruct) StateMarketDeals(p0 context.Context, p1 types.TipSetKey) (map[string]types.MarketDeal, error) { - return s.Internal.StateMarketDeals(p0, p1) -} - -func (s *IMinerStateStruct) StateMarketStorageDeal(p0 context.Context, p1 abi.DealID, p2 types.TipSetKey) (*types.MarketDeal, error) { - return s.Internal.StateMarketStorageDeal(p0, p1, p2) -} - -func (s *IMinerStateStruct) StateMinerActiveSectors(p0 context.Context, p1 address.Address, p2 types.TipSetKey) ([]*miner.SectorOnChainInfo, error) { - return s.Internal.StateMinerActiveSectors(p0, p1, p2) -} - -func (s *IMinerStateStruct) StateMinerAvailableBalance(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (big.Int, error) { - return s.Internal.StateMinerAvailableBalance(p0, p1, p2) -} - -func (s *IMinerStateStruct) StateMinerDeadlines(p0 context.Context, p1 address.Address, p2 types.TipSetKey) ([]types.Deadline, error) { - return s.Internal.StateMinerDeadlines(p0, p1, p2) -} - -func (s *IMinerStateStruct) StateMinerFaults(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (bitfield.BitField, error) { - return s.Internal.StateMinerFaults(p0, p1, p2) -} - -func (s *IMinerStateStruct) StateMinerInfo(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (miner.MinerInfo, error) { - return s.Internal.StateMinerInfo(p0, p1, p2) -} - -func (s *IMinerStateStruct) StateMinerInitialPledgeCollateral(p0 context.Context, p1 address.Address, p2 miner.SectorPreCommitInfo, p3 types.TipSetKey) (big.Int, error) { - return s.Internal.StateMinerInitialPledgeCollateral(p0, p1, p2, p3) -} - -func (s *IMinerStateStruct) StateMinerPartitions(p0 context.Context, p1 address.Address, p2 uint64, p3 types.TipSetKey) ([]types.Partition, error) { - return s.Internal.StateMinerPartitions(p0, p1, p2, p3) -} - -func (s *IMinerStateStruct) StateMinerPower(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*types.MinerPower, error) { - return s.Internal.StateMinerPower(p0, p1, p2) -} - -func (s *IMinerStateStruct) StateMinerPreCommitDepositForPower(p0 context.Context, p1 address.Address, p2 miner.SectorPreCommitInfo, p3 types.TipSetKey) (big.Int, error) { - return s.Internal.StateMinerPreCommitDepositForPower(p0, p1, p2, p3) -} - -func (s *IMinerStateStruct) StateMinerProvingDeadline(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*dline.Info, error) { - return s.Internal.StateMinerProvingDeadline(p0, p1, p2) -} - -func (s *IMinerStateStruct) StateMinerRecoveries(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (bitfield.BitField, error) { - return s.Internal.StateMinerRecoveries(p0, p1, p2) -} - -func (s *IMinerStateStruct) StateMinerSectorAllocated(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (bool, error) { - return s.Internal.StateMinerSectorAllocated(p0, p1, p2, p3) -} - -func (s *IMinerStateStruct) StateMinerSectorCount(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (types.MinerSectors, error) { - return s.Internal.StateMinerSectorCount(p0, p1, p2) -} - -func (s *IMinerStateStruct) StateMinerSectorSize(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (abi.SectorSize, error) { - return s.Internal.StateMinerSectorSize(p0, p1, p2) +func (s *IChainInfoStruct) StateSearchMsgLimited(p0 context.Context, p1 cid.Cid, p2 abi.ChainEpoch) (*types.MsgLookup, error) { + return s.Internal.StateSearchMsgLimited(p0, p1, p2) } - -func (s *IMinerStateStruct) StateMinerSectors(p0 context.Context, p1 address.Address, p2 *bitfield.BitField, p3 types.TipSetKey) ([]*miner.SectorOnChainInfo, error) { - return s.Internal.StateMinerSectors(p0, p1, p2, p3) +func (s *IChainInfoStruct) StateVerifiedRegistryRootKey(p0 context.Context, p1 types.TipSetKey) (address.Address, error) { + return s.Internal.StateVerifiedRegistryRootKey(p0, p1) } - -func (s *IMinerStateStruct) StateMinerWorkerAddress(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (address.Address, error) { - return s.Internal.StateMinerWorkerAddress(p0, p1, p2) +func (s *IChainInfoStruct) StateVerifierStatus(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*abi.StoragePower, error) { + return s.Internal.StateVerifierStatus(p0, p1, p2) } - -func (s *IMinerStateStruct) StateSectorExpiration(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorExpiration, error) { - return s.Internal.StateSectorExpiration(p0, p1, p2, p3) +func (s *IChainInfoStruct) StateWaitMsg(p0 context.Context, p1 cid.Cid, p2 uint64) (*types.MsgLookup, error) { + return s.Internal.StateWaitMsg(p0, p1, p2) } - -func (s *IMinerStateStruct) StateSectorGetInfo(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorOnChainInfo, error) { - return s.Internal.StateSectorGetInfo(p0, p1, p2, p3) +func (s *IChainInfoStruct) StateWaitMsgLimited(p0 context.Context, p1 cid.Cid, p2 uint64, p3 abi.ChainEpoch) (*types.MsgLookup, error) { + return s.Internal.StateWaitMsgLimited(p0, p1, p2, p3) } - -func (s *IMinerStateStruct) StateSectorPartition(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorLocation, error) { - return s.Internal.StateSectorPartition(p0, p1, p2, p3) +func (s *IChainInfoStruct) VerifyEntry(p0, p1 *types.BeaconEntry, p2 abi.ChainEpoch) bool { + return s.Internal.VerifyEntry(p0, p1, p2) } -func (s *IMinerStateStruct) StateSectorPreCommitInfo(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (miner.SectorPreCommitOnChainInfo, error) { - return s.Internal.StateSectorPreCommitInfo(p0, p1, p2, p3) +type IChainStruct struct { + IAccountStruct + IActorStruct + IBeaconStruct + IMinerStateStruct + IChainInfoStruct } -func (s *IMinerStateStruct) StateVMCirculatingSupplyInternal(p0 context.Context, p1 types.TipSetKey) (types.CirculatingSupply, error) { - return s.Internal.StateVMCirculatingSupplyInternal(p0, p1) +type IMarketStruct struct { + Internal struct { + StateMarketParticipants func(ctx context.Context, tsk types.TipSetKey) (map[string]types.MarketBalance, error) `perm:"read"` + } } -func (s *IMinerStateStruct) StateVerifiedClientStatus(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*abi.StoragePower, error) { - return s.Internal.StateVerifiedClientStatus(p0, p1, p2) +func (s *IMarketStruct) StateMarketParticipants(p0 context.Context, p1 types.TipSetKey) (map[string]types.MarketBalance, error) { + return s.Internal.StateMarketParticipants(p0, p1) } type IMiningStruct struct { Internal struct { - MinerCreateBlock func(p0 context.Context, p1 *types.BlockTemplate) (*types.BlockMsg, error) `perm:"write"` - - MinerGetBaseInfo func(p0 context.Context, p1 address.Address, p2 abi.ChainEpoch, p3 types.TipSetKey) (*types.MiningBaseInfo, error) `perm:"read"` + MinerCreateBlock func(ctx context.Context, bt *types.BlockTemplate) (*types.BlockMsg, error) `perm:"write"` + MinerGetBaseInfo func(ctx context.Context, maddr address.Address, round abi.ChainEpoch, tsk types.TipSetKey) (*types.MiningBaseInfo, error) `perm:"read"` } } func (s *IMiningStruct) MinerCreateBlock(p0 context.Context, p1 *types.BlockTemplate) (*types.BlockMsg, error) { return s.Internal.MinerCreateBlock(p0, p1) } - func (s *IMiningStruct) MinerGetBaseInfo(p0 context.Context, p1 address.Address, p2 abi.ChainEpoch, p3 types.TipSetKey) (*types.MiningBaseInfo, error) { return s.Internal.MinerGetBaseInfo(p0, p1, p2, p3) } -type IMultiSigStruct struct { +type IMessagePoolStruct struct { Internal struct { - MsigAddApprove func(p0 context.Context, p1 address.Address, p2 address.Address, p3 uint64, p4 address.Address, p5 address.Address, p6 bool) (cid.Cid, error) `perm:"sign"` - - MsigAddCancel func(p0 context.Context, p1 address.Address, p2 address.Address, p3 uint64, p4 address.Address, p5 bool) (cid.Cid, error) `perm:"sign"` - - MsigAddPropose func(p0 context.Context, p1 address.Address, p2 address.Address, p3 address.Address, p4 bool) (cid.Cid, error) `perm:"sign"` - - MsigApprove func(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address) (cid.Cid, error) `perm:"sign"` - - MsigApproveTxnHash func(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address, p4 address.Address, p5 types.BigInt, p6 address.Address, p7 uint64, p8 []byte) (cid.Cid, error) `perm:"sign"` - - MsigCancel func(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address) (cid.Cid, error) `perm:"sign"` - - MsigCancelTxnHash func(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address, p4 types.BigInt, p5 address.Address, p6 uint64, p7 []byte) (cid.Cid, error) `perm:"sign"` - - MsigCreate func(p0 context.Context, p1 uint64, p2 []address.Address, p3 abi.ChainEpoch, p4 types.BigInt, p5 address.Address, p6 types.BigInt) (cid.Cid, error) `perm:"sign"` - - MsigGetVested func(p0 context.Context, p1 address.Address, p2 types.TipSetKey, p3 types.TipSetKey) (types.BigInt, error) `perm:"read"` - - MsigPropose func(p0 context.Context, p1 address.Address, p2 address.Address, p3 types.BigInt, p4 address.Address, p5 uint64, p6 []byte) (cid.Cid, error) `perm:"sign"` - - MsigRemoveSigner func(p0 context.Context, p1 address.Address, p2 address.Address, p3 address.Address, p4 bool) (cid.Cid, error) `perm:"sign"` - - MsigSwapApprove func(p0 context.Context, p1 address.Address, p2 address.Address, p3 uint64, p4 address.Address, p5 address.Address, p6 address.Address) (cid.Cid, error) `perm:"sign"` + GasBatchEstimateMessageGas func(ctx context.Context, estimateMessages []*types.EstimateMessage, fromNonce uint64, tsk types.TipSetKey) ([]*types.EstimateResult, error) `perm:"read"` + GasEstimateFeeCap func(ctx context.Context, msg *types.Message, maxqueueblks int64, tsk types.TipSetKey) (big.Int, error) `perm:"read"` + GasEstimateGasLimit func(ctx context.Context, msgIn *types.Message, tsk types.TipSetKey) (int64, error) `perm:"read"` + GasEstimateGasPremium func(ctx context.Context, nblocksincl uint64, sender address.Address, gaslimit int64, tsk types.TipSetKey) (big.Int, error) `perm:"read"` + GasEstimateMessageGas func(ctx context.Context, msg *types.Message, spec *types.MessageSendSpec, tsk types.TipSetKey) (*types.Message, error) `perm:"read"` + MpoolBatchPush func(ctx context.Context, smsgs []*types.SignedMessage) ([]cid.Cid, error) `perm:"write"` + MpoolBatchPushMessage func(ctx context.Context, msgs []*types.Message, spec *types.MessageSendSpec) ([]*types.SignedMessage, error) `perm:"sign"` + MpoolBatchPushUntrusted func(ctx context.Context, smsgs []*types.SignedMessage) ([]cid.Cid, error) `perm:"write"` + MpoolClear func(ctx context.Context, local bool) error `perm:"write"` + MpoolDeleteByAdress func(ctx context.Context, addr address.Address) error `perm:"admin"` + MpoolGetConfig func(context.Context) (*types.MpoolConfig, error) `perm:"read"` + MpoolGetNonce func(ctx context.Context, addr address.Address) (uint64, error) `perm:"read"` + MpoolPending func(ctx context.Context, tsk types.TipSetKey) ([]*types.SignedMessage, error) `perm:"read"` + MpoolPublishByAddr func(context.Context, address.Address) error `perm:"admin"` + MpoolPublishMessage func(ctx context.Context, smsg *types.SignedMessage) error `perm:"admin"` + MpoolPush func(ctx context.Context, smsg *types.SignedMessage) (cid.Cid, error) `perm:"write"` + MpoolPushMessage func(ctx context.Context, msg *types.Message, spec *types.MessageSendSpec) (*types.SignedMessage, error) `perm:"sign"` + MpoolPushUntrusted func(ctx context.Context, smsg *types.SignedMessage) (cid.Cid, error) `perm:"write"` + MpoolSelect func(context.Context, types.TipSetKey, float64) ([]*types.SignedMessage, error) `perm:"read"` + MpoolSelects func(context.Context, types.TipSetKey, []float64) ([][]*types.SignedMessage, error) `perm:"read"` + MpoolSetConfig func(ctx context.Context, cfg *types.MpoolConfig) error `perm:"admin"` + MpoolSub func(ctx context.Context) (<-chan types.MpoolUpdate, error) `perm:"read"` + } +} - MsigSwapCancel func(p0 context.Context, p1 address.Address, p2 address.Address, p3 uint64, p4 address.Address, p5 address.Address) (cid.Cid, error) `perm:"sign"` +func (s *IMessagePoolStruct) GasBatchEstimateMessageGas(p0 context.Context, p1 []*types.EstimateMessage, p2 uint64, p3 types.TipSetKey) ([]*types.EstimateResult, error) { + return s.Internal.GasBatchEstimateMessageGas(p0, p1, p2, p3) +} +func (s *IMessagePoolStruct) GasEstimateFeeCap(p0 context.Context, p1 *types.Message, p2 int64, p3 types.TipSetKey) (big.Int, error) { + return s.Internal.GasEstimateFeeCap(p0, p1, p2, p3) +} +func (s *IMessagePoolStruct) GasEstimateGasLimit(p0 context.Context, p1 *types.Message, p2 types.TipSetKey) (int64, error) { + return s.Internal.GasEstimateGasLimit(p0, p1, p2) +} +func (s *IMessagePoolStruct) GasEstimateGasPremium(p0 context.Context, p1 uint64, p2 address.Address, p3 int64, p4 types.TipSetKey) (big.Int, error) { + return s.Internal.GasEstimateGasPremium(p0, p1, p2, p3, p4) +} +func (s *IMessagePoolStruct) GasEstimateMessageGas(p0 context.Context, p1 *types.Message, p2 *types.MessageSendSpec, p3 types.TipSetKey) (*types.Message, error) { + return s.Internal.GasEstimateMessageGas(p0, p1, p2, p3) +} +func (s *IMessagePoolStruct) MpoolBatchPush(p0 context.Context, p1 []*types.SignedMessage) ([]cid.Cid, error) { + return s.Internal.MpoolBatchPush(p0, p1) +} +func (s *IMessagePoolStruct) MpoolBatchPushMessage(p0 context.Context, p1 []*types.Message, p2 *types.MessageSendSpec) ([]*types.SignedMessage, error) { + return s.Internal.MpoolBatchPushMessage(p0, p1, p2) +} +func (s *IMessagePoolStruct) MpoolBatchPushUntrusted(p0 context.Context, p1 []*types.SignedMessage) ([]cid.Cid, error) { + return s.Internal.MpoolBatchPushUntrusted(p0, p1) +} +func (s *IMessagePoolStruct) MpoolClear(p0 context.Context, p1 bool) error { + return s.Internal.MpoolClear(p0, p1) +} +func (s *IMessagePoolStruct) MpoolDeleteByAdress(p0 context.Context, p1 address.Address) error { + return s.Internal.MpoolDeleteByAdress(p0, p1) +} +func (s *IMessagePoolStruct) MpoolGetConfig(p0 context.Context) (*types.MpoolConfig, error) { + return s.Internal.MpoolGetConfig(p0) +} +func (s *IMessagePoolStruct) MpoolGetNonce(p0 context.Context, p1 address.Address) (uint64, error) { + return s.Internal.MpoolGetNonce(p0, p1) +} +func (s *IMessagePoolStruct) MpoolPending(p0 context.Context, p1 types.TipSetKey) ([]*types.SignedMessage, error) { + return s.Internal.MpoolPending(p0, p1) +} +func (s *IMessagePoolStruct) MpoolPublishByAddr(p0 context.Context, p1 address.Address) error { + return s.Internal.MpoolPublishByAddr(p0, p1) +} +func (s *IMessagePoolStruct) MpoolPublishMessage(p0 context.Context, p1 *types.SignedMessage) error { + return s.Internal.MpoolPublishMessage(p0, p1) +} +func (s *IMessagePoolStruct) MpoolPush(p0 context.Context, p1 *types.SignedMessage) (cid.Cid, error) { + return s.Internal.MpoolPush(p0, p1) +} +func (s *IMessagePoolStruct) MpoolPushMessage(p0 context.Context, p1 *types.Message, p2 *types.MessageSendSpec) (*types.SignedMessage, error) { + return s.Internal.MpoolPushMessage(p0, p1, p2) +} +func (s *IMessagePoolStruct) MpoolPushUntrusted(p0 context.Context, p1 *types.SignedMessage) (cid.Cid, error) { + return s.Internal.MpoolPushUntrusted(p0, p1) +} +func (s *IMessagePoolStruct) MpoolSelect(p0 context.Context, p1 types.TipSetKey, p2 float64) ([]*types.SignedMessage, error) { + return s.Internal.MpoolSelect(p0, p1, p2) +} +func (s *IMessagePoolStruct) MpoolSelects(p0 context.Context, p1 types.TipSetKey, p2 []float64) ([][]*types.SignedMessage, error) { + return s.Internal.MpoolSelects(p0, p1, p2) +} +func (s *IMessagePoolStruct) MpoolSetConfig(p0 context.Context, p1 *types.MpoolConfig) error { + return s.Internal.MpoolSetConfig(p0, p1) +} +func (s *IMessagePoolStruct) MpoolSub(p0 context.Context) (<-chan types.MpoolUpdate, error) { + return s.Internal.MpoolSub(p0) +} - MsigSwapPropose func(p0 context.Context, p1 address.Address, p2 address.Address, p3 address.Address, p4 address.Address) (cid.Cid, error) `perm:"sign"` +type IMultiSigStruct struct { + Internal struct { + MsigAddApprove func(ctx context.Context, msig address.Address, src address.Address, txID uint64, proposer address.Address, newAdd address.Address, inc bool) (cid.Cid, error) `perm:"sign"` + MsigAddCancel func(ctx context.Context, msig address.Address, src address.Address, txID uint64, newAdd address.Address, inc bool) (cid.Cid, error) `perm:"sign"` + MsigAddPropose func(ctx context.Context, msig address.Address, src address.Address, newAdd address.Address, inc bool) (cid.Cid, error) `perm:"sign"` + MsigApprove func(ctx context.Context, msig address.Address, txID uint64, src address.Address) (cid.Cid, error) `perm:"sign"` + MsigApproveTxnHash func(ctx context.Context, msig address.Address, txID uint64, proposer address.Address, to address.Address, amt types.BigInt, src address.Address, method uint64, params []byte) (cid.Cid, error) `perm:"sign"` + MsigCancel func(ctx context.Context, msig address.Address, txID uint64, src address.Address) (cid.Cid, error) `perm:"sign"` + MsigCancelTxnHash func(context.Context, address.Address, uint64, address.Address, types.BigInt, address.Address, uint64, []byte) (cid.Cid, error) `perm:"sign"` + MsigCreate func(context.Context, uint64, []address.Address, abi.ChainEpoch, types.BigInt, address.Address, types.BigInt) (cid.Cid, error) `perm:"sign"` + MsigGetVested func(ctx context.Context, addr address.Address, start types.TipSetKey, end types.TipSetKey) (types.BigInt, error) `perm:"read"` + MsigPropose func(ctx context.Context, msig address.Address, to address.Address, amt types.BigInt, src address.Address, method uint64, params []byte) (cid.Cid, error) `perm:"sign"` + MsigRemoveSigner func(ctx context.Context, msig address.Address, proposer address.Address, toRemove address.Address, decrease bool) (cid.Cid, error) `perm:"sign"` + MsigSwapApprove func(ctx context.Context, msig address.Address, src address.Address, txID uint64, proposer address.Address, oldAdd address.Address, newAdd address.Address) (cid.Cid, error) `perm:"sign"` + MsigSwapCancel func(ctx context.Context, msig address.Address, src address.Address, txID uint64, oldAdd address.Address, newAdd address.Address) (cid.Cid, error) `perm:"sign"` + MsigSwapPropose func(ctx context.Context, msig address.Address, src address.Address, oldAdd address.Address, newAdd address.Address) (cid.Cid, error) `perm:"sign"` } } func (s *IMultiSigStruct) MsigAddApprove(p0 context.Context, p1 address.Address, p2 address.Address, p3 uint64, p4 address.Address, p5 address.Address, p6 bool) (cid.Cid, error) { return s.Internal.MsigAddApprove(p0, p1, p2, p3, p4, p5, p6) } - func (s *IMultiSigStruct) MsigAddCancel(p0 context.Context, p1 address.Address, p2 address.Address, p3 uint64, p4 address.Address, p5 bool) (cid.Cid, error) { return s.Internal.MsigAddCancel(p0, p1, p2, p3, p4, p5) } - func (s *IMultiSigStruct) MsigAddPropose(p0 context.Context, p1 address.Address, p2 address.Address, p3 address.Address, p4 bool) (cid.Cid, error) { return s.Internal.MsigAddPropose(p0, p1, p2, p3, p4) } - func (s *IMultiSigStruct) MsigApprove(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address) (cid.Cid, error) { return s.Internal.MsigApprove(p0, p1, p2, p3) } - func (s *IMultiSigStruct) MsigApproveTxnHash(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address, p4 address.Address, p5 types.BigInt, p6 address.Address, p7 uint64, p8 []byte) (cid.Cid, error) { return s.Internal.MsigApproveTxnHash(p0, p1, p2, p3, p4, p5, p6, p7, p8) } - func (s *IMultiSigStruct) MsigCancel(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address) (cid.Cid, error) { return s.Internal.MsigCancel(p0, p1, p2, p3) } - func (s *IMultiSigStruct) MsigCancelTxnHash(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address, p4 types.BigInt, p5 address.Address, p6 uint64, p7 []byte) (cid.Cid, error) { return s.Internal.MsigCancelTxnHash(p0, p1, p2, p3, p4, p5, p6, p7) } - func (s *IMultiSigStruct) MsigCreate(p0 context.Context, p1 uint64, p2 []address.Address, p3 abi.ChainEpoch, p4 types.BigInt, p5 address.Address, p6 types.BigInt) (cid.Cid, error) { return s.Internal.MsigCreate(p0, p1, p2, p3, p4, p5, p6) } - func (s *IMultiSigStruct) MsigGetVested(p0 context.Context, p1 address.Address, p2 types.TipSetKey, p3 types.TipSetKey) (types.BigInt, error) { return s.Internal.MsigGetVested(p0, p1, p2, p3) } - func (s *IMultiSigStruct) MsigPropose(p0 context.Context, p1 address.Address, p2 address.Address, p3 types.BigInt, p4 address.Address, p5 uint64, p6 []byte) (cid.Cid, error) { return s.Internal.MsigPropose(p0, p1, p2, p3, p4, p5, p6) } - func (s *IMultiSigStruct) MsigRemoveSigner(p0 context.Context, p1 address.Address, p2 address.Address, p3 address.Address, p4 bool) (cid.Cid, error) { return s.Internal.MsigRemoveSigner(p0, p1, p2, p3, p4) } - func (s *IMultiSigStruct) MsigSwapApprove(p0 context.Context, p1 address.Address, p2 address.Address, p3 uint64, p4 address.Address, p5 address.Address, p6 address.Address) (cid.Cid, error) { return s.Internal.MsigSwapApprove(p0, p1, p2, p3, p4, p5, p6) } - func (s *IMultiSigStruct) MsigSwapCancel(p0 context.Context, p1 address.Address, p2 address.Address, p3 uint64, p4 address.Address, p5 address.Address) (cid.Cid, error) { return s.Internal.MsigSwapCancel(p0, p1, p2, p3, p4, p5) } - func (s *IMultiSigStruct) MsigSwapPropose(p0 context.Context, p1 address.Address, p2 address.Address, p3 address.Address, p4 address.Address) (cid.Cid, error) { return s.Internal.MsigSwapPropose(p0, p1, p2, p3, p4) } type INetworkStruct struct { Internal struct { - NetAddrsListen func(p0 context.Context) (peer.AddrInfo, error) `perm:"read"` - - NetworkConnect func(p0 context.Context, p1 []string) (<-chan types.ConnectionResult, error) `perm:"read"` - - NetworkFindPeer func(p0 context.Context, p1 peer.ID) (peer.AddrInfo, error) `perm:"read"` - - NetworkFindProvidersAsync func(p0 context.Context, p1 cid.Cid, p2 int) <-chan peer.AddrInfo `perm:"read"` - - NetworkGetBandwidthStats func(p0 context.Context) metrics.Stats `perm:"admin"` - - NetworkGetClosestPeers func(p0 context.Context, p1 string) ([]peer.ID, error) `perm:"read"` - - NetworkGetPeerAddresses func(p0 context.Context) []ma.Multiaddr `perm:"admin"` - - NetworkGetPeerID func(p0 context.Context) peer.ID `perm:"admin"` - - NetworkPeers func(p0 context.Context, p1 bool, p2 bool, p3 bool) (*types.SwarmConnInfos, error) `perm:"read"` - - Version func(p0 context.Context) (types.Version, error) `perm:"read"` + NetAddrsListen func(context.Context) (peer.AddrInfo, error) `perm:"read"` + NetworkConnect func(ctx context.Context, addrs []string) (<-chan types.ConnectionResult, error) `perm:"read"` + NetworkFindPeer func(ctx context.Context, peerID peer.ID) (peer.AddrInfo, error) `perm:"read"` + NetworkFindProvidersAsync func(ctx context.Context, key cid.Cid, count int) <-chan peer.AddrInfo `perm:"read"` + NetworkGetBandwidthStats func(ctx context.Context) metrics.Stats `perm:"admin"` + NetworkGetClosestPeers func(ctx context.Context, key string) ([]peer.ID, error) `perm:"read"` + NetworkGetPeerAddresses func(ctx context.Context) []ma.Multiaddr `perm:"admin"` + NetworkGetPeerID func(ctx context.Context) peer.ID `perm:"admin"` + NetworkPeers func(ctx context.Context, verbose, latency, streams bool) (*types.SwarmConnInfos, error) `perm:"read"` + Version func(context.Context) (types.Version, error) `perm:"read"` } } func (s *INetworkStruct) NetAddrsListen(p0 context.Context) (peer.AddrInfo, error) { return s.Internal.NetAddrsListen(p0) } - func (s *INetworkStruct) NetworkConnect(p0 context.Context, p1 []string) (<-chan types.ConnectionResult, error) { return s.Internal.NetworkConnect(p0, p1) } - func (s *INetworkStruct) NetworkFindPeer(p0 context.Context, p1 peer.ID) (peer.AddrInfo, error) { return s.Internal.NetworkFindPeer(p0, p1) } - func (s *INetworkStruct) NetworkFindProvidersAsync(p0 context.Context, p1 cid.Cid, p2 int) <-chan peer.AddrInfo { return s.Internal.NetworkFindProvidersAsync(p0, p1, p2) } - func (s *INetworkStruct) NetworkGetBandwidthStats(p0 context.Context) metrics.Stats { return s.Internal.NetworkGetBandwidthStats(p0) } - func (s *INetworkStruct) NetworkGetClosestPeers(p0 context.Context, p1 string) ([]peer.ID, error) { return s.Internal.NetworkGetClosestPeers(p0, p1) } - func (s *INetworkStruct) NetworkGetPeerAddresses(p0 context.Context) []ma.Multiaddr { return s.Internal.NetworkGetPeerAddresses(p0) } - func (s *INetworkStruct) NetworkGetPeerID(p0 context.Context) peer.ID { return s.Internal.NetworkGetPeerID(p0) } - -func (s *INetworkStruct) NetworkPeers(p0 context.Context, p1 bool, p2 bool, p3 bool) (*types.SwarmConnInfos, error) { +func (s *INetworkStruct) NetworkPeers(p0 context.Context, p1, p2, p3 bool) (*types.SwarmConnInfos, error) { return s.Internal.NetworkPeers(p0, p1, p2, p3) } - func (s *INetworkStruct) Version(p0 context.Context) (types.Version, error) { return s.Internal.Version(p0) } type IPaychanStruct struct { Internal struct { - PaychAllocateLane func(p0 context.Context, p1 address.Address) (uint64, error) `perm:"sign"` - - PaychAvailableFunds func(p0 context.Context, p1 address.Address) (*types.ChannelAvailableFunds, error) `perm:"sign"` - - PaychAvailableFundsByFromTo func(p0 context.Context, p1 address.Address, p2 address.Address) (*types.ChannelAvailableFunds, error) `perm:"sign"` - - PaychCollect func(p0 context.Context, p1 address.Address) (cid.Cid, error) `perm:"sign"` - - PaychGet func(p0 context.Context, p1 address.Address, p2 address.Address, p3 big.Int) (*types.ChannelInfo, error) `perm:"sign"` - - PaychGetWaitReady func(p0 context.Context, p1 cid.Cid) (address.Address, error) `perm:"sign"` - - PaychList func(p0 context.Context) ([]address.Address, error) `perm:"read"` - - PaychNewPayment func(p0 context.Context, p1 address.Address, p2 address.Address, p3 []types.VoucherSpec) (*types.PaymentInfo, error) `perm:"sign"` - - PaychSettle func(p0 context.Context, p1 address.Address) (cid.Cid, error) `perm:"sign"` - - PaychStatus func(p0 context.Context, p1 address.Address) (*types.Status, error) `perm:"read"` - - PaychVoucherAdd func(p0 context.Context, p1 address.Address, p2 *types.SignedVoucher, p3 []byte, p4 big.Int) (big.Int, error) `perm:"write"` - - PaychVoucherCheckSpendable func(p0 context.Context, p1 address.Address, p2 *types.SignedVoucher, p3 []byte, p4 []byte) (bool, error) `perm:"read"` - - PaychVoucherCheckValid func(p0 context.Context, p1 address.Address, p2 *types.SignedVoucher) error `perm:"read"` - - PaychVoucherCreate func(p0 context.Context, p1 address.Address, p2 big.Int, p3 uint64) (*types.VoucherCreateResult, error) `perm:"sign"` - - PaychVoucherList func(p0 context.Context, p1 address.Address) ([]*types.SignedVoucher, error) `perm:"write"` - - PaychVoucherSubmit func(p0 context.Context, p1 address.Address, p2 *types.SignedVoucher, p3 []byte, p4 []byte) (cid.Cid, error) `perm:"sign"` + PaychAllocateLane func(ctx context.Context, ch address.Address) (uint64, error) `perm:"sign"` + PaychAvailableFunds func(ctx context.Context, ch address.Address) (*types.ChannelAvailableFunds, error) `perm:"sign"` + PaychAvailableFundsByFromTo func(ctx context.Context, from, to address.Address) (*types.ChannelAvailableFunds, error) `perm:"sign"` + PaychCollect func(ctx context.Context, addr address.Address) (cid.Cid, error) `perm:"sign"` + PaychGet func(ctx context.Context, from, to address.Address, amt big.Int) (*types.ChannelInfo, error) `perm:"sign"` + PaychGetWaitReady func(ctx context.Context, sentinel cid.Cid) (address.Address, error) `perm:"sign"` + PaychList func(ctx context.Context) ([]address.Address, error) `perm:"read"` + PaychNewPayment func(ctx context.Context, from, to address.Address, vouchers []types.VoucherSpec) (*types.PaymentInfo, error) `perm:"sign"` + PaychSettle func(ctx context.Context, addr address.Address) (cid.Cid, error) `perm:"sign"` + PaychStatus func(ctx context.Context, pch address.Address) (*types.Status, error) `perm:"read"` + PaychVoucherAdd func(ctx context.Context, ch address.Address, sv *types.SignedVoucher, proof []byte, minDelta big.Int) (big.Int, error) `perm:"write"` + PaychVoucherCheckSpendable func(ctx context.Context, ch address.Address, sv *types.SignedVoucher, secret []byte, proof []byte) (bool, error) `perm:"read"` + PaychVoucherCheckValid func(ctx context.Context, ch address.Address, sv *types.SignedVoucher) error `perm:"read"` + PaychVoucherCreate func(ctx context.Context, pch address.Address, amt big.Int, lane uint64) (*types.VoucherCreateResult, error) `perm:"sign"` + PaychVoucherList func(ctx context.Context, pch address.Address) ([]*types.SignedVoucher, error) `perm:"write"` + PaychVoucherSubmit func(ctx context.Context, ch address.Address, sv *types.SignedVoucher, secret []byte, proof []byte) (cid.Cid, error) `perm:"sign"` } } func (s *IPaychanStruct) PaychAllocateLane(p0 context.Context, p1 address.Address) (uint64, error) { return s.Internal.PaychAllocateLane(p0, p1) } - func (s *IPaychanStruct) PaychAvailableFunds(p0 context.Context, p1 address.Address) (*types.ChannelAvailableFunds, error) { return s.Internal.PaychAvailableFunds(p0, p1) } - -func (s *IPaychanStruct) PaychAvailableFundsByFromTo(p0 context.Context, p1 address.Address, p2 address.Address) (*types.ChannelAvailableFunds, error) { +func (s *IPaychanStruct) PaychAvailableFundsByFromTo(p0 context.Context, p1, p2 address.Address) (*types.ChannelAvailableFunds, error) { return s.Internal.PaychAvailableFundsByFromTo(p0, p1, p2) } - func (s *IPaychanStruct) PaychCollect(p0 context.Context, p1 address.Address) (cid.Cid, error) { return s.Internal.PaychCollect(p0, p1) } - -func (s *IPaychanStruct) PaychGet(p0 context.Context, p1 address.Address, p2 address.Address, p3 big.Int) (*types.ChannelInfo, error) { +func (s *IPaychanStruct) PaychGet(p0 context.Context, p1, p2 address.Address, p3 big.Int) (*types.ChannelInfo, error) { return s.Internal.PaychGet(p0, p1, p2, p3) } - func (s *IPaychanStruct) PaychGetWaitReady(p0 context.Context, p1 cid.Cid) (address.Address, error) { return s.Internal.PaychGetWaitReady(p0, p1) } - func (s *IPaychanStruct) PaychList(p0 context.Context) ([]address.Address, error) { return s.Internal.PaychList(p0) } - -func (s *IPaychanStruct) PaychNewPayment(p0 context.Context, p1 address.Address, p2 address.Address, p3 []types.VoucherSpec) (*types.PaymentInfo, error) { +func (s *IPaychanStruct) PaychNewPayment(p0 context.Context, p1, p2 address.Address, p3 []types.VoucherSpec) (*types.PaymentInfo, error) { return s.Internal.PaychNewPayment(p0, p1, p2, p3) } - func (s *IPaychanStruct) PaychSettle(p0 context.Context, p1 address.Address) (cid.Cid, error) { return s.Internal.PaychSettle(p0, p1) } - func (s *IPaychanStruct) PaychStatus(p0 context.Context, p1 address.Address) (*types.Status, error) { return s.Internal.PaychStatus(p0, p1) } - func (s *IPaychanStruct) PaychVoucherAdd(p0 context.Context, p1 address.Address, p2 *types.SignedVoucher, p3 []byte, p4 big.Int) (big.Int, error) { return s.Internal.PaychVoucherAdd(p0, p1, p2, p3, p4) } - func (s *IPaychanStruct) PaychVoucherCheckSpendable(p0 context.Context, p1 address.Address, p2 *types.SignedVoucher, p3 []byte, p4 []byte) (bool, error) { return s.Internal.PaychVoucherCheckSpendable(p0, p1, p2, p3, p4) } - func (s *IPaychanStruct) PaychVoucherCheckValid(p0 context.Context, p1 address.Address, p2 *types.SignedVoucher) error { return s.Internal.PaychVoucherCheckValid(p0, p1, p2) } - func (s *IPaychanStruct) PaychVoucherCreate(p0 context.Context, p1 address.Address, p2 big.Int, p3 uint64) (*types.VoucherCreateResult, error) { return s.Internal.PaychVoucherCreate(p0, p1, p2, p3) } - func (s *IPaychanStruct) PaychVoucherList(p0 context.Context, p1 address.Address) ([]*types.SignedVoucher, error) { return s.Internal.PaychVoucherList(p0, p1) } - func (s *IPaychanStruct) PaychVoucherSubmit(p0 context.Context, p1 address.Address, p2 *types.SignedVoucher, p3 []byte, p4 []byte) (cid.Cid, error) { return s.Internal.PaychVoucherSubmit(p0, p1, p2, p3, p4) } type ISyncerStruct struct { Internal struct { - ChainSyncHandleNewTipSet func(p0 context.Context, p1 *types.ChainInfo) error `perm:"write"` - - ChainTipSetWeight func(p0 context.Context, p1 types.TipSetKey) (big.Int, error) `perm:"read"` - - Concurrent func(p0 context.Context) int64 `perm:"read"` - - SetConcurrent func(p0 context.Context, p1 int64) error `perm:"admin"` - - StateCall func(p0 context.Context, p1 *types.Message, p2 types.TipSetKey) (*types.InvocResult, error) `perm:"read"` - - SyncState func(p0 context.Context) (*types.SyncState, error) `perm:"read"` - - SyncSubmitBlock func(p0 context.Context, p1 *types.BlockMsg) error `perm:"write"` - - SyncerTracker func(p0 context.Context) *types.TargetTracker `perm:"read"` + ChainSyncHandleNewTipSet func(ctx context.Context, ci *types.ChainInfo) error `perm:"write"` + ChainTipSetWeight func(ctx context.Context, tsk types.TipSetKey) (big.Int, error) `perm:"read"` + Concurrent func(ctx context.Context) int64 `perm:"read"` + SetConcurrent func(ctx context.Context, concurrent int64) error `perm:"admin"` + StateCall func(ctx context.Context, msg *types.Message, tsk types.TipSetKey) (*types.InvocResult, error) `perm:"read"` + SyncState func(ctx context.Context) (*types.SyncState, error) `perm:"read"` + SyncSubmitBlock func(ctx context.Context, blk *types.BlockMsg) error `perm:"write"` + SyncerTracker func(ctx context.Context) *types.TargetTracker `perm:"read"` } } func (s *ISyncerStruct) ChainSyncHandleNewTipSet(p0 context.Context, p1 *types.ChainInfo) error { return s.Internal.ChainSyncHandleNewTipSet(p0, p1) } - func (s *ISyncerStruct) ChainTipSetWeight(p0 context.Context, p1 types.TipSetKey) (big.Int, error) { return s.Internal.ChainTipSetWeight(p0, p1) } - -func (s *ISyncerStruct) Concurrent(p0 context.Context) int64 { - return s.Internal.Concurrent(p0) -} - +func (s *ISyncerStruct) Concurrent(p0 context.Context) int64 { return s.Internal.Concurrent(p0) } func (s *ISyncerStruct) SetConcurrent(p0 context.Context, p1 int64) error { return s.Internal.SetConcurrent(p0, p1) } - func (s *ISyncerStruct) StateCall(p0 context.Context, p1 *types.Message, p2 types.TipSetKey) (*types.InvocResult, error) { return s.Internal.StateCall(p0, p1, p2) } - func (s *ISyncerStruct) SyncState(p0 context.Context) (*types.SyncState, error) { return s.Internal.SyncState(p0) } - func (s *ISyncerStruct) SyncSubmitBlock(p0 context.Context, p1 *types.BlockMsg) error { return s.Internal.SyncSubmitBlock(p0, p1) } - func (s *ISyncerStruct) SyncerTracker(p0 context.Context) *types.TargetTracker { return s.Internal.SyncerTracker(p0) } type IWalletStruct struct { Internal struct { - HasPassword func(p0 context.Context) bool `perm:"admin"` - - LockWallet func(p0 context.Context) error `perm:"admin"` - - SetPassword func(p0 context.Context, p1 []byte) error `perm:"admin"` - - UnLockWallet func(p0 context.Context, p1 []byte) error `perm:"admin"` - - WalletAddresses func(p0 context.Context) []address.Address `perm:"admin"` - - WalletBalance func(p0 context.Context, p1 address.Address) (abi.TokenAmount, error) `perm:"read"` - - WalletDefaultAddress func(p0 context.Context) (address.Address, error) `perm:"write"` - - WalletExport func(p0 context.Context, p1 address.Address, p2 string) (*types.KeyInfo, error) `perm:"admin"` - - WalletHas func(p0 context.Context, p1 address.Address) (bool, error) `perm:"write"` - - WalletImport func(p0 context.Context, p1 *types.KeyInfo) (address.Address, error) `perm:"admin"` - - WalletNewAddress func(p0 context.Context, p1 address.Protocol) (address.Address, error) `perm:"write"` - - WalletSetDefault func(p0 context.Context, p1 address.Address) error `perm:"write"` - - WalletSign func(p0 context.Context, p1 address.Address, p2 []byte, p3 types.MsgMeta) (*crypto.Signature, error) `perm:"sign"` - - WalletSignMessage func(p0 context.Context, p1 address.Address, p2 *types.Message) (*types.SignedMessage, error) `perm:"sign"` - - WalletState func(p0 context.Context) int `perm:"admin"` + HasPassword func(ctx context.Context) bool `perm:"admin"` + LockWallet func(ctx context.Context) error `perm:"admin"` + SetPassword func(ctx context.Context, password []byte) error `perm:"admin"` + UnLockWallet func(ctx context.Context, password []byte) error `perm:"admin"` + WalletAddresses func(ctx context.Context) []address.Address `perm:"admin"` + WalletBalance func(ctx context.Context, addr address.Address) (abi.TokenAmount, error) `perm:"read"` + WalletDefaultAddress func(ctx context.Context) (address.Address, error) `perm:"write"` + WalletExport func(ctx context.Context, addr address.Address, password string) (*types.KeyInfo, error) `perm:"admin"` + WalletHas func(ctx context.Context, addr address.Address) (bool, error) `perm:"write"` + WalletImport func(ctx context.Context, key *types.KeyInfo) (address.Address, error) `perm:"admin"` + WalletNewAddress func(ctx context.Context, protocol address.Protocol) (address.Address, error) `perm:"write"` + WalletSetDefault func(ctx context.Context, addr address.Address) error `perm:"write"` + WalletSign func(ctx context.Context, k address.Address, msg []byte, meta types.MsgMeta) (*crypto.Signature, error) `perm:"sign"` + WalletSignMessage func(ctx context.Context, k address.Address, msg *types.Message) (*types.SignedMessage, error) `perm:"sign"` + WalletState func(ctx context.Context) int `perm:"admin"` } } -func (s *IWalletStruct) HasPassword(p0 context.Context) bool { - return s.Internal.HasPassword(p0) -} - -func (s *IWalletStruct) LockWallet(p0 context.Context) error { - return s.Internal.LockWallet(p0) -} - +func (s *IWalletStruct) HasPassword(p0 context.Context) bool { return s.Internal.HasPassword(p0) } +func (s *IWalletStruct) LockWallet(p0 context.Context) error { return s.Internal.LockWallet(p0) } func (s *IWalletStruct) SetPassword(p0 context.Context, p1 []byte) error { return s.Internal.SetPassword(p0, p1) } - func (s *IWalletStruct) UnLockWallet(p0 context.Context, p1 []byte) error { return s.Internal.UnLockWallet(p0, p1) } - func (s *IWalletStruct) WalletAddresses(p0 context.Context) []address.Address { return s.Internal.WalletAddresses(p0) } - func (s *IWalletStruct) WalletBalance(p0 context.Context, p1 address.Address) (abi.TokenAmount, error) { return s.Internal.WalletBalance(p0, p1) } - func (s *IWalletStruct) WalletDefaultAddress(p0 context.Context) (address.Address, error) { return s.Internal.WalletDefaultAddress(p0) } - func (s *IWalletStruct) WalletExport(p0 context.Context, p1 address.Address, p2 string) (*types.KeyInfo, error) { return s.Internal.WalletExport(p0, p1, p2) } - func (s *IWalletStruct) WalletHas(p0 context.Context, p1 address.Address) (bool, error) { return s.Internal.WalletHas(p0, p1) } - func (s *IWalletStruct) WalletImport(p0 context.Context, p1 *types.KeyInfo) (address.Address, error) { return s.Internal.WalletImport(p0, p1) } - func (s *IWalletStruct) WalletNewAddress(p0 context.Context, p1 address.Protocol) (address.Address, error) { return s.Internal.WalletNewAddress(p0, p1) } - func (s *IWalletStruct) WalletSetDefault(p0 context.Context, p1 address.Address) error { return s.Internal.WalletSetDefault(p0, p1) } - func (s *IWalletStruct) WalletSign(p0 context.Context, p1 address.Address, p2 []byte, p3 types.MsgMeta) (*crypto.Signature, error) { return s.Internal.WalletSign(p0, p1, p2, p3) } - func (s *IWalletStruct) WalletSignMessage(p0 context.Context, p1 address.Address, p2 *types.Message) (*types.SignedMessage, error) { return s.Internal.WalletSignMessage(p0, p1, p2) } +func (s *IWalletStruct) WalletState(p0 context.Context) int { return s.Internal.WalletState(p0) } + +type IJwtAuthAPIStruct struct { + Internal struct { + AuthNew func(ctx context.Context, perms []auth.Permission) ([]byte, error) `perm:"admin"` + Verify func(ctx context.Context, host, token string) ([]auth.Permission, error) `perm:"read"` + } +} + +func (s *IJwtAuthAPIStruct) AuthNew(p0 context.Context, p1 []auth.Permission) ([]byte, error) { + return s.Internal.AuthNew(p0, p1) +} +func (s *IJwtAuthAPIStruct) Verify(p0 context.Context, p1, p2 string) ([]auth.Permission, error) { + return s.Internal.Verify(p0, p1, p2) +} -func (s *IWalletStruct) WalletState(p0 context.Context) int { - return s.Internal.WalletState(p0) +type FullNodeStruct struct { + IBlockStoreStruct + IChainStruct + IMarketStruct + IMiningStruct + IMessagePoolStruct + IMultiSigStruct + INetworkStruct + IPaychanStruct + ISyncerStruct + IWalletStruct + IJwtAuthAPIStruct } diff --git a/venus-shared/api/chain/v1/fullnode.go b/venus-shared/api/chain/v1/fullnode.go index aad482dd0a..d38225a0f8 100644 --- a/venus-shared/api/chain/v1/fullnode.go +++ b/venus-shared/api/chain/v1/fullnode.go @@ -1,7 +1,5 @@ package v1 -//go:generate go run github.com/golang/mock/mockgen@v1.6.0 -destination=./mock/full.go -package=mock . FullNode - type FullNode interface { IBlockStore IChain diff --git a/venus-shared/api/chain/v1/proxy_gen.go b/venus-shared/api/chain/v1/proxy_gen.go index 598daaebca..f63f0cbfe5 100644 --- a/venus-shared/api/chain/v1/proxy_gen.go +++ b/venus-shared/api/chain/v1/proxy_gen.go @@ -1,43 +1,52 @@ -// Code generated by github.com/filecoin-project/tools/gen/api. DO NOT EDIT. - +// Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen. DO NOT EDIT. package v1 import ( "context" - "github.com/filecoin-project/go-address" - "github.com/filecoin-project/go-bitfield" + "time" + + address "github.com/filecoin-project/go-address" + bitfield "github.com/filecoin-project/go-bitfield" "github.com/filecoin-project/go-jsonrpc/auth" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/go-state-types/dline" "github.com/filecoin-project/go-state-types/network" - "github.com/filecoin-project/venus/venus-shared/actors/builtin/miner" - "github.com/filecoin-project/venus/venus-shared/types" - "github.com/ipfs/go-cid" + cid "github.com/ipfs/go-cid" "github.com/libp2p/go-libp2p-core/metrics" "github.com/libp2p/go-libp2p-core/peer" ma "github.com/multiformats/go-multiaddr" - "time" + + "github.com/filecoin-project/venus/venus-shared/actors/builtin/miner" + "github.com/filecoin-project/venus/venus-shared/types" ) -type FullNodeStruct struct { - IBlockStoreStruct - IChainStruct - IMarketStruct - IMiningStruct - IMessagePoolStruct - IMultiSigStruct - INetworkStruct - IPaychanStruct - ISyncerStruct - IWalletStruct - IJwtAuthAPIStruct +type IBlockStoreStruct struct { + Internal struct { + ChainDeleteObj func(ctx context.Context, obj cid.Cid) error `perm:"admin"` + ChainHasObj func(ctx context.Context, obj cid.Cid) (bool, error) `perm:"read"` + ChainReadObj func(ctx context.Context, cid cid.Cid) ([]byte, error) `perm:"read"` + ChainStatObj func(ctx context.Context, obj cid.Cid, base cid.Cid) (types.ObjStat, error) `perm:"read"` + } +} + +func (s *IBlockStoreStruct) ChainDeleteObj(p0 context.Context, p1 cid.Cid) error { + return s.Internal.ChainDeleteObj(p0, p1) +} +func (s *IBlockStoreStruct) ChainHasObj(p0 context.Context, p1 cid.Cid) (bool, error) { + return s.Internal.ChainHasObj(p0, p1) +} +func (s *IBlockStoreStruct) ChainReadObj(p0 context.Context, p1 cid.Cid) ([]byte, error) { + return s.Internal.ChainReadObj(p0, p1) +} +func (s *IBlockStoreStruct) ChainStatObj(p0 context.Context, p1 cid.Cid, p2 cid.Cid) (types.ObjStat, error) { + return s.Internal.ChainStatObj(p0, p1, p2) } type IAccountStruct struct { Internal struct { - StateAccountKey func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (address.Address, error) `perm:"read"` + StateAccountKey func(ctx context.Context, addr address.Address, tsk types.TipSetKey) (address.Address, error) `perm:"read"` } } @@ -47,23 +56,21 @@ func (s *IAccountStruct) StateAccountKey(p0 context.Context, p1 address.Address, type IActorStruct struct { Internal struct { - ListActor func(p0 context.Context) (map[address.Address]*types.Actor, error) `perm:"read"` - - StateGetActor func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*types.Actor, error) `perm:"read"` + ListActor func(ctx context.Context) (map[address.Address]*types.Actor, error) `perm:"read"` + StateGetActor func(ctx context.Context, actor address.Address, tsk types.TipSetKey) (*types.Actor, error) `perm:"read"` } } func (s *IActorStruct) ListActor(p0 context.Context) (map[address.Address]*types.Actor, error) { return s.Internal.ListActor(p0) } - func (s *IActorStruct) StateGetActor(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*types.Actor, error) { return s.Internal.StateGetActor(p0, p1, p2) } type IBeaconStruct struct { Internal struct { - BeaconGetEntry func(p0 context.Context, p1 abi.ChainEpoch) (*types.BeaconEntry, error) `perm:"read"` + BeaconGetEntry func(ctx context.Context, epoch abi.ChainEpoch) (*types.BeaconEntry, error) `perm:"read"` } } @@ -71,1030 +78,714 @@ func (s *IBeaconStruct) BeaconGetEntry(p0 context.Context, p1 abi.ChainEpoch) (* return s.Internal.BeaconGetEntry(p0, p1) } -type IBlockStoreStruct struct { +type IMinerStateStruct struct { Internal struct { - ChainDeleteObj func(p0 context.Context, p1 cid.Cid) error `perm:"admin"` - - ChainHasObj func(p0 context.Context, p1 cid.Cid) (bool, error) `perm:"read"` - - ChainReadObj func(p0 context.Context, p1 cid.Cid) ([]byte, error) `perm:"read"` - - ChainStatObj func(p0 context.Context, p1 cid.Cid, p2 cid.Cid) (types.ObjStat, error) `perm:"read"` + StateCirculatingSupply func(ctx context.Context, tsk types.TipSetKey) (abi.TokenAmount, error) `perm:"read"` + StateDealProviderCollateralBounds func(ctx context.Context, size abi.PaddedPieceSize, verified bool, tsk types.TipSetKey) (types.DealCollateralBounds, error) `perm:"read"` + StateListActors func(ctx context.Context, tsk types.TipSetKey) ([]address.Address, error) `perm:"read"` + StateListMiners func(ctx context.Context, tsk types.TipSetKey) ([]address.Address, error) `perm:"read"` + StateLookupID func(ctx context.Context, addr address.Address, tsk types.TipSetKey) (address.Address, error) `perm:"read"` + StateMarketBalance func(ctx context.Context, addr address.Address, tsk types.TipSetKey) (types.MarketBalance, error) `perm:"read"` + StateMarketDeals func(ctx context.Context, tsk types.TipSetKey) (map[string]types.MarketDeal, error) `perm:"read"` + StateMarketStorageDeal func(ctx context.Context, dealID abi.DealID, tsk types.TipSetKey) (*types.MarketDeal, error) `perm:"read"` + StateMinerActiveSectors func(ctx context.Context, maddr address.Address, tsk types.TipSetKey) ([]*miner.SectorOnChainInfo, error) `perm:"read"` + StateMinerAvailableBalance func(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (big.Int, error) `perm:"read"` + StateMinerDeadlines func(ctx context.Context, maddr address.Address, tsk types.TipSetKey) ([]types.Deadline, error) `perm:"read"` + StateMinerFaults func(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (bitfield.BitField, error) `perm:"read"` + StateMinerInfo func(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (miner.MinerInfo, error) `perm:"read"` + StateMinerInitialPledgeCollateral func(ctx context.Context, maddr address.Address, pci miner.SectorPreCommitInfo, tsk types.TipSetKey) (big.Int, error) `perm:"read"` + StateMinerPartitions func(ctx context.Context, maddr address.Address, dlIdx uint64, tsk types.TipSetKey) ([]types.Partition, error) `perm:"read"` + StateMinerPower func(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*types.MinerPower, error) `perm:"read"` + StateMinerPreCommitDepositForPower func(ctx context.Context, maddr address.Address, pci miner.SectorPreCommitInfo, tsk types.TipSetKey) (big.Int, error) `perm:"read"` + StateMinerProvingDeadline func(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (*dline.Info, error) `perm:"read"` + StateMinerRecoveries func(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (bitfield.BitField, error) `perm:"read"` + StateMinerSectorAllocated func(ctx context.Context, maddr address.Address, s abi.SectorNumber, tsk types.TipSetKey) (bool, error) `perm:"read"` + StateMinerSectorCount func(ctx context.Context, addr address.Address, tsk types.TipSetKey) (types.MinerSectors, error) `perm:"read"` + StateMinerSectorSize func(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (abi.SectorSize, error) `perm:"read"` + StateMinerSectors func(ctx context.Context, maddr address.Address, sectorNos *bitfield.BitField, tsk types.TipSetKey) ([]*miner.SectorOnChainInfo, error) `perm:"read"` + StateMinerWorkerAddress func(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (address.Address, error) `perm:"read"` + StateSectorExpiration func(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tsk types.TipSetKey) (*miner.SectorExpiration, error) `perm:"read"` + StateSectorGetInfo func(ctx context.Context, maddr address.Address, n abi.SectorNumber, tsk types.TipSetKey) (*miner.SectorOnChainInfo, error) `perm:"read"` + StateSectorPartition func(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tsk types.TipSetKey) (*miner.SectorLocation, error) `perm:"read"` + StateSectorPreCommitInfo func(ctx context.Context, maddr address.Address, n abi.SectorNumber, tsk types.TipSetKey) (miner.SectorPreCommitOnChainInfo, error) `perm:"read"` + StateVMCirculatingSupplyInternal func(ctx context.Context, tsk types.TipSetKey) (types.CirculatingSupply, error) `perm:"read"` + StateVerifiedClientStatus func(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*abi.StoragePower, error) `perm:"read"` } } -func (s *IBlockStoreStruct) ChainDeleteObj(p0 context.Context, p1 cid.Cid) error { - return s.Internal.ChainDeleteObj(p0, p1) +func (s *IMinerStateStruct) StateCirculatingSupply(p0 context.Context, p1 types.TipSetKey) (abi.TokenAmount, error) { + return s.Internal.StateCirculatingSupply(p0, p1) } - -func (s *IBlockStoreStruct) ChainHasObj(p0 context.Context, p1 cid.Cid) (bool, error) { - return s.Internal.ChainHasObj(p0, p1) +func (s *IMinerStateStruct) StateDealProviderCollateralBounds(p0 context.Context, p1 abi.PaddedPieceSize, p2 bool, p3 types.TipSetKey) (types.DealCollateralBounds, error) { + return s.Internal.StateDealProviderCollateralBounds(p0, p1, p2, p3) } - -func (s *IBlockStoreStruct) ChainReadObj(p0 context.Context, p1 cid.Cid) ([]byte, error) { - return s.Internal.ChainReadObj(p0, p1) +func (s *IMinerStateStruct) StateListActors(p0 context.Context, p1 types.TipSetKey) ([]address.Address, error) { + return s.Internal.StateListActors(p0, p1) } - -func (s *IBlockStoreStruct) ChainStatObj(p0 context.Context, p1 cid.Cid, p2 cid.Cid) (types.ObjStat, error) { - return s.Internal.ChainStatObj(p0, p1, p2) +func (s *IMinerStateStruct) StateListMiners(p0 context.Context, p1 types.TipSetKey) ([]address.Address, error) { + return s.Internal.StateListMiners(p0, p1) } - -type IChainStruct struct { - IAccountStruct - IActorStruct - IBeaconStruct - IMinerStateStruct - IChainInfoStruct +func (s *IMinerStateStruct) StateLookupID(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (address.Address, error) { + return s.Internal.StateLookupID(p0, p1, p2) +} +func (s *IMinerStateStruct) StateMarketBalance(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (types.MarketBalance, error) { + return s.Internal.StateMarketBalance(p0, p1, p2) +} +func (s *IMinerStateStruct) StateMarketDeals(p0 context.Context, p1 types.TipSetKey) (map[string]types.MarketDeal, error) { + return s.Internal.StateMarketDeals(p0, p1) +} +func (s *IMinerStateStruct) StateMarketStorageDeal(p0 context.Context, p1 abi.DealID, p2 types.TipSetKey) (*types.MarketDeal, error) { + return s.Internal.StateMarketStorageDeal(p0, p1, p2) +} +func (s *IMinerStateStruct) StateMinerActiveSectors(p0 context.Context, p1 address.Address, p2 types.TipSetKey) ([]*miner.SectorOnChainInfo, error) { + return s.Internal.StateMinerActiveSectors(p0, p1, p2) +} +func (s *IMinerStateStruct) StateMinerAvailableBalance(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (big.Int, error) { + return s.Internal.StateMinerAvailableBalance(p0, p1, p2) +} +func (s *IMinerStateStruct) StateMinerDeadlines(p0 context.Context, p1 address.Address, p2 types.TipSetKey) ([]types.Deadline, error) { + return s.Internal.StateMinerDeadlines(p0, p1, p2) +} +func (s *IMinerStateStruct) StateMinerFaults(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (bitfield.BitField, error) { + return s.Internal.StateMinerFaults(p0, p1, p2) +} +func (s *IMinerStateStruct) StateMinerInfo(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (miner.MinerInfo, error) { + return s.Internal.StateMinerInfo(p0, p1, p2) +} +func (s *IMinerStateStruct) StateMinerInitialPledgeCollateral(p0 context.Context, p1 address.Address, p2 miner.SectorPreCommitInfo, p3 types.TipSetKey) (big.Int, error) { + return s.Internal.StateMinerInitialPledgeCollateral(p0, p1, p2, p3) +} +func (s *IMinerStateStruct) StateMinerPartitions(p0 context.Context, p1 address.Address, p2 uint64, p3 types.TipSetKey) ([]types.Partition, error) { + return s.Internal.StateMinerPartitions(p0, p1, p2, p3) +} +func (s *IMinerStateStruct) StateMinerPower(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*types.MinerPower, error) { + return s.Internal.StateMinerPower(p0, p1, p2) +} +func (s *IMinerStateStruct) StateMinerPreCommitDepositForPower(p0 context.Context, p1 address.Address, p2 miner.SectorPreCommitInfo, p3 types.TipSetKey) (big.Int, error) { + return s.Internal.StateMinerPreCommitDepositForPower(p0, p1, p2, p3) +} +func (s *IMinerStateStruct) StateMinerProvingDeadline(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*dline.Info, error) { + return s.Internal.StateMinerProvingDeadline(p0, p1, p2) +} +func (s *IMinerStateStruct) StateMinerRecoveries(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (bitfield.BitField, error) { + return s.Internal.StateMinerRecoveries(p0, p1, p2) +} +func (s *IMinerStateStruct) StateMinerSectorAllocated(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (bool, error) { + return s.Internal.StateMinerSectorAllocated(p0, p1, p2, p3) +} +func (s *IMinerStateStruct) StateMinerSectorCount(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (types.MinerSectors, error) { + return s.Internal.StateMinerSectorCount(p0, p1, p2) +} +func (s *IMinerStateStruct) StateMinerSectorSize(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (abi.SectorSize, error) { + return s.Internal.StateMinerSectorSize(p0, p1, p2) +} +func (s *IMinerStateStruct) StateMinerSectors(p0 context.Context, p1 address.Address, p2 *bitfield.BitField, p3 types.TipSetKey) ([]*miner.SectorOnChainInfo, error) { + return s.Internal.StateMinerSectors(p0, p1, p2, p3) +} +func (s *IMinerStateStruct) StateMinerWorkerAddress(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (address.Address, error) { + return s.Internal.StateMinerWorkerAddress(p0, p1, p2) +} +func (s *IMinerStateStruct) StateSectorExpiration(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorExpiration, error) { + return s.Internal.StateSectorExpiration(p0, p1, p2, p3) +} +func (s *IMinerStateStruct) StateSectorGetInfo(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorOnChainInfo, error) { + return s.Internal.StateSectorGetInfo(p0, p1, p2, p3) +} +func (s *IMinerStateStruct) StateSectorPartition(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorLocation, error) { + return s.Internal.StateSectorPartition(p0, p1, p2, p3) +} +func (s *IMinerStateStruct) StateSectorPreCommitInfo(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (miner.SectorPreCommitOnChainInfo, error) { + return s.Internal.StateSectorPreCommitInfo(p0, p1, p2, p3) +} +func (s *IMinerStateStruct) StateVMCirculatingSupplyInternal(p0 context.Context, p1 types.TipSetKey) (types.CirculatingSupply, error) { + return s.Internal.StateVMCirculatingSupplyInternal(p0, p1) +} +func (s *IMinerStateStruct) StateVerifiedClientStatus(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*abi.StoragePower, error) { + return s.Internal.StateVerifiedClientStatus(p0, p1, p2) } type IChainInfoStruct struct { Internal struct { - BlockTime func(p0 context.Context) time.Duration `perm:"read"` - - ChainExport func(p0 context.Context, p1 abi.ChainEpoch, p2 bool, p3 types.TipSetKey) (<-chan []byte, error) `perm:"read"` - - ChainGetBlock func(p0 context.Context, p1 cid.Cid) (*types.BlockHeader, error) `perm:"read"` - - ChainGetBlockMessages func(p0 context.Context, p1 cid.Cid) (*types.BlockMessages, error) `perm:"read"` - - ChainGetMessage func(p0 context.Context, p1 cid.Cid) (*types.Message, error) `perm:"read"` - - ChainGetMessagesInTipset func(p0 context.Context, p1 types.TipSetKey) ([]types.MessageCID, error) `perm:"read"` - - ChainGetParentMessages func(p0 context.Context, p1 cid.Cid) ([]types.MessageCID, error) `perm:"read"` - - ChainGetParentReceipts func(p0 context.Context, p1 cid.Cid) ([]*types.MessageReceipt, error) `perm:"read"` - - ChainGetPath func(p0 context.Context, p1 types.TipSetKey, p2 types.TipSetKey) ([]*types.HeadChange, error) `perm:"read"` - - ChainGetRandomnessFromBeacon func(p0 context.Context, p1 types.TipSetKey, p2 crypto.DomainSeparationTag, p3 abi.ChainEpoch, p4 []byte) (abi.Randomness, error) `perm:"read"` - - ChainGetRandomnessFromTickets func(p0 context.Context, p1 types.TipSetKey, p2 crypto.DomainSeparationTag, p3 abi.ChainEpoch, p4 []byte) (abi.Randomness, error) `perm:"read"` - - ChainGetReceipts func(p0 context.Context, p1 cid.Cid) ([]types.MessageReceipt, error) `perm:"read"` - - ChainGetTipSet func(p0 context.Context, p1 types.TipSetKey) (*types.TipSet, error) `perm:"read"` - - ChainGetTipSetAfterHeight func(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) (*types.TipSet, error) `perm:"read"` - - ChainGetTipSetByHeight func(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) (*types.TipSet, error) `perm:"read"` - - ChainHead func(p0 context.Context) (*types.TipSet, error) `perm:"read"` - - ChainList func(p0 context.Context, p1 types.TipSetKey, p2 int) ([]types.TipSetKey, error) `perm:"read"` - - ChainNotify func(p0 context.Context) (<-chan []*types.HeadChange, error) `perm:"read"` - - ChainSetHead func(p0 context.Context, p1 types.TipSetKey) error `perm:"admin"` - - GetActor func(p0 context.Context, p1 address.Address) (*types.Actor, error) `perm:"read"` - - GetEntry func(p0 context.Context, p1 abi.ChainEpoch, p2 uint64) (*types.BeaconEntry, error) `perm:"read"` - - GetFullBlock func(p0 context.Context, p1 cid.Cid) (*types.FullBlock, error) `perm:"read"` - - GetParentStateRootActor func(p0 context.Context, p1 *types.TipSet, p2 address.Address) (*types.Actor, error) `perm:"read"` - - MessageWait func(p0 context.Context, p1 cid.Cid, p2 abi.ChainEpoch, p3 abi.ChainEpoch) (*types.ChainMessage, error) `perm:"read"` - - ProtocolParameters func(p0 context.Context) (*types.ProtocolParams, error) `perm:"read"` - - ResolveToKeyAddr func(p0 context.Context, p1 address.Address, p2 *types.TipSet) (address.Address, error) `perm:"read"` - - StateGetRandomnessFromBeacon func(p0 context.Context, p1 crypto.DomainSeparationTag, p2 abi.ChainEpoch, p3 []byte, p4 types.TipSetKey) (abi.Randomness, error) `perm:"read"` - - StateGetRandomnessFromTickets func(p0 context.Context, p1 crypto.DomainSeparationTag, p2 abi.ChainEpoch, p3 []byte, p4 types.TipSetKey) (abi.Randomness, error) `perm:"read"` - - StateNetworkName func(p0 context.Context) (types.NetworkName, error) `perm:"read"` - - StateNetworkVersion func(p0 context.Context, p1 types.TipSetKey) (network.Version, error) `perm:"read"` - - StateSearchMsg func(p0 context.Context, p1 types.TipSetKey, p2 cid.Cid, p3 abi.ChainEpoch, p4 bool) (*types.MsgLookup, error) `perm:"read"` - - StateVerifiedRegistryRootKey func(p0 context.Context, p1 types.TipSetKey) (address.Address, error) `perm:"read"` - - StateVerifierStatus func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*abi.StoragePower, error) `perm:"read"` - - StateWaitMsg func(p0 context.Context, p1 cid.Cid, p2 uint64, p3 abi.ChainEpoch, p4 bool) (*types.MsgLookup, error) `perm:"read"` - - VerifyEntry func(p0 *types.BeaconEntry, p1 *types.BeaconEntry, p2 abi.ChainEpoch) bool `perm:"read"` + BlockTime func(ctx context.Context) time.Duration `perm:"read"` + ChainExport func(context.Context, abi.ChainEpoch, bool, types.TipSetKey) (<-chan []byte, error) `perm:"read"` + ChainGetBlock func(ctx context.Context, id cid.Cid) (*types.BlockHeader, error) `perm:"read"` + ChainGetBlockMessages func(ctx context.Context, bid cid.Cid) (*types.BlockMessages, error) `perm:"read"` + ChainGetMessage func(ctx context.Context, msgID cid.Cid) (*types.Message, error) `perm:"read"` + ChainGetMessagesInTipset func(ctx context.Context, key types.TipSetKey) ([]types.MessageCID, error) `perm:"read"` + ChainGetParentMessages func(ctx context.Context, bcid cid.Cid) ([]types.MessageCID, error) `perm:"read"` + ChainGetParentReceipts func(ctx context.Context, bcid cid.Cid) ([]*types.MessageReceipt, error) `perm:"read"` + ChainGetPath func(ctx context.Context, from types.TipSetKey, to types.TipSetKey) ([]*types.HeadChange, error) `perm:"read"` + ChainGetRandomnessFromBeacon func(ctx context.Context, key types.TipSetKey, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte) (abi.Randomness, error) `perm:"read"` + ChainGetRandomnessFromTickets func(ctx context.Context, tsk types.TipSetKey, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte) (abi.Randomness, error) `perm:"read"` + ChainGetReceipts func(ctx context.Context, id cid.Cid) ([]types.MessageReceipt, error) `perm:"read"` + ChainGetTipSet func(ctx context.Context, key types.TipSetKey) (*types.TipSet, error) `perm:"read"` + ChainGetTipSetAfterHeight func(ctx context.Context, height abi.ChainEpoch, tsk types.TipSetKey) (*types.TipSet, error) `perm:"read"` + ChainGetTipSetByHeight func(ctx context.Context, height abi.ChainEpoch, tsk types.TipSetKey) (*types.TipSet, error) `perm:"read"` + ChainHead func(ctx context.Context) (*types.TipSet, error) `perm:"read"` + ChainList func(ctx context.Context, tsKey types.TipSetKey, count int) ([]types.TipSetKey, error) `perm:"read"` + ChainNotify func(ctx context.Context) (<-chan []*types.HeadChange, error) `perm:"read"` + ChainSetHead func(ctx context.Context, key types.TipSetKey) error `perm:"admin"` + GetActor func(ctx context.Context, addr address.Address) (*types.Actor, error) `perm:"read"` + GetEntry func(ctx context.Context, height abi.ChainEpoch, round uint64) (*types.BeaconEntry, error) `perm:"read"` + GetFullBlock func(ctx context.Context, id cid.Cid) (*types.FullBlock, error) `perm:"read"` + GetParentStateRootActor func(ctx context.Context, ts *types.TipSet, addr address.Address) (*types.Actor, error) `perm:"read"` + MessageWait func(ctx context.Context, msgCid cid.Cid, confidence, lookback abi.ChainEpoch) (*types.ChainMessage, error) `perm:"read"` + ProtocolParameters func(ctx context.Context) (*types.ProtocolParams, error) `perm:"read"` + ResolveToKeyAddr func(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error) `perm:"read"` + StateGetRandomnessFromBeacon func(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error) `perm:"read"` + StateGetRandomnessFromTickets func(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error) `perm:"read"` + StateNetworkName func(ctx context.Context) (types.NetworkName, error) `perm:"read"` + StateNetworkVersion func(ctx context.Context, tsk types.TipSetKey) (network.Version, error) `perm:"read"` + StateSearchMsg func(ctx context.Context, from types.TipSetKey, msg cid.Cid, limit abi.ChainEpoch, allowReplaced bool) (*types.MsgLookup, error) `perm:"read"` + StateVerifiedRegistryRootKey func(ctx context.Context, tsk types.TipSetKey) (address.Address, error) `perm:"read"` + StateVerifierStatus func(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*abi.StoragePower, error) `perm:"read"` + StateWaitMsg func(ctx context.Context, cid cid.Cid, confidence uint64, limit abi.ChainEpoch, allowReplaced bool) (*types.MsgLookup, error) `perm:"read"` + VerifyEntry func(parent, child *types.BeaconEntry, height abi.ChainEpoch) bool `perm:"read"` } } func (s *IChainInfoStruct) BlockTime(p0 context.Context) time.Duration { return s.Internal.BlockTime(p0) } - func (s *IChainInfoStruct) ChainExport(p0 context.Context, p1 abi.ChainEpoch, p2 bool, p3 types.TipSetKey) (<-chan []byte, error) { return s.Internal.ChainExport(p0, p1, p2, p3) } - func (s *IChainInfoStruct) ChainGetBlock(p0 context.Context, p1 cid.Cid) (*types.BlockHeader, error) { return s.Internal.ChainGetBlock(p0, p1) } - func (s *IChainInfoStruct) ChainGetBlockMessages(p0 context.Context, p1 cid.Cid) (*types.BlockMessages, error) { return s.Internal.ChainGetBlockMessages(p0, p1) } - func (s *IChainInfoStruct) ChainGetMessage(p0 context.Context, p1 cid.Cid) (*types.Message, error) { return s.Internal.ChainGetMessage(p0, p1) } - func (s *IChainInfoStruct) ChainGetMessagesInTipset(p0 context.Context, p1 types.TipSetKey) ([]types.MessageCID, error) { return s.Internal.ChainGetMessagesInTipset(p0, p1) } - func (s *IChainInfoStruct) ChainGetParentMessages(p0 context.Context, p1 cid.Cid) ([]types.MessageCID, error) { return s.Internal.ChainGetParentMessages(p0, p1) } - func (s *IChainInfoStruct) ChainGetParentReceipts(p0 context.Context, p1 cid.Cid) ([]*types.MessageReceipt, error) { return s.Internal.ChainGetParentReceipts(p0, p1) } - func (s *IChainInfoStruct) ChainGetPath(p0 context.Context, p1 types.TipSetKey, p2 types.TipSetKey) ([]*types.HeadChange, error) { return s.Internal.ChainGetPath(p0, p1, p2) } - func (s *IChainInfoStruct) ChainGetRandomnessFromBeacon(p0 context.Context, p1 types.TipSetKey, p2 crypto.DomainSeparationTag, p3 abi.ChainEpoch, p4 []byte) (abi.Randomness, error) { return s.Internal.ChainGetRandomnessFromBeacon(p0, p1, p2, p3, p4) } - func (s *IChainInfoStruct) ChainGetRandomnessFromTickets(p0 context.Context, p1 types.TipSetKey, p2 crypto.DomainSeparationTag, p3 abi.ChainEpoch, p4 []byte) (abi.Randomness, error) { return s.Internal.ChainGetRandomnessFromTickets(p0, p1, p2, p3, p4) } - func (s *IChainInfoStruct) ChainGetReceipts(p0 context.Context, p1 cid.Cid) ([]types.MessageReceipt, error) { return s.Internal.ChainGetReceipts(p0, p1) } - func (s *IChainInfoStruct) ChainGetTipSet(p0 context.Context, p1 types.TipSetKey) (*types.TipSet, error) { return s.Internal.ChainGetTipSet(p0, p1) } - func (s *IChainInfoStruct) ChainGetTipSetAfterHeight(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) (*types.TipSet, error) { return s.Internal.ChainGetTipSetAfterHeight(p0, p1, p2) } - func (s *IChainInfoStruct) ChainGetTipSetByHeight(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) (*types.TipSet, error) { return s.Internal.ChainGetTipSetByHeight(p0, p1, p2) } - func (s *IChainInfoStruct) ChainHead(p0 context.Context) (*types.TipSet, error) { return s.Internal.ChainHead(p0) } - func (s *IChainInfoStruct) ChainList(p0 context.Context, p1 types.TipSetKey, p2 int) ([]types.TipSetKey, error) { return s.Internal.ChainList(p0, p1, p2) } - func (s *IChainInfoStruct) ChainNotify(p0 context.Context) (<-chan []*types.HeadChange, error) { return s.Internal.ChainNotify(p0) } - func (s *IChainInfoStruct) ChainSetHead(p0 context.Context, p1 types.TipSetKey) error { return s.Internal.ChainSetHead(p0, p1) } - func (s *IChainInfoStruct) GetActor(p0 context.Context, p1 address.Address) (*types.Actor, error) { return s.Internal.GetActor(p0, p1) } - func (s *IChainInfoStruct) GetEntry(p0 context.Context, p1 abi.ChainEpoch, p2 uint64) (*types.BeaconEntry, error) { return s.Internal.GetEntry(p0, p1, p2) } - func (s *IChainInfoStruct) GetFullBlock(p0 context.Context, p1 cid.Cid) (*types.FullBlock, error) { return s.Internal.GetFullBlock(p0, p1) } - func (s *IChainInfoStruct) GetParentStateRootActor(p0 context.Context, p1 *types.TipSet, p2 address.Address) (*types.Actor, error) { return s.Internal.GetParentStateRootActor(p0, p1, p2) } - -func (s *IChainInfoStruct) MessageWait(p0 context.Context, p1 cid.Cid, p2 abi.ChainEpoch, p3 abi.ChainEpoch) (*types.ChainMessage, error) { +func (s *IChainInfoStruct) MessageWait(p0 context.Context, p1 cid.Cid, p2, p3 abi.ChainEpoch) (*types.ChainMessage, error) { return s.Internal.MessageWait(p0, p1, p2, p3) } - func (s *IChainInfoStruct) ProtocolParameters(p0 context.Context) (*types.ProtocolParams, error) { return s.Internal.ProtocolParameters(p0) } - func (s *IChainInfoStruct) ResolveToKeyAddr(p0 context.Context, p1 address.Address, p2 *types.TipSet) (address.Address, error) { return s.Internal.ResolveToKeyAddr(p0, p1, p2) } - func (s *IChainInfoStruct) StateGetRandomnessFromBeacon(p0 context.Context, p1 crypto.DomainSeparationTag, p2 abi.ChainEpoch, p3 []byte, p4 types.TipSetKey) (abi.Randomness, error) { return s.Internal.StateGetRandomnessFromBeacon(p0, p1, p2, p3, p4) } - func (s *IChainInfoStruct) StateGetRandomnessFromTickets(p0 context.Context, p1 crypto.DomainSeparationTag, p2 abi.ChainEpoch, p3 []byte, p4 types.TipSetKey) (abi.Randomness, error) { return s.Internal.StateGetRandomnessFromTickets(p0, p1, p2, p3, p4) } - func (s *IChainInfoStruct) StateNetworkName(p0 context.Context) (types.NetworkName, error) { return s.Internal.StateNetworkName(p0) } - func (s *IChainInfoStruct) StateNetworkVersion(p0 context.Context, p1 types.TipSetKey) (network.Version, error) { return s.Internal.StateNetworkVersion(p0, p1) } - func (s *IChainInfoStruct) StateSearchMsg(p0 context.Context, p1 types.TipSetKey, p2 cid.Cid, p3 abi.ChainEpoch, p4 bool) (*types.MsgLookup, error) { return s.Internal.StateSearchMsg(p0, p1, p2, p3, p4) } - -func (s *IChainInfoStruct) StateVerifiedRegistryRootKey(p0 context.Context, p1 types.TipSetKey) (address.Address, error) { - return s.Internal.StateVerifiedRegistryRootKey(p0, p1) -} - -func (s *IChainInfoStruct) StateVerifierStatus(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*abi.StoragePower, error) { - return s.Internal.StateVerifierStatus(p0, p1, p2) -} - -func (s *IChainInfoStruct) StateWaitMsg(p0 context.Context, p1 cid.Cid, p2 uint64, p3 abi.ChainEpoch, p4 bool) (*types.MsgLookup, error) { - return s.Internal.StateWaitMsg(p0, p1, p2, p3, p4) -} - -func (s *IChainInfoStruct) VerifyEntry(p0 *types.BeaconEntry, p1 *types.BeaconEntry, p2 abi.ChainEpoch) bool { - return s.Internal.VerifyEntry(p0, p1, p2) -} - -type IJwtAuthAPIStruct struct { - Internal struct { - AuthNew func(p0 context.Context, p1 []auth.Permission) ([]byte, error) `perm:"admin"` - - Verify func(p0 context.Context, p1 string, p2 string) ([]auth.Permission, error) `perm:"read"` - } -} - -func (s *IJwtAuthAPIStruct) AuthNew(p0 context.Context, p1 []auth.Permission) ([]byte, error) { - return s.Internal.AuthNew(p0, p1) -} - -func (s *IJwtAuthAPIStruct) Verify(p0 context.Context, p1 string, p2 string) ([]auth.Permission, error) { - return s.Internal.Verify(p0, p1, p2) -} - -type IMarketStruct struct { - Internal struct { - StateMarketParticipants func(p0 context.Context, p1 types.TipSetKey) (map[string]types.MarketBalance, error) `perm:"read"` - } -} - -func (s *IMarketStruct) StateMarketParticipants(p0 context.Context, p1 types.TipSetKey) (map[string]types.MarketBalance, error) { - return s.Internal.StateMarketParticipants(p0, p1) -} - -type IMessagePoolStruct struct { - Internal struct { - GasBatchEstimateMessageGas func(p0 context.Context, p1 []*types.EstimateMessage, p2 uint64, p3 types.TipSetKey) ([]*types.EstimateResult, error) `perm:"read"` - - GasEstimateFeeCap func(p0 context.Context, p1 *types.Message, p2 int64, p3 types.TipSetKey) (big.Int, error) `perm:"read"` - - GasEstimateGasLimit func(p0 context.Context, p1 *types.Message, p2 types.TipSetKey) (int64, error) `perm:"read"` - - GasEstimateGasPremium func(p0 context.Context, p1 uint64, p2 address.Address, p3 int64, p4 types.TipSetKey) (big.Int, error) `perm:"read"` - - GasEstimateMessageGas func(p0 context.Context, p1 *types.Message, p2 *types.MessageSendSpec, p3 types.TipSetKey) (*types.Message, error) `perm:"read"` - - MpoolBatchPush func(p0 context.Context, p1 []*types.SignedMessage) ([]cid.Cid, error) `perm:"write"` - - MpoolBatchPushMessage func(p0 context.Context, p1 []*types.Message, p2 *types.MessageSendSpec) ([]*types.SignedMessage, error) `perm:"sign"` - - MpoolBatchPushUntrusted func(p0 context.Context, p1 []*types.SignedMessage) ([]cid.Cid, error) `perm:"write"` - - MpoolCheckMessages func(p0 context.Context, p1 []*types.MessagePrototype) ([][]types.MessageCheckStatus, error) `perm:"read"` - - MpoolCheckPendingMessages func(p0 context.Context, p1 address.Address) ([][]types.MessageCheckStatus, error) `perm:"read"` - - MpoolCheckReplaceMessages func(p0 context.Context, p1 []*types.Message) ([][]types.MessageCheckStatus, error) `perm:"read"` - - MpoolClear func(p0 context.Context, p1 bool) error `perm:"write"` - - MpoolDeleteByAdress func(p0 context.Context, p1 address.Address) error `perm:"admin"` - - MpoolGetConfig func(p0 context.Context) (*types.MpoolConfig, error) `perm:"read"` - - MpoolGetNonce func(p0 context.Context, p1 address.Address) (uint64, error) `perm:"read"` - - MpoolPending func(p0 context.Context, p1 types.TipSetKey) ([]*types.SignedMessage, error) `perm:"read"` - - MpoolPublishByAddr func(p0 context.Context, p1 address.Address) error `perm:"write"` - - MpoolPublishMessage func(p0 context.Context, p1 *types.SignedMessage) error `perm:"write"` - - MpoolPush func(p0 context.Context, p1 *types.SignedMessage) (cid.Cid, error) `perm:"write"` - - MpoolPushMessage func(p0 context.Context, p1 *types.Message, p2 *types.MessageSendSpec) (*types.SignedMessage, error) `perm:"sign"` - - MpoolPushUntrusted func(p0 context.Context, p1 *types.SignedMessage) (cid.Cid, error) `perm:"write"` - - MpoolSelect func(p0 context.Context, p1 types.TipSetKey, p2 float64) ([]*types.SignedMessage, error) `perm:"read"` - - MpoolSelects func(p0 context.Context, p1 types.TipSetKey, p2 []float64) ([][]*types.SignedMessage, error) `perm:"read"` - - MpoolSetConfig func(p0 context.Context, p1 *types.MpoolConfig) error `perm:"admin"` - - MpoolSub func(p0 context.Context) (<-chan types.MpoolUpdate, error) `perm:"read"` - } -} - -func (s *IMessagePoolStruct) GasBatchEstimateMessageGas(p0 context.Context, p1 []*types.EstimateMessage, p2 uint64, p3 types.TipSetKey) ([]*types.EstimateResult, error) { - return s.Internal.GasBatchEstimateMessageGas(p0, p1, p2, p3) -} - -func (s *IMessagePoolStruct) GasEstimateFeeCap(p0 context.Context, p1 *types.Message, p2 int64, p3 types.TipSetKey) (big.Int, error) { - return s.Internal.GasEstimateFeeCap(p0, p1, p2, p3) -} - -func (s *IMessagePoolStruct) GasEstimateGasLimit(p0 context.Context, p1 *types.Message, p2 types.TipSetKey) (int64, error) { - return s.Internal.GasEstimateGasLimit(p0, p1, p2) -} - -func (s *IMessagePoolStruct) GasEstimateGasPremium(p0 context.Context, p1 uint64, p2 address.Address, p3 int64, p4 types.TipSetKey) (big.Int, error) { - return s.Internal.GasEstimateGasPremium(p0, p1, p2, p3, p4) -} - -func (s *IMessagePoolStruct) GasEstimateMessageGas(p0 context.Context, p1 *types.Message, p2 *types.MessageSendSpec, p3 types.TipSetKey) (*types.Message, error) { - return s.Internal.GasEstimateMessageGas(p0, p1, p2, p3) -} - -func (s *IMessagePoolStruct) MpoolBatchPush(p0 context.Context, p1 []*types.SignedMessage) ([]cid.Cid, error) { - return s.Internal.MpoolBatchPush(p0, p1) -} - -func (s *IMessagePoolStruct) MpoolBatchPushMessage(p0 context.Context, p1 []*types.Message, p2 *types.MessageSendSpec) ([]*types.SignedMessage, error) { - return s.Internal.MpoolBatchPushMessage(p0, p1, p2) -} - -func (s *IMessagePoolStruct) MpoolBatchPushUntrusted(p0 context.Context, p1 []*types.SignedMessage) ([]cid.Cid, error) { - return s.Internal.MpoolBatchPushUntrusted(p0, p1) -} - -func (s *IMessagePoolStruct) MpoolCheckMessages(p0 context.Context, p1 []*types.MessagePrototype) ([][]types.MessageCheckStatus, error) { - return s.Internal.MpoolCheckMessages(p0, p1) -} - -func (s *IMessagePoolStruct) MpoolCheckPendingMessages(p0 context.Context, p1 address.Address) ([][]types.MessageCheckStatus, error) { - return s.Internal.MpoolCheckPendingMessages(p0, p1) -} - -func (s *IMessagePoolStruct) MpoolCheckReplaceMessages(p0 context.Context, p1 []*types.Message) ([][]types.MessageCheckStatus, error) { - return s.Internal.MpoolCheckReplaceMessages(p0, p1) -} - -func (s *IMessagePoolStruct) MpoolClear(p0 context.Context, p1 bool) error { - return s.Internal.MpoolClear(p0, p1) -} - -func (s *IMessagePoolStruct) MpoolDeleteByAdress(p0 context.Context, p1 address.Address) error { - return s.Internal.MpoolDeleteByAdress(p0, p1) -} - -func (s *IMessagePoolStruct) MpoolGetConfig(p0 context.Context) (*types.MpoolConfig, error) { - return s.Internal.MpoolGetConfig(p0) -} - -func (s *IMessagePoolStruct) MpoolGetNonce(p0 context.Context, p1 address.Address) (uint64, error) { - return s.Internal.MpoolGetNonce(p0, p1) -} - -func (s *IMessagePoolStruct) MpoolPending(p0 context.Context, p1 types.TipSetKey) ([]*types.SignedMessage, error) { - return s.Internal.MpoolPending(p0, p1) -} - -func (s *IMessagePoolStruct) MpoolPublishByAddr(p0 context.Context, p1 address.Address) error { - return s.Internal.MpoolPublishByAddr(p0, p1) -} - -func (s *IMessagePoolStruct) MpoolPublishMessage(p0 context.Context, p1 *types.SignedMessage) error { - return s.Internal.MpoolPublishMessage(p0, p1) -} - -func (s *IMessagePoolStruct) MpoolPush(p0 context.Context, p1 *types.SignedMessage) (cid.Cid, error) { - return s.Internal.MpoolPush(p0, p1) -} - -func (s *IMessagePoolStruct) MpoolPushMessage(p0 context.Context, p1 *types.Message, p2 *types.MessageSendSpec) (*types.SignedMessage, error) { - return s.Internal.MpoolPushMessage(p0, p1, p2) -} - -func (s *IMessagePoolStruct) MpoolPushUntrusted(p0 context.Context, p1 *types.SignedMessage) (cid.Cid, error) { - return s.Internal.MpoolPushUntrusted(p0, p1) -} - -func (s *IMessagePoolStruct) MpoolSelect(p0 context.Context, p1 types.TipSetKey, p2 float64) ([]*types.SignedMessage, error) { - return s.Internal.MpoolSelect(p0, p1, p2) -} - -func (s *IMessagePoolStruct) MpoolSelects(p0 context.Context, p1 types.TipSetKey, p2 []float64) ([][]*types.SignedMessage, error) { - return s.Internal.MpoolSelects(p0, p1, p2) -} - -func (s *IMessagePoolStruct) MpoolSetConfig(p0 context.Context, p1 *types.MpoolConfig) error { - return s.Internal.MpoolSetConfig(p0, p1) -} - -func (s *IMessagePoolStruct) MpoolSub(p0 context.Context) (<-chan types.MpoolUpdate, error) { - return s.Internal.MpoolSub(p0) -} - -type IMinerStateStruct struct { - Internal struct { - StateCirculatingSupply func(p0 context.Context, p1 types.TipSetKey) (abi.TokenAmount, error) `perm:"read"` - - StateDealProviderCollateralBounds func(p0 context.Context, p1 abi.PaddedPieceSize, p2 bool, p3 types.TipSetKey) (types.DealCollateralBounds, error) `perm:"read"` - - StateListActors func(p0 context.Context, p1 types.TipSetKey) ([]address.Address, error) `perm:"read"` - - StateListMiners func(p0 context.Context, p1 types.TipSetKey) ([]address.Address, error) `perm:"read"` - - StateLookupID func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (address.Address, error) `perm:"read"` - - StateMarketBalance func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (types.MarketBalance, error) `perm:"read"` - - StateMarketDeals func(p0 context.Context, p1 types.TipSetKey) (map[string]types.MarketDeal, error) `perm:"read"` - - StateMarketStorageDeal func(p0 context.Context, p1 abi.DealID, p2 types.TipSetKey) (*types.MarketDeal, error) `perm:"read"` - - StateMinerActiveSectors func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) ([]*miner.SectorOnChainInfo, error) `perm:"read"` - - StateMinerAvailableBalance func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (big.Int, error) `perm:"read"` - - StateMinerDeadlines func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) ([]types.Deadline, error) `perm:"read"` - - StateMinerFaults func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (bitfield.BitField, error) `perm:"read"` - - StateMinerInfo func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (miner.MinerInfo, error) `perm:"read"` - - StateMinerInitialPledgeCollateral func(p0 context.Context, p1 address.Address, p2 miner.SectorPreCommitInfo, p3 types.TipSetKey) (big.Int, error) `perm:"read"` - - StateMinerPartitions func(p0 context.Context, p1 address.Address, p2 uint64, p3 types.TipSetKey) ([]types.Partition, error) `perm:"read"` - - StateMinerPower func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*types.MinerPower, error) `perm:"read"` - - StateMinerPreCommitDepositForPower func(p0 context.Context, p1 address.Address, p2 miner.SectorPreCommitInfo, p3 types.TipSetKey) (big.Int, error) `perm:"read"` - - StateMinerProvingDeadline func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*dline.Info, error) `perm:"read"` - - StateMinerRecoveries func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (bitfield.BitField, error) `perm:"read"` - - StateMinerSectorAllocated func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (bool, error) `perm:"read"` - - StateMinerSectorCount func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (types.MinerSectors, error) `perm:"read"` - - StateMinerSectorSize func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (abi.SectorSize, error) `perm:"read"` - - StateMinerSectors func(p0 context.Context, p1 address.Address, p2 *bitfield.BitField, p3 types.TipSetKey) ([]*miner.SectorOnChainInfo, error) `perm:"read"` - - StateMinerWorkerAddress func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (address.Address, error) `perm:"read"` - - StateSectorExpiration func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorExpiration, error) `perm:"read"` - - StateSectorGetInfo func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorOnChainInfo, error) `perm:"read"` - - StateSectorPartition func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorLocation, error) `perm:"read"` - - StateSectorPreCommitInfo func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (miner.SectorPreCommitOnChainInfo, error) `perm:"read"` - - StateVMCirculatingSupplyInternal func(p0 context.Context, p1 types.TipSetKey) (types.CirculatingSupply, error) `perm:"read"` - - StateVerifiedClientStatus func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*abi.StoragePower, error) `perm:"read"` - } -} - -func (s *IMinerStateStruct) StateCirculatingSupply(p0 context.Context, p1 types.TipSetKey) (abi.TokenAmount, error) { - return s.Internal.StateCirculatingSupply(p0, p1) -} - -func (s *IMinerStateStruct) StateDealProviderCollateralBounds(p0 context.Context, p1 abi.PaddedPieceSize, p2 bool, p3 types.TipSetKey) (types.DealCollateralBounds, error) { - return s.Internal.StateDealProviderCollateralBounds(p0, p1, p2, p3) -} - -func (s *IMinerStateStruct) StateListActors(p0 context.Context, p1 types.TipSetKey) ([]address.Address, error) { - return s.Internal.StateListActors(p0, p1) -} - -func (s *IMinerStateStruct) StateListMiners(p0 context.Context, p1 types.TipSetKey) ([]address.Address, error) { - return s.Internal.StateListMiners(p0, p1) -} - -func (s *IMinerStateStruct) StateLookupID(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (address.Address, error) { - return s.Internal.StateLookupID(p0, p1, p2) -} - -func (s *IMinerStateStruct) StateMarketBalance(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (types.MarketBalance, error) { - return s.Internal.StateMarketBalance(p0, p1, p2) -} - -func (s *IMinerStateStruct) StateMarketDeals(p0 context.Context, p1 types.TipSetKey) (map[string]types.MarketDeal, error) { - return s.Internal.StateMarketDeals(p0, p1) -} - -func (s *IMinerStateStruct) StateMarketStorageDeal(p0 context.Context, p1 abi.DealID, p2 types.TipSetKey) (*types.MarketDeal, error) { - return s.Internal.StateMarketStorageDeal(p0, p1, p2) -} - -func (s *IMinerStateStruct) StateMinerActiveSectors(p0 context.Context, p1 address.Address, p2 types.TipSetKey) ([]*miner.SectorOnChainInfo, error) { - return s.Internal.StateMinerActiveSectors(p0, p1, p2) -} - -func (s *IMinerStateStruct) StateMinerAvailableBalance(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (big.Int, error) { - return s.Internal.StateMinerAvailableBalance(p0, p1, p2) -} - -func (s *IMinerStateStruct) StateMinerDeadlines(p0 context.Context, p1 address.Address, p2 types.TipSetKey) ([]types.Deadline, error) { - return s.Internal.StateMinerDeadlines(p0, p1, p2) -} - -func (s *IMinerStateStruct) StateMinerFaults(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (bitfield.BitField, error) { - return s.Internal.StateMinerFaults(p0, p1, p2) -} - -func (s *IMinerStateStruct) StateMinerInfo(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (miner.MinerInfo, error) { - return s.Internal.StateMinerInfo(p0, p1, p2) -} - -func (s *IMinerStateStruct) StateMinerInitialPledgeCollateral(p0 context.Context, p1 address.Address, p2 miner.SectorPreCommitInfo, p3 types.TipSetKey) (big.Int, error) { - return s.Internal.StateMinerInitialPledgeCollateral(p0, p1, p2, p3) -} - -func (s *IMinerStateStruct) StateMinerPartitions(p0 context.Context, p1 address.Address, p2 uint64, p3 types.TipSetKey) ([]types.Partition, error) { - return s.Internal.StateMinerPartitions(p0, p1, p2, p3) -} - -func (s *IMinerStateStruct) StateMinerPower(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*types.MinerPower, error) { - return s.Internal.StateMinerPower(p0, p1, p2) -} - -func (s *IMinerStateStruct) StateMinerPreCommitDepositForPower(p0 context.Context, p1 address.Address, p2 miner.SectorPreCommitInfo, p3 types.TipSetKey) (big.Int, error) { - return s.Internal.StateMinerPreCommitDepositForPower(p0, p1, p2, p3) -} - -func (s *IMinerStateStruct) StateMinerProvingDeadline(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*dline.Info, error) { - return s.Internal.StateMinerProvingDeadline(p0, p1, p2) -} - -func (s *IMinerStateStruct) StateMinerRecoveries(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (bitfield.BitField, error) { - return s.Internal.StateMinerRecoveries(p0, p1, p2) -} - -func (s *IMinerStateStruct) StateMinerSectorAllocated(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (bool, error) { - return s.Internal.StateMinerSectorAllocated(p0, p1, p2, p3) -} - -func (s *IMinerStateStruct) StateMinerSectorCount(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (types.MinerSectors, error) { - return s.Internal.StateMinerSectorCount(p0, p1, p2) -} - -func (s *IMinerStateStruct) StateMinerSectorSize(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (abi.SectorSize, error) { - return s.Internal.StateMinerSectorSize(p0, p1, p2) -} - -func (s *IMinerStateStruct) StateMinerSectors(p0 context.Context, p1 address.Address, p2 *bitfield.BitField, p3 types.TipSetKey) ([]*miner.SectorOnChainInfo, error) { - return s.Internal.StateMinerSectors(p0, p1, p2, p3) -} - -func (s *IMinerStateStruct) StateMinerWorkerAddress(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (address.Address, error) { - return s.Internal.StateMinerWorkerAddress(p0, p1, p2) -} - -func (s *IMinerStateStruct) StateSectorExpiration(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorExpiration, error) { - return s.Internal.StateSectorExpiration(p0, p1, p2, p3) +func (s *IChainInfoStruct) StateVerifiedRegistryRootKey(p0 context.Context, p1 types.TipSetKey) (address.Address, error) { + return s.Internal.StateVerifiedRegistryRootKey(p0, p1) } - -func (s *IMinerStateStruct) StateSectorGetInfo(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorOnChainInfo, error) { - return s.Internal.StateSectorGetInfo(p0, p1, p2, p3) +func (s *IChainInfoStruct) StateVerifierStatus(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*abi.StoragePower, error) { + return s.Internal.StateVerifierStatus(p0, p1, p2) } - -func (s *IMinerStateStruct) StateSectorPartition(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorLocation, error) { - return s.Internal.StateSectorPartition(p0, p1, p2, p3) +func (s *IChainInfoStruct) StateWaitMsg(p0 context.Context, p1 cid.Cid, p2 uint64, p3 abi.ChainEpoch, p4 bool) (*types.MsgLookup, error) { + return s.Internal.StateWaitMsg(p0, p1, p2, p3, p4) +} +func (s *IChainInfoStruct) VerifyEntry(p0, p1 *types.BeaconEntry, p2 abi.ChainEpoch) bool { + return s.Internal.VerifyEntry(p0, p1, p2) } -func (s *IMinerStateStruct) StateSectorPreCommitInfo(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (miner.SectorPreCommitOnChainInfo, error) { - return s.Internal.StateSectorPreCommitInfo(p0, p1, p2, p3) +type IChainStruct struct { + IAccountStruct + IActorStruct + IBeaconStruct + IMinerStateStruct + IChainInfoStruct } -func (s *IMinerStateStruct) StateVMCirculatingSupplyInternal(p0 context.Context, p1 types.TipSetKey) (types.CirculatingSupply, error) { - return s.Internal.StateVMCirculatingSupplyInternal(p0, p1) +type IMarketStruct struct { + Internal struct { + StateMarketParticipants func(ctx context.Context, tsk types.TipSetKey) (map[string]types.MarketBalance, error) `perm:"read"` + } } -func (s *IMinerStateStruct) StateVerifiedClientStatus(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*abi.StoragePower, error) { - return s.Internal.StateVerifiedClientStatus(p0, p1, p2) +func (s *IMarketStruct) StateMarketParticipants(p0 context.Context, p1 types.TipSetKey) (map[string]types.MarketBalance, error) { + return s.Internal.StateMarketParticipants(p0, p1) } type IMiningStruct struct { Internal struct { - MinerCreateBlock func(p0 context.Context, p1 *types.BlockTemplate) (*types.BlockMsg, error) `perm:"write"` - - MinerGetBaseInfo func(p0 context.Context, p1 address.Address, p2 abi.ChainEpoch, p3 types.TipSetKey) (*types.MiningBaseInfo, error) `perm:"read"` + MinerCreateBlock func(ctx context.Context, bt *types.BlockTemplate) (*types.BlockMsg, error) `perm:"write"` + MinerGetBaseInfo func(ctx context.Context, maddr address.Address, round abi.ChainEpoch, tsk types.TipSetKey) (*types.MiningBaseInfo, error) `perm:"read"` } } func (s *IMiningStruct) MinerCreateBlock(p0 context.Context, p1 *types.BlockTemplate) (*types.BlockMsg, error) { return s.Internal.MinerCreateBlock(p0, p1) } - func (s *IMiningStruct) MinerGetBaseInfo(p0 context.Context, p1 address.Address, p2 abi.ChainEpoch, p3 types.TipSetKey) (*types.MiningBaseInfo, error) { return s.Internal.MinerGetBaseInfo(p0, p1, p2, p3) } -type IMultiSigStruct struct { +type IMessagePoolStruct struct { Internal struct { - MsigAddApprove func(p0 context.Context, p1 address.Address, p2 address.Address, p3 uint64, p4 address.Address, p5 address.Address, p6 bool) (*types.MessagePrototype, error) `perm:"sign"` - - MsigAddCancel func(p0 context.Context, p1 address.Address, p2 address.Address, p3 uint64, p4 address.Address, p5 bool) (*types.MessagePrototype, error) `perm:"sign"` - - MsigAddPropose func(p0 context.Context, p1 address.Address, p2 address.Address, p3 address.Address, p4 bool) (*types.MessagePrototype, error) `perm:"sign"` - - MsigApprove func(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address) (*types.MessagePrototype, error) `perm:"sign"` - - MsigApproveTxnHash func(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address, p4 address.Address, p5 types.BigInt, p6 address.Address, p7 uint64, p8 []byte) (*types.MessagePrototype, error) `perm:"sign"` - - MsigCancel func(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address) (*types.MessagePrototype, error) `perm:"sign"` - - MsigCancelTxnHash func(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address, p4 types.BigInt, p5 address.Address, p6 uint64, p7 []byte) (*types.MessagePrototype, error) `perm:"sign"` - - MsigCreate func(p0 context.Context, p1 uint64, p2 []address.Address, p3 abi.ChainEpoch, p4 types.BigInt, p5 address.Address, p6 types.BigInt) (*types.MessagePrototype, error) `perm:"sign"` - - MsigGetVested func(p0 context.Context, p1 address.Address, p2 types.TipSetKey, p3 types.TipSetKey) (types.BigInt, error) `perm:"read"` - - MsigPropose func(p0 context.Context, p1 address.Address, p2 address.Address, p3 types.BigInt, p4 address.Address, p5 uint64, p6 []byte) (*types.MessagePrototype, error) `perm:"sign"` - - MsigRemoveSigner func(p0 context.Context, p1 address.Address, p2 address.Address, p3 address.Address, p4 bool) (*types.MessagePrototype, error) `perm:"sign"` - - MsigSwapApprove func(p0 context.Context, p1 address.Address, p2 address.Address, p3 uint64, p4 address.Address, p5 address.Address, p6 address.Address) (*types.MessagePrototype, error) `perm:"sign"` + GasBatchEstimateMessageGas func(ctx context.Context, estimateMessages []*types.EstimateMessage, fromNonce uint64, tsk types.TipSetKey) ([]*types.EstimateResult, error) `perm:"read"` + GasEstimateFeeCap func(ctx context.Context, msg *types.Message, maxqueueblks int64, tsk types.TipSetKey) (big.Int, error) `perm:"read"` + GasEstimateGasLimit func(ctx context.Context, msgIn *types.Message, tsk types.TipSetKey) (int64, error) `perm:"read"` + GasEstimateGasPremium func(ctx context.Context, nblocksincl uint64, sender address.Address, gaslimit int64, tsk types.TipSetKey) (big.Int, error) `perm:"read"` + GasEstimateMessageGas func(ctx context.Context, msg *types.Message, spec *types.MessageSendSpec, tsk types.TipSetKey) (*types.Message, error) `perm:"read"` + MpoolBatchPush func(ctx context.Context, smsgs []*types.SignedMessage) ([]cid.Cid, error) `perm:"write"` + MpoolBatchPushMessage func(ctx context.Context, msgs []*types.Message, spec *types.MessageSendSpec) ([]*types.SignedMessage, error) `perm:"sign"` + MpoolBatchPushUntrusted func(ctx context.Context, smsgs []*types.SignedMessage) ([]cid.Cid, error) `perm:"write"` + MpoolCheckMessages func(ctx context.Context, protos []*types.MessagePrototype) ([][]types.MessageCheckStatus, error) `perm:"read"` + MpoolCheckPendingMessages func(ctx context.Context, addr address.Address) ([][]types.MessageCheckStatus, error) `perm:"read"` + MpoolCheckReplaceMessages func(ctx context.Context, msg []*types.Message) ([][]types.MessageCheckStatus, error) `perm:"read"` + MpoolClear func(ctx context.Context, local bool) error `perm:"write"` + MpoolDeleteByAdress func(ctx context.Context, addr address.Address) error `perm:"admin"` + MpoolGetConfig func(context.Context) (*types.MpoolConfig, error) `perm:"read"` + MpoolGetNonce func(ctx context.Context, addr address.Address) (uint64, error) `perm:"read"` + MpoolPending func(ctx context.Context, tsk types.TipSetKey) ([]*types.SignedMessage, error) `perm:"read"` + MpoolPublishByAddr func(context.Context, address.Address) error `perm:"write"` + MpoolPublishMessage func(ctx context.Context, smsg *types.SignedMessage) error `perm:"write"` + MpoolPush func(ctx context.Context, smsg *types.SignedMessage) (cid.Cid, error) `perm:"write"` + MpoolPushMessage func(ctx context.Context, msg *types.Message, spec *types.MessageSendSpec) (*types.SignedMessage, error) `perm:"sign"` + MpoolPushUntrusted func(ctx context.Context, smsg *types.SignedMessage) (cid.Cid, error) `perm:"write"` + MpoolSelect func(context.Context, types.TipSetKey, float64) ([]*types.SignedMessage, error) `perm:"read"` + MpoolSelects func(context.Context, types.TipSetKey, []float64) ([][]*types.SignedMessage, error) `perm:"read"` + MpoolSetConfig func(ctx context.Context, cfg *types.MpoolConfig) error `perm:"admin"` + MpoolSub func(ctx context.Context) (<-chan types.MpoolUpdate, error) `perm:"read"` + } +} - MsigSwapCancel func(p0 context.Context, p1 address.Address, p2 address.Address, p3 uint64, p4 address.Address, p5 address.Address) (*types.MessagePrototype, error) `perm:"sign"` +func (s *IMessagePoolStruct) GasBatchEstimateMessageGas(p0 context.Context, p1 []*types.EstimateMessage, p2 uint64, p3 types.TipSetKey) ([]*types.EstimateResult, error) { + return s.Internal.GasBatchEstimateMessageGas(p0, p1, p2, p3) +} +func (s *IMessagePoolStruct) GasEstimateFeeCap(p0 context.Context, p1 *types.Message, p2 int64, p3 types.TipSetKey) (big.Int, error) { + return s.Internal.GasEstimateFeeCap(p0, p1, p2, p3) +} +func (s *IMessagePoolStruct) GasEstimateGasLimit(p0 context.Context, p1 *types.Message, p2 types.TipSetKey) (int64, error) { + return s.Internal.GasEstimateGasLimit(p0, p1, p2) +} +func (s *IMessagePoolStruct) GasEstimateGasPremium(p0 context.Context, p1 uint64, p2 address.Address, p3 int64, p4 types.TipSetKey) (big.Int, error) { + return s.Internal.GasEstimateGasPremium(p0, p1, p2, p3, p4) +} +func (s *IMessagePoolStruct) GasEstimateMessageGas(p0 context.Context, p1 *types.Message, p2 *types.MessageSendSpec, p3 types.TipSetKey) (*types.Message, error) { + return s.Internal.GasEstimateMessageGas(p0, p1, p2, p3) +} +func (s *IMessagePoolStruct) MpoolBatchPush(p0 context.Context, p1 []*types.SignedMessage) ([]cid.Cid, error) { + return s.Internal.MpoolBatchPush(p0, p1) +} +func (s *IMessagePoolStruct) MpoolBatchPushMessage(p0 context.Context, p1 []*types.Message, p2 *types.MessageSendSpec) ([]*types.SignedMessage, error) { + return s.Internal.MpoolBatchPushMessage(p0, p1, p2) +} +func (s *IMessagePoolStruct) MpoolBatchPushUntrusted(p0 context.Context, p1 []*types.SignedMessage) ([]cid.Cid, error) { + return s.Internal.MpoolBatchPushUntrusted(p0, p1) +} +func (s *IMessagePoolStruct) MpoolCheckMessages(p0 context.Context, p1 []*types.MessagePrototype) ([][]types.MessageCheckStatus, error) { + return s.Internal.MpoolCheckMessages(p0, p1) +} +func (s *IMessagePoolStruct) MpoolCheckPendingMessages(p0 context.Context, p1 address.Address) ([][]types.MessageCheckStatus, error) { + return s.Internal.MpoolCheckPendingMessages(p0, p1) +} +func (s *IMessagePoolStruct) MpoolCheckReplaceMessages(p0 context.Context, p1 []*types.Message) ([][]types.MessageCheckStatus, error) { + return s.Internal.MpoolCheckReplaceMessages(p0, p1) +} +func (s *IMessagePoolStruct) MpoolClear(p0 context.Context, p1 bool) error { + return s.Internal.MpoolClear(p0, p1) +} +func (s *IMessagePoolStruct) MpoolDeleteByAdress(p0 context.Context, p1 address.Address) error { + return s.Internal.MpoolDeleteByAdress(p0, p1) +} +func (s *IMessagePoolStruct) MpoolGetConfig(p0 context.Context) (*types.MpoolConfig, error) { + return s.Internal.MpoolGetConfig(p0) +} +func (s *IMessagePoolStruct) MpoolGetNonce(p0 context.Context, p1 address.Address) (uint64, error) { + return s.Internal.MpoolGetNonce(p0, p1) +} +func (s *IMessagePoolStruct) MpoolPending(p0 context.Context, p1 types.TipSetKey) ([]*types.SignedMessage, error) { + return s.Internal.MpoolPending(p0, p1) +} +func (s *IMessagePoolStruct) MpoolPublishByAddr(p0 context.Context, p1 address.Address) error { + return s.Internal.MpoolPublishByAddr(p0, p1) +} +func (s *IMessagePoolStruct) MpoolPublishMessage(p0 context.Context, p1 *types.SignedMessage) error { + return s.Internal.MpoolPublishMessage(p0, p1) +} +func (s *IMessagePoolStruct) MpoolPush(p0 context.Context, p1 *types.SignedMessage) (cid.Cid, error) { + return s.Internal.MpoolPush(p0, p1) +} +func (s *IMessagePoolStruct) MpoolPushMessage(p0 context.Context, p1 *types.Message, p2 *types.MessageSendSpec) (*types.SignedMessage, error) { + return s.Internal.MpoolPushMessage(p0, p1, p2) +} +func (s *IMessagePoolStruct) MpoolPushUntrusted(p0 context.Context, p1 *types.SignedMessage) (cid.Cid, error) { + return s.Internal.MpoolPushUntrusted(p0, p1) +} +func (s *IMessagePoolStruct) MpoolSelect(p0 context.Context, p1 types.TipSetKey, p2 float64) ([]*types.SignedMessage, error) { + return s.Internal.MpoolSelect(p0, p1, p2) +} +func (s *IMessagePoolStruct) MpoolSelects(p0 context.Context, p1 types.TipSetKey, p2 []float64) ([][]*types.SignedMessage, error) { + return s.Internal.MpoolSelects(p0, p1, p2) +} +func (s *IMessagePoolStruct) MpoolSetConfig(p0 context.Context, p1 *types.MpoolConfig) error { + return s.Internal.MpoolSetConfig(p0, p1) +} +func (s *IMessagePoolStruct) MpoolSub(p0 context.Context) (<-chan types.MpoolUpdate, error) { + return s.Internal.MpoolSub(p0) +} - MsigSwapPropose func(p0 context.Context, p1 address.Address, p2 address.Address, p3 address.Address, p4 address.Address) (*types.MessagePrototype, error) `perm:"sign"` +type IMultiSigStruct struct { + Internal struct { + MsigAddApprove func(ctx context.Context, msig address.Address, src address.Address, txID uint64, proposer address.Address, newAdd address.Address, inc bool) (*types.MessagePrototype, error) `perm:"sign"` + MsigAddCancel func(ctx context.Context, msig address.Address, src address.Address, txID uint64, newAdd address.Address, inc bool) (*types.MessagePrototype, error) `perm:"sign"` + MsigAddPropose func(ctx context.Context, msig address.Address, src address.Address, newAdd address.Address, inc bool) (*types.MessagePrototype, error) `perm:"sign"` + MsigApprove func(ctx context.Context, msig address.Address, txID uint64, src address.Address) (*types.MessagePrototype, error) `perm:"sign"` + MsigApproveTxnHash func(ctx context.Context, msig address.Address, txID uint64, proposer address.Address, to address.Address, amt types.BigInt, src address.Address, method uint64, params []byte) (*types.MessagePrototype, error) `perm:"sign"` + MsigCancel func(ctx context.Context, msig address.Address, txID uint64, src address.Address) (*types.MessagePrototype, error) `perm:"sign"` + MsigCancelTxnHash func(context.Context, address.Address, uint64, address.Address, types.BigInt, address.Address, uint64, []byte) (*types.MessagePrototype, error) `perm:"sign"` + MsigCreate func(ctx context.Context, req uint64, addrs []address.Address, duration abi.ChainEpoch, val types.BigInt, src address.Address, gp types.BigInt) (*types.MessagePrototype, error) `perm:"sign"` + MsigGetVested func(ctx context.Context, addr address.Address, start types.TipSetKey, end types.TipSetKey) (types.BigInt, error) `perm:"read"` + MsigPropose func(ctx context.Context, msig address.Address, to address.Address, amt types.BigInt, src address.Address, method uint64, params []byte) (*types.MessagePrototype, error) `perm:"sign"` + MsigRemoveSigner func(ctx context.Context, msig address.Address, proposer address.Address, toRemove address.Address, decrease bool) (*types.MessagePrototype, error) `perm:"sign"` + MsigSwapApprove func(ctx context.Context, msig address.Address, src address.Address, txID uint64, proposer address.Address, oldAdd address.Address, newAdd address.Address) (*types.MessagePrototype, error) `perm:"sign"` + MsigSwapCancel func(ctx context.Context, msig address.Address, src address.Address, txID uint64, oldAdd address.Address, newAdd address.Address) (*types.MessagePrototype, error) `perm:"sign"` + MsigSwapPropose func(ctx context.Context, msig address.Address, src address.Address, oldAdd address.Address, newAdd address.Address) (*types.MessagePrototype, error) `perm:"sign"` } } func (s *IMultiSigStruct) MsigAddApprove(p0 context.Context, p1 address.Address, p2 address.Address, p3 uint64, p4 address.Address, p5 address.Address, p6 bool) (*types.MessagePrototype, error) { return s.Internal.MsigAddApprove(p0, p1, p2, p3, p4, p5, p6) } - func (s *IMultiSigStruct) MsigAddCancel(p0 context.Context, p1 address.Address, p2 address.Address, p3 uint64, p4 address.Address, p5 bool) (*types.MessagePrototype, error) { return s.Internal.MsigAddCancel(p0, p1, p2, p3, p4, p5) } - func (s *IMultiSigStruct) MsigAddPropose(p0 context.Context, p1 address.Address, p2 address.Address, p3 address.Address, p4 bool) (*types.MessagePrototype, error) { return s.Internal.MsigAddPropose(p0, p1, p2, p3, p4) } - func (s *IMultiSigStruct) MsigApprove(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address) (*types.MessagePrototype, error) { return s.Internal.MsigApprove(p0, p1, p2, p3) } - func (s *IMultiSigStruct) MsigApproveTxnHash(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address, p4 address.Address, p5 types.BigInt, p6 address.Address, p7 uint64, p8 []byte) (*types.MessagePrototype, error) { return s.Internal.MsigApproveTxnHash(p0, p1, p2, p3, p4, p5, p6, p7, p8) } - func (s *IMultiSigStruct) MsigCancel(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address) (*types.MessagePrototype, error) { return s.Internal.MsigCancel(p0, p1, p2, p3) } - func (s *IMultiSigStruct) MsigCancelTxnHash(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address, p4 types.BigInt, p5 address.Address, p6 uint64, p7 []byte) (*types.MessagePrototype, error) { return s.Internal.MsigCancelTxnHash(p0, p1, p2, p3, p4, p5, p6, p7) } - func (s *IMultiSigStruct) MsigCreate(p0 context.Context, p1 uint64, p2 []address.Address, p3 abi.ChainEpoch, p4 types.BigInt, p5 address.Address, p6 types.BigInt) (*types.MessagePrototype, error) { return s.Internal.MsigCreate(p0, p1, p2, p3, p4, p5, p6) } - func (s *IMultiSigStruct) MsigGetVested(p0 context.Context, p1 address.Address, p2 types.TipSetKey, p3 types.TipSetKey) (types.BigInt, error) { return s.Internal.MsigGetVested(p0, p1, p2, p3) } - func (s *IMultiSigStruct) MsigPropose(p0 context.Context, p1 address.Address, p2 address.Address, p3 types.BigInt, p4 address.Address, p5 uint64, p6 []byte) (*types.MessagePrototype, error) { return s.Internal.MsigPropose(p0, p1, p2, p3, p4, p5, p6) } - func (s *IMultiSigStruct) MsigRemoveSigner(p0 context.Context, p1 address.Address, p2 address.Address, p3 address.Address, p4 bool) (*types.MessagePrototype, error) { return s.Internal.MsigRemoveSigner(p0, p1, p2, p3, p4) } - func (s *IMultiSigStruct) MsigSwapApprove(p0 context.Context, p1 address.Address, p2 address.Address, p3 uint64, p4 address.Address, p5 address.Address, p6 address.Address) (*types.MessagePrototype, error) { return s.Internal.MsigSwapApprove(p0, p1, p2, p3, p4, p5, p6) } - func (s *IMultiSigStruct) MsigSwapCancel(p0 context.Context, p1 address.Address, p2 address.Address, p3 uint64, p4 address.Address, p5 address.Address) (*types.MessagePrototype, error) { return s.Internal.MsigSwapCancel(p0, p1, p2, p3, p4, p5) } - func (s *IMultiSigStruct) MsigSwapPropose(p0 context.Context, p1 address.Address, p2 address.Address, p3 address.Address, p4 address.Address) (*types.MessagePrototype, error) { return s.Internal.MsigSwapPropose(p0, p1, p2, p3, p4) } type INetworkStruct struct { Internal struct { - NetAddrsListen func(p0 context.Context) (peer.AddrInfo, error) `perm:"read"` - - NetworkConnect func(p0 context.Context, p1 []string) (<-chan types.ConnectionResult, error) `perm:"read"` - - NetworkFindPeer func(p0 context.Context, p1 peer.ID) (peer.AddrInfo, error) `perm:"read"` - - NetworkFindProvidersAsync func(p0 context.Context, p1 cid.Cid, p2 int) <-chan peer.AddrInfo `perm:"read"` - - NetworkGetBandwidthStats func(p0 context.Context) metrics.Stats `perm:"admin"` - - NetworkGetClosestPeers func(p0 context.Context, p1 string) ([]peer.ID, error) `perm:"read"` - - NetworkGetPeerAddresses func(p0 context.Context) []ma.Multiaddr `perm:"admin"` - - NetworkGetPeerID func(p0 context.Context) peer.ID `perm:"admin"` - - NetworkPeers func(p0 context.Context, p1 bool, p2 bool, p3 bool) (*types.SwarmConnInfos, error) `perm:"read"` - - Version func(p0 context.Context) (types.Version, error) `perm:"read"` + NetAddrsListen func(context.Context) (peer.AddrInfo, error) `perm:"read"` + NetworkConnect func(ctx context.Context, addrs []string) (<-chan types.ConnectionResult, error) `perm:"read"` + NetworkFindPeer func(ctx context.Context, peerID peer.ID) (peer.AddrInfo, error) `perm:"read"` + NetworkFindProvidersAsync func(ctx context.Context, key cid.Cid, count int) <-chan peer.AddrInfo `perm:"read"` + NetworkGetBandwidthStats func(ctx context.Context) metrics.Stats `perm:"admin"` + NetworkGetClosestPeers func(ctx context.Context, key string) ([]peer.ID, error) `perm:"read"` + NetworkGetPeerAddresses func(ctx context.Context) []ma.Multiaddr `perm:"admin"` + NetworkGetPeerID func(ctx context.Context) peer.ID `perm:"admin"` + NetworkPeers func(ctx context.Context, verbose, latency, streams bool) (*types.SwarmConnInfos, error) `perm:"read"` + Version func(context.Context) (types.Version, error) `perm:"read"` } } func (s *INetworkStruct) NetAddrsListen(p0 context.Context) (peer.AddrInfo, error) { return s.Internal.NetAddrsListen(p0) } - func (s *INetworkStruct) NetworkConnect(p0 context.Context, p1 []string) (<-chan types.ConnectionResult, error) { return s.Internal.NetworkConnect(p0, p1) } - func (s *INetworkStruct) NetworkFindPeer(p0 context.Context, p1 peer.ID) (peer.AddrInfo, error) { return s.Internal.NetworkFindPeer(p0, p1) } - func (s *INetworkStruct) NetworkFindProvidersAsync(p0 context.Context, p1 cid.Cid, p2 int) <-chan peer.AddrInfo { return s.Internal.NetworkFindProvidersAsync(p0, p1, p2) } - func (s *INetworkStruct) NetworkGetBandwidthStats(p0 context.Context) metrics.Stats { return s.Internal.NetworkGetBandwidthStats(p0) } - func (s *INetworkStruct) NetworkGetClosestPeers(p0 context.Context, p1 string) ([]peer.ID, error) { return s.Internal.NetworkGetClosestPeers(p0, p1) } - func (s *INetworkStruct) NetworkGetPeerAddresses(p0 context.Context) []ma.Multiaddr { return s.Internal.NetworkGetPeerAddresses(p0) } - func (s *INetworkStruct) NetworkGetPeerID(p0 context.Context) peer.ID { return s.Internal.NetworkGetPeerID(p0) } - -func (s *INetworkStruct) NetworkPeers(p0 context.Context, p1 bool, p2 bool, p3 bool) (*types.SwarmConnInfos, error) { +func (s *INetworkStruct) NetworkPeers(p0 context.Context, p1, p2, p3 bool) (*types.SwarmConnInfos, error) { return s.Internal.NetworkPeers(p0, p1, p2, p3) } - func (s *INetworkStruct) Version(p0 context.Context) (types.Version, error) { return s.Internal.Version(p0) } type IPaychanStruct struct { Internal struct { - PaychAllocateLane func(p0 context.Context, p1 address.Address) (uint64, error) `perm:"sign"` - - PaychAvailableFunds func(p0 context.Context, p1 address.Address) (*types.ChannelAvailableFunds, error) `perm:"sign"` - - PaychAvailableFundsByFromTo func(p0 context.Context, p1 address.Address, p2 address.Address) (*types.ChannelAvailableFunds, error) `perm:"sign"` - - PaychCollect func(p0 context.Context, p1 address.Address) (cid.Cid, error) `perm:"sign"` - - PaychGet func(p0 context.Context, p1 address.Address, p2 address.Address, p3 big.Int) (*types.ChannelInfo, error) `perm:"sign"` - - PaychGetWaitReady func(p0 context.Context, p1 cid.Cid) (address.Address, error) `perm:"sign"` - - PaychList func(p0 context.Context) ([]address.Address, error) `perm:"read"` - - PaychNewPayment func(p0 context.Context, p1 address.Address, p2 address.Address, p3 []types.VoucherSpec) (*types.PaymentInfo, error) `perm:"sign"` - - PaychSettle func(p0 context.Context, p1 address.Address) (cid.Cid, error) `perm:"sign"` - - PaychStatus func(p0 context.Context, p1 address.Address) (*types.Status, error) `perm:"read"` - - PaychVoucherAdd func(p0 context.Context, p1 address.Address, p2 *types.SignedVoucher, p3 []byte, p4 big.Int) (big.Int, error) `perm:"write"` - - PaychVoucherCheckSpendable func(p0 context.Context, p1 address.Address, p2 *types.SignedVoucher, p3 []byte, p4 []byte) (bool, error) `perm:"read"` - - PaychVoucherCheckValid func(p0 context.Context, p1 address.Address, p2 *types.SignedVoucher) error `perm:"read"` - - PaychVoucherCreate func(p0 context.Context, p1 address.Address, p2 big.Int, p3 uint64) (*types.VoucherCreateResult, error) `perm:"sign"` - - PaychVoucherList func(p0 context.Context, p1 address.Address) ([]*types.SignedVoucher, error) `perm:"write"` - - PaychVoucherSubmit func(p0 context.Context, p1 address.Address, p2 *types.SignedVoucher, p3 []byte, p4 []byte) (cid.Cid, error) `perm:"sign"` + PaychAllocateLane func(ctx context.Context, ch address.Address) (uint64, error) `perm:"sign"` + PaychAvailableFunds func(ctx context.Context, ch address.Address) (*types.ChannelAvailableFunds, error) `perm:"sign"` + PaychAvailableFundsByFromTo func(ctx context.Context, from, to address.Address) (*types.ChannelAvailableFunds, error) `perm:"sign"` + PaychCollect func(ctx context.Context, addr address.Address) (cid.Cid, error) `perm:"sign"` + PaychGet func(ctx context.Context, from, to address.Address, amt big.Int) (*types.ChannelInfo, error) `perm:"sign"` + PaychGetWaitReady func(ctx context.Context, sentinel cid.Cid) (address.Address, error) `perm:"sign"` + PaychList func(ctx context.Context) ([]address.Address, error) `perm:"read"` + PaychNewPayment func(ctx context.Context, from, to address.Address, vouchers []types.VoucherSpec) (*types.PaymentInfo, error) `perm:"sign"` + PaychSettle func(ctx context.Context, addr address.Address) (cid.Cid, error) `perm:"sign"` + PaychStatus func(ctx context.Context, pch address.Address) (*types.Status, error) `perm:"read"` + PaychVoucherAdd func(ctx context.Context, ch address.Address, sv *types.SignedVoucher, proof []byte, minDelta big.Int) (big.Int, error) `perm:"write"` + PaychVoucherCheckSpendable func(ctx context.Context, ch address.Address, sv *types.SignedVoucher, secret []byte, proof []byte) (bool, error) `perm:"read"` + PaychVoucherCheckValid func(ctx context.Context, ch address.Address, sv *types.SignedVoucher) error `perm:"read"` + PaychVoucherCreate func(ctx context.Context, pch address.Address, amt big.Int, lane uint64) (*types.VoucherCreateResult, error) `perm:"sign"` + PaychVoucherList func(ctx context.Context, pch address.Address) ([]*types.SignedVoucher, error) `perm:"write"` + PaychVoucherSubmit func(ctx context.Context, ch address.Address, sv *types.SignedVoucher, secret []byte, proof []byte) (cid.Cid, error) `perm:"sign"` } } func (s *IPaychanStruct) PaychAllocateLane(p0 context.Context, p1 address.Address) (uint64, error) { return s.Internal.PaychAllocateLane(p0, p1) } - func (s *IPaychanStruct) PaychAvailableFunds(p0 context.Context, p1 address.Address) (*types.ChannelAvailableFunds, error) { return s.Internal.PaychAvailableFunds(p0, p1) } - -func (s *IPaychanStruct) PaychAvailableFundsByFromTo(p0 context.Context, p1 address.Address, p2 address.Address) (*types.ChannelAvailableFunds, error) { +func (s *IPaychanStruct) PaychAvailableFundsByFromTo(p0 context.Context, p1, p2 address.Address) (*types.ChannelAvailableFunds, error) { return s.Internal.PaychAvailableFundsByFromTo(p0, p1, p2) } - func (s *IPaychanStruct) PaychCollect(p0 context.Context, p1 address.Address) (cid.Cid, error) { return s.Internal.PaychCollect(p0, p1) } - -func (s *IPaychanStruct) PaychGet(p0 context.Context, p1 address.Address, p2 address.Address, p3 big.Int) (*types.ChannelInfo, error) { +func (s *IPaychanStruct) PaychGet(p0 context.Context, p1, p2 address.Address, p3 big.Int) (*types.ChannelInfo, error) { return s.Internal.PaychGet(p0, p1, p2, p3) } - func (s *IPaychanStruct) PaychGetWaitReady(p0 context.Context, p1 cid.Cid) (address.Address, error) { return s.Internal.PaychGetWaitReady(p0, p1) } - func (s *IPaychanStruct) PaychList(p0 context.Context) ([]address.Address, error) { return s.Internal.PaychList(p0) } - -func (s *IPaychanStruct) PaychNewPayment(p0 context.Context, p1 address.Address, p2 address.Address, p3 []types.VoucherSpec) (*types.PaymentInfo, error) { +func (s *IPaychanStruct) PaychNewPayment(p0 context.Context, p1, p2 address.Address, p3 []types.VoucherSpec) (*types.PaymentInfo, error) { return s.Internal.PaychNewPayment(p0, p1, p2, p3) } - func (s *IPaychanStruct) PaychSettle(p0 context.Context, p1 address.Address) (cid.Cid, error) { return s.Internal.PaychSettle(p0, p1) } - func (s *IPaychanStruct) PaychStatus(p0 context.Context, p1 address.Address) (*types.Status, error) { return s.Internal.PaychStatus(p0, p1) } - func (s *IPaychanStruct) PaychVoucherAdd(p0 context.Context, p1 address.Address, p2 *types.SignedVoucher, p3 []byte, p4 big.Int) (big.Int, error) { return s.Internal.PaychVoucherAdd(p0, p1, p2, p3, p4) } - func (s *IPaychanStruct) PaychVoucherCheckSpendable(p0 context.Context, p1 address.Address, p2 *types.SignedVoucher, p3 []byte, p4 []byte) (bool, error) { return s.Internal.PaychVoucherCheckSpendable(p0, p1, p2, p3, p4) } - func (s *IPaychanStruct) PaychVoucherCheckValid(p0 context.Context, p1 address.Address, p2 *types.SignedVoucher) error { return s.Internal.PaychVoucherCheckValid(p0, p1, p2) } - func (s *IPaychanStruct) PaychVoucherCreate(p0 context.Context, p1 address.Address, p2 big.Int, p3 uint64) (*types.VoucherCreateResult, error) { return s.Internal.PaychVoucherCreate(p0, p1, p2, p3) } - func (s *IPaychanStruct) PaychVoucherList(p0 context.Context, p1 address.Address) ([]*types.SignedVoucher, error) { return s.Internal.PaychVoucherList(p0, p1) } - func (s *IPaychanStruct) PaychVoucherSubmit(p0 context.Context, p1 address.Address, p2 *types.SignedVoucher, p3 []byte, p4 []byte) (cid.Cid, error) { return s.Internal.PaychVoucherSubmit(p0, p1, p2, p3, p4) } type ISyncerStruct struct { Internal struct { - ChainSyncHandleNewTipSet func(p0 context.Context, p1 *types.ChainInfo) error `perm:"write"` - - ChainTipSetWeight func(p0 context.Context, p1 types.TipSetKey) (big.Int, error) `perm:"read"` - - Concurrent func(p0 context.Context) int64 `perm:"read"` - - SetConcurrent func(p0 context.Context, p1 int64) error `perm:"admin"` - - StateCall func(p0 context.Context, p1 *types.Message, p2 types.TipSetKey) (*types.InvocResult, error) `perm:"read"` - - SyncState func(p0 context.Context) (*types.SyncState, error) `perm:"read"` - - SyncSubmitBlock func(p0 context.Context, p1 *types.BlockMsg) error `perm:"write"` - - SyncerTracker func(p0 context.Context) *types.TargetTracker `perm:"read"` + ChainSyncHandleNewTipSet func(ctx context.Context, ci *types.ChainInfo) error `perm:"write"` + ChainTipSetWeight func(ctx context.Context, tsk types.TipSetKey) (big.Int, error) `perm:"read"` + Concurrent func(ctx context.Context) int64 `perm:"read"` + SetConcurrent func(ctx context.Context, concurrent int64) error `perm:"admin"` + StateCall func(ctx context.Context, msg *types.Message, tsk types.TipSetKey) (*types.InvocResult, error) `perm:"read"` + SyncState func(ctx context.Context) (*types.SyncState, error) `perm:"read"` + SyncSubmitBlock func(ctx context.Context, blk *types.BlockMsg) error `perm:"write"` + SyncerTracker func(ctx context.Context) *types.TargetTracker `perm:"read"` } } func (s *ISyncerStruct) ChainSyncHandleNewTipSet(p0 context.Context, p1 *types.ChainInfo) error { return s.Internal.ChainSyncHandleNewTipSet(p0, p1) } - func (s *ISyncerStruct) ChainTipSetWeight(p0 context.Context, p1 types.TipSetKey) (big.Int, error) { return s.Internal.ChainTipSetWeight(p0, p1) } - -func (s *ISyncerStruct) Concurrent(p0 context.Context) int64 { - return s.Internal.Concurrent(p0) -} - +func (s *ISyncerStruct) Concurrent(p0 context.Context) int64 { return s.Internal.Concurrent(p0) } func (s *ISyncerStruct) SetConcurrent(p0 context.Context, p1 int64) error { return s.Internal.SetConcurrent(p0, p1) } - func (s *ISyncerStruct) StateCall(p0 context.Context, p1 *types.Message, p2 types.TipSetKey) (*types.InvocResult, error) { return s.Internal.StateCall(p0, p1, p2) } - func (s *ISyncerStruct) SyncState(p0 context.Context) (*types.SyncState, error) { return s.Internal.SyncState(p0) } - func (s *ISyncerStruct) SyncSubmitBlock(p0 context.Context, p1 *types.BlockMsg) error { return s.Internal.SyncSubmitBlock(p0, p1) } - func (s *ISyncerStruct) SyncerTracker(p0 context.Context) *types.TargetTracker { return s.Internal.SyncerTracker(p0) } type IWalletStruct struct { Internal struct { - HasPassword func(p0 context.Context) bool `perm:"admin"` - - LockWallet func(p0 context.Context) error `perm:"admin"` - - SetPassword func(p0 context.Context, p1 []byte) error `perm:"admin"` - - UnLockWallet func(p0 context.Context, p1 []byte) error `perm:"admin"` - - WalletAddresses func(p0 context.Context) []address.Address `perm:"admin"` - - WalletBalance func(p0 context.Context, p1 address.Address) (abi.TokenAmount, error) `perm:"read"` - - WalletDefaultAddress func(p0 context.Context) (address.Address, error) `perm:"write"` - - WalletExport func(p0 context.Context, p1 address.Address, p2 string) (*types.KeyInfo, error) `perm:"admin"` - - WalletHas func(p0 context.Context, p1 address.Address) (bool, error) `perm:"write"` - - WalletImport func(p0 context.Context, p1 *types.KeyInfo) (address.Address, error) `perm:"admin"` - - WalletNewAddress func(p0 context.Context, p1 address.Protocol) (address.Address, error) `perm:"write"` - - WalletSetDefault func(p0 context.Context, p1 address.Address) error `perm:"write"` - - WalletSign func(p0 context.Context, p1 address.Address, p2 []byte, p3 types.MsgMeta) (*crypto.Signature, error) `perm:"sign"` - - WalletSignMessage func(p0 context.Context, p1 address.Address, p2 *types.Message) (*types.SignedMessage, error) `perm:"sign"` - - WalletState func(p0 context.Context) int `perm:"admin"` + HasPassword func(ctx context.Context) bool `perm:"admin"` + LockWallet func(ctx context.Context) error `perm:"admin"` + SetPassword func(ctx context.Context, password []byte) error `perm:"admin"` + UnLockWallet func(ctx context.Context, password []byte) error `perm:"admin"` + WalletAddresses func(ctx context.Context) []address.Address `perm:"admin"` + WalletBalance func(ctx context.Context, addr address.Address) (abi.TokenAmount, error) `perm:"read"` + WalletDefaultAddress func(ctx context.Context) (address.Address, error) `perm:"write"` + WalletExport func(ctx context.Context, addr address.Address, password string) (*types.KeyInfo, error) `perm:"admin"` + WalletHas func(ctx context.Context, addr address.Address) (bool, error) `perm:"write"` + WalletImport func(ctx context.Context, key *types.KeyInfo) (address.Address, error) `perm:"admin"` + WalletNewAddress func(ctx context.Context, protocol address.Protocol) (address.Address, error) `perm:"write"` + WalletSetDefault func(ctx context.Context, addr address.Address) error `perm:"write"` + WalletSign func(ctx context.Context, k address.Address, msg []byte, meta types.MsgMeta) (*crypto.Signature, error) `perm:"sign"` + WalletSignMessage func(ctx context.Context, k address.Address, msg *types.Message) (*types.SignedMessage, error) `perm:"sign"` + WalletState func(ctx context.Context) int `perm:"admin"` } } -func (s *IWalletStruct) HasPassword(p0 context.Context) bool { - return s.Internal.HasPassword(p0) -} - -func (s *IWalletStruct) LockWallet(p0 context.Context) error { - return s.Internal.LockWallet(p0) -} - +func (s *IWalletStruct) HasPassword(p0 context.Context) bool { return s.Internal.HasPassword(p0) } +func (s *IWalletStruct) LockWallet(p0 context.Context) error { return s.Internal.LockWallet(p0) } func (s *IWalletStruct) SetPassword(p0 context.Context, p1 []byte) error { return s.Internal.SetPassword(p0, p1) } - func (s *IWalletStruct) UnLockWallet(p0 context.Context, p1 []byte) error { return s.Internal.UnLockWallet(p0, p1) } - func (s *IWalletStruct) WalletAddresses(p0 context.Context) []address.Address { return s.Internal.WalletAddresses(p0) } - func (s *IWalletStruct) WalletBalance(p0 context.Context, p1 address.Address) (abi.TokenAmount, error) { return s.Internal.WalletBalance(p0, p1) } - func (s *IWalletStruct) WalletDefaultAddress(p0 context.Context) (address.Address, error) { return s.Internal.WalletDefaultAddress(p0) } - func (s *IWalletStruct) WalletExport(p0 context.Context, p1 address.Address, p2 string) (*types.KeyInfo, error) { return s.Internal.WalletExport(p0, p1, p2) } - func (s *IWalletStruct) WalletHas(p0 context.Context, p1 address.Address) (bool, error) { return s.Internal.WalletHas(p0, p1) } - func (s *IWalletStruct) WalletImport(p0 context.Context, p1 *types.KeyInfo) (address.Address, error) { return s.Internal.WalletImport(p0, p1) } - func (s *IWalletStruct) WalletNewAddress(p0 context.Context, p1 address.Protocol) (address.Address, error) { return s.Internal.WalletNewAddress(p0, p1) } - func (s *IWalletStruct) WalletSetDefault(p0 context.Context, p1 address.Address) error { return s.Internal.WalletSetDefault(p0, p1) } - func (s *IWalletStruct) WalletSign(p0 context.Context, p1 address.Address, p2 []byte, p3 types.MsgMeta) (*crypto.Signature, error) { return s.Internal.WalletSign(p0, p1, p2, p3) } - func (s *IWalletStruct) WalletSignMessage(p0 context.Context, p1 address.Address, p2 *types.Message) (*types.SignedMessage, error) { return s.Internal.WalletSignMessage(p0, p1, p2) } +func (s *IWalletStruct) WalletState(p0 context.Context) int { return s.Internal.WalletState(p0) } + +type IJwtAuthAPIStruct struct { + Internal struct { + AuthNew func(ctx context.Context, perms []auth.Permission) ([]byte, error) `perm:"admin"` + Verify func(ctx context.Context, host, token string) ([]auth.Permission, error) `perm:"read"` + } +} + +func (s *IJwtAuthAPIStruct) AuthNew(p0 context.Context, p1 []auth.Permission) ([]byte, error) { + return s.Internal.AuthNew(p0, p1) +} +func (s *IJwtAuthAPIStruct) Verify(p0 context.Context, p1, p2 string) ([]auth.Permission, error) { + return s.Internal.Verify(p0, p1, p2) +} -func (s *IWalletStruct) WalletState(p0 context.Context) int { - return s.Internal.WalletState(p0) +type FullNodeStruct struct { + IBlockStoreStruct + IChainStruct + IMarketStruct + IMiningStruct + IMessagePoolStruct + IMultiSigStruct + INetworkStruct + IPaychanStruct + ISyncerStruct + IWalletStruct + IJwtAuthAPIStruct }