@swapkit/toolboxes 6.3.0 → 6.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/chunk-1shb645r.js +1 -0
  3. package/dist/{chunk-exyqap7m.js → chunk-pz8xe0qj.js} +1 -1
  4. package/dist/{chunk-xdkdc1f0.js → chunk-qk8kg62t.js} +1 -1
  5. package/dist/chunk-vdabez6b.js +2 -0
  6. package/dist/src/aleo/index.js +1 -1
  7. package/dist/src/aptos/index.js +1 -1
  8. package/dist/src/cardano/index.js +1 -1
  9. package/dist/src/cosmos/index.js +1 -1
  10. package/dist/src/evm/index.js +1 -1
  11. package/dist/src/hypercore/index.js +1 -1
  12. package/dist/src/index.js +1 -1
  13. package/dist/src/lightspark/index.js +1 -0
  14. package/dist/src/near/index.js +1 -1
  15. package/dist/src/radix/index.js +1 -1
  16. package/dist/src/ripple/index.js +1 -1
  17. package/dist/src/solana/index.js +1 -1
  18. package/dist/src/starknet/index.js +1 -1
  19. package/dist/src/stellar/index.js +1 -1
  20. package/dist/src/substrate/index.js +1 -1
  21. package/dist/src/sui/index.js +1 -1
  22. package/dist/src/ton/index.js +1 -1
  23. package/dist/src/tron/index.js +1 -1
  24. package/dist/src/utxo/index.js +1 -1
  25. package/dist/types/evm/helpers.d.ts +4 -0
  26. package/dist/types/evm/toolbox/baseEVMToolbox.d.ts +1 -1
  27. package/dist/types/evm/toolbox/evm.d.ts +24 -24
  28. package/dist/types/evm/toolbox/op.d.ts +2 -2
  29. package/dist/types/hypercore/payin.d.ts +0 -1
  30. package/dist/types/lightspark/__tests__/vendorMissing.probe.d.ts +1 -0
  31. package/dist/types/lightspark/helpers.d.ts +13 -0
  32. package/dist/types/lightspark/index.d.ts +3 -0
  33. package/dist/types/lightspark/invoiceAssert.d.ts +18 -0
  34. package/dist/types/lightspark/toolbox.d.ts +13 -0
  35. package/dist/types/lightspark/types.d.ts +196 -0
  36. package/dist/types/starknet/types.d.ts +1 -0
  37. package/dist/types/sui/__tests__/grpcClientMock.d.ts +37 -0
  38. package/package.json +6 -2
  39. package/dist/chunk-ncc6qmj6.js +0 -1
  40. package/dist/chunk-ygq25ce3.js +0 -2
@@ -172,7 +172,7 @@ export declare function ETHToolbox(params: EVMToolboxParams): {
172
172
  chainId?: bigint;
173
173
  }) => Promise<import("ethers").Authorization>) | undefined;
174
174
  signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
175
- signTypedData: (({ domain, types, value }: import("..").SignTypedDataParams) => Promise<string>) | undefined;
175
+ signTypedData: ((params: import("..").SignTypedDataParams) => Promise<string>) | undefined;
176
176
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("..").EVMTransferParams) => Promise<string>;
177
177
  validateAddress: typeof import("./baseEVMToolbox").validateEVMAddress;
178
178
  };
@@ -344,7 +344,7 @@ export declare const ADIToolbox: ({ provider, ...toolboxParams }: EVMToolboxPara
344
344
  chainId?: bigint;
345
345
  }) => Promise<import("ethers").Authorization>) | undefined;
346
346
  signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
347
- signTypedData: (({ domain, types, value }: import("..").SignTypedDataParams) => Promise<string>) | undefined;
347
+ signTypedData: ((params: import("..").SignTypedDataParams) => Promise<string>) | undefined;
348
348
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("..").EVMTransferParams) => Promise<string>;
349
349
  validateAddress: typeof import("./baseEVMToolbox").validateEVMAddress;
350
350
  };
@@ -516,7 +516,7 @@ export declare const ARBToolbox: ({ provider, ...toolboxParams }: EVMToolboxPara
516
516
  chainId?: bigint;
517
517
  }) => Promise<import("ethers").Authorization>) | undefined;
518
518
  signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
519
- signTypedData: (({ domain, types, value }: import("..").SignTypedDataParams) => Promise<string>) | undefined;
519
+ signTypedData: ((params: import("..").SignTypedDataParams) => Promise<string>) | undefined;
520
520
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("..").EVMTransferParams) => Promise<string>;
521
521
  validateAddress: typeof import("./baseEVMToolbox").validateEVMAddress;
522
522
  };
@@ -688,7 +688,7 @@ export declare const ARCToolbox: ({ provider, ...toolboxParams }: EVMToolboxPara
688
688
  chainId?: bigint;
689
689
  }) => Promise<import("ethers").Authorization>) | undefined;
690
690
  signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
691
- signTypedData: (({ domain, types, value }: import("..").SignTypedDataParams) => Promise<string>) | undefined;
691
+ signTypedData: ((params: import("..").SignTypedDataParams) => Promise<string>) | undefined;
692
692
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("..").EVMTransferParams) => Promise<string>;
693
693
  validateAddress: typeof import("./baseEVMToolbox").validateEVMAddress;
694
694
  };
