- Runnable examples + build proof —
examples/treasury-dashboard.ts+examples/invoice-walk.tswith README rows,docs/PUBLISH_CHECKLIST.mddry-run guide,SDK_VERSION/buildTagexport;examples:typecheck+ tsup build green — feat/sdk-examples-build (closes #141) - React hooks for new views —
useFeePreview/useTtlHint/usePagedInvoicesin@stellar-sharpy/reactplusnormalizePagedViewOpts/mergePagedIdsSDK helpers; barrel exports + unit tests — feat/react-invoice-views (closes #140) - Retry/timeout edge helpers —
pollUntil/pollWithTimeout/retryWithBudgetwith injectable sleep/clock, elapsed tracking and budget enforcement; barrel exports + unit tests — feat/sdk-poll-helpers (closes #139) - CCTP inbound resilience —
classifyAttestationStatus/shouldRetryAttestation/formatCctpLatency/estimateAttestationWaitMs/cctpExplorerUrlpure helpers plusexamples/cctp-resilient.tsrunnable with latency reporting; barrel exports + unit tests — feat/sdk-cctp-resilience (closes #138) - Pool-pay/batch input validation —
validatePoolPayments/validateBatchInvoices/validateRefundBatch/chunkArrayfail-fast guards wired intopoolPay/createBatch/refundBatch; barrel exports + unit tests — feat/sdk-batch-validation (closes #137) - Treasury/claim convenience helpers —
filterClaimablePositive/summarizeClaimables/formatClaimRow/chunkScan/topClaimablesdashboard math forgetClaimableBalance/claimscans; barrel exports + unit tests — feat/sdk-treasury-helpers (closes #136) - Route/tranche/whitelist/fee validation —
validateBps/validateTranches/detectRouteCycle/validateWhitelist/normalizeFeeBpsguards mapped toBpsOutOfRangeError/TrancheCapExceededError/RouteCycleError/PayerNotWhitelistedError; barrel exports + unit tests — feat/sdk-route-validation (closes #135) - Streaming lifecycle parity helpers —
validateCreateStreamParams/vestedAmountLinear/streamStatuslinear-vest math with cliff/cancelled handling plus lifecycle state; barrel exports + unit tests — feat/sdk-stream-parity (closes #134) - TTL + expiry helpers —
ttlHint/expiresInSec/isInvoiceExpired/needsTtlBump/formatTtlpure math plusgetTtlHint/isInvoiceExpiredByIdview wrappers with offline fallback; barrel exports + unit tests — feat/sdk-ttl-hint (closes #133) - Fee-preview helpers —
estimateProtocolFee/previewFeeSplit/feeWithinTolerance/validateFeeBpspure math pluspreviewFeeForInvoiceview wrapper with offline fallback; barrel exports + unit tests — feat/sdk-fee-preview (closes #132) - Retry, timeout and fee helper polish —
withRetriesexponential backoff,normalizePollConfig/withTimeout/TimeoutError, purexlmToStroops/stroopsToXlm/addFeeMargin/feeWithinBudgetfee math; barrel exports + 11 unit tests — feat/sdk-resilience-polish (closes #123) - CCTP attestation latency tracking —
pollCctpAttestationreturnsattempts/elapsedMs, timeouts report actual elapsed ms,onAttemptprogress callback; covered by stubbed-fetch unit tests — feat/sdk-cctp-latency (closes #120) - Copy-paste example snippets —
examples/(create-and-pay, stream-lifecycle, CCTP inbound, paginated dashboard) with real client signatures,examples:typecheckscript, README pointer — docs/sdk-examples (closes #121) - Unit tests for 0.3.0 methods —
test/unitvitest suite (pagination bounds, error taxonomy,mapContractErrorrouting table, multi-page walks);mapContractErrorexported for testability;npm testruns offline,test:e2estays testnet-gated — test/sdk-030-coverage (closes #125) - Pagination wrappers for creator/payer indexes —
normalizePageOpts/paginateIds/MAX_PAGE_SIZE,{ids,total,offset,limit,hasMore}page info ongetInvoicesByCreatorPaginated/getInvoicesByPayerPaginated,iterateInvoicesByCreator/iterateInvoicesByPayerasync generators; negative offsets can no longer wrapslice— feat/sdk-pagination (closes #122) - Typed error mapping for 0.3.0 modules —
DeadlineNotReachedError,PayerNotWhitelistedError,InvoiceFrozenError,InvoiceNotArchivableError,TrancheCapExceededError,BpsOutOfRangeError,RouteCycleError,NotApproverError;mapContractErrornow covers allonly creator canguards and fixesdeadline has not passedmis-typing — feat/sdk-error-mapping (closes #124)
createStream/withdrawVested/cancelStream/topUpStream— linear-vesting token streams with cliff and cancelable flagbuildCctpHookData/pollCctpAttestation/completeCctpInbound— CCTP EVM to Stellar inbound flowuseCreateStream/useWithdrawVested/useCancelStream/useTopUpStream— React mutation hooks for streamsuseCctpHookData/useCctpAttestation/useCompleteCctpInbound— React hooks for CCTP inbound flowsuseInvoiceinvoiceId tracking + refreshOnIdChange;useInvoicesByCreatorcreator/total + polling- Testnet contract
CAEWQX36RLGP2WY6ACOREDJEIGELYV3HWWUPGV3CJMC27OWGQWZHTH6Tpre-configured viaNETWORKS.testnet - Docs — copy-paste streaming lifecycle and CCTP end-to-end examples verified against
SharpyClientsignatures
- Bump
@stellar-sharpy/sdk0.2.0 to 0.3.0 and@stellar-sharpy/reactto 0.3.0 for aligned release - Publish config reviewed: ESM + CJS + DTS via tsup,
filesincludes dist/README/LICENSE/CHANGELOG,publishConfigpublic
- feat(react): invoice hooks — useInvoice invoiceId tracking + refreshOnIdChange, useInvoicesByCreator creator/total/pagination
- feat(react): CCTP hooks — useCctpHookData/useCctpAttestation/useCompleteCctpInbound
- feat(react): streaming hooks — useCreateStream/useWithdrawVested/useCancelStream/useTopUpStream
- feat(sdk): streaming client — createStream/withdrawVested/cancelStream/topUpStream + streaming errors
- feat(sdk): archival — archive/isArchived/unarchive
- feat(sdk): approval — set/approve/getApproval
- feat(sdk): template — create/getTemplate
- feat(sdk): recurring pause — pause/resume
- feat(sdk): discount — get/setDiscount
- feat(sdk): metadata — get/setInvoiceMetadata
- feat(sdk): extend deadline — extendDeadline
- feat(sdk): batch refund — refundBatch
- feat(sdk): memo ext — get/setInvoiceMemoExt
previewPayout(invoiceId, amount)— preview exact per-recipient payouts with dust-correct rounding (Protocol 25/26 CAP-82)getInvoicesByCreator(creator)— fetch all invoice IDs created by an address using on-chain creator indexclaim(account, token)— withdraw credited balance after failed recipient transfer (fallback recovery)getClaimableBalance(account, token)— query internal credited balance for account/token paircreateStream/withdrawVested/cancelStream/topUpStream— linear-vesting token streams with cliff and cancelable flaguseCreateStream/useWithdrawVested/useCancelStream/useTopUpStream— React mutation hooks for streamsuseCctpHookData/useCctpAttestation/useCompleteCctpInbound— React hooks for CCTP inbound flowsuseInvoiceinvoiceId tracking + refreshOnIdChange;useInvoicesByCreatorcreator/total + polling- Docs polish — quickstart streaming, CCTP end-to-end, API reference, typed error docs
bumpInvoiceTtl(caller, invoiceId)— Protocol 26 CAP-78 TTL extensiongetInvoiceFingerprint(invoiceId)— Protocol 25/26 SHA-256 content hashpoolPay(payer, payments[])— pay multiple invoices in one callgetPayerTotal(invoiceId, payer)— total paid by specific addressgetInvoiceStats(invoiceId)— funded/total/completion_bps/unique_payerscreateBatch(creator, invoices[])— create up to 10 invoicesdisputeReleaseandresolveDispute— escrow dispute methods- Typed error classes:
InvoiceNotFoundError,DeadlinePassedError,OverpaymentError,InvoiceNotPendingError - Optional
signTransactionoverride inSharpyClientConfigvia signerRegistry
- stellar-sdk upgraded to 16.0.1 (Protocol 27 ready)
- Updated testnet contract ID:
CBJ7WNBHCO5LKM7LW33D7HUT7WZI5OROVPC7IJL3A6NT6HMVJ4XUWPHJ
SharpyClientclass — wraps all contract methods via@stellar/stellar-sdkcreateInvoice— create single invoice with escrow and split rule optionscreateRecurring— create recurring invoicepay— pay toward an invoicereleaseEscrow— release escrow-held fundsrefund— trigger refund after deadlinecancelInvoice— creator cancels invoicegetInvoice— fetch invoice stategetNextRecurring— get next recurring invoice ID- Wallet helpers:
connectWallet,getWalletPublicKey,signTransaction(Freighter v3) - Utilities:
parseAmount,formatAmount,deadlineFromDays,isExpired,isValidAddress,truncateAddress,explorerUrl NETWORKSconstant with testnet and mainnet config- ESM + CJS + TypeScript declaration output via tsup
- feat(sdk): archival — archive/isArchived/unarchive
- feat(sdk): approval — set/approve/getApproval
- feat(sdk): template — create/getTemplate
- feat(sdk): recurring pause — pause/resume
- feat(sdk): discount — get/setDiscount
- feat(sdk): metadata — get/setInvoiceMetadata
- feat(sdk): extend deadline — extendDeadline
- feat(sdk): batch refund — refundBatch
- feat(sdk): memo ext — get/setInvoiceMemoExt - Invoice Tags
- feat(sdk): add InvoiceTags and get/setInvoiceTags