Commit Graph

12 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.
v0.5.0
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.
v0.4.0
2026-06-04 12:32:33 -04:00
d945029f33 add GetInterchain: trace a transaction/block to validator blocks + interchain anchors
New Transaction.GetInterchain and Block.GetInterchain call the prime-node
/api/v1/{transaction,block}/{id}/interchain endpoints, returning an
InterchainTrace {blockId, validatorBlocks, interchainTransactions}. Adds local
VerificationBlock / InterchainTransaction / InterchainTrace model types.
v0.3.0
2026-06-02 14:12:49 -04:00
621e359817 Fix Block model to match server: nest header with camelCase keys
The block endpoint returns block id / prev / timestamp nested under a
"header" object with camelCase keys (blockId, dcId, prevId, prevProof,
timestamp) and a proof of just {proof}. The previous flat snake_case
Block fields never matched the response and always deserialized empty.
Add a BlockHeader struct, nest it in Block, and make Proof.Scheme
omitempty. Verified live against a dev chain.
2026-05-29 17:08:47 -04:00
18ac756d44 Rename references to match new repo names v0.2.0 2026-02-23 10:46:23 -05: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
ee3c6941ee Added functions to get API partial credentials v0.1.1 2025-12-29 11:04:45 -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
5576cced09 Added Apache License v0.1.0 2025-11-11 13:31:51 -05:00
6decdb603c Initial Commit 2025-11-10 16:44:59 -05:00