@buildonspark/spark-sdk 0.3.2 → 0.3.4

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 (75) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/bare/index.cjs +953 -1567
  3. package/dist/bare/index.d.cts +132 -29
  4. package/dist/bare/index.d.ts +132 -29
  5. package/dist/bare/index.js +948 -1565
  6. package/dist/{chunk-MGCUXELA.js → chunk-IC4IUEOS.js} +931 -125
  7. package/dist/{chunk-MH7BMOLL.js → chunk-J2P3KTQP.js} +1 -1
  8. package/dist/{chunk-JDQKNT7G.js → chunk-KIQTO4FX.js} +403 -1808
  9. package/dist/{chunk-73GJOG5R.js → chunk-XWLR6G5C.js} +1 -1
  10. package/dist/{chunk-4KGN75J4.js → chunk-YH7MDVTT.js} +1 -1
  11. package/dist/{client-DrjQwET9.d.ts → client-DBZ43pJT.d.ts} +1 -1
  12. package/dist/{client-DUFejFfn.d.cts → client-DWml6sjL.d.cts} +1 -1
  13. package/dist/debug.cjs +957 -1569
  14. package/dist/debug.d.cts +8 -5
  15. package/dist/debug.d.ts +8 -5
  16. package/dist/debug.js +4 -4
  17. package/dist/graphql/objects/index.d.cts +3 -3
  18. package/dist/graphql/objects/index.d.ts +3 -3
  19. package/dist/index.cjs +913 -1528
  20. package/dist/index.d.cts +6 -6
  21. package/dist/index.d.ts +6 -6
  22. package/dist/index.js +9 -5
  23. package/dist/index.node.cjs +913 -1528
  24. package/dist/index.node.d.cts +6 -6
  25. package/dist/index.node.d.ts +6 -6
  26. package/dist/index.node.js +8 -4
  27. package/dist/{logging-IsaT3wjW.d.ts → logging-BUpzk4Z6.d.cts} +5 -5
  28. package/dist/{logging-Bt2FNHFR.d.cts → logging-Dt2ooQiP.d.ts} +5 -5
  29. package/dist/native/index.cjs +913 -1528
  30. package/dist/native/index.d.cts +133 -44
  31. package/dist/native/index.d.ts +133 -44
  32. package/dist/native/index.js +912 -1529
  33. package/dist/proto/spark.cjs +931 -125
  34. package/dist/proto/spark.d.cts +1 -1
  35. package/dist/proto/spark.d.ts +1 -1
  36. package/dist/proto/spark.js +17 -1
  37. package/dist/proto/spark_token.d.cts +1 -1
  38. package/dist/proto/spark_token.d.ts +1 -1
  39. package/dist/proto/spark_token.js +2 -2
  40. package/dist/{spark-CLz4-Ln8.d.cts → spark-DasxuVfm.d.cts} +150 -5
  41. package/dist/{spark-CLz4-Ln8.d.ts → spark-DasxuVfm.d.ts} +150 -5
  42. package/dist/{spark-wallet-V03V4Tgm.d.cts → spark-wallet-BoMIOPWW.d.cts} +15 -26
  43. package/dist/{spark-wallet-KI68-_jO.d.ts → spark-wallet-jlC0XN5f.d.ts} +15 -26
  44. package/dist/{spark-wallet.node-Cuvw8Kvq.d.ts → spark-wallet.node-07PksUHH.d.cts} +1 -1
  45. package/dist/{spark-wallet.node-BtkqW5vn.d.cts → spark-wallet.node-CdWkKMSq.d.ts} +1 -1
  46. package/dist/tests/test-utils.cjs +951 -147
  47. package/dist/tests/test-utils.d.cts +4 -4
  48. package/dist/tests/test-utils.d.ts +4 -4
  49. package/dist/tests/test-utils.js +5 -5
  50. package/dist/{token-transactions-5XxBewhV.d.ts → token-transactions-BDzCrQSk.d.cts} +5 -19
  51. package/dist/{token-transactions-fTnCtBpp.d.cts → token-transactions-DscJaJOE.d.ts} +5 -19
  52. package/dist/types/index.cjs +923 -125
  53. package/dist/types/index.d.cts +2 -2
  54. package/dist/types/index.d.ts +2 -2
  55. package/dist/types/index.js +2 -2
  56. package/package.json +1 -1
  57. package/src/proto/spark.ts +1167 -103
  58. package/src/services/config.ts +0 -4
  59. package/src/services/token-transactions.ts +11 -703
  60. package/src/services/transfer.ts +2 -213
  61. package/src/services/wallet-config.ts +0 -2
  62. package/src/spark-wallet/proto-descriptors.ts +1 -1
  63. package/src/spark-wallet/spark-wallet.ts +47 -215
  64. package/src/spark_descriptors.pb +0 -0
  65. package/src/tests/address.test.ts +141 -0
  66. package/src/tests/integration/address.test.ts +4 -0
  67. package/src/tests/integration/lightning.test.ts +14 -9
  68. package/src/tests/integration/token-output.test.ts +0 -1
  69. package/src/tests/integration/transfer.test.ts +108 -2
  70. package/src/tests/token-hashing.test.ts +0 -247
  71. package/src/utils/address.ts +58 -35
  72. package/src/utils/token-hashing.ts +1 -420
  73. package/src/utils/token-transaction-validation.ts +0 -330
  74. package/src/utils/transaction.ts +8 -8
  75. package/src/tests/integration/swap.test.ts +0 -780
@@ -178,7 +178,7 @@ declare enum InvoiceStatus {
178
178
  NOT_FOUND = 0,
179
179
  PENDING = 1,
180
180
  FINALIZED = 2,
181
- EXPIRED = 3,
181
+ RETURNED = 4,
182
182
  UNRECOGNIZED = -1
183
183
  }
184
184
  declare function invoiceStatusFromJSON(object: any): InvoiceStatus;
@@ -407,6 +407,91 @@ interface SigningResult_SignatureSharesEntry {
407
407
  value: Uint8Array;
408
408
  }
409
409
  declare const SigningResult_SignatureSharesEntry: MessageFns<SigningResult_SignatureSharesEntry>;
410
+ interface RenewLeafRequest {
411
+ leafId: string;
412
+ ownerIdentityPublicKey: Uint8Array;
413
+ signingJobs?: //
414
+ /**
415
+ * Resets the node transaction timelock and refund transaction timelock
416
+ * for a leaf to 2000. The old node transaction is invalidated by
417
+ * introducing a "split node" with zero timelock that spends to a new
418
+ * node transaction. Takes in the signing jobs for the updated
419
+ * node, refund, and split node transactions with the new timelocks.
420
+ * Requires that the existing node transaction timelock is <= 300
421
+ * at the time this function is called. Returns an error if these
422
+ * conditions are not met.
423
+ */
424
+ {
425
+ $case: "renewNodeTimelockSigningJob";
426
+ renewNodeTimelockSigningJob: RenewNodeTimelockSigningJob;
427
+ } | //
428
+ /**
429
+ * Resets the refund transaction timelock for a leaf to 2000. Takes in
430
+ * the signing jobs for the updated transactions with the new timelocks.
431
+ * Requires that the existing refund transaction timelock is <= 300 and
432
+ * the node transaction timelock > 300 at the time this function is
433
+ * called. Returns an error if these conditions are not met.
434
+ */
435
+ {
436
+ $case: "renewRefundTimelockSigningJob";
437
+ renewRefundTimelockSigningJob: RenewRefundTimelockSigningJob;
438
+ } | undefined;
439
+ }
440
+ declare const RenewLeafRequest: MessageFns<RenewLeafRequest>;
441
+ interface RenewNodeTimelockSigningJob {
442
+ /**
443
+ * Signing job with the new "split node" transaction. This spends the
444
+ * inputs of the old node transaction and its outputs are spent by the new
445
+ * node transaction. Timelock of split node transaction must be 0.
446
+ */
447
+ splitNodeTxSigningJob: UserSignedTxSigningJob | undefined;
448
+ splitNodeDirectTxSigningJob: UserSignedTxSigningJob | undefined;
449
+ /**
450
+ * Signing job with the updated node transaction. The updated transaction is
451
+ * expected to have a timelock of 2000.
452
+ */
453
+ nodeTxSigningJob: UserSignedTxSigningJob | undefined;
454
+ refundTxSigningJob: UserSignedTxSigningJob | undefined;
455
+ directNodeTxSigningJob: UserSignedTxSigningJob | undefined;
456
+ directRefundTxSigningJob: UserSignedTxSigningJob | undefined;
457
+ directFromCpfpRefundTxSigningJob: UserSignedTxSigningJob | undefined;
458
+ }
459
+ declare const RenewNodeTimelockSigningJob: MessageFns<RenewNodeTimelockSigningJob>;
460
+ interface RenewRefundTimelockSigningJob {
461
+ /**
462
+ * Signing job with the updated node transaction. The updated transaction is
463
+ * expected to have a timelock of 100 less than the existing node transaction.
464
+ */
465
+ nodeTxSigningJob: UserSignedTxSigningJob | undefined;
466
+ /**
467
+ * Signing job with the updated refund transaction. This updated transaction
468
+ * must have a timelock of 2000.
469
+ */
470
+ refundTxSigningJob: UserSignedTxSigningJob | undefined;
471
+ directNodeTxSigningJob: UserSignedTxSigningJob | undefined;
472
+ directRefundTxSigningJob: UserSignedTxSigningJob | undefined;
473
+ directFromCpfpRefundTxSigningJob: UserSignedTxSigningJob | undefined;
474
+ }
475
+ declare const RenewRefundTimelockSigningJob: MessageFns<RenewRefundTimelockSigningJob>;
476
+ interface RenewLeafResponse {
477
+ renewResult?: {
478
+ $case: "extendResult";
479
+ extendResult: RenewNodeTimelockResult;
480
+ } | {
481
+ $case: "refreshResult";
482
+ refreshResult: RenewRefundTimelockResult;
483
+ } | undefined;
484
+ }
485
+ declare const RenewLeafResponse: MessageFns<RenewLeafResponse>;
486
+ interface RenewNodeTimelockResult {
487
+ splitNode: TreeNode | undefined;
488
+ node: TreeNode | undefined;
489
+ }
490
+ declare const RenewNodeTimelockResult: MessageFns<RenewNodeTimelockResult>;
491
+ interface RenewRefundTimelockResult {
492
+ node: TreeNode | undefined;
493
+ }
494
+ declare const RenewRefundTimelockResult: MessageFns<RenewRefundTimelockResult>;
410
495
  /**
411
496
  * NodeSignatureShares is the signature shares for a node on the tree.
412
497
  * For each tree node, the verifying key stays the same for both transactions.
@@ -858,11 +943,17 @@ declare const StartUserSignedTransferRequest: MessageFns<StartUserSignedTransfer
858
943
  interface StartTransferRequest {
859
944
  transferId: string;
860
945
  ownerIdentityPublicKey: Uint8Array;
861
- /** @deprecated */
946
+ /**
947
+ * This field is used for swap and coop exits. Regular transfers must use
948
+ * the transfer_package field.
949
+ */
862
950
  leavesToSend: LeafRefundTxSigningJob[];
863
951
  receiverIdentityPublicKey: Uint8Array;
864
952
  expiryTime: Date | undefined;
865
- /** If this field is set, the leaves_to_send and key_tweak_proofs will be ignored. */
953
+ /**
954
+ * This field is required for transfers of type "transfer". If this field
955
+ * is set, the leaves_to_send and key_tweak_proofs will be ignored.
956
+ */
866
957
  transferPackage: TransferPackage | undefined;
867
958
  /** The invoice this transfer pays. */
868
959
  sparkInvoice: string;
