@oasisprotocol/privana-sdk 0.5.3 → 0.5.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 +1 -38
- package/dist/{chunk-7KEQHWZB.cjs → chunk-FGWMLLEC.cjs} +3 -3
- package/dist/{chunk-7KEQHWZB.cjs.map → chunk-FGWMLLEC.cjs.map} +1 -1
- package/dist/{chunk-DZURIIRE.js → chunk-QQG4RPYZ.js} +3 -3
- package/dist/{chunk-DZURIIRE.js.map → chunk-QQG4RPYZ.js.map} +1 -1
- package/dist/index.cjs +1461 -2592
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +12 -44
- package/dist/index.d.ts +12 -44
- package/dist/index.js +1283 -2411
- package/dist/index.js.map +1 -1
- package/dist/on-ramp.cjs +3 -3
- package/dist/on-ramp.d.cts +2 -2
- package/dist/on-ramp.d.ts +2 -2
- package/dist/on-ramp.js +1 -1
- package/dist/{pending-lock-f4bWWTyN.d.cts → pending-lock-DSEqUHOw.d.cts} +1 -1
- package/dist/{pending-lock-f4bWWTyN.d.ts → pending-lock-DSEqUHOw.d.ts} +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -54,17 +54,7 @@ function App() {
|
|
|
54
54
|
`accountingContract` must be the deployed Privana accounting contract address for the same
|
|
55
55
|
environment as `apiUrl`.
|
|
56
56
|
|
|
57
|
-
### 2.
|
|
58
|
-
|
|
59
|
-
```tsx
|
|
60
|
-
import { PrivanaButton } from '@oasisprotocol/privana-sdk'
|
|
61
|
-
|
|
62
|
-
function MyComponent() {
|
|
63
|
-
return <PrivanaButton />
|
|
64
|
-
}
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### 3. Or build custom UI with hooks
|
|
57
|
+
### 2. Or build custom UI with hooks
|
|
68
58
|
|
|
69
59
|
```tsx
|
|
70
60
|
import {
|
|
@@ -225,33 +215,6 @@ Notes:
|
|
|
225
215
|
- staging end-to-end verification requires that registration on the staging deployment.
|
|
226
216
|
- the standalone localhost popup page used during Firefox debugging was diagnostic only; it is not part of the supported SDK integration path.
|
|
227
217
|
|
|
228
|
-
## Components
|
|
229
|
-
|
|
230
|
-
### PrivanaButton
|
|
231
|
-
|
|
232
|
-
A customizable button that opens the wallet modal.
|
|
233
|
-
|
|
234
|
-
```tsx
|
|
235
|
-
// Basic usage
|
|
236
|
-
<PrivanaButton />
|
|
237
|
-
|
|
238
|
-
// Custom text
|
|
239
|
-
<PrivanaButton>Open Wallet</PrivanaButton>
|
|
240
|
-
|
|
241
|
-
// Custom styling
|
|
242
|
-
<PrivanaButton variant="default" size="lg" className="my-class" />
|
|
243
|
-
|
|
244
|
-
// Full control with render prop
|
|
245
|
-
<PrivanaButton
|
|
246
|
-
renderButton={({ onClick, isOpen }) => (
|
|
247
|
-
<MyButton onClick={onClick}>Custom Button</MyButton>
|
|
248
|
-
)}
|
|
249
|
-
/>
|
|
250
|
-
|
|
251
|
-
// Show when wallet disconnected (disabled state)
|
|
252
|
-
<PrivanaButton hideWhenDisconnected={false} />
|
|
253
|
-
```
|
|
254
|
-
|
|
255
218
|
## Hooks
|
|
256
219
|
|
|
257
220
|
| Hook | Description |
|
|
@@ -37,7 +37,7 @@ var config_default = {
|
|
|
37
37
|
testnet: {
|
|
38
38
|
chainId: 23295,
|
|
39
39
|
name: "Sapphire Testnet",
|
|
40
|
-
accountingContract: "
|
|
40
|
+
accountingContract: "0x910CFfe4e8B27bc367F6E34D6D8e3C31DED68B6f",
|
|
41
41
|
apiUrl: "https://api.testnet.privana.finance"
|
|
42
42
|
},
|
|
43
43
|
mainnet: {
|
|
@@ -4470,5 +4470,5 @@ exports.useSafeAccount = useSafeAccount;
|
|
|
4470
4470
|
exports.useSafePrivanaContext = useSafePrivanaContext;
|
|
4471
4471
|
exports.useSiweAuth = useSiweAuth;
|
|
4472
4472
|
exports.waitForTransactionReceipt = waitForTransactionReceipt;
|
|
4473
|
-
//# sourceMappingURL=chunk-
|
|
4474
|
-
//# sourceMappingURL=chunk-
|
|
4473
|
+
//# sourceMappingURL=chunk-FGWMLLEC.cjs.map
|
|
4474
|
+
//# sourceMappingURL=chunk-FGWMLLEC.cjs.map
|