@buildonspark/spark-sdk 0.3.6 → 0.3.7

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 (70) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/bare/index.cjs +9240 -9125
  3. package/dist/bare/index.d.cts +14 -11
  4. package/dist/bare/index.d.ts +14 -11
  5. package/dist/bare/index.js +3917 -3802
  6. package/dist/{chunk-XPHYQ2L6.js → chunk-KDEVNW7C.js} +4895 -4779
  7. package/dist/{chunk-LIZFXQWK.js → chunk-P4HYYSMU.js} +1 -1
  8. package/dist/{chunk-EHKP3Y65.js → chunk-SRPKOCG4.js} +1 -2
  9. package/dist/{chunk-FJ7LTA2O.js → chunk-UYTT3C6H.js} +1 -1
  10. package/dist/{client-AHn11NHe.d.cts → client-Bcb7TUIp.d.cts} +11 -9
  11. package/dist/{client-GOlkXliC.d.ts → client-D9T58OY8.d.ts} +11 -9
  12. package/dist/debug.cjs +1852 -1738
  13. package/dist/debug.d.cts +4 -4
  14. package/dist/debug.d.ts +4 -4
  15. package/dist/debug.js +2 -2
  16. package/dist/graphql/objects/index.d.cts +2 -2
  17. package/dist/graphql/objects/index.d.ts +2 -2
  18. package/dist/index.cjs +174 -58
  19. package/dist/index.d.cts +5 -5
  20. package/dist/index.d.ts +5 -5
  21. package/dist/index.js +3 -3
  22. package/dist/index.node.cjs +174 -57
  23. package/dist/index.node.d.cts +5 -5
  24. package/dist/index.node.d.ts +5 -5
  25. package/dist/index.node.js +2 -2
  26. package/dist/{logging-D7ukPwRA.d.ts → logging-JIaZZIbR.d.ts} +2 -2
  27. package/dist/{logging-CW3kwBaM.d.cts → logging-zkr4UlOi.d.cts} +2 -2
  28. package/dist/native/{index.cjs → index.react-native.cjs} +182 -62
  29. package/dist/native/{index.d.cts → index.react-native.d.cts} +19 -15
  30. package/dist/native/{index.d.ts → index.react-native.d.ts} +19 -15
  31. package/dist/native/{index.js → index.react-native.js} +179 -60
  32. package/dist/{spark-wallet-NxG55m7K.d.cts → spark-wallet-BuFrUWeE.d.cts} +4 -3
  33. package/dist/{spark-wallet-jwNvWvpK.d.ts → spark-wallet-CE5PYiIb.d.ts} +4 -3
  34. package/dist/{spark-wallet.browser-Cg4fB-Nm.d.ts → spark-wallet.browser-BwYkkOBU.d.ts} +1 -1
  35. package/dist/{spark-wallet.browser-Db7Y95Kt.d.cts → spark-wallet.browser-DC3jdQPW.d.cts} +1 -1
  36. package/dist/{spark-wallet.node-DB3ZqtJG.d.ts → spark-wallet.node-C9d2W-Nb.d.ts} +1 -1
  37. package/dist/{spark-wallet.node-HEG2ahNd.d.cts → spark-wallet.node-CR_zNxmy.d.cts} +1 -1
  38. package/dist/tests/test-utils.cjs +168 -51
  39. package/dist/tests/test-utils.d.cts +4 -4
  40. package/dist/tests/test-utils.d.ts +4 -4
  41. package/dist/tests/test-utils.js +4 -4
  42. package/dist/{token-transactions-B2-BO7Oz.d.ts → token-transactions-BZoJuvuE.d.ts} +1 -1
  43. package/dist/{token-transactions-BAN68xwg.d.cts → token-transactions-I_OFIoNH.d.cts} +1 -1
  44. package/dist/types/index.d.cts +1 -1
  45. package/dist/types/index.d.ts +1 -1
  46. package/package.json +14 -4
  47. package/src/graphql/client.ts +6 -9
  48. package/src/graphql/mutations/CompleteCoopExit.ts +1 -1
  49. package/src/graphql/mutations/RequestCoopExit.ts +3 -1
  50. package/src/graphql/mutations/RequestLightningSend.ts +3 -1
  51. package/src/graphql/objects/CompleteCoopExitInput.ts +22 -33
  52. package/src/graphql/objects/RequestCoopExitInput.ts +39 -45
  53. package/src/graphql/objects/RequestLightningSendInput.ts +31 -39
  54. package/src/index.react-native.ts +21 -0
  55. package/src/services/config.ts +2 -2
  56. package/src/services/connection/connection.ts +10 -0
  57. package/src/services/coop-exit.ts +5 -1
  58. package/src/services/token-transactions.ts +8 -8
  59. package/src/spark-wallet/spark-wallet.browser.ts +0 -1
  60. package/src/spark-wallet/spark-wallet.react-native.ts +5 -3
  61. package/src/spark-wallet/spark-wallet.ts +56 -9
  62. package/src/tests/integration/coop-exit.test.ts +2 -0
  63. package/src/tests/integration/lightning.test.ts +5 -1
  64. package/src/tests/integration/ssp/coop-exit-validation.test.ts +5 -6
  65. package/src/tests/integration/ssp/static_deposit.test.ts +45 -35
  66. package/src/tests/optimize.test.ts +45 -0
  67. package/src/tests/token-outputs.test.ts +60 -1
  68. package/src/tests/utils/test-faucet.ts +12 -8
  69. package/src/utils/optimize.ts +226 -0
  70. package/src/native/index.ts +0 -21
