@buildonspark/spark-sdk 0.5.0 → 0.5.1

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 (81) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/bare/index.cjs +1608 -3635
  3. package/dist/bare/index.d.cts +27 -435
  4. package/dist/bare/index.d.ts +27 -435
  5. package/dist/bare/index.js +1608 -3634
  6. package/dist/{chunk-RU434ZAE.js → chunk-F3BFSHVR.js} +357 -391
  7. package/dist/{chunk-UYEB2VPG.js → chunk-IOIEBLMK.js} +7 -1
  8. package/dist/{chunk-EU3I7GFB.js → chunk-STB6WMU7.js} +1 -1
  9. package/dist/{chunk-JE3MXMPW.js → chunk-UTECVGQQ.js} +93 -202
  10. package/dist/{chunk-ZP6Z6DFX.js → chunk-YFVVYZCS.js} +37 -5
  11. package/dist/{client-D1dLzWu0.d.ts → client-C9kc4cog.d.cts} +9 -3
  12. package/dist/{client-CVn0R_eM.d.cts → client-eyjf4knu.d.ts} +9 -3
  13. package/dist/graphql/objects/index.cjs +7 -1
  14. package/dist/graphql/objects/index.d.cts +3 -3
  15. package/dist/graphql/objects/index.d.ts +3 -3
  16. package/dist/graphql/objects/index.js +1 -1
  17. package/dist/index.browser.d.ts +27 -435
  18. package/dist/index.browser.js +1613 -3639
  19. package/dist/index.node.cjs +1613 -3640
  20. package/dist/index.node.d.cts +7 -8
  21. package/dist/index.node.d.ts +7 -8
  22. package/dist/index.node.js +5 -7
  23. package/dist/native/index.react-native.cjs +1613 -3640
  24. package/dist/native/index.react-native.d.cts +27 -435
  25. package/dist/native/index.react-native.d.ts +27 -435
  26. package/dist/native/index.react-native.js +1613 -3639
  27. package/dist/proto/spark.cjs +93 -202
  28. package/dist/proto/spark.d.cts +1 -1
  29. package/dist/proto/spark.d.ts +1 -1
  30. package/dist/proto/spark.js +1 -1
  31. package/dist/proto/spark_token.cjs +36 -4
  32. package/dist/proto/spark_token.d.cts +4 -1
  33. package/dist/proto/spark_token.d.ts +4 -1
  34. package/dist/proto/spark_token.js +2 -2
  35. package/dist/{spark-2Fxnvl8K.d.cts → spark-d6w3BLGZ.d.cts} +10 -328
  36. package/dist/{spark-2Fxnvl8K.d.ts → spark-d6w3BLGZ.d.ts} +10 -328
  37. package/dist/{spark-wallet.node-DlhZiDgY.d.ts → spark-wallet.node-MReThHBY.d.ts} +6 -7
  38. package/dist/{spark-wallet.node-xKJXzAEd.d.cts → spark-wallet.node-eR0svGws.d.cts} +6 -7
  39. package/dist/tests/test-utils.cjs +409 -2429
  40. package/dist/tests/test-utils.d.cts +3 -3
  41. package/dist/tests/test-utils.d.ts +3 -3
  42. package/dist/tests/test-utils.js +5 -5
  43. package/dist/types/index.cjs +100 -203
  44. package/dist/types/index.d.cts +2 -2
  45. package/dist/types/index.d.ts +2 -2
  46. package/dist/types/index.js +3 -3
  47. package/package.json +3 -3
  48. package/src/graphql/client.ts +36 -1
  49. package/src/graphql/objects/LightningSendRequestStatus.ts +25 -13
  50. package/src/proto/common.ts +1 -1
  51. package/src/proto/google/protobuf/descriptor.ts +1 -1
  52. package/src/proto/google/protobuf/duration.ts +1 -1
  53. package/src/proto/google/protobuf/empty.ts +1 -1
  54. package/src/proto/google/protobuf/timestamp.ts +1 -1
  55. package/src/proto/mock.ts +1 -1
  56. package/src/proto/spark.ts +113 -446
  57. package/src/proto/spark_authn.ts +1 -1
  58. package/src/proto/spark_token.ts +41 -2
  59. package/src/proto/validate/validate.ts +1 -1
  60. package/src/services/connection/connection.ts +23 -60
  61. package/src/services/coop-exit.ts +3 -5
  62. package/src/services/deposit.ts +1 -1
  63. package/src/services/lightning.ts +1 -1
  64. package/src/services/signing.ts +5 -6
  65. package/src/services/transfer.ts +250 -240
  66. package/src/services/wallet-config.ts +22 -5
  67. package/src/spark-wallet/proto-descriptors.ts +1 -1
  68. package/src/spark-wallet/proto-reflection.ts +0 -2
  69. package/src/spark-wallet/spark-wallet.ts +2 -2
  70. package/src/spark_descriptors.pb +0 -0
  71. package/src/tests/bufbuild-reflection.test.ts +2 -3
  72. package/src/tests/integration/coop-exit.test.ts +6 -1
  73. package/src/tests/integration/htlc.test.ts +5 -0
  74. package/src/tests/integration/lightning.test.ts +24 -4
  75. package/src/tests/integration/time-sync.test.ts +18 -0
  76. package/src/tests/integration/transfer.test.ts +42 -7
  77. package/src/tests/ssp-client-retry.test.ts +161 -0
  78. package/src/tests/token-hashing.test.ts +92 -0
  79. package/src/utils/token-hashing.ts +4 -51
  80. package/src/utils/transaction.ts +1 -2
  81. package/src/utils/unilateral-exit.ts +139 -142
@@ -169,6 +169,7 @@ declare function preimageRequestStatusToJSON(object: PreimageRequestStatus): str
169
169
  declare enum PreimageRequestRole {
170
170
  PREIMAGE_REQUEST_ROLE_RECEIVER = 0,
171
171
  PREIMAGE_REQUEST_ROLE_SENDER = 1,
172
+ PREIMAGE_REQUEST_ROLE_RECEIVER_AND_SENDER = 2,
172
173
  UNRECOGNIZED = -1
173
174
  }
174
175
  declare function preimageRequestRoleFromJSON(object: any): PreimageRequestRole;
@@ -202,6 +203,7 @@ declare enum TreeNodeStatus {
202
203
  TREE_NODE_STATUS_ON_CHAIN = 7,
203
204
  TREE_NODE_STATUS_AGGREGATE_LOCK = 8,
204
205
  TREE_NODE_STATUS_EXITED = 9,
206
+ TREE_NODE_STATUS_RENEW_LOCKED = 10,
205
207
  UNRECOGNIZED = -1
206
208
  }
207
209
  declare function treeNodeStatusFromJSON(object: any): TreeNodeStatus;
@@ -1695,10 +1697,18 @@ declare const AdaptorPublicKeyPackage: MessageFns<AdaptorPublicKeyPackage>;
1695
1697
  interface WalletSetting {
1696
1698
  ownerIdentityPublicKey: Uint8Array;
1697
1699
  privateEnabled: boolean;
1700
+ masterIdentityPublicKey?: Uint8Array | undefined;
1698
1701
  }
1699
1702
  declare const WalletSetting: MessageFns<WalletSetting>;
1700
1703
  interface UpdateWalletSettingRequest {
1701
1704
  privateEnabled?: boolean | undefined;
1705
+ masterIdentityPublicKey?: {
1706
+ $case: "setMasterIdentityPublicKey";
1707
+ setMasterIdentityPublicKey: Uint8Array;
1708
+ } | {
1709
+ $case: "clearMasterIdentityPublicKey";
1710
+ clearMasterIdentityPublicKey: boolean;
1711
+ } | undefined;
1702
1712
  }
1703
1713
  declare const UpdateWalletSettingRequest: MessageFns<UpdateWalletSettingRequest>;
1704
1714
  interface UpdateWalletSettingResponse {
@@ -1742,50 +1752,6 @@ declare const SparkServiceDefinition: {
1742
1752
  readonly responseStream: false;
1743
1753
  readonly options: {};
1744
1754
  };
1745
- /**
1746
- * This is deprecated, please use start_deposit_tree_creation instead.
1747
- *
1748
- * @deprecated
1749
- */
1750
- readonly start_tree_creation: {
1751
- readonly name: "start_tree_creation";
1752
- readonly requestType: MessageFns<StartTreeCreationRequest>;
1753
- readonly requestStream: false;
1754
- readonly responseType: MessageFns<StartTreeCreationResponse>;
1755
- readonly responseStream: false;
1756
- readonly options: {};
1757
- };
1758
- /** @deprecated */
1759
- readonly finalize_node_signatures: {
1760
- readonly name: "finalize_node_signatures";
1761
- readonly requestType: MessageFns<FinalizeNodeSignaturesRequest>;
1762
- readonly requestStream: false;
1763
- readonly responseType: MessageFns<FinalizeNodeSignaturesResponse>;
1764
- readonly responseStream: false;
1765
- readonly options: {};
1766
- };
1767
- /** @deprecated */
1768
- readonly start_transfer: {
1769
- readonly name: "start_transfer";
1770
- readonly requestType: MessageFns<StartTransferRequest>;
1771
- readonly requestStream: false;
1772
- readonly responseType: MessageFns<StartTransferResponse>;
1773
- readonly responseStream: false;
1774
- readonly options: {};
1775
- };
1776
- /**
1777
- * This is deprecated, please use finalize_transfer_with_transfer_package instead.
1778
- *
1779
- * @deprecated
1780
- */
1781
- readonly finalize_transfer: {
1782
- readonly name: "finalize_transfer";
1783
- readonly requestType: MessageFns<FinalizeTransferRequest>;
1784
- readonly requestStream: false;
1785
- readonly responseType: MessageFns<FinalizeTransferResponse>;
1786
- readonly responseStream: false;
1787
- readonly options: {};
1788
- };
1789
1755
  readonly finalize_transfer_with_transfer_package: {
1790
1756
  readonly name: "finalize_transfer_with_transfer_package";
1791
1757
  readonly requestType: MessageFns<FinalizeTransferWithTransferPackageRequest>;
@@ -1794,15 +1760,6 @@ declare const SparkServiceDefinition: {
1794
1760
  readonly responseStream: false;
1795
1761
  readonly options: {};
1796
1762
  };
1797
- /** @deprecated */
1798
- readonly cancel_transfer: {
1799
- readonly name: "cancel_transfer";
1800
- readonly requestType: MessageFns<CancelTransferRequest>;
1801
- readonly requestStream: false;
1802
- readonly responseType: MessageFns<CancelTransferResponse>;
1803
- readonly responseStream: false;
1804
- readonly options: {};
1805
- };
1806
1763
  readonly query_pending_transfers: {
1807
1764
  readonly name: "query_pending_transfers";
1808
1765
  readonly requestType: MessageFns<TransferFilter>;
@@ -1827,15 +1784,6 @@ declare const SparkServiceDefinition: {
1827
1784
  readonly responseStream: false;
1828
1785
  readonly options: {};
1829
1786
  };
1830
- /** @deprecated */
1831
- readonly claim_transfer_sign_refunds: {
1832
- readonly name: "claim_transfer_sign_refunds";
1833
- readonly requestType: MessageFns<ClaimTransferSignRefundsRequest>;
1834
- readonly requestStream: false;
1835
- readonly responseType: MessageFns<ClaimTransferSignRefundsResponse>;
1836
- readonly responseStream: false;
1837
- readonly options: {};
1838
- };
1839
1787
  readonly store_preimage_share: {
1840
1788
  readonly name: "store_preimage_share";
1841
1789
  readonly requestType: MessageFns<StorePreimageShareRequest>;
@@ -1856,24 +1804,6 @@ declare const SparkServiceDefinition: {
1856
1804
  readonly responseStream: false;
1857
1805
  readonly options: {};
1858
1806
  };
1859
- /** @deprecated */
1860
- readonly cooperative_exit: {
1861
- readonly name: "cooperative_exit";
1862
- readonly requestType: MessageFns<CooperativeExitRequest>;
1863
- readonly requestStream: false;
1864
- readonly responseType: MessageFns<CooperativeExitResponse>;
1865
- readonly responseStream: false;
1866
- readonly options: {};
1867
- };
1868
- /** @deprecated */
1869
- readonly initiate_preimage_swap: {
1870
- readonly name: "initiate_preimage_swap";
1871
- readonly requestType: MessageFns<InitiatePreimageSwapRequest>;
1872
- readonly requestStream: false;
1873
- readonly responseType: MessageFns<InitiatePreimageSwapResponse>;
1874
- readonly responseStream: false;
1875
- readonly options: {};
1876
- };
1877
1807
  readonly provide_preimage: {
1878
1808
  readonly name: "provide_preimage";
1879
1809
  readonly requestType: MessageFns<ProvidePreimageRequest>;
@@ -1890,63 +1820,6 @@ declare const SparkServiceDefinition: {
1890
1820
  readonly responseStream: false;
1891
1821
  readonly options: {};
1892
1822
  };
1893
- /**
1894
- * This is the exact same as start_transfer, but expresses to the SO
1895
- * this transfer is specifically for a leaf swap.
1896
- */
1897
- readonly start_leaf_swap: {
1898
- readonly name: "start_leaf_swap";
1899
- readonly requestType: MessageFns<StartTransferRequest>;
1900
- readonly requestStream: false;
1901
- readonly responseType: MessageFns<StartTransferResponse>;
1902
- readonly responseStream: false;
1903
- readonly options: {};
1904
- };
1905
- /**
1906
- * This is deprecated, please use counter_leaf_swap instead.
1907
- *
1908
- * @deprecated
1909
- */
1910
- readonly leaf_swap: {
1911
- readonly name: "leaf_swap";
1912
- readonly requestType: MessageFns<CounterLeafSwapRequest>;
1913
- readonly requestStream: false;
1914
- readonly responseType: MessageFns<CounterLeafSwapResponse>;
1915
- readonly responseStream: false;
1916
- readonly options: {};
1917
- };
1918
- /**
1919
- * This is the exact same as start_leaf_swap, but signs with
1920
- * an adaptor public key after a counterparty has begun the swap via start_leaf_swap.
1921
- *
1922
- * @deprecated
1923
- */
1924
- readonly counter_leaf_swap: {
1925
- readonly name: "counter_leaf_swap";
1926
- readonly requestType: MessageFns<CounterLeafSwapRequest>;
1927
- readonly requestStream: false;
1928
- readonly responseType: MessageFns<CounterLeafSwapResponse>;
1929
- readonly responseStream: false;
1930
- readonly options: {};
1931
- };
1932
- /** @deprecated */
1933
- readonly refresh_timelock: {
1934
- readonly name: "refresh_timelock";
1935
- readonly requestType: MessageFns<RefreshTimelockRequest>;
1936
- readonly requestStream: false;
1937
- readonly responseType: MessageFns<RefreshTimelockResponse>;
1938
- readonly responseStream: false;
1939
- readonly options: {};
1940
- };
1941
- /** @deprecated */
1942
- readonly extend_leaf: {
1943
- readonly name: "extend_leaf";
1944
- readonly requestType: MessageFns<ExtendLeafRequest>;
1945
- readonly requestStream: false;
1946
- readonly responseType: MessageFns<ExtendLeafResponse>;
1947
- readonly responseStream: false;
1948
- readonly options: {};
1949
- };
1950
1823
  /**
1951
1824
  * Resets the timelocks for a leaf's transactions. Can be used to reset the
1952
1825
  * refund transaction timelock for a leaf (when the node transaction
@@ -1978,24 +1851,6 @@ declare const SparkServiceDefinition: {
1978
1851
  readonly responseStream: false;
1979
1852
  readonly options: {};
1980
1853
  };
1981
- /** @deprecated */
1982
- readonly query_nodes_distribution: {
1983
- readonly name: "query_nodes_distribution";
1984
- readonly requestType: MessageFns<QueryNodesDistributionRequest>;
1985
- readonly requestStream: false;
1986
- readonly responseType: MessageFns<QueryNodesDistributionResponse>;
1987
- readonly responseStream: false;
1988
- readonly options: {};
1989
- };
1990
- /** @deprecated */
1991
- readonly query_nodes_by_value: {
1992
- readonly name: "query_nodes_by_value";
1993
- readonly requestType: MessageFns<QueryNodesByValueRequest>;
1994
- readonly requestStream: false;
1995
- readonly responseType: MessageFns<QueryNodesByValueResponse>;
1996
- readonly responseStream: false;
1997
- readonly options: {};
1998
- };
1999
1854
  readonly query_balance: {
2000
1855
  readonly name: "query_balance";
2001
1856
  readonly requestType: MessageFns<QueryBalanceRequest>;
@@ -2050,22 +1905,6 @@ declare const SparkServiceDefinition: {
2050
1905
  readonly responseStream: false;
2051
1906
  readonly options: {};
2052
1907
  };
2053
- /**
2054
- * DEPRECATED: This unified method is being split for better clarity and type safety
2055
- *
2056
- * For swap operations: Use spark_ssp_internal.initiate_static_deposit_utxo_swap()
2057
- * For refund operations: Use initiate_static_deposit_utxo_refund()
2058
- *
2059
- * @deprecated
2060
- */
2061
- readonly initiate_utxo_swap: {
2062
- readonly name: "initiate_utxo_swap";
2063
- readonly requestType: MessageFns<InitiateUtxoSwapRequest>;
2064
- readonly requestStream: false;
2065
- readonly responseType: MessageFns<InitiateUtxoSwapResponse>;
2066
- readonly responseStream: false;
2067
- readonly options: {};
2068
- };
2069
1908
  readonly exit_single_node_trees: {
2070
1909
  readonly name: "exit_single_node_trees";
2071
1910
  readonly requestType: MessageFns<ExitSingleNodeTreesRequest>;
@@ -2086,15 +1925,6 @@ declare const SparkServiceDefinition: {
2086
1925
  readonly responseStream: false;
2087
1926
  readonly options: {};
2088
1927
  };
2089
- /** @deprecated */
2090
- readonly extend_leaf_v2: {
2091
- readonly name: "extend_leaf_v2";
2092
- readonly requestType: MessageFns<ExtendLeafRequest>;
2093
- readonly requestStream: false;
2094
- readonly responseType: MessageFns<ExtendLeafResponse>;
2095
- readonly responseStream: false;
2096
- readonly options: {};
2097
- };
2098
1928
  readonly claim_transfer_sign_refunds_v2: {
2099
1929
  readonly name: "claim_transfer_sign_refunds_v2";
2100
1930
  readonly requestType: MessageFns<ClaimTransferSignRefundsRequest>;
@@ -2135,15 +1965,6 @@ declare const SparkServiceDefinition: {
2135
1965
  readonly responseStream: false;
2136
1966
  readonly options: {};
2137
1967
  };
2138
- /** @deprecated */
2139
- readonly counter_leaf_swap_v2: {
2140
- readonly name: "counter_leaf_swap_v2";
2141
- readonly requestType: MessageFns<CounterLeafSwapRequest>;
2142
- readonly requestStream: false;
2143
- readonly responseType: MessageFns<CounterLeafSwapResponse>;
2144
- readonly responseStream: false;
2145
- readonly options: {};
2146
- };
2147
1968
  readonly start_transfer_v2: {
2148
1969
  readonly name: "start_transfer_v2";
2149
1970
  readonly requestType: MessageFns<StartTransferRequest>;
@@ -2152,15 +1973,6 @@ declare const SparkServiceDefinition: {
2152
1973
  readonly responseStream: false;
2153
1974
  readonly options: {};
2154
1975
  };
2155
- /** @deprecated */
2156
- readonly refresh_timelock_v2: {
2157
- readonly name: "refresh_timelock_v2";
2158
- readonly requestType: MessageFns<RefreshTimelockRequest>;
2159
- readonly requestStream: false;
2160
- readonly responseType: MessageFns<RefreshTimelockResponse>;
2161
- readonly responseStream: false;
2162
- readonly options: {};
2163
- };
2164
1976
  readonly get_utxos_for_address: {
2165
1977
  readonly name: "get_utxos_for_address";
2166
1978
  readonly requestType: MessageFns<GetUtxosForAddressRequest>;
@@ -2213,64 +2025,18 @@ interface SparkServiceImplementation<CallContextExt = {}> {
2213
2025
  /** Generates a new static deposit address of the user or returns the existing one for the specified network. */
2214
2026
  generate_static_deposit_address(request: GenerateStaticDepositAddressRequest, context: CallContext & CallContextExt): Promise<DeepPartial<GenerateStaticDepositAddressResponse>>;
2215
2027
  start_deposit_tree_creation(request: StartDepositTreeCreationRequest, context: CallContext & CallContextExt): Promise<DeepPartial<StartDepositTreeCreationResponse>>;
2216
- /**
2217
- * This is deprecated, please use start_deposit_tree_creation instead.
2218
- *
2219
- * @deprecated
2220
- */
2221
- start_tree_creation(request: StartTreeCreationRequest, context: CallContext & CallContextExt): Promise<DeepPartial<StartTreeCreationResponse>>;
2222
- /** @deprecated */
2223
- finalize_node_signatures(request: FinalizeNodeSignaturesRequest, context: CallContext & CallContextExt): Promise<DeepPartial<FinalizeNodeSignaturesResponse>>;
2224
- /** @deprecated */
2225
- start_transfer(request: StartTransferRequest, context: CallContext & CallContextExt): Promise<DeepPartial<StartTransferResponse>>;
2226
- /**
2227
- * This is deprecated, please use finalize_transfer_with_transfer_package instead.
2228
- *
2229
- * @deprecated
2230
- */
2231
- finalize_transfer(request: FinalizeTransferRequest, context: CallContext & CallContextExt): Promise<DeepPartial<FinalizeTransferResponse>>;
2232
2028
  finalize_transfer_with_transfer_package(request: FinalizeTransferWithTransferPackageRequest, context: CallContext & CallContextExt): Promise<DeepPartial<FinalizeTransferResponse>>;
2233
- /** @deprecated */
2234
- cancel_transfer(request: CancelTransferRequest, context: CallContext & CallContextExt): Promise<DeepPartial<CancelTransferResponse>>;
2235
2029
  query_pending_transfers(request: TransferFilter, context: CallContext & CallContextExt): Promise<DeepPartial<QueryTransfersResponse>>;
2236
2030
  query_all_transfers(request: TransferFilter, context: CallContext & CallContextExt): Promise<DeepPartial<QueryTransfersResponse>>;
2237
2031
  claim_transfer_tweak_keys(request: ClaimTransferTweakKeysRequest, context: CallContext & CallContextExt): Promise<DeepPartial<Empty>>;
2238
- /** @deprecated */
2239
- claim_transfer_sign_refunds(request: ClaimTransferSignRefundsRequest, context: CallContext & CallContextExt): Promise<DeepPartial<ClaimTransferSignRefundsResponse>>;
2240
2032
  store_preimage_share(request: StorePreimageShareRequest, context: CallContext & CallContextExt): Promise<DeepPartial<Empty>>;
2241
2033
  /**
2242
2034
  * Gets a specified number of signing commmitments for a set of nodes, which can be used as
2243
2035
  * part of a transfer package.
2244
2036
  */
2245
2037
  get_signing_commitments(request: GetSigningCommitmentsRequest, context: CallContext & CallContextExt): Promise<DeepPartial<GetSigningCommitmentsResponse>>;
2246
- /** @deprecated */
2247
- cooperative_exit(request: CooperativeExitRequest, context: CallContext & CallContextExt): Promise<DeepPartial<CooperativeExitResponse>>;
2248
- /** @deprecated */
2249
- initiate_preimage_swap(request: InitiatePreimageSwapRequest, context: CallContext & CallContextExt): Promise<DeepPartial<InitiatePreimageSwapResponse>>;
2250
2038
  provide_preimage(request: ProvidePreimageRequest, context: CallContext & CallContextExt): Promise<DeepPartial<ProvidePreimageResponse>>;
2251
2039
  query_htlc(request: QueryHtlcRequest, context: CallContext & CallContextExt): Promise<DeepPartial<QueryHtlcResponse>>;
2252
- /**
2253
- * This is the exact same as start_transfer, but expresses to the SO
2254
- * this transfer is specifically for a leaf swap.
2255
- */
2256
- start_leaf_swap(request: StartTransferRequest, context: CallContext & CallContextExt): Promise<DeepPartial<StartTransferResponse>>;
2257
- /**
2258
- * This is deprecated, please use counter_leaf_swap instead.
2259
- *
2260
- * @deprecated
2261
- */
2262
- leaf_swap(request: CounterLeafSwapRequest, context: CallContext & CallContextExt): Promise<DeepPartial<CounterLeafSwapResponse>>;
2263
- /**
2264
- * This is the exact same as start_leaf_swap, but signs with
2265
- * an adaptor public key after a counterparty has begun the swap via start_leaf_swap.
2266
- *
2267
- * @deprecated
2268
- */
2269
- counter_leaf_swap(request: CounterLeafSwapRequest, context: CallContext & CallContextExt): Promise<DeepPartial<CounterLeafSwapResponse>>;
2270
- /** @deprecated */
2271
- refresh_timelock(request: RefreshTimelockRequest, context: CallContext & CallContextExt): Promise<DeepPartial<RefreshTimelockResponse>>;
2272
- /** @deprecated */
2273
- extend_leaf(request: ExtendLeafRequest, context: CallContext & CallContextExt): Promise<DeepPartial<ExtendLeafResponse>>;
2274
2040
  /**
2275
2041
  * Resets the timelocks for a leaf's transactions. Can be used to reset the
2276
2042
  * refund transaction timelock for a leaf (when the node transaction
@@ -2281,10 +2047,6 @@ interface SparkServiceImplementation<CallContextExt = {}> {
2281
2047
  renew_leaf(request: RenewLeafRequest, context: CallContext & CallContextExt): Promise<DeepPartial<RenewLeafResponse>>;
2282
2048
  get_signing_operator_list(request: Empty, context: CallContext & CallContextExt): Promise<DeepPartial<GetSigningOperatorListResponse>>;
2283
2049
  query_nodes(request: QueryNodesRequest, context: CallContext & CallContextExt): Promise<DeepPartial<QueryNodesResponse>>;
2284
- /** @deprecated */
2285
- query_nodes_distribution(request: QueryNodesDistributionRequest, context: CallContext & CallContextExt): Promise<DeepPartial<QueryNodesDistributionResponse>>;
2286
- /** @deprecated */
2287
- query_nodes_by_value(request: QueryNodesByValueRequest, context: CallContext & CallContextExt): Promise<DeepPartial<QueryNodesByValueResponse>>;
2288
2050
  query_balance(request: QueryBalanceRequest, context: CallContext & CallContextExt): Promise<DeepPartial<QueryBalanceResponse>>;
2289
2051
  query_user_signed_refunds(request: QueryUserSignedRefundsRequest, context: CallContext & CallContextExt): Promise<DeepPartial<QueryUserSignedRefundsResponse>>;
2290
2052
  query_unused_deposit_addresses(request: QueryUnusedDepositAddressesRequest, context: CallContext & CallContextExt): Promise<DeepPartial<QueryUnusedDepositAddressesResponse>>;
@@ -2297,33 +2059,18 @@ interface SparkServiceImplementation<CallContextExt = {}> {
2297
2059
  * the funds. Returns an error if the UTXO has already been claimed.
2298
2060
  */
2299
2061
  initiate_static_deposit_utxo_refund(request: InitiateStaticDepositUtxoRefundRequest, context: CallContext & CallContextExt): Promise<DeepPartial<InitiateStaticDepositUtxoRefundResponse>>;
2300
- /**
2301
- * DEPRECATED: This unified method is being split for better clarity and type safety
2302
- *
2303
- * For swap operations: Use spark_ssp_internal.initiate_static_deposit_utxo_swap()
2304
- * For refund operations: Use initiate_static_deposit_utxo_refund()
2305
- *
2306
- * @deprecated
2307
- */
2308
- initiate_utxo_swap(request: InitiateUtxoSwapRequest, context: CallContext & CallContextExt): Promise<DeepPartial<InitiateUtxoSwapResponse>>;
2309
2062
  exit_single_node_trees(request: ExitSingleNodeTreesRequest, context: CallContext & CallContextExt): Promise<DeepPartial<ExitSingleNodeTreesResponse>>;
2310
2063
  /**
2311
2064
  * The following endpoints enforce inclusion of Direct Transactions used
2312
2065
  * for unilateral exits
2313
2066
  */
2314
2067
  cooperative_exit_v2(request: CooperativeExitRequest, context: CallContext & CallContextExt): Promise<DeepPartial<CooperativeExitResponse>>;
2315
- /** @deprecated */
2316
- extend_leaf_v2(request: ExtendLeafRequest, context: CallContext & CallContextExt): Promise<DeepPartial<ExtendLeafResponse>>;
2317
2068
  claim_transfer_sign_refunds_v2(request: ClaimTransferSignRefundsRequest, context: CallContext & CallContextExt): Promise<DeepPartial<ClaimTransferSignRefundsResponse>>;
2318
2069
  finalize_node_signatures_v2(request: FinalizeNodeSignaturesRequest, context: CallContext & CallContextExt): Promise<DeepPartial<FinalizeNodeSignaturesResponse>>;
2319
2070
  initiate_preimage_swap_v2(request: InitiatePreimageSwapRequest, context: CallContext & CallContextExt): Promise<DeepPartial<InitiatePreimageSwapResponse>>;
2320
2071
  initiate_preimage_swap_v3(request: InitiatePreimageSwapRequest, context: CallContext & CallContextExt): Promise<DeepPartial<InitiatePreimageSwapResponse>>;
2321
2072
  start_leaf_swap_v2(request: StartTransferRequest, context: CallContext & CallContextExt): Promise<DeepPartial<StartTransferResponse>>;
2322
- /** @deprecated */
2323
- counter_leaf_swap_v2(request: CounterLeafSwapRequest, context: CallContext & CallContextExt): Promise<DeepPartial<CounterLeafSwapResponse>>;
2324
2073
  start_transfer_v2(request: StartTransferRequest, context: CallContext & CallContextExt): Promise<DeepPartial<StartTransferResponse>>;
2325
- /** @deprecated */
2326
- refresh_timelock_v2(request: RefreshTimelockRequest, context: CallContext & CallContextExt): Promise<DeepPartial<RefreshTimelockResponse>>;
2327
2074
  get_utxos_for_address(request: GetUtxosForAddressRequest, context: CallContext & CallContextExt): Promise<DeepPartial<GetUtxosForAddressResponse>>;
2328
2075
  query_spark_invoices(request: QuerySparkInvoicesRequest, context: CallContext & CallContextExt): Promise<DeepPartial<QuerySparkInvoicesResponse>>;
2329
2076
  /**
@@ -2340,64 +2087,18 @@ interface SparkServiceClient<CallOptionsExt = {}> {
2340
2087
  /** Generates a new static deposit address of the user or returns the existing one for the specified network. */
2341
2088
  generate_static_deposit_address(request: DeepPartial<GenerateStaticDepositAddressRequest>, options?: CallOptions & CallOptionsExt): Promise<GenerateStaticDepositAddressResponse>;
2342
2089
  start_deposit_tree_creation(request: DeepPartial<StartDepositTreeCreationRequest>, options?: CallOptions & CallOptionsExt): Promise<StartDepositTreeCreationResponse>;
2343
- /**
2344
- * This is deprecated, please use start_deposit_tree_creation instead.
2345
- *
2346
- * @deprecated
2347
- */
2348
- start_tree_creation(request: DeepPartial<StartTreeCreationRequest>, options?: CallOptions & CallOptionsExt): Promise<StartTreeCreationResponse>;
2349
- /** @deprecated */
2350
- finalize_node_signatures(request: DeepPartial<FinalizeNodeSignaturesRequest>, options?: CallOptions & CallOptionsExt): Promise<FinalizeNodeSignaturesResponse>;
2351
- /** @deprecated */
2352
- start_transfer(request: DeepPartial<StartTransferRequest>, options?: CallOptions & CallOptionsExt): Promise<StartTransferResponse>;
2353
- /**
2354
- * This is deprecated, please use finalize_transfer_with_transfer_package instead.
2355
- *
2356
- * @deprecated
2357
- */
2358
- finalize_transfer(request: DeepPartial<FinalizeTransferRequest>, options?: CallOptions & CallOptionsExt): Promise<FinalizeTransferResponse>;
2359
2090
  finalize_transfer_with_transfer_package(request: DeepPartial<FinalizeTransferWithTransferPackageRequest>, options?: CallOptions & CallOptionsExt): Promise<FinalizeTransferResponse>;
2360
- /** @deprecated */
2361
- cancel_transfer(request: DeepPartial<CancelTransferRequest>, options?: CallOptions & CallOptionsExt): Promise<CancelTransferResponse>;
2362
2091
  query_pending_transfers(request: DeepPartial<TransferFilter>, options?: CallOptions & CallOptionsExt): Promise<QueryTransfersResponse>;
2363
2092
  query_all_transfers(request: DeepPartial<TransferFilter>, options?: CallOptions & CallOptionsExt): Promise<QueryTransfersResponse>;
2364
2093
  claim_transfer_tweak_keys(request: DeepPartial<ClaimTransferTweakKeysRequest>, options?: CallOptions & CallOptionsExt): Promise<Empty>;
2365
- /** @deprecated */
2366
- claim_transfer_sign_refunds(request: DeepPartial<ClaimTransferSignRefundsRequest>, options?: CallOptions & CallOptionsExt): Promise<ClaimTransferSignRefundsResponse>;
2367
2094
  store_preimage_share(request: DeepPartial<StorePreimageShareRequest>, options?: CallOptions & CallOptionsExt): Promise<Empty>;
2368
2095
  /**
2369
2096
  * Gets a specified number of signing commmitments for a set of nodes, which can be used as
2370
2097
  * part of a transfer package.
2371
2098
  */
2372
2099
  get_signing_commitments(request: DeepPartial<GetSigningCommitmentsRequest>, options?: CallOptions & CallOptionsExt): Promise<GetSigningCommitmentsResponse>;
2373
- /** @deprecated */
2374
- cooperative_exit(request: DeepPartial<CooperativeExitRequest>, options?: CallOptions & CallOptionsExt): Promise<CooperativeExitResponse>;
2375
- /** @deprecated */
2376
- initiate_preimage_swap(request: DeepPartial<InitiatePreimageSwapRequest>, options?: CallOptions & CallOptionsExt): Promise<InitiatePreimageSwapResponse>;
2377
2100
  provide_preimage(request: DeepPartial<ProvidePreimageRequest>, options?: CallOptions & CallOptionsExt): Promise<ProvidePreimageResponse>;
2378
2101
  query_htlc(request: DeepPartial<QueryHtlcRequest>, options?: CallOptions & CallOptionsExt): Promise<QueryHtlcResponse>;
2379
- /**
2380
- * This is the exact same as start_transfer, but expresses to the SO
2381
- * this transfer is specifically for a leaf swap.
2382
- */
2383
- start_leaf_swap(request: DeepPartial<StartTransferRequest>, options?: CallOptions & CallOptionsExt): Promise<StartTransferResponse>;
2384
- /**
2385
- * This is deprecated, please use counter_leaf_swap instead.
2386
- *
2387
- * @deprecated
2388
- */
2389
- leaf_swap(request: DeepPartial<CounterLeafSwapRequest>, options?: CallOptions & CallOptionsExt): Promise<CounterLeafSwapResponse>;
2390
- /**
2391
- * This is the exact same as start_leaf_swap, but signs with
2392
- * an adaptor public key after a counterparty has begun the swap via start_leaf_swap.
2393
- *
2394
- * @deprecated
2395
- */
2396
- counter_leaf_swap(request: DeepPartial<CounterLeafSwapRequest>, options?: CallOptions & CallOptionsExt): Promise<CounterLeafSwapResponse>;
2397
- /** @deprecated */
2398
- refresh_timelock(request: DeepPartial<RefreshTimelockRequest>, options?: CallOptions & CallOptionsExt): Promise<RefreshTimelockResponse>;
2399
- /** @deprecated */
2400
- extend_leaf(request: DeepPartial<ExtendLeafRequest>, options?: CallOptions & CallOptionsExt): Promise<ExtendLeafResponse>;
2401
2102
  /**
2402
2103
  * Resets the timelocks for a leaf's transactions. Can be used to reset the
2403
2104
  * refund transaction timelock for a leaf (when the node transaction
@@ -2408,10 +2109,6 @@ interface SparkServiceClient<CallOptionsExt = {}> {
2408
2109
  renew_leaf(request: DeepPartial<RenewLeafRequest>, options?: CallOptions & CallOptionsExt): Promise<RenewLeafResponse>;
2409
2110
  get_signing_operator_list(request: DeepPartial<Empty>, options?: CallOptions & CallOptionsExt): Promise<GetSigningOperatorListResponse>;
2410
2111
  query_nodes(request: DeepPartial<QueryNodesRequest>, options?: CallOptions & CallOptionsExt): Promise<QueryNodesResponse>;
2411
- /** @deprecated */
2412
- query_nodes_distribution(request: DeepPartial<QueryNodesDistributionRequest>, options?: CallOptions & CallOptionsExt): Promise<QueryNodesDistributionResponse>;
2413
- /** @deprecated */
2414
- query_nodes_by_value(request: DeepPartial<QueryNodesByValueRequest>, options?: CallOptions & CallOptionsExt): Promise<QueryNodesByValueResponse>;
2415
2112
  query_balance(request: DeepPartial<QueryBalanceRequest>, options?: CallOptions & CallOptionsExt): Promise<QueryBalanceResponse>;
2416
2113
  query_user_signed_refunds(request: DeepPartial<QueryUserSignedRefundsRequest>, options?: CallOptions & CallOptionsExt): Promise<QueryUserSignedRefundsResponse>;
2417
2114
  query_unused_deposit_addresses(request: DeepPartial<QueryUnusedDepositAddressesRequest>, options?: CallOptions & CallOptionsExt): Promise<QueryUnusedDepositAddressesResponse>;
@@ -2424,33 +2121,18 @@ interface SparkServiceClient<CallOptionsExt = {}> {
2424
2121
  * the funds. Returns an error if the UTXO has already been claimed.
2425
2122
  */
2426
2123
  initiate_static_deposit_utxo_refund(request: DeepPartial<InitiateStaticDepositUtxoRefundRequest>, options?: CallOptions & CallOptionsExt): Promise<InitiateStaticDepositUtxoRefundResponse>;
2427
- /**
2428
- * DEPRECATED: This unified method is being split for better clarity and type safety
2429
- *
2430
- * For swap operations: Use spark_ssp_internal.initiate_static_deposit_utxo_swap()
2431
- * For refund operations: Use initiate_static_deposit_utxo_refund()
2432
- *
2433
- * @deprecated
2434
- */
2435
- initiate_utxo_swap(request: DeepPartial<InitiateUtxoSwapRequest>, options?: CallOptions & CallOptionsExt): Promise<InitiateUtxoSwapResponse>;
2436
2124
  exit_single_node_trees(request: DeepPartial<ExitSingleNodeTreesRequest>, options?: CallOptions & CallOptionsExt): Promise<ExitSingleNodeTreesResponse>;
2437
2125
  /**
2438
2126
  * The following endpoints enforce inclusion of Direct Transactions used
2439
2127
  * for unilateral exits
2440
2128
  */
2441
2129
  cooperative_exit_v2(request: DeepPartial<CooperativeExitRequest>, options?: CallOptions & CallOptionsExt): Promise<CooperativeExitResponse>;
2442
- /** @deprecated */
2443
- extend_leaf_v2(request: DeepPartial<ExtendLeafRequest>, options?: CallOptions & CallOptionsExt): Promise<ExtendLeafResponse>;
2444
2130
  claim_transfer_sign_refunds_v2(request: DeepPartial<ClaimTransferSignRefundsRequest>, options?: CallOptions & CallOptionsExt): Promise<ClaimTransferSignRefundsResponse>;
2445
2131
  finalize_node_signatures_v2(request: DeepPartial<FinalizeNodeSignaturesRequest>, options?: CallOptions & CallOptionsExt): Promise<FinalizeNodeSignaturesResponse>;
2446
2132
  initiate_preimage_swap_v2(request: DeepPartial<InitiatePreimageSwapRequest>, options?: CallOptions & CallOptionsExt): Promise<InitiatePreimageSwapResponse>;
2447
2133
  initiate_preimage_swap_v3(request: DeepPartial<InitiatePreimageSwapRequest>, options?: CallOptions & CallOptionsExt): Promise<InitiatePreimageSwapResponse>;
2448
2134
  start_leaf_swap_v2(request: DeepPartial<StartTransferRequest>, options?: CallOptions & CallOptionsExt): Promise<StartTransferResponse>;
2449
- /** @deprecated */
2450
- counter_leaf_swap_v2(request: DeepPartial<CounterLeafSwapRequest>, options?: CallOptions & CallOptionsExt): Promise<CounterLeafSwapResponse>;
2451
2135
  start_transfer_v2(request: DeepPartial<StartTransferRequest>, options?: CallOptions & CallOptionsExt): Promise<StartTransferResponse>;
2452
- /** @deprecated */
2453
- refresh_timelock_v2(request: DeepPartial<RefreshTimelockRequest>, options?: CallOptions & CallOptionsExt): Promise<RefreshTimelockResponse>;
2454
2136
  get_utxos_for_address(request: DeepPartial<GetUtxosForAddressRequest>, options?: CallOptions & CallOptionsExt): Promise<GetUtxosForAddressResponse>;
2455
2137
  query_spark_invoices(request: DeepPartial<QuerySparkInvoicesRequest>, options?: CallOptions & CallOptionsExt): Promise<QuerySparkInvoicesResponse>;
2456
2138
  /**
@@ -1,8 +1,8 @@
1
1
  import * as _opentelemetry_api from '@opentelemetry/api';
2
2
  import { Tracer } from '@opentelemetry/api';
3
- import { N as Network$1, g as SparkInvoiceFields, d as SparkServiceDefinition, f as SparkServiceClient, h as SubscribeToEventsResponse, b as TreeNode, T as Transfer, i as StartTransferRequest, L as LeafRefundTxSigningResult, j as NodeSignatures, F as FinalizeNodeSignaturesResponse, Q as QueryTransfersResponse, R as RequestedSigningCommitments, U as UserSignedTxSigningJob, G as GenerateDepositAddressResponse, I as InitiatePreimageSwapResponse, k as UserSignedRefund, l as PreimageRequestStatus, m as PreimageRequestRole, n as QueryHtlcResponse, o as QuerySparkInvoicesResponse, E as Empty } from './spark-2Fxnvl8K.js';
3
+ import { N as Network$1, g as SparkInvoiceFields, d as SparkServiceDefinition, f as SparkServiceClient, h as SubscribeToEventsResponse, b as TreeNode, T as Transfer, i as StartTransferRequest, L as LeafRefundTxSigningResult, j as NodeSignatures, F as FinalizeNodeSignaturesResponse, Q as QueryTransfersResponse, R as RequestedSigningCommitments, U as UserSignedTxSigningJob, G as GenerateDepositAddressResponse, I as InitiatePreimageSwapResponse, k as UserSignedRefund, l as PreimageRequestStatus, m as PreimageRequestRole, n as QueryHtlcResponse, o as QuerySparkInvoicesResponse, E as Empty } from './spark-d6w3BLGZ.js';
4
4
  import { SparkTokenServiceDefinition, SparkTokenServiceClient, OutputWithPreviousTransactionData, TokenTransaction, PartialTokenTransaction, QueryTokenTransactionsResponse, TokenMetadata } from './proto/spark_token.js';
5
- import { B as BitcoinNetwork, aC as MayHaveSspClientOptions, aD as SspClientOptions, aE as HasSspClientOptions, a7 as SparkSigner, ah as KeyDerivation, af as SigningCommitmentWithOptionalNonce, aq as VerifiableSecretShare, t as LightningReceiveRequest, aF as SspClient, p as LeavesSwapFeeEstimateOutput, Q as StaticDepositQuoteOutput, a as ClaimStaticDepositOutput, $ as WalletLeaf, a3 as WalletTransfer, y as LightningSendRequest, v as LightningSendFeeEstimateInput, l as CoopExitRequest, j as CoopExitFeeQuote, aG as TransferWithUserRequest, aH as GetUserRequestsParams, N as SparkWalletUserToUserRequestsConnection, Z as WalletSettings, E as ExitSpeed } from './client-D1dLzWu0.js';
5
+ import { B as BitcoinNetwork, aC as MayHaveSspClientOptions, aD as SspClientOptions, aE as HasSspClientOptions, a7 as SparkSigner, ah as KeyDerivation, af as SigningCommitmentWithOptionalNonce, aq as VerifiableSecretShare, t as LightningReceiveRequest, aF as SspClient, p as LeavesSwapFeeEstimateOutput, Q as StaticDepositQuoteOutput, a as ClaimStaticDepositOutput, $ as WalletLeaf, a3 as WalletTransfer, y as LightningSendRequest, v as LightningSendFeeEstimateInput, l as CoopExitRequest, j as CoopExitFeeQuote, aG as TransferWithUserRequest, aH as GetUserRequestsParams, N as SparkWalletUserToUserRequestsConnection, Z as WalletSettings, E as ExitSpeed } from './client-eyjf4knu.js';
6
6
  import * as btc from '@scure/btc-signer';
7
7
  import { Transaction } from '@scure/btc-signer';
8
8
  import * as _scure_base from '@scure/base';
@@ -317,6 +317,7 @@ declare abstract class ConnectionManager {
317
317
  private identityPublicKeyHex?;
318
318
  constructor(config: WalletConfigService);
319
319
  getCurrentServerTime(): Date;
320
+ isTimeSynced(): boolean;
320
321
  protected getMonotonicTime(): number;
321
322
  createClients(): Promise<void>;
322
323
  closeConnections(): Promise<void>;
@@ -338,8 +339,6 @@ declare abstract class ConnectionManager {
338
339
  protected authenticate(address: string): Promise<string>;
339
340
  private createSparkAuthnGrpcConnection;
340
341
  protected prepareMetadata(metadata: Metadata): Metadata;
341
- protected recordTimeSync(dateHeader: string, serverProcessingTimeMs: number, sendTime: number, receiveTime: number): void;
342
- private processResponseForTimeSync;
343
342
  protected createAuthnMiddleware(): <Req, Res>(call: ClientMiddlewareCall<Req, Res>, options: SparkCallOptions) => AsyncGenerator<Res, Res | void, undefined>;
344
343
  protected createMiddleware(address: Address): <Req, Res>(call: ClientMiddlewareCall<Req, Res>, options: SparkCallOptions) => AsyncGenerator<Res, Res | void, undefined>;
345
344
  protected handleMiddlewareError<Req, Res>(error: unknown, address: string, call: ClientMiddlewareCall<Req, Res>, metadata: Metadata, options: SparkCallOptions): AsyncGenerator<Awaited<Res>, void | Awaited<Res>, undefined>;
@@ -421,10 +420,10 @@ declare class TransferService extends BaseTransferService {
421
420
  signingResults: LeafRefundTxSigningResult[];
422
421
  }>;
423
422
  private prepareRefundSoSigningJobs;
424
- claimTransferTweakKeys(transfer: Transfer, leaves: LeafKeyTweak[]): Promise<Map<string, Uint8Array[]>>;
423
+ claimTransferTweakKeys(transfer: Transfer, leaves: LeafKeyTweak[]): Promise<void>;
425
424
  private prepareClaimLeavesKeyTweaks;
426
425
  private prepareClaimLeafKeyTweaks;
427
- claimTransferSignRefunds(transfer: Transfer, leafKeys: LeafKeyTweak[], proofMap?: Map<string, Uint8Array[]>): Promise<NodeSignatures[]>;
426
+ claimTransferSignRefunds(transfer: Transfer, leafKeys: LeafKeyTweak[]): Promise<NodeSignatures[]>;
428
427
  private finalizeNodeSignatures;
429
428
  queryPendingTransfersBySender(operatorAddress: string): Promise<QueryTransfersResponse>;
430
429
  renewRefundTxn(node: TreeNode, parentNode: TreeNode): Promise<TreeNode>;
@@ -1191,7 +1190,7 @@ declare abstract class SparkWallet extends EventEmitter<SparkWalletEvents> {
1191
1190
  * @param tokenIdentifiers - Optional array of token identifiers to filter by
1192
1191
  * @param outputIds - Optional array of output IDs to filter by
1193
1192
  * @param order - Optional order for results ("ASCENDING" or "DESCENDING", defaults to "DESCENDING")
1194
- * @param pageSize - Optional page size (defaults to 100)
1193
+ * @param pageSize - Optional page size (defaults to 50)
1195
1194
  * @param offset - Optional offset for pagination (defaults to 0)
1196
1195
  * @returns Promise resolving to array of token transactions with their current status
1197
1196
  */
@@ -1,8 +1,8 @@
1
1
  import * as _opentelemetry_api from '@opentelemetry/api';
2
2
  import { Tracer } from '@opentelemetry/api';
3
- import { N as Network$1, g as SparkInvoiceFields, d as SparkServiceDefinition, f as SparkServiceClient, h as SubscribeToEventsResponse, b as TreeNode, T as Transfer, i as StartTransferRequest, L as LeafRefundTxSigningResult, j as NodeSignatures, F as FinalizeNodeSignaturesResponse, Q as QueryTransfersResponse, R as RequestedSigningCommitments, U as UserSignedTxSigningJob, G as GenerateDepositAddressResponse, I as InitiatePreimageSwapResponse, k as UserSignedRefund, l as PreimageRequestStatus, m as PreimageRequestRole, n as QueryHtlcResponse, o as QuerySparkInvoicesResponse, E as Empty } from './spark-2Fxnvl8K.cjs';
3
+ import { N as Network$1, g as SparkInvoiceFields, d as SparkServiceDefinition, f as SparkServiceClient, h as SubscribeToEventsResponse, b as TreeNode, T as Transfer, i as StartTransferRequest, L as LeafRefundTxSigningResult, j as NodeSignatures, F as FinalizeNodeSignaturesResponse, Q as QueryTransfersResponse, R as RequestedSigningCommitments, U as UserSignedTxSigningJob, G as GenerateDepositAddressResponse, I as InitiatePreimageSwapResponse, k as UserSignedRefund, l as PreimageRequestStatus, m as PreimageRequestRole, n as QueryHtlcResponse, o as QuerySparkInvoicesResponse, E as Empty } from './spark-d6w3BLGZ.cjs';
4
4
  import { SparkTokenServiceDefinition, SparkTokenServiceClient, OutputWithPreviousTransactionData, TokenTransaction, PartialTokenTransaction, QueryTokenTransactionsResponse, TokenMetadata } from './proto/spark_token.cjs';
5
- import { B as BitcoinNetwork, aC as MayHaveSspClientOptions, aD as SspClientOptions, aE as HasSspClientOptions, a7 as SparkSigner, ah as KeyDerivation, af as SigningCommitmentWithOptionalNonce, aq as VerifiableSecretShare, t as LightningReceiveRequest, aF as SspClient, p as LeavesSwapFeeEstimateOutput, Q as StaticDepositQuoteOutput, a as ClaimStaticDepositOutput, $ as WalletLeaf, a3 as WalletTransfer, y as LightningSendRequest, v as LightningSendFeeEstimateInput, l as CoopExitRequest, j as CoopExitFeeQuote, aG as TransferWithUserRequest, aH as GetUserRequestsParams, N as SparkWalletUserToUserRequestsConnection, Z as WalletSettings, E as ExitSpeed } from './client-CVn0R_eM.cjs';
5
+ import { B as BitcoinNetwork, aC as MayHaveSspClientOptions, aD as SspClientOptions, aE as HasSspClientOptions, a7 as SparkSigner, ah as KeyDerivation, af as SigningCommitmentWithOptionalNonce, aq as VerifiableSecretShare, t as LightningReceiveRequest, aF as SspClient, p as LeavesSwapFeeEstimateOutput, Q as StaticDepositQuoteOutput, a as ClaimStaticDepositOutput, $ as WalletLeaf, a3 as WalletTransfer, y as LightningSendRequest, v as LightningSendFeeEstimateInput, l as CoopExitRequest, j as CoopExitFeeQuote, aG as TransferWithUserRequest, aH as GetUserRequestsParams, N as SparkWalletUserToUserRequestsConnection, Z as WalletSettings, E as ExitSpeed } from './client-C9kc4cog.cjs';
6
6
  import * as btc from '@scure/btc-signer';
7
7
  import { Transaction } from '@scure/btc-signer';
8
8
  import * as _scure_base from '@scure/base';
@@ -317,6 +317,7 @@ declare abstract class ConnectionManager {
317
317
  private identityPublicKeyHex?;
318
318
  constructor(config: WalletConfigService);
319
319
  getCurrentServerTime(): Date;
320
+ isTimeSynced(): boolean;
320
321
  protected getMonotonicTime(): number;
321
322
  createClients(): Promise<void>;
322
323
  closeConnections(): Promise<void>;
@@ -338,8 +339,6 @@ declare abstract class ConnectionManager {
338
339
  protected authenticate(address: string): Promise<string>;
339
340
  private createSparkAuthnGrpcConnection;
340
341
  protected prepareMetadata(metadata: Metadata): Metadata;
341
- protected recordTimeSync(dateHeader: string, serverProcessingTimeMs: number, sendTime: number, receiveTime: number): void;
342
- private processResponseForTimeSync;
343
342
  protected createAuthnMiddleware(): <Req, Res>(call: ClientMiddlewareCall<Req, Res>, options: SparkCallOptions) => AsyncGenerator<Res, Res | void, undefined>;
344
343
  protected createMiddleware(address: Address): <Req, Res>(call: ClientMiddlewareCall<Req, Res>, options: SparkCallOptions) => AsyncGenerator<Res, Res | void, undefined>;
345
344
  protected handleMiddlewareError<Req, Res>(error: unknown, address: string, call: ClientMiddlewareCall<Req, Res>, metadata: Metadata, options: SparkCallOptions): AsyncGenerator<Awaited<Res>, void | Awaited<Res>, undefined>;
@@ -421,10 +420,10 @@ declare class TransferService extends BaseTransferService {
421
420
  signingResults: LeafRefundTxSigningResult[];
422
421
  }>;
423
422
  private prepareRefundSoSigningJobs;
424
- claimTransferTweakKeys(transfer: Transfer, leaves: LeafKeyTweak[]): Promise<Map<string, Uint8Array[]>>;
423
+ claimTransferTweakKeys(transfer: Transfer, leaves: LeafKeyTweak[]): Promise<void>;
425
424
  private prepareClaimLeavesKeyTweaks;
426
425
  private prepareClaimLeafKeyTweaks;
427
- claimTransferSignRefunds(transfer: Transfer, leafKeys: LeafKeyTweak[], proofMap?: Map<string, Uint8Array[]>): Promise<NodeSignatures[]>;
426
+ claimTransferSignRefunds(transfer: Transfer, leafKeys: LeafKeyTweak[]): Promise<NodeSignatures[]>;
428
427
  private finalizeNodeSignatures;
429
428
  queryPendingTransfersBySender(operatorAddress: string): Promise<QueryTransfersResponse>;
430
429
  renewRefundTxn(node: TreeNode, parentNode: TreeNode): Promise<TreeNode>;
@@ -1191,7 +1190,7 @@ declare abstract class SparkWallet extends EventEmitter<SparkWalletEvents> {
1191
1190
  * @param tokenIdentifiers - Optional array of token identifiers to filter by
1192
1191
  * @param outputIds - Optional array of output IDs to filter by
1193
1192
  * @param order - Optional order for results ("ASCENDING" or "DESCENDING", defaults to "DESCENDING")
1194
- * @param pageSize - Optional page size (defaults to 100)
1193
+ * @param pageSize - Optional page size (defaults to 50)
1195
1194
  * @param offset - Optional offset for pagination (defaults to 0)
1196
1195
  * @returns Promise resolving to array of token transactions with their current status
1197
1196
  */