v1.5.0 targets Blnk Core 0.15.4. v1.4.0 shipped Core 0.15.3 parity; this
release adds the full Core error catalogue, search.multi_search, and list
methods for ledgers, balances, transactions, and monitors by balance id.
See the error codes guide and the Core changelog.
BlnkErrorCode— Mirrors Core's fullerror_detail.codecatalogue (internal/apierror/codes.go), grouped by prefix:GEN_,AUTH_,APIKEY_,TXN_,BAL_,LGR_,ACC_,IDT_,RECON_,META_,HOOK_,QUEUE_,SRCH_, andADMIN_. Each constant documents the HTTP status Core pairs it with.- Codes introduced or re-routed in Core 0.15.4 that callers should branch on:
TXN_ALREADY_REFUNDED(409): refunding a transaction twice, or refunding a refund. Previously the reversal went through.BAL_NOT_FOUND(404): a transaction naming a missing balance. Previously reported asTXN_NOT_FOUND.TXN_VALIDATION_ERROR(400) is now also returned for a split request that carries bothsourcesanddestinations.GEN_CONFLICT(409) is now also returned when a multi-leg refund fails part-way.
- The three existing constants (
TXN_INVALID_AMOUNT,GEN_CONFLICT,TXN_VALIDATION_ERROR) keep their values; no caller changes are needed. Guide
search.multi_search— Wraps Core'sPOST /multi-search(api/api.go:router.POST("/multi-search", a.MultiSearch)). That route has been in Core since v0.10.0 (b396752); this SDK release is aligned with Core 0.15.4. Core binds the body to Typesense'sMultiSearchSearchesParameterand forwards it unchanged, so the wire shape is{"searches": [{"collection": ..., "q": ..., ...}]}. The response hasresultsin the same order assearches. Each entry is validated client-side with the same rules assearch(), and failures name the entry (searches[1].collection ...).
ledgers.list/ledger_balances.list— Wrap Core'sGET /ledgersandGET /balances. Both take optionalListOptions(limitat least1,offsetat least0) as query parameters; unset fields fall back to Core's defaults of10and0. Invalid pagination is rejected client-side with a400before any request is made.transactions.list— Wraps Core'sGET /transactions, with the same optionalListOptions. Core's default page here islimit=20. Core'sGetAllTransactionshandler silently falls back to its defaults on invalid pagination; the SDK rejects it with a400instead so mistakes are visible.balance_monitor.list_by_balance_id— Wraps Core'sGET /balance-monitors/balances/:balance_id. Existingbalance_monitor.list()(all monitors) is unchanged.
These GET list routes have been in Core since ~0.14; this SDK release is aligned with Core 0.15.4.
v1.4.0 targets Blnk Core 0.15.3. v1.3.0 shipped Core 0.15.0 parity; this
release adds dry-run previews, General Ledger indicator on create, refund
narration/metadata, and named Core error codes.
See Dry-run transactions and the Core changelog.
-
dry_run— Optional ontransactions.create,create_bulk,refund,update_status,bulk_commit_inflight, andbulk_void_inflight. Core returns HTTP 200 with a preview (would_apply,rejection,balances). Nothing is written;referenceis not consumed. Typed asTransactionPreview/BulkTransactionPreview. Useis_transaction_preview/is_bulk_transaction_previewto narrow a liveApiResponse.datadict. Guide -
transactions.refund— Acceptsdescriptionandmeta_datain addition toskip_queue. Empty description inherits the original; metadata is merged onto the inherited copy. Reference
ledger_balances.create— Optionalindicator(must start with@, no spaces) whenledger_idis"general_ledger_id". Duplicate indicator + currency returns409/GEN_CONFLICT. Guide
hooks.list()—typeremains optional. Omitting it lists PRE and POST hooks (GET /hooks).
BlnkErrorCode— Exported constants forTXN_INVALID_AMOUNT,GEN_CONFLICT, andTXN_VALIDATION_ERROR. Core 0.15.3 usesTXN_VALIDATION_ERRORfor negative amounts and for source equal to destination; duplicate GL indicators returnGEN_CONFLICT. Branch onresponse.error.code. Guide