Commit Graph

7 Commits

Author SHA1 Message Date
7d8e23768f Add proof-measure client (public securedBy / measured-immutability service)
proof-measure is a separate, public, unauthenticated Dragonchain service. Adds:
- client.UnauthenticatedClient: HMAC-free transport mirroring Client's
  marshal/decode/error handling.
- proofmeasure.ProofMeasureClient: GetSecurity / Report / Health, default base
  URL https://proof-measure.dragonchain.com; standalone + a DragonchainSDK.ProofMeasure handle.
- models for SecurityResult/RawMeasure/ReportRequest/TransactionReport/etc
  (decimals as strings, timestamps int64).
- httptest unit tests.
2026-06-04 13:40:21 -04:00
bc2b622873 client: allow injecting a custom *http.Client (SSRF-guardable)
NewClient hardcoded its *http.Client, so a server-side caller making
requests to an attacker-influenced baseURL (a tenant's prime_endpoint)
had no way to attach an SSRF policy — the transport followed redirects
and dialed any resolved IP, reachable being the cloud metadata service.

Add NewClientWithHTTPClient + NewDragonchainSDKWithHTTPClient so callers
can supply a client whose transport enforces a dial-time resolved-IP guard
and redirect policy. Existing constructors delegate with the prior default
(30s timeout), so this is backward compatible — the guard itself lives in
the consuming server (e.g. brill-api/pkg/prime), not in this client lib.
2026-06-04 12:32:33 -04:00
4dabbcd23a Document fire-and-forget transaction mode
Add godoc to Create and CreateBulk explaining they return immediately
without waiting for block inclusion. Update package-level example to show
both fire-and-forget and wait-for-block patterns. Add Transaction Modes
section to README with code examples.
2026-02-17 13:24:35 -05:00
c3d6d017df Rename module from dragonchain-prime-sdk-go to prime-sdk-go 2026-02-12 11:50:24 -05:00
e15b205f9c Add remote smart contract and gRPC connection support
Add Remote field to SmartContractCreateRequest and GrpcConnectionInfo
struct to SmartContract model for remote smart contract execution
via gRPC.
2026-02-11 11:20:21 -05:00
eb6100b736 Add context.Context parameter to all API methods
Enable request timeout and cancellation control by adding context.Context
as the first parameter to all SDK API methods. This allows users to:
- Set per-request timeouts
- Cancel in-flight requests
- Pass request-scoped values
2025-12-29 11:00:13 -05:00
6decdb603c Initial Commit 2025-11-10 16:44:59 -05:00