@arkade-os/swap 0.1.10 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +58 -0
  2. package/dist/advanced.cjs +1058 -414
  3. package/dist/advanced.d.cts +7 -64
  4. package/dist/advanced.d.ts +7 -64
  5. package/dist/advanced.js +29 -5
  6. package/dist/{chunk-AUJDREZN.js → chunk-CIDVLDDM.js} +1 -1
  7. package/dist/{chunk-FWRDAL73.js → chunk-F3BGKWIB.js} +758 -104
  8. package/dist/{chunk-LCO6AJOS.js → chunk-ISKJIONJ.js} +58 -285
  9. package/dist/{chunk-2HQZLIVX.js → chunk-JBTU7Y6M.js} +1 -1
  10. package/dist/chunk-UXK7YDA4.js +568 -0
  11. package/dist/{chunk-6RJVT65W.js → chunk-VPVSSBY2.js} +2 -4
  12. package/dist/index.cjs +1045 -414
  13. package/dist/index.d.cts +6 -4
  14. package/dist/index.d.ts +6 -4
  15. package/dist/index.js +15 -5
  16. package/dist/{lockupContract-BTTRVwOt.d.cts → lockupContract-B1mr672c.d.cts} +1 -1
  17. package/dist/{lockupContract-aFarhlxj.d.ts → lockupContract-BRpk0NxT.d.ts} +1 -1
  18. package/dist/node/index.d.cts +18 -18
  19. package/dist/node/index.d.ts +18 -18
  20. package/dist/nostr.cjs +276 -302
  21. package/dist/nostr.d.cts +20 -2
  22. package/dist/nostr.d.ts +20 -2
  23. package/dist/nostr.js +21 -357
  24. package/dist/{offerFillPlan-CJC5tnEd.d.ts → offerFillPlan-BMZXiVMB.d.ts} +213 -28
  25. package/dist/{offerFillPlan-FmyaQoYT.d.cts → offerFillPlan-CqJerwXd.d.cts} +213 -28
  26. package/dist/openRfq-Dx-vxOzl.d.cts +32 -0
  27. package/dist/openRfq-Dx-vxOzl.d.ts +32 -0
  28. package/dist/openRfqTransport-MQZ7JWYN.js +9 -0
  29. package/dist/protocol.cjs +301 -322
  30. package/dist/protocol.d.cts +5 -5
  31. package/dist/protocol.d.ts +5 -5
  32. package/dist/protocol.js +6 -8
  33. package/dist/repositories/realm/index.d.cts +1 -1
  34. package/dist/repositories/realm/index.d.ts +1 -1
  35. package/dist/repositories/sqlite/index.d.cts +1 -1
  36. package/dist/repositories/sqlite/index.d.ts +1 -1
  37. package/dist/{repository-CwwhIAEd.d.cts → repository-CFC0fHAy.d.cts} +26 -26
  38. package/dist/{repository-DO6QKxBx.d.ts → repository-suGldzOK.d.ts} +26 -26
  39. package/dist/rfq-contract.cjs +3 -6
  40. package/dist/rfq-contract.d.cts +3 -4
  41. package/dist/rfq-contract.d.ts +3 -4
  42. package/dist/rfq-contract.js +3 -5
  43. package/dist/transportErrors-DZuZqnF4.d.cts +8 -0
  44. package/dist/transportErrors-DZuZqnF4.d.ts +8 -0
  45. package/dist/{verify-ENO36VPK.js → verify-HU5COTNO.js} +3 -3
  46. package/dist/{watch-_fZSgx_l.d.ts → watch-C2z6Onak.d.ts} +1 -1
  47. package/dist/{watch-DpDSP2tu.d.cts → watch-CpYjItYX.d.cts} +1 -1
  48. package/package.json +3 -3
