@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 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
- const {psbt, psbtHex, psbtBase64, signInputs} = await swap.getFundedPsbt({
570
- address: "bc1pscnrk588hdj79mwccucu06007mj5np2jurwfwp5mvhkjldzyphzqyk62m5",
571
- publicKey: "03a2d8b728935f61d5bcba0cfb09c2c443c483b5c31ebd180e1833f37344bd34ba"
572
- });
573
- //Sign the psbt
574
- const signedPsbt = ...; //Can be hex or base64 encoded
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;
@@ -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
  };
@@ -39,7 +39,7 @@ const mempoolUrls = {
39
39
  ]
40
40
  };
41
41
  const nostrUrls = [
42
- "wss://relay.damus.io", "wss://nostr.einundzwanzig.space", "wss://nostr.mutinywallet.com", "wss://relay01.lnfi.network/", "wss://njump.me/", "wss://fiatjaf.com/"
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomiqlabs/sdk",
3
- "version": "7.0.2",
3
+ "version": "7.0.4",
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",
@@ -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
 
@@ -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://nostr.mutinywallet.com", "wss://relay01.lnfi.network/", "wss://njump.me/", "wss://fiatjaf.com/"
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>[]> {