SDK クイックスタート — Go + Python¶
trustmint は 2 つの言語でクライアント SDK を出荷するため、どちらのスタックのインテグレーターも統合コードの作成量を減らします。 SDK は、FGAI-HMAC AK/SK 署名 (AWS SigV4 ではない部分 — 登録 を参照) と生成された型付きエラー サーフェスを処理します。このページは 玄関です。 SDK ソースと README が信頼できるリファレンスです。
These are the backend-integration SDKs (your factory-service ↔ ThingMake). The device-side SDKs that implement the on-device DDI-1 wire contract are distributed separately — see Device SDKs. Don't look for device SDKs here.
真実の情報源¶
成果物 |
それは何ですか |
|---|---|
|
トップレベルの SDK ガイド — 最初の 5 分、AK/SK ワイヤー スキーム、サンプル マトリックス、Makefile ターゲット |
|
Go SDK (生成されたクライアント + |
|
Python SDK (生成されたクライアント + |
|
Four runnable example scenarios per language, plus a Python factory-integration gate |
The SDKs are generated from the ThingMake OpenAPI snapshot (rendered on the
API reference page) and the error catalog thingmake-error-catalog.json
— do not hand-fork them.
最初の5分¶
The reusable half of the SDK is the signer: it turns an ordinary HTTP client into one that signs every request with FGAI-HMAC. Wrap your client, point it at the public API host, and call a capability path.
// Go — wrap any http.Client
client := &http.Client{
Transport: signing.NewSigningTransport(accessKeyID, secretKey, nil),
}
resp, err := client.Get("https://api.flexgalaxy.ai/provisioning/v1/factory-integrations")
# Python — httpx or requests
import httpx
from thingmake_sdk.auth import AKSKAuth
client = httpx.Client(base_url="https://api.flexgalaxy.ai",
auth=AKSKAuth(access_key_id, secret_key))
resp = client.get("/provisioning/v1/factory-integrations")
Use https://api.staging.flexgalaxy.ai for the same API one release ahead while you
are still integrating. Both hosts speak the identical contract. The per-SDK READMEs
(sdks/go/README.md, sdks/python/README.md) document the generated client types on
top of the signer.
マトリックスの例¶
The example programs are reading material first: each one is a complete, commented implementation of one scenario, and each is wired to a local fixture rather than to the public host, so copy the shape rather than running them against production.
# |
シナリオ |
認証 |
Go |
Python |
|---|---|---|---|---|
01 |
ファクトリーサービスの登録 (ワンタイム AK/SK のキャプチャ) |
bearer token |
|
|
02 |
状態変更通知の受信 (サブスクリプション + Webhook リスナー) |
AK/SK |
|
|
03 |
Poll state changes via cursor (cursor loop, 410 recovery) |
AK/SK |
|
|
04 |
Webhook 署名を検証する (受信者をホストし、検証ヘルパーを呼び出す) |
Webhook シークレット |
|
|
05 |
Factory-integration gate (end-to-end identify/provision round trip) |
AK/SK |
— |
|
Example 01 mints an interactive bearer token, registers the factory integration, and writes
the one-time {access_key_id, secret_access_key} to a git-ignored .aksk.env.
Examples 02 / 03 / 04 read ACCESS_KEY_ID and SECRET_ACCESS_KEY from it. Never commit
.aksk.env — it holds your secret-key.
生成されたクライアント サーフェス¶
The generated Go/Python clients are regenerated from the OpenAPI snapshot and cover
the device-model registry under the registry capability:
/registry/v1/vendor/registry/v1/models/registry/v1/models/{id}/registry/v1/software/registry/v1/software/{id}
The CLI reference lists the full capability groups a credential can reach; the API reference is the endpoint-level contract. Treat a method's presence in a generated client as availability, and those two pages as the supported surface.