@atomiqlabs/sdk 7.0.3 → 7.0.5
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 +20 -0
- package/dist/SmartChainAssets.js +21 -0
- package/package.json +1 -1
- package/src/SmartChainAssets.ts +21 -0
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
|
|
@@ -99,6 +99,16 @@ export declare const SmartChainAssets: {
|
|
|
99
99
|
};
|
|
100
100
|
readonly name: "Citrea BTC";
|
|
101
101
|
};
|
|
102
|
+
readonly BTC: {
|
|
103
|
+
readonly pricing: {
|
|
104
|
+
readonly binancePair: "$fixed-100000000";
|
|
105
|
+
readonly okxPair: "$fixed-100000000";
|
|
106
|
+
readonly coinGeckoCoinId: "$fixed-100000000";
|
|
107
|
+
readonly coinPaprikaCoinId: "$fixed-100000000";
|
|
108
|
+
readonly krakenPair: "$fixed-100000000";
|
|
109
|
+
};
|
|
110
|
+
readonly name: "Bitcoin";
|
|
111
|
+
};
|
|
102
112
|
readonly BBTC: {
|
|
103
113
|
readonly pricing: {
|
|
104
114
|
readonly binancePair: "$fixed-100000000";
|
|
@@ -109,5 +119,15 @@ export declare const SmartChainAssets: {
|
|
|
109
119
|
};
|
|
110
120
|
readonly name: "Botanix BTC";
|
|
111
121
|
};
|
|
122
|
+
readonly ABTC: {
|
|
123
|
+
readonly pricing: {
|
|
124
|
+
readonly binancePair: "$fixed-100000000";
|
|
125
|
+
readonly okxPair: "$fixed-100000000";
|
|
126
|
+
readonly coinGeckoCoinId: "$fixed-100000000";
|
|
127
|
+
readonly coinPaprikaCoinId: "$fixed-100000000";
|
|
128
|
+
readonly krakenPair: "$fixed-100000000";
|
|
129
|
+
};
|
|
130
|
+
readonly name: "Alpen BTC";
|
|
131
|
+
};
|
|
112
132
|
};
|
|
113
133
|
export type SmartChainAssetTickers = keyof typeof SmartChainAssets;
|
package/dist/SmartChainAssets.js
CHANGED
|
@@ -102,6 +102,17 @@ exports.SmartChainAssets = {
|
|
|
102
102
|
},
|
|
103
103
|
name: "Citrea BTC"
|
|
104
104
|
},
|
|
105
|
+
//Used by both Botanix and Alpen
|
|
106
|
+
BTC: {
|
|
107
|
+
pricing: {
|
|
108
|
+
binancePair: "$fixed-100000000",
|
|
109
|
+
okxPair: "$fixed-100000000",
|
|
110
|
+
coinGeckoCoinId: "$fixed-100000000",
|
|
111
|
+
coinPaprikaCoinId: "$fixed-100000000",
|
|
112
|
+
krakenPair: "$fixed-100000000"
|
|
113
|
+
},
|
|
114
|
+
name: "Bitcoin"
|
|
115
|
+
},
|
|
105
116
|
BBTC: {
|
|
106
117
|
pricing: {
|
|
107
118
|
binancePair: "$fixed-100000000",
|
|
@@ -111,5 +122,15 @@ exports.SmartChainAssets = {
|
|
|
111
122
|
krakenPair: "$fixed-100000000"
|
|
112
123
|
},
|
|
113
124
|
name: "Botanix BTC"
|
|
125
|
+
},
|
|
126
|
+
ABTC: {
|
|
127
|
+
pricing: {
|
|
128
|
+
binancePair: "$fixed-100000000",
|
|
129
|
+
okxPair: "$fixed-100000000",
|
|
130
|
+
coinGeckoCoinId: "$fixed-100000000",
|
|
131
|
+
coinPaprikaCoinId: "$fixed-100000000",
|
|
132
|
+
krakenPair: "$fixed-100000000"
|
|
133
|
+
},
|
|
134
|
+
name: "Alpen BTC"
|
|
114
135
|
}
|
|
115
136
|
};
|
package/package.json
CHANGED
package/src/SmartChainAssets.ts
CHANGED
|
@@ -101,6 +101,17 @@ export const SmartChainAssets = {
|
|
|
101
101
|
},
|
|
102
102
|
name: "Citrea BTC"
|
|
103
103
|
},
|
|
104
|
+
//Used by both Botanix and Alpen
|
|
105
|
+
BTC: {
|
|
106
|
+
pricing: {
|
|
107
|
+
binancePair: "$fixed-100000000",
|
|
108
|
+
okxPair: "$fixed-100000000",
|
|
109
|
+
coinGeckoCoinId: "$fixed-100000000",
|
|
110
|
+
coinPaprikaCoinId: "$fixed-100000000",
|
|
111
|
+
krakenPair: "$fixed-100000000"
|
|
112
|
+
},
|
|
113
|
+
name: "Bitcoin"
|
|
114
|
+
},
|
|
104
115
|
BBTC: {
|
|
105
116
|
pricing: {
|
|
106
117
|
binancePair: "$fixed-100000000",
|
|
@@ -110,6 +121,16 @@ export const SmartChainAssets = {
|
|
|
110
121
|
krakenPair: "$fixed-100000000"
|
|
111
122
|
},
|
|
112
123
|
name: "Botanix BTC"
|
|
124
|
+
},
|
|
125
|
+
ABTC: {
|
|
126
|
+
pricing: {
|
|
127
|
+
binancePair: "$fixed-100000000",
|
|
128
|
+
okxPair: "$fixed-100000000",
|
|
129
|
+
coinGeckoCoinId: "$fixed-100000000",
|
|
130
|
+
coinPaprikaCoinId: "$fixed-100000000",
|
|
131
|
+
krakenPair: "$fixed-100000000"
|
|
132
|
+
},
|
|
133
|
+
name: "Alpen BTC"
|
|
113
134
|
}
|
|
114
135
|
} as const;
|
|
115
136
|
|