@@ -860,7 +860,7 @@ export declare const AURORAToolbox: ({ provider, ...toolboxParams }: EVMToolboxP
860
860
  chainId?: bigint;
861
861
  }) => Promise<import("ethers").Authorization>) | undefined;
862
862
  signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
863
- signTypedData: (({ domain, types, value }: import("..").SignTypedDataParams) => Promise<string>) | undefined;
863
+ signTypedData: ((params: import("..").SignTypedDataParams) => Promise<string>) | undefined;
864
864
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("..").EVMTransferParams) => Promise<string>;
865
865
  validateAddress: typeof import("./baseEVMToolbox").validateEVMAddress;
866
866
  };
@@ -1032,7 +1032,7 @@ export declare const AVAXToolbox: ({ provider, ...toolboxParams }: EVMToolboxPar
1032
1032
  chainId?: bigint;
1033
1033
  }) => Promise<import("ethers").Authorization>) | undefined;
1034
1034
  signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
1035
- signTypedData: (({ domain, types, value }: import("..").SignTypedDataParams) => Promise<string>) | undefined;
1035
+ signTypedData: ((params: import("..").SignTypedDataParams) => Promise<string>) | undefined;
1036
1036
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("..").EVMTransferParams) => Promise<string>;
1037
1037
  validateAddress: typeof import("./baseEVMToolbox").validateEVMAddress;
1038
1038
  };
@@ -1210,7 +1210,7 @@ export declare const BASEToolbox: ({ provider, ...toolboxSignerParams }: EVMTool
1210
1210
  chainId?: bigint;
1211
1211
  }) => Promise<import("ethers").Authorization>) | undefined;
1212
1212
  signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
1213
- signTypedData: (({ domain, types, value }: import("..").SignTypedDataParams) => Promise<string>) | undefined;
1213
+ signTypedData: ((params: import("..").SignTypedDataParams) => Promise<string>) | undefined;
1214
1214
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("..").EVMTransferParams) => Promise<string>;
1215
1215
  validateAddress: typeof import("./baseEVMToolbox").validateEVMAddress;
1216
1216
  };
@@ -1382,7 +1382,7 @@ export declare const BERAToolbox: ({ provider, ...toolboxParams }: EVMToolboxPar
1382
1382
  chainId?: bigint;
1383
1383
  }) => Promise<import("ethers").Authorization>) | undefined;
1384
1384
  signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
1385
- signTypedData: (({ domain, types, value }: import("..").SignTypedDataParams) => Promise<string>) | undefined;
1385
+ signTypedData: ((params: import("..").SignTypedDataParams) => Promise<string>) | undefined;
1386
1386
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("..").EVMTransferParams) => Promise<string>;
1387
1387
  validateAddress: typeof import("./baseEVMToolbox").validateEVMAddress;
1388
1388
  };
@@ -1554,7 +1554,7 @@ export declare const BSCToolbox: ({ provider, ...toolboxParams }: EVMToolboxPara
1554
1554
  chainId?: bigint;
1555
1555
  }) => Promise<import("ethers").Authorization>) | undefined;
1556
1556
  signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
1557
- signTypedData: (({ domain, types, value }: import("..").SignTypedDataParams) => Promise<string>) | undefined;
1557
+ signTypedData: ((params: import("..").SignTypedDataParams) => Promise<string>) | undefined;
1558
1558
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("..").EVMTransferParams) => Promise<string>;
1559
1559
  validateAddress: typeof import("./baseEVMToolbox").validateEVMAddress;
1560
1560
  };
@@ -1726,7 +1726,7 @@ export declare const BotanixToolbox: ({ provider, ...toolboxParams }: EVMToolbox
1726
1726
  chainId?: bigint;
1727
1727
  }) => Promise<import("ethers").Authorization>) | undefined;
1728
1728
  signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
1729
- signTypedData: (({ domain, types, value }: import("..").SignTypedDataParams) => Promise<string>) | undefined;
1729
+ signTypedData: ((params: import("..").SignTypedDataParams) => Promise<string>) | undefined;
1730
1730
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("..").EVMTransferParams) => Promise<string>;
1731
1731
  validateAddress: typeof import("./baseEVMToolbox").validateEVMAddress;
1732
1732
  };
@@ -1898,7 +1898,7 @@ export declare const COREToolbox: ({ provider, ...toolboxParams }: EVMToolboxPar
1898
1898
  chainId?: bigint;
1899
1899
  }) => Promise<import("ethers").Authorization>) | undefined;
1900
1900
  signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
1901
- signTypedData: (({ domain, types, value }: import("..").SignTypedDataParams) => Promise<string>) | undefined;
1901
+ signTypedData: ((params: import("..").SignTypedDataParams) => Promise<string>) | undefined;
1902
1902
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("..").EVMTransferParams) => Promise<string>;
1903
1903
  validateAddress: typeof import("./baseEVMToolbox").validateEVMAddress;
1904
1904
  };
@@ -2070,7 +2070,7 @@ export declare const CORNToolbox: ({ provider, ...toolboxParams }: EVMToolboxPar
2070
2070
  chainId?: bigint;
2071
2071
  }) => Promise<import("ethers").Authorization>) | undefined;
2072
2072
  signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
