@atomiqlabs/sdk 1.1.4 → 1.2.0
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/LICENSE +201 -201
- package/README.md +501 -0
- package/dist/MultichainSwapper.d.ts +45 -41
- package/dist/MultichainSwapper.js +70 -70
- package/dist/SmartChainAssets.d.ts +54 -54
- package/dist/SmartChainAssets.js +50 -50
- package/dist/chains/ChainInitializer.d.ts +13 -13
- package/dist/chains/ChainInitializer.js +2 -2
- package/dist/chains/solana/SolanaChainInitializer.d.ts +42 -42
- package/dist/chains/solana/SolanaChainInitializer.js +60 -60
- package/dist/chains/solana/SolanaChains.d.ts +16 -16
- package/dist/chains/solana/SolanaChains.js +20 -20
- package/dist/example/BrowserExample.d.ts +1 -0
- package/dist/example/BrowserExample.js +104 -0
- package/dist/example/NodeJSExample.d.ts +1 -0
- package/dist/example/NodeJSExample.js +104 -0
- package/dist/example/test.d.ts +1 -0
- package/dist/example/test.js +28 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +20 -20
- package/package.json +32 -32
- package/src/MultichainSwapper.ts +139 -134
- package/src/SmartChainAssets.ts +57 -57
- package/src/chains/ChainInitializer.ts +16 -16
- package/src/chains/solana/SolanaChainInitializer.ts +101 -101
- package/src/chains/solana/SolanaChains.ts +18 -18
- package/src/example/BrowserExample.ts +120 -0
- package/src/example/NodeJSExample.ts +120 -0
- package/src/index.ts +4 -4
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SolanaChains = void 0;
|
|
4
|
-
const sdk_lib_1 = require("@atomiqlabs/sdk-lib");
|
|
5
|
-
exports.SolanaChains = {
|
|
6
|
-
[sdk_lib_1.BitcoinNetwork.TESTNET]: {
|
|
7
|
-
addresses: {
|
|
8
|
-
swapContract: "4hfUykhqmD7ZRvNh1HuzVKEY7ToENixtdUKZspNDCrEM",
|
|
9
|
-
btcRelayContract: "3KHSHFpEK6bsjg3bqcxQ9qssJYtRCMi2S9TYVe4q6CQc"
|
|
10
|
-
},
|
|
11
|
-
trustedSwapForGasUrl: "https://node3.gethopa.com:24100"
|
|
12
|
-
},
|
|
13
|
-
[sdk_lib_1.BitcoinNetwork.MAINNET]: {
|
|
14
|
-
addresses: {
|
|
15
|
-
swapContract: "4hfUykhqmD7ZRvNh1HuzVKEY7ToENixtdUKZspNDCrEM",
|
|
16
|
-
btcRelayContract: "3KHSHFpEK6bsjg3bqcxQ9qssJYtRCMi2S9TYVe4q6CQc"
|
|
17
|
-
},
|
|
18
|
-
trustedSwapForGasUrl: "https://node3.gethopa.com:34100"
|
|
19
|
-
}
|
|
20
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SolanaChains = void 0;
|
|
4
|
+
const sdk_lib_1 = require("@atomiqlabs/sdk-lib");
|
|
5
|
+
exports.SolanaChains = {
|
|
6
|
+
[sdk_lib_1.BitcoinNetwork.TESTNET]: {
|
|
7
|
+
addresses: {
|
|
8
|
+
swapContract: "4hfUykhqmD7ZRvNh1HuzVKEY7ToENixtdUKZspNDCrEM",
|
|
9
|
+
btcRelayContract: "3KHSHFpEK6bsjg3bqcxQ9qssJYtRCMi2S9TYVe4q6CQc"
|
|
10
|
+
},
|
|
11
|
+
trustedSwapForGasUrl: "https://node3.gethopa.com:24100"
|
|
12
|
+
},
|
|
13
|
+
[sdk_lib_1.BitcoinNetwork.MAINNET]: {
|
|
14
|
+
addresses: {
|
|
15
|
+
swapContract: "4hfUykhqmD7ZRvNh1HuzVKEY7ToENixtdUKZspNDCrEM",
|
|
16
|
+
btcRelayContract: "3KHSHFpEK6bsjg3bqcxQ9qssJYtRCMi2S9TYVe4q6CQc"
|
|
17
|
+
},
|
|
18
|
+
trustedSwapForGasUrl: "https://node3.gethopa.com:34100"
|
|
19
|
+
}
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const __1 = require("../");
|
|
13
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
14
|
+
const BN = require("bn.js");
|
|
15
|
+
const solanaRpc = "https://api.mainnet-beta.solana.com";
|
|
16
|
+
let solanaSwapper;
|
|
17
|
+
function setupSwapper() {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
//Setup the multichain swapper
|
|
20
|
+
const swapper = new __1.MultichainSwapper({
|
|
21
|
+
chains: {
|
|
22
|
+
SOLANA: {
|
|
23
|
+
rpcUrl: solanaRpc
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
yield swapper.init();
|
|
28
|
+
//Create new random keypair wallet
|
|
29
|
+
const wallet = new __1.SolanaKeypairWallet(web3_js_1.Keypair.generate()); //This is just a dummy, you should load the wallet from file, or etc.
|
|
30
|
+
//Or in React, using solana wallet adapter
|
|
31
|
+
//const wallet = useAnchorWallet();
|
|
32
|
+
const signer = new __1.SolanaSigner(wallet);
|
|
33
|
+
//Extract a Solana specific swapper (used for swapping between Solana and Bitcoin) with a defined signer
|
|
34
|
+
solanaSwapper = swapper.withChain("SOLANA").withSigner(signer);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function createToBtcSwap() {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
const fromToken = __1.Tokens.SOLANA.SOL;
|
|
40
|
+
const toToken = __1.Tokens.BITCOIN.BTC;
|
|
41
|
+
const exactIn = false; //exactIn = false, so we specify the output amount
|
|
42
|
+
const amount = new BN(10000); //Amount in BTC base units - sats
|
|
43
|
+
const recipientBtcAddress = "bc1qtw67hj77rt8zrkkg3jgngutu0yfgt9czjwusxt"; //BTC address of the recipient
|
|
44
|
+
const swap = yield solanaSwapper.create(fromToken, toToken, amount, exactIn, recipientBtcAddress);
|
|
45
|
+
//Input amounts
|
|
46
|
+
const inputTokenAmount = swap.getInput().amount;
|
|
47
|
+
const inputValueInUsd = yield swap.getInput().usdValue();
|
|
48
|
+
//Output amounts
|
|
49
|
+
const outputTokenAmount = swap.getOutput().amount;
|
|
50
|
+
const outputValueInUsd = yield swap.getOutput().usdValue();
|
|
51
|
+
//Initiate the swap by locking up the SOL
|
|
52
|
+
yield swap.commit();
|
|
53
|
+
//Wait for bitcoin payout to happen
|
|
54
|
+
const paymentSuccess = yield swap.waitForPayment();
|
|
55
|
+
if (paymentSuccess) {
|
|
56
|
+
//Payment was successful, we can get the transaction id
|
|
57
|
+
const bitcoinTxId = swap.getBitcoinTxId();
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
//If payment is unsuccessful we can refund and get our funds back
|
|
61
|
+
yield swap.refund();
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function createFromBtcSwap() {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
const fromToken = __1.Tokens.BITCOIN.BTC;
|
|
68
|
+
const toToken = __1.Tokens.SOLANA.SOL;
|
|
69
|
+
const exactIn = true; //exactIn = true, so we specify the input amount
|
|
70
|
+
const amount = new BN(10000); //Amount in BTC base units - sats
|
|
71
|
+
const swap = yield solanaSwapper.create(fromToken, toToken, amount, exactIn);
|
|
72
|
+
//Input amounts
|
|
73
|
+
const inputTokenAmount = swap.getInput().amount; //Human readable input token amount with decimals
|
|
74
|
+
const inputValueInUsd = yield swap.getInput().usdValue(); //Fetches the USD value of the input
|
|
75
|
+
//Output amounts
|
|
76
|
+
const outputTokenAmount = swap.getOutput().amount; //Human readable output token amount with decimals
|
|
77
|
+
const outputValueInUsd = yield swap.getOutput().usdValue(); //Fetches the USD value of the output
|
|
78
|
+
//Initiate the swap, this will prompt a Solana transaction, as we need to open the BTC swap address
|
|
79
|
+
yield swap.commit();
|
|
80
|
+
const qrCodeData = swap.getQrData(); //Data that can be displayed as QR code - URL with the address and amount
|
|
81
|
+
const bitcoinAddress = swap.getBitcoinAddress(); //Bitcoin address to send the BTC to - exact amount needs to be sent!
|
|
82
|
+
const timeout = swap.getTimeoutTime(); //The BTC should be sent before the timeout
|
|
83
|
+
console.log("Please send exactly " + inputTokenAmount + " BTC to " + bitcoinAddress);
|
|
84
|
+
//Waits for bitcoin transaction to be received
|
|
85
|
+
yield swap.waitForBitcoinTransaction(null, null, (txId, //Transaction ID received
|
|
86
|
+
confirmations, //Current confirmation count of the transaction
|
|
87
|
+
targetConfirmations, //Required confirmations for the transaction to be accepted
|
|
88
|
+
transactionETAms //Estimated time in milliseconds till the transaction is accepted
|
|
89
|
+
) => {
|
|
90
|
+
//This callback receives periodic updates about the incoming transaction
|
|
91
|
+
console.log("Tx received: " + txId + " confirmations: " + confirmations + "/" + targetConfirmations + " ETA: " + transactionETAms + " ms");
|
|
92
|
+
}); //This returns as soon as the transaction is accepted
|
|
93
|
+
//Swap will get automatically claimed by the watchtowers
|
|
94
|
+
yield swap.waitTillClaimed();
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
function main() {
|
|
98
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
yield setupSwapper();
|
|
100
|
+
// await createToBtcSwap();
|
|
101
|
+
// await createFromBtcSwap();
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
main();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const __1 = require("../");
|
|
13
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
14
|
+
const BN = require("bn.js");
|
|
15
|
+
const fs_storage_1 = require("@atomiqlabs/sdk-lib/dist/fs-storage");
|
|
16
|
+
const solanaRpc = "https://api.mainnet-beta.solana.com";
|
|
17
|
+
let solanaSwapper;
|
|
18
|
+
function setupSwapper() {
|
|
19
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
+
//Setup the multichain swapper
|
|
21
|
+
const swapper = new __1.MultichainSwapper({
|
|
22
|
+
chains: {
|
|
23
|
+
SOLANA: {
|
|
24
|
+
rpcUrl: solanaRpc
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
//The following line is important for running on backend node.js,
|
|
28
|
+
// because the SDK by default uses browser's Indexed DB
|
|
29
|
+
storageCtor: (name) => new fs_storage_1.FileSystemStorageManager(name)
|
|
30
|
+
});
|
|
31
|
+
yield swapper.init();
|
|
32
|
+
//Create new random keypair wallet
|
|
33
|
+
const wallet = new __1.SolanaKeypairWallet(web3_js_1.Keypair.generate()); //This is just a dummy, you should load the wallet from file, or etc.
|
|
34
|
+
const signer = new __1.SolanaSigner(wallet);
|
|
35
|
+
//Extract a Solana specific swapper (used for swapping between Solana and Bitcoin) with a defined signer
|
|
36
|
+
solanaSwapper = swapper.withChain("SOLANA").withSigner(signer);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function createToBtcSwap() {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
const exactIn = false; //exactIn = false, so we specify the output amount
|
|
42
|
+
const amount = new BN(10000); //Amount in BTC base units - sats
|
|
43
|
+
const recipientBtcAddress = "bc1qtw67hj77rt8zrkkg3jgngutu0yfgt9czjwusxt"; //BTC address of the recipient
|
|
44
|
+
const swap = yield solanaSwapper.create(__1.Tokens.SOLANA.SOL, __1.Tokens.BITCOIN.BTC, amount, exactIn, recipientBtcAddress);
|
|
45
|
+
//Input amounts
|
|
46
|
+
const inputTokenAmount = swap.getInput().amount;
|
|
47
|
+
const inputValueInUsd = yield swap.getInput().usdValue();
|
|
48
|
+
//Output amounts
|
|
49
|
+
const outputTokenAmount = swap.getOutput().amount;
|
|
50
|
+
const outputValueInUsd = yield swap.getOutput().usdValue();
|
|
51
|
+
//Initiate the swap by locking up the SOL
|
|
52
|
+
yield swap.commit();
|
|
53
|
+
//Wait for bitcoin payout to happen
|
|
54
|
+
const paymentSuccess = yield swap.waitForPayment();
|
|
55
|
+
if (paymentSuccess) {
|
|
56
|
+
//Payment was successful, we can get the transaction id
|
|
57
|
+
const bitcoinTxId = swap.getBitcoinTxId();
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
//If payment is unsuccessful we can refund and get our funds back
|
|
61
|
+
yield swap.refund();
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function createFromBtcSwap() {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
const fromToken = __1.Tokens.BITCOIN.BTC;
|
|
68
|
+
const toToken = __1.Tokens.SOLANA.SOL;
|
|
69
|
+
const exactIn = true; //exactIn = true, so we specify the input amount
|
|
70
|
+
const amount = new BN(10000); //Amount in BTC base units - sats
|
|
71
|
+
const swap = yield solanaSwapper.create(fromToken, toToken, amount, exactIn);
|
|
72
|
+
//Input amounts
|
|
73
|
+
const inputTokenAmount = swap.getInput().amount; //Human readable input token amount with decimals
|
|
74
|
+
const inputValueInUsd = yield swap.getInput().usdValue(); //Fetches the USD value of the input
|
|
75
|
+
//Output amounts
|
|
76
|
+
const outputTokenAmount = swap.getOutput().amount; //Human readable output token amount with decimals
|
|
77
|
+
const outputValueInUsd = yield swap.getOutput().usdValue(); //Fetches the USD value of the output
|
|
78
|
+
//Initiate the swap, this will prompt a Solana transaction, as we need to open the BTC swap address
|
|
79
|
+
yield swap.commit();
|
|
80
|
+
const qrCodeData = swap.getQrData(); //Data that can be displayed as QR code - URL with the address and amount
|
|
81
|
+
const bitcoinAddress = swap.getBitcoinAddress(); //Bitcoin address to send the BTC to - exact amount needs to be sent!
|
|
82
|
+
const timeout = swap.getTimeoutTime(); //The BTC should be sent before the timeout
|
|
83
|
+
console.log("Please send exactly " + inputTokenAmount + " BTC to " + bitcoinAddress);
|
|
84
|
+
//Waits for bitcoin transaction to be received
|
|
85
|
+
yield swap.waitForBitcoinTransaction(null, null, (txId, //Transaction ID received
|
|
86
|
+
confirmations, //Current confirmation count of the transaction
|
|
87
|
+
targetConfirmations, //Required confirmations for the transaction to be accepted
|
|
88
|
+
transactionETAms //Estimated time in milliseconds till the transaction is accepted
|
|
89
|
+
) => {
|
|
90
|
+
//This callback receives periodic updates about the incoming transaction
|
|
91
|
+
console.log("Tx received: " + txId + " confirmations: " + confirmations + "/" + targetConfirmations + " ETA: " + transactionETAms + " ms");
|
|
92
|
+
}); //This returns as soon as the transaction is accepted
|
|
93
|
+
//Swap will get automatically claimed by the watchtowers
|
|
94
|
+
yield swap.waitTillClaimed();
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
function main() {
|
|
98
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
yield setupSwapper();
|
|
100
|
+
// await createToBtcSwap();
|
|
101
|
+
// await createFromBtcSwap();
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
main();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const http_1 = require("http");
|
|
13
|
+
function main() {
|
|
14
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
const server = (0, http_1.createServer)((req, res) => {
|
|
16
|
+
console.log(req.headers);
|
|
17
|
+
res.end();
|
|
18
|
+
}).listen(3000);
|
|
19
|
+
yield fetch('http://localhost:3000', {
|
|
20
|
+
headers: {
|
|
21
|
+
"sec-fetch-mode": "no-cache"
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
server.close();
|
|
25
|
+
process.exit(0);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
main();
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./MultichainSwapper";
|
|
2
|
-
export * from "@atomiqlabs/base";
|
|
3
|
-
export * from "@atomiqlabs/sdk-lib";
|
|
4
|
-
export * from "@atomiqlabs/chain-solana";
|
|
1
|
+
export * from "./MultichainSwapper";
|
|
2
|
+
export * from "@atomiqlabs/base";
|
|
3
|
+
export * from "@atomiqlabs/sdk-lib";
|
|
4
|
+
export * from "@atomiqlabs/chain-solana";
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./MultichainSwapper"), exports);
|
|
18
|
-
__exportStar(require("@atomiqlabs/base"), exports);
|
|
19
|
-
__exportStar(require("@atomiqlabs/sdk-lib"), exports);
|
|
20
|
-
__exportStar(require("@atomiqlabs/chain-solana"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./MultichainSwapper"), exports);
|
|
18
|
+
__exportStar(require("@atomiqlabs/base"), exports);
|
|
19
|
+
__exportStar(require("@atomiqlabs/sdk-lib"), exports);
|
|
20
|
+
__exportStar(require("@atomiqlabs/chain-solana"), exports);
|
package/package.json
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@atomiqlabs/sdk",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "atomiq labs SDK for cross-chain swaps between smart chains and bitcoin",
|
|
5
|
-
"main": "./dist/index.js",
|
|
6
|
-
"types:": "./dist/index.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
|
-
},
|
|
10
|
-
"files": [
|
|
11
|
-
"/dist",
|
|
12
|
-
"/src"
|
|
13
|
-
],
|
|
14
|
-
"keywords": [
|
|
15
|
-
"Bitcoin",
|
|
16
|
-
"Cross-chain",
|
|
17
|
-
"Cryptocurrency",
|
|
18
|
-
"Bridge",
|
|
19
|
-
"Trustless"
|
|
20
|
-
],
|
|
21
|
-
"author": "adambor",
|
|
22
|
-
"license": "ISC",
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"@atomiqlabs/base": "7.2.2",
|
|
25
|
-
"@atomiqlabs/chain-solana": "7.
|
|
26
|
-
"@atomiqlabs/sdk-lib": "10.2.5"
|
|
27
|
-
},
|
|
28
|
-
"devDependencies": {
|
|
29
|
-
"@types/bn.js": "5.1.5",
|
|
30
|
-
"typescript": "4.9.5"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@atomiqlabs/sdk",
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"description": "atomiq labs SDK for cross-chain swaps between smart chains and bitcoin",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types:": "./dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"/dist",
|
|
12
|
+
"/src"
|
|
13
|
+
],
|
|
14
|
+
"keywords": [
|
|
15
|
+
"Bitcoin",
|
|
16
|
+
"Cross-chain",
|
|
17
|
+
"Cryptocurrency",
|
|
18
|
+
"Bridge",
|
|
19
|
+
"Trustless"
|
|
20
|
+
],
|
|
21
|
+
"author": "adambor",
|
|
22
|
+
"license": "ISC",
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@atomiqlabs/base": "7.2.2",
|
|
25
|
+
"@atomiqlabs/chain-solana": "7.3.0",
|
|
26
|
+
"@atomiqlabs/sdk-lib": "10.2.5"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/bn.js": "5.1.5",
|
|
30
|
+
"typescript": "4.9.5"
|
|
31
|
+
}
|
|
32
|
+
}
|