atlantic

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// Proofs
	GenerateProof(ctx context.Context, req *GenerateProofRequest) (*GenerateProofResponse, error)
	ListProofs(ctx context.Context, req *ListProofsRequest) (*ListProofsResponse, error)
	GetProof(ctx context.Context, atlanticQueryID string) (*Query, error)
}

Client defines the interface for interacting with the Atlantic API

type GenerateProofRequest

type GenerateProofRequest struct {
	PieFile []byte
	Layout  Layout
	Prover  Prover
}

Request/Response types for Proof Generation

type GenerateProofResponse

type GenerateProofResponse struct {
	AtlanticQueryID string `json:"atlanticQueryId"`
}

type Layout

type Layout int

Layout represents the supported proof layout types

const (
	LayoutUnknown Layout = iota
	LayoutAuto
	LayoutRecursive
	LayoutRecursiveWithPoseidon
	LayoutSmall
	LayoutDex
	LayoutStarknet
	LayoutStarknetWithKeccak
	LayoutDynamic
)

func (Layout) MarshalJSON

func (l Layout) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface

func (Layout) String

func (l Layout) String() string

func (*Layout) UnmarshalJSON

func (l *Layout) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface

type ListProofsRequest

type ListProofsRequest struct {
	Limit  *int `json:"limit,omitempty"`
	Offset *int `json:"offset,omitempty"`
}

Request/Response types for Listing Proofs

type ListProofsResponse

type ListProofsResponse struct {
	SharpQueries []Query `json:"sharpQueries"`
	Total        int     `json:"total"`
}

type Prover

type Prover int

Prover represents the supported prover types

const (
	ProverUnknown Prover = iota
	ProverStarkwareSharp
)

func (Prover) MarshalJSON

func (p Prover) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface

func (Prover) String

func (p Prover) String() string

func (*Prover) UnmarshalJSON

func (p *Prover) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface

type Query

type Query struct {
	ID                string     `json:"id"`
	SubmittedByClient string     `json:"submittedByClient"`
	Status            string     `json:"status"`
	Step              string     `json:"step"`
	ProgramHash       string     `json:"programHash"`
	Layout            string     `json:"layout"`
	ProgramFactHash   string     `json:"programFactHash"`
	Price             string     `json:"price"`
	GasUsed           int64      `json:"gasUsed"`
	CreditsUsed       int64      `json:"creditsUsed"`
	TraceCreditsUsed  int64      `json:"traceCreditsUsed"`
	IsFactMocked      bool       `json:"isFactMocked"`
	Prover            Prover     `json:"prover"`
	Chain             string     `json:"chain"`
	Steps             []string   `json:"steps"`
	CreatedAt         time.Time  `json:"createdAt"`
	CompletedAt       *time.Time `json:"completedAt,omitempty"`
}

Query represents a proof generation query

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL