@breeztech/breez-sdk-spark 0.25.0 → 0.27.0-dev1

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.
@@ -545,7 +545,7 @@ export interface BatchRecipient {
545
545
 
546
546
  export interface BatchTotal {
547
547
  tokenIdentifier?: string;
548
- amount: bigint;
548
+ amount: string;
549
549
  }
550
550
 
551
551
  export interface Bip21Details {
@@ -705,7 +705,7 @@ export interface ClaimDepositRequest {
705
705
  }
706
706
 
707
707
  export interface ClaimDepositResponse {
708
- payment?: Payment;
708
+ outcome: ClaimDepositOutcome;
709
709
  }
710
710
 
711
711
  export interface ClaimHtlcPaymentRequest {
@@ -832,12 +832,17 @@ export interface Credentials {
832
832
  password: string;
833
833
  }
834
834
 
835
+ export interface CrossChainAcceptedAsset {
836
+ asset: SparkAsset;
837
+ limits?: CrossChainRouteLimits;
838
+ }
839
+
835
840
  export interface CrossChainAddressDetails {
836
841
  address: string;
837
842
  addressFamily: CrossChainAddressFamily;
838
843
  contractAddress?: string;
839
844
  chainId?: number;
840
- amount?: bigint;
845
+ amount?: string;
841
846
  }
842
847
 
843
848
  export interface CrossChainConfig {
@@ -853,9 +858,17 @@ export interface CrossChainReceiveInfo {
853
858
  tokenIdentifier?: string;
854
859
  serviceFeeAmount: string;
855
860
  serviceFeeAsset?: string;
861
+ serviceFeeAssetDecimals?: number;
856
862
  expiresAt: number;
857
863
  }
858
864
 
865
+ export interface CrossChainRouteLimits {
866
+ minAmount?: string;
867
+ maxAmount?: string;
868
+ minUsdCents?: number;
869
+ maxUsdCents?: number;
870
+ }
871
+
859
872
  export interface CrossChainRoutePair {
860
873
  provider: CrossChainProvider;
861
874
  chain: string;
@@ -864,7 +877,7 @@ export interface CrossChainRoutePair {
864
877
  contractAddress?: string;
865
878
  decimals: number;
866
879
  exactOutEligible: boolean;
867
- acceptedAssets: SparkAsset[];
880
+ acceptedAssets: CrossChainAcceptedAsset[];
868
881
  deliveryMethods: DeliveryMethod[];
869
882
  }
870
883
 
@@ -888,6 +901,7 @@ export interface DepositInfo {
888
901
  claimError?: DepositClaimError;
889
902
  instantClaimStatus?: InstantClaimStatus;
890
903
  refundState?: RefundState;
904
+ maxClaimFee?: MaxFee;
891
905
  }
892
906
 
893
907
  export interface EcdsaSignatureBytes {
@@ -968,6 +982,10 @@ export interface ExternalInputParser {
968
982
  parserUrl: string;
969
983
  }
970
984
 
985
+ export interface ExternalLeafSigningKey {
986
+ derivedFrom: ExternalTreeNodeId;
987
+ }
988
+
971
989
  export interface ExternalNewLeafKey {
972
990
  nodeId: ExternalTreeNodeId;
973
991
  newSigningPublicKey: number[];
@@ -1114,6 +1132,7 @@ export interface ExternalStartedStaticDepositRefund {
1114
1132
  export interface ExternalTransferLeafInput {
1115
1133
  nodeId: ExternalTreeNodeId;
1116
1134
  newLeafId: ExternalTreeNodeId;
1135
+ signingKey: ExternalLeafSigningKey;
1117
1136
  }
1118
1137
 
1119
1138
  export interface ExternalTreeNodeId {
@@ -1486,6 +1505,7 @@ export interface PreparePaymentLinkResponse {
1486
1505
  asset: string;
1487
1506
  serviceFeeAmount: bigint;
1488
1507
  serviceFeeAsset?: string;
1508
+ serviceFeeAssetDecimals?: number;
1489
1509
  expiresAt: string;
1490
1510
  }
1491
1511
 
@@ -1831,6 +1851,8 @@ export interface Storage {
1831
1851
  deleteDeposit: (txid: string, vout: number) => Promise<void>;
1832
1852
  listDeposits: () => Promise<DepositInfo[]>;
1833
1853
  updateDeposit: (txid: string, vout: number, payload: UpdateDepositPayload) => Promise<void>;
1854
+ listWatchedDepositAddresses: () => Promise<WatchedDepositAddress[]>;
1855
+ updateWatchedDepositAddress: (address: string, payload: UpdateWatchedAddressPayload) => Promise<void>;
1834
1856
  setLnurlMetadata: (metadata: SetLnurlMetadataItem[]) => Promise<void>;
1835
1857
  getPaymentsByParentIds: (parentPaymentIds: string[]) => Promise<{ [parentId: string]: RelatedPayment[] }>;
1836
1858
  listContacts: (request: ListContactsRequest) => Promise<Contact[]>;
@@ -2025,6 +2047,12 @@ export interface Utxo {
2025
2047
  status: TxStatus;
2026
2048
  }
2027
2049
 
2050
+ export interface WatchedDepositAddress {
2051
+ address: string;
2052
+ issuedAt: number;
2053
+ seen: boolean;
2054
+ }
2055
+
2028
2056
  export interface Webhook {
2029
2057
  id: string;
2030
2058
  url: string;
@@ -2051,11 +2079,15 @@ export type BuyBitcoinRequest = { type: "moonpay"; lockedAmountSat?: number; red
2051
2079
 
2052
2080
  export type ChainApiType = "esplora" | "mempoolSpace";
2053
2081
 
2082
+ export type ClaimDeferredReason = { type: "maxFeeExceeded"; requiredFeeSats: number; maxFeeSats: number } | { type: "noEarlyClaimAvailable" } | { type: "providerDeclined"; message: string };
2083
+
2084
+ export type ClaimDepositOutcome = { type: "settled"; payment: Payment } | { type: "submitted" } | { type: "deferred"; reason: ClaimDeferredReason };
2085
+
2054
2086
  export type ConversionChain = { type: "spark" } | { type: "lightning" } | { type: "external"; name: string; chainId?: string };
2055
2087
 
2056
2088
  export type ConversionFilter = "ammRefundNeeded" | "orchestraPending" | "boltzPending";
2057
2089
 
2058
- export type ConversionInfo = { type: "amm"; poolId: string; conversionId: string; status: ConversionStatus; fee?: string; purpose?: ConversionPurpose; amountAdjustment?: AmountAdjustmentReason; degradation?: SwapDegradation } | { type: "orchestra"; chain: string; chainId?: string; asset?: string; assetContract?: string; recipientAddress: string; assetAmountIn?: string; estimatedOut: string; deliveredAmount?: string; externalTxHash?: string; status: ConversionStatus; feeAmount?: string; serviceFeeAmount?: string; serviceFeeAsset?: string; assetDecimals: number; orderId: string; quoteId: string; readToken?: string } | { type: "boltz"; chain: string; chainId?: string; asset?: string; assetContract?: string; recipientAddress: string; assetAmountIn?: string; estimatedOut: string; deliveredAmount?: string; status: ConversionStatus; feeAmount?: string; serviceFeeAmount?: string; serviceFeeAsset?: string; assetDecimals: number; swapId: string; invoice: string; invoiceAmountSats: number; bridgeRef?: string; maxSlippageBps: number; quoteDegraded?: boolean };
2090
+ export type ConversionInfo = { type: "amm"; poolId: string; conversionId: string; status: ConversionStatus; fee?: string; purpose?: ConversionPurpose; amountAdjustment?: AmountAdjustmentReason; degradation?: SwapDegradation } | { type: "orchestra"; chain: string; chainId?: string; asset?: string; assetContract?: string; recipientAddress: string; assetAmountIn?: string; estimatedOut: string; deliveredAmount?: string; externalTxHash?: string; status: ConversionStatus; feeAmount?: string; serviceFeeAmount?: string; serviceFeeAsset?: string; serviceFeeAssetDecimals?: number; assetDecimals: number; orderId: string; quoteId: string; readToken?: string } | { type: "boltz"; chain: string; chainId?: string; asset?: string; assetContract?: string; recipientAddress: string; assetAmountIn?: string; estimatedOut: string; deliveredAmount?: string; status: ConversionStatus; feeAmount?: string; serviceFeeAmount?: string; serviceFeeAsset?: string; assetDecimals: number; swapId: string; invoice: string; invoiceAmountSats: number; bridgeRef?: string; maxSlippageBps: number; quoteDegraded?: boolean };
2059
2091
 
2060
2092
  export type ConversionProvider = "amm" | "orchestra" | "boltz";
2061
2093
 
@@ -2081,7 +2113,7 @@ export type CrossChainRouteFilter = { type: "send"; addressDetails: CrossChainAd
2081
2113
 
2082
2114
  export type DeliveryMethod = "spark" | "lightning" | "bitcoin";
2083
2115
 
2084
- export type DepositClaimError = { type: "maxDepositClaimFeeExceeded"; tx: string; vout: number; maxFee?: Fee; requiredFeeSats: number; requiredFeeRateSatPerVbyte: number } | { type: "missingUtxo"; tx: string; vout: number } | { type: "generic"; message: string };
2116
+ export type DepositClaimError = { type: "maxDepositClaimFeeExceeded"; tx: string; vout: number; maxFee?: Fee; requiredFeeSats: number; requiredFeeRateSatPerVbyte: number } | { type: "missingUtxo"; tx: string; vout: number } | { type: "depositTooSmall"; tx: string; vout: number } | { type: "generic"; message: string };
2085
2117
 
2086
2118
  export type ExitLeafSelection = { type: "auto" } | { type: "specific"; leafIds: string[] };
2087
2119
 
@@ -2103,13 +2135,13 @@ export type FeePolicy = "feesExcluded" | "feesIncluded";
2103
2135
 
2104
2136
  export type InputType = ({ type: "bitcoinAddress" } & BitcoinAddressDetails) | ({ type: "bolt11Invoice" } & Bolt11InvoiceDetails) | ({ type: "bolt12Invoice" } & Bolt12InvoiceDetails) | ({ type: "bolt12Offer" } & Bolt12OfferDetails) | ({ type: "lightningAddress" } & LightningAddressDetails) | ({ type: "lnurlPay" } & LnurlPayRequestDetails) | ({ type: "silentPaymentAddress" } & SilentPaymentAddressDetails) | ({ type: "lnurlAuth" } & LnurlAuthRequestDetails) | ({ type: "url" } & string) | ({ type: "bip21" } & Bip21Details) | ({ type: "bolt12InvoiceRequest" } & Bolt12InvoiceRequestDetails) | ({ type: "lnurlWithdraw" } & LnurlWithdrawRequestDetails) | ({ type: "sparkAddress" } & SparkAddressDetails) | ({ type: "sparkInvoice" } & SparkInvoiceDetails) | ({ type: "crossChainAddress" } & CrossChainAddressDetails);
2105
2137
 
2106
- export type InstantClaimStatus = { type: "declined"; maxFeeSats?: number; confirmations?: number } | { type: "submitted"; claimId: string };
2138
+ export type InstantClaimStatus = { type: "declined"; maxFeeSats?: number; confirmations?: number } | { type: "submitted"; claimId: string } | { type: "claimed" };
2107
2139
 
2108
2140
  export type LnurlCallbackStatus = { type: "ok" } | { type: "errorStatus"; errorDetails: LnurlErrorDetails };
2109
2141
 
2110
2142
  export type MaxFee = { type: "fixed"; amount: number } | { type: "rate"; satPerVbyte: number } | { type: "networkRecommended"; leewaySatPerVbyte: number };
2111
2143
 
2112
- export type Network = "mainnet" | "regtest";
2144
+ export type Network = "mainnet" | "regtest" | "signet";
2113
2145
 
2114
2146
  export type OnchainConfirmationSpeed = "fast" | "medium" | "slow";
2115
2147
 
@@ -2141,11 +2173,11 @@ export type ReceivePaymentMethod = { type: "sparkAddress" } | { type: "sparkInvo
2141
2173
 
2142
2174
  export type RefundState = { type: "broadcastPending"; lastError?: string } | { type: "broadcast" };
2143
2175
 
2144
- export type SdkEvent = { type: "synced" } | { type: "unclaimedDeposits"; unclaimedDeposits: DepositInfo[] } | { type: "claimedDeposits"; claimedDeposits: DepositInfo[] } | { type: "paymentSucceeded"; payment: Payment } | { type: "paymentPending"; payment: Payment } | { type: "paymentFailed"; payment: Payment } | { type: "autoOptimization"; optimizationEvent: AutoOptimizationEvent } | { type: "lightningAddressChanged"; lightningAddress?: LightningAddressInfo } | { type: "newDeposits"; newDeposits: DepositInfo[] } | { type: "unilateralExitStateChanged" };
2176
+ export type SdkEvent = { type: "synced" } | { type: "unclaimedDeposits"; unclaimedDeposits: DepositInfo[] } | { type: "claimedDeposits"; claimedDeposits: DepositInfo[] } | { type: "paymentSucceeded"; payment: Payment } | { type: "paymentPending"; payment: Payment } | { type: "paymentFailed"; payment: Payment } | { type: "paymentMetadataUpdated"; payment: Payment } | { type: "autoOptimization"; optimizationEvent: AutoOptimizationEvent } | { type: "lightningAddressChanged"; lightningAddress?: LightningAddressInfo } | { type: "newDeposits"; newDeposits: DepositInfo[] } | { type: "unilateralExitStateChanged" } | { type: "stableBalanceConversionFailed"; conversion: StableBalanceConversionKind; error: string; retryInSecs?: number };
2145
2177
 
2146
2178
  export type Seed = { type: "mnemonic"; mnemonic: string; passphrase?: string } | ({ type: "entropy" } & number[]);
2147
2179
 
2148
- export type SendPaymentMethod = { type: "bitcoinAddress"; address: BitcoinAddressDetails; feeQuote: SendOnchainFeeQuote } | { type: "bolt11Invoice"; invoiceDetails: Bolt11InvoiceDetails; sparkTransferFeeSats?: number; lightningFeeSats: number } | { type: "sparkAddress"; address: string; fee: string; tokenIdentifier?: string } | { type: "sparkInvoice"; sparkInvoiceDetails: SparkInvoiceDetails; fee: string; tokenIdentifier?: string } | { type: "crossChainAddress"; route: CrossChainRoutePair; recipientAddress: string; amountIn: string; assetAmountIn: string; estimatedOut: string; feeAmount: string; serviceFeeAmount: string; serviceFeeAsset?: string; sourceTransferFeeSats: number; feeMode: CrossChainFeeMode; expiresAt: string; providerContext: CrossChainProviderContext };
2180
+ export type SendPaymentMethod = { type: "bitcoinAddress"; address: BitcoinAddressDetails; feeQuote: SendOnchainFeeQuote } | { type: "bolt11Invoice"; invoiceDetails: Bolt11InvoiceDetails; sparkTransferFeeSats?: number; lightningFeeSats: number } | { type: "sparkAddress"; address: string; fee: string; tokenIdentifier?: string } | { type: "sparkInvoice"; sparkInvoiceDetails: SparkInvoiceDetails; fee: string; tokenIdentifier?: string } | { type: "crossChainAddress"; route: CrossChainRoutePair; recipientAddress: string; amountIn: string; assetAmountIn: string; estimatedOut: string; feeAmount: string; serviceFeeAmount: string; serviceFeeAsset?: string; serviceFeeAssetDecimals?: number; sourceTransferFeeSats: number; feeMode: CrossChainFeeMode; expiresAt: string; providerContext: CrossChainProviderContext };
2149
2181
 
2150
2182
  export type SendPaymentOptions = { type: "bitcoinAddress"; confirmationSpeed: OnchainConfirmationSpeed } | { type: "bolt11Invoice"; preferSpark: boolean; completionTimeoutSecs?: number } | { type: "sparkAddress"; htlcOptions?: SparkHtlcOptions };
2151
2183
 
@@ -2161,6 +2193,8 @@ export type SparkMasterIdentityPublicKey = { type: "set"; publicKey: string } |
2161
2193
 
2162
2194
  export type StableBalanceActiveLabel = { type: "set"; label: string } | { type: "unset" };
2163
2195
 
2196
+ export type StableBalanceConversionKind = "perReceive" | "autoConvert" | "deactivation";
2197
+
2164
2198
  export type StoragePaymentDetailsFilter = { type: "spark"; htlcStatus?: SparkHtlcStatus[]; conversionFilter?: ConversionFilter } | { type: "token"; conversionFilter?: ConversionFilter; txHash?: string; txType?: TokenTransactionType } | { type: "lightning"; htlcStatus?: SparkHtlcStatus[]; conversionFilter?: ConversionFilter };
2165
2199
 
2166
2200
  export type SuccessAction = { type: "aes"; data: AesSuccessActionData } | { type: "message"; data: MessageSuccessActionData } | { type: "url"; data: UrlSuccessActionData };
@@ -2183,7 +2217,9 @@ export type UnilateralExitVerdict = { type: "valid" } | { type: "done" } | { typ
2183
2217
 
2184
2218
  export type UnsignedTransferPackage = { type: "swap"; prepareTransfer: ExternalPrepareTransferRequest; targetAmounts: number[]; amountSat: number; feeSat: number } | { type: "transfer"; prepareTransfer: ExternalPrepareTransferRequest; amountSat: number; feeSat: number; target: TransferTarget } | { type: "token"; prepareTokenTransaction: ExternalPrepareTokenTransactionRequest; tokenContext: number[]; tokenIdentifier: string; amount: string; fee: string; isSwap: boolean } | { type: "tokenBatch"; prepareTokenTransaction: ExternalPrepareTokenTransactionRequest; tokenContext: number[]; totals: BatchTotal[]; isSwap: boolean };
2185
2219
 
2186
- export type UpdateDepositPayload = { type: "claimError"; error: DepositClaimError } | { type: "refund"; refundTxid: string; refundTx: string; state: RefundState } | { type: "instantClaim"; status: InstantClaimStatus } | { type: "refundBroadcastState"; refundTxid: string; state: RefundState };
2220
+ export type UpdateDepositPayload = { type: "claimError"; error: DepositClaimError } | { type: "refund"; refundTxid: string; refundTx: string; state: RefundState } | { type: "instantClaim"; status: InstantClaimStatus } | { type: "refundBroadcastState"; refundTxid: string; state: RefundState } | { type: "maxClaimFee"; maxFee?: MaxFee };
2221
+
2222
+ export type UpdateWatchedAddressPayload = { type: "watch"; issuedAt: number } | { type: "seen" } | { type: "unwatch"; issuedAt: number };
2187
2223
 
2188
2224
  export type WebhookEventType = { type: "lightningReceiveFinished" } | { type: "lightningSendFinished" } | { type: "coopExitFinished" } | { type: "staticDepositFinished" } | ({ type: "unknown" } & string);
2189
2225
 
@@ -2701,6 +2737,13 @@ export function newRestChainService(url: string, network: Network, api_type: Cha
2701
2737
  */
2702
2738
  export function newSharedSdkContext(config: WasmSdkContextConfig): Promise<WasmSdkContext>;
2703
2739
 
2740
+ /**
2741
+ * Reads a `SparkConfig` from JSON, for a deployment that publishes its
2742
+ * operators, service provider and certificates as a file. Set it on
2743
+ * `Config.sparkConfig` to connect a wallet to that deployment.
2744
+ */
2745
+ export function parseSparkConfig(json: string): SparkConfig;
2746
+
2704
2747
  /**
2705
2748
  * `PostgreSQL`-backed storage built from `config`.
2706
2749
  */
@@ -1939,6 +1939,23 @@ export function newSharedSdkContext(config) {
1939
1939
  return ret;
1940
1940
  }
1941
1941
 
1942
+ /**
1943
+ * Reads a `SparkConfig` from JSON, for a deployment that publishes its
1944
+ * operators, service provider and certificates as a file. Set it on
1945
+ * `Config.sparkConfig` to connect a wallet to that deployment.
1946
+ * @param {string} json
1947
+ * @returns {SparkConfig}
1948
+ */
1949
+ export function parseSparkConfig(json) {
1950
+ const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1951
+ const len0 = WASM_VECTOR_LEN;
1952
+ const ret = wasm.parseSparkConfig(ptr0, len0);
1953
+ if (ret[2]) {
1954
+ throw takeFromExternrefTable0(ret[1]);
1955
+ }
1956
+ return takeFromExternrefTable0(ret[0]);
1957
+ }
1958
+
1942
1959
  /**
1943
1960
  * `PostgreSQL`-backed storage built from `config`.
1944
1961
  * @param {PostgresStorageConfig} config
@@ -2896,6 +2913,10 @@ function __wbg_get_imports() {
2896
2913
  const ret = arg0.listTokensOutputs();
2897
2914
  return ret;
2898
2915
  }, arguments); },
2916
+ __wbg_listWatchedDepositAddresses_55fe8af0643e3ea9: function() { return handleError(function (arg0) {
2917
+ const ret = arg0.listWatchedDepositAddresses();
2918
+ return ret;
2919
+ }, arguments); },
2899
2920
  __wbg_log_cf86719f8acabfda: function(arg0, arg1) {
2900
2921
  arg0.log(arg1);
2901
2922
  },
@@ -3595,6 +3616,18 @@ function __wbg_get_imports() {
3595
3616
  const ret = arg0.updateTokenOutputs(arg1, arg2);
3596
3617
  return ret;
3597
3618
  }, arguments); },
3619
+ __wbg_updateWatchedDepositAddress_260322f77dee1443: function() { return handleError(function (arg0, arg1, arg2, arg3) {
3620
+ let deferred0_0;
3621
+ let deferred0_1;
3622
+ try {
3623
+ deferred0_0 = arg1;
3624
+ deferred0_1 = arg2;
3625
+ const ret = arg0.updateWatchedDepositAddress(getStringFromWasm0(arg1, arg2), arg3);
3626
+ return ret;
3627
+ } finally {
3628
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
3629
+ }
3630
+ }, arguments); },
3598
3631
  __wbg_url_68fd9a221360e0db: function(arg0, arg1) {
3599
3632
  const ret = arg1.url;
3600
3633
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -3630,47 +3663,47 @@ function __wbg_get_imports() {
3630
3663
  return ret;
3631
3664
  },
3632
3665
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
3633
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 22, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3634
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522);
3666
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 21, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3667
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h0a7e586e9273e375);
3635
3668
  return ret;
3636
3669
  },
3637
3670
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
3638
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 397, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3671
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 384, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3639
3672
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3b28fbbc8b451a25);
3640
3673
  return ret;
3641
3674
  },
3642
3675
  __wbindgen_cast_0000000000000003: function(arg0, arg1) {
3643
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 397, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3676
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 384, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3644
3677
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3b28fbbc8b451a25_2);
3645
3678
  return ret;
3646
3679
  },
3647
3680
  __wbindgen_cast_0000000000000004: function(arg0, arg1) {
3648
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 397, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3681
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 384, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3649
3682
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3b28fbbc8b451a25_3);
3650
3683
  return ret;
3651
3684
  },
3652
3685
  __wbindgen_cast_0000000000000005: function(arg0, arg1) {
3653
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("SessionStore")], shim_idx: 22, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3654
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_4);
3686
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("SessionStore")], shim_idx: 21, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3687
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h0a7e586e9273e375_4);
3655
3688
  return ret;
3656
3689
  },
3657
3690
  __wbindgen_cast_0000000000000006: function(arg0, arg1) {
3658
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Storage")], shim_idx: 22, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3659
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_5);
3691
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Storage")], shim_idx: 21, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3692
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h0a7e586e9273e375_5);
3660
3693
  return ret;
3661
3694
  },
3662
3695
  __wbindgen_cast_0000000000000007: function(arg0, arg1) {
3663
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("TokenStore")], shim_idx: 22, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3664
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_6);
3696
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("TokenStore")], shim_idx: 21, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3697
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h0a7e586e9273e375_6);
3665
3698
  return ret;
3666
3699
  },
3667
3700
  __wbindgen_cast_0000000000000008: function(arg0, arg1) {
3668
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("TreeStore")], shim_idx: 22, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3669
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_7);
3701
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("TreeStore")], shim_idx: 21, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3702
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h0a7e586e9273e375_7);
3670
3703
  return ret;
3671
3704
  },
3672
3705
  __wbindgen_cast_0000000000000009: function(arg0, arg1) {
3673
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 402, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3706
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 388, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3674
3707
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h484cd36e13f37bd7);
3675
3708
  return ret;
3676
3709
  },
@@ -3778,36 +3811,36 @@ function wasm_bindgen__convert__closures_____invoke__h3b28fbbc8b451a25_3(arg0, a
3778
3811
  wasm.wasm_bindgen__convert__closures_____invoke__h3b28fbbc8b451a25_3(arg0, arg1, arg2);
3779
3812
  }
3780
3813
 
3781
- function wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522(arg0, arg1, arg2) {
3782
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522(arg0, arg1, arg2);
3814
+ function wasm_bindgen__convert__closures_____invoke__h0a7e586e9273e375(arg0, arg1, arg2) {
3815
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h0a7e586e9273e375(arg0, arg1, arg2);
3783
3816
  if (ret[1]) {
3784
3817
  throw takeFromExternrefTable0(ret[0]);
3785
3818
  }
3786
3819
  }
3787
3820
 
3788
- function wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_4(arg0, arg1, arg2) {
3789
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_4(arg0, arg1, arg2);
3821
+ function wasm_bindgen__convert__closures_____invoke__h0a7e586e9273e375_4(arg0, arg1, arg2) {
3822
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h0a7e586e9273e375_4(arg0, arg1, arg2);
3790
3823
  if (ret[1]) {
3791
3824
  throw takeFromExternrefTable0(ret[0]);
3792
3825
  }
3793
3826
  }
3794
3827
 
3795
- function wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_5(arg0, arg1, arg2) {
3796
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_5(arg0, arg1, arg2);
3828
+ function wasm_bindgen__convert__closures_____invoke__h0a7e586e9273e375_5(arg0, arg1, arg2) {
3829
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h0a7e586e9273e375_5(arg0, arg1, arg2);
3797
3830
  if (ret[1]) {
3798
3831
  throw takeFromExternrefTable0(ret[0]);
3799
3832
  }
3800
3833
  }
3801
3834
 
3802
- function wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_6(arg0, arg1, arg2) {
3803
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_6(arg0, arg1, arg2);
3835
+ function wasm_bindgen__convert__closures_____invoke__h0a7e586e9273e375_6(arg0, arg1, arg2) {
3836
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h0a7e586e9273e375_6(arg0, arg1, arg2);
3804
3837
  if (ret[1]) {
3805
3838
  throw takeFromExternrefTable0(ret[0]);
3806
3839
  }
3807
3840
  }
3808
3841
 
3809
- function wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_7(arg0, arg1, arg2) {
3810
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_7(arg0, arg1, arg2);
3842
+ function wasm_bindgen__convert__closures_____invoke__h0a7e586e9273e375_7(arg0, arg1, arg2) {
3843
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h0a7e586e9273e375_7(arg0, arg1, arg2);
3811
3844
  if (ret[1]) {
3812
3845
  throw takeFromExternrefTable0(ret[0]);
3813
3846
  }
Binary file
@@ -128,6 +128,7 @@ export const initLogging: (a: any, b: number, c: number) => any;
128
128
  export const mysqlStorage: (a: any) => number;
129
129
  export const newRestChainService: (a: number, b: number, c: any, d: any, e: number) => any;
130
130
  export const newSharedSdkContext: (a: any) => any;
131
+ export const parseSparkConfig: (a: number, b: number) => [number, number, number];
131
132
  export const passkeyclient_checkAvailability: (a: number) => any;
132
133
  export const passkeyclient_connectWithPasskey: (a: number, b: any) => any;
133
134
  export const passkeyclient_labels: (a: number) => number;
@@ -189,11 +190,11 @@ export const __wbg_externalsparksignerhandle_free: (a: number, b: number) => voi
189
190
  export const __wbg_signingonlyexternalsigners_free: (a: number, b: number) => void;
190
191
  export const signingonlyexternalsigners_breezSigner: (a: number) => number;
191
192
  export const signingonlyexternalsigners_sparkSigner: (a: number) => number;
192
- export const wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522: (a: number, b: number, c: any) => [number, number];
193
- export const wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_4: (a: number, b: number, c: any) => [number, number];
194
- export const wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_5: (a: number, b: number, c: any) => [number, number];
195
- export const wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_6: (a: number, b: number, c: any) => [number, number];
196
- export const wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_7: (a: number, b: number, c: any) => [number, number];
193
+ export const wasm_bindgen__convert__closures_____invoke__h0a7e586e9273e375: (a: number, b: number, c: any) => [number, number];
194
+ export const wasm_bindgen__convert__closures_____invoke__h0a7e586e9273e375_4: (a: number, b: number, c: any) => [number, number];
195
+ export const wasm_bindgen__convert__closures_____invoke__h0a7e586e9273e375_5: (a: number, b: number, c: any) => [number, number];
196
+ export const wasm_bindgen__convert__closures_____invoke__h0a7e586e9273e375_6: (a: number, b: number, c: any) => [number, number];
197
+ export const wasm_bindgen__convert__closures_____invoke__h0a7e586e9273e375_7: (a: number, b: number, c: any) => [number, number];
197
198
  export const wasm_bindgen__convert__closures_____invoke__h41057d61edf43a32: (a: number, b: number, c: any, d: any) => void;
198
199
  export const wasm_bindgen__convert__closures_____invoke__h3b28fbbc8b451a25: (a: number, b: number, c: any) => void;
199
200
  export const wasm_bindgen__convert__closures_____invoke__h3b28fbbc8b451a25_2: (a: number, b: number, c: any) => void;
@@ -545,7 +545,7 @@ export interface BatchRecipient {
545
545
 
546
546
  export interface BatchTotal {
547
547
  tokenIdentifier?: string;
548
- amount: bigint;
548
+ amount: string;
549
549
  }
550
550
 
551
551
  export interface Bip21Details {
@@ -705,7 +705,7 @@ export interface ClaimDepositRequest {
705
705
  }
706
706
 
707
707
  export interface ClaimDepositResponse {
708
- payment?: Payment;
708
+ outcome: ClaimDepositOutcome;
709
709
  }
710
710
 
711
711
  export interface ClaimHtlcPaymentRequest {
@@ -832,12 +832,17 @@ export interface Credentials {
832
832
  password: string;
833
833
  }
834
834
 
835
+ export interface CrossChainAcceptedAsset {
836
+ asset: SparkAsset;
837
+ limits?: CrossChainRouteLimits;
838
+ }
839
+
835
840
  export interface CrossChainAddressDetails {
836
841
  address: string;
837
842
  addressFamily: CrossChainAddressFamily;
838
843
  contractAddress?: string;
839
844
  chainId?: number;
840
- amount?: bigint;
845
+ amount?: string;
841
846
  }
842
847
 
843
848
  export interface CrossChainConfig {
@@ -853,9 +858,17 @@ export interface CrossChainReceiveInfo {
853
858
  tokenIdentifier?: string;
854
859
  serviceFeeAmount: string;
855
860
  serviceFeeAsset?: string;
861
+ serviceFeeAssetDecimals?: number;
856
862
  expiresAt: number;
857
863
  }
858
864
 
865
+ export interface CrossChainRouteLimits {
866
+ minAmount?: string;
867
+ maxAmount?: string;
868
+ minUsdCents?: number;
869
+ maxUsdCents?: number;
870
+ }
871
+
859
872
  export interface CrossChainRoutePair {
860
873
  provider: CrossChainProvider;
861
874
  chain: string;
@@ -864,7 +877,7 @@ export interface CrossChainRoutePair {
864
877
  contractAddress?: string;
865
878
  decimals: number;
866
879
  exactOutEligible: boolean;
867
- acceptedAssets: SparkAsset[];
880
+ acceptedAssets: CrossChainAcceptedAsset[];
868
881
  deliveryMethods: DeliveryMethod[];
869
882
  }
870
883
 
@@ -888,6 +901,7 @@ export interface DepositInfo {
888
901
  claimError?: DepositClaimError;
889
902
  instantClaimStatus?: InstantClaimStatus;
890
903
  refundState?: RefundState;
904
+ maxClaimFee?: MaxFee;
891
905
  }
892
906
 
893
907
  export interface EcdsaSignatureBytes {
@@ -968,6 +982,10 @@ export interface ExternalInputParser {
968
982
  parserUrl: string;
969
983
  }
970
984
 
985
+ export interface ExternalLeafSigningKey {
986
+ derivedFrom: ExternalTreeNodeId;
987
+ }
988
+
971
989
  export interface ExternalNewLeafKey {
972
990
  nodeId: ExternalTreeNodeId;
973
991
  newSigningPublicKey: number[];
@@ -1114,6 +1132,7 @@ export interface ExternalStartedStaticDepositRefund {
1114
1132
  export interface ExternalTransferLeafInput {
1115
1133
  nodeId: ExternalTreeNodeId;
1116
1134
  newLeafId: ExternalTreeNodeId;
1135
+ signingKey: ExternalLeafSigningKey;
1117
1136
  }
1118
1137
 
1119
1138
  export interface ExternalTreeNodeId {
@@ -1486,6 +1505,7 @@ export interface PreparePaymentLinkResponse {
1486
1505
  asset: string;
1487
1506
  serviceFeeAmount: bigint;
1488
1507
  serviceFeeAsset?: string;
1508
+ serviceFeeAssetDecimals?: number;
1489
1509
  expiresAt: string;
1490
1510
  }
1491
1511
 
@@ -1831,6 +1851,8 @@ export interface Storage {
1831
1851
  deleteDeposit: (txid: string, vout: number) => Promise<void>;
1832
1852
  listDeposits: () => Promise<DepositInfo[]>;
1833
1853
  updateDeposit: (txid: string, vout: number, payload: UpdateDepositPayload) => Promise<void>;
1854
+ listWatchedDepositAddresses: () => Promise<WatchedDepositAddress[]>;
1855
+ updateWatchedDepositAddress: (address: string, payload: UpdateWatchedAddressPayload) => Promise<void>;
1834
1856
  setLnurlMetadata: (metadata: SetLnurlMetadataItem[]) => Promise<void>;
1835
1857
  getPaymentsByParentIds: (parentPaymentIds: string[]) => Promise<{ [parentId: string]: RelatedPayment[] }>;
1836
1858
  listContacts: (request: ListContactsRequest) => Promise<Contact[]>;
@@ -2025,6 +2047,12 @@ export interface Utxo {
2025
2047
  status: TxStatus;
2026
2048
  }
2027
2049
 
2050
+ export interface WatchedDepositAddress {
2051
+ address: string;
2052
+ issuedAt: number;
2053
+ seen: boolean;
2054
+ }
2055
+
2028
2056
  export interface Webhook {
2029
2057
  id: string;
2030
2058
  url: string;
@@ -2051,11 +2079,15 @@ export type BuyBitcoinRequest = { type: "moonpay"; lockedAmountSat?: number; red
2051
2079
 
2052
2080
  export type ChainApiType = "esplora" | "mempoolSpace";
2053
2081
 
2082
+ export type ClaimDeferredReason = { type: "maxFeeExceeded"; requiredFeeSats: number; maxFeeSats: number } | { type: "noEarlyClaimAvailable" } | { type: "providerDeclined"; message: string };
2083
+
2084
+ export type ClaimDepositOutcome = { type: "settled"; payment: Payment } | { type: "submitted" } | { type: "deferred"; reason: ClaimDeferredReason };
2085
+
2054
2086
  export type ConversionChain = { type: "spark" } | { type: "lightning" } | { type: "external"; name: string; chainId?: string };
2055
2087
 
2056
2088
  export type ConversionFilter = "ammRefundNeeded" | "orchestraPending" | "boltzPending";
2057
2089
 
2058
- export type ConversionInfo = { type: "amm"; poolId: string; conversionId: string; status: ConversionStatus; fee?: string; purpose?: ConversionPurpose; amountAdjustment?: AmountAdjustmentReason; degradation?: SwapDegradation } | { type: "orchestra"; chain: string; chainId?: string; asset?: string; assetContract?: string; recipientAddress: string; assetAmountIn?: string; estimatedOut: string; deliveredAmount?: string; externalTxHash?: string; status: ConversionStatus; feeAmount?: string; serviceFeeAmount?: string; serviceFeeAsset?: string; assetDecimals: number; orderId: string; quoteId: string; readToken?: string } | { type: "boltz"; chain: string; chainId?: string; asset?: string; assetContract?: string; recipientAddress: string; assetAmountIn?: string; estimatedOut: string; deliveredAmount?: string; status: ConversionStatus; feeAmount?: string; serviceFeeAmount?: string; serviceFeeAsset?: string; assetDecimals: number; swapId: string; invoice: string; invoiceAmountSats: number; bridgeRef?: string; maxSlippageBps: number; quoteDegraded?: boolean };
2090
+ export type ConversionInfo = { type: "amm"; poolId: string; conversionId: string; status: ConversionStatus; fee?: string; purpose?: ConversionPurpose; amountAdjustment?: AmountAdjustmentReason; degradation?: SwapDegradation } | { type: "orchestra"; chain: string; chainId?: string; asset?: string; assetContract?: string; recipientAddress: string; assetAmountIn?: string; estimatedOut: string; deliveredAmount?: string; externalTxHash?: string; status: ConversionStatus; feeAmount?: string; serviceFeeAmount?: string; serviceFeeAsset?: string; serviceFeeAssetDecimals?: number; assetDecimals: number; orderId: string; quoteId: string; readToken?: string } | { type: "boltz"; chain: string; chainId?: string; asset?: string; assetContract?: string; recipientAddress: string; assetAmountIn?: string; estimatedOut: string; deliveredAmount?: string; status: ConversionStatus; feeAmount?: string; serviceFeeAmount?: string; serviceFeeAsset?: string; assetDecimals: number; swapId: string; invoice: string; invoiceAmountSats: number; bridgeRef?: string; maxSlippageBps: number; quoteDegraded?: boolean };
2059
2091
 
2060
2092
  export type ConversionProvider = "amm" | "orchestra" | "boltz";
2061
2093
 
@@ -2081,7 +2113,7 @@ export type CrossChainRouteFilter = { type: "send"; addressDetails: CrossChainAd
2081
2113
 
2082
2114
  export type DeliveryMethod = "spark" | "lightning" | "bitcoin";
2083
2115
 
2084
- export type DepositClaimError = { type: "maxDepositClaimFeeExceeded"; tx: string; vout: number; maxFee?: Fee; requiredFeeSats: number; requiredFeeRateSatPerVbyte: number } | { type: "missingUtxo"; tx: string; vout: number } | { type: "generic"; message: string };
2116
+ export type DepositClaimError = { type: "maxDepositClaimFeeExceeded"; tx: string; vout: number; maxFee?: Fee; requiredFeeSats: number; requiredFeeRateSatPerVbyte: number } | { type: "missingUtxo"; tx: string; vout: number } | { type: "depositTooSmall"; tx: string; vout: number } | { type: "generic"; message: string };
2085
2117
 
2086
2118
  export type ExitLeafSelection = { type: "auto" } | { type: "specific"; leafIds: string[] };
2087
2119
 
@@ -2103,13 +2135,13 @@ export type FeePolicy = "feesExcluded" | "feesIncluded";
2103
2135
 
2104
2136
  export type InputType = ({ type: "bitcoinAddress" } & BitcoinAddressDetails) | ({ type: "bolt11Invoice" } & Bolt11InvoiceDetails) | ({ type: "bolt12Invoice" } & Bolt12InvoiceDetails) | ({ type: "bolt12Offer" } & Bolt12OfferDetails) | ({ type: "lightningAddress" } & LightningAddressDetails) | ({ type: "lnurlPay" } & LnurlPayRequestDetails) | ({ type: "silentPaymentAddress" } & SilentPaymentAddressDetails) | ({ type: "lnurlAuth" } & LnurlAuthRequestDetails) | ({ type: "url" } & string) | ({ type: "bip21" } & Bip21Details) | ({ type: "bolt12InvoiceRequest" } & Bolt12InvoiceRequestDetails) | ({ type: "lnurlWithdraw" } & LnurlWithdrawRequestDetails) | ({ type: "sparkAddress" } & SparkAddressDetails) | ({ type: "sparkInvoice" } & SparkInvoiceDetails) | ({ type: "crossChainAddress" } & CrossChainAddressDetails);
2105
2137
 
2106
- export type InstantClaimStatus = { type: "declined"; maxFeeSats?: number; confirmations?: number } | { type: "submitted"; claimId: string };
2138
+ export type InstantClaimStatus = { type: "declined"; maxFeeSats?: number; confirmations?: number } | { type: "submitted"; claimId: string } | { type: "claimed" };
2107
2139
 
2108
2140
  export type LnurlCallbackStatus = { type: "ok" } | { type: "errorStatus"; errorDetails: LnurlErrorDetails };
2109
2141
 
2110
2142
  export type MaxFee = { type: "fixed"; amount: number } | { type: "rate"; satPerVbyte: number } | { type: "networkRecommended"; leewaySatPerVbyte: number };
2111
2143
 
2112
- export type Network = "mainnet" | "regtest";
2144
+ export type Network = "mainnet" | "regtest" | "signet";
2113
2145
 
2114
2146
  export type OnchainConfirmationSpeed = "fast" | "medium" | "slow";
2115
2147
 
@@ -2141,11 +2173,11 @@ export type ReceivePaymentMethod = { type: "sparkAddress" } | { type: "sparkInvo
2141
2173
 
2142
2174
  export type RefundState = { type: "broadcastPending"; lastError?: string } | { type: "broadcast" };
2143
2175
 
2144
- export type SdkEvent = { type: "synced" } | { type: "unclaimedDeposits"; unclaimedDeposits: DepositInfo[] } | { type: "claimedDeposits"; claimedDeposits: DepositInfo[] } | { type: "paymentSucceeded"; payment: Payment } | { type: "paymentPending"; payment: Payment } | { type: "paymentFailed"; payment: Payment } | { type: "autoOptimization"; optimizationEvent: AutoOptimizationEvent } | { type: "lightningAddressChanged"; lightningAddress?: LightningAddressInfo } | { type: "newDeposits"; newDeposits: DepositInfo[] } | { type: "unilateralExitStateChanged" };
2176
+ export type SdkEvent = { type: "synced" } | { type: "unclaimedDeposits"; unclaimedDeposits: DepositInfo[] } | { type: "claimedDeposits"; claimedDeposits: DepositInfo[] } | { type: "paymentSucceeded"; payment: Payment } | { type: "paymentPending"; payment: Payment } | { type: "paymentFailed"; payment: Payment } | { type: "paymentMetadataUpdated"; payment: Payment } | { type: "autoOptimization"; optimizationEvent: AutoOptimizationEvent } | { type: "lightningAddressChanged"; lightningAddress?: LightningAddressInfo } | { type: "newDeposits"; newDeposits: DepositInfo[] } | { type: "unilateralExitStateChanged" } | { type: "stableBalanceConversionFailed"; conversion: StableBalanceConversionKind; error: string; retryInSecs?: number };
2145
2177
 
2146
2178
  export type Seed = { type: "mnemonic"; mnemonic: string; passphrase?: string } | ({ type: "entropy" } & number[]);
2147
2179
 
2148
- export type SendPaymentMethod = { type: "bitcoinAddress"; address: BitcoinAddressDetails; feeQuote: SendOnchainFeeQuote } | { type: "bolt11Invoice"; invoiceDetails: Bolt11InvoiceDetails; sparkTransferFeeSats?: number; lightningFeeSats: number } | { type: "sparkAddress"; address: string; fee: string; tokenIdentifier?: string } | { type: "sparkInvoice"; sparkInvoiceDetails: SparkInvoiceDetails; fee: string; tokenIdentifier?: string } | { type: "crossChainAddress"; route: CrossChainRoutePair; recipientAddress: string; amountIn: string; assetAmountIn: string; estimatedOut: string; feeAmount: string; serviceFeeAmount: string; serviceFeeAsset?: string; sourceTransferFeeSats: number; feeMode: CrossChainFeeMode; expiresAt: string; providerContext: CrossChainProviderContext };
2180
+ export type SendPaymentMethod = { type: "bitcoinAddress"; address: BitcoinAddressDetails; feeQuote: SendOnchainFeeQuote } | { type: "bolt11Invoice"; invoiceDetails: Bolt11InvoiceDetails; sparkTransferFeeSats?: number; lightningFeeSats: number } | { type: "sparkAddress"; address: string; fee: string; tokenIdentifier?: string } | { type: "sparkInvoice"; sparkInvoiceDetails: SparkInvoiceDetails; fee: string; tokenIdentifier?: string } | { type: "crossChainAddress"; route: CrossChainRoutePair; recipientAddress: string; amountIn: string; assetAmountIn: string; estimatedOut: string; feeAmount: string; serviceFeeAmount: string; serviceFeeAsset?: string; serviceFeeAssetDecimals?: number; sourceTransferFeeSats: number; feeMode: CrossChainFeeMode; expiresAt: string; providerContext: CrossChainProviderContext };
2149
2181
 
2150
2182
  export type SendPaymentOptions = { type: "bitcoinAddress"; confirmationSpeed: OnchainConfirmationSpeed } | { type: "bolt11Invoice"; preferSpark: boolean; completionTimeoutSecs?: number } | { type: "sparkAddress"; htlcOptions?: SparkHtlcOptions };
2151
2183
 
@@ -2161,6 +2193,8 @@ export type SparkMasterIdentityPublicKey = { type: "set"; publicKey: string } |
2161
2193
 
2162
2194
  export type StableBalanceActiveLabel = { type: "set"; label: string } | { type: "unset" };
2163
2195
 
2196
+ export type StableBalanceConversionKind = "perReceive" | "autoConvert" | "deactivation";
2197
+
2164
2198
  export type StoragePaymentDetailsFilter = { type: "spark"; htlcStatus?: SparkHtlcStatus[]; conversionFilter?: ConversionFilter } | { type: "token"; conversionFilter?: ConversionFilter; txHash?: string; txType?: TokenTransactionType } | { type: "lightning"; htlcStatus?: SparkHtlcStatus[]; conversionFilter?: ConversionFilter };
2165
2199
 
2166
2200
  export type SuccessAction = { type: "aes"; data: AesSuccessActionData } | { type: "message"; data: MessageSuccessActionData } | { type: "url"; data: UrlSuccessActionData };
@@ -2183,7 +2217,9 @@ export type UnilateralExitVerdict = { type: "valid" } | { type: "done" } | { typ
2183
2217
 
2184
2218
  export type UnsignedTransferPackage = { type: "swap"; prepareTransfer: ExternalPrepareTransferRequest; targetAmounts: number[]; amountSat: number; feeSat: number } | { type: "transfer"; prepareTransfer: ExternalPrepareTransferRequest; amountSat: number; feeSat: number; target: TransferTarget } | { type: "token"; prepareTokenTransaction: ExternalPrepareTokenTransactionRequest; tokenContext: number[]; tokenIdentifier: string; amount: string; fee: string; isSwap: boolean } | { type: "tokenBatch"; prepareTokenTransaction: ExternalPrepareTokenTransactionRequest; tokenContext: number[]; totals: BatchTotal[]; isSwap: boolean };
2185
2219
 
2186
- export type UpdateDepositPayload = { type: "claimError"; error: DepositClaimError } | { type: "refund"; refundTxid: string; refundTx: string; state: RefundState } | { type: "instantClaim"; status: InstantClaimStatus } | { type: "refundBroadcastState"; refundTxid: string; state: RefundState };
2220
+ export type UpdateDepositPayload = { type: "claimError"; error: DepositClaimError } | { type: "refund"; refundTxid: string; refundTx: string; state: RefundState } | { type: "instantClaim"; status: InstantClaimStatus } | { type: "refundBroadcastState"; refundTxid: string; state: RefundState } | { type: "maxClaimFee"; maxFee?: MaxFee };
2221
+
2222
+ export type UpdateWatchedAddressPayload = { type: "watch"; issuedAt: number } | { type: "seen" } | { type: "unwatch"; issuedAt: number };
2187
2223
 
2188
2224
  export type WebhookEventType = { type: "lightningReceiveFinished" } | { type: "lightningSendFinished" } | { type: "coopExitFinished" } | { type: "staticDepositFinished" } | ({ type: "unknown" } & string);
2189
2225
 
@@ -2701,6 +2737,13 @@ export function newRestChainService(url: string, network: Network, api_type: Cha
2701
2737
  */
2702
2738
  export function newSharedSdkContext(config: WasmSdkContextConfig): Promise<WasmSdkContext>;
2703
2739
 
2740
+ /**
2741
+ * Reads a `SparkConfig` from JSON, for a deployment that publishes its
2742
+ * operators, service provider and certificates as a file. Set it on
2743
+ * `Config.sparkConfig` to connect a wallet to that deployment.
2744
+ */
2745
+ export function parseSparkConfig(json: string): SparkConfig;
2746
+
2704
2747
  /**
2705
2748
  * `PostgreSQL`-backed storage built from `config`.
2706
2749
  */