@atomiqlabs/sdk 5.0.0-dev.5 → 5.0.0-dev.6
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/dist/SwapperFactory.d.ts
CHANGED
|
@@ -47,5 +47,6 @@ export declare class SwapperFactory<T extends readonly ChainInitializer<any, any
|
|
|
47
47
|
TokenResolver: GetAllTokenResolvers<T>;
|
|
48
48
|
constructor(initializers: T);
|
|
49
49
|
newSwapper(options: MultichainSwapperOptions<T>): Swapper<ToMultichain<T>>;
|
|
50
|
+
newSwapperInitialized(options: MultichainSwapperOptions<T>): Promise<Swapper<ToMultichain<T>>>;
|
|
50
51
|
}
|
|
51
52
|
export {};
|
package/dist/SwapperFactory.js
CHANGED
|
@@ -106,5 +106,10 @@ class SwapperFactory {
|
|
|
106
106
|
sdk_lib_1.RedundantSwapPrice.createFromTokenMap(options.pricingFeeDifferencePPM ?? 10000n, pricingAssets);
|
|
107
107
|
return new sdk_lib_1.Swapper(bitcoinRpc, chains, swapPricing, pricingAssets, options.messenger, options);
|
|
108
108
|
}
|
|
109
|
+
async newSwapperInitialized(options) {
|
|
110
|
+
const swapper = this.newSwapper(options);
|
|
111
|
+
await swapper.init();
|
|
112
|
+
return swapper;
|
|
113
|
+
}
|
|
109
114
|
}
|
|
110
115
|
exports.SwapperFactory = SwapperFactory;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atomiqlabs/sdk",
|
|
3
|
-
"version": "5.0.0-dev.
|
|
3
|
+
"version": "5.0.0-dev.6",
|
|
4
4
|
"description": "atomiq labs SDK for cross-chain swaps between smart chains and bitcoin",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types:": "./dist/index.d.ts",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"author": "adambor",
|
|
22
22
|
"license": "ISC",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@atomiqlabs/base": "^10.0.0-dev.
|
|
24
|
+
"@atomiqlabs/base": "^10.0.0-dev.16",
|
|
25
25
|
"@atomiqlabs/messenger-nostr": "^1.0.0-dev.3",
|
|
26
|
-
"@atomiqlabs/sdk-lib": "^14.0.0-dev.
|
|
26
|
+
"@atomiqlabs/sdk-lib": "^14.0.0-dev.45"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/node": "22.13.5",
|
package/src/SwapperFactory.ts
CHANGED
|
@@ -200,4 +200,10 @@ export class SwapperFactory<T extends readonly ChainInitializer<any, any, any>[]
|
|
|
200
200
|
);
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
+
async newSwapperInitialized(options: MultichainSwapperOptions<T>) {
|
|
204
|
+
const swapper = this.newSwapper(options);
|
|
205
|
+
await swapper.init();
|
|
206
|
+
return swapper;
|
|
207
|
+
}
|
|
208
|
+
|
|
203
209
|
}
|