Go SDK for IDRX — a regulated stablecoin system for fiat on/off-ramp, multi-chain operations, and dual-auth KYC flows.
go get github.com/widnyana/idrx-go- Dual authentication (Business & User).
- Full REST API and Smart Contract coverage
- Multi-chain support: Base, Polygon, BSC, Lisk, Kaia, World Chain, Etherlink, Gnosis
- Safe production use: strong type validation, context, retries, structured error.
// Business context biz := idrx.NewClient(idrx.WithBusinessAuth(bizKey, bizSecret)) // User context (from onboarding response) user := idrx.NewClient(idrx.WithUserAuth(userKey, userSecret))resp, err := biz.Account.Onboard(ctx, &models.OnboardingRequest{ Email: "user@company.com", Fullname: "John Doe", }) userKey, userSecret := resp.APIKey, resp.APISecretresp, err := user.Transaction.MintRequest(ctx, &models.MintRequest{ ToBeMinted: "100000", NetworkChainID: blockchain.PolygonChainID, // Polygon Mainnet }) // redirect user to resp.PaymentURLresp, err := user.Transaction.RedeemRequest(ctx, &models.RedeemRequest{ TxHash: "0x1234...", BankCode: "BNK", })acc, _ := user.Account.AddBankAccount(ctx, &models.AddBankAccountRequest{BankCode: "BNK"}) list, _ := user.Account.GetBankAccounts(ctx) _ = user.Account.DeleteBankAccount(ctx, acc.ID)Custom client:
client := idrx.NewClient( idrx.WithBusinessAuth(apiKey, secret), idrx.WithTimeout(45*time.Second), )Error handling:
if err != nil { if e, ok := err.(*models.APIError); ok { log.Printf("[%d] %s", e.StatusCode, e.Message) } }For detailed blockchain integration, see BLOCKCHAIN.md.
For detailed APIs and blockchain setup, see examples/README.md or docs.idrx.co.