package/dist/index.d.cts CHANGED
@@ -1,10 +1,12 @@
1
- export { e as AcceptConflict, g as AcceptOptions, h as AmbiguousDestination, i as AmountEncodingUnsupported, j as AmountMismatch, A as AssetAliasTable, B as BuildOfferFillPlanOpts, n as CancelOutcome, p as ClientDisposed, z as CorridorOverrides, G as DEFAULT_MAX_REFUND_WINDOW_SECONDS, H as DiscoveryConfig, d as DiscoverySnapshot, J as DiscoverySnapshotUnavailable, K as DriveMode, P as ExchangeOptions, R as FeeCeiling, V as FillSponsor, W as FillSponsorFare, Y as InconsistentRoute, Z as InsufficientFunds, _ as JointGraph, a0 as Market, a1 as MarketLeg, a2 as MaxFeeExceeded, a3 as MissingCorridorDep, a4 as NotCancellable, a5 as OFFER_FILL_OWNERS, a6 as OFFER_FILL_TEMPLATE, ac as OperatorUnreachable, ae as PayOptions, af as PayResult, ag as QuoteCheck, ah as QuoteExpired, aj as QuoteVerificationFailed, ak as REGISTRY_URL, al as ReceiveArtifact, am as ReceiveOptions, an as ReceiveRequest, ao as RecoveryResult, ap as RegisteredAsset, aq as RfqAuctionPolicy, au as SWAP_ERROR_NAMES, av as SwapClient, aw as SwapClientConfig, az as SwapDriveRefusedError, aA as SwapError, aB as SwapErrorName, aC as SwapFilter, S as SwapPolicy, aD as UnsupportedRoute, aE as VerbDeps, aG as buildOfferFillPlan, aI as canonicalAssetId, aN as createSwapClient, aP as deepFreeze, aQ as digestJointGraph, aU as exchange, a_ as isSwapError, b7 as pay, bb as receive, bi as unsignedPsbtBytes, bk as verifyJointGraph, bl as verifyOfferFillPlan } from './offerFillPlan-FmyaQoYT.cjs';
1
+ export { b as AcceptConflict, d as AcceptOptions, e as AmbiguousDestination, f as AmountEncodingUnsupported, g as AmountMismatch, A as AssetAliasTable, B as BuildOfferFillPlanOpts, k as CancelOutcome, m as ClientDisposed, w as CorridorOverrides, D as DEFAULT_MAX_REFUND_WINDOW_SECONDS, F as DiscoveryConfig, J as DiscoverySnapshot, K as DiscoverySnapshotUnavailable, M as DriveMode, P as ExchangeOptions, R as FeeCeiling, U as FillSponsor, V as FillSponsorFare, X as InconsistentRoute, Y as InsufficientFunds, Z as JointGraph, $ as Market, a1 as MarketLeg, a2 as MaxFeeExceeded, a3 as MissingCorridorDep, a4 as NotCancellable, a5 as OFFER_FILL_OWNERS, a6 as OFFER_FILL_TEMPLATE, ac as OpenRfqAuction, ad as OpenRfqOffer, ae as OpenRfqOptions, af as OperatorUnreachable, ah as PayOptions, ai as PayResult, aj as QuoteCheck, ak as QuoteExpired, am as QuoteVerificationFailed, an as REGISTRY_URL, ao as ReceiveArtifact, ap as ReceiveOptions, aq as ReceiveRequest, ar as RecoveryResult, as as RegisteredAsset, av as RfqAuctionPolicy, az as SWAP_ERROR_NAMES, aA as SolverCandidate, aB as SolverHealth, aC as SolverHealthEntry, aD as SolverHealthScope, aE as SolverHealthStorage, aF as SolverRoutesUnavailable, aG as SolverRoutingContext, aH as SolverRoutingPolicy, aI as SwapClient, aJ as SwapClientConfig, aM as SwapDriveRefusedError, aN as SwapError, aO as SwapErrorName, aP as SwapFilter, aQ as SwapPolicy, aR as UnsupportedRoute, aS as VerbDeps, aV as buildOfferFillPlan, aY as canonicalAssetId, a$ as completedSolverUsage, b2 as createSolverHealth, b3 as createSwapClient, b5 as deepFreeze, b6 as digestJointGraph, ba as exchange, bj as isSwapError, bu as pay, bz as receive, bI as unsignedPsbtBytes, bK as verifyJointGraph, bL as verifyOfferFillPlan } from './offerFillPlan-CqJerwXd.cjs';
2
2
  export { C as ChainSource, I as InvoiceFacts, e as RFQ_REFUSAL_ERROR_CODES, f as RfqRefusalDetail, g as RfqRefusalErrorCode, h as RfqRefusalUnit, b as RfqTransportFactory, S as SwapRefusal, T as TxStatus, i as isRfqRefusalErrorCode } from './rfq-nMGywkqI.cjs';
