@explorins/pers-sdk 1.3.10 → 1.3.12
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 +183 -183
- package/dist/package.json +148 -148
- package/dist/web3/index.d.ts +1 -1
- package/dist/web3/index.d.ts.map +1 -1
- package/dist/web3-chain/index.d.ts +1 -1
- package/dist/web3-chain/services/getWeb3FCD.service.d.ts +1 -0
- package/dist/web3-chain/services/getWeb3FCD.service.d.ts.map +1 -1
- package/package.json +148 -148
package/README.md
CHANGED
|
@@ -1,184 +1,184 @@
|
|
|
1
|
-
# @explorins/pers-sdk
|
|
2
|
-
|
|
3
|
-
[](https://badge.fury.io/js/%40explorins%2Fpers-sdk)
|
|
4
|
-
[](https://opensource.org/licenses/MIT)
|
|
5
|
-
|
|
6
|
-
**Platform-agnostic TypeScript SDK for PERS (Phygital Experience Rewards System)** - Core SDK providing domain-driven business logic and API integration for tourism loyalty applications.
|
|
7
|
-
|
|
8
|
-
## PERS Ecosystem
|
|
9
|
-
|
|
10
|
-
PERS is a comprehensive tourism loyalty platform bridging physical and digital experiences through loyalty programs, campaign management, payments, blockchain integration, business management, and analytics.
|
|
11
|
-
|
|
12
|
-
## Installation
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
npm install @explorins/pers-sdk
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Platform Integration
|
|
19
|
-
|
|
20
|
-
- **[@explorins/pers-sdk-angular](https://www.npmjs.com/package/@explorins/pers-sdk-angular)** - Angular dependency injection wrapper
|
|
21
|
-
- **[@explorins/pers-sdk-react-native](https://www.npmjs.com/package/@explorins/pers-sdk-react-native)** - React Native providers and hooks
|
|
22
|
-
- **Direct Integration** - Node.js, Vanilla JS, or custom frameworks
|
|
23
|
-
|
|
24
|
-
## Quick Start
|
|
25
|
-
|
|
26
|
-
### Basic Setup
|
|
27
|
-
|
|
28
|
-
```typescript
|
|
29
|
-
import { PersApiClient } from '@explorins/pers-sdk/core';
|
|
30
|
-
|
|
31
|
-
// Custom HTTP client (platform-specific)
|
|
32
|
-
const httpClient = {
|
|
33
|
-
get: async (url: string) => fetch(url).then(r => r.json()),
|
|
34
|
-
post: async (url: string, data: any) =>
|
|
35
|
-
fetch(url, { method: 'POST', body: JSON.stringify(data) }).then(r => r.json()),
|
|
36
|
-
put: async (url: string, data: any) =>
|
|
37
|
-
fetch(url, { method: 'PUT', body: JSON.stringify(data) }).then(r => r.json()),
|
|
38
|
-
delete: async (url: string) =>
|
|
39
|
-
fetch(url, { method: 'DELETE' }).then(r => r.json())
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
// Create API client
|
|
43
|
-
const apiClient = new PersApiClient(httpClient, {
|
|
44
|
-
environment: 'production',
|
|
45
|
-
apiVersion: 'v2',
|
|
46
|
-
apiProjectKey: 'your-project-key'
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
// Login with external JWT (Firebase, Auth0, etc.)
|
|
50
|
-
const result = await apiClient.loginUser(firebaseJWT);
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### Platform Examples
|
|
54
|
-
|
|
55
|
-
#### Angular
|
|
56
|
-
|
|
57
|
-
```typescript
|
|
58
|
-
import { PERS_ANGULAR_SDK_SERVICE } from '@explorins/pers-sdk-angular';
|
|
59
|
-
|
|
60
|
-
@Injectable()
|
|
61
|
-
export class AuthService {
|
|
62
|
-
private persSDK = inject(PERS_ANGULAR_SDK_SERVICE);
|
|
63
|
-
|
|
64
|
-
async login(firebaseToken: string) {
|
|
65
|
-
return this.persSDK.api().loginUser(firebaseToken);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
#### React Native
|
|
71
|
-
|
|
72
|
-
```tsx
|
|
73
|
-
import { usePersSDK } from '@explorins/pers-sdk-react-native';
|
|
74
|
-
|
|
75
|
-
function LoginScreen() {
|
|
76
|
-
const { login } = usePersSDK();
|
|
77
|
-
|
|
78
|
-
const handleLogin = async () => {
|
|
79
|
-
await login(firebaseToken);
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## Domain Architecture
|
|
85
|
-
|
|
86
|
-
```typescript
|
|
87
|
-
// Domain-specific imports (recommended)
|
|
88
|
-
import { PersApiClient } from '@explorins/pers-sdk/core';
|
|
89
|
-
import { TokenSDK } from '@explorins/pers-sdk/token';
|
|
90
|
-
import { createBusinessSDK } from '@explorins/pers-sdk/business';
|
|
91
|
-
import { createCampaignSDK } from '@explorins/pers-sdk/campaign';
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
## Core Authentication
|
|
95
|
-
|
|
96
|
-
```typescript
|
|
97
|
-
// Login with external JWT
|
|
98
|
-
const authResult = await apiClient.loginUser(externalJWT);
|
|
99
|
-
|
|
100
|
-
// Check authentication status
|
|
101
|
-
if (apiClient.hasValidAuth()) {
|
|
102
|
-
console.log('User is authenticated');
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// Automatic token refresh handled internally
|
|
106
|
-
await apiClient.refreshToken();
|
|
107
|
-
|
|
108
|
-
// Clear authentication
|
|
109
|
-
await apiClient.clearAuth();
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
## Business Domain Examples
|
|
113
|
-
|
|
114
|
-
### Token Management
|
|
115
|
-
```typescript
|
|
116
|
-
import { TokenSDK } from '@explorins/pers-sdk/token';
|
|
117
|
-
|
|
118
|
-
const tokenSDK = new TokenSDK(apiClient);
|
|
119
|
-
const balances = await tokenSDK.getBalances(userId);
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
### Business Operations
|
|
123
|
-
```typescript
|
|
124
|
-
import { createBusinessSDK } from '@explorins/pers-sdk/business';
|
|
125
|
-
|
|
126
|
-
const businessSDK = createBusinessSDK(apiClient);
|
|
127
|
-
const businesses = await businessSDK.listBusinesses();
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
### Campaign Management
|
|
131
|
-
```typescript
|
|
132
|
-
import { createCampaignSDK } from '@explorins/pers-sdk/campaign';
|
|
133
|
-
|
|
134
|
-
const campaignSDK = createCampaignSDK(apiClient);
|
|
135
|
-
const campaigns = await campaignSDK.getActiveCampaigns();
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
## Available Domains
|
|
139
|
-
|
|
140
|
-
- `/core` - Core API client and authentication
|
|
141
|
-
- `/token` - Token balances and transfers
|
|
142
|
-
- `/business` - Business operations and management
|
|
143
|
-
- `/campaign` - Marketing campaigns and challenges
|
|
144
|
-
- `/transaction` - Payment and transaction history
|
|
145
|
-
- `/redemption` - Reward redemption system
|
|
146
|
-
- `/payment` - Payment processing
|
|
147
|
-
- `/user` - User profile management
|
|
148
|
-
- `/web3` - Blockchain and wallet integration
|
|
149
|
-
- `/analytics` - Reporting and analytics
|
|
150
|
-
- `/tenant` - Multi-tenant management
|
|
151
|
-
|
|
152
|
-
## Configuration
|
|
153
|
-
|
|
154
|
-
```typescript
|
|
155
|
-
const config = {
|
|
156
|
-
environment: 'production', // 'development' | 'staging' | 'production'
|
|
157
|
-
apiVersion: 'v2', // 'v1' | 'v1.8' | 'v1.9' | 'v2'
|
|
158
|
-
apiProjectKey: 'your-key', // Required: Your PERS project key
|
|
159
|
-
timeout: 30000, // Request timeout (default: 30s)
|
|
160
|
-
retries: 3 // Retry attempts (default: 3)
|
|
161
|
-
};
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
## Dependencies
|
|
165
|
-
|
|
166
|
-
- **`@explorins/web3-ts`** (^0.3.75) - Web3 blockchain integration
|
|
167
|
-
- **`jwt-decode`** (^4.0.0) - JWT token parsing
|
|
168
|
-
- **`@explorins/pers-shared`** (*) - Shared types (peer dependency)
|
|
169
|
-
- **`ethers`** (^6.15.0) - Ethereum integration (peer dependency)
|
|
170
|
-
|
|
171
|
-
## Related Packages
|
|
172
|
-
|
|
173
|
-
- [@explorins/pers-sdk-angular](https://www.npmjs.com/package/@explorins/pers-sdk-angular) - Angular integration
|
|
174
|
-
- [@explorins/pers-sdk-react-native](https://www.npmjs.com/package/@explorins/pers-sdk-react-native) - React Native integration
|
|
175
|
-
- [@explorins/pers-shared](https://www.npmjs.com/package/@explorins/pers-shared) - Shared types and DTOs
|
|
176
|
-
- [@explorins/web3-ts](https://www.npmjs.com/package/@explorins/web3-ts) - Web3 utilities
|
|
177
|
-
|
|
178
|
-
## Documentation
|
|
179
|
-
|
|
180
|
-
For comprehensive API documentation, usage guides, and examples, visit the [PERS SDK Documentation](https://docs.pers.ninja).
|
|
181
|
-
|
|
182
|
-
## License
|
|
183
|
-
|
|
1
|
+
# @explorins/pers-sdk
|
|
2
|
+
|
|
3
|
+
[](https://badge.fury.io/js/%40explorins%2Fpers-sdk)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
6
|
+
**Platform-agnostic TypeScript SDK for PERS (Phygital Experience Rewards System)** - Core SDK providing domain-driven business logic and API integration for tourism loyalty applications.
|
|
7
|
+
|
|
8
|
+
## PERS Ecosystem
|
|
9
|
+
|
|
10
|
+
PERS is a comprehensive tourism loyalty platform bridging physical and digital experiences through loyalty programs, campaign management, payments, blockchain integration, business management, and analytics.
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install @explorins/pers-sdk
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Platform Integration
|
|
19
|
+
|
|
20
|
+
- **[@explorins/pers-sdk-angular](https://www.npmjs.com/package/@explorins/pers-sdk-angular)** - Angular dependency injection wrapper
|
|
21
|
+
- **[@explorins/pers-sdk-react-native](https://www.npmjs.com/package/@explorins/pers-sdk-react-native)** - React Native providers and hooks
|
|
22
|
+
- **Direct Integration** - Node.js, Vanilla JS, or custom frameworks
|
|
23
|
+
|
|
24
|
+
## Quick Start
|
|
25
|
+
|
|
26
|
+
### Basic Setup
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
import { PersApiClient } from '@explorins/pers-sdk/core';
|
|
30
|
+
|
|
31
|
+
// Custom HTTP client (platform-specific)
|
|
32
|
+
const httpClient = {
|
|
33
|
+
get: async (url: string) => fetch(url).then(r => r.json()),
|
|
34
|
+
post: async (url: string, data: any) =>
|
|
35
|
+
fetch(url, { method: 'POST', body: JSON.stringify(data) }).then(r => r.json()),
|
|
36
|
+
put: async (url: string, data: any) =>
|
|
37
|
+
fetch(url, { method: 'PUT', body: JSON.stringify(data) }).then(r => r.json()),
|
|
38
|
+
delete: async (url: string) =>
|
|
39
|
+
fetch(url, { method: 'DELETE' }).then(r => r.json())
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// Create API client
|
|
43
|
+
const apiClient = new PersApiClient(httpClient, {
|
|
44
|
+
environment: 'production',
|
|
45
|
+
apiVersion: 'v2',
|
|
46
|
+
apiProjectKey: 'your-project-key'
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
// Login with external JWT (Firebase, Auth0, etc.)
|
|
50
|
+
const result = await apiClient.loginUser(firebaseJWT);
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Platform Examples
|
|
54
|
+
|
|
55
|
+
#### Angular
|
|
56
|
+
|
|
57
|
+
```typescript
|
|
58
|
+
import { PERS_ANGULAR_SDK_SERVICE } from '@explorins/pers-sdk-angular';
|
|
59
|
+
|
|
60
|
+
@Injectable()
|
|
61
|
+
export class AuthService {
|
|
62
|
+
private persSDK = inject(PERS_ANGULAR_SDK_SERVICE);
|
|
63
|
+
|
|
64
|
+
async login(firebaseToken: string) {
|
|
65
|
+
return this.persSDK.api().loginUser(firebaseToken);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
#### React Native
|
|
71
|
+
|
|
72
|
+
```tsx
|
|
73
|
+
import { usePersSDK } from '@explorins/pers-sdk-react-native';
|
|
74
|
+
|
|
75
|
+
function LoginScreen() {
|
|
76
|
+
const { login } = usePersSDK();
|
|
77
|
+
|
|
78
|
+
const handleLogin = async () => {
|
|
79
|
+
await login(firebaseToken);
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Domain Architecture
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
// Domain-specific imports (recommended)
|
|
88
|
+
import { PersApiClient } from '@explorins/pers-sdk/core';
|
|
89
|
+
import { TokenSDK } from '@explorins/pers-sdk/token';
|
|
90
|
+
import { createBusinessSDK } from '@explorins/pers-sdk/business';
|
|
91
|
+
import { createCampaignSDK } from '@explorins/pers-sdk/campaign';
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Core Authentication
|
|
95
|
+
|
|
96
|
+
```typescript
|
|
97
|
+
// Login with external JWT
|
|
98
|
+
const authResult = await apiClient.loginUser(externalJWT);
|
|
99
|
+
|
|
100
|
+
// Check authentication status
|
|
101
|
+
if (apiClient.hasValidAuth()) {
|
|
102
|
+
console.log('User is authenticated');
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Automatic token refresh handled internally
|
|
106
|
+
await apiClient.refreshToken();
|
|
107
|
+
|
|
108
|
+
// Clear authentication
|
|
109
|
+
await apiClient.clearAuth();
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Business Domain Examples
|
|
113
|
+
|
|
114
|
+
### Token Management
|
|
115
|
+
```typescript
|
|
116
|
+
import { TokenSDK } from '@explorins/pers-sdk/token';
|
|
117
|
+
|
|
118
|
+
const tokenSDK = new TokenSDK(apiClient);
|
|
119
|
+
const balances = await tokenSDK.getBalances(userId);
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Business Operations
|
|
123
|
+
```typescript
|
|
124
|
+
import { createBusinessSDK } from '@explorins/pers-sdk/business';
|
|
125
|
+
|
|
126
|
+
const businessSDK = createBusinessSDK(apiClient);
|
|
127
|
+
const businesses = await businessSDK.listBusinesses();
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Campaign Management
|
|
131
|
+
```typescript
|
|
132
|
+
import { createCampaignSDK } from '@explorins/pers-sdk/campaign';
|
|
133
|
+
|
|
134
|
+
const campaignSDK = createCampaignSDK(apiClient);
|
|
135
|
+
const campaigns = await campaignSDK.getActiveCampaigns();
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Available Domains
|
|
139
|
+
|
|
140
|
+
- `/core` - Core API client and authentication
|
|
141
|
+
- `/token` - Token balances and transfers
|
|
142
|
+
- `/business` - Business operations and management
|
|
143
|
+
- `/campaign` - Marketing campaigns and challenges
|
|
144
|
+
- `/transaction` - Payment and transaction history
|
|
145
|
+
- `/redemption` - Reward redemption system
|
|
146
|
+
- `/payment` - Payment processing
|
|
147
|
+
- `/user` - User profile management
|
|
148
|
+
- `/web3` - Blockchain and wallet integration
|
|
149
|
+
- `/analytics` - Reporting and analytics
|
|
150
|
+
- `/tenant` - Multi-tenant management
|
|
151
|
+
|
|
152
|
+
## Configuration
|
|
153
|
+
|
|
154
|
+
```typescript
|
|
155
|
+
const config = {
|
|
156
|
+
environment: 'production', // 'development' | 'staging' | 'production'
|
|
157
|
+
apiVersion: 'v2', // 'v1' | 'v1.8' | 'v1.9' | 'v2'
|
|
158
|
+
apiProjectKey: 'your-key', // Required: Your PERS project key
|
|
159
|
+
timeout: 30000, // Request timeout (default: 30s)
|
|
160
|
+
retries: 3 // Retry attempts (default: 3)
|
|
161
|
+
};
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Dependencies
|
|
165
|
+
|
|
166
|
+
- **`@explorins/web3-ts`** (^0.3.75) - Web3 blockchain integration
|
|
167
|
+
- **`jwt-decode`** (^4.0.0) - JWT token parsing
|
|
168
|
+
- **`@explorins/pers-shared`** (*) - Shared types (peer dependency)
|
|
169
|
+
- **`ethers`** (^6.15.0) - Ethereum integration (peer dependency)
|
|
170
|
+
|
|
171
|
+
## Related Packages
|
|
172
|
+
|
|
173
|
+
- [@explorins/pers-sdk-angular](https://www.npmjs.com/package/@explorins/pers-sdk-angular) - Angular integration
|
|
174
|
+
- [@explorins/pers-sdk-react-native](https://www.npmjs.com/package/@explorins/pers-sdk-react-native) - React Native integration
|
|
175
|
+
- [@explorins/pers-shared](https://www.npmjs.com/package/@explorins/pers-shared) - Shared types and DTOs
|
|
176
|
+
- [@explorins/web3-ts](https://www.npmjs.com/package/@explorins/web3-ts) - Web3 utilities
|
|
177
|
+
|
|
178
|
+
## Documentation
|
|
179
|
+
|
|
180
|
+
For comprehensive API documentation, usage guides, and examples, visit the [PERS SDK Documentation](https://docs.pers.ninja).
|
|
181
|
+
|
|
182
|
+
## License
|
|
183
|
+
|
|
184
184
|
MIT License - see [LICENSE](LICENSE) file for details.
|
package/dist/package.json
CHANGED
|
@@ -1,148 +1,148 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@explorins/pers-sdk",
|
|
3
|
-
"version": "1.3.
|
|
4
|
-
"description": "Platform-agnostic SDK for PERS (Phygital Experience Rewards System) - Core business logic and API integration",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/index.cjs",
|
|
7
|
-
"module": "./dist/index.js",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
|
-
"browser": {
|
|
10
|
-
"crypto": false,
|
|
11
|
-
"stream": false,
|
|
12
|
-
"http": false,
|
|
13
|
-
"https": false,
|
|
14
|
-
"os": false,
|
|
15
|
-
"net": false,
|
|
16
|
-
"tls": false,
|
|
17
|
-
"fs": false
|
|
18
|
-
},
|
|
19
|
-
"files": [
|
|
20
|
-
"dist/**/*"
|
|
21
|
-
],
|
|
22
|
-
"exports": {
|
|
23
|
-
".": {
|
|
24
|
-
"types": "./dist/index.d.ts",
|
|
25
|
-
"import": "./dist/index.js",
|
|
26
|
-
"require": "./dist/index.cjs"
|
|
27
|
-
},
|
|
28
|
-
"./analytics": {
|
|
29
|
-
"types": "./dist/analytics/index.d.ts",
|
|
30
|
-
"import": "./dist/analytics.js",
|
|
31
|
-
"require": "./dist/analytics.cjs"
|
|
32
|
-
},
|
|
33
|
-
"./auth": {
|
|
34
|
-
"types": "./dist/auth/index.d.ts",
|
|
35
|
-
"import": "./dist/auth.js",
|
|
36
|
-
"require": "./dist/auth.cjs"
|
|
37
|
-
},
|
|
38
|
-
"./business": {
|
|
39
|
-
"types": "./dist/business/index.d.ts",
|
|
40
|
-
"import": "./dist/business.js",
|
|
41
|
-
"require": "./dist/business.cjs"
|
|
42
|
-
},
|
|
43
|
-
"./campaign": {
|
|
44
|
-
"types": "./dist/campaign/index.d.ts",
|
|
45
|
-
"import": "./dist/campaign.js",
|
|
46
|
-
"require": "./dist/campaign.cjs"
|
|
47
|
-
},
|
|
48
|
-
"./core": {
|
|
49
|
-
"types": "./dist/core/index.d.ts",
|
|
50
|
-
"import": "./dist/core.js",
|
|
51
|
-
"require": "./dist/core.cjs"
|
|
52
|
-
},
|
|
53
|
-
"./donation": {
|
|
54
|
-
"types": "./dist/donation/index.d.ts",
|
|
55
|
-
"import": "./dist/donation.js",
|
|
56
|
-
"require": "./dist/donation.cjs"
|
|
57
|
-
},
|
|
58
|
-
"./payment": {
|
|
59
|
-
"types": "./dist/payment/index.d.ts",
|
|
60
|
-
"import": "./dist/payment.js",
|
|
61
|
-
"require": "./dist/payment.cjs"
|
|
62
|
-
},
|
|
63
|
-
"./redemption": {
|
|
64
|
-
"types": "./dist/redemption/index.d.ts",
|
|
65
|
-
"import": "./dist/redemption.js",
|
|
66
|
-
"require": "./dist/redemption.cjs"
|
|
67
|
-
},
|
|
68
|
-
"./tenant": {
|
|
69
|
-
"types": "./dist/tenant/index.d.ts",
|
|
70
|
-
"import": "./dist/tenant.js",
|
|
71
|
-
"require": "./dist/tenant.cjs"
|
|
72
|
-
},
|
|
73
|
-
"./token": {
|
|
74
|
-
"types": "./dist/token/index.d.ts",
|
|
75
|
-
"import": "./dist/token.js",
|
|
76
|
-
"require": "./dist/token.cjs"
|
|
77
|
-
},
|
|
78
|
-
"./transaction": {
|
|
79
|
-
"types": "./dist/transaction/index.d.ts",
|
|
80
|
-
"import": "./dist/transaction.js",
|
|
81
|
-
"require": "./dist/transaction.cjs"
|
|
82
|
-
},
|
|
83
|
-
"./user": {
|
|
84
|
-
"types": "./dist/user/index.d.ts",
|
|
85
|
-
"import": "./dist/user.js",
|
|
86
|
-
"require": "./dist/user.cjs"
|
|
87
|
-
},
|
|
88
|
-
"./user-status": {
|
|
89
|
-
"types": "./dist/user-status/index.d.ts",
|
|
90
|
-
"import": "./dist/user-status.js",
|
|
91
|
-
"require": "./dist/user-status.cjs"
|
|
92
|
-
},
|
|
93
|
-
"./web3-chain": {
|
|
94
|
-
"types": "./dist/web3-chain/index.d.ts",
|
|
95
|
-
"import": "./dist/web3-chain.js",
|
|
96
|
-
"require": "./dist/web3-chain.cjs"
|
|
97
|
-
},
|
|
98
|
-
"./web3": {
|
|
99
|
-
"types": "./dist/web3/index.d.ts",
|
|
100
|
-
"import": "./dist/web3.js",
|
|
101
|
-
"require": "./dist/web3.cjs"
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
"scripts": {
|
|
105
|
-
"build": "rollup -c",
|
|
106
|
-
"build:watch": "rollup -c --watch",
|
|
107
|
-
"clean": "rimraf dist",
|
|
108
|
-
"test": "jest",
|
|
109
|
-
"test:watch": "jest --watch",
|
|
110
|
-
"lint": "eslint src/**/*.ts",
|
|
111
|
-
"prepublishOnly": "npm run clean && npm run build",
|
|
112
|
-
"publish-version": "npm run clean && npm run build && npm version patch && npm publish"
|
|
113
|
-
},
|
|
114
|
-
"dependencies": {
|
|
115
|
-
"@explorins/web3-ts": "^0.3.75",
|
|
116
|
-
"jwt-decode": "^4.0.0"
|
|
117
|
-
},
|
|
118
|
-
"devDependencies": {
|
|
119
|
-
"@explorins/pers-shared": "^2.1.40",
|
|
120
|
-
"@rollup/plugin-commonjs": "^29.0.0",
|
|
121
|
-
"@rollup/plugin-json": "^6.1.0",
|
|
122
|
-
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
123
|
-
"@rollup/plugin-typescript": "^11.1.6",
|
|
124
|
-
"@types/jest": "^29.5.12",
|
|
125
|
-
"jest": "^29.7.0",
|
|
126
|
-
"rimraf": "^5.0.5",
|
|
127
|
-
"rollup": "^4.50.0",
|
|
128
|
-
"rollup-plugin-copy": "^3.5.0",
|
|
129
|
-
"typescript": "^5.4.5"
|
|
130
|
-
},
|
|
131
|
-
"peerDependencies": {
|
|
132
|
-
"@explorins/pers-shared": "*",
|
|
133
|
-
"ethers": "^6.15.0"
|
|
134
|
-
},
|
|
135
|
-
"peerDependenciesMeta": {},
|
|
136
|
-
"publishConfig": {
|
|
137
|
-
"access": "public",
|
|
138
|
-
"registry": "https://registry.npmjs.org/"
|
|
139
|
-
},
|
|
140
|
-
"keywords": [
|
|
141
|
-
"pers",
|
|
142
|
-
"business",
|
|
143
|
-
"sdk",
|
|
144
|
-
"platform-agnostic"
|
|
145
|
-
],
|
|
146
|
-
"author": "Explorins",
|
|
147
|
-
"license": "MIT"
|
|
148
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@explorins/pers-sdk",
|
|
3
|
+
"version": "1.3.12",
|
|
4
|
+
"description": "Platform-agnostic SDK for PERS (Phygital Experience Rewards System) - Core business logic and API integration",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"browser": {
|
|
10
|
+
"crypto": false,
|
|
11
|
+
"stream": false,
|
|
12
|
+
"http": false,
|
|
13
|
+
"https": false,
|
|
14
|
+
"os": false,
|
|
15
|
+
"net": false,
|
|
16
|
+
"tls": false,
|
|
17
|
+
"fs": false
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist/**/*"
|
|
21
|
+
],
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"import": "./dist/index.js",
|
|
26
|
+
"require": "./dist/index.cjs"
|
|
27
|
+
},
|
|
28
|
+
"./analytics": {
|
|
29
|
+
"types": "./dist/analytics/index.d.ts",
|
|
30
|
+
"import": "./dist/analytics.js",
|
|
31
|
+
"require": "./dist/analytics.cjs"
|
|
32
|
+
},
|
|
33
|
+
"./auth": {
|
|
34
|
+
"types": "./dist/auth/index.d.ts",
|
|
35
|
+
"import": "./dist/auth.js",
|
|
36
|
+
"require": "./dist/auth.cjs"
|
|
37
|
+
},
|
|
38
|
+
"./business": {
|
|
39
|
+
"types": "./dist/business/index.d.ts",
|
|
40
|
+
"import": "./dist/business.js",
|
|
41
|
+
"require": "./dist/business.cjs"
|
|
42
|
+
},
|
|
43
|
+
"./campaign": {
|
|
44
|
+
"types": "./dist/campaign/index.d.ts",
|
|
45
|
+
"import": "./dist/campaign.js",
|
|
46
|
+
"require": "./dist/campaign.cjs"
|
|
47
|
+
},
|
|
48
|
+
"./core": {
|
|
49
|
+
"types": "./dist/core/index.d.ts",
|
|
50
|
+
"import": "./dist/core.js",
|
|
51
|
+
"require": "./dist/core.cjs"
|
|
52
|
+
},
|
|
53
|
+
"./donation": {
|
|
54
|
+
"types": "./dist/donation/index.d.ts",
|
|
55
|
+
"import": "./dist/donation.js",
|
|
56
|
+
"require": "./dist/donation.cjs"
|
|
57
|
+
},
|
|
58
|
+
"./payment": {
|
|
59
|
+
"types": "./dist/payment/index.d.ts",
|
|
60
|
+
"import": "./dist/payment.js",
|
|
61
|
+
"require": "./dist/payment.cjs"
|
|
62
|
+
},
|
|
63
|
+
"./redemption": {
|
|
64
|
+
"types": "./dist/redemption/index.d.ts",
|
|
65
|
+
"import": "./dist/redemption.js",
|
|
66
|
+
"require": "./dist/redemption.cjs"
|
|
67
|
+
},
|
|
68
|
+
"./tenant": {
|
|
69
|
+
"types": "./dist/tenant/index.d.ts",
|
|
70
|
+
"import": "./dist/tenant.js",
|
|
71
|
+
"require": "./dist/tenant.cjs"
|
|
72
|
+
},
|
|
73
|
+
"./token": {
|
|
74
|
+
"types": "./dist/token/index.d.ts",
|
|
75
|
+
"import": "./dist/token.js",
|
|
76
|
+
"require": "./dist/token.cjs"
|
|
77
|
+
},
|
|
78
|
+
"./transaction": {
|
|
79
|
+
"types": "./dist/transaction/index.d.ts",
|
|
80
|
+
"import": "./dist/transaction.js",
|
|
81
|
+
"require": "./dist/transaction.cjs"
|
|
82
|
+
},
|
|
83
|
+
"./user": {
|
|
84
|
+
"types": "./dist/user/index.d.ts",
|
|
85
|
+
"import": "./dist/user.js",
|
|
86
|
+
"require": "./dist/user.cjs"
|
|
87
|
+
},
|
|
88
|
+
"./user-status": {
|
|
89
|
+
"types": "./dist/user-status/index.d.ts",
|
|
90
|
+
"import": "./dist/user-status.js",
|
|
91
|
+
"require": "./dist/user-status.cjs"
|
|
92
|
+
},
|
|
93
|
+
"./web3-chain": {
|
|
94
|
+
"types": "./dist/web3-chain/index.d.ts",
|
|
95
|
+
"import": "./dist/web3-chain.js",
|
|
96
|
+
"require": "./dist/web3-chain.cjs"
|
|
97
|
+
},
|
|
98
|
+
"./web3": {
|
|
99
|
+
"types": "./dist/web3/index.d.ts",
|
|
100
|
+
"import": "./dist/web3.js",
|
|
101
|
+
"require": "./dist/web3.cjs"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"scripts": {
|
|
105
|
+
"build": "rollup -c",
|
|
106
|
+
"build:watch": "rollup -c --watch",
|
|
107
|
+
"clean": "rimraf dist",
|
|
108
|
+
"test": "jest",
|
|
109
|
+
"test:watch": "jest --watch",
|
|
110
|
+
"lint": "eslint src/**/*.ts",
|
|
111
|
+
"prepublishOnly": "npm run clean && npm run build",
|
|
112
|
+
"publish-version": "npm run clean && npm run build && npm version patch && npm publish"
|
|
113
|
+
},
|
|
114
|
+
"dependencies": {
|
|
115
|
+
"@explorins/web3-ts": "^0.3.75",
|
|
116
|
+
"jwt-decode": "^4.0.0"
|
|
117
|
+
},
|
|
118
|
+
"devDependencies": {
|
|
119
|
+
"@explorins/pers-shared": "^2.1.40",
|
|
120
|
+
"@rollup/plugin-commonjs": "^29.0.0",
|
|
121
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
122
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
123
|
+
"@rollup/plugin-typescript": "^11.1.6",
|
|
124
|
+
"@types/jest": "^29.5.12",
|
|
125
|
+
"jest": "^29.7.0",
|
|
126
|
+
"rimraf": "^5.0.5",
|
|
127
|
+
"rollup": "^4.50.0",
|
|
128
|
+
"rollup-plugin-copy": "^3.5.0",
|
|
129
|
+
"typescript": "^5.4.5"
|
|
130
|
+
},
|
|
131
|
+
"peerDependencies": {
|
|
132
|
+
"@explorins/pers-shared": "*",
|
|
133
|
+
"ethers": "^6.15.0"
|
|
134
|
+
},
|
|
135
|
+
"peerDependenciesMeta": {},
|
|
136
|
+
"publishConfig": {
|
|
137
|
+
"access": "public",
|
|
138
|
+
"registry": "https://registry.npmjs.org/"
|
|
139
|
+
},
|
|
140
|
+
"keywords": [
|
|
141
|
+
"pers",
|
|
142
|
+
"business",
|
|
143
|
+
"sdk",
|
|
144
|
+
"platform-agnostic"
|
|
145
|
+
],
|
|
146
|
+
"author": "Explorins",
|
|
147
|
+
"license": "MIT"
|
|
148
|
+
}
|
package/dist/web3/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare function createWeb3SDK(apiClient: PersApiClient): {
|
|
|
8
8
|
fetchAndProcessMetadata: (tokenUri: string, chainId: number) => Promise<import("./application").TokenMetadata | null>;
|
|
9
9
|
applicationService: Web3ApplicationService;
|
|
10
10
|
};
|
|
11
|
-
export type { TokenBalanceRequest, TokenBalance, TokenMetadata, TokenCollection } from './application/web3-application.service';
|
|
11
|
+
export type { TokenBalanceRequest, TokenBalance, TokenMetadata, TokenCollection, TokenCollectionRequest } from './application/web3-application.service';
|
|
12
12
|
export * from './infrastructure';
|
|
13
13
|
export { Web3ApplicationService } from './application';
|
|
14
14
|
export type Web3SDK = ReturnType<typeof createWeb3SDK>;
|
package/dist/web3/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/web3/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAKxD,OAAO,EACL,sBAAsB,EACtB,KAAK,mBAAmB,EAIzB,MAAM,eAAe,CAAC;AAGvB,wBAAgB,aAAa,CAC3B,SAAS,EAAE,aAAa;+BAcK,mBAAmB;gCAGlB,mBAAmB;kCAGjB,mBAAmB;0BAG3B,MAAM,WAAW,MAAM;wCAGT,MAAM,WAAW,MAAM;;EAK9D;AAGD,YAAY,EACV,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/web3/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAKxD,OAAO,EACL,sBAAsB,EACtB,KAAK,mBAAmB,EAIzB,MAAM,eAAe,CAAC;AAGvB,wBAAgB,aAAa,CAC3B,SAAS,EAAE,aAAa;+BAcK,mBAAmB;gCAGlB,mBAAmB;kCAGjB,mBAAmB;0BAG3B,MAAM,WAAW,MAAM;wCAGT,MAAM,WAAW,MAAM;;EAK9D;AAGD,YAAY,EACV,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,eAAe,EACf,sBAAsB,EACvB,MAAM,wCAAwC,CAAC;AAChD,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAEvD,MAAM,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { PersApiClient } from '../core/pers-api-client';
|
|
|
2
2
|
import { Web3ChainApi } from './api/web3-chain-api';
|
|
3
3
|
import { Web3ChainService } from './services/web3-chain-service';
|
|
4
4
|
export declare function createWeb3ChainSDK(apiClient: PersApiClient): {
|
|
5
|
-
getEthersProviderByChainId: (chainId: number) => Promise<JsonRpcProvider>;
|
|
5
|
+
getEthersProviderByChainId: (chainId: number) => Promise<import("ethers").JsonRpcProvider>;
|
|
6
6
|
getChainDataById: (chainId: number) => Promise<import("./models").ChainData>;
|
|
7
7
|
api: Web3ChainApi;
|
|
8
8
|
service: Web3ChainService;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChainData } from "@explorins/web3-ts";
|
|
2
|
+
import { JsonRpcProvider } from '@explorins/web3-ts/ethers';
|
|
2
3
|
export declare const getWeb3ProviderFromChainData: (chainData: ChainData, timeout?: number, customUserAgentName?: string, tokenRefresher?: () => Promise<string>) => {
|
|
3
4
|
web3Provider: null;
|
|
4
5
|
ethersProvider: JsonRpcProvider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getWeb3FCD.service.d.ts","sourceRoot":"","sources":["../../../src/web3-chain/services/getWeb3FCD.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"getWeb3FCD.service.d.ts","sourceRoot":"","sources":["../../../src/web3-chain/services/getWeb3FCD.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAgB,MAAM,2BAA2B,CAAC;AAG1E,eAAO,MAAM,4BAA4B,GACvC,WAAW,SAAS,EACpB,gBAAe,EACf,4BAAwB,EACxB,iBAAiB,MAAM,OAAO,CAAC,MAAM,CAAC;;;;CA2CvC,CAAC;AAGF,eAAO,MAAM,wBAAwB,GACnC,WAAW,SAAS,EACpB,gBAAe,EACf,4BAAwB,EACxB,iBAAiB,MAAM,OAAO,CAAC,MAAM,CAAC,EACtC;;;;CAAiE;;;;EAuClE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,148 +1,148 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@explorins/pers-sdk",
|
|
3
|
-
"version": "1.3.
|
|
4
|
-
"description": "Platform-agnostic SDK for PERS (Phygital Experience Rewards System) - Core business logic and API integration",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/index.cjs",
|
|
7
|
-
"module": "./dist/index.js",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
|
-
"browser": {
|
|
10
|
-
"crypto": false,
|
|
11
|
-
"stream": false,
|
|
12
|
-
"http": false,
|
|
13
|
-
"https": false,
|
|
14
|
-
"os": false,
|
|
15
|
-
"net": false,
|
|
16
|
-
"tls": false,
|
|
17
|
-
"fs": false
|
|
18
|
-
},
|
|
19
|
-
"files": [
|
|
20
|
-
"dist/**/*"
|
|
21
|
-
],
|
|
22
|
-
"exports": {
|
|
23
|
-
".": {
|
|
24
|
-
"types": "./dist/index.d.ts",
|
|
25
|
-
"import": "./dist/index.js",
|
|
26
|
-
"require": "./dist/index.cjs"
|
|
27
|
-
},
|
|
28
|
-
"./analytics": {
|
|
29
|
-
"types": "./dist/analytics/index.d.ts",
|
|
30
|
-
"import": "./dist/analytics.js",
|
|
31
|
-
"require": "./dist/analytics.cjs"
|
|
32
|
-
},
|
|
33
|
-
"./auth": {
|
|
34
|
-
"types": "./dist/auth/index.d.ts",
|
|
35
|
-
"import": "./dist/auth.js",
|
|
36
|
-
"require": "./dist/auth.cjs"
|
|
37
|
-
},
|
|
38
|
-
"./business": {
|
|
39
|
-
"types": "./dist/business/index.d.ts",
|
|
40
|
-
"import": "./dist/business.js",
|
|
41
|
-
"require": "./dist/business.cjs"
|
|
42
|
-
},
|
|
43
|
-
"./campaign": {
|
|
44
|
-
"types": "./dist/campaign/index.d.ts",
|
|
45
|
-
"import": "./dist/campaign.js",
|
|
46
|
-
"require": "./dist/campaign.cjs"
|
|
47
|
-
},
|
|
48
|
-
"./core": {
|
|
49
|
-
"types": "./dist/core/index.d.ts",
|
|
50
|
-
"import": "./dist/core.js",
|
|
51
|
-
"require": "./dist/core.cjs"
|
|
52
|
-
},
|
|
53
|
-
"./donation": {
|
|
54
|
-
"types": "./dist/donation/index.d.ts",
|
|
55
|
-
"import": "./dist/donation.js",
|
|
56
|
-
"require": "./dist/donation.cjs"
|
|
57
|
-
},
|
|
58
|
-
"./payment": {
|
|
59
|
-
"types": "./dist/payment/index.d.ts",
|
|
60
|
-
"import": "./dist/payment.js",
|
|
61
|
-
"require": "./dist/payment.cjs"
|
|
62
|
-
},
|
|
63
|
-
"./redemption": {
|
|
64
|
-
"types": "./dist/redemption/index.d.ts",
|
|
65
|
-
"import": "./dist/redemption.js",
|
|
66
|
-
"require": "./dist/redemption.cjs"
|
|
67
|
-
},
|
|
68
|
-
"./tenant": {
|
|
69
|
-
"types": "./dist/tenant/index.d.ts",
|
|
70
|
-
"import": "./dist/tenant.js",
|
|
71
|
-
"require": "./dist/tenant.cjs"
|
|
72
|
-
},
|
|
73
|
-
"./token": {
|
|
74
|
-
"types": "./dist/token/index.d.ts",
|
|
75
|
-
"import": "./dist/token.js",
|
|
76
|
-
"require": "./dist/token.cjs"
|
|
77
|
-
},
|
|
78
|
-
"./transaction": {
|
|
79
|
-
"types": "./dist/transaction/index.d.ts",
|
|
80
|
-
"import": "./dist/transaction.js",
|
|
81
|
-
"require": "./dist/transaction.cjs"
|
|
82
|
-
},
|
|
83
|
-
"./user": {
|
|
84
|
-
"types": "./dist/user/index.d.ts",
|
|
85
|
-
"import": "./dist/user.js",
|
|
86
|
-
"require": "./dist/user.cjs"
|
|
87
|
-
},
|
|
88
|
-
"./user-status": {
|
|
89
|
-
"types": "./dist/user-status/index.d.ts",
|
|
90
|
-
"import": "./dist/user-status.js",
|
|
91
|
-
"require": "./dist/user-status.cjs"
|
|
92
|
-
},
|
|
93
|
-
"./web3-chain": {
|
|
94
|
-
"types": "./dist/web3-chain/index.d.ts",
|
|
95
|
-
"import": "./dist/web3-chain.js",
|
|
96
|
-
"require": "./dist/web3-chain.cjs"
|
|
97
|
-
},
|
|
98
|
-
"./web3": {
|
|
99
|
-
"types": "./dist/web3/index.d.ts",
|
|
100
|
-
"import": "./dist/web3.js",
|
|
101
|
-
"require": "./dist/web3.cjs"
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
"scripts": {
|
|
105
|
-
"build": "rollup -c",
|
|
106
|
-
"build:watch": "rollup -c --watch",
|
|
107
|
-
"clean": "rimraf dist",
|
|
108
|
-
"test": "jest",
|
|
109
|
-
"test:watch": "jest --watch",
|
|
110
|
-
"lint": "eslint src/**/*.ts",
|
|
111
|
-
"prepublishOnly": "npm run clean && npm run build",
|
|
112
|
-
"publish-version": "npm run clean && npm run build && npm version patch && npm publish"
|
|
113
|
-
},
|
|
114
|
-
"dependencies": {
|
|
115
|
-
"@explorins/web3-ts": "^0.3.75",
|
|
116
|
-
"jwt-decode": "^4.0.0"
|
|
117
|
-
},
|
|
118
|
-
"devDependencies": {
|
|
119
|
-
"@explorins/pers-shared": "^2.1.40",
|
|
120
|
-
"@rollup/plugin-commonjs": "^29.0.0",
|
|
121
|
-
"@rollup/plugin-json": "^6.1.0",
|
|
122
|
-
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
123
|
-
"@rollup/plugin-typescript": "^11.1.6",
|
|
124
|
-
"@types/jest": "^29.5.12",
|
|
125
|
-
"jest": "^29.7.0",
|
|
126
|
-
"rimraf": "^5.0.5",
|
|
127
|
-
"rollup": "^4.50.0",
|
|
128
|
-
"rollup-plugin-copy": "^3.5.0",
|
|
129
|
-
"typescript": "^5.4.5"
|
|
130
|
-
},
|
|
131
|
-
"peerDependencies": {
|
|
132
|
-
"@explorins/pers-shared": "*",
|
|
133
|
-
"ethers": "^6.15.0"
|
|
134
|
-
},
|
|
135
|
-
"peerDependenciesMeta": {},
|
|
136
|
-
"publishConfig": {
|
|
137
|
-
"access": "public",
|
|
138
|
-
"registry": "https://registry.npmjs.org/"
|
|
139
|
-
},
|
|
140
|
-
"keywords": [
|
|
141
|
-
"pers",
|
|
142
|
-
"business",
|
|
143
|
-
"sdk",
|
|
144
|
-
"platform-agnostic"
|
|
145
|
-
],
|
|
146
|
-
"author": "Explorins",
|
|
147
|
-
"license": "MIT"
|
|
148
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@explorins/pers-sdk",
|
|
3
|
+
"version": "1.3.12",
|
|
4
|
+
"description": "Platform-agnostic SDK for PERS (Phygital Experience Rewards System) - Core business logic and API integration",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"browser": {
|
|
10
|
+
"crypto": false,
|
|
11
|
+
"stream": false,
|
|
12
|
+
"http": false,
|
|
13
|
+
"https": false,
|
|
14
|
+
"os": false,
|
|
15
|
+
"net": false,
|
|
16
|
+
"tls": false,
|
|
17
|
+
"fs": false
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist/**/*"
|
|
21
|
+
],
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"import": "./dist/index.js",
|
|
26
|
+
"require": "./dist/index.cjs"
|
|
27
|
+
},
|
|
28
|
+
"./analytics": {
|
|
29
|
+
"types": "./dist/analytics/index.d.ts",
|
|
30
|
+
"import": "./dist/analytics.js",
|
|
31
|
+
"require": "./dist/analytics.cjs"
|
|
32
|
+
},
|
|
33
|
+
"./auth": {
|
|
34
|
+
"types": "./dist/auth/index.d.ts",
|
|
35
|
+
"import": "./dist/auth.js",
|
|
36
|
+
"require": "./dist/auth.cjs"
|
|
37
|
+
},
|
|
38
|
+
"./business": {
|
|
39
|
+
"types": "./dist/business/index.d.ts",
|
|
40
|
+
"import": "./dist/business.js",
|
|
41
|
+
"require": "./dist/business.cjs"
|
|
42
|
+
},
|
|
43
|
+
"./campaign": {
|
|
44
|
+
"types": "./dist/campaign/index.d.ts",
|
|
45
|
+
"import": "./dist/campaign.js",
|
|
46
|
+
"require": "./dist/campaign.cjs"
|
|
47
|
+
},
|
|
48
|
+
"./core": {
|
|
49
|
+
"types": "./dist/core/index.d.ts",
|
|
50
|
+
"import": "./dist/core.js",
|
|
51
|
+
"require": "./dist/core.cjs"
|
|
52
|
+
},
|
|
53
|
+
"./donation": {
|
|
54
|
+
"types": "./dist/donation/index.d.ts",
|
|
55
|
+
"import": "./dist/donation.js",
|
|
56
|
+
"require": "./dist/donation.cjs"
|
|
57
|
+
},
|
|
58
|
+
"./payment": {
|
|
59
|
+
"types": "./dist/payment/index.d.ts",
|
|
60
|
+
"import": "./dist/payment.js",
|
|
61
|
+
"require": "./dist/payment.cjs"
|
|
62
|
+
},
|
|
63
|
+
"./redemption": {
|
|
64
|
+
"types": "./dist/redemption/index.d.ts",
|
|
65
|
+
"import": "./dist/redemption.js",
|
|
66
|
+
"require": "./dist/redemption.cjs"
|
|
67
|
+
},
|
|
68
|
+
"./tenant": {
|
|
69
|
+
"types": "./dist/tenant/index.d.ts",
|
|
70
|
+
"import": "./dist/tenant.js",
|
|
71
|
+
"require": "./dist/tenant.cjs"
|
|
72
|
+
},
|
|
73
|
+
"./token": {
|
|
74
|
+
"types": "./dist/token/index.d.ts",
|
|
75
|
+
"import": "./dist/token.js",
|
|
76
|
+
"require": "./dist/token.cjs"
|
|
77
|
+
},
|
|
78
|
+
"./transaction": {
|
|
79
|
+
"types": "./dist/transaction/index.d.ts",
|
|
80
|
+
"import": "./dist/transaction.js",
|
|
81
|
+
"require": "./dist/transaction.cjs"
|
|
82
|
+
},
|
|
83
|
+
"./user": {
|
|
84
|
+
"types": "./dist/user/index.d.ts",
|
|
85
|
+
"import": "./dist/user.js",
|
|
86
|
+
"require": "./dist/user.cjs"
|
|
87
|
+
},
|
|
88
|
+
"./user-status": {
|
|
89
|
+
"types": "./dist/user-status/index.d.ts",
|
|
90
|
+
"import": "./dist/user-status.js",
|
|
91
|
+
"require": "./dist/user-status.cjs"
|
|
92
|
+
},
|
|
93
|
+
"./web3-chain": {
|
|
94
|
+
"types": "./dist/web3-chain/index.d.ts",
|
|
95
|
+
"import": "./dist/web3-chain.js",
|
|
96
|
+
"require": "./dist/web3-chain.cjs"
|
|
97
|
+
},
|
|
98
|
+
"./web3": {
|
|
99
|
+
"types": "./dist/web3/index.d.ts",
|
|
100
|
+
"import": "./dist/web3.js",
|
|
101
|
+
"require": "./dist/web3.cjs"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"scripts": {
|
|
105
|
+
"build": "rollup -c",
|
|
106
|
+
"build:watch": "rollup -c --watch",
|
|
107
|
+
"clean": "rimraf dist",
|
|
108
|
+
"test": "jest",
|
|
109
|
+
"test:watch": "jest --watch",
|
|
110
|
+
"lint": "eslint src/**/*.ts",
|
|
111
|
+
"prepublishOnly": "npm run clean && npm run build",
|
|
112
|
+
"publish-version": "npm run clean && npm run build && npm version patch && npm publish"
|
|
113
|
+
},
|
|
114
|
+
"dependencies": {
|
|
115
|
+
"@explorins/web3-ts": "^0.3.75",
|
|
116
|
+
"jwt-decode": "^4.0.0"
|
|
117
|
+
},
|
|
118
|
+
"devDependencies": {
|
|
119
|
+
"@explorins/pers-shared": "^2.1.40",
|
|
120
|
+
"@rollup/plugin-commonjs": "^29.0.0",
|
|
121
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
122
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
123
|
+
"@rollup/plugin-typescript": "^11.1.6",
|
|
124
|
+
"@types/jest": "^29.5.12",
|
|
125
|
+
"jest": "^29.7.0",
|
|
126
|
+
"rimraf": "^5.0.5",
|
|
127
|
+
"rollup": "^4.50.0",
|
|
128
|
+
"rollup-plugin-copy": "^3.5.0",
|
|
129
|
+
"typescript": "^5.4.5"
|
|
130
|
+
},
|
|
131
|
+
"peerDependencies": {
|
|
132
|
+
"@explorins/pers-shared": "*",
|
|
133
|
+
"ethers": "^6.15.0"
|
|
134
|
+
},
|
|
135
|
+
"peerDependenciesMeta": {},
|
|
136
|
+
"publishConfig": {
|
|
137
|
+
"access": "public",
|
|
138
|
+
"registry": "https://registry.npmjs.org/"
|
|
139
|
+
},
|
|
140
|
+
"keywords": [
|
|
141
|
+
"pers",
|
|
142
|
+
"business",
|
|
143
|
+
"sdk",
|
|
144
|
+
"platform-agnostic"
|
|
145
|
+
],
|
|
146
|
+
"author": "Explorins",
|
|
147
|
+
"license": "MIT"
|
|
148
|
+
}
|