Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
WorkspaceID string
// contains filtered or unexported fields
}
func New ¶
New builds an HTTP client backed by bron-sdk-go using the resolved profile. The private key (JWK) is read from KeyFile. Workspace ID is interpolated into request paths via Do().
func (*Client) Do ¶
func (c *Client) Do(ctx context.Context, method, path string, pathParams map[string]string, body, query, result interface{}) error
Do executes a request, substituting `{workspaceId}` and any other path placeholders (`{accountId}`, `{transactionId}`, ...) before sending. All values are URL-escaped via `url.PathEscape`.
Decoding goes through json.Decoder.UseNumber so decimal payloads keep their exact wire representation. The default decoder converts every JSON number to float64, which truncates large integers and rounds long decimals — fatal for balances/amounts where a single trailing digit can be billions of wei. We capture the raw response into json.RawMessage and re-decode locally so that numeric leaves arrive as json.Number; output formatters then emit them verbatim.