3
- import { d as AssetSwapRepository, h as AssetSwap, e as RfqSwapRecord, f as RfqSwapPageFilter, g as RfqSwapPageCursor, S as SwapRecord, b7 as MarketsCacheEntry, a5 as Outcome, an as Swap, l as QuoteInput, i as RouteResolution, a7 as Quote, aq as SwapUpdate, as as Unsubscribe } from './repository-CwwhIAEd.cjs';
4
- export { n as ARKADE_ASSET_NAMESPACE, o as Amount, p as AmountFormatError, r as AmountRefusal, s as ArkadeCarrierChoice, t as Artifact, A as AssetId, u as AssetIdError, v as AssetIdRefusal, w as AssetNamespace, x as AssetOn, y as AssetPart, z as AssetPaymentInput, B as AssetPaymentTerms, D as AssetRef, E as AssetScale, F as AssetSwapId, G as AtomicDecimal, H as AuctionMarketRef, J as AuctionProvenance, K as BITCOIN_RAILS, M as BTC_ASSET_PART, T as BitcoinRail, W as CardMarketRef, X as CorridorId, Y as CorridorKind, b as CorridorSwapRecord, Z as DepositArtifact, _ as DisplayDecimal, $ as Endpoint, a0 as Ep, b8 as InMemoryAssetSwapRepository, I as Instrument, L as LockupSpendIndexer, a2 as MarketBackend, a3 as MarketRef, N as NetworkRef, O as OfferSwapRecord, a6 as ParsedAssetId, P as PinnedAmount, Q as QuoteId, a8 as QuoteLeg, a9 as RAILS, R as Rail, ac as RankedBid, ad as RawState, ae as ReceiverPaidCarrierQuote, af as RecordedArtifact, ag as RecordedAssetPayment, ah as RecordedEndpoint, ai as RecordedInstrument, aj as RecordedLeg, j as ResolvedEndpoint, ak as RestoredMarketRef, b9 as RfqSwapState, k as Route, am as SnapshotRef, ba as SwapContractRegistry, ao as SwapFamily, bb as SwapOperator, ap as SwapRecordCommon, ar as TaxiIdentity, at as VerifiedCarrierTerms, au as arkadeAsset, aw as assetPartOf, ax as assetSwapIdOf, ay as bitcoinNetworkOf, az as btcAssetPart, aA as btcOn, aF as familyOfSwapId, aG as formatAssetId, aH as fromAtomicDecimal, aM as isAssetId, aN as isAtomicDecimal, aO as isBtcAsset, aP as isBtcAssetLenient, aQ as isNetworkRef, bc as isRfqSwapTerminal, aR as issuanceOf, aU as parseAssetId, aV as quoteIdOfSwapId, aW as railOf, b2 as sameAsset, b4 as toAtomicDecimal } from './repository-CwwhIAEd.cjs';
3
+ export { S as SolverResponseInvalid, a as SolverUnavailable } from './transportErrors-DZuZqnF4.cjs';
4
+ import { d as AssetSwapRepository, h as AssetSwap, e as RfqSwapRecord, f as RfqSwapPageFilter, g as RfqSwapPageCursor, S as SwapRecord, b7 as MarketsCacheEntry, a0 as Outcome, an as Swap, a4 as QuoteInput, al as RouteResolution, a3 as Quote, aq as SwapUpdate, as as Unsubscribe } from './repository-CFC0fHAy.cjs';
5
+ export { j as ARKADE_ASSET_NAMESPACE, k as Amount, l as AmountFormatError, n as AmountRefusal, o as ArkadeCarrierChoice, p as Artifact, A as AssetId, q as AssetIdError, r as AssetIdRefusal, s as AssetNamespace, t as AssetOn, u as AssetPart, v as AssetPaymentInput, w as AssetPaymentTerms, x as AssetRef, y as AssetScale, z as AssetSwapId, B as AtomicDecimal, D as AuctionProvenance, E as BITCOIN_RAILS, F as BTC_ASSET_PART, G as BitcoinRail, J as CardMarketRef, K as CorridorId, M as CorridorKind, b as CorridorSwapRecord, P as DepositArtifact, T as DisplayDecimal, U as Endpoint, V as Ep, b8 as InMemoryAssetSwapRepository, W as Instrument, L as LockupSpendIndexer, Y as MarketBackend, Z as MarketRef, N as NetworkRef, O as OfferSwapRecord, a1 as ParsedAssetId, a2 as PinnedAmount, Q as QuoteId, a5 as QuoteLeg, a6 as RAILS, R as Rail, a9 as RankedBid, aa as RawState, ab as ReceiverPaidCarrierQuote, ac as RecordedArtifact, ad as RecordedAssetPayment, ae as RecordedEndpoint, af as RecordedInstrument, ag as RecordedLeg, ah as ResolvedEndpoint, ai as RestoredMarketRef, b9 as RfqSwapState, ak as Route, am as SnapshotRef, ba as SwapContractRegistry, ao as SwapFamily, bb as SwapOperator, ap as SwapRecordCommon, ar as TaxiIdentity, at as VerifiedCarrierTerms, au as arkadeAsset, aw as assetPartOf, ax as assetSwapIdOf, ay as bitcoinNetworkOf, az as btcAssetPart, aA as btcOn, aF as familyOfSwapId, aG as formatAssetId, aH as fromAtomicDecimal, aM as isAssetId, aN as isAtomicDecimal, aO as isBtcAsset, aP as isBtcAssetLenient, aQ as isNetworkRef, bc as isRfqSwapTerminal, aR as issuanceOf, aU as parseAssetId, aV as quoteIdOfSwapId, aW as railOf, b2 as sameAsset, b4 as toAtomicDecimal } from './repository-CFC0fHAy.cjs';
5
6
  import { PageRequest, PageResult, PaymentHandle, PaymentRail, RouterPreferences, Wallet, PaymentRouter, PaymentStatus } from '@arkade-os/sdk';
6
- export { C as CLAIM_PACKET_TYPE, a as ClaimPacketShape, L as LockupRegistrationFailed, S as SEALED_CIPHERTEXT_LENGTH, b as appendArkadeScript, c as claimPacketShape } from './lockupContract-BTTRVwOt.cjs';
7
+ export { C as CLAIM_PACKET_TYPE, a as ClaimPacketShape, L as LockupRegistrationFailed, S as SEALED_CIPHERTEXT_LENGTH, b as appendArkadeScript, c as claimPacketShape } from './lockupContract-B1mr672c.cjs';
7
8
  import '@arkade-os/solver-discovery';