2073
- signTypedData: (({ domain, types, value }: import("..").SignTypedDataParams) => Promise<string>) | undefined;
2073
+ signTypedData: ((params: import("..").SignTypedDataParams) => Promise<string>) | undefined;
2074
2074
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("..").EVMTransferParams) => Promise<string>;
2075
2075
  validateAddress: typeof import("./baseEVMToolbox").validateEVMAddress;
2076
2076
  };
@@ -2242,7 +2242,7 @@ export declare const CROToolbox: ({ provider, ...toolboxParams }: EVMToolboxPara
2242
2242
  chainId?: bigint;
2243
2243
  }) => Promise<import("ethers").Authorization>) | undefined;
2244
2244
  signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
2245
- signTypedData: (({ domain, types, value }: import("..").SignTypedDataParams) => Promise<string>) | undefined;
2245
+ signTypedData: ((params: import("..").SignTypedDataParams) => Promise<string>) | undefined;
2246
2246
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("..").EVMTransferParams) => Promise<string>;
2247
2247
  validateAddress: typeof import("./baseEVMToolbox").validateEVMAddress;
2248
2248
  };
@@ -2414,7 +2414,7 @@ export declare const GNOToolbox: ({ provider, ...toolboxParams }: EVMToolboxPara
2414
2414
  chainId?: bigint;
2415
2415
  }) => Promise<import("ethers").Authorization>) | undefined;
2416
2416
  signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
2417
- signTypedData: (({ domain, types, value }: import("..").SignTypedDataParams) => Promise<string>) | undefined;
2417
+ signTypedData: ((params: import("..").SignTypedDataParams) => Promise<string>) | undefined;
2418
2418
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("..").EVMTransferParams) => Promise<string>;
2419
2419
  validateAddress: typeof import("./baseEVMToolbox").validateEVMAddress;
2420
2420
  };
@@ -2586,7 +2586,7 @@ export declare const HOODToolbox: ({ provider, ...toolboxParams }: EVMToolboxPar
2586
2586
  chainId?: bigint;
2587
2587
  }) => Promise<import("ethers").Authorization>) | undefined;
2588
2588
  signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
2589
- signTypedData: (({ domain, types, value }: import("..").SignTypedDataParams) => Promise<string>) | undefined;
2589
+ signTypedData: ((params: import("..").SignTypedDataParams) => Promise<string>) | undefined;
2590
2590
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("..").EVMTransferParams) => Promise<string>;
2591
2591
  validateAddress: typeof import("./baseEVMToolbox").validateEVMAddress;
2592
2592
  };
@@ -2758,7 +2758,7 @@ export declare const HYPEREVMToolbox: ({ provider, ...toolboxParams }: EVMToolbo
2758
2758
  chainId?: bigint;
2759
2759
  }) => Promise<import("ethers").Authorization>) | undefined;
2760
2760
  signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
2761
- signTypedData: (({ domain, types, value }: import("..").SignTypedDataParams) => Promise<string>) | undefined;
2761
+ signTypedData: ((params: import("..").SignTypedDataParams) => Promise<string>) | undefined;
2762
2762
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("..").EVMTransferParams) => Promise<string>;
2763
2763
  validateAddress: typeof import("./baseEVMToolbox").validateEVMAddress;
2764
2764
  };
@@ -2930,7 +2930,7 @@ export declare const LINEAToolbox: ({ provider, ...toolboxParams }: EVMToolboxPa
2930
2930
  chainId?: bigint;
2931
2931
  }) => Promise<import("ethers").Authorization>) | undefined;
2932
2932
  signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
2933
- signTypedData: (({ domain, types, value }: import("..").SignTypedDataParams) => Promise<string>) | undefined;
2933
+ signTypedData: ((params: import("..").SignTypedDataParams) => Promise<string>) | undefined;
2934
2934
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("..").EVMTransferParams) => Promise<string>;
2935
2935
  validateAddress: typeof import("./baseEVMToolbox").validateEVMAddress;
2936
2936
  };
@@ -3102,7 +3102,7 @@ export declare const MATICToolbox: ({ provider, ...toolboxParams }: EVMToolboxPa
3102
3102
  chainId?: bigint;
3103
3103
  }) => Promise<import("ethers").Authorization>) | undefined;
3104
3104
  signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
3105
- signTypedData: (({ domain, types, value }: import("..").SignTypedDataParams) => Promise<string>) | undefined;
3105
+ signTypedData: ((params: import("..").SignTypedDataParams) => Promise<string>) | undefined;
3106
3106
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("..").EVMTransferParams) => Promise<string>;
3107
3107
  validateAddress: typeof import("./baseEVMToolbox").validateEVMAddress;
3108
3108
  };
@@ -3274,7 +3274,7 @@ export declare const MEGAETHToolbox: ({ provider, ...toolboxParams }: EVMToolbox
3274
3274
  chainId?: bigint;
3275
3275
  }) => Promise<import("ethers").Authorization>) | undefined;
3276
3276
  signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
3277
- signTypedData: (({ domain, types, value }: import("..").SignTypedDataParams) => Promise<string>) | undefined;
3277
+ signTypedData: ((params: import("..").SignTypedDataParams) => Promise<string>) | undefined;
3278
3278
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("..").EVMTransferParams) => Promise<string>;
3279
3279
  validateAddress: typeof import("./baseEVMToolbox").validateEVMAddress;
