@riftresearch/sdk 0.4.0 → 0.4.1
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 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,14 +28,10 @@ const walletClient = createWalletClient({
|
|
|
28
28
|
transport: http(process.env.ETH_RPC),
|
|
29
29
|
})
|
|
30
30
|
|
|
31
|
-
//
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// Initialize SDK
|
|
38
|
-
const sdk = new RiftSdk({})
|
|
31
|
+
// Initialize SDK (use your app name for analytics/support)
|
|
32
|
+
const sdk = new RiftSdk({
|
|
33
|
+
integratorName: "sdk-demo",
|
|
34
|
+
})
|
|
39
35
|
|
|
40
36
|
// Optionally create a custom ERC-20
|
|
41
37
|
const ethereumPepe = createCurrency({
|
|
@@ -60,7 +56,9 @@ console.log(`Fees: $${quote.fees.totalUsd.toFixed(2)}`)
|
|
|
60
56
|
const swap = await executeSwap({
|
|
61
57
|
publicClient,
|
|
62
58
|
walletClient,
|
|
63
|
-
sendBitcoin,
|
|
59
|
+
sendBitcoin: async ({ recipient, amountSats }) => {
|
|
60
|
+
// Call your bitcoin wallet's transfer function here
|
|
61
|
+
},
|
|
64
62
|
})
|
|
65
63
|
console.log(`Swap ID: ${swap.swapId}`)
|
|
66
64
|
|