9
+ import './openRfq-Dx-vxOzl.cjs';
8
10
  import './rfq-contract.cjs';
9
11
  import 'nostr-tools';
10
12
 
package/dist/index.d.ts CHANGED
@@ -1,10 +1,12 @@
1
- export { e as AcceptConflict, g as AcceptOptions, h as AmbiguousDestination, i as AmountEncodingUnsupported, j as AmountMismatch, A as AssetAliasTable, B as BuildOfferFillPlanOpts, n as CancelOutcome, p as ClientDisposed, z as CorridorOverrides, G as DEFAULT_MAX_REFUND_WINDOW_SECONDS, H as DiscoveryConfig, d as DiscoverySnapshot, J as DiscoverySnapshotUnavailable, K as DriveMode, P as ExchangeOptions, R as FeeCeiling, V as FillSponsor, W as FillSponsorFare, Y as InconsistentRoute, Z as InsufficientFunds, _ as JointGraph, a0 as Market, a1 as MarketLeg, a2 as MaxFeeExceeded, a3 as MissingCorridorDep, a4 as NotCancellable, a5 as OFFER_FILL_OWNERS, a6 as OFFER_FILL_TEMPLATE, ac as OperatorUnreachable, ae as PayOptions, af as PayResult, ag as QuoteCheck, ah as QuoteExpired, aj as QuoteVerificationFailed, ak as REGISTRY_URL, al as ReceiveArtifact, am as ReceiveOptions, an as ReceiveRequest, ao as RecoveryResult, ap as RegisteredAsset, aq as RfqAuctionPolicy, au as SWAP_ERROR_NAMES, av as SwapClient, aw as SwapClientConfig, az as SwapDriveRefusedError, aA as SwapError, aB as SwapErrorName, aC as SwapFilter, S as SwapPolicy, aD as UnsupportedRoute, aE as VerbDeps, aG as buildOfferFillPlan, aI as canonicalAssetId, aN as createSwapClient, aP as deepFreeze, aQ as digestJointGraph, aU as exchange, a_ as isSwapError, b7 as pay, bb as receive, bi as unsignedPsbtBytes, bk as verifyJointGraph, bl as verifyOfferFillPlan } from './offerFillPlan-CJC5tnEd.js';
1
+ export { b as AcceptConflict, d as AcceptOptions, e as AmbiguousDestination, f as AmountEncodingUnsupported, g as AmountMismatch, A as AssetAliasTable, B as BuildOfferFillPlanOpts, k as CancelOutcome, m as ClientDisposed, w as CorridorOverrides, D as DEFAULT_MAX_REFUND_WINDOW_SECONDS, F as DiscoveryConfig, J as DiscoverySnapshot, K as DiscoverySnapshotUnavailable, M as DriveMode, P as ExchangeOptions, R as FeeCeiling, U as FillSponsor, V as FillSponsorFare, X as InconsistentRoute, Y as InsufficientFunds, Z as JointGraph, $ as Market, a1 as MarketLeg, a2 as MaxFeeExceeded, a3 as MissingCorridorDep, a4 as NotCancellable, a5 as OFFER_FILL_OWNERS, a6 as OFFER_FILL_TEMPLATE, ac as OpenRfqAuction, ad as OpenRfqOffer, ae as OpenRfqOptions, af as OperatorUnreachable, ah as PayOptions, ai as PayResult, aj as QuoteCheck, ak as QuoteExpired, am as QuoteVerificationFailed, an as REGISTRY_URL, ao as ReceiveArtifact, ap as ReceiveOptions, aq as ReceiveRequest, ar as RecoveryResult, as as RegisteredAsset, av as RfqAuctionPolicy, az as SWAP_ERROR_NAMES, aA as SolverCandidate, aB as SolverHealth, aC as SolverHealthEntry, aD as SolverHealthScope, aE as SolverHealthStorage, aF as SolverRoutesUnavailable, aG as SolverRoutingContext, aH as SolverRoutingPolicy, aI as SwapClient, aJ as SwapClientConfig, aM as SwapDriveRefusedError, aN as SwapError, aO as SwapErrorName, aP as SwapFilter, aQ as SwapPolicy, aR as UnsupportedRoute, aS as VerbDeps, aV as buildOfferFillPlan, aY as canonicalAssetId, a$ as completedSolverUsage, b2 as createSolverHealth, b3 as createSwapClient, b5 as deepFreeze, b6 as digestJointGraph, ba as exchange, bj as isSwapError, bu as pay, bz as receive, bI as unsignedPsbtBytes, bK as verifyJointGraph, bL as verifyOfferFillPlan } from './offerFillPlan-BMZXiVMB.js';
2
2
  export { C as ChainSource, I as InvoiceFacts, e as RFQ_REFUSAL_ERROR_CODES, f as RfqRefusalDetail, g as RfqRefusalErrorCode, h as RfqRefusalUnit, b as RfqTransportFactory, S as SwapRefusal, T as TxStatus, i as isRfqRefusalErrorCode } from './rfq-CYxOyniL.js';