@@ -1557,8 +1648,23 @@ declare const QuerySparkInvoicesResponse: MessageFns<QuerySparkInvoicesResponse>
1557
1648
  interface InvoiceResponse {
1558
1649
  invoice: string;
1559
1650
  status: InvoiceStatus;
1651
+ transferType?: {
1652
+ $case: "satsTransfer";
1653
+ satsTransfer: SatsTransfer;
1654
+ } | {
1655
+ $case: "tokenTransfer";
1656
+ tokenTransfer: TokenTransfer;
1657
+ } | undefined;
1560
1658
  }
1561
1659
  declare const InvoiceResponse: MessageFns<InvoiceResponse>;
1660
+ interface SatsTransfer {
1661
+ transferId: Uint8Array;
1662
+ }
1663
+ declare const SatsTransfer: MessageFns<SatsTransfer>;
1664
+ interface TokenTransfer {
1665
+ finalTokenTransactionHash: Uint8Array;
1666
+ }
1667
+ declare const TokenTransfer: MessageFns<TokenTransfer>;
1562
1668
  type SparkServiceDefinition = typeof SparkServiceDefinition;
1563
1669
  declare const SparkServiceDefinition: {
1564
1670
  readonly name: "SparkService";
@@ -1772,6 +1878,21 @@ declare const SparkServiceDefinition: {
1772
1878
  readonly responseStream: false;
1773
1879
  readonly options: {};
1774
1880
  };
1881
+ /**
1882
+ * Resets the timelocks for a leaf's transactions. Can be used to reset the
1883
+ * refund transaction timelock for a leaf (when the node transaction
1884
+ * timelock is still > 300) or reset the node and refund transaction
1885
+ * timelock. Returns an error if a leaf is not yet eligible to renew the
1886
+ * timelocks, see RenewLeafRequest for more details.
1887
+ */
1888
+ readonly renew_leaf: {
1889
+ readonly name: "renew_leaf";
1890
+ readonly requestType: MessageFns<RenewLeafRequest>;
1891
+ readonly requestStream: false;
1892
+ readonly responseType: MessageFns<RenewLeafResponse>;
1893
+ readonly responseStream: false;
1894
+ readonly options: {};
1895
+ };
1775
1896
  readonly get_signing_operator_list: {
1776
1897
  readonly name: "get_signing_operator_list";
1777
1898
  readonly requestType: MessageFns$2<Empty>;
@@ -2081,6 +2202,14 @@ interface SparkServiceImplementation<CallContextExt = {}> {
2081
2202
  counter_leaf_swap(request: CounterLeafSwapRequest, context: CallContext & CallContextExt): Promise<DeepPartial<CounterLeafSwapResponse>>;
2082
2203
  refresh_timelock(request: RefreshTimelockRequest, context: CallContext & CallContextExt): Promise<DeepPartial<RefreshTimelockResponse>>;
2083
2204
  extend_leaf(request: ExtendLeafRequest, context: CallContext & CallContextExt): Promise<DeepPartial<ExtendLeafResponse>>;
2205
+ /**
2206
+ * Resets the timelocks for a leaf's transactions. Can be used to reset the
2207
+ * refund transaction timelock for a leaf (when the node transaction
2208
+ * timelock is still > 300) or reset the node and refund transaction
2209
+ * timelock. Returns an error if a leaf is not yet eligible to renew the
2210
+ * timelocks, see RenewLeafRequest for more details.
2211
+ */
2212
+ renew_leaf(request: RenewLeafRequest, context: CallContext & CallContextExt): Promise<DeepPartial<RenewLeafResponse>>;
2084
2213
  get_signing_operator_list(request: Empty, context: CallContext & CallContextExt): Promise<DeepPartial<GetSigningOperatorListResponse>>;
2085
2214
  query_nodes(request: QueryNodesRequest, context: CallContext & CallContextExt): Promise<DeepPartial<QueryNodesResponse>>;
2086
2215
  query_nodes_distribution(request: QueryNodesDistributionRequest, context: CallContext & CallContextExt): Promise<DeepPartial<QueryNodesDistributionResponse>>;
@@ -2179,6 +2308,14 @@ interface SparkServiceClient<CallOptionsExt = {}> {
2179
2308
  counter_leaf_swap(request: DeepPartial<CounterLeafSwapRequest>, options?: CallOptions & CallOptionsExt): Promise<CounterLeafSwapResponse>;
2180
2309
  refresh_timelock(request: DeepPartial<RefreshTimelockRequest>, options?: CallOptions & CallOptionsExt): Promise<RefreshTimelockResponse>;
2181
2310
  extend_leaf(request: DeepPartial<ExtendLeafRequest>, options?: CallOptions & CallOptionsExt): Promise<ExtendLeafResponse>;
2311
+ /**
2312
+ * Resets the timelocks for a leaf's transactions. Can be used to reset the
2313
+ * refund transaction timelock for a leaf (when the node transaction
2314
+ * timelock is still > 300) or reset the node and refund transaction
2315
+ * timelock. Returns an error if a leaf is not yet eligible to renew the
2316
+ * timelocks, see RenewLeafRequest for more details.
2317
+ */
2318
+ renew_leaf(request: DeepPartial<RenewLeafRequest>, options?: CallOptions & CallOptionsExt): Promise<RenewLeafResponse>;
2182
2319
  get_signing_operator_list(request: DeepPartial<Empty>, options?: CallOptions & CallOptionsExt): Promise<GetSigningOperatorListResponse>;
2183
2320
  query_nodes(request: DeepPartial<QueryNodesRequest>, options?: CallOptions & CallOptionsExt): Promise<QueryNodesResponse>;
2184
2321
  query_nodes_distribution(request: DeepPartial<QueryNodesDistributionRequest>, options?: CallOptions & CallOptionsExt): Promise<QueryNodesDistributionResponse>;
@@ -2367,11 +2504,18 @@ declare const spark_QueryUserSignedRefundsResponse: typeof QueryUserSignedRefund
2367
2504
  declare const spark_RefreshTimelockRequest: typeof RefreshTimelockRequest;
2368
2505
  declare const spark_RefreshTimelockResponse: typeof RefreshTimelockResponse;
2369
2506
  declare const spark_RefreshTimelockSigningResult: typeof RefreshTimelockSigningResult;
2507
+ declare const spark_RenewLeafRequest: typeof RenewLeafRequest;
2508
+ declare const spark_RenewLeafResponse: typeof RenewLeafResponse;
2509
+ declare const spark_RenewNodeTimelockResult: typeof RenewNodeTimelockResult;
2510
+ declare const spark_RenewNodeTimelockSigningJob: typeof RenewNodeTimelockSigningJob;
2511
+ declare const spark_RenewRefundTimelockResult: typeof RenewRefundTimelockResult;
2512
+ declare const spark_RenewRefundTimelockSigningJob: typeof RenewRefundTimelockSigningJob;
2370
2513
  declare const spark_RequestedSigningCommitments: typeof RequestedSigningCommitments;
2371
2514
  declare const spark_RequestedSigningCommitments_SigningNonceCommitmentsEntry: typeof RequestedSigningCommitments_SigningNonceCommitmentsEntry;
2372
2515
  declare const spark_ReturnLightningPaymentRequest: typeof ReturnLightningPaymentRequest;
2373
2516
  declare const spark_RevocationSecretWithIndex: typeof RevocationSecretWithIndex;
2374
2517
  declare const spark_SatsPayment: typeof SatsPayment;
2518
+ declare const spark_SatsTransfer: typeof SatsTransfer;
2375
2519
  declare const spark_SecretProof: typeof SecretProof;
2376
2520
  declare const spark_SecretShare: typeof SecretShare;
2377
2521
  declare const spark_SendLeafKeyTweak: typeof SendLeafKeyTweak;
@@ -2419,6 +2563,7 @@ declare const spark_TokenTransactionSignatures: typeof TokenTransactionSignature
2419
2563
  type spark_TokenTransactionStatus = TokenTransactionStatus;
2420
2564
  declare const spark_TokenTransactionStatus: typeof TokenTransactionStatus;
2421
2565
  declare const spark_TokenTransactionWithStatus: typeof TokenTransactionWithStatus;
2566
+ declare const spark_TokenTransfer: typeof TokenTransfer;
2422
2567
  declare const spark_TokenTransferInput: typeof TokenTransferInput;
2423
2568
  declare const spark_TokensPayment: typeof TokensPayment;
2424
2569
  declare const spark_Transfer: typeof Transfer;
@@ -2458,7 +2603,7 @@ declare const spark_transferTypeToJSON: typeof transferTypeToJSON;
2458
2603
  declare const spark_utxoSwapRequestTypeFromJSON: typeof utxoSwapRequestTypeFromJSON;
2459
2604
  declare const spark_utxoSwapRequestTypeToJSON: typeof utxoSwapRequestTypeToJSON;
2460
2605
  declare namespace spark {
2461
- export { spark_Address as Address, spark_AddressNode as AddressNode, spark_AddressRequestNode as AddressRequestNode, spark_BitcoinTransactionOutput as BitcoinTransactionOutput, spark_CancelTransferRequest as CancelTransferRequest, spark_CancelTransferResponse as CancelTransferResponse, spark_ClaimLeafKeyTweak as ClaimLeafKeyTweak, spark_ClaimLeafKeyTweak_PubkeySharesTweakEntry as ClaimLeafKeyTweak_PubkeySharesTweakEntry, spark_ClaimTransferSignRefundsRequest as ClaimTransferSignRefundsRequest, spark_ClaimTransferSignRefundsResponse as ClaimTransferSignRefundsResponse, spark_ClaimTransferTweakKeysRequest as ClaimTransferTweakKeysRequest, spark_ConnectedEvent as ConnectedEvent, spark_CooperativeExitRequest as CooperativeExitRequest, spark_CooperativeExitResponse as CooperativeExitResponse, spark_CounterLeafSwapRequest as CounterLeafSwapRequest, spark_CounterLeafSwapResponse as CounterLeafSwapResponse, spark_CreateTreeRequest as CreateTreeRequest, spark_CreateTreeResponse as CreateTreeResponse, spark_CreationNode as CreationNode, spark_CreationResponseNode as CreationResponseNode, type spark_DeepPartial as DeepPartial, spark_DepositAddressProof as DepositAddressProof, spark_DepositAddressProof_AddressSignaturesEntry as DepositAddressProof_AddressSignaturesEntry, spark_DepositAddressQueryResult as DepositAddressQueryResult, spark_DepositEvent as DepositEvent, spark_Direction as Direction, spark_ExitSingleNodeTreeSigningResult as ExitSingleNodeTreeSigningResult, spark_ExitSingleNodeTreesRequest as ExitSingleNodeTreesRequest, spark_ExitSingleNodeTreesResponse as ExitSingleNodeTreesResponse, spark_ExitingTree as ExitingTree, spark_ExtendLeafRequest as ExtendLeafRequest, spark_ExtendLeafResponse as ExtendLeafResponse, spark_ExtendLeafSigningResult as ExtendLeafSigningResult, spark_FinalizeNodeSignaturesRequest as FinalizeNodeSignaturesRequest, spark_FinalizeNodeSignaturesResponse as FinalizeNodeSignaturesResponse, spark_FinalizeTokenTransactionRequest as FinalizeTokenTransactionRequest, spark_FinalizeTransferRequest as FinalizeTransferRequest, spark_FinalizeTransferResponse as FinalizeTransferResponse, spark_FinalizeTransferWithTransferPackageRequest as FinalizeTransferWithTransferPackageRequest, spark_FreezeTokensPayload as FreezeTokensPayload, spark_FreezeTokensRequest as FreezeTokensRequest, spark_FreezeTokensResponse as FreezeTokensResponse, spark_GenerateDepositAddressRequest as GenerateDepositAddressRequest, spark_GenerateDepositAddressResponse as GenerateDepositAddressResponse, spark_GenerateStaticDepositAddressRequest as GenerateStaticDepositAddressRequest, spark_GenerateStaticDepositAddressResponse as GenerateStaticDepositAddressResponse, spark_GetSigningCommitmentsRequest as GetSigningCommitmentsRequest, spark_GetSigningCommitmentsResponse as GetSigningCommitmentsResponse, spark_GetSigningOperatorListResponse as GetSigningOperatorListResponse, spark_GetSigningOperatorListResponse_SigningOperatorsEntry as GetSigningOperatorListResponse_SigningOperatorsEntry, spark_GetUtxosForAddressRequest as GetUtxosForAddressRequest, spark_GetUtxosForAddressResponse as GetUtxosForAddressResponse, spark_InitiatePreimageSwapRequest as InitiatePreimageSwapRequest, spark_InitiatePreimageSwapRequest_Reason as InitiatePreimageSwapRequest_Reason, spark_InitiatePreimageSwapResponse as InitiatePreimageSwapResponse, spark_InitiateStaticDepositUtxoRefundRequest as InitiateStaticDepositUtxoRefundRequest, spark_InitiateStaticDepositUtxoRefundResponse as InitiateStaticDepositUtxoRefundResponse, spark_InitiateUtxoSwapRequest as InitiateUtxoSwapRequest, spark_InitiateUtxoSwapResponse as InitiateUtxoSwapResponse, spark_InvestigateLeavesRequest as InvestigateLeavesRequest, spark_InvoiceAmount as InvoiceAmount, spark_InvoiceAmountProof as InvoiceAmountProof, spark_InvoiceResponse as InvoiceResponse, spark_InvoiceStatus as InvoiceStatus, spark_KeyshareWithIndex as KeyshareWithIndex, spark_LeafRefundTxSigningJob as LeafRefundTxSigningJob, spark_LeafRefundTxSigningResult as LeafRefundTxSigningResult, type spark_MessageFns as MessageFns, spark_Network as Network, spark_NodeOutput as NodeOutput, spark_NodeSignatureShares as NodeSignatureShares, spark_NodeSignatures as NodeSignatures, spark_OperatorSpecificOwnerSignature as OperatorSpecificOwnerSignature, spark_OperatorSpecificTokenTransactionSignablePayload as OperatorSpecificTokenTransactionSignablePayload, spark_Order as Order, spark_OutPoint as OutPoint, spark_OutputWithPreviousTransactionData as OutputWithPreviousTransactionData, spark_PageRequest as PageRequest, spark_PageResponse as PageResponse, spark_PrepareTreeAddressRequest as PrepareTreeAddressRequest, spark_PrepareTreeAddressResponse as PrepareTreeAddressResponse, spark_ProvidePreimageRequest as ProvidePreimageRequest, spark_ProvidePreimageResponse as ProvidePreimageResponse, spark_QueryBalanceRequest as QueryBalanceRequest, spark_QueryBalanceResponse as QueryBalanceResponse, spark_QueryBalanceResponse_NodeBalancesEntry as QueryBalanceResponse_NodeBalancesEntry, spark_QueryNodesByValueRequest as QueryNodesByValueRequest, spark_QueryNodesByValueResponse as QueryNodesByValueResponse, spark_QueryNodesByValueResponse_NodesEntry as QueryNodesByValueResponse_NodesEntry, spark_QueryNodesDistributionRequest as QueryNodesDistributionRequest, spark_QueryNodesDistributionResponse as QueryNodesDistributionResponse, spark_QueryNodesDistributionResponse_NodeDistributionEntry as QueryNodesDistributionResponse_NodeDistributionEntry, spark_QueryNodesRequest as QueryNodesRequest, spark_QueryNodesResponse as QueryNodesResponse, spark_QueryNodesResponse_NodesEntry as QueryNodesResponse_NodesEntry, spark_QuerySparkInvoicesRequest as QuerySparkInvoicesRequest, spark_QuerySparkInvoicesResponse as QuerySparkInvoicesResponse, spark_QueryStaticDepositAddressesRequest as QueryStaticDepositAddressesRequest, spark_QueryStaticDepositAddressesResponse as QueryStaticDepositAddressesResponse, spark_QueryTokenOutputsRequest as QueryTokenOutputsRequest, spark_QueryTokenOutputsResponse as QueryTokenOutputsResponse, spark_QueryTokenTransactionsRequest as QueryTokenTransactionsRequest, spark_QueryTokenTransactionsResponse as QueryTokenTransactionsResponse, spark_QueryTransfersResponse as QueryTransfersResponse, spark_QueryUnusedDepositAddressesRequest as QueryUnusedDepositAddressesRequest, spark_QueryUnusedDepositAddressesResponse as QueryUnusedDepositAddressesResponse, spark_QueryUserSignedRefundsRequest as QueryUserSignedRefundsRequest, spark_QueryUserSignedRefundsResponse as QueryUserSignedRefundsResponse, spark_RefreshTimelockRequest as RefreshTimelockRequest, spark_RefreshTimelockResponse as RefreshTimelockResponse, spark_RefreshTimelockSigningResult as RefreshTimelockSigningResult, spark_RequestedSigningCommitments as RequestedSigningCommitments, spark_RequestedSigningCommitments_SigningNonceCommitmentsEntry as RequestedSigningCommitments_SigningNonceCommitmentsEntry, spark_ReturnLightningPaymentRequest as ReturnLightningPaymentRequest, spark_RevocationSecretWithIndex as RevocationSecretWithIndex, spark_SatsPayment as SatsPayment, spark_SecretProof as SecretProof, spark_SecretShare as SecretShare, spark_SendLeafKeyTweak as SendLeafKeyTweak, spark_SendLeafKeyTweak_PubkeySharesTweakEntry as SendLeafKeyTweak_PubkeySharesTweakEntry, spark_SendLeafKeyTweaks as SendLeafKeyTweaks, type spark_ServerStreamingMethodResult as ServerStreamingMethodResult, spark_SignTokenTransactionRequest as SignTokenTransactionRequest, spark_SignTokenTransactionResponse as SignTokenTransactionResponse, spark_SignatureWithIndex as SignatureWithIndex, spark_SigningCommitments as SigningCommitments, spark_SigningCommitments_SigningCommitmentsEntry as SigningCommitments_SigningCommitmentsEntry, spark_SigningJob as SigningJob, spark_SigningKeyshare as SigningKeyshare, spark_SigningKeyshare_PublicSharesEntry as SigningKeyshare_PublicSharesEntry, spark_SigningOperatorInfo as SigningOperatorInfo, spark_SigningResult as SigningResult, spark_SigningResult_PublicKeysEntry as SigningResult_PublicKeysEntry, spark_SigningResult_SignatureSharesEntry as SigningResult_SignatureSharesEntry, spark_SigningResult_SigningNonceCommitmentsEntry as SigningResult_SigningNonceCommitmentsEntry, spark_SparkAddress as SparkAddress, spark_SparkInvoiceFields as SparkInvoiceFields, type spark_SparkServiceClient as SparkServiceClient, spark_SparkServiceDefinition as SparkServiceDefinition, type spark_SparkServiceImplementation as SparkServiceImplementation, spark_SpentTokenOutputMetadata as SpentTokenOutputMetadata, spark_StartDepositTreeCreationRequest as StartDepositTreeCreationRequest, spark_StartDepositTreeCreationResponse as StartDepositTreeCreationResponse, spark_StartTokenTransactionRequest as StartTokenTransactionRequest, spark_StartTokenTransactionResponse as StartTokenTransactionResponse, spark_StartTransferRequest as StartTransferRequest, spark_StartTransferResponse as StartTransferResponse, spark_StartTreeCreationRequest as StartTreeCreationRequest, spark_StartTreeCreationResponse as StartTreeCreationResponse, spark_StartUserSignedTransferRequest as StartUserSignedTransferRequest, spark_StorePreimageShareRequest as StorePreimageShareRequest, spark_SubscribeToEventsRequest as SubscribeToEventsRequest, spark_SubscribeToEventsResponse as SubscribeToEventsResponse, spark_TokenCreateInput as TokenCreateInput, spark_TokenMintInput as TokenMintInput, spark_TokenOutput as TokenOutput, spark_TokenOutputToSpend as TokenOutputToSpend, spark_TokenTransaction as TokenTransaction, spark_TokenTransactionConfirmationMetadata as TokenTransactionConfirmationMetadata, spark_TokenTransactionSignatures as TokenTransactionSignatures, spark_TokenTransactionStatus as TokenTransactionStatus, spark_TokenTransactionWithStatus as TokenTransactionWithStatus, spark_TokenTransferInput as TokenTransferInput, spark_TokensPayment as TokensPayment, spark_Transfer as Transfer, spark_TransferEvent as TransferEvent, spark_TransferFilter as TransferFilter, spark_TransferLeaf as TransferLeaf, spark_TransferPackage as TransferPackage, spark_TransferPackage_KeyTweakPackageEntry as TransferPackage_KeyTweakPackageEntry, spark_TransferStatus as TransferStatus, spark_TransferType as TransferType, spark_TreeNode as TreeNode, spark_TreeNodeIds as TreeNodeIds, spark_UTXO as UTXO, spark_UserSignedRefund as UserSignedRefund, spark_UserSignedTxSigningJob as UserSignedTxSigningJob, spark_UtxoSwapRequestType as UtxoSwapRequestType, spark_directionFromJSON as directionFromJSON, spark_directionToJSON as directionToJSON, spark_initiatePreimageSwapRequest_ReasonFromJSON as initiatePreimageSwapRequest_ReasonFromJSON, spark_initiatePreimageSwapRequest_ReasonToJSON as initiatePreimageSwapRequest_ReasonToJSON, spark_invoiceStatusFromJSON as invoiceStatusFromJSON, spark_invoiceStatusToJSON as invoiceStatusToJSON, spark_networkFromJSON as networkFromJSON, spark_networkToJSON as networkToJSON, spark_orderFromJSON as orderFromJSON, spark_orderToJSON as orderToJSON, spark_protobufPackage as protobufPackage, spark_tokenTransactionStatusFromJSON as tokenTransactionStatusFromJSON, spark_tokenTransactionStatusToJSON as tokenTransactionStatusToJSON, spark_transferStatusFromJSON as transferStatusFromJSON, spark_transferStatusToJSON as transferStatusToJSON, spark_transferTypeFromJSON as transferTypeFromJSON, spark_transferTypeToJSON as transferTypeToJSON, spark_utxoSwapRequestTypeFromJSON as utxoSwapRequestTypeFromJSON, spark_utxoSwapRequestTypeToJSON as utxoSwapRequestTypeToJSON };
2606
+ export { spark_Address as Address, spark_AddressNode as AddressNode, spark_AddressRequestNode as AddressRequestNode, spark_BitcoinTransactionOutput as BitcoinTransactionOutput, spark_CancelTransferRequest as CancelTransferRequest, spark_CancelTransferResponse as CancelTransferResponse, spark_ClaimLeafKeyTweak as ClaimLeafKeyTweak, spark_ClaimLeafKeyTweak_PubkeySharesTweakEntry as ClaimLeafKeyTweak_PubkeySharesTweakEntry, spark_ClaimTransferSignRefundsRequest as ClaimTransferSignRefundsRequest, spark_ClaimTransferSignRefundsResponse as ClaimTransferSignRefundsResponse, spark_ClaimTransferTweakKeysRequest as ClaimTransferTweakKeysRequest, spark_ConnectedEvent as ConnectedEvent, spark_CooperativeExitRequest as CooperativeExitRequest, spark_CooperativeExitResponse as CooperativeExitResponse, spark_CounterLeafSwapRequest as CounterLeafSwapRequest, spark_CounterLeafSwapResponse as CounterLeafSwapResponse, spark_CreateTreeRequest as CreateTreeRequest, spark_CreateTreeResponse as CreateTreeResponse, spark_CreationNode as CreationNode, spark_CreationResponseNode as CreationResponseNode, type spark_DeepPartial as DeepPartial, spark_DepositAddressProof as DepositAddressProof, spark_DepositAddressProof_AddressSignaturesEntry as DepositAddressProof_AddressSignaturesEntry, spark_DepositAddressQueryResult as DepositAddressQueryResult, spark_DepositEvent as DepositEvent, spark_Direction as Direction, spark_ExitSingleNodeTreeSigningResult as ExitSingleNodeTreeSigningResult, spark_ExitSingleNodeTreesRequest as ExitSingleNodeTreesRequest, spark_ExitSingleNodeTreesResponse as ExitSingleNodeTreesResponse, spark_ExitingTree as ExitingTree, spark_ExtendLeafRequest as ExtendLeafRequest, spark_ExtendLeafResponse as ExtendLeafResponse, spark_ExtendLeafSigningResult as ExtendLeafSigningResult, spark_FinalizeNodeSignaturesRequest as FinalizeNodeSignaturesRequest, spark_FinalizeNodeSignaturesResponse as FinalizeNodeSignaturesResponse, spark_FinalizeTokenTransactionRequest as FinalizeTokenTransactionRequest, spark_FinalizeTransferRequest as FinalizeTransferRequest, spark_FinalizeTransferResponse as FinalizeTransferResponse, spark_FinalizeTransferWithTransferPackageRequest as FinalizeTransferWithTransferPackageRequest, spark_FreezeTokensPayload as FreezeTokensPayload, spark_FreezeTokensRequest as FreezeTokensRequest, spark_FreezeTokensResponse as FreezeTokensResponse, spark_GenerateDepositAddressRequest as GenerateDepositAddressRequest, spark_GenerateDepositAddressResponse as GenerateDepositAddressResponse, spark_GenerateStaticDepositAddressRequest as GenerateStaticDepositAddressRequest, spark_GenerateStaticDepositAddressResponse as GenerateStaticDepositAddressResponse, spark_GetSigningCommitmentsRequest as GetSigningCommitmentsRequest, spark_GetSigningCommitmentsResponse as GetSigningCommitmentsResponse, spark_GetSigningOperatorListResponse as GetSigningOperatorListResponse, spark_GetSigningOperatorListResponse_SigningOperatorsEntry as GetSigningOperatorListResponse_SigningOperatorsEntry, spark_GetUtxosForAddressRequest as GetUtxosForAddressRequest, spark_GetUtxosForAddressResponse as GetUtxosForAddressResponse, spark_InitiatePreimageSwapRequest as InitiatePreimageSwapRequest, spark_InitiatePreimageSwapRequest_Reason as InitiatePreimageSwapRequest_Reason, spark_InitiatePreimageSwapResponse as InitiatePreimageSwapResponse, spark_InitiateStaticDepositUtxoRefundRequest as InitiateStaticDepositUtxoRefundRequest, spark_InitiateStaticDepositUtxoRefundResponse as InitiateStaticDepositUtxoRefundResponse, spark_InitiateUtxoSwapRequest as InitiateUtxoSwapRequest, spark_InitiateUtxoSwapResponse as InitiateUtxoSwapResponse, spark_InvestigateLeavesRequest as InvestigateLeavesRequest, spark_InvoiceAmount as InvoiceAmount, spark_InvoiceAmountProof as InvoiceAmountProof, spark_InvoiceResponse as InvoiceResponse, spark_InvoiceStatus as InvoiceStatus, spark_KeyshareWithIndex as KeyshareWithIndex, spark_LeafRefundTxSigningJob as LeafRefundTxSigningJob, spark_LeafRefundTxSigningResult as LeafRefundTxSigningResult, type spark_MessageFns as MessageFns, spark_Network as Network, spark_NodeOutput as NodeOutput, spark_NodeSignatureShares as NodeSignatureShares, spark_NodeSignatures as NodeSignatures, spark_OperatorSpecificOwnerSignature as OperatorSpecificOwnerSignature, spark_OperatorSpecificTokenTransactionSignablePayload as OperatorSpecificTokenTransactionSignablePayload, spark_Order as Order, spark_OutPoint as OutPoint, spark_OutputWithPreviousTransactionData as OutputWithPreviousTransactionData, spark_PageRequest as PageRequest, spark_PageResponse as PageResponse, spark_PrepareTreeAddressRequest as PrepareTreeAddressRequest, spark_PrepareTreeAddressResponse as PrepareTreeAddressResponse, spark_ProvidePreimageRequest as ProvidePreimageRequest, spark_ProvidePreimageResponse as ProvidePreimageResponse, spark_QueryBalanceRequest as QueryBalanceRequest, spark_QueryBalanceResponse as QueryBalanceResponse, spark_QueryBalanceResponse_NodeBalancesEntry as QueryBalanceResponse_NodeBalancesEntry, spark_QueryNodesByValueRequest as QueryNodesByValueRequest, spark_QueryNodesByValueResponse as QueryNodesByValueResponse, spark_QueryNodesByValueResponse_NodesEntry as QueryNodesByValueResponse_NodesEntry, spark_QueryNodesDistributionRequest as QueryNodesDistributionRequest, spark_QueryNodesDistributionResponse as QueryNodesDistributionResponse, spark_QueryNodesDistributionResponse_NodeDistributionEntry as QueryNodesDistributionResponse_NodeDistributionEntry, spark_QueryNodesRequest as QueryNodesRequest, spark_QueryNodesResponse as QueryNodesResponse, spark_QueryNodesResponse_NodesEntry as QueryNodesResponse_NodesEntry, spark_QuerySparkInvoicesRequest as QuerySparkInvoicesRequest, spark_QuerySparkInvoicesResponse as QuerySparkInvoicesResponse, spark_QueryStaticDepositAddressesRequest as QueryStaticDepositAddressesRequest, spark_QueryStaticDepositAddressesResponse as QueryStaticDepositAddressesResponse, spark_QueryTokenOutputsRequest as QueryTokenOutputsRequest, spark_QueryTokenOutputsResponse as QueryTokenOutputsResponse, spark_QueryTokenTransactionsRequest as QueryTokenTransactionsRequest, spark_QueryTokenTransactionsResponse as QueryTokenTransactionsResponse, spark_QueryTransfersResponse as QueryTransfersResponse, spark_QueryUnusedDepositAddressesRequest as QueryUnusedDepositAddressesRequest, spark_QueryUnusedDepositAddressesResponse as QueryUnusedDepositAddressesResponse, spark_QueryUserSignedRefundsRequest as QueryUserSignedRefundsRequest, spark_QueryUserSignedRefundsResponse as QueryUserSignedRefundsResponse, spark_RefreshTimelockRequest as RefreshTimelockRequest, spark_RefreshTimelockResponse as RefreshTimelockResponse, spark_RefreshTimelockSigningResult as RefreshTimelockSigningResult, spark_RenewLeafRequest as RenewLeafRequest, spark_RenewLeafResponse as RenewLeafResponse, spark_RenewNodeTimelockResult as RenewNodeTimelockResult, spark_RenewNodeTimelockSigningJob as RenewNodeTimelockSigningJob, spark_RenewRefundTimelockResult as RenewRefundTimelockResult, spark_RenewRefundTimelockSigningJob as RenewRefundTimelockSigningJob, spark_RequestedSigningCommitments as RequestedSigningCommitments, spark_RequestedSigningCommitments_SigningNonceCommitmentsEntry as RequestedSigningCommitments_SigningNonceCommitmentsEntry, spark_ReturnLightningPaymentRequest as ReturnLightningPaymentRequest, spark_RevocationSecretWithIndex as RevocationSecretWithIndex, spark_SatsPayment as SatsPayment, spark_SatsTransfer as SatsTransfer, spark_SecretProof as SecretProof, spark_SecretShare as SecretShare, spark_SendLeafKeyTweak as SendLeafKeyTweak, spark_SendLeafKeyTweak_PubkeySharesTweakEntry as SendLeafKeyTweak_PubkeySharesTweakEntry, spark_SendLeafKeyTweaks as SendLeafKeyTweaks, type spark_ServerStreamingMethodResult as ServerStreamingMethodResult, spark_SignTokenTransactionRequest as SignTokenTransactionRequest, spark_SignTokenTransactionResponse as SignTokenTransactionResponse, spark_SignatureWithIndex as SignatureWithIndex, spark_SigningCommitments as SigningCommitments, spark_SigningCommitments_SigningCommitmentsEntry as SigningCommitments_SigningCommitmentsEntry, spark_SigningJob as SigningJob, spark_SigningKeyshare as SigningKeyshare, spark_SigningKeyshare_PublicSharesEntry as SigningKeyshare_PublicSharesEntry, spark_SigningOperatorInfo as SigningOperatorInfo, spark_SigningResult as SigningResult, spark_SigningResult_PublicKeysEntry as SigningResult_PublicKeysEntry, spark_SigningResult_SignatureSharesEntry as SigningResult_SignatureSharesEntry, spark_SigningResult_SigningNonceCommitmentsEntry as SigningResult_SigningNonceCommitmentsEntry, spark_SparkAddress as SparkAddress, spark_SparkInvoiceFields as SparkInvoiceFields, type spark_SparkServiceClient as SparkServiceClient, spark_SparkServiceDefinition as SparkServiceDefinition, type spark_SparkServiceImplementation as SparkServiceImplementation, spark_SpentTokenOutputMetadata as SpentTokenOutputMetadata, spark_StartDepositTreeCreationRequest as StartDepositTreeCreationRequest, spark_StartDepositTreeCreationResponse as StartDepositTreeCreationResponse, spark_StartTokenTransactionRequest as StartTokenTransactionRequest, spark_StartTokenTransactionResponse as StartTokenTransactionResponse, spark_StartTransferRequest as StartTransferRequest, spark_StartTransferResponse as StartTransferResponse, spark_StartTreeCreationRequest as StartTreeCreationRequest, spark_StartTreeCreationResponse as StartTreeCreationResponse, spark_StartUserSignedTransferRequest as StartUserSignedTransferRequest, spark_StorePreimageShareRequest as StorePreimageShareRequest, spark_SubscribeToEventsRequest as SubscribeToEventsRequest, spark_SubscribeToEventsResponse as SubscribeToEventsResponse, spark_TokenCreateInput as TokenCreateInput, spark_TokenMintInput as TokenMintInput, spark_TokenOutput as TokenOutput, spark_TokenOutputToSpend as TokenOutputToSpend, spark_TokenTransaction as TokenTransaction, spark_TokenTransactionConfirmationMetadata as TokenTransactionConfirmationMetadata, spark_TokenTransactionSignatures as TokenTransactionSignatures, spark_TokenTransactionStatus as TokenTransactionStatus, spark_TokenTransactionWithStatus as TokenTransactionWithStatus, spark_TokenTransfer as TokenTransfer, spark_TokenTransferInput as TokenTransferInput, spark_TokensPayment as TokensPayment, spark_Transfer as Transfer, spark_TransferEvent as TransferEvent, spark_TransferFilter as TransferFilter, spark_TransferLeaf as TransferLeaf, spark_TransferPackage as TransferPackage, spark_TransferPackage_KeyTweakPackageEntry as TransferPackage_KeyTweakPackageEntry, spark_TransferStatus as TransferStatus, spark_TransferType as TransferType, spark_TreeNode as TreeNode, spark_TreeNodeIds as TreeNodeIds, spark_UTXO as UTXO, spark_UserSignedRefund as UserSignedRefund, spark_UserSignedTxSigningJob as UserSignedTxSigningJob, spark_UtxoSwapRequestType as UtxoSwapRequestType, spark_directionFromJSON as directionFromJSON, spark_directionToJSON as directionToJSON, spark_initiatePreimageSwapRequest_ReasonFromJSON as initiatePreimageSwapRequest_ReasonFromJSON, spark_initiatePreimageSwapRequest_ReasonToJSON as initiatePreimageSwapRequest_ReasonToJSON, spark_invoiceStatusFromJSON as invoiceStatusFromJSON, spark_invoiceStatusToJSON as invoiceStatusToJSON, spark_networkFromJSON as networkFromJSON, spark_networkToJSON as networkToJSON, spark_orderFromJSON as orderFromJSON, spark_orderToJSON as orderToJSON, spark_protobufPackage as protobufPackage, spark_tokenTransactionStatusFromJSON as tokenTransactionStatusFromJSON, spark_tokenTransactionStatusToJSON as tokenTransactionStatusToJSON, spark_transferStatusFromJSON as transferStatusFromJSON, spark_transferStatusToJSON as transferStatusToJSON, spark_transferTypeFromJSON as transferTypeFromJSON, spark_transferTypeToJSON as transferTypeToJSON, spark_utxoSwapRequestTypeFromJSON as utxoSwapRequestTypeFromJSON, spark_utxoSwapRequestTypeToJSON as utxoSwapRequestTypeToJSON };
2462
2607
  }
2463
2608
 
2464
- export { Address as $, orderToJSON as A, UtxoSwapRequestType as B, utxoSwapRequestTypeFromJSON as C, Direction as D, Empty as E, FinalizeNodeSignaturesResponse as F, utxoSwapRequestTypeToJSON as G, invoiceStatusFromJSON as H, InvoiceStatus as I, invoiceStatusToJSON as J, SubscribeToEventsRequest as K, LeafRefundTxSigningResult as L, SubscribeToEventsResponse as M, Network as N, OutputWithPreviousTransactionData as O, PageRequest as P, QueryTransfersResponse as Q, RequestedSigningCommitments as R, SigningKeyshare as S, TokenTransaction as T, UserSignedTxSigningJob as U, ConnectedEvent as V, TransferEvent as W, DepositEvent as X, DepositAddressProof as Y, DepositAddressProof_AddressSignaturesEntry as Z, GenerateDepositAddressRequest as _, PageResponse as a, RequestedSigningCommitments_SigningNonceCommitmentsEntry as a$, GenerateDepositAddressResponse as a0, GenerateStaticDepositAddressRequest as a1, GenerateStaticDepositAddressResponse as a2, UTXO as a3, NodeOutput as a4, SigningJob as a5, SigningKeyshare_PublicSharesEntry as a6, SigningResult as a7, SigningResult_PublicKeysEntry as a8, SigningResult_SigningNonceCommitmentsEntry as a9, FreezeTokensRequest as aA, FreezeTokensResponse as aB, QueryTokenOutputsRequest as aC, QueryTokenTransactionsRequest as aD, QueryTokenTransactionsResponse as aE, QueryTokenOutputsResponse as aF, FinalizeNodeSignaturesRequest as aG, SecretShare as aH, SecretProof as aI, LeafRefundTxSigningJob as aJ, StartUserSignedTransferRequest as aK, StartTransferRequest as aL, StartTransferResponse as aM, TransferPackage_KeyTweakPackageEntry as aN, SendLeafKeyTweaks as aO, SendLeafKeyTweak as aP, SendLeafKeyTweak_PubkeySharesTweakEntry as aQ, FinalizeTransferRequest as aR, FinalizeTransferWithTransferPackageRequest as aS, FinalizeTransferResponse as aT, TransferFilter as aU, ClaimLeafKeyTweak as aV, ClaimLeafKeyTweak_PubkeySharesTweakEntry as aW, ClaimTransferTweakKeysRequest as aX, ClaimTransferSignRefundsRequest as aY, ClaimTransferSignRefundsResponse as aZ, StorePreimageShareRequest as a_, SigningResult_SignatureSharesEntry as aa, NodeSignatureShares as ab, StartTreeCreationRequest as ac, StartTreeCreationResponse as ad, StartDepositTreeCreationRequest as ae, StartDepositTreeCreationResponse as af, TokenOutputToSpend as ag, TokenTransferInput as ah, TokenMintInput as ai, TokenCreateInput as aj, TokenOutput as ak, SpentTokenOutputMetadata as al, TokenTransactionConfirmationMetadata as am, TokenTransactionWithStatus as an, SignatureWithIndex as ao, TokenTransactionSignatures as ap, StartTokenTransactionRequest as aq, StartTokenTransactionResponse as ar, OperatorSpecificTokenTransactionSignablePayload as as, OperatorSpecificOwnerSignature as at, SignTokenTransactionRequest as au, KeyshareWithIndex as av, SignTokenTransactionResponse as aw, RevocationSecretWithIndex as ax, FinalizeTokenTransactionRequest as ay, FreezeTokensPayload as az, Transfer as b, ExitSingleNodeTreesRequest as b$, GetSigningCommitmentsRequest as b0, GetSigningCommitmentsResponse as b1, SigningCommitments as b2, SigningCommitments_SigningCommitmentsEntry as b3, UserSignedRefund as b4, InvoiceAmountProof as b5, InvoiceAmount as b6, InitiatePreimageSwapRequest as b7, InitiatePreimageSwapRequest_Reason as b8, initiatePreimageSwapRequest_ReasonFromJSON as b9, ProvidePreimageRequest as bA, ProvidePreimageResponse as bB, ReturnLightningPaymentRequest as bC, TreeNodeIds as bD, QueryNodesRequest as bE, QueryNodesResponse as bF, QueryNodesResponse_NodesEntry as bG, CancelTransferRequest as bH, CancelTransferResponse as bI, QueryUnusedDepositAddressesRequest as bJ, QueryStaticDepositAddressesRequest as bK, DepositAddressQueryResult as bL, QueryUnusedDepositAddressesResponse as bM, QueryStaticDepositAddressesResponse as bN, QueryBalanceRequest as bO, QueryBalanceResponse as bP, QueryBalanceResponse_NodeBalancesEntry as bQ, SparkAddress as bR, SatsPayment as bS, TokensPayment as bT, InitiateStaticDepositUtxoRefundRequest as bU, InitiateStaticDepositUtxoRefundResponse as bV, InitiateUtxoSwapRequest as bW, InitiateUtxoSwapResponse as bX, ExitingTree as bY, ExitSingleNodeTreeSigningResult as bZ, BitcoinTransactionOutput as b_, initiatePreimageSwapRequest_ReasonToJSON as ba, InitiatePreimageSwapResponse as bb, OutPoint as bc, CooperativeExitRequest as bd, CooperativeExitResponse as be, CounterLeafSwapRequest as bf, CounterLeafSwapResponse as bg, RefreshTimelockRequest as bh, RefreshTimelockSigningResult as bi, RefreshTimelockResponse as bj, ExtendLeafRequest as bk, ExtendLeafSigningResult as bl, ExtendLeafResponse as bm, AddressRequestNode as bn, PrepareTreeAddressRequest as bo, AddressNode as bp, PrepareTreeAddressResponse as bq, CreationNode as br, CreateTreeRequest as bs, CreationResponseNode as bt, CreateTreeResponse as bu, SigningOperatorInfo as bv, GetSigningOperatorListResponse as bw, GetSigningOperatorListResponse_SigningOperatorsEntry as bx, QueryUserSignedRefundsRequest as by, QueryUserSignedRefundsResponse as bz, TreeNode as c, ExitSingleNodeTreesResponse as c0, InvestigateLeavesRequest as c1, QueryNodesDistributionRequest as c2, QueryNodesDistributionResponse as c3, QueryNodesDistributionResponse_NodeDistributionEntry as c4, QueryNodesByValueRequest as c5, QueryNodesByValueResponse as c6, QueryNodesByValueResponse_NodesEntry as c7, GetUtxosForAddressRequest as c8, GetUtxosForAddressResponse as c9, QuerySparkInvoicesRequest as ca, QuerySparkInvoicesResponse as cb, InvoiceResponse as cc, SparkServiceDefinition as cd, type SparkServiceImplementation as ce, type DeepPartial as cf, type ServerStreamingMethodResult as cg, type MessageFns as ch, type SparkServiceClient as d, SparkInvoiceFields as e, NodeSignatures as f, TransferPackage as g, TransferStatus as h, TransferType as i, TransferLeaf as j, common as k, networkToJSON as l, directionFromJSON as m, networkFromJSON as n, directionToJSON as o, protobufPackage as p, TokenTransactionStatus as q, tokenTransactionStatusToJSON as r, spark as s, tokenTransactionStatusFromJSON as t, transferStatusFromJSON as u, transferStatusToJSON as v, transferTypeFromJSON as w, transferTypeToJSON as x, Order as y, orderFromJSON as z };
2609
+ export { Address as $, orderToJSON as A, UtxoSwapRequestType as B, utxoSwapRequestTypeFromJSON as C, Direction as D, Empty as E, FinalizeNodeSignaturesResponse as F, utxoSwapRequestTypeToJSON as G, invoiceStatusFromJSON as H, InvoiceStatus as I, invoiceStatusToJSON as J, SubscribeToEventsRequest as K, LeafRefundTxSigningResult as L, SubscribeToEventsResponse as M, Network as N, OutputWithPreviousTransactionData as O, PageRequest as P, QueryTransfersResponse as Q, RequestedSigningCommitments as R, SigningKeyshare as S, Transfer as T, UserSignedTxSigningJob as U, ConnectedEvent as V, TransferEvent as W, DepositEvent as X, DepositAddressProof as Y, DepositAddressProof_AddressSignaturesEntry as Z, GenerateDepositAddressRequest as _, PageResponse as a, TransferFilter as a$, GenerateDepositAddressResponse as a0, GenerateStaticDepositAddressRequest as a1, GenerateStaticDepositAddressResponse as a2, UTXO as a3, NodeOutput as a4, SigningJob as a5, SigningKeyshare_PublicSharesEntry as a6, SigningResult as a7, SigningResult_PublicKeysEntry as a8, SigningResult_SigningNonceCommitmentsEntry as a9, OperatorSpecificOwnerSignature as aA, SignTokenTransactionRequest as aB, KeyshareWithIndex as aC, SignTokenTransactionResponse as aD, RevocationSecretWithIndex as aE, FinalizeTokenTransactionRequest as aF, FreezeTokensPayload as aG, FreezeTokensRequest as aH, FreezeTokensResponse as aI, QueryTokenOutputsRequest as aJ, QueryTokenTransactionsRequest as aK, QueryTokenTransactionsResponse as aL, QueryTokenOutputsResponse as aM, FinalizeNodeSignaturesRequest as aN, SecretShare as aO, SecretProof as aP, LeafRefundTxSigningJob as aQ, StartUserSignedTransferRequest as aR, StartTransferRequest as aS, StartTransferResponse as aT, TransferPackage_KeyTweakPackageEntry as aU, SendLeafKeyTweaks as aV, SendLeafKeyTweak as aW, SendLeafKeyTweak_PubkeySharesTweakEntry as aX, FinalizeTransferRequest as aY, FinalizeTransferWithTransferPackageRequest as aZ, FinalizeTransferResponse as a_, SigningResult_SignatureSharesEntry as aa, RenewLeafRequest as ab, RenewNodeTimelockSigningJob as ac, RenewRefundTimelockSigningJob as ad, RenewLeafResponse as ae, RenewNodeTimelockResult as af, RenewRefundTimelockResult as ag, NodeSignatureShares as ah, StartTreeCreationRequest as ai, StartTreeCreationResponse as aj, StartDepositTreeCreationRequest as ak, StartDepositTreeCreationResponse as al, TokenOutputToSpend as am, TokenTransferInput as an, TokenMintInput as ao, TokenCreateInput as ap, TokenOutput as aq, TokenTransaction as ar, SpentTokenOutputMetadata as as, TokenTransactionConfirmationMetadata as at, TokenTransactionWithStatus as au, SignatureWithIndex as av, TokenTransactionSignatures as aw, StartTokenTransactionRequest as ax, StartTokenTransactionResponse as ay, OperatorSpecificTokenTransactionSignablePayload as az, TreeNode as b, InitiateStaticDepositUtxoRefundRequest as b$, ClaimLeafKeyTweak as b0, ClaimLeafKeyTweak_PubkeySharesTweakEntry as b1, ClaimTransferTweakKeysRequest as b2, ClaimTransferSignRefundsRequest as b3, ClaimTransferSignRefundsResponse as b4, StorePreimageShareRequest as b5, RequestedSigningCommitments_SigningNonceCommitmentsEntry as b6, GetSigningCommitmentsRequest as b7, GetSigningCommitmentsResponse as b8, SigningCommitments as b9, CreationResponseNode as bA, CreateTreeResponse as bB, SigningOperatorInfo as bC, GetSigningOperatorListResponse as bD, GetSigningOperatorListResponse_SigningOperatorsEntry as bE, QueryUserSignedRefundsRequest as bF, QueryUserSignedRefundsResponse as bG, ProvidePreimageRequest as bH, ProvidePreimageResponse as bI, ReturnLightningPaymentRequest as bJ, TreeNodeIds as bK, QueryNodesRequest as bL, QueryNodesResponse as bM, QueryNodesResponse_NodesEntry as bN, CancelTransferRequest as bO, CancelTransferResponse as bP, QueryUnusedDepositAddressesRequest as bQ, QueryStaticDepositAddressesRequest as bR, DepositAddressQueryResult as bS, QueryUnusedDepositAddressesResponse as bT, QueryStaticDepositAddressesResponse as bU, QueryBalanceRequest as bV, QueryBalanceResponse as bW, QueryBalanceResponse_NodeBalancesEntry as bX, SparkAddress as bY, SatsPayment as bZ, TokensPayment as b_, SigningCommitments_SigningCommitmentsEntry as ba, UserSignedRefund as bb, InvoiceAmountProof as bc, InvoiceAmount as bd, InitiatePreimageSwapRequest as be, InitiatePreimageSwapRequest_Reason as bf, initiatePreimageSwapRequest_ReasonFromJSON as bg, initiatePreimageSwapRequest_ReasonToJSON as bh, InitiatePreimageSwapResponse as bi, OutPoint as bj, CooperativeExitRequest as bk, CooperativeExitResponse as bl, CounterLeafSwapRequest as bm, CounterLeafSwapResponse as bn, RefreshTimelockRequest as bo, RefreshTimelockSigningResult as bp, RefreshTimelockResponse as bq, ExtendLeafRequest as br, ExtendLeafSigningResult as bs, ExtendLeafResponse as bt, AddressRequestNode as bu, PrepareTreeAddressRequest as bv, AddressNode as bw, PrepareTreeAddressResponse as bx, CreationNode as by, CreateTreeRequest as bz, type SparkServiceClient as c, InitiateStaticDepositUtxoRefundResponse as c0, InitiateUtxoSwapRequest as c1, InitiateUtxoSwapResponse as c2, ExitingTree as c3, ExitSingleNodeTreeSigningResult as c4, BitcoinTransactionOutput as c5, ExitSingleNodeTreesRequest as c6, ExitSingleNodeTreesResponse as c7, InvestigateLeavesRequest as c8, QueryNodesDistributionRequest as c9, QueryNodesDistributionResponse as ca, QueryNodesDistributionResponse_NodeDistributionEntry as cb, QueryNodesByValueRequest as cc, QueryNodesByValueResponse as cd, QueryNodesByValueResponse_NodesEntry as ce, GetUtxosForAddressRequest as cf, GetUtxosForAddressResponse as cg, QuerySparkInvoicesRequest as ch, InvoiceResponse as ci, SatsTransfer as cj, TokenTransfer as ck, SparkServiceDefinition as cl, type SparkServiceImplementation as cm, type DeepPartial as cn, type ServerStreamingMethodResult as co, type MessageFns as cp, SparkInvoiceFields as d, NodeSignatures as e, QuerySparkInvoicesResponse as f, TransferPackage as g, TransferStatus as h, TransferType as i, TransferLeaf as j, common as k, networkToJSON as l, directionFromJSON as m, networkFromJSON as n, directionToJSON as o, protobufPackage as p, TokenTransactionStatus as q, tokenTransactionStatusToJSON as r, spark as s, tokenTransactionStatusFromJSON as t, transferStatusFromJSON as u, transferStatusToJSON as v, transferTypeFromJSON as w, transferTypeToJSON as x, Order as y, orderFromJSON as z };
@@ -1,5 +1,5 @@
1
- import { B as BitcoinNetwork, M as MayHaveSspClientOptions, t as SspClientOptions, H as HasSspClientOptions, S as SparkSigner, l as KeyDerivation, i as SigningCommitmentWithOptionalNonce, V as VerifiableSecretShare, W as WalletTransfer, L as LeavesSwapFeeEstimateOutput, u as StaticDepositQuoteOutput, C as ClaimStaticDepositOutput, w as WalletLeaf, x as LightningReceiveRequest, y as LightningSendRequest, z as LightningSendFeeEstimateInput, E as ExitSpeed, F as CoopExitFeeQuote, G as CoopExitRequest, I as TransferWithUserRequest } from './client-DUFejFfn.cjs';
2
- import { N as Network$1, E as Empty, d as SparkServiceClient, e as SparkInvoiceFields, R as RequestedSigningCommitments, U as UserSignedTxSigningJob, c as TreeNode, b as Transfer, L as LeafRefundTxSigningResult, f as NodeSignatures, F as FinalizeNodeSignaturesResponse, Q as QueryTransfersResponse, O as OutputWithPreviousTransactionData } from './spark-CLz4-Ln8.cjs';
1
+ import { B as BitcoinNetwork, M as MayHaveSspClientOptions, t as SspClientOptions, H as HasSspClientOptions, S as SparkSigner, l as KeyDerivation, i as SigningCommitmentWithOptionalNonce, V as VerifiableSecretShare, W as WalletTransfer, L as LeavesSwapFeeEstimateOutput, u as StaticDepositQuoteOutput, C as ClaimStaticDepositOutput, w as WalletLeaf, x as LightningReceiveRequest, y as LightningSendRequest, z as LightningSendFeeEstimateInput, E as ExitSpeed, F as CoopExitFeeQuote, G as CoopExitRequest, I as TransferWithUserRequest } from './client-DWml6sjL.cjs';
2
+ import { N as Network$1, E as Empty, c as SparkServiceClient, d as SparkInvoiceFields, R as RequestedSigningCommitments, U as UserSignedTxSigningJob, b as TreeNode, T as Transfer, L as LeafRefundTxSigningResult, e as NodeSignatures, F as FinalizeNodeSignaturesResponse, Q as QueryTransfersResponse, O as OutputWithPreviousTransactionData, f as QuerySparkInvoicesResponse } from './spark-DasxuVfm.cjs';
3
3
  import { SparkTokenServiceClient, TokenMetadata, QueryTokenTransactionsResponse } from './proto/spark_token.cjs';
4
4
  import * as btc from '@scure/btc-signer';
5
5
  import { Transaction } from '@scure/btc-signer';
@@ -62,7 +62,6 @@ type ConfigOptions = MayHaveSspClientOptions & {
62
62
  readonly threshold?: number;
63
63
  readonly tokenSignatures?: "ECDSA" | "SCHNORR";
64
64
  readonly tokenValidityDurationSeconds?: number;
65
- readonly tokenTransactionVersion?: "V0" | "V1";
66
65
  readonly electrsUrl?: string;
67
66
  readonly sspClientOptions?: SspClientOptions;
68
67
  readonly expectedWithdrawBondSats?: number;
@@ -95,7 +94,6 @@ declare class WalletConfigService implements HasSspClientOptions {
95
94
  getNetworkType(): NetworkType;
96
95
  getNetworkProto(): number;
97
96
  getTokenSignatures(): "ECDSA" | "SCHNORR";
98
- getTokenTransactionVersion(): "V0" | "V1";
99
97
  getTokenValidityDurationSeconds(): number;
100
98
  getElectrsUrl(): string;
101
99
  getSspBaseUrl(): string;
@@ -200,7 +198,10 @@ declare class ConnectionManager {
200
198
  }
201
199
 
202
200
  declare const AddressNetwork: Record<NetworkType, string>;
201
+ declare const LegacyAddressNetwork: Record<NetworkType, string>;
202
+ type Bech32String = `${string}1${string}`;
203
203
  type SparkAddressFormat = `${(typeof AddressNetwork)[keyof typeof AddressNetwork]}1${string}`;
204
+ type LegacySparkAddressFormat = `${(typeof LegacyAddressNetwork)[keyof typeof LegacyAddressNetwork]}1${string}`;
204
205
  interface SparkAddressData {
205
206
  identityPublicKey: string;
206
207
  network: NetworkType;
@@ -226,19 +227,21 @@ interface DecodedSparkAddressData {
226
227
  };
227
228
  signature?: string;
228
229
  }
229
- declare function encodeSparkAddress(payload: SparkAddressData): SparkAddressFormat;
230
- declare function encodeSparkAddressWithSignature(payload: SparkAddressData, signature?: Uint8Array): SparkAddressFormat;
230
+ declare function encodeSparkAddress(payload: SparkAddressData): LegacySparkAddressFormat;
231
+ declare function encodeSparkAddressWithSignature(payload: SparkAddressData, signature?: Uint8Array): LegacySparkAddressFormat;
231
232
  declare function decodeSparkAddress(address: string, network: NetworkType): DecodedSparkAddressData;
233
+ declare function getNetworkFromSparkAddress(address: string): NetworkType;
234
+ declare function isLegacySparkAddress(address: string): address is LegacySparkAddressFormat;
232
235
  declare function isValidSparkAddress(address: string): boolean;
233
236
  declare function isValidPublicKey(publicKey: string): void;
234
237
  declare function validateSparkInvoiceFields(sparkInvoiceFields: SparkInvoiceFields): void;
235
238
  declare function validateSparkInvoiceSignature(invoice: SparkAddressFormat): void;
236
- declare function getNetworkFromSparkAddress(address: SparkAddressFormat): "MAINNET" | "REGTEST" | "SIGNET" | "TESTNET" | "LOCAL";
237
239
  declare function toProtoTimestamp(date: Date): {
238
240
  seconds: number;
239
241
  nanos: number;
240
242
  };
241
- declare function bech32mDecode(address: SparkAddressFormat): _scure_base.Bech32Decoded<string>;
243
+ declare function assertBech32(s: string): asserts s is Bech32String;
244
+ declare function bech32mDecode(address: string): _scure_base.Bech32Decoded<string>;
242
245
  declare function isSafeForNumber(bi: bigint): boolean;
243
246
 
244
247
  declare class SigningService {
@@ -275,12 +278,10 @@ declare class BaseTransferService {
275
278
  protected readonly connectionManager: ConnectionManager;
276
279
  protected readonly signingService: SigningService;
277
280
  constructor(config: WalletConfigService, connectionManager: ConnectionManager, signingService: SigningService);
278
- sendTransferTweakKey(transfer: Transfer, leaves: LeafKeyTweak[], cpfpRefundSignatureMap: Map<string, Uint8Array>, directRefundSignatureMap: Map<string, Uint8Array>, directFromCpfpRefundSignatureMap: Map<string, Uint8Array>): Promise<Transfer>;
279
281
  deliverTransferPackage(transfer: Transfer, leaves: LeafKeyTweak[], cpfpRefundSignatureMap: Map<string, Uint8Array>, directRefundSignatureMap: Map<string, Uint8Array>, directFromCpfpRefundSignatureMap: Map<string, Uint8Array>): Promise<Transfer>;
280
282
  sendTransferWithKeyTweaks(leaves: LeafKeyTweak[], receiverIdentityPubkey: Uint8Array, sparkInvoice?: SparkAddressFormat): Promise<Transfer>;
281
283
  private prepareTransferPackage;
282
- private finalizeTransfer;
283
- signRefunds(leafDataMap: Map<string, LeafRefundSigningData>, operatorSigningResults: LeafRefundTxSigningResult[], cpfpAdaptorPubKey?: Uint8Array, directAdaptorPubKey?: Uint8Array, directFromCpfpAdaptorPubKey?: Uint8Array): Promise<NodeSignatures[]>;
284
+ signRefunds(leafDataMap: Map<string, LeafRefundSigningData>, operatorSigningResults: LeafRefundTxSigningResult[]): Promise<NodeSignatures[]>;
284
285
  private prepareSendTransferKeyTweaks;
285
286
  private prepareSingleSendTransferKeyTweak;
286
287
  protected findShare(shares: VerifiableSecretShare[], operatorID: number): VerifiableSecretShare | undefined;
@@ -288,11 +289,6 @@ declare class BaseTransferService {
288
289
  }
289
290
  declare class TransferService extends BaseTransferService {
290
291
  constructor(config: WalletConfigService, connectionManager: ConnectionManager, signingService: SigningService);
291
- /**
292
- * @deprecated Use sendTransferWithKeyTweaks instead
293
- * Deprecated in v0.1.32
294
- */
295
- sendTransfer(leaves: LeafKeyTweak[], receiverIdentityPubkey: Uint8Array): Promise<Transfer>;
296
292
  claimTransfer(transfer: Transfer, leaves: LeafKeyTweak[]): Promise<FinalizeNodeSignaturesResponse>;
297
293
  queryPendingTransfers(transferIds?: string[]): Promise<QueryTransfersResponse>;
298
294
  queryAllTransfers(limit: number, offset: number): Promise<QueryTransfersResponse>;
@@ -312,15 +308,7 @@ declare class TransferService extends BaseTransferService {
312
308
  directFromCpfpSignatureMap: Map<string, Uint8Array>;
313
309
  leafDataMap: Map<string, LeafRefundSigningData>;
314
310
  }>;
315
- counterSwapSignRefund(leaves: LeafKeyTweak[], receiverIdentityPubkey: Uint8Array, expiryTime: Date, cpfpAdaptorPubKey?: Uint8Array, directAdaptorPubKey?: Uint8Array, directFromCpfpAdaptorPubKey?: Uint8Array): Promise<{
316
- transfer: Transfer;
317
- signatureMap: Map<string, Uint8Array>;
318
- directSignatureMap: Map<string, Uint8Array>;
319
- directFromCpfpSignatureMap: Map<string, Uint8Array>;
320
- leafDataMap: Map<string, LeafRefundSigningData>;
321
- signingResults: LeafRefundTxSigningResult[];
322
- }>;
323
- sendTransferSignRefundInternal(leaves: LeafKeyTweak[], receiverIdentityPubkey: Uint8Array, expiryTime: Date, forSwap: boolean, cpfpAdaptorPubKey?: Uint8Array, directAdaptorPubKey?: Uint8Array, directFromCpfpAdaptorPubKey?: Uint8Array): Promise<{
311
+ sendTransferSignRefundInternal(leaves: LeafKeyTweak[], receiverIdentityPubkey: Uint8Array, expiryTime: Date, forSwap: boolean): Promise<{
324
312
  transfer: Transfer;
325
313
  signatureMap: Map<string, Uint8Array>;
326
314
  directSignatureMap: Map<string, Uint8Array>;
@@ -903,6 +891,7 @@ declare class SparkWallet extends EventEmitter<SparkWalletEvents> {
903
891
  amount?: bigint;
904
892
  }[]): Promise<FulfillSparkInvoiceResponse>;
905
893
  private groupSparkInvoicesByPaymentType;
894
+ querySparkInvoices(invoices: string[]): Promise<QuerySparkInvoicesResponse>;
906
895
  /**
907
896
  * Gets fee estimate for sending Lightning payments.
908
897
  *
@@ -1121,4 +1110,4 @@ declare class SparkWallet extends EventEmitter<SparkWalletEvents> {
1121
1110
  private wrapSparkWalletMethodsWithTracing;
1122
1111
  }
1123
1112
 
1124
- export { type TransferWithInvoiceOutcome as A, type Bech32mTokenIdentifier as B, ConnectionManager as C, type DecodedSparkAddressData as D, type TokenInvoice as E, type FulfillSparkInvoiceResponse as F, type GroupSparkInvoicesResult as G, type DepositParams as H, type InvalidInvoice as I, type TokenBalanceMap as J, type TokenOutputsMap as K, LRC_WALLET_NETWORK as L, type TokenMetadataMap as M, Network as N, type InitWalletResponse as O, type PayLightningInvoiceParams as P, type SparkWalletProps as Q, type RawTokenIdentifierHex as R, type SparkAddressFormat as S, type TransferParams as T, type UserTokenMetadata as U, SparkWalletEvent as V, WalletConfigService as W, type SparkWalletEventType as X, type SparkWalletEvents as Y, SparkWallet as Z, WalletConfig as a, type ConfigOptions as b, type SparkAddressData as c, encodeSparkAddressWithSignature as d, encodeSparkAddress as e, decodeSparkAddress as f, isValidPublicKey as g, validateSparkInvoiceSignature as h, isValidSparkAddress as i, getNetworkFromSparkAddress as j, bech32mDecode as k, isSafeForNumber as l, type NetworkType as m, NetworkToProto as n, getNetwork as o, protoToNetwork as p, getNetworkFromAddress as q, getNetworkFromString as r, type Bech32mTokenIdentifierData as s, toProtoTimestamp as t, encodeBech32mTokenIdentifier as u, validateSparkInvoiceFields as v, decodeBech32mTokenIdentifier as w, getNetworkFromBech32mTokenIdentifier as x, type CreateLightningInvoiceParams as y, type TransferWithInvoiceParams as z };
1113
+ export { type SparkWalletEvents as $, getNetworkFromBech32mTokenIdentifier as A, type Bech32mTokenIdentifier as B, ConnectionManager as C, type DecodedSparkAddressData as D, type CreateLightningInvoiceParams as E, type TransferWithInvoiceParams as F, type TransferWithInvoiceOutcome as G, type FulfillSparkInvoiceResponse as H, type TokenInvoice as I, type InvalidInvoice as J, type GroupSparkInvoicesResult as K, type LegacySparkAddressFormat as L, type DepositParams as M, Network as N, type TokenBalanceMap as O, type PayLightningInvoiceParams as P, type TokenOutputsMap as Q, type RawTokenIdentifierHex as R, type SparkAddressFormat as S, type TransferParams as T, type UserTokenMetadata as U, type TokenMetadataMap as V, WalletConfigService as W, type InitWalletResponse as X, type SparkWalletProps as Y, SparkWalletEvent as Z, type SparkWalletEventType as _, WalletConfig as a, SparkWallet as a0, type ConfigOptions as b, type SparkAddressData as c, encodeSparkAddressWithSignature as d, encodeSparkAddress as e, decodeSparkAddress as f, getNetworkFromSparkAddress as g, isValidSparkAddress as h, isLegacySparkAddress as i, isValidPublicKey as j, validateSparkInvoiceSignature as k, assertBech32 as l, bech32mDecode as m, isSafeForNumber as n, type NetworkType as o, NetworkToProto as p, protoToNetwork as q, getNetwork as r, LRC_WALLET_NETWORK as s, toProtoTimestamp as t, getNetworkFromAddress as u, validateSparkInvoiceFields as v, getNetworkFromString as w, type Bech32mTokenIdentifierData as x, encodeBech32mTokenIdentifier as y, decodeBech32mTokenIdentifier as z };
@@ -1,5 +1,5 @@
1
- import { B as BitcoinNetwork, M as MayHaveSspClientOptions, t as SspClientOptions, H as HasSspClientOptions, S as SparkSigner, l as KeyDerivation, i as SigningCommitmentWithOptionalNonce, V as VerifiableSecretShare, W as WalletTransfer, L as LeavesSwapFeeEstimateOutput, u as StaticDepositQuoteOutput, C as ClaimStaticDepositOutput, w as WalletLeaf, x as LightningReceiveRequest, y as LightningSendRequest, z as LightningSendFeeEstimateInput, E as ExitSpeed, F as CoopExitFeeQuote, G as CoopExitRequest, I as TransferWithUserRequest } from './client-DrjQwET9.js';
2
- import { N as Network$1, E as Empty, d as SparkServiceClient, e as SparkInvoiceFields, R as RequestedSigningCommitments, U as UserSignedTxSigningJob, c as TreeNode, b as Transfer, L as LeafRefundTxSigningResult, f as NodeSignatures, F as FinalizeNodeSignaturesResponse, Q as QueryTransfersResponse, O as OutputWithPreviousTransactionData } from './spark-CLz4-Ln8.js';
1
+ import { B as BitcoinNetwork, M as MayHaveSspClientOptions, t as SspClientOptions, H as HasSspClientOptions, S as SparkSigner, l as KeyDerivation, i as SigningCommitmentWithOptionalNonce, V as VerifiableSecretShare, W as WalletTransfer, L as LeavesSwapFeeEstimateOutput, u as StaticDepositQuoteOutput, C as ClaimStaticDepositOutput, w as WalletLeaf, x as LightningReceiveRequest, y as LightningSendRequest, z as LightningSendFeeEstimateInput, E as ExitSpeed, F as CoopExitFeeQuote, G as CoopExitRequest, I as TransferWithUserRequest } from './client-DBZ43pJT.js';
2
+ import { N as Network$1, E as Empty, c as SparkServiceClient, d as SparkInvoiceFields, R as RequestedSigningCommitments, U as UserSignedTxSigningJob, b as TreeNode, T as Transfer, L as LeafRefundTxSigningResult, e as NodeSignatures, F as FinalizeNodeSignaturesResponse, Q as QueryTransfersResponse, O as OutputWithPreviousTransactionData, f as QuerySparkInvoicesResponse } from './spark-DasxuVfm.js';
3
3
  import { SparkTokenServiceClient, TokenMetadata, QueryTokenTransactionsResponse } from './proto/spark_token.js';
4
4
  import * as btc from '@scure/btc-signer';
5
5
  import { Transaction } from '@scure/btc-signer';
@@ -62,7 +62,6 @@ type ConfigOptions = MayHaveSspClientOptions & {
62
62
  readonly threshold?: number;
63
63
  readonly tokenSignatures?: "ECDSA" | "SCHNORR";
64
64
  readonly tokenValidityDurationSeconds?: number;
65
- readonly tokenTransactionVersion?: "V0" | "V1";
66
65
  readonly electrsUrl?: string;
67
66
  readonly sspClientOptions?: SspClientOptions;
68
67
  readonly expectedWithdrawBondSats?: number;
@@ -95,7 +94,6 @@ declare class WalletConfigService implements HasSspClientOptions {
95
94
  getNetworkType(): NetworkType;
96
95
  getNetworkProto(): number;
97
96
  getTokenSignatures(): "ECDSA" | "SCHNORR";
98
- getTokenTransactionVersion(): "V0" | "V1";
99
97
  getTokenValidityDurationSeconds(): number;
100
98
  getElectrsUrl(): string;
101
99
  getSspBaseUrl(): string;
@@ -200,7 +198,10 @@ declare class ConnectionManager {
200
198
  }
201
199
 
202
200
  declare const AddressNetwork: Record<NetworkType, string>;
201
+ declare const LegacyAddressNetwork: Record<NetworkType, string>;
202
+ type Bech32String = `${string}1${string}`;
203
203
  type SparkAddressFormat = `${(typeof AddressNetwork)[keyof typeof AddressNetwork]}1${string}`;
204
+ type LegacySparkAddressFormat = `${(typeof LegacyAddressNetwork)[keyof typeof LegacyAddressNetwork]}1${string}`;
204
205
  interface SparkAddressData {
205
206
  identityPublicKey: string;
206
207
  network: NetworkType;
@@ -226,19 +227,21 @@ interface DecodedSparkAddressData {
226
227
  };
227
228
  signature?: string;
228
229
  }
229
- declare function encodeSparkAddress(payload: SparkAddressData): SparkAddressFormat;
230
- declare function encodeSparkAddressWithSignature(payload: SparkAddressData, signature?: Uint8Array): SparkAddressFormat;
230
+ declare function encodeSparkAddress(payload: SparkAddressData): LegacySparkAddressFormat;
231
+ declare function encodeSparkAddressWithSignature(payload: SparkAddressData, signature?: Uint8Array): LegacySparkAddressFormat;
231
232
  declare function decodeSparkAddress(address: string, network: NetworkType): DecodedSparkAddressData;
233
+ declare function getNetworkFromSparkAddress(address: string): NetworkType;
234
+ declare function isLegacySparkAddress(address: string): address is LegacySparkAddressFormat;
232
235
  declare function isValidSparkAddress(address: string): boolean;
233
236
  declare function isValidPublicKey(publicKey: string): void;
234
237
  declare function validateSparkInvoiceFields(sparkInvoiceFields: SparkInvoiceFields): void;
235
238
  declare function validateSparkInvoiceSignature(invoice: SparkAddressFormat): void;
236
- declare function getNetworkFromSparkAddress(address: SparkAddressFormat): "MAINNET" | "REGTEST" | "SIGNET" | "TESTNET" | "LOCAL";
237
239
  declare function toProtoTimestamp(date: Date): {
238
240
  seconds: number;
239
241
  nanos: number;
240
242
  };
241
- declare function bech32mDecode(address: SparkAddressFormat): _scure_base.Bech32Decoded<string>;
243
+ declare function assertBech32(s: string): asserts s is Bech32String;
244
+ declare function bech32mDecode(address: string): _scure_base.Bech32Decoded<string>;
242
245
  declare function isSafeForNumber(bi: bigint): boolean;
243
246
 
244
247
  declare class SigningService {
@@ -275,12 +278,10 @@ declare class BaseTransferService {
275
278
  protected readonly connectionManager: ConnectionManager;
276
279
  protected readonly signingService: SigningService;
277
280
  constructor(config: WalletConfigService, connectionManager: ConnectionManager, signingService: SigningService);
278
- sendTransferTweakKey(transfer: Transfer, leaves: LeafKeyTweak[], cpfpRefundSignatureMap: Map<string, Uint8Array>, directRefundSignatureMap: Map<string, Uint8Array>, directFromCpfpRefundSignatureMap: Map<string, Uint8Array>): Promise<Transfer>;
279
281
  deliverTransferPackage(transfer: Transfer, leaves: LeafKeyTweak[], cpfpRefundSignatureMap: Map<string, Uint8Array>, directRefundSignatureMap: Map<string, Uint8Array>, directFromCpfpRefundSignatureMap: Map<string, Uint8Array>): Promise<Transfer>;
280
282
  sendTransferWithKeyTweaks(leaves: LeafKeyTweak[], receiverIdentityPubkey: Uint8Array, sparkInvoice?: SparkAddressFormat): Promise<Transfer>;
281
283
  private prepareTransferPackage;
282
- private finalizeTransfer;
283
- signRefunds(leafDataMap: Map<string, LeafRefundSigningData>, operatorSigningResults: LeafRefundTxSigningResult[], cpfpAdaptorPubKey?: Uint8Array, directAdaptorPubKey?: Uint8Array, directFromCpfpAdaptorPubKey?: Uint8Array): Promise<NodeSignatures[]>;
284
+ signRefunds(leafDataMap: Map<string, LeafRefundSigningData>, operatorSigningResults: LeafRefundTxSigningResult[]): Promise<NodeSignatures[]>;
284
285
  private prepareSendTransferKeyTweaks;
285
286
  private prepareSingleSendTransferKeyTweak;
286
287
  protected findShare(shares: VerifiableSecretShare[], operatorID: number): VerifiableSecretShare | undefined;
@@ -288,11 +289,6 @@ declare class BaseTransferService {
288
289
  }
289
290
  declare class TransferService extends BaseTransferService {
290
291
  constructor(config: WalletConfigService, connectionManager: ConnectionManager, signingService: SigningService);
291
- /**
292
- * @deprecated Use sendTransferWithKeyTweaks instead
293
- * Deprecated in v0.1.32
294
- */
295
- sendTransfer(leaves: LeafKeyTweak[], receiverIdentityPubkey: Uint8Array): Promise<Transfer>;
296
292
  claimTransfer(transfer: Transfer, leaves: LeafKeyTweak[]): Promise<FinalizeNodeSignaturesResponse>;
297
293
  queryPendingTransfers(transferIds?: string[]): Promise<QueryTransfersResponse>;
298
294
  queryAllTransfers(limit: number, offset: number): Promise<QueryTransfersResponse>;
@@ -312,15 +308,7 @@ declare class TransferService extends BaseTransferService {
312
308
  directFromCpfpSignatureMap: Map<string, Uint8Array>;
313
309
  leafDataMap: Map<string, LeafRefundSigningData>;
314
310
  }>;
315
- counterSwapSignRefund(leaves: LeafKeyTweak[], receiverIdentityPubkey: Uint8Array, expiryTime: Date, cpfpAdaptorPubKey?: Uint8Array, directAdaptorPubKey?: Uint8Array, directFromCpfpAdaptorPubKey?: Uint8Array): Promise<{
316
- transfer: Transfer;
317
- signatureMap: Map<string, Uint8Array>;
318
- directSignatureMap: Map<string, Uint8Array>;
319
- directFromCpfpSignatureMap: Map<string, Uint8Array>;
320
- leafDataMap: Map<string, LeafRefundSigningData>;
321
- signingResults: LeafRefundTxSigningResult[];
322
- }>;
323
- sendTransferSignRefundInternal(leaves: LeafKeyTweak[], receiverIdentityPubkey: Uint8Array, expiryTime: Date, forSwap: boolean, cpfpAdaptorPubKey?: Uint8Array, directAdaptorPubKey?: Uint8Array, directFromCpfpAdaptorPubKey?: Uint8Array): Promise<{
311
+ sendTransferSignRefundInternal(leaves: LeafKeyTweak[], receiverIdentityPubkey: Uint8Array, expiryTime: Date, forSwap: boolean): Promise<{
324
312
  transfer: Transfer;
325
313
  signatureMap: Map<string, Uint8Array>;
326
314
  directSignatureMap: Map<string, Uint8Array>;
@@ -903,6 +891,7 @@ declare class SparkWallet extends EventEmitter<SparkWalletEvents> {
903
891
  amount?: bigint;
904
892
  }[]): Promise<FulfillSparkInvoiceResponse>;
905
893
  private groupSparkInvoicesByPaymentType;
894
+ querySparkInvoices(invoices: string[]): Promise<QuerySparkInvoicesResponse>;
906
895
  /**
907
896
  * Gets fee estimate for sending Lightning payments.
908
897
  *
@@ -1121,4 +1110,4 @@ declare class SparkWallet extends EventEmitter<SparkWalletEvents> {
1121
1110
  private wrapSparkWalletMethodsWithTracing;
1122
1111
  }
1123
1112
 
1124
- export { type TransferWithInvoiceOutcome as A, type Bech32mTokenIdentifier as B, ConnectionManager as C, type DecodedSparkAddressData as D, type TokenInvoice as E, type FulfillSparkInvoiceResponse as F, type GroupSparkInvoicesResult as G, type DepositParams as H, type InvalidInvoice as I, type TokenBalanceMap as J, type TokenOutputsMap as K, LRC_WALLET_NETWORK as L, type TokenMetadataMap as M, Network as N, type InitWalletResponse as O, type PayLightningInvoiceParams as P, type SparkWalletProps as Q, type RawTokenIdentifierHex as R, type SparkAddressFormat as S, type TransferParams as T, type UserTokenMetadata as U, SparkWalletEvent as V, WalletConfigService as W, type SparkWalletEventType as X, type SparkWalletEvents as Y, SparkWallet as Z, WalletConfig as a, type ConfigOptions as b, type SparkAddressData as c, encodeSparkAddressWithSignature as d, encodeSparkAddress as e, decodeSparkAddress as f, isValidPublicKey as g, validateSparkInvoiceSignature as h, isValidSparkAddress as i, getNetworkFromSparkAddress as j, bech32mDecode as k, isSafeForNumber as l, type NetworkType as m, NetworkToProto as n, getNetwork as o, protoToNetwork as p, getNetworkFromAddress as q, getNetworkFromString as r, type Bech32mTokenIdentifierData as s, toProtoTimestamp as t, encodeBech32mTokenIdentifier as u, validateSparkInvoiceFields as v, decodeBech32mTokenIdentifier as w, getNetworkFromBech32mTokenIdentifier as x, type CreateLightningInvoiceParams as y, type TransferWithInvoiceParams as z };
1113
+ export { type SparkWalletEvents as $, getNetworkFromBech32mTokenIdentifier as A, type Bech32mTokenIdentifier as B, ConnectionManager as C, type DecodedSparkAddressData as D, type CreateLightningInvoiceParams as E, type TransferWithInvoiceParams as F, type TransferWithInvoiceOutcome as G, type FulfillSparkInvoiceResponse as H, type TokenInvoice as I, type InvalidInvoice as J, type GroupSparkInvoicesResult as K, type LegacySparkAddressFormat as L, type DepositParams as M, Network as N, type TokenBalanceMap as O, type PayLightningInvoiceParams as P, type TokenOutputsMap as Q, type RawTokenIdentifierHex as R, type SparkAddressFormat as S, type TransferParams as T, type UserTokenMetadata as U, type TokenMetadataMap as V, WalletConfigService as W, type InitWalletResponse as X, type SparkWalletProps as Y, SparkWalletEvent as Z, type SparkWalletEventType as _, WalletConfig as a, SparkWallet as a0, type ConfigOptions as b, type SparkAddressData as c, encodeSparkAddressWithSignature as d, encodeSparkAddress as e, decodeSparkAddress as f, getNetworkFromSparkAddress as g, isValidSparkAddress as h, isLegacySparkAddress as i, isValidPublicKey as j, validateSparkInvoiceSignature as k, assertBech32 as l, bech32mDecode as m, isSafeForNumber as n, type NetworkType as o, NetworkToProto as p, protoToNetwork as q, getNetwork as r, LRC_WALLET_NETWORK as s, toProtoTimestamp as t, getNetworkFromAddress as u, validateSparkInvoiceFields as v, getNetworkFromString as w, type Bech32mTokenIdentifierData as x, encodeBech32mTokenIdentifier as y, decodeBech32mTokenIdentifier as z };
@@ -1,4 +1,4 @@
1
- import { Z as SparkWallet, Q as SparkWalletProps } from './spark-wallet-KI68-_jO.js';
1
+ import { a0 as SparkWallet, Y as SparkWalletProps } from './spark-wallet-BoMIOPWW.cjs';
2
2
 
3
3
  declare class SparkWalletNodeJS extends SparkWallet {
4
4
  static initialize({ mnemonicOrSeed, accountNumber, signer, options, }: SparkWalletProps): Promise<{
@@ -1,4 +1,4 @@
1
- import { Z as SparkWallet, Q as SparkWalletProps } from './spark-wallet-V03V4Tgm.cjs';
1
+ import { a0 as SparkWallet, Y as SparkWalletProps } from './spark-wallet-jlC0XN5f.js';
2
2
 
3
3
  declare class SparkWalletNodeJS extends SparkWallet {
4
4
  static initialize({ mnemonicOrSeed, accountNumber, signer, options, }: SparkWalletProps): Promise<{