diff --git a/api/client.go b/api/client.go index 7cf69a26..6a5984a5 100644 --- a/api/client.go +++ b/api/client.go @@ -210,6 +210,12 @@ func (c *Client) ContractRevisions(id types.FileContractID) (resp []explorer.Fil return } +// V2Contract returns the v2 file contract with the specified ID. +func (c *Client) V2Contract(id types.FileContractID) (resp explorer.V2FileContract, err error) { + err = c.c.GET(fmt.Sprintf("/v2/contracts/%s", id), &resp) + return +} + // V2Contracts returns the v2 contracts with the specified IDs. func (c *Client) V2Contracts(ids []types.FileContractID) (resp []explorer.V2FileContract, err error) { err = c.c.POST("/v2/contracts", ids, &resp)