All notable changes to the Mintlayer Go SDK are documented here.
The format follows Keep a Changelog. This project adheres to Semantic Versioning.
Cursor pagination for the api-server v2 endpoints introduced in mintlayer-core PR #2130 (api-server 1.4.1):
- Pools:
ListPoolsPageandPoolsPager— cursor envelope over/v2/pool; cursors work only with the defaultby_heightsort. OnListPoolsPageany other sort with a cursor is a server 400Bad request, propagated as*HTTPError(api-server contract);PoolsPagerrejects the same combination client-side with a*RequestError. - Transactions:
ListTransactionsPageandTransactionsPager— cursor envelope over the global listing (newest block first, transactions in block order within each block);WithOffsetMode("legacy"|"absolute")selects the offset-based listing instead, and cursor +offset_modeis rejected client-side with a*RequestError.Transaction.BlockIDis documented as the confirming block's hash (empty for mempool transactions). - Holders:
ListCoinHolders,ListTokenHolders,CoinHoldersPager,TokenHoldersPager, and theHoldertype (address + amount; token ids are exact case-sensitive bech32, unknown ids are 404Token not found). - Order book:
GetOrderBook,OrderBookPager, and theOrderBookPage/OrderBookLevel/OrderBookPricetypes — aggregated price levels (exact reduced-rational price plus floored decimal rendering) per side; requiredWithSide, side-specific cursors, and the truncation invariant (Truncatedtrue ⇒NextCursornil at the server'sOrderBookMaxOrders= 10000-order cap; the paginator stops there). - Shared paginator: generic
Pager[T](NewPager,NextPage,Walk,NextCursor,Truncated) and theCursorPage[T]{items, next_cursor}envelope; pre-1.4.1 bare-array responses are accepted and wrapped, a server-issued empty cursor is treated as end-of-listing, an empty fetched page ends the walk (the api-server issues a cursor only alongside items), andNextPagenever loses the unserved remainder of a partially consumed page. - List options:
WithItems(validated 1..=100 =MaxNumItems; the server rejectsitems=0on every paginated endpoint),WithOffset,WithCursor(opaque, non-empty; never constructed client-side),WithSort,WithOffsetMode,WithSide; inapplicable options fail client-side with*RequestError— the single-page methods at call time, the cursor pagers at construction time (PoolsPagerrejects non-default sorts,TransactionsPagerrejectsWithOffsetMode). - Typed errors:
HTTPError.Message/HTTPError.Kindpopulated from the server's{"error": ...}body,ErrorKindclassification, and anerrors.Issentinel for every well-known server error (ErrInvalidCursor,ErrInvalidNumItems,ErrTokenNotFound,ErrBadRequest,ErrInvalidOffsetMode,ErrInvalidPoolsSortOrder,ErrInvalidTokenID,ErrInvalidOrderPair).
Documented semantics: page stability is only guaranteed once the indexer's scanner is fully caught up (walks during catch-up/reorgs may skip or repeat entries); offset-based listings remain unchanged as the simple alternative for shallow listings; on pools/holders/order book a cursor silently overrides the offset page position server-side.
Docs and examples: README indexer section, docs/indexer.md (cursor pagination guide, holders/order book reference, error table), and the runnable examples/indexer-paging.
0.1.0 — 2026-04-16
Initial public release of github.com/mintlayer/go-sdk.
Configstruct withNodeURL,IndexerURL,WalletURL,Username,Password.New(cfg Config) *Client— constructs only the sub-clients whose URL is non-empty.InitWASM(ctx) error— opt-in WASM initialisation (~400 ms).Close() error— releases WASM resources.- Convenience type re-exports:
Amount,Network,Mainnet/Testnet/Regtest/Signet,NewAmount,NewAmountZero,SignatureHashType,SourceId,TotalSupply,FreezableToken,TokenUnfreezable,TxAdditionalInfo,PoolInfo,OrderInfo.
- JSON-RPC 2.0 transport with
WithBasicAuth,WithHTTPClient,WithTimeoutoptions. - chainstate:
ChainstateInfo,BestBlockID,BestBlockHeight,BlockIDAtHeight,BlockHeightInMainChain,GetBlock,GetBlockJSON,GetMainchainBlocks,GetUTXO,StakePoolBalance,StakerBalance,PoolDecommissionDestination,DelegationShare,TokenInfo,TokensInfo,OrderInfo,OrdersInfoByCurrencies,SubmitBlock. - mempool:
ContainsTx,ContainsOrphanTx,GetTransaction,SubmitTransaction,GetFeeRate,GetFeeRatePoints,MemoryUsage. - node:
NodeVersion,NodeShutdown. - p2p:
GetPeerCount,GetConnectedPeers,GetBindAddresses,AddReservedNode,RemoveReservedNode,Connect,Disconnect,ListBanned,Ban,Unban. RPCErrortype withCodeandMessage.- Unit tests using
httptest.NewServercovering all RPC methods and error paths.
- HTTP REST transport with
WithHTTPClient,WithTimeoutoptions. - chain:
GetTip,GetGenesis,GetBlockIDAtHeight. - block:
GetBlock,GetBlockHeader,GetBlockReward,GetBlockTransactionIDs. - transaction:
ListTransactions,GetTransaction,GetTransactionMerklePath,GetTransactionOutput,SubmitTransaction. - address:
GetAddressInfo,GetSpendableUTXOs,GetAllUTXOs,GetDelegations,GetTokenAuthority. - pool:
ListPools,GetPool,GetPoolBlockStats,GetPoolDelegations. - token/NFT:
ListTokens,GetToken,GetTokenTransactions,FindTokensByTicker,GetNFT. - order:
ListOrders,GetOrder,ListOrdersByPair. - statistics:
GetCoinStatistics,GetTokenStatistics,GetFeeRate. PageOptsandPoolListOptspagination helpers.HTTPErrortype withStatusCodeandBody.- Unit tests using
httptest.NewServer.
- JSON-RPC 2.0 transport with
WithBasicAuth,WithHTTPClient,WithTimeoutoptions. - management:
CreateWallet,RecoverWallet,OpenWallet,CloseWallet,GetWalletInfo,SyncWallet,RescanWallet,BestBlock,CreateAccount,RenameAccount,GetBalance,NewAddress,ShowReceiveAddresses,RevealPublicKey,EncryptPrivateKeys,UnlockPrivateKeys,LockPrivateKeys. - transactions:
AddressSend,TokenSend,SweepSpendable,SpendUTXO,ComposeTransaction,SignRawTransaction,InspectTransaction,SubmitTransaction,ListTransactionsByAddress,ListPendingTransactions,GetTransaction,AbandonTransaction,DepositData. - staking:
CreateStakePool,DecommissionStakePool,ListOwnedPools,GetPoolBalance,StartStaking,StopStaking,GetStakingStatus,CreateDelegation,DelegateStaking,WithdrawFromDelegation,ListDelegations. - tokens:
IssueToken,IssueNFT,MintTokens,UnmintTokens,LockTokenSupply,FreezeToken,UnfreezeToken,ChangeTokenAuthority,SendToken. RPCErrortype withCodeandMessage.- Unit tests using
httptest.NewServer.
- Embedded
wasm_wrappers_bg.wasm— no CGO, pure Go. - keys:
MakePrivateKey,MakeDefaultAccountPrivkey,PublicKeyFromPrivateKey,ExtendedPublicKeyFromExtendedPrivateKey,MakeReceivingAddress,MakeChangeAddress,MakeReceivingAddressPublicKey,MakeChangeAddressPublicKey. - addresses:
EncodeDestination,PubkeyToPubkeyHashAddress,EncodeMultisigChallenge,MultisigChallengeToAddress. - inputs:
EncodeInputForUtxo,EncodeInputForWithdrawFromDelegation,EncodeInputForMintTokens,EncodeInputForUnmintTokens,EncodeInputForLockTokenSupply,EncodeInputForFreezeToken,EncodeInputForUnfreezeToken,EncodeInputForChangeTokenAuthority,EncodeInputForChangeTokenMetadataURI,EncodeInputForConcludeOrder,EncodeInputForFillOrder,EncodeInputForFreezeOrder. - outputs:
EncodeOutputTransfer,EncodeOutputTokenTransfer,EncodeOutputLockThenTransfer,EncodeOutputTokenLockThenTransfer,EncodeOutputCoinBurn,EncodeOutputTokenBurn,EncodeOutputCreateDelegation,EncodeOutputDelegateStaking,EncodeOutputCreateStakePool,EncodeOutputProduceBlockFromStake,EncodeOutputDataDeposit,EncodeOutputHTLC,EncodeOutputIssueFungibleToken,EncodeOutputIssueNFT,EncodeCreateOrderOutput. - transactions:
EncodeTransaction,EncodeOutpointSourceId,GetTransactionID,EstimateTransactionSize,EncodeSignedTransaction,EncodePartiallySignedTransaction,DecodePartiallySignedTransactionToJS,DecodeSignedTransactionToJS,ExtractHTLCSecret,InternalVerifyWitness. - signing:
EncodeWitness,EncodeWitnessNoSignature,EncodeWitnessHTLCSpend,EncodeWitnessHTLCRefundSingleSig,EncodeWitnessHTLCRefundMultisig,SignChallenge,VerifyChallenge,SignMessageForSpending,VerifySignatureForSpending. - timelocks:
EncodeLockForBlockCount,EncodeLockForSeconds,EncodeLockUntilHeight,EncodeLockUntilTime. - staking:
EncodeStakePoolData,EffectivePoolBalance,StakingPoolSpendMaturityBlockCount. - fees:
FungibleTokenIssuanceFee,NftIssuanceFee,DataDepositFee,TokenSupplyChangeFee,TokenFreezeFee,TokenChangeAuthorityFee. - IDs:
GetPoolId,GetTokenId,GetDelegationId,GetOrderId. - intent:
MakeTransactionIntentMessageToSign,EncodeSignedTransactionIntent,VerifyTransactionIntent. Amountvalue type withNewAmount,NewAmountZero,Atoms(), JSON marshal/unmarshal.Network,SignatureHashType,SourceId,TotalSupply,FreezableToken,TokenUnfreezableenum types with documented constants.
examples/send-coins/— full manual send flow: key derivation → UTXO fetch → build → sign → submit.examples/issue-token/— issue a fungible token and mint initial supply via the wallet daemon.
- GitHub Actions workflow (
.github/workflows/ci.yml):buildjob:go build ./...andgo vetacross Go 1.21, 1.22, 1.23.- Separate
test-node,test-indexer,test-wallet,test-wasmjobs for fast per-package feedback. all-testsgate job that requires all test jobs to pass.