@explorins/pers-sdk 1.2.1 → 1.2.3
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/dist/auth-admin/api/auth-admin-api.d.ts.map +1 -1
- package/dist/auth-admin/index.d.ts +2 -2
- package/dist/auth-admin.cjs +2 -1
- package/dist/auth-admin.cjs.map +1 -1
- package/dist/auth-admin.js +2 -1
- package/dist/auth-admin.js.map +1 -1
- package/dist/business/index.d.ts +9 -9
- package/dist/campaign/index.d.ts +19 -19
- package/dist/donation/index.d.ts +1 -1
- package/dist/donation.cjs +1 -1
- package/dist/donation.cjs.map +1 -1
- package/dist/donation.js +1 -1
- package/dist/donation.js.map +1 -1
- package/dist/index.cjs +287 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +287 -43
- package/dist/index.js.map +1 -1
- package/dist/package.json +129 -129
- package/dist/payment/index.d.ts +6 -6
- package/dist/redemption/index.d.ts +10 -10
- package/dist/tenant/index.d.ts +4 -4
- package/dist/transaction/index.d.ts +8 -8
- package/dist/web3/index.d.ts +1 -2
- package/dist/web3/index.d.ts.map +1 -1
- package/dist/web3-chain/services/getWeb3FCD.service.d.ts +9 -0
- package/dist/web3-chain/services/getWeb3FCD.service.d.ts.map +1 -1
- package/dist/web3-chain/services/provider.service.d.ts +3 -5
- package/dist/web3-chain/services/provider.service.d.ts.map +1 -1
- package/dist/web3-chain/services/public-http-provider.service.d.ts +0 -7
- package/dist/web3-chain/services/public-http-provider.service.d.ts.map +1 -1
- package/dist/web3-chain.cjs +279 -40
- package/dist/web3-chain.cjs.map +1 -1
- package/dist/web3-chain.js +279 -40
- package/dist/web3-chain.js.map +1 -1
- package/dist/web3.cjs +371 -3
- package/dist/web3.cjs.map +1 -1
- package/dist/web3.js +371 -3
- package/dist/web3.js.map +1 -1
- package/package.json +129 -129
package/dist/package.json
CHANGED
|
@@ -1,129 +1,129 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@explorins/pers-sdk",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "Platform-agnostic SDK for PERS (Phygital Experience Rewards System) - Production Defaults",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/index.cjs",
|
|
7
|
-
"module": "./dist/index.js",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
|
-
"files": [
|
|
10
|
-
"dist/**/*"
|
|
11
|
-
],
|
|
12
|
-
"exports": {
|
|
13
|
-
".": {
|
|
14
|
-
"types": "./dist/index.d.ts",
|
|
15
|
-
"import": "./dist/index.js",
|
|
16
|
-
"require": "./dist/index.cjs"
|
|
17
|
-
},
|
|
18
|
-
"./analytics": {
|
|
19
|
-
"types": "./dist/analytics/index.d.ts",
|
|
20
|
-
"import": "./dist/analytics.js",
|
|
21
|
-
"require": "./dist/analytics.cjs"
|
|
22
|
-
},
|
|
23
|
-
"./auth-admin": {
|
|
24
|
-
"types": "./dist/auth-admin/index.d.ts",
|
|
25
|
-
"import": "./dist/auth-admin.js",
|
|
26
|
-
"require": "./dist/auth-admin.cjs"
|
|
27
|
-
},
|
|
28
|
-
"./business": {
|
|
29
|
-
"types": "./dist/business/index.d.ts",
|
|
30
|
-
"import": "./dist/business.js",
|
|
31
|
-
"require": "./dist/business.cjs"
|
|
32
|
-
},
|
|
33
|
-
"./campaign": {
|
|
34
|
-
"types": "./dist/campaign/index.d.ts",
|
|
35
|
-
"import": "./dist/campaign.js",
|
|
36
|
-
"require": "./dist/campaign.cjs"
|
|
37
|
-
},
|
|
38
|
-
"./core": {
|
|
39
|
-
"types": "./dist/core/index.d.ts",
|
|
40
|
-
"import": "./dist/core.js",
|
|
41
|
-
"require": "./dist/core.cjs"
|
|
42
|
-
},
|
|
43
|
-
"./donation": {
|
|
44
|
-
"types": "./dist/donation/index.d.ts",
|
|
45
|
-
"import": "./dist/donation.js",
|
|
46
|
-
"require": "./dist/donation.cjs"
|
|
47
|
-
},
|
|
48
|
-
"./payment": {
|
|
49
|
-
"types": "./dist/payment/index.d.ts",
|
|
50
|
-
"import": "./dist/payment.js",
|
|
51
|
-
"require": "./dist/payment.cjs"
|
|
52
|
-
},
|
|
53
|
-
"./redemption": {
|
|
54
|
-
"types": "./dist/redemption/index.d.ts",
|
|
55
|
-
"import": "./dist/redemption.js",
|
|
56
|
-
"require": "./dist/redemption.cjs"
|
|
57
|
-
},
|
|
58
|
-
"./tenant": {
|
|
59
|
-
"types": "./dist/tenant/index.d.ts",
|
|
60
|
-
"import": "./dist/tenant.js",
|
|
61
|
-
"require": "./dist/tenant.cjs"
|
|
62
|
-
},
|
|
63
|
-
"./token": {
|
|
64
|
-
"types": "./dist/token/index.d.ts",
|
|
65
|
-
"import": "./dist/token.js",
|
|
66
|
-
"require": "./dist/token.cjs"
|
|
67
|
-
},
|
|
68
|
-
"./transaction": {
|
|
69
|
-
"types": "./dist/transaction/index.d.ts",
|
|
70
|
-
"import": "./dist/transaction.js",
|
|
71
|
-
"require": "./dist/transaction.cjs"
|
|
72
|
-
},
|
|
73
|
-
"./user": {
|
|
74
|
-
"types": "./dist/user/index.d.ts",
|
|
75
|
-
"import": "./dist/user.js",
|
|
76
|
-
"require": "./dist/user.cjs"
|
|
77
|
-
},
|
|
78
|
-
"./user-status": {
|
|
79
|
-
"types": "./dist/user-status/index.d.ts",
|
|
80
|
-
"import": "./dist/user-status.js",
|
|
81
|
-
"require": "./dist/user-status.cjs"
|
|
82
|
-
},
|
|
83
|
-
"./web3-chain": {
|
|
84
|
-
"types": "./dist/web3-chain/index.d.ts",
|
|
85
|
-
"import": "./dist/web3-chain.js",
|
|
86
|
-
"require": "./dist/web3-chain.cjs"
|
|
87
|
-
},
|
|
88
|
-
"./web3": {
|
|
89
|
-
"types": "./dist/web3/index.d.ts",
|
|
90
|
-
"import": "./dist/web3.js",
|
|
91
|
-
"require": "./dist/web3.cjs"
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
"scripts": {
|
|
95
|
-
"build": "rollup -c",
|
|
96
|
-
"build:watch": "rollup -c --watch",
|
|
97
|
-
"clean": "rimraf dist",
|
|
98
|
-
"test": "jest",
|
|
99
|
-
"test:watch": "jest --watch",
|
|
100
|
-
"lint": "eslint src/**/*.ts",
|
|
101
|
-
"prepublishOnly": "npm run clean && npm run build",
|
|
102
|
-
"publish-version": "npm publish"
|
|
103
|
-
},
|
|
104
|
-
"devDependencies": {
|
|
105
|
-
"@rollup/plugin-typescript": "^11.1.6",
|
|
106
|
-
"@types/jest": "^29.5.12",
|
|
107
|
-
"jest": "^29.7.0",
|
|
108
|
-
"rimraf": "^5.0.5",
|
|
109
|
-
"rollup": "^4.50.0",
|
|
110
|
-
"rollup-plugin-copy": "^3.5.0",
|
|
111
|
-
"typescript": "^5.4.5"
|
|
112
|
-
},
|
|
113
|
-
"peerDependencies": {
|
|
114
|
-
"@explorins/pers-shared": "*",
|
|
115
|
-
"jwt-decode": "^3.0.0 || ^4.0.0"
|
|
116
|
-
},
|
|
117
|
-
"publishConfig": {
|
|
118
|
-
"access": "public",
|
|
119
|
-
"registry": "https://registry.npmjs.org/"
|
|
120
|
-
},
|
|
121
|
-
"keywords": [
|
|
122
|
-
"pers",
|
|
123
|
-
"business",
|
|
124
|
-
"sdk",
|
|
125
|
-
"platform-agnostic"
|
|
126
|
-
],
|
|
127
|
-
"author": "Explorins",
|
|
128
|
-
"license": "MIT"
|
|
129
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@explorins/pers-sdk",
|
|
3
|
+
"version": "1.2.3",
|
|
4
|
+
"description": "Platform-agnostic SDK for PERS (Phygital Experience Rewards System) - Production Defaults",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist/**/*"
|
|
11
|
+
],
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"import": "./dist/index.js",
|
|
16
|
+
"require": "./dist/index.cjs"
|
|
17
|
+
},
|
|
18
|
+
"./analytics": {
|
|
19
|
+
"types": "./dist/analytics/index.d.ts",
|
|
20
|
+
"import": "./dist/analytics.js",
|
|
21
|
+
"require": "./dist/analytics.cjs"
|
|
22
|
+
},
|
|
23
|
+
"./auth-admin": {
|
|
24
|
+
"types": "./dist/auth-admin/index.d.ts",
|
|
25
|
+
"import": "./dist/auth-admin.js",
|
|
26
|
+
"require": "./dist/auth-admin.cjs"
|
|
27
|
+
},
|
|
28
|
+
"./business": {
|
|
29
|
+
"types": "./dist/business/index.d.ts",
|
|
30
|
+
"import": "./dist/business.js",
|
|
31
|
+
"require": "./dist/business.cjs"
|
|
32
|
+
},
|
|
33
|
+
"./campaign": {
|
|
34
|
+
"types": "./dist/campaign/index.d.ts",
|
|
35
|
+
"import": "./dist/campaign.js",
|
|
36
|
+
"require": "./dist/campaign.cjs"
|
|
37
|
+
},
|
|
38
|
+
"./core": {
|
|
39
|
+
"types": "./dist/core/index.d.ts",
|
|
40
|
+
"import": "./dist/core.js",
|
|
41
|
+
"require": "./dist/core.cjs"
|
|
42
|
+
},
|
|
43
|
+
"./donation": {
|
|
44
|
+
"types": "./dist/donation/index.d.ts",
|
|
45
|
+
"import": "./dist/donation.js",
|
|
46
|
+
"require": "./dist/donation.cjs"
|
|
47
|
+
},
|
|
48
|
+
"./payment": {
|
|
49
|
+
"types": "./dist/payment/index.d.ts",
|
|
50
|
+
"import": "./dist/payment.js",
|
|
51
|
+
"require": "./dist/payment.cjs"
|
|
52
|
+
},
|
|
53
|
+
"./redemption": {
|
|
54
|
+
"types": "./dist/redemption/index.d.ts",
|
|
55
|
+
"import": "./dist/redemption.js",
|
|
56
|
+
"require": "./dist/redemption.cjs"
|
|
57
|
+
},
|
|
58
|
+
"./tenant": {
|
|
59
|
+
"types": "./dist/tenant/index.d.ts",
|
|
60
|
+
"import": "./dist/tenant.js",
|
|
61
|
+
"require": "./dist/tenant.cjs"
|
|
62
|
+
},
|
|
63
|
+
"./token": {
|
|
64
|
+
"types": "./dist/token/index.d.ts",
|
|
65
|
+
"import": "./dist/token.js",
|
|
66
|
+
"require": "./dist/token.cjs"
|
|
67
|
+
},
|
|
68
|
+
"./transaction": {
|
|
69
|
+
"types": "./dist/transaction/index.d.ts",
|
|
70
|
+
"import": "./dist/transaction.js",
|
|
71
|
+
"require": "./dist/transaction.cjs"
|
|
72
|
+
},
|
|
73
|
+
"./user": {
|
|
74
|
+
"types": "./dist/user/index.d.ts",
|
|
75
|
+
"import": "./dist/user.js",
|
|
76
|
+
"require": "./dist/user.cjs"
|
|
77
|
+
},
|
|
78
|
+
"./user-status": {
|
|
79
|
+
"types": "./dist/user-status/index.d.ts",
|
|
80
|
+
"import": "./dist/user-status.js",
|
|
81
|
+
"require": "./dist/user-status.cjs"
|
|
82
|
+
},
|
|
83
|
+
"./web3-chain": {
|
|
84
|
+
"types": "./dist/web3-chain/index.d.ts",
|
|
85
|
+
"import": "./dist/web3-chain.js",
|
|
86
|
+
"require": "./dist/web3-chain.cjs"
|
|
87
|
+
},
|
|
88
|
+
"./web3": {
|
|
89
|
+
"types": "./dist/web3/index.d.ts",
|
|
90
|
+
"import": "./dist/web3.js",
|
|
91
|
+
"require": "./dist/web3.cjs"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"scripts": {
|
|
95
|
+
"build": "rollup -c",
|
|
96
|
+
"build:watch": "rollup -c --watch",
|
|
97
|
+
"clean": "rimraf dist",
|
|
98
|
+
"test": "jest",
|
|
99
|
+
"test:watch": "jest --watch",
|
|
100
|
+
"lint": "eslint src/**/*.ts",
|
|
101
|
+
"prepublishOnly": "npm run clean && npm run build",
|
|
102
|
+
"publish-version": "npm publish"
|
|
103
|
+
},
|
|
104
|
+
"devDependencies": {
|
|
105
|
+
"@rollup/plugin-typescript": "^11.1.6",
|
|
106
|
+
"@types/jest": "^29.5.12",
|
|
107
|
+
"jest": "^29.7.0",
|
|
108
|
+
"rimraf": "^5.0.5",
|
|
109
|
+
"rollup": "^4.50.0",
|
|
110
|
+
"rollup-plugin-copy": "^3.5.0",
|
|
111
|
+
"typescript": "^5.4.5"
|
|
112
|
+
},
|
|
113
|
+
"peerDependencies": {
|
|
114
|
+
"@explorins/pers-shared": "*",
|
|
115
|
+
"jwt-decode": "^3.0.0 || ^4.0.0"
|
|
116
|
+
},
|
|
117
|
+
"publishConfig": {
|
|
118
|
+
"access": "public",
|
|
119
|
+
"registry": "https://registry.npmjs.org/"
|
|
120
|
+
},
|
|
121
|
+
"keywords": [
|
|
122
|
+
"pers",
|
|
123
|
+
"business",
|
|
124
|
+
"sdk",
|
|
125
|
+
"platform-agnostic"
|
|
126
|
+
],
|
|
127
|
+
"author": "Explorins",
|
|
128
|
+
"license": "MIT"
|
|
129
|
+
}
|
package/dist/payment/index.d.ts
CHANGED
|
@@ -23,12 +23,12 @@ import { PaymentService } from './services/payment-service';
|
|
|
23
23
|
* @returns Payment SDK with flattened structure for better DX
|
|
24
24
|
*/
|
|
25
25
|
export declare function createPaymentSDK(apiClient: PersApiClient): {
|
|
26
|
-
getActivePurchaseTokens: (active?: boolean) => Promise<import("@explorins/pers-shared/dist/cjs/dto/purchase/purchaseToken.dto").PurchaseTokenDTO[]>;
|
|
27
|
-
createPaymentIntent: (amount: number, currency: PurchaseCurrency, receiptEmail: string, description: string) => Promise<import("@explorins/pers-shared/dist/cjs/dto/purchase/payment-intent.dto").PaymentIntentDTO>;
|
|
28
|
-
updatePaymentIntent: (paymentIntentId: string, amount: number, currency: PurchaseCurrency, receiptEmail: string, description: string) => Promise<import("@explorins/pers-shared/dist/cjs/dto/purchase/payment-intent.dto").PaymentIntentDTO>;
|
|
29
|
-
cancelPaymentIntent: (paymentIntentId: string) => Promise<import("@explorins/pers-shared/dist/cjs/dto/purchase/payment-intent.dto").PaymentIntentDTO>;
|
|
30
|
-
createPurchase: (paymentIntentId: string, amount: number, purchaseTokenId?: string, donationTypeId?: number, donationAccountAddress?: string) => Promise<import("@explorins/pers-shared/dist/cjs/dto/purchase/purchase.dto").PurchaseDTO>;
|
|
31
|
-
getAllUserPurchases: () => Promise<import("@explorins/pers-shared/dist/cjs/dto/purchase/purchase.dto").PurchaseDTO[]>;
|
|
26
|
+
getActivePurchaseTokens: (active?: boolean) => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/purchase/purchaseToken.dto").PurchaseTokenDTO[]>;
|
|
27
|
+
createPaymentIntent: (amount: number, currency: PurchaseCurrency, receiptEmail: string, description: string) => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/purchase/payment-intent.dto").PaymentIntentDTO>;
|
|
28
|
+
updatePaymentIntent: (paymentIntentId: string, amount: number, currency: PurchaseCurrency, receiptEmail: string, description: string) => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/purchase/payment-intent.dto").PaymentIntentDTO>;
|
|
29
|
+
cancelPaymentIntent: (paymentIntentId: string) => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/purchase/payment-intent.dto").PaymentIntentDTO>;
|
|
30
|
+
createPurchase: (paymentIntentId: string, amount: number, purchaseTokenId?: string, donationTypeId?: number, donationAccountAddress?: string) => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/purchase/purchase.dto").PurchaseDTO>;
|
|
31
|
+
getAllUserPurchases: () => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/purchase/purchase.dto").PurchaseDTO[]>;
|
|
32
32
|
api: PaymentApi;
|
|
33
33
|
service: PaymentService;
|
|
34
34
|
};
|
|
@@ -18,16 +18,16 @@ import { RedemptionService } from './services/redemption-service';
|
|
|
18
18
|
* @returns Redemption SDK with flattened structure for better DX
|
|
19
19
|
*/
|
|
20
20
|
export declare function createRedemptionSDK(apiClient: PersApiClient): {
|
|
21
|
-
getActiveRedemptions: () => Promise<import("@explorins/pers-shared/dist/cjs/dto/redemption/redemption.dto").RedemptionDTO[]>;
|
|
22
|
-
getRedemptionTypes: () => Promise<import("@explorins/pers-shared/dist/cjs/dto/redemption/redemptionType.dto").RedemptionTypeDTO[]>;
|
|
23
|
-
redeemRedemption: (redemptionId: string) => Promise<import("@explorins/pers-shared/dist/cjs/dto/redemption/redemptionUserRedeem.dto").RedemptionUserRedeemDetailedDTO>;
|
|
24
|
-
getUserRedeems: () => Promise<import("@explorins/pers-shared/dist/cjs/dto/redemption/redemptionUserRedeem.dto").RedemptionUserRedeemDTO[]>;
|
|
25
|
-
getRedemptionsAsAdmin: (active?: boolean) => Promise<import("@explorins/pers-shared/dist/cjs/dto/redemption/redemption.dto").RedemptionDTO[]>;
|
|
26
|
-
createRedemption: (redemption: RedemptionCreateRequestDTO) => Promise<import("@explorins/pers-shared/dist/cjs/dto/redemption/redemption.dto").RedemptionDTO>;
|
|
27
|
-
updateRedemption: (id: string, redemptionCreateRequest: RedemptionCreateRequestDTO) => Promise<import("@explorins/pers-shared/dist/cjs/dto/redemption/redemption.dto").RedemptionDTO>;
|
|
28
|
-
toggleRedemptionActive: (redemptionId: string) => Promise<import("@explorins/pers-shared/dist/cjs/dto/redemption/redemption.dto").RedemptionDTO>;
|
|
29
|
-
createRedemptionTokenUnit: (redemptionId: string, redemptionTokenUnit: TokenUnitCreateRequestDTO) => Promise<import("@explorins/pers-shared/dist/cjs/dto/redemption/redemption.dto").RedemptionDTO>;
|
|
30
|
-
deleteRedemptionTokenUnit: (redemptionId: string, redemptionTokenUnitId: string) => Promise<import("@explorins/pers-shared/dist/cjs/dto/redemption/redemption.dto").RedemptionDTO>;
|
|
21
|
+
getActiveRedemptions: () => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/redemption/redemption.dto").RedemptionDTO[]>;
|
|
22
|
+
getRedemptionTypes: () => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/redemption/redemptionType.dto").RedemptionTypeDTO[]>;
|
|
23
|
+
redeemRedemption: (redemptionId: string) => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/redemption/redemptionUserRedeem.dto").RedemptionUserRedeemDetailedDTO>;
|
|
24
|
+
getUserRedeems: () => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/redemption/redemptionUserRedeem.dto").RedemptionUserRedeemDTO[]>;
|
|
25
|
+
getRedemptionsAsAdmin: (active?: boolean) => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/redemption/redemption.dto").RedemptionDTO[]>;
|
|
26
|
+
createRedemption: (redemption: RedemptionCreateRequestDTO) => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/redemption/redemption.dto").RedemptionDTO>;
|
|
27
|
+
updateRedemption: (id: string, redemptionCreateRequest: RedemptionCreateRequestDTO) => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/redemption/redemption.dto").RedemptionDTO>;
|
|
28
|
+
toggleRedemptionActive: (redemptionId: string) => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/redemption/redemption.dto").RedemptionDTO>;
|
|
29
|
+
createRedemptionTokenUnit: (redemptionId: string, redemptionTokenUnit: TokenUnitCreateRequestDTO) => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/redemption/redemption.dto").RedemptionDTO>;
|
|
30
|
+
deleteRedemptionTokenUnit: (redemptionId: string, redemptionTokenUnitId: string) => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/redemption/redemption.dto").RedemptionDTO>;
|
|
31
31
|
api: RedemptionApi;
|
|
32
32
|
service: RedemptionService;
|
|
33
33
|
};
|
package/dist/tenant/index.d.ts
CHANGED
|
@@ -22,11 +22,11 @@ import { TenantPublicDTO, AdminCreateRequestDTO } from './models';
|
|
|
22
22
|
export declare function createTenantSDK(apiClient: PersApiClient): {
|
|
23
23
|
getRemoteTenant: () => Promise<TenantPublicDTO>;
|
|
24
24
|
getRemoteLoginToken: () => Promise<string>;
|
|
25
|
-
getRemoteClientConfig: () => Promise<import("@explorins/pers-shared/dist/cjs/dto/tenant-client-config.dto").TenantClientConfigDTO>;
|
|
25
|
+
getRemoteClientConfig: () => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/tenant-client-config.dto").TenantClientConfigDTO>;
|
|
26
26
|
updateRemoteTenant: (tenantData: TenantPublicDTO) => Promise<TenantPublicDTO>;
|
|
27
|
-
getAdmins: () => Promise<import("@explorins/pers-shared/dist/cjs/dto/admin.dto").AdminDTO[]>;
|
|
28
|
-
postAdmin: (adminData: AdminCreateRequestDTO) => Promise<import("@explorins/pers-shared/dist/cjs/dto/admin.dto").AdminDTO>;
|
|
29
|
-
putAdmin: (adminId: string, adminData: AdminCreateRequestDTO) => Promise<import("@explorins/pers-shared/dist/cjs/dto/admin.dto").AdminDTO>;
|
|
27
|
+
getAdmins: () => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/admin.dto").AdminDTO[]>;
|
|
28
|
+
postAdmin: (adminData: AdminCreateRequestDTO) => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/admin.dto").AdminDTO>;
|
|
29
|
+
putAdmin: (adminId: string, adminData: AdminCreateRequestDTO) => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/admin.dto").AdminDTO>;
|
|
30
30
|
api: TenantApi;
|
|
31
31
|
service: TenantService;
|
|
32
32
|
};
|
|
@@ -21,14 +21,14 @@ import { TransactionPaginationParams, UserBurnTokenRequestDTO } from './models';
|
|
|
21
21
|
* @returns Transaction SDK with flattened structure for better DX
|
|
22
22
|
*/
|
|
23
23
|
export declare function createTransactionSDK(apiClient: PersApiClient): {
|
|
24
|
-
getTransactionById: (transactionId: string) => Promise<import("@explorins/pers-shared/dist/cjs/dto/transaction/transaction.dto").TransactionDTO>;
|
|
25
|
-
createAuthTransaction: (request: TransactionRequestDTO) => Promise<import("@explorins/pers-shared/dist/cjs/dto/transaction/transaction.dto").TransactionDTO>;
|
|
26
|
-
getUserTransactionHistory: (type: string) => Promise<import("@explorins/pers-shared/dist/cjs/dto/transaction/transaction.dto").TransactionDTO[]>;
|
|
27
|
-
prepareClientSignedTransaction: (request: ClientTransactionRequestDTO) => Promise<import("@explorins/pers-shared/dist/cjs/dto/transaction/transaction-client.request.dto").ClientTransactionRequestResponseDto>;
|
|
28
|
-
burnUserTokens: (request: UserBurnTokenRequestDTO) => Promise<import("@explorins/pers-shared/dist/cjs/dto/transaction/transaction.dto").TransactionDTO>;
|
|
29
|
-
createBusinessTransaction: (request: TransactionRequestDTO) => Promise<import("@explorins/pers-shared/dist/cjs/dto/transaction/transaction.dto").TransactionDTO>;
|
|
30
|
-
createAdminTransaction: (request: TransactionRequestDTO) => Promise<import("@explorins/pers-shared/dist/cjs/dto/transaction/transaction.dto").TransactionDTO>;
|
|
31
|
-
getTenantTransactions: () => Promise<import("@explorins/pers-shared/dist/cjs/dto/transaction/transaction.dto").TransactionDTO[]>;
|
|
24
|
+
getTransactionById: (transactionId: string) => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/transaction/transaction.dto").TransactionDTO>;
|
|
25
|
+
createAuthTransaction: (request: TransactionRequestDTO) => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/transaction/transaction.dto").TransactionDTO>;
|
|
26
|
+
getUserTransactionHistory: (type: string) => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/transaction/transaction.dto").TransactionDTO[]>;
|
|
27
|
+
prepareClientSignedTransaction: (request: ClientTransactionRequestDTO) => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/transaction/transaction-client.request.dto").ClientTransactionRequestResponseDto>;
|
|
28
|
+
burnUserTokens: (request: UserBurnTokenRequestDTO) => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/transaction/transaction.dto").TransactionDTO>;
|
|
29
|
+
createBusinessTransaction: (request: TransactionRequestDTO) => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/transaction/transaction.dto").TransactionDTO>;
|
|
30
|
+
createAdminTransaction: (request: TransactionRequestDTO) => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/transaction/transaction.dto").TransactionDTO>;
|
|
31
|
+
getTenantTransactions: () => Promise<import("@explorins/pers-shared/dist/cjs/shared-lib/dto/transaction/transaction.dto").TransactionDTO[]>;
|
|
32
32
|
getPaginatedTransactions: (params: TransactionPaginationParams) => Promise<import("./models").TransactionPaginationResponse>;
|
|
33
33
|
exportTransactionsCSV: () => Promise<Blob>;
|
|
34
34
|
api: TransactionApi;
|
package/dist/web3/index.d.ts
CHANGED
|
@@ -2,8 +2,7 @@ import { PersApiClient } from '../core/pers-api-client';
|
|
|
2
2
|
import { Web3Api } from './api/web3-api';
|
|
3
3
|
import { Web3Service } from './services/web3-service';
|
|
4
4
|
import { ERC1155CollectionRequest, ERC20BalanceRequest, ERC721CollectionRequest, ERC721CollectionResponse, Web3BalanceResponse, Web3TokenListResponse } from './models';
|
|
5
|
-
|
|
6
|
-
export declare function createWeb3SDK(apiClient: PersApiClient, web3ProviderService: Web3ProviderService): {
|
|
5
|
+
export declare function createWeb3SDK(apiClient: PersApiClient): {
|
|
7
6
|
getCreditsBalance: (request: ERC20BalanceRequest) => Promise<Web3BalanceResponse>;
|
|
8
7
|
getRewardsCollection: (request: ERC1155CollectionRequest) => Promise<Web3TokenListResponse>;
|
|
9
8
|
getStampsCollection: (request: ERC721CollectionRequest) => Promise<ERC721CollectionResponse>;
|
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;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAe,wBAAwB,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,wBAAwB,EAAsB,mBAAmB,EAAwB,qBAAqB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/web3/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAe,wBAAwB,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,wBAAwB,EAAsB,mBAAmB,EAAwB,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAI/N,wBAAgB,aAAa,CAC3B,SAAS,EAAE,aAAa;iCAiBO,mBAAmB,KAAG,OAAO,CAAC,mBAAmB,CAAC;oCAG/C,wBAAwB,KAAG,OAAO,CAAC,qBAAqB,CAAC;mCAG1D,uBAAuB,KAAG,OAAO,CAAC,wBAAwB,CAAC;;;EAM7F;AAED,cAAc,UAAU,CAAC;AACzB,YAAY,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1I,cAAc,iDAAiD,CAAC"}
|
|
@@ -5,4 +5,13 @@ export declare const getWeb3ProviderFromChainData: (chainData: ChainData, timeou
|
|
|
5
5
|
ethersProvider: JsonRpcProvider;
|
|
6
6
|
isAuthenticated: boolean;
|
|
7
7
|
};
|
|
8
|
+
export declare const getWeb3ProviderWithRetry: (chainData: ChainData, timeout?: number, customUserAgentName?: string, tokenRefresher?: () => Promise<string>, retryConfig?: {
|
|
9
|
+
maxAttempts: number;
|
|
10
|
+
baseDelay: number;
|
|
11
|
+
maxDelay: number;
|
|
12
|
+
}) => Promise<{
|
|
13
|
+
web3Provider: null;
|
|
14
|
+
ethersProvider: JsonRpcProvider;
|
|
15
|
+
isAuthenticated: boolean;
|
|
16
|
+
}>;
|
|
8
17
|
//# sourceMappingURL=getWeb3FCD.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getWeb3FCD.service.d.ts","sourceRoot":"","sources":["../../../src/web3-chain/services/getWeb3FCD.service.ts"],"names":[],"mappings":"
|
|
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,EAAgB,eAAe,EAAE,MAAM,QAAQ,CAAC;AAGvD,eAAO,MAAM,4BAA4B,GACvC,WAAW,SAAS,EACpB,gBAAe,EACf,4BAAwB,EACxB,iBAAiB,MAAM,OAAO,CAAC,MAAM,CAAC;;;;CA4CvC,CAAC;AAGF,eAAO,MAAM,wBAAwB,GACnC,WAAW,SAAS,EACpB,gBAAe,EACf,4BAAwB,EACxB,iBAAiB,MAAM,OAAO,CAAC,MAAM,CAAC,EACtC;;;;CAAiE;;;;EAuClE,CAAC"}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import Web3 from "web3";
|
|
2
2
|
import { ChainData, ChainType } from "@explorins/web3-ts";
|
|
3
|
-
import { PublicHttpProviderService } from "./public-http-provider.service";
|
|
4
3
|
export declare class Web3ProviderService {
|
|
5
|
-
private readonly publicHttpProviderService;
|
|
6
4
|
private _web3;
|
|
7
5
|
private _currentChainId;
|
|
8
|
-
|
|
9
|
-
getWeb3(chainId: number, chainType: ChainType,
|
|
10
|
-
private
|
|
6
|
+
private _creationPromise;
|
|
7
|
+
getWeb3(chainId: number, chainType: ChainType, chainData: ChainData): Promise<Web3>;
|
|
8
|
+
private createProvider;
|
|
11
9
|
private convertToWeb3;
|
|
12
10
|
private extractUrlFromEthersProvider;
|
|
13
11
|
private extractHeadersFromEthersProvider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.service.d.ts","sourceRoot":"","sources":["../../../src/web3-chain/services/provider.service.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"provider.service.d.ts","sourceRoot":"","sources":["../../../src/web3-chain/services/provider.service.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG1D,qBAAa,mBAAmB;IAC5B,OAAO,CAAC,KAAK,CAAqB;IAClC,OAAO,CAAC,eAAe,CAAuB;IAC9C,OAAO,CAAC,gBAAgB,CAA8B;IAEzC,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;YA4BlF,cAAc;IAK5B,OAAO,CAAC,aAAa;IAwDrB,OAAO,CAAC,4BAA4B;IAOpC,OAAO,CAAC,gCAAgC;CAK3C"}
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
import type { PublicWeb3ProviderData } from "@explorins/web3/types";
|
|
2
|
-
import type Web3 from "web3";
|
|
3
|
-
export declare class PublicHttpProviderService {
|
|
4
|
-
private $providerData;
|
|
5
|
-
constructor(providerData?: PublicWeb3ProviderData | null);
|
|
6
|
-
getProvider(chainId: number): Web3;
|
|
7
|
-
}
|
|
8
1
|
//# sourceMappingURL=public-http-provider.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-http-provider.service.d.ts","sourceRoot":"","sources":["../../../src/web3-chain/services/public-http-provider.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"public-http-provider.service.d.ts","sourceRoot":"","sources":["../../../src/web3-chain/services/public-http-provider.service.ts"],"names":[],"mappings":""}
|