3280
3280
  };
@@ -3446,7 +3446,7 @@ export declare const MONADToolbox: ({ provider, ...toolboxParams }: EVMToolboxPa
3446
3446
  chainId?: bigint;
3447
3447
  }) => Promise<import("ethers").Authorization>) | undefined;
3448
3448
  signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
3449
- signTypedData: (({ domain, types, value }: import("..").SignTypedDataParams) => Promise<string>) | undefined;
3449
+ signTypedData: ((params: import("..").SignTypedDataParams) => Promise<string>) | undefined;
3450
3450
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("..").EVMTransferParams) => Promise<string>;
3451
3451
  validateAddress: typeof import("./baseEVMToolbox").validateEVMAddress;
3452
3452
  };
@@ -3618,7 +3618,7 @@ export declare const PLASMAToolbox: ({ provider, ...toolboxParams }: EVMToolboxP
3618
3618
  chainId?: bigint;
3619
3619
  }) => Promise<import("ethers").Authorization>) | undefined;
3620
3620
  signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
3621
- signTypedData: (({ domain, types, value }: import("..").SignTypedDataParams) => Promise<string>) | undefined;
3621
+ signTypedData: ((params: import("..").SignTypedDataParams) => Promise<string>) | undefined;
3622
3622
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("..").EVMTransferParams) => Promise<string>;
3623
3623
  validateAddress: typeof import("./baseEVMToolbox").validateEVMAddress;
3624
3624
  };
@@ -3790,7 +3790,7 @@ export declare const SONICToolbox: ({ provider, ...toolboxParams }: EVMToolboxPa
3790
3790
  chainId?: bigint;
3791
3791
  }) => Promise<import("ethers").Authorization>) | undefined;
3792
3792
  signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
3793
- signTypedData: (({ domain, types, value }: import("..").SignTypedDataParams) => Promise<string>) | undefined;
3793
+ signTypedData: ((params: import("..").SignTypedDataParams) => Promise<string>) | undefined;
3794
3794
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("..").EVMTransferParams) => Promise<string>;
3795
3795
  validateAddress: typeof import("./baseEVMToolbox").validateEVMAddress;
3796
3796
  };
@@ -3968,7 +3968,7 @@ export declare const UNIToolbox: ({ provider, ...toolboxSignerParams }: EVMToolb
3968
3968
  chainId?: bigint;
3969
3969
  }) => Promise<import("ethers").Authorization>) | undefined;
3970
3970
  signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
3971
- signTypedData: (({ domain, types, value }: import("..").SignTypedDataParams) => Promise<string>) | undefined;
3971
+ signTypedData: ((params: import("..").SignTypedDataParams) => Promise<string>) | undefined;
3972
3972
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("..").EVMTransferParams) => Promise<string>;
3973
3973
  validateAddress: typeof import("./baseEVMToolbox").validateEVMAddress;
3974
3974
  };
@@ -4140,7 +4140,7 @@ export declare const XLayerToolbox: ({ provider, ...toolboxParams }: EVMToolboxP
4140
4140
  chainId?: bigint;
4141
4141
  }) => Promise<import("ethers").Authorization>) | undefined;
4142
4142
  signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
4143
- signTypedData: (({ domain, types, value }: import("..").SignTypedDataParams) => Promise<string>) | undefined;
4143
+ signTypedData: ((params: import("..").SignTypedDataParams) => Promise<string>) | undefined;
4144
4144
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("..").EVMTransferParams) => Promise<string>;
4145
4145
  validateAddress: typeof import("./baseEVMToolbox").validateEVMAddress;
4146
4146
  };
@@ -184,7 +184,7 @@ export declare function createOPStackToolbox(chain: Chain.Optimism | Chain.Base
184
184
  chainId?: bigint;
185
185
  }) => Promise<Authorization>) | undefined;
186
186
  signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
187
- signTypedData: (({ domain, types, value }: import("..").SignTypedDataParams) => Promise<string>) | undefined;
187
+ signTypedData: ((params: import("..").SignTypedDataParams) => Promise<string>) | undefined;
188
188
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("..").EVMTransferParams) => Promise<string>;
189
189
  validateAddress: typeof import("./baseEVMToolbox").validateEVMAddress;
190
190
  };
@@ -362,7 +362,7 @@ export declare const OPToolbox: ({ provider, ...toolboxSignerParams }: EVMToolbo
362
362
  chainId?: bigint;
363
363
  }) => Promise<Authorization>) | undefined;
364
364
  signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
365
- signTypedData: (({ domain, types, value }: import("..").SignTypedDataParams) => Promise<string>) | undefined;
365
+ signTypedData: ((params: import("..").SignTypedDataParams) => Promise<string>) | undefined;
366
366
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("..").EVMTransferParams) => Promise<string>;
367
367
  validateAddress: typeof import("./baseEVMToolbox").validateEVMAddress;
368
368
  };
@@ -12,5 +12,4 @@ interface AssertSendAssetPayloadParams {
12
12
  submitTo: string;
13
13
  typedData: HyperCoreTypedData;
14
14
  }
15
- export declare function sanitizeTypedDataForSigner<TTypedData extends HyperCoreTypedData>(typedData: TTypedData): TTypedData;
16
15
  export declare function assertSendAssetPayload({ action, allowedEndpoints, expectedAmount, expectedDestination, expectedFromSubAccount, expectedSourceDex, expectedToken, submitTo, typedData, }: AssertSendAssetPayloadParams): void;
