Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetBitcoinAnchorsResponse ¶
type GetBitcoinAnchorsResponse struct {
Anchors []slidechain.BitcoinAnchorData `json:"anchors"`
}
GetBitcoinAnchorsResponse is the response for Bitcoin anchors
type GetPolygonResponse ¶
type GetPolygonResponse struct { SubchainID string `json:"subchainID"` TimeStep int `json:"timeStep"` Vertices []slidechain.GeometricCoordinate `json:"vertices"` SpanoRoot string `json:"spanoRoot"` CreatedAt time.Time `json:"createdAt"` }
GetPolygonResponse is the response for polygon data
type GetSpanoRootArgs ¶
type GetSpanoRootArgs struct {
IncludeCoordinates bool `json:"includeCoordinates"` // Whether to include the full coordinate history
}
GetSpanoRootArgs is the request for retrieving a SpanoRoot
type GetSpanoRootResponse ¶
type GetSpanoRootResponse struct { SpanoRootHash string `json:"spanoRootHash"` TimeStep int `json:"timeStep"` // Latest time step (Z-coordinate) VertexCount int `json:"vertexCount"` // Number of vertices in latest polygon Coordinates []slidechain.GeometricCoordinate `json:"coordinates,omitempty"` BitcoinAnchor *slidechain.BitcoinAnchorData `json:"bitcoinAnchor,omitempty"` }
GetSpanoRootResponse is the response for a SpanoRoot query
type RegisterSubchainArgs ¶
type RegisterSubchainArgs struct { GenesisBlockHash string `json:"genesisBlockHash"` // The genesis block hash of the new subchain SubchainName string `json:"subchainName"` // Optional name for the subchain OwnerID string `json:"ownerID"` // Optional owner identifier }
RegisterSubchainArgs is the request for registering a subchain
type RegisterSubchainResponse ¶
type RegisterSubchainResponse struct { Success bool `json:"success"` SubchainID string `json:"subchainID"` // The assigned ID for the subchain ParentHash string `json:"parentHash"` // The parent SlideChain block hash CombinedHash string `json:"combinedHash"` // The combined hash that's recorded RegistrationTx string `json:"registrationTx"` // Transaction ID on SlideChain }
RegisterSubchainResponse is the response for the registration
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides the SlideChain API endpoints
func NewService ¶
func NewService( log logging.Logger, slideManager *slidechain.SlideChainManager, zkpVerifier *slidechain.ZKPVerifier, btcAnchor *slidechain.BitcoinAnchorManager, ) *Service
NewService creates a new SlideChain API service
type SubmitArtifactsArgs ¶
type SubmitArtifactsArgs struct { SubchainID string `json:"subchainID"` // The ID of the subchain Artifacts []string `json:"artifacts"` // Artifact hashes in hex format ZKProof *string `json:"zkProof"` // Optional ZK proof }
SubmitArtifactsArgs is the request for submitting artifact hashes
type SubmitArtifactsResponse ¶
type SubmitArtifactsResponse struct { Success bool `json:"success"` SpanoRoot string `json:"spanoRoot"` // The computed SpanoRoot hash TimeStep int `json:"timeStep"` // The Z-coordinate (time step) VertexCount int `json:"vertexCount"` // Number of vertices in the polygon TxID string `json:"txID"` // Transaction ID on SlideChain }
SubmitArtifactsResponse is the response for the submission
type VerifyZKPArgs ¶
type VerifyZKPArgs struct { SpanoRootHash string `json:"spanoRootHash"` Proof *slidechain.ZKProof `json:"proof"` }
VerifyZKPArgs is the request for verifying a ZKP
type VerifyZKPResponse ¶
VerifyZKPResponse is the response for ZKP verification