@lendasat/lendaswap-sdk-native 0.1.67 → 0.1.69

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.
package/index.d.ts CHANGED
@@ -131,6 +131,34 @@ export interface BtcToArkadeSwapResponse {
131
131
  /** Arkade VHTLC claim transaction ID. */
132
132
  arkadeClaimTxid?: string
133
133
  }
134
+ /** On-chain BTC to EVM swap response. */
135
+ export interface OnchainToEvmSwapResponse {
136
+ id: string
137
+ status: SwapStatus
138
+ btcHtlcAddress: string
139
+ feeSats: number
140
+ btcServerPk: string
141
+ evmHashLock: string
142
+ btcHashLock: string
143
+ btcRefundLocktime: number
144
+ btcFundTxid?: string
145
+ btcClaimTxid?: string
146
+ evmFundTxid?: string
147
+ evmClaimTxid?: string
148
+ network: string
149
+ createdAt: string
150
+ chain: string
151
+ clientEvmAddress: string
152
+ evmHtlcAddress: string
153
+ serverEvmAddress: string
154
+ evmRefundLocktime: number
155
+ sourceToken: string
156
+ targetToken: string
157
+ /** How much the user will receive of the target asset */
158
+ targetAmount: number
159
+ /** Amount user must send in satoshis */
160
+ sourceAmount: number
161
+ }
134
162
  /** Version information. */
135
163
  export interface Version {
136
164
  tag: string
@@ -142,6 +170,7 @@ export interface ExtendedSwapStorageData {
142
170
  btcToEvmResponse?: BtcToEvmSwapResponse
143
171
  evmToBtcResponse?: EvmToBtcSwapResponse
144
172
  btcToArkadeResponse?: BtcToArkadeSwapResponse
173
+ onchainToEvmResponse?: OnchainToEvmSwapResponse
145
174
  }
146
175
  /** SQLite storage handle for Node.js. */
147
176
  export declare class SqliteStorageHandle {
@@ -178,6 +207,13 @@ export declare class Client {
178
207
  createEvmToLightningSwap(bolt11Invoice: string, userAddress: string, sourceToken: string, sourceChain: string, referralCode?: string | undefined | null): Promise<EvmToBtcSwapResponse>
179
208
  /** Create an on-chain Bitcoin to Arkade swap. */
180
209
  createBitcoinToArkadeSwap(targetArkadeAddress: string, satsReceive: number, referralCode?: string | undefined | null): Promise<BtcToArkadeSwapResponse>
210
+ /**
211
+ * Create an on-chain Bitcoin to EVM swap.
212
+ *
213
+ * User sends on-chain BTC to a Taproot HTLC address, and receives tokens
214
+ * on the target EVM chain (e.g., USDC on Polygon).
215
+ */
216
+ createOnchainToEvmSwap(targetAddress: string, sourceAmount: number, targetToken: string, targetChain: string, referralCode?: string | undefined | null): Promise<OnchainToEvmSwapResponse>
181
217
  /** Get swap by ID. */
182
218
  getSwap(id: string): Promise<ExtendedSwapStorageData>
183
219
  /** List all swaps. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lendasat/lendaswap-sdk-native",
3
- "version": "0.1.67",
3
+ "version": "0.1.69",
4
4
  "description": "Lendaswap Client SDK - Native Node.js bindings with SQLite storage",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",