@@ -0,0 +1,13 @@
1
+ import type { LightsparkCurrencyAmount, LightsparkPaymentStatus } from "./types";
2
+ export declare function parseMsats(value: string, context: string): bigint;
3
+ export declare function msatsToSdkNumber(msats: bigint, context: string): number;
4
+ export declare function tryCurrencyAmountToMsats(amount: LightsparkCurrencyAmount | null | undefined): bigint | undefined;
5
+ export declare function currencyAmountToMsats(amount: LightsparkCurrencyAmount | null | undefined): bigint;
6
+ export declare function defaultMaximumFeesMsats(amountMsats: bigint): bigint;
7
+ export declare function mapPaymentStatus(status: string): LightsparkPaymentStatus;
8
+ export declare function isTerminalPaymentStatus(status: string): boolean;
9
+ export declare function isCompressedNodePublicKey(value: string): boolean;
10
+ export declare function isPaymentHash(value: string): boolean;
11
+ export declare function sleep(ms: number): Promise<void>;
12
+ export declare function sdkErrorCode(error: unknown): string | undefined;
13
+ export declare function sdkErrorMessage(error: unknown): string | undefined;
@@ -0,0 +1,3 @@
1
+ export { LIGHTNING_INVOICE_EXPIRY_SKEW_TOLERANCE_MAX_MS, LIGHTNING_INVOICE_EXPIRY_SKEW_TOLERANCE_MS, } from "./invoiceAssert";
2
+ export { getLightsparkToolbox } from "./toolbox";
3
+ export type * from "./types";
@@ -0,0 +1,18 @@
1
+ import type { LightsparkDecodedInvoice } from "./types";
2
+ export declare const LIGHTNING_INVOICE_EXPIRY_SKEW_TOLERANCE_MS = 60000;
3
+ export declare const LIGHTNING_INVOICE_EXPIRY_SKEW_TOLERANCE_MAX_MS = 600000;
4
+ export declare function assertPayableLightningInvoice({ decoded, expectedDestinationPublicKey, expectedNetwork, nowMs, skewToleranceMs, }: {
5
+ decoded: LightsparkDecodedInvoice;
6
+ expectedDestinationPublicKey?: string;
7
+ expectedNetwork: string;
8
+ nowMs: number;
9
+ skewToleranceMs: number;
10
+ }): void;
11
+ export declare function resolveLightningPaymentAmountMsats({ amountMsats, invoiceAmountMsats, paymentHash, }: {
12
+ amountMsats?: string;
13
+ invoiceAmountMsats: bigint;
14
+ paymentHash: string;
15
+ }): {
16
+ payAmountMsats: bigint;
17
+ zeroAmountInvoice: boolean;
18
+ };
@@ -0,0 +1,13 @@
1
+ import type { LightsparkBalance, LightsparkCreateInvoiceParams, LightsparkCreateInvoiceResult, LightsparkCreateTestModeInvoiceParams, LightsparkDecodedInvoice, LightsparkListTransactionsParams, LightsparkPayInvoiceParams, LightsparkPayInvoiceResult, LightsparkSendPaymentParams, LightsparkSendPaymentResult, LightsparkToolboxParams, LightsparkTrackingOutcome, LightsparkTransactionStatusParams, LightsparkTransactionSummary } from "./types";
2
+ export declare function getLightsparkToolbox(params: LightsparkToolboxParams): {
3
+ createInvoice: ({ amountMsats, memo, expirySecs, }: LightsparkCreateInvoiceParams) => Promise<LightsparkCreateInvoiceResult>;
4
+ createTestModeInvoice: ({ amountMsats, memo, }: LightsparkCreateTestModeInvoiceParams) => Promise<{
5
+ encodedInvoice: string;
6
+ }>;
7
+ decodeInvoice: (invoice: string) => Promise<LightsparkDecodedInvoice>;
8
+ getBalance: () => Promise<LightsparkBalance>;
9
+ getTransactionStatus: ({ transactionId, paymentHash: rawPaymentHash, attempts, intervalMs, }: LightsparkTransactionStatusParams) => Promise<LightsparkTrackingOutcome>;
10
+ listTransactions: ({ numTransactions, afterDate, }?: LightsparkListTransactionsParams) => Promise<LightsparkTransactionSummary[]>;
11
+ payInvoice: ({ invoice, amountMsats, maximumFeesMsats, destinationPublicKey, timeoutSecs, attempts, intervalMs, expirySkewToleranceMs, }: LightsparkPayInvoiceParams) => Promise<LightsparkPayInvoiceResult>;
12
+ sendPayment: ({ destinationPublicKey, amountMsats, maximumFeesMsats, timeoutSecs, attempts, intervalMs, }: LightsparkSendPaymentParams) => Promise<LightsparkSendPaymentResult>;
13
+ };
@@ -0,0 +1,196 @@
1
+ export type LightsparkCurrencyAmount = {
2
+ originalValue: number;
3
+ originalUnit: string;
4
+ };
5
+ export type LightsparkSdkInvoiceData = {
6
+ encodedPaymentRequest: string;
7
+ bitcoinNetwork: string;
8
+ paymentHash: string;
9
+ amount: LightsparkCurrencyAmount;
10
+ createdAt: string;
11
+ expiresAt: string;
12
+ destination: {
13
+ publicKey?: string | null;
14
+ };
15
+ memo?: string | null;
16
+ };
17
+ export type LightsparkSdkInvoice = {
18
+ id: string;
19
+ status: string;
20
+ data: LightsparkSdkInvoiceData;
21
+ amountPaid?: LightsparkCurrencyAmount | null;
22
+ };
23
+ export type LightsparkSdkTransaction = {
24
+ id: string;
25
+ createdAt: string;
26
+ status: string;
27
+ amount: LightsparkCurrencyAmount;
28
+ typename: string;
29
+ resolvedAt?: string | null;
30
+ transactionHash?: string | null;
31
+ fees?: LightsparkCurrencyAmount | null;
32
+ paymentPreimage?: string | null;
33
+ failureReason?: string | null;
34
+ destinationId?: string | null;
35
+ };
36
+ export type LightsparkSdkNode = {
37
+ id: string;
38
+ bitcoinNetwork: string;
39
+ balances?: {
40
+ availableToSendBalance: LightsparkCurrencyAmount;
41
+ };
42
+ localBalance?: LightsparkCurrencyAmount;
43
+ remoteBalance?: LightsparkCurrencyAmount;
44
+ };
45
+ type LightsparkGraphClientMethods = {
46
+ decodeInvoice(encodedInvoice: string): Promise<LightsparkSdkInvoiceData>;
47
+ payInvoice(payerNodeId: string, encodedInvoice: string, maximumFeesMsats: number, timeoutSecs?: number, amountMsats?: number, idempotencyKey?: string): Promise<LightsparkSdkTransaction | undefined>;
48
+ sendPayment(payerNodeId: string, destinationPublicKey: string, timeoutSecs: number | undefined, amountMsats: number, maximumFeesMsats: number): Promise<LightsparkSdkTransaction | undefined>;
49
+ createInvoiceWithDetails(nodeId: string, amountMsats: number, memo: string, type?: undefined, expirySecs?: number): Promise<LightsparkSdkInvoice | undefined>;
50
+ createTestModeInvoice(localNodeId: string, amountMsats: number, memo?: string): Promise<string | null>;
51
+ getRecentTransactions(nodeId: string, numTransactions?: number, bitcoinNetwork?: string, afterDate?: string): Promise<LightsparkSdkTransaction[]>;
52
+ getTransaction(transactionId: string): Promise<LightsparkSdkTransaction | null | undefined>;
53
+ outgoingPaymentsForPaymentHash(paymentHash: string, statuses?: string[]): Promise<LightsparkSdkTransaction[]>;
54
+ invoiceForPaymentHash(paymentHash: string): Promise<LightsparkSdkInvoice | null>;
55
+ getLightningFeeEstimateForInvoice(nodeId: string, encodedPaymentRequest: string, amountMsats?: number): Promise<LightsparkCurrencyAmount>;
56
+ getLightningFeeEstimateForNode(nodeId: string, destinationNodePublicKey: string, amountMsats: number): Promise<LightsparkCurrencyAmount>;
57
+ loadNodeKey(nodeId: string, signingPrivateKeyOrAlias: {
58
+ key: string;
59
+ }): Promise<void>;
60
+ };
61
+ /** Implement getNodeById to avoid the optional vendor SDK; executeRawQuery uses its query builder. */
62
+ export type LightsparkGraphClient = LightsparkGraphClientMethods & ({
63
+ getNodeById(nodeId: string): Promise<LightsparkSdkNode | null>;
64
+ executeRawQuery?(query: unknown): Promise<unknown>;
65
+ } | {
66
+ getNodeById?(nodeId: string): Promise<LightsparkSdkNode | null>;
67
+ executeRawQuery(query: unknown): Promise<unknown>;
68
+ });
69
+ export type LightsparkToolboxParams = {
70
+ nodeId: string;
71
+ signingKey?: string;
72
+ apiUrl?: string;
73
+ } & ({
74
+ clientId: string;
75
+ clientSecret: string;
76
+ client?: LightsparkGraphClient;
77
+ } | {
78
+ clientId?: string;
79
+ clientSecret?: string;
80
+ client: LightsparkGraphClient;
81
+ });
82
+ export type LightsparkPaymentStatus = "PENDING" | "SUCCESS" | "FAILED";
83
+ export type LightsparkTrackingStatus = LightsparkPaymentStatus | "NOT_FOUND" | "UNKNOWN";
84
+ export type LightsparkPaymentOutcome = {
85
+ status: LightsparkPaymentStatus;
86
+ paymentHash?: string;
87
+ transactionId?: string;
88
+ amountMsats?: string;
89
+ feePaidMsats?: string;
90
+ preimage?: string;
91
+ failureReason?: string;
92
+ };
93
+ export type LightsparkPayInvoiceResult = LightsparkPaymentOutcome & {
94
+ paymentHash: string;
95
+ /**
96
+ * PENDING because an amountless payment cannot be matched to this request. Reconcile its actual
97
+ * amount against requestedAmountMsats before resending, even if tracking later reports SUCCESS.
98
+ */
99
+ reconciliationRequired?: {
100
+ reason: "AMOUNT_MISMATCH" | "AMOUNT_UNVERIFIABLE";
101
+ requestedAmountMsats: string;
102
+ };
103
+ /** The result belongs to an earlier payment; this call sent nothing. */
104
+ replayedPriorPayment?: true;
105
+ };
106
+ export type LightsparkSendPaymentResult = LightsparkPaymentOutcome & {
107
+ amountMsats: string;
108
+ destinationPublicKey: string;
109
+ /**
110
+ * ISO-8601 send time minus LIGHTNING_INVOICE_EXPIRY_SKEW_TOLERANCE_MS. Pass as afterDate to
111
+ * listTransactions and match createdAt, amountMsats and typename before retrying an unknown send.
112
+ * destinationId is an entity id, so it cannot be compared with destinationPublicKey.
113
+ */
114
+ sentAfter: string;
115
+ };
116
+ export type LightsparkTrackingOutcome = Omit<LightsparkPaymentOutcome, "status"> & {
117
+ status: LightsparkTrackingStatus;
118
+ };
119
+ export type LightsparkPayInvoiceParams = {
120
+ invoice: string;
121
+ amountMsats?: string;
122
+ maximumFeesMsats?: string;
123
+ destinationPublicKey?: string;
124
+ timeoutSecs?: number;
125
+ attempts?: number;
126
+ intervalMs?: number;
127
+ /**
128
+ * Expiry allowance in milliseconds, from 0 to LIGHTNING_INVOICE_EXPIRY_SKEW_TOLERANCE_MAX_MS.
129
+ * Defaults to LIGHTNING_INVOICE_EXPIRY_SKEW_TOLERANCE_MS.
130
+ */
131
+ expirySkewToleranceMs?: number;
132
+ };
133
+ export type LightsparkSendPaymentParams = {
134
+ destinationPublicKey: string;
135
+ amountMsats: string;
136
+ maximumFeesMsats?: string;
137
+ timeoutSecs?: number;
138
+ attempts?: number;
139
+ intervalMs?: number;
140
+ };
141
+ export type LightsparkCreateInvoiceParams = {
142
+ amountMsats: string;
143
+ memo?: string;
144
+ expirySecs?: number;
145
+ };
146
+ export type LightsparkCreateInvoiceResult = {
147
+ encodedInvoice: string;
148
+ paymentHash: string;
149
+ amountMsats: string;
150
+ createdAt: string;
151
+ expiresAt: string;
152
+ };
153
+ export type LightsparkCreateTestModeInvoiceParams = {
154
+ amountMsats: string;
155
+ memo?: string;
156
+ };
157
+ export type LightsparkDecodedInvoice = {
158
+ paymentHash: string;
159
+ amountMsats: string;
160
+ network: string;
161
+ createdAt: string;
162
+ expiresAt: string;
163
+ destinationPublicKey?: string;
164
+ memo?: string;
165
+ };
166
+ export type LightsparkBalance = {
167
+ spendableMsats: string;
168
+ inboundCapacityMsats?: string;
169
+ };
170
+ export type LightsparkTransactionStatusParams = {
171
+ transactionId?: string;
172
+ paymentHash?: string;
173
+ attempts?: number;
174
+ intervalMs?: number;
175
+ };
176
+ export type LightsparkListTransactionsParams = {
177
+ numTransactions?: number;
178
+ /** ISO-8601 timestamp; pass `sentAfter` from a `sendPayment` result to bound a reconciliation scan. */
179
+ afterDate?: string;
180
+ };
181
+ /** A listTransactions row. Vendor enum values remain strings to support future SDK versions. */
182
+ export type LightsparkTransactionSummary = {
183
+ id: string;
184
+ /** GraphQL type, e.g. "OutgoingPayment", "IncomingPayment" or "RoutingTransaction". */
185
+ typename: string;
186
+ /** Raw vendor status, including FUTURE_VALUE for an unrecognised status. */
187
+ status: string;
188
+ createdAt: string;
189
+ amountMsats?: string;
190
+ resolvedAt?: string;
191
+ /** BOLT11 payment hash for an OutgoingPayment, matching payInvoice results. */
192
+ transactionHash?: string;
193
+ /** Counterparty entity id (e.g. "GraphNode:0188..."); not a Lightning public key. */
194
+ destinationId?: string;
195
+ };
196
+ export {};
@@ -2,6 +2,7 @@ import type { DerivationPathArray, GenericTransferParams } from "@swapkit/helper
2
2
  import type { Account } from "starknet";
