4 Commits

Author SHA1 Message Date
jholdstock
0c5016ae62 types: Add expired/missed to /vspinfo response.
Adding fields for expired/missed to /vspinfo response, deprecate
revoked.

This will need a minor version bump in the types module.
2023-08-31 09:18:03 +01:00
jholdstock
6d78e16b23 types: Use ErrorCode in ErrorResponse.
Using ErrorCode instead of int64 in the ErrorResponse type removes the burden of type conversion from calling code.
2023-03-16 16:07:38 +00:00
Jamie Holdstock
6d872db60e
Rename APIError to ErrorResponse. (#360)
Last commit before tagging v1.0.0 of the types module. The name ErrorResponse is consistent with all other response types.
2022-11-22 17:09:06 +08:00
Jamie Holdstock
ed1fac1a2a
Add types module for API requests/responses/errors. (#356)
* Remove helper func getCommitmentAddress.

This function is only used in one place so removing it does not introduce any duplication. Removing the func also removes the need for errors.Is comparison, which will be very useful in upcoming changes.

* Rename apiError to ErrorCode.

* Don't use inline type for API errors.

* Export webapi errors.

* Export webapi request/responses.

* Add types module for API requests/responses/errors
2022-11-18 15:06:47 -05:00