3
- import { d as AssetSwapRepository, h as AssetSwap, e as RfqSwapRecord, f as RfqSwapPageFilter, g as RfqSwapPageCursor, S as SwapRecord, b7 as MarketsCacheEntry, a5 as Outcome, an as Swap, l as QuoteInput, i as RouteResolution, a7 as Quote, aq as SwapUpdate, as as Unsubscribe } from './repository-DO6QKxBx.js';
4
- export { n as ARKADE_ASSET_NAMESPACE, o as Amount, p as AmountFormatError, r as AmountRefusal, s as ArkadeCarrierChoice, t as Artifact, A as AssetId, u as AssetIdError, v as AssetIdRefusal, w as AssetNamespace, x as AssetOn, y as AssetPart, z as AssetPaymentInput, B as AssetPaymentTerms, D as AssetRef, E as AssetScale, F as AssetSwapId, G as AtomicDecimal, H as AuctionMarketRef, J as AuctionProvenance, K as BITCOIN_RAILS, M as BTC_ASSET_PART, T as BitcoinRail, W as CardMarketRef, X as CorridorId, Y as CorridorKind, b as CorridorSwapRecord, Z as DepositArtifact, _ as DisplayDecimal, $ as Endpoint, a0 as Ep, b8 as InMemoryAssetSwapRepository, I as Instrument, L as LockupSpendIndexer, a2 as MarketBackend, a3 as MarketRef, N as NetworkRef, O as OfferSwapRecord, a6 as ParsedAssetId, P as PinnedAmount, Q as QuoteId, a8 as QuoteLeg, a9 as RAILS, R as Rail, ac as RankedBid, ad as RawState, ae as ReceiverPaidCarrierQuote, af as RecordedArtifact, ag as RecordedAssetPayment, ah as RecordedEndpoint, ai as RecordedInstrument, aj as RecordedLeg, j as ResolvedEndpoint, ak as RestoredMarketRef, b9 as RfqSwapState, k as Route, am as SnapshotRef, ba as SwapContractRegistry, ao as SwapFamily, bb as SwapOperator, ap as SwapRecordCommon, ar as TaxiIdentity, at as VerifiedCarrierTerms, au as arkadeAsset, aw as assetPartOf, ax as assetSwapIdOf, ay as bitcoinNetworkOf, az as btcAssetPart, aA as btcOn, aF as familyOfSwapId, aG as formatAssetId, aH as fromAtomicDecimal, aM as isAssetId, aN as isAtomicDecimal, aO as isBtcAsset, aP as isBtcAssetLenient, aQ as isNetworkRef, bc as isRfqSwapTerminal, aR as issuanceOf, aU as parseAssetId, aV as quoteIdOfSwapId, aW as railOf, b2 as sameAsset, b4 as toAtomicDecimal } from './repository-DO6QKxBx.js';
3
+ export { S as SolverResponseInvalid, a as SolverUnavailable } from './transportErrors-DZuZqnF4.js';
4
+ import { d as AssetSwapRepository, h as AssetSwap, e as RfqSwapRecord, f as RfqSwapPageFilter, g as RfqSwapPageCursor, S as SwapRecord, b7 as MarketsCacheEntry, a0 as Outcome, an as Swap, a4 as QuoteInput, al as RouteResolution, a3 as Quote, aq as SwapUpdate, as as Unsubscribe } from './repository-suGldzOK.js';
5
+ export { j as ARKADE_ASSET_NAMESPACE, k as Amount, l as AmountFormatError, n as AmountRefusal, o as ArkadeCarrierChoice, p as Artifact, A as AssetId, q as AssetIdError, r as AssetIdRefusal, s as AssetNamespace, t as AssetOn, u as AssetPart, v as AssetPaymentInput, w as AssetPaymentTerms, x as AssetRef, y as AssetScale, z as AssetSwapId, B as AtomicDecimal, D as AuctionProvenance, E as BITCOIN_RAILS, F as BTC_ASSET_PART, G as BitcoinRail, J as CardMarketRef, K as CorridorId, M as CorridorKind, b as CorridorSwapRecord, P as DepositArtifact, T as DisplayDecimal, U as Endpoint, V as Ep, b8 as InMemoryAssetSwapRepository, W as Instrument, L as LockupSpendIndexer, Y as MarketBackend, Z as MarketRef, N as NetworkRef, O as OfferSwapRecord, a1 as ParsedAssetId, a2 as PinnedAmount, Q as QuoteId, a5 as QuoteLeg, a6 as RAILS, R as Rail, a9 as RankedBid, aa as RawState, ab as ReceiverPaidCarrierQuote, ac as RecordedArtifact, ad as RecordedAssetPayment, ae as RecordedEndpoint, af as RecordedInstrument, ag as RecordedLeg, ah as ResolvedEndpoint, ai as RestoredMarketRef, b9 as RfqSwapState, ak as Route, am as SnapshotRef, ba as SwapContractRegistry, ao as SwapFamily, bb as SwapOperator, ap as SwapRecordCommon, ar as TaxiIdentity, at as VerifiedCarrierTerms, au as arkadeAsset, aw as assetPartOf, ax as assetSwapIdOf, ay as bitcoinNetworkOf, az as btcAssetPart, aA as btcOn, aF as familyOfSwapId, aG as formatAssetId, aH as fromAtomicDecimal, aM as isAssetId, aN as isAtomicDecimal, aO as isBtcAsset, aP as isBtcAssetLenient, aQ as isNetworkRef, bc as isRfqSwapTerminal, aR as issuanceOf, aU as parseAssetId, aV as quoteIdOfSwapId, aW as railOf, b2 as sameAsset, b4 as toAtomicDecimal } from './repository-suGldzOK.js';
5
6
  import { PageRequest, PageResult, PaymentHandle, PaymentRail, RouterPreferences, Wallet, PaymentRouter, PaymentStatus } from '@arkade-os/sdk';