3
3
  export type StarknetToolboxParams = {
4
4
  signer?: Account;
5
+ walletDeploysAccount?: boolean;
5
6
  } | {
6
7
  phrase?: string;
7
8
  index?: number;
@@ -0,0 +1,37 @@
1
+ export declare const SUI_COIN_TYPE = "0x2::sui::SUI";
2
+ export declare const LONG_SUI_COIN_TYPE = "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI";
3
+ type MockCoin = {
4
+ balance: string;
5
+ digest: string;
6
+ objectId: string;
7
+ version: string;
8
+ };
9
+ type MockStatus = {
10
+ success: true;
11
+ error: null;
12
+ } | {
13
+ success: false;
14
+ error: {
15
+ message: string;
16
+ };
17
+ };
18
+ export declare const suiRpc: {
19
+ balances: {
20
+ balance: string;
21
+ coinType: string;
22
+ }[];
23
+ calls: {
24
+ method: string;
25
+ params: unknown;
26
+ }[];
27
+ clientUrls: string[];
28
+ coinPages: Record<string, MockCoin[][]>;
29
+ count(method: string): number;
30
+ danglingNextPage: boolean;
31
+ error: Error | undefined;
32
+ reset(): void;
33
+ simulateStatus: MockStatus;
34
+ };
35
+ export declare function mockSuiGrpc(): void;
36
+ export declare function restoreSuiGrpc(): void;
37
+ export {};
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
- "dependencies": { "@swapkit/helpers": "6.1.2", "@swapkit/utxo-signer": "3.1.1" },
2
+ "dependencies": { "@swapkit/helpers": "6.3.0", "@swapkit/utxo-signer": "3.1.1" },
3
3
  "description": "SwapKit - Toolboxes",
4
4
  "devDependencies": {
5
5
  "@aptos-labs/ts-sdk": "7.0.1",
6
+ "@lightsparkdev/lightspark-sdk": "1.9.19",
6
7
  "@mysten/sui": "2.17.0",
7
8
  "@near-js/accounts": "2.5.1",
8
9
  "@near-js/crypto": "2.5.1",
@@ -60,6 +61,7 @@
60
61
  "./cosmos": { "default": "./dist/src/cosmos/index.js", "types": "./dist/types/cosmos/index.d.ts" },
61
62
  "./evm": { "default": "./dist/src/evm/index.js", "types": "./dist/types/evm/index.d.ts" },
62
63
  "./hypercore": { "default": "./dist/src/hypercore/index.js", "types": "./dist/types/hypercore/index.d.ts" },
64
+ "./lightspark": { "default": "./dist/src/lightspark/index.js", "types": "./dist/types/lightspark/index.d.ts" },
63
65
  "./near": { "default": "./dist/src/near/index.js", "types": "./dist/types/near/index.d.ts" },
64
66
  "./radix": { "default": "./dist/src/radix/index.js", "types": "./dist/types/radix/index.d.ts" },
65
67
  "./ripple": { "default": "./dist/src/ripple/index.js", "types": "./dist/types/ripple/index.d.ts" },
@@ -78,6 +80,7 @@
78
80
  "name": "@swapkit/toolboxes",
79
81
  "peerDependencies": {
80
82
  "@aptos-labs/ts-sdk": "7.0.1",
83
+ "@lightsparkdev/lightspark-sdk": "1.9.19",
81
84
  "@mysten/sui": "2.17.0",
82
85
  "@near-js/accounts": "2.5.1",
83
86
  "@near-js/crypto": "2.5.1",
@@ -121,6 +124,7 @@
121
124
  "ts-pattern": "5.9.0",
122
125
  "xrpl": "4.6.0"
123
126
  },
127
+ "peerDependenciesMeta": { "@lightsparkdev/lightspark-sdk": { "optional": true } },
124
128
  "publishConfig": { "access": "public" },
125
129
  "repository": { "type": "git", "url": "git+https://github.com/swapkit/SwapKit.git" },
126
130
  "scripts": {
@@ -131,5 +135,5 @@
131
135
  "type-check:go": "tsgo"
132
136
  },
133
137
  "type": "module",
134
- "version": "6.3.0"
138
+ "version": "6.4.1"
135
139
  }
@@ -1 +0,0 @@
1
- import{$ as N,A as m,B as n,C as o,D as p,E as q,F as r,G as s,H as t,I as u,J as v,K as w,L as x,M as y,N as z,O as A,P as B,Q as C,R as D,S as E,T as F,U as G,V as H,W as I,X as J,Y as K,Z as L,_ as M,aa as O,ba as P,ca as Q,da as R,ea as S,fa as T,ga as U,o as a,p as b,q as c,r as d,s as e,t as f,u as g,v as h,w as i,x as j,y as k,z as l}from"./chunk-ygq25ce3.js";import"./chunk-xdkdc1f0.js";import"./chunk-exyqap7m.js";export{w as ADIToolbox,x as ARBToolbox,y as ARCToolbox,z as AURORAToolbox,A as AVAXToolbox,B as BASEToolbox,C as BERAToolbox,D as BSCToolbox,b as BaseEVMToolbox,E as BotanixToolbox,F as COREToolbox,G as CORNToolbox,H as CROToolbox,k as ContractAddress,v as ETHToolbox,I as GNOToolbox,J as HOODToolbox,K as HYPEREVMToolbox,L as LINEAToolbox,M as MATICToolbox,a as MAX_APPROVAL,N as MEGAETHToolbox,O as MONADToolbox,u as OPToolbox,P as PLASMAToolbox,Q as SONICToolbox,R as UNIToolbox,S as XLayerToolbox,e as createContract,t as createOPStackToolbox,j as getChecksumAddressFromAsset,f as getCreateContract,m as getCreateContractTxObject,i as getEIP1193SendTransaction,q as getEVMTxType,n as getEstimateGasPrices,T as getEvmToolbox,U as getEvmToolboxAsync,l as getTokenAddress,d as isBrowserProvider,p as isEIP1559Transaction,o as isEIP7702Transaction,g as isStateChangingCall,r as maxBigInt,s as scaleEIP1559Fees,h as toChecksumAddress,c as validateEVMAddress};