suiport-sdk 0.1.0
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 +61 -0
- package/dist/components/index.cjs +1701 -0
- package/dist/components/index.cjs.map +1 -0
- package/dist/components/index.d.cts +2 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1694 -0
- package/dist/components/index.js.map +1 -0
- package/dist/core/index.cjs +589 -0
- package/dist/core/index.cjs.map +1 -0
- package/dist/core/index.d.cts +319 -0
- package/dist/core/index.d.ts +319 -0
- package/dist/core/index.js +499 -0
- package/dist/core/index.js.map +1 -0
- package/dist/index-DPKoi9iF.d.cts +65 -0
- package/dist/index-DPKoi9iF.d.ts +65 -0
- package/dist/index.cjs +1857 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +50 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.js +1760 -0
- package/dist/index.js.map +1 -0
- package/package.json +67 -0
package/README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# @suiport/sdk
|
|
2
|
+
|
|
3
|
+
Cross-chain payment SDK for Sui. Accept payments from any blockchain.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @suiport/sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { initSuiport, SuiportButton } from '@suiport/sdk'
|
|
15
|
+
|
|
16
|
+
// Initialize once at app startup
|
|
17
|
+
initSuiport({
|
|
18
|
+
apiKey: 'your-near-api-key',
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
// Add the button anywhere
|
|
22
|
+
function PaymentPage() {
|
|
23
|
+
return (
|
|
24
|
+
<SuiportButton
|
|
25
|
+
recipient="0x..." // Sui wallet address
|
|
26
|
+
destinationToken="suiUSDC"
|
|
27
|
+
onSuccess={(result) => {
|
|
28
|
+
console.log('Payment complete!', result.txHash)
|
|
29
|
+
}}
|
|
30
|
+
/>
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Features
|
|
36
|
+
|
|
37
|
+
- 🌐 Accept payments from 22+ blockchains
|
|
38
|
+
- ⚡ Powered by NEAR Intents (sub-minute settlement)
|
|
39
|
+
- 💎 Premium glassmorphism UI
|
|
40
|
+
- 🔧 Fully customizable via hooks
|
|
41
|
+
|
|
42
|
+
## API
|
|
43
|
+
|
|
44
|
+
### Components
|
|
45
|
+
|
|
46
|
+
- `SuiportButton` - Drop-in payment button
|
|
47
|
+
- `SuiportModal` - Payment modal component
|
|
48
|
+
|
|
49
|
+
### Hooks
|
|
50
|
+
|
|
51
|
+
- `useSuiportPayment` - Full control over payment flow
|
|
52
|
+
|
|
53
|
+
### Core Functions
|
|
54
|
+
|
|
55
|
+
- `initSuiport(config)` - Initialize SDK
|
|
56
|
+
- `getQuote(options)` - Get swap quote
|
|
57
|
+
- `getExecutionStatus(depositAddress)` - Check status
|
|
58
|
+
|
|
59
|
+
## License
|
|
60
|
+
|
|
61
|
+
MIT
|