github.com/algorand/go-algorand-sdk@v1.24.0/client/v2/algod/getStateProof.go (about)

     1  package algod
     2  
     3  import (
     4  	"context"
     5  	"fmt"
     6  
     7  	"github.com/algorand/go-algorand-sdk/client/v2/common"
     8  	"github.com/algorand/go-algorand-sdk/client/v2/common/models"
     9  )
    10  
    11  // GetStateProof get a state proof that covers a given round
    12  type GetStateProof struct {
    13  	c *Client
    14  
    15  	round uint64
    16  }
    17  
    18  // Do performs the HTTP request
    19  func (s *GetStateProof) Do(ctx context.Context, headers ...*common.Header) (response models.StateProof, err error) {
    20  	err = s.c.get(ctx, &response, fmt.Sprintf("/v2/stateproofs/%s", common.EscapeParams(s.round)...), nil, headers)
    21  	return
    22  }