6
- export { C as CLAIM_PACKET_TYPE, a as ClaimPacketShape, L as LockupRegistrationFailed, S as SEALED_CIPHERTEXT_LENGTH, b as appendArkadeScript, c as claimPacketShape } from './lockupContract-aFarhlxj.js';
7
+ export { C as CLAIM_PACKET_TYPE, a as ClaimPacketShape, L as LockupRegistrationFailed, S as SEALED_CIPHERTEXT_LENGTH, b as appendArkadeScript, c as claimPacketShape } from './lockupContract-BRpk0NxT.js';
7
8
  import '@arkade-os/solver-discovery';
9
+ import './openRfq-Dx-vxOzl.js';
8
10
  import './rfq-contract.js';
9
11
  import 'nostr-tools';
10
12
 
package/dist/index.js CHANGED
@@ -9,6 +9,7 @@ import {
9
9
  PAYMENT_STATUS,
10
10
  RAILS,
11
11
  REGISTRY_URL,
12
+ SolverRoutesUnavailable,
12
13
  SwapDriveRefusedError,
13
14
  SwapPaymentFailedError,
14
15
  arkadeAsset,
@@ -19,6 +20,8 @@ import {
19
20
  buildOfferFillPlan,
20
21
  canonicalAssetId,
21
22
  claimFeeSats,
23
+ completedSolverUsage,
24
+ createSolverHealth,
22
25
  createSwapClient,
23
26
  deepFreeze,
24
27
  digestJointGraph,
@@ -44,7 +47,7 @@ import {
44
47
  unsignedPsbtBytes,
45
48
  verifyJointGraph,
46
49
  verifyOfferFillPlan
47
- } from "./chunk-FWRDAL73.js";
50
+ } from "./chunk-F3BGKWIB.js";
48
51
  import {
49
52
  Amount,
50
53
  AmountFormatError,
@@ -55,7 +58,7 @@ import {
55
58
  isRfqSwapTerminal,
56
59
  quoteIdOfSwapId,
57
60
  toAtomicDecimal
58
- } from "./chunk-2HQZLIVX.js";
61
+ } from "./chunk-JBTU7Y6M.js";
59
62
  import {
60
63
  AcceptConflict,
61
64
  AmbiguousDestination,
@@ -75,18 +78,20 @@ import {
75
78
  SWAP_ERROR_NAMES,
76
79
  UnsupportedRoute,
77
80
  isSwapError
78
- } from "./chunk-AUJDREZN.js";
81
+ } from "./chunk-CIDVLDDM.js";
79
82
  import {
80
83
  CLAIM_PACKET_TYPE,
81
84
  LockupRegistrationFailed,
82
85
  RFQ_REFUSAL_ERROR_CODES,
83
86
  SEALED_CIPHERTEXT_LENGTH,
87
+ SolverResponseInvalid,
88
+ SolverUnavailable,
84
89
  SwapRefusal,
85
90
  appendArkadeScript,
86
91
  claimPacketShape,
87
92
  isRfqRefusalErrorCode
88
- } from "./chunk-LCO6AJOS.js";
89
- import "./chunk-6RJVT65W.js";
93
+ } from "./chunk-ISKJIONJ.js";
94
+ import "./chunk-VPVSSBY2.js";
90
95
  import {
91
96
  InMemoryAssetSwapRepository,
92
97
  assertRfqSwapPageFilter,
@@ -389,6 +394,9 @@ export {
389
394
  SEALED_CIPHERTEXT_LENGTH,
390
395
  SWAP_ERROR_NAMES,
391
396
  SWAP_ROUTER_PRIORITY,
397
+ SolverResponseInvalid,
398
+ SolverRoutesUnavailable,
399
+ SolverUnavailable,
392
400
  SwapDriveRefusedError,
393
401
  SwapPaymentFailedError,
394
402
  SwapRefusal,
@@ -404,6 +412,8 @@ export {
404
412
  canonicalAssetId,
405
413
  claimFeeSats,
406
414
  claimPacketShape,
415
+ completedSolverUsage,
416
+ createSolverHealth,
407
417
  createSwapClient,
408
418
  createSwapPaymentRouter,
409
419
  deepFreeze,
@@ -1,4 +1,4 @@
1
- import { cu as CoverageRegistrationOptions } from './repository-CwwhIAEd.cjs';
1
+ import { cu as CoverageRegistrationOptions } from './repository-CFC0fHAy.cjs';
2
2
  import { VHTLC, IContractManager } from '@arkade-os/sdk';
3
3
 
4
4
  interface SealedClaimPacket {
@@ -1,4 +1,4 @@
1
- import { cu as CoverageRegistrationOptions } from './repository-DO6QKxBx.js';
1
+ import { cu as CoverageRegistrationOptions } from './repository-suGldzOK.js';
2
2
  import { VHTLC, IContractManager } from '@arkade-os/sdk';
3
3
 
4
4
  interface SealedClaimPacket {
@@ -15,11 +15,10 @@ declare const configDir: (env?: NodeJS.ProcessEnv) => string;
15
15
  declare const swapDatabasePath: (network: string, env?: NodeJS.ProcessEnv) => string;
16
16
 
17
17
  declare const ASSET_SWAP_V2 = "asset-swap-v2";
18
- declare const ASSET_SWAP_V3 = "asset-swap-v3";
19
- /** v3 whose `fulfill` also needs the quoting solver's `taker` signature. */
20
- declare const ASSET_SWAP_V4 = "asset-swap-v4";
18
+ /** The directed covenant: `fulfill` also needs the quoting solver's `taker` signature. */
19
+ declare const ASSET_SWAP_DIRECTED = "asset-swap-directed";
21
20
 
22
- type AssetSwapContractVersion = typeof ASSET_SWAP_V2 | typeof ASSET_SWAP_V3 | typeof ASSET_SWAP_V4;
21
+ type AssetSwapContractVersion = typeof ASSET_SWAP_V2 | typeof ASSET_SWAP_DIRECTED;
23
22
 
24
23
  /**
25
24
  * Where a monitored RFQ swap stands, and which of those states end it. Its own module so the
@@ -506,10 +505,10 @@ interface SnapshotRef {
506
505
  readonly registry?: string;
507
506
  }
508
507
  /**
509
- * Which card priced a quote, and from which registry. A union because an auction-closed quote
510
- * (§10) has a market key and no card, and a restored record has neither.
508
+ * Which card priced a quote, and its source. quoteBid retains the verified card and records
509
+ * auction evidence separately; legacy auction references and restored records remain readable.
511
510
  */
512
- type MarketRef = CardMarketRef | AuctionMarketRef | RestoredMarketRef;
511
+ type MarketRef = CardMarketRef | RestoredMarketRef;
513
512
  interface CardMarketRef {
514
513
  readonly kind: "card";
515
514
  /**
@@ -530,12 +529,6 @@ interface CardMarketRef {
530
529
  readonly pair: string;
531
530
  readonly snapshot: SnapshotRef;
532
531
  }
533
- /** §10, reserved: a quote closed out of a published auction has no card. */
534
- interface AuctionMarketRef {
535
- readonly kind: "auction";
536
- readonly key: string;
537
- readonly backend: "rfq";
538
- }
539
532
  /** A record rebuilt after a restore (from the funding tx, or a v1 corridor row): no card stands
540
533
  * behind it. */
541
534
  interface RestoredMarketRef {
@@ -609,6 +602,8 @@ interface SwapRecordCommon {
609
602
  /** The quote's own deadline, unix seconds — what makes a stalled accept a
610
603
  * benign abandon rather than a live obligation. */
611
604
  readonly expiresAt: number;
605
+ /** Retained funding dispatch cap for an auction-origin quote. */
606
+ readonly fundingDeadline?: number;
612
607
  /** The one thing a counterparty must see, when the route has one. Durable because a duplicate
613
608
  * accept after a restart must return the SAME invoice, and the quote object is gone by then. */
614
609
  readonly artifact?: RecordedArtifact;
@@ -631,15 +626,20 @@ interface SwapRecordCommon {
631
626
  readonly createdAt: number;
632
627
  readonly updatedAt: number;
633
628
  }
629
+ /** What rebuilds an offer's covenant: the TLV hex, the binding (a directed swap's only form), or both. */
630
+ type OfferCovenant = {
631
+ readonly offerHex: string;
632
+ readonly binding?: RecordedOfferBinding;
633
+ } | {
634
+ readonly offerHex?: string;
635
+ readonly binding: RecordedOfferBinding;
636
+ };
634
637
  /** `arkade <-> arkade`: the offer covenant, whole in `binding` or `offerHex`, so no tree params. */
635
- interface OfferSwapRecord extends SwapRecordCommon {
638
+ type OfferSwapRecord = OfferSwapRecordFields & OfferCovenant;
639
+ interface OfferSwapRecordFields extends SwapRecordCommon {
636
640
  readonly family: "offer";
637
641
  /** v1's raw status vocabulary, read verbatim by the drive's `RawState`. */
638
642
  readonly status: AssetSwapStatus;
639
- /** The TLV offer, hex: what rebuilds the covenant when there is no `binding`. */
640
- readonly offerHex?: string;
641
- /** The covenant, structured. A directed swap carries this and no `offerHex`. */
642
- readonly binding?: RecordedOfferBinding;
643
643
  readonly swapAddress: string;
644
644
  /** The covenant's scriptPubKey, hex — the indexer's monitoring key and the reconcile's match key. */
645
645
  readonly swapPkScript: string;
@@ -15,11 +15,10 @@ declare const configDir: (env?: NodeJS.ProcessEnv) => string;
15
15
  declare const swapDatabasePath: (network: string, env?: NodeJS.ProcessEnv) => string;
16
16
 
17
17
  declare const ASSET_SWAP_V2 = "asset-swap-v2";
18
- declare const ASSET_SWAP_V3 = "asset-swap-v3";
19
- /** v3 whose `fulfill` also needs the quoting solver's `taker` signature. */
20
- declare const ASSET_SWAP_V4 = "asset-swap-v4";
18
+ /** The directed covenant: `fulfill` also needs the quoting solver's `taker` signature. */
19
+ declare const ASSET_SWAP_DIRECTED = "asset-swap-directed";
21
20
 
22
- type AssetSwapContractVersion = typeof ASSET_SWAP_V2 | typeof ASSET_SWAP_V3 | typeof ASSET_SWAP_V4;
21
+ type AssetSwapContractVersion = typeof ASSET_SWAP_V2 | typeof ASSET_SWAP_DIRECTED;
23
22
 
24
23
  /**
25
24
  * Where a monitored RFQ swap stands, and which of those states end it. Its own module so the
@@ -506,10 +505,10 @@ interface SnapshotRef {
506
505
  readonly registry?: string;
507
506
  }
508
507
  /**
509
- * Which card priced a quote, and from which registry. A union because an auction-closed quote
510
- * (§10) has a market key and no card, and a restored record has neither.
508
+ * Which card priced a quote, and its source. quoteBid retains the verified card and records
509
+ * auction evidence separately; legacy auction references and restored records remain readable.
511
510
  */
512
- type MarketRef = CardMarketRef | AuctionMarketRef | RestoredMarketRef;
511
+ type MarketRef = CardMarketRef | RestoredMarketRef;
513
512
  interface CardMarketRef {
514
513
  readonly kind: "card";
515
514
  /**
@@ -530,12 +529,6 @@ interface CardMarketRef {
530
529
  readonly pair: string;
531
530
  readonly snapshot: SnapshotRef;
532
531
  }
533
- /** §10, reserved: a quote closed out of a published auction has no card. */
534
- interface AuctionMarketRef {
535
- readonly kind: "auction";
536
- readonly key: string;
537
- readonly backend: "rfq";
538
- }
539
532
  /** A record rebuilt after a restore (from the funding tx, or a v1 corridor row): no card stands
540
533
  * behind it. */
541
534
  interface RestoredMarketRef {
@@ -609,6 +602,8 @@ interface SwapRecordCommon {
609
602
  /** The quote's own deadline, unix seconds — what makes a stalled accept a
610
603
  * benign abandon rather than a live obligation. */
611
604
  readonly expiresAt: number;
605
+ /** Retained funding dispatch cap for an auction-origin quote. */
606
+ readonly fundingDeadline?: number;
612
607
  /** The one thing a counterparty must see, when the route has one. Durable because a duplicate
613
608
  * accept after a restart must return the SAME invoice, and the quote object is gone by then. */
614
609
  readonly artifact?: RecordedArtifact;
@@ -631,15 +626,20 @@ interface SwapRecordCommon {
631
626
  readonly createdAt: number;
632
627
  readonly updatedAt: number;
633
628
  }
629
+ /** What rebuilds an offer's covenant: the TLV hex, the binding (a directed swap's only form), or both. */
630
+ type OfferCovenant = {
631
+ readonly offerHex: string;
632
+ readonly binding?: RecordedOfferBinding;
633
+ } | {
634
+ readonly offerHex?: string;
635
+ readonly binding: RecordedOfferBinding;
636
+ };
634
637
  /** `arkade <-> arkade`: the offer covenant, whole in `binding` or `offerHex`, so no tree params. */
635
- interface OfferSwapRecord extends SwapRecordCommon {
638
+ type OfferSwapRecord = OfferSwapRecordFields & OfferCovenant;
639
+ interface OfferSwapRecordFields extends SwapRecordCommon {
636
640
  readonly family: "offer";
637
641
  /** v1's raw status vocabulary, read verbatim by the drive's `RawState`. */
638
642
  readonly status: AssetSwapStatus;
639
- /** The TLV offer, hex: what rebuilds the covenant when there is no `binding`. */
640
- readonly offerHex?: string;
641
- /** The covenant, structured. A directed swap carries this and no `offerHex`. */
642
- readonly binding?: RecordedOfferBinding;
643
643
  readonly swapAddress: string;
644
644
  /** The covenant's scriptPubKey, hex — the indexer's monitoring key and the reconcile's match key. */
645
645
  readonly swapPkScript: string;