@atomiqlabs/sdk 7.0.2 → 7.0.4
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/README.md +7 -8
- package/dist/SmartChainAssets.d.ts +10 -0
- package/dist/SmartChainAssets.js +10 -0
- package/dist/SwapperFactory.js +1 -1
- package/package.json +1 -1
- package/src/SmartChainAssets.ts +10 -0
- package/src/SwapperFactory.ts +1 -1
package/README.md
CHANGED
|
@@ -564,15 +564,14 @@ if(!automaticSettlementSuccess) {
|
|
|
564
564
|
|
|
565
565
|
- __1.__ Send bitcoin transaction
|
|
566
566
|
|
|
567
|
-
- __a.__ Get funded PSBT and sign it
|
|
567
|
+
- __a.__ Get funded PSBT and sign it using external wallet (e.g. browser-based like Xverse, Unisat, Phantom, etc.)
|
|
568
568
|
```typescript
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
//
|
|
574
|
-
const
|
|
575
|
-
const bitcoinTxId = await swap.submitPsbt(signedPsbt);
|
|
569
|
+
//Obtain the funded PSBT (input already added) - ready for signing
|
|
570
|
+
const {psbt, psbtHex, psbtBase64, signInputs} = await swap.getFundedPsbt({address: "", publicKey: ""});
|
|
571
|
+
//Pass `psbtBase64` or `psbtHex` (and also `signInputs`) to an external signer like Xverse, Unisat, etc.
|
|
572
|
+
const signedPsbtHexOrBase64 = await <signPsbt function of the external wallet>; //Call the signPsbt function of the external signer with psbtBase64 or psbtHex and signInputs
|
|
573
|
+
//The SDK automatically recognizes hex & base64 encoded PSBTs
|
|
574
|
+
const bitcoinTxId = await swap.submitPsbt(signedPsbtHexOrBase64);
|
|
576
575
|
```
|
|
577
576
|
|
|
578
577
|
- __b.__ Or obtain raw PSBT to which inputs still need to be added
|
|
@@ -109,5 +109,15 @@ export declare const SmartChainAssets: {
|
|
|
109
109
|
};
|
|
110
110
|
readonly name: "Botanix BTC";
|
|
111
111
|
};
|
|
112
|
+
readonly ABTC: {
|
|
113
|
+
readonly pricing: {
|
|
114
|
+
readonly binancePair: "$fixed-100000000";
|
|
115
|
+
readonly okxPair: "$fixed-100000000";
|
|
116
|
+
readonly coinGeckoCoinId: "$fixed-100000000";
|
|
117
|
+
readonly coinPaprikaCoinId: "$fixed-100000000";
|
|
118
|
+
readonly krakenPair: "$fixed-100000000";
|
|
119
|
+
};
|
|
120
|
+
readonly name: "Alpen BTC";
|
|
121
|
+
};
|
|
112
122
|
};
|
|
113
123
|
export type SmartChainAssetTickers = keyof typeof SmartChainAssets;
|
package/dist/SmartChainAssets.js
CHANGED
|
@@ -111,5 +111,15 @@ exports.SmartChainAssets = {
|
|
|
111
111
|
krakenPair: "$fixed-100000000"
|
|
112
112
|
},
|
|
113
113
|
name: "Botanix BTC"
|
|
114
|
+
},
|
|
115
|
+
ABTC: {
|
|
116
|
+
pricing: {
|
|
117
|
+
binancePair: "$fixed-100000000",
|
|
118
|
+
okxPair: "$fixed-100000000",
|
|
119
|
+
coinGeckoCoinId: "$fixed-100000000",
|
|
120
|
+
coinPaprikaCoinId: "$fixed-100000000",
|
|
121
|
+
krakenPair: "$fixed-100000000"
|
|
122
|
+
},
|
|
123
|
+
name: "Alpen BTC"
|
|
114
124
|
}
|
|
115
125
|
};
|
package/dist/SwapperFactory.js
CHANGED
|
@@ -39,7 +39,7 @@ const mempoolUrls = {
|
|
|
39
39
|
]
|
|
40
40
|
};
|
|
41
41
|
const nostrUrls = [
|
|
42
|
-
"wss://relay.damus.io", "wss://nostr.einundzwanzig.space", "wss://
|
|
42
|
+
"wss://relay.damus.io", "wss://nostr.einundzwanzig.space", "wss://relay01.lnfi.network/", "wss://relay.puresignal.news/", "wss://relay.fountain.fm/", "wss://sendit.nosflare.com/"
|
|
43
43
|
];
|
|
44
44
|
class SwapperFactory {
|
|
45
45
|
constructor(initializers) {
|
package/package.json
CHANGED
package/src/SmartChainAssets.ts
CHANGED
|
@@ -110,6 +110,16 @@ export const SmartChainAssets = {
|
|
|
110
110
|
krakenPair: "$fixed-100000000"
|
|
111
111
|
},
|
|
112
112
|
name: "Botanix BTC"
|
|
113
|
+
},
|
|
114
|
+
ABTC: {
|
|
115
|
+
pricing: {
|
|
116
|
+
binancePair: "$fixed-100000000",
|
|
117
|
+
okxPair: "$fixed-100000000",
|
|
118
|
+
coinGeckoCoinId: "$fixed-100000000",
|
|
119
|
+
coinPaprikaCoinId: "$fixed-100000000",
|
|
120
|
+
krakenPair: "$fixed-100000000"
|
|
121
|
+
},
|
|
122
|
+
name: "Alpen BTC"
|
|
113
123
|
}
|
|
114
124
|
} as const;
|
|
115
125
|
|
package/src/SwapperFactory.ts
CHANGED
|
@@ -108,7 +108,7 @@ const mempoolUrls = {
|
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
const nostrUrls: string[] = [
|
|
111
|
-
"wss://relay.damus.io", "wss://nostr.einundzwanzig.space", "wss://
|
|
111
|
+
"wss://relay.damus.io", "wss://nostr.einundzwanzig.space", "wss://relay01.lnfi.network/", "wss://relay.puresignal.news/", "wss://relay.fountain.fm/", "wss://sendit.nosflare.com/"
|
|
112
112
|
];
|
|
113
113
|
|
|
114
114
|
export class SwapperFactory<T extends readonly ChainInitializer<any, any, any>[]> {
|