@@ -3301,7 +3301,7 @@ interface ClaimStaticDepositOutput {
3301
3301
 
3302
3302
  interface CompleteCoopExitInput {
3303
3303
  userOutboundTransferExternalId: string;
3304
- coopExitRequestId: string;
3304
+ coopExitRequestId?: string | undefined;
3305
3305
  }
3306
3306
 
3307
3307
  interface CompleteLeavesSwapInput {
@@ -3389,11 +3389,12 @@ interface LightningSendFeeEstimateOutput {
3389
3389
  interface RequestCoopExitInput {
3390
3390
  leafExternalIds: string[];
3391
3391
  withdrawalAddress: string;
3392
- idempotencyKey: string;
3392
+ idempotencyKey?: string | undefined;
3393
3393
  exitSpeed: ExitSpeed;
3394
3394
  withdrawAll: boolean;
3395
3395
  feeLeafExternalIds?: string[] | undefined;
3396
3396
  feeQuoteId?: string | undefined;
3397
+ userOutboundTransferExternalId?: string | undefined;
3397
3398
  }
3398
3399
 
3399
3400
  interface UserLeafInput {
@@ -3453,12 +3454,13 @@ interface RequestLightningReceiveInput {
3453
3454
 
3454
3455
  interface RequestLightningSendInput {
3455
3456
  encodedInvoice: string;
3456
- idempotencyKey: string;
3457
+ idempotencyKey?: string | undefined;
3457
3458
  /**
3458
- * The amount you will pay for this invoice in sats. It should ONLY be set when the invoice amount is
3459
- * zero.
3460
- **/
3459
+ * The amount you will pay for this invoice in sats. It should ONLY be set when the invoice amount is
3460
+ * zero.
3461
+ **/
3461
3462
  amountSats?: number | undefined;
3463
+ userOutboundTransferExternalId?: string | undefined;
3462
3464
  }
3463
3465
 
3464
3466
  interface StaticDepositQuoteInput {
@@ -3515,10 +3517,10 @@ declare class SspClient {
3515
3517
  getLightningSendFeeEstimate(encodedInvoice: string, amountSats?: number): Promise<LightningSendFeeEstimateOutput | null>;
3516
3518
  getCoopExitFeeEstimate({ leafExternalIds, withdrawalAddress, }: CoopExitFeeEstimatesInput): Promise<CoopExitFeeEstimatesOutput | null>;
3517
3519
  getCurrentUser(): Promise<void>;
3518
- completeCoopExit({ userOutboundTransferExternalId, coopExitRequestId, }: CompleteCoopExitInput): Promise<CoopExitRequest | null>;
3519
- requestCoopExit({ leafExternalIds, withdrawalAddress, idempotencyKey, exitSpeed, feeLeafExternalIds, feeQuoteId, withdrawAll, }: RequestCoopExitInput): Promise<CoopExitRequest | null>;
3520
+ completeCoopExit({ userOutboundTransferExternalId, }: CompleteCoopExitInput): Promise<CoopExitRequest | null>;
3521
+ requestCoopExit({ leafExternalIds, withdrawalAddress, exitSpeed, feeLeafExternalIds, feeQuoteId, withdrawAll, userOutboundTransferExternalId, }: RequestCoopExitInput): Promise<CoopExitRequest | null>;
3520
3522
  requestLightningReceive({ amountSats, network, paymentHash, expirySecs, memo, includeSparkAddress, receiverIdentityPubkey, descriptionHash, }: RequestLightningReceiveInput): Promise<LightningReceiveRequest | null>;
3521
- requestLightningSend({ encodedInvoice, idempotencyKey, amountSats, }: RequestLightningSendInput): Promise<LightningSendRequest | null>;
3523
+ requestLightningSend({ encodedInvoice, amountSats, userOutboundTransferExternalId, }: RequestLightningSendInput): Promise<LightningSendRequest | null>;
3522
3524
  requestLeaveSwap({ adaptorPubkey, directAdaptorPubkey, directFromCpfpAdaptorPubkey, totalAmountSats, targetAmountSats, feeSats, userLeaves, idempotencyKey, targetAmountSatsList, }: RequestLeavesSwapInput): Promise<LeavesSwapRequest | null>;
3523
3525
  completeLeaveSwap({ adaptorSecretKey, directAdaptorSecretKey, directFromCpfpAdaptorSecretKey, userOutboundTransferExternalId, leavesSwapRequestId, }: CompleteLeavesSwapInput): Promise<LeavesSwapRequest | null>;
3524
3526
  getLightningReceiveRequest(id: string): Promise<LightningReceiveRequest | null>;
@@ -3578,7 +3580,7 @@ declare class WalletConfigService implements HasSspClientOptions {
3578
3580
  private readonly config;
3579
3581
  readonly signer: SparkSigner;
3580
3582
  readonly sspClientOptions: SspClientOptions;
3581
- constructor(options?: ConfigOptions, signer?: SparkSigner);
3583
+ constructor(options: ConfigOptions | undefined, signer: SparkSigner);
3582
3584
  private getDefaultConfig;
3583
3585
  getCoordinatorAddress(): string;
3584
3586
  getSigningOperators(): Readonly<Record<string, SigningOperator>>;
@@ -3849,10 +3851,11 @@ declare abstract class SparkWallet extends EventEmitter<SparkWalletEvents> {
3849
3851
  protected tokenOutputs: TokenOutputsMap;
3850
3852
  private claimTransfersInterval;
3851
3853
  private tracer;
3852
- constructor(options?: ConfigOptions, signer?: SparkSigner);
3854
+ constructor(options?: ConfigOptions, signerArg?: SparkSigner);
3853
3855
  static initialize<T extends SparkWallet>(this: new (options?: ConfigOptions, signer?: SparkSigner) => T, { mnemonicOrSeed, accountNumber, signer, options }: SparkWalletProps): Promise<InitWalletResponse<T>>;
3854
3856
  private createClientsAndSyncWallet;
3855
3857
  private getSspClient;
3858
+ protected buildSigner(): DefaultSparkSigner;
3856
3859
  protected buildConnectionManager(config: WalletConfigService): ConnectionManager;
3857
3860
  private handleStreamEvent;
3858
3861
  protected setupBackgroundStream(): Promise<void>;
@@ -4742,6 +4745,11 @@ declare class ConnectionManagerBrowser extends ConnectionManager {
4742
4745
  }>;
4743
4746
  }
4744
4747
 
4748
+ declare class SparkWalletReactNative extends SparkWallet {
4749
+ protected buildSigner(): ReactNativeSparkSigner;
4750
+ protected buildConnectionManager(config: WalletConfigService): ConnectionManagerBrowser;
4751
+ }
4752
+
4745
4753
  interface FetchOwnedTokenOutputsParams {
4746
4754
  ownerPublicKeys: Uint8Array[];
4747
4755
  issuerPublicKeys?: Uint8Array[];
@@ -4787,8 +4795,4 @@ declare class TokenTransactionService {
4787
4795
  private createSignaturesForOperators;
4788
4796
  }
4789
4797
 
4790
- declare class SparkWalletReactNative extends SparkWallet {
4791
- protected buildConnectionManager(config: WalletConfigService): ConnectionManagerBrowser;
4792
- }
4793
-
4794
4798
  export { AuthenticationError, ConnectionManager as BaseConnectionManager, type Bech32mTokenIdentifier, type Bech32mTokenIdentifierData, type BroadcastConfig, type BroadcastResult, type ConfigOptions, ConfigurationError, ConnectionManagerBrowser as ConnectionManager, type CreateLightningInvoiceParams, DEFAULT_FEE_SATS, DIRECT_TIMELOCK_OFFSET, type DecodedSparkAddressData, ReactNativeSparkSigner as DefaultSparkSigner, type DepositParams, type FeeBumpTxChain, type FeeBumpTxPackage, type FeeRate, type FulfillSparkInvoiceResponse, type GroupSparkInvoicesResult, INITIAL_DIRECT_SEQUENCE, INITIAL_SEQUENCE, type InitWalletResponse, InternalValidationError, type InvalidInvoice, LOGGER_NAMES, type LeafInfo, type LegacySparkAddressFormat, type LoggerName, Network, NetworkError, NetworkToProto, type NetworkType, NotImplementedError, type PayLightningInvoiceParams, RPCError, type RawTokenIdentifierHex, ReactNativeSparkSigner, type SparkAddressData, type SparkAddressFormat, SparkSDKError, SparkSdkLogger, SparkWalletReactNative as SparkWallet, SparkWalletEvent, type SparkWalletEventType, type SparkWalletEvents, type SparkWalletProps, TEST_UNILATERAL_DIRECT_SEQUENCE, TEST_UNILATERAL_SEQUENCE, type TokenBalanceMap, type TokenInvoice, type TokenMetadataMap, type TokenOutputsMap, TokenTransactionService, type TransferParams, type TransferWithInvoiceOutcome, type TransferWithInvoiceParams, type TxChain, type UserTokenMetadata, type Utxo, ValidationError, type VerifiableSecretShare, WalletConfig, WalletConfigService, addPrivateKeys, addPublicKeys, applyAdaptorToSignature, applyAdditiveTweakToPublicKey, assertBech32, bech32mDecode, bigIntToPrivateKey, checkIfSelectedOutputsAreAvailable, checkIfValidSequence, collectResponses, computeTaprootKeyNoScript, computerLagrangeCoefficients, constructFeeBumpTx, constructUnilateralExitFeeBumpPackages, constructUnilateralExitTxs, createConnectorRefundTransactions, createLeafNodeTx, createNodeTx, createNodeTxs, createRefundTx, createRefundTxs, createRootTx, createSigningCommitment, createSigningNonce, createSplitTx, decodeBech32mTokenIdentifier, decodeBytesToSigningCommitment, decodeBytesToSigningNonce, decodeSparkAddress, doesLeafNeedRefresh, encodeBech32mTokenIdentifier, encodeSigningCommitmentToBytes, encodeSigningNonceToBytes, encodeSparkAddress, encodeSparkAddressWithSignature, evaluatePolynomial, fieldDiv, filterTokenBalanceForTokenIdentifier, generateAdaptorFromSignature, generatePolynomialForSecretSharing, generateSignatureFromExistingAdaptor, getCurrentTimelock, getEphemeralAnchorOutput, getLatestDepositTxId, getNetwork, getNetworkFromAddress, getNetworkFromBech32mTokenIdentifier, getNetworkFromSparkAddress, getNetworkFromString, getNextTransactionSequence, getP2TRAddressFromPkScript, getP2TRAddressFromPublicKey, getP2TRScriptFromPublicKey, getP2WPKHAddressFromPublicKey, getRandomBigInt, getRandomSigningNonce, getSigHashFromTx, getSigningCommitmentFromNonce, getSparkAddressFromTaproot, getTransactionSequence, getTransferPackageSigningPayload, getTxEstimatedVbytesSizeByNumberOfInputsOutputs, getTxFromRawTxBytes, getTxFromRawTxHex, getTxId, getTxIdNoReverse, isEphemeralAnchorOutput, isLegacySparkAddress, isSafeForNumber, isTxBroadcast, isValidPublicKey, isValidSparkAddress, lastKeyWithTarget, maybeApplyFee, modInverse, proofOfPossessionMessageHashForDepositAddress, protoToNetwork, recoverSecret, splitSecret, splitSecretWithProofs, subtractPrivateKeys, subtractPublicKeys, sumAvailableTokens, sumOfPrivateKeys, toProtoTimestamp, validateOutboundAdaptorSignature, validateShare, validateSparkInvoiceFields, validateSparkInvoiceSignature };
@@ -3301,7 +3301,7 @@ interface ClaimStaticDepositOutput {
3301
3301
 
3302
3302
  interface CompleteCoopExitInput {
3303
3303
  userOutboundTransferExternalId: string;
3304
- coopExitRequestId: string;
3304
+ coopExitRequestId?: string | undefined;
3305
3305
  }
3306
3306
 
3307
3307
  interface CompleteLeavesSwapInput {
@@ -3389,11 +3389,12 @@ interface LightningSendFeeEstimateOutput {
3389
3389
  interface RequestCoopExitInput {
3390
3390
  leafExternalIds: string[];
3391
3391
  withdrawalAddress: string;
3392
- idempotencyKey: string;
3392
+ idempotencyKey?: string | undefined;
3393
3393
  exitSpeed: ExitSpeed;
3394
3394
  withdrawAll: boolean;
3395
3395
  feeLeafExternalIds?: string[] | undefined;
3396
3396
  feeQuoteId?: string | undefined;
3397
+ userOutboundTransferExternalId?: string | undefined;
3397
3398
  }
3398
3399
 
3399
3400
  interface UserLeafInput {
@@ -3453,12 +3454,13 @@ interface RequestLightningReceiveInput {
3453
3454
 
3454
3455
  interface RequestLightningSendInput {
3455
3456
  encodedInvoice: string;
3456
- idempotencyKey: string;
3457
+ idempotencyKey?: string | undefined;
3457
3458
  /**
3458
- * The amount you will pay for this invoice in sats. It should ONLY be set when the invoice amount is
3459
- * zero.
3460
- **/
3459
+ * The amount you will pay for this invoice in sats. It should ONLY be set when the invoice amount is
3460
+ * zero.
3461
+ **/
3461
3462
  amountSats?: number | undefined;
3463
+ userOutboundTransferExternalId?: string | undefined;
3462
3464
  }
3463
3465
 
3464
3466
  interface StaticDepositQuoteInput {
@@ -3515,10 +3517,10 @@ declare class SspClient {
3515
3517
  getLightningSendFeeEstimate(encodedInvoice: string, amountSats?: number): Promise<LightningSendFeeEstimateOutput | null>;
3516
3518
  getCoopExitFeeEstimate({ leafExternalIds, withdrawalAddress, }: CoopExitFeeEstimatesInput): Promise<CoopExitFeeEstimatesOutput | null>;
3517
3519
  getCurrentUser(): Promise<void>;
3518
- completeCoopExit({ userOutboundTransferExternalId, coopExitRequestId, }: CompleteCoopExitInput): Promise<CoopExitRequest | null>;
3519
- requestCoopExit({ leafExternalIds, withdrawalAddress, idempotencyKey, exitSpeed, feeLeafExternalIds, feeQuoteId, withdrawAll, }: RequestCoopExitInput): Promise<CoopExitRequest | null>;
3520
+ completeCoopExit({ userOutboundTransferExternalId, }: CompleteCoopExitInput): Promise<CoopExitRequest | null>;
3521
+ requestCoopExit({ leafExternalIds, withdrawalAddress, exitSpeed, feeLeafExternalIds, feeQuoteId, withdrawAll, userOutboundTransferExternalId, }: RequestCoopExitInput): Promise<CoopExitRequest | null>;
3520
3522
  requestLightningReceive({ amountSats, network, paymentHash, expirySecs, memo, includeSparkAddress, receiverIdentityPubkey, descriptionHash, }: RequestLightningReceiveInput): Promise<LightningReceiveRequest | null>;
3521
- requestLightningSend({ encodedInvoice, idempotencyKey, amountSats, }: RequestLightningSendInput): Promise<LightningSendRequest | null>;
3523
+ requestLightningSend({ encodedInvoice, amountSats, userOutboundTransferExternalId, }: RequestLightningSendInput): Promise<LightningSendRequest | null>;
3522
3524
  requestLeaveSwap({ adaptorPubkey, directAdaptorPubkey, directFromCpfpAdaptorPubkey, totalAmountSats, targetAmountSats, feeSats, userLeaves, idempotencyKey, targetAmountSatsList, }: RequestLeavesSwapInput): Promise<LeavesSwapRequest | null>;
3523
3525
  completeLeaveSwap({ adaptorSecretKey, directAdaptorSecretKey, directFromCpfpAdaptorSecretKey, userOutboundTransferExternalId, leavesSwapRequestId, }: CompleteLeavesSwapInput): Promise<LeavesSwapRequest | null>;
3524
3526
  getLightningReceiveRequest(id: string): Promise<LightningReceiveRequest | null>;
@@ -3578,7 +3580,7 @@ declare class WalletConfigService implements HasSspClientOptions {
3578
3580
  private readonly config;
3579
3581
  readonly signer: SparkSigner;
3580
3582
  readonly sspClientOptions: SspClientOptions;
3581
- constructor(options?: ConfigOptions, signer?: SparkSigner);
3583
+ constructor(options: ConfigOptions | undefined, signer: SparkSigner);
3582
3584
  private getDefaultConfig;
3583
3585
  getCoordinatorAddress(): string;
3584
3586
  getSigningOperators(): Readonly<Record<string, SigningOperator>>;
@@ -3849,10 +3851,11 @@ declare abstract class SparkWallet extends EventEmitter<SparkWalletEvents> {
3849
3851
  protected tokenOutputs: TokenOutputsMap;
3850
3852
  private claimTransfersInterval;
3851
3853
  private tracer;
3852
- constructor(options?: ConfigOptions, signer?: SparkSigner);
3854
+ constructor(options?: ConfigOptions, signerArg?: SparkSigner);
3853
3855
  static initialize<T extends SparkWallet>(this: new (options?: ConfigOptions, signer?: SparkSigner) => T, { mnemonicOrSeed, accountNumber, signer, options }: SparkWalletProps): Promise<InitWalletResponse<T>>;
3854
3856
  private createClientsAndSyncWallet;
3855
3857
  private getSspClient;
3858
+ protected buildSigner(): DefaultSparkSigner;
3856
3859
  protected buildConnectionManager(config: WalletConfigService): ConnectionManager;
3857
3860
  private handleStreamEvent;
3858
3861
  protected setupBackgroundStream(): Promise<void>;
@@ -4742,6 +4745,11 @@ declare class ConnectionManagerBrowser extends ConnectionManager {
4742
4745
  }>;
4743
4746
  }
4744
4747
 
4748
+ declare class SparkWalletReactNative extends SparkWallet {
4749
+ protected buildSigner(): ReactNativeSparkSigner;
4750
+ protected buildConnectionManager(config: WalletConfigService): ConnectionManagerBrowser;
4751
+ }
4752
+
4745
4753
  interface FetchOwnedTokenOutputsParams {
4746
4754
  ownerPublicKeys: Uint8Array[];
4747
4755
  issuerPublicKeys?: Uint8Array[];
@@ -4787,8 +4795,4 @@ declare class TokenTransactionService {
4787
4795
  private createSignaturesForOperators;
4788
4796
  }
4789
4797
 
4790
- declare class SparkWalletReactNative extends SparkWallet {
4791
- protected buildConnectionManager(config: WalletConfigService): ConnectionManagerBrowser;
4792
- }
4793
-
4794
4798
  export { AuthenticationError, ConnectionManager as BaseConnectionManager, type Bech32mTokenIdentifier, type Bech32mTokenIdentifierData, type BroadcastConfig, type BroadcastResult, type ConfigOptions, ConfigurationError, ConnectionManagerBrowser as ConnectionManager, type CreateLightningInvoiceParams, DEFAULT_FEE_SATS, DIRECT_TIMELOCK_OFFSET, type DecodedSparkAddressData, ReactNativeSparkSigner as DefaultSparkSigner, type DepositParams, type FeeBumpTxChain, type FeeBumpTxPackage, type FeeRate, type FulfillSparkInvoiceResponse, type GroupSparkInvoicesResult, INITIAL_DIRECT_SEQUENCE, INITIAL_SEQUENCE, type InitWalletResponse, InternalValidationError, type InvalidInvoice, LOGGER_NAMES, type LeafInfo, type LegacySparkAddressFormat, type LoggerName, Network, NetworkError, NetworkToProto, type NetworkType, NotImplementedError, type PayLightningInvoiceParams, RPCError, type RawTokenIdentifierHex, ReactNativeSparkSigner, type SparkAddressData, type SparkAddressFormat, SparkSDKError, SparkSdkLogger, SparkWalletReactNative as SparkWallet, SparkWalletEvent, type SparkWalletEventType, type SparkWalletEvents, type SparkWalletProps, TEST_UNILATERAL_DIRECT_SEQUENCE, TEST_UNILATERAL_SEQUENCE, type TokenBalanceMap, type TokenInvoice, type TokenMetadataMap, type TokenOutputsMap, TokenTransactionService, type TransferParams, type TransferWithInvoiceOutcome, type TransferWithInvoiceParams, type TxChain, type UserTokenMetadata, type Utxo, ValidationError, type VerifiableSecretShare, WalletConfig, WalletConfigService, addPrivateKeys, addPublicKeys, applyAdaptorToSignature, applyAdditiveTweakToPublicKey, assertBech32, bech32mDecode, bigIntToPrivateKey, checkIfSelectedOutputsAreAvailable, checkIfValidSequence, collectResponses, computeTaprootKeyNoScript, computerLagrangeCoefficients, constructFeeBumpTx, constructUnilateralExitFeeBumpPackages, constructUnilateralExitTxs, createConnectorRefundTransactions, createLeafNodeTx, createNodeTx, createNodeTxs, createRefundTx, createRefundTxs, createRootTx, createSigningCommitment, createSigningNonce, createSplitTx, decodeBech32mTokenIdentifier, decodeBytesToSigningCommitment, decodeBytesToSigningNonce, decodeSparkAddress, doesLeafNeedRefresh, encodeBech32mTokenIdentifier, encodeSigningCommitmentToBytes, encodeSigningNonceToBytes, encodeSparkAddress, encodeSparkAddressWithSignature, evaluatePolynomial, fieldDiv, filterTokenBalanceForTokenIdentifier, generateAdaptorFromSignature, generatePolynomialForSecretSharing, generateSignatureFromExistingAdaptor, getCurrentTimelock, getEphemeralAnchorOutput, getLatestDepositTxId, getNetwork, getNetworkFromAddress, getNetworkFromBech32mTokenIdentifier, getNetworkFromSparkAddress, getNetworkFromString, getNextTransactionSequence, getP2TRAddressFromPkScript, getP2TRAddressFromPublicKey, getP2TRScriptFromPublicKey, getP2WPKHAddressFromPublicKey, getRandomBigInt, getRandomSigningNonce, getSigHashFromTx, getSigningCommitmentFromNonce, getSparkAddressFromTaproot, getTransactionSequence, getTransferPackageSigningPayload, getTxEstimatedVbytesSizeByNumberOfInputsOutputs, getTxFromRawTxBytes, getTxFromRawTxHex, getTxId, getTxIdNoReverse, isEphemeralAnchorOutput, isLegacySparkAddress, isSafeForNumber, isTxBroadcast, isValidPublicKey, isValidSparkAddress, lastKeyWithTarget, maybeApplyFee, modInverse, proofOfPossessionMessageHashForDepositAddress, protoToNetwork, recoverSecret, splitSecret, splitSecretWithProofs, subtractPrivateKeys, subtractPublicKeys, sumAvailableTokens, sumOfPrivateKeys, toProtoTimestamp, validateOutboundAdaptorSignature, validateShare, validateSparkInvoiceFields, validateSparkInvoiceSignature };