@halliday-sdk/payments 2.8.0 → 3.0.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 +9 -9
- package/dist/paymentsApiClient/index.cjs.min.js +1 -1
- package/dist/paymentsApiClient/index.cjs.min.js.map +1 -1
- package/dist/paymentsApiClient/index.d.ts +3432 -1105
- package/dist/paymentsApiClient/index.esm.min.js +1 -1
- package/dist/paymentsApiClient/index.esm.min.js.map +1 -1
- package/dist/paymentsWidget/ethers/index.d.ts +1 -3
- package/dist/paymentsWidget/index.cjs.min.js +1 -1
- package/dist/paymentsWidget/index.cjs.min.js.map +1 -1
- package/dist/paymentsWidget/index.d.ts +110 -274
- package/dist/paymentsWidget/index.esm.min.js +1 -1
- package/dist/paymentsWidget/index.esm.min.js.map +1 -1
- package/dist/paymentsWidget/index.umd.min.js +1 -1
- package/dist/paymentsWidget/index.umd.min.js.map +1 -1
- package/dist/paymentsWidget/viem/index.d.ts +1 -3
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -70,17 +70,17 @@ npm install ethers @halliday-sdk/payments
|
|
|
70
70
|
```typescript
|
|
71
71
|
import { openHallidayPayments } from "@halliday-sdk/payments";
|
|
72
72
|
import { connectSigner } from "@halliday-sdk/payments/ethers";
|
|
73
|
+
import { BrowserProvider } from "ethers";
|
|
73
74
|
|
|
74
|
-
const
|
|
75
|
-
const
|
|
75
|
+
const address = (await window.ethereum.request({ method: "eth_requestAccounts" }))[0];
|
|
76
|
+
const connectedSigner = connectSigner(() => {
|
|
77
|
+
return new BrowserProvider(window.ethereum).getSigner();
|
|
78
|
+
});
|
|
76
79
|
|
|
77
80
|
await openHallidayPayments({
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
address: await signer.getAddress(),
|
|
83
|
-
...ownerMethods,
|
|
84
|
-
},
|
|
81
|
+
apiKey: "your-api-key",
|
|
82
|
+
outputs: ["ethereum:0x"],
|
|
83
|
+
destinationAddress: address,
|
|
84
|
+
owner: { address, ...connectedSigner },
|
|
85
85
|
});
|
|
86
86
|
```
|