@thirdweb-dev/service-utils 0.4.38 → 0.4.39
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/cjs/cf-worker/index.js +155 -0
- package/dist/cjs/cf-worker/index.js.map +1 -0
- package/dist/cjs/cf-worker/usage.js +55 -0
- package/dist/cjs/cf-worker/usage.js.map +1 -0
- package/dist/cjs/core/api.js +65 -0
- package/dist/cjs/core/api.js.map +1 -0
- package/dist/cjs/core/authorize/client.js +115 -0
- package/dist/cjs/core/authorize/client.js.map +1 -0
- package/dist/cjs/core/authorize/index.js +215 -0
- package/dist/cjs/core/authorize/index.js.map +1 -0
- package/dist/cjs/core/authorize/service.js +58 -0
- package/dist/cjs/core/authorize/service.js.map +1 -0
- package/dist/cjs/core/authorize/types.js +3 -0
- package/dist/cjs/core/authorize/types.js.map +1 -0
- package/dist/cjs/core/rateLimit/index.js +64 -0
- package/dist/cjs/core/rateLimit/index.js.map +1 -0
- package/dist/cjs/core/rateLimit/types.js +3 -0
- package/dist/cjs/core/rateLimit/types.js.map +1 -0
- package/dist/cjs/core/services.js +71 -0
- package/dist/cjs/core/services.js.map +1 -0
- package/dist/cjs/core/types.js +3 -0
- package/dist/cjs/core/types.js.map +1 -0
- package/dist/cjs/core/usage.js +93 -0
- package/dist/cjs/core/usage.js.map +1 -0
- package/dist/cjs/core/usageLimit/index.js +45 -0
- package/dist/cjs/core/usageLimit/index.js.map +1 -0
- package/dist/cjs/core/usageLimit/types.js +3 -0
- package/dist/cjs/core/usageLimit/types.js.map +1 -0
- package/dist/cjs/index.js +10 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/mocks.js +53 -0
- package/dist/cjs/mocks.js.map +1 -0
- package/dist/cjs/node/index.js +173 -0
- package/dist/cjs/node/index.js.map +1 -0
- package/dist/cjs/package.json +1 -0
- package/dist/esm/cf-worker/index.js +147 -0
- package/dist/esm/cf-worker/index.js.map +1 -0
- package/dist/esm/cf-worker/usage.js +54 -0
- package/dist/esm/cf-worker/usage.js.map +1 -0
- package/dist/esm/core/api.js +60 -0
- package/dist/esm/core/api.js.map +1 -0
- package/dist/esm/core/authorize/client.js +110 -0
- package/dist/esm/core/authorize/client.js.map +1 -0
- package/dist/esm/core/authorize/index.js +212 -0
- package/dist/esm/core/authorize/index.js.map +1 -0
- package/dist/esm/core/authorize/service.js +55 -0
- package/dist/esm/core/authorize/service.js.map +1 -0
- package/dist/esm/core/authorize/types.js +2 -0
- package/dist/esm/core/authorize/types.js.map +1 -0
- package/dist/esm/core/rateLimit/index.js +61 -0
- package/dist/esm/core/rateLimit/index.js.map +1 -0
- package/dist/esm/core/rateLimit/types.js +2 -0
- package/dist/esm/core/rateLimit/types.js.map +1 -0
- package/dist/esm/core/services.js +67 -0
- package/dist/esm/core/services.js.map +1 -0
- package/dist/esm/core/types.js +2 -0
- package/dist/esm/core/types.js.map +1 -0
- package/dist/esm/core/usage.js +90 -0
- package/dist/esm/core/usage.js.map +1 -0
- package/dist/esm/core/usageLimit/index.js +42 -0
- package/dist/esm/core/usageLimit/index.js.map +1 -0
- package/dist/esm/core/usageLimit/types.js +2 -0
- package/dist/esm/core/usageLimit/types.js.map +1 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/mocks.js +50 -0
- package/dist/esm/mocks.js.map +1 -0
- package/dist/esm/node/index.js +165 -0
- package/dist/esm/node/index.js.map +1 -0
- package/dist/esm/package.json +1 -0
- package/dist/{declarations/src → types}/cf-worker/index.d.ts +8 -8
- package/dist/types/cf-worker/index.d.ts.map +1 -0
- package/dist/{declarations/src → types}/cf-worker/usage.d.ts +3 -2
- package/dist/types/cf-worker/usage.d.ts.map +1 -0
- package/dist/{declarations/src → types}/core/api.d.ts +1 -1
- package/dist/types/core/api.d.ts.map +1 -0
- package/dist/{declarations/src → types}/core/authorize/client.d.ts +2 -2
- package/dist/types/core/authorize/client.d.ts.map +1 -0
- package/dist/{declarations/src → types}/core/authorize/index.d.ts +2 -2
- package/dist/types/core/authorize/index.d.ts.map +1 -0
- package/dist/{declarations/src → types}/core/authorize/service.d.ts +2 -2
- package/dist/types/core/authorize/service.d.ts.map +1 -0
- package/dist/{declarations/src → types}/core/authorize/types.d.ts +1 -1
- package/dist/types/core/authorize/types.d.ts.map +1 -0
- package/dist/{declarations/src → types}/core/rateLimit/index.d.ts +3 -3
- package/dist/types/core/rateLimit/index.d.ts.map +1 -0
- package/dist/types/core/rateLimit/types.d.ts.map +1 -0
- package/dist/types/core/services.d.ts.map +1 -0
- package/dist/types/core/types.d.ts.map +1 -0
- package/dist/{declarations/src → types}/core/usage.d.ts +2 -2
- package/dist/types/core/usage.d.ts.map +1 -0
- package/dist/types/core/usageLimit/index.d.ts +5 -0
- package/dist/types/core/usageLimit/index.d.ts.map +1 -0
- package/dist/types/core/usageLimit/types.d.ts.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/mocks.d.ts +5 -0
- package/dist/types/mocks.d.ts.map +1 -0
- package/dist/{declarations/src → types}/node/index.d.ts +8 -8
- package/dist/types/node/index.d.ts.map +1 -0
- package/package.json +36 -29
- package/cf-worker/dist/thirdweb-dev-service-utils-cf-worker.cjs.d.ts +0 -2
- package/cf-worker/dist/thirdweb-dev-service-utils-cf-worker.cjs.d.ts.map +0 -1
- package/cf-worker/dist/thirdweb-dev-service-utils-cf-worker.cjs.dev.js +0 -226
- package/cf-worker/dist/thirdweb-dev-service-utils-cf-worker.cjs.js +0 -7
- package/cf-worker/dist/thirdweb-dev-service-utils-cf-worker.cjs.prod.js +0 -226
- package/cf-worker/dist/thirdweb-dev-service-utils-cf-worker.esm.js +0 -212
- package/cf-worker/package.json +0 -4
- package/dist/client-8440b8fb.esm.js +0 -195
- package/dist/client-84e46164.cjs.prod.js +0 -203
- package/dist/client-a5cc5822.cjs.dev.js +0 -203
- package/dist/declarations/src/cf-worker/index.d.ts.map +0 -1
- package/dist/declarations/src/cf-worker/usage.d.ts.map +0 -1
- package/dist/declarations/src/core/api.d.ts.map +0 -1
- package/dist/declarations/src/core/authorize/client.d.ts.map +0 -1
- package/dist/declarations/src/core/authorize/index.d.ts.map +0 -1
- package/dist/declarations/src/core/authorize/service.d.ts.map +0 -1
- package/dist/declarations/src/core/authorize/types.d.ts.map +0 -1
- package/dist/declarations/src/core/rateLimit/index.d.ts.map +0 -1
- package/dist/declarations/src/core/rateLimit/types.d.ts.map +0 -1
- package/dist/declarations/src/core/services.d.ts.map +0 -1
- package/dist/declarations/src/core/types.d.ts.map +0 -1
- package/dist/declarations/src/core/usage.d.ts.map +0 -1
- package/dist/declarations/src/core/usageLimit/index.d.ts +0 -5
- package/dist/declarations/src/core/usageLimit/index.d.ts.map +0 -1
- package/dist/declarations/src/core/usageLimit/types.d.ts.map +0 -1
- package/dist/declarations/src/index.d.ts +0 -3
- package/dist/declarations/src/index.d.ts.map +0 -1
- package/dist/declarations/src/node/index.d.ts.map +0 -1
- package/dist/index-23f268d8.cjs.prod.js +0 -540
- package/dist/index-5dc16842.esm.js +0 -535
- package/dist/index-88f1ffb6.cjs.dev.js +0 -540
- package/dist/thirdweb-dev-service-utils.cjs.d.ts +0 -2
- package/dist/thirdweb-dev-service-utils.cjs.d.ts.map +0 -1
- package/dist/thirdweb-dev-service-utils.cjs.dev.js +0 -14
- package/dist/thirdweb-dev-service-utils.cjs.js +0 -7
- package/dist/thirdweb-dev-service-utils.cjs.prod.js +0 -14
- package/dist/thirdweb-dev-service-utils.esm.js +0 -1
- package/node/dist/thirdweb-dev-service-utils-node.cjs.d.ts +0 -2
- package/node/dist/thirdweb-dev-service-utils-node.cjs.d.ts.map +0 -1
- package/node/dist/thirdweb-dev-service-utils-node.cjs.dev.js +0 -190
- package/node/dist/thirdweb-dev-service-utils-node.cjs.js +0 -7
- package/node/dist/thirdweb-dev-service-utils-node.cjs.prod.js +0 -190
- package/node/dist/thirdweb-dev-service-utils-node.esm.js +0 -176
- package/node/package.json +0 -4
- /package/dist/{declarations/src → types}/core/rateLimit/types.d.ts +0 -0
- /package/dist/{declarations/src → types}/core/services.d.ts +0 -0
- /package/dist/{declarations/src → types}/core/types.d.ts +0 -0
- /package/dist/{declarations/src → types}/core/usageLimit/types.d.ts +0 -0
@@ -1,203 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
const SERVICE_DEFINITIONS = {
|
4
|
-
storage: {
|
5
|
-
name: "storage",
|
6
|
-
title: "Storage",
|
7
|
-
description: "IPFS Upload and Download",
|
8
|
-
actions: [{
|
9
|
-
name: "read",
|
10
|
-
title: "Download",
|
11
|
-
description: "Download a file from Storage"
|
12
|
-
}, {
|
13
|
-
name: "write",
|
14
|
-
title: "Upload",
|
15
|
-
description: "Upload a file to Storage"
|
16
|
-
}]
|
17
|
-
},
|
18
|
-
rpc: {
|
19
|
-
name: "rpc",
|
20
|
-
title: "RPC",
|
21
|
-
description: "Accelerated RPC Edge",
|
22
|
-
// all actions allowed
|
23
|
-
actions: []
|
24
|
-
},
|
25
|
-
bundler: {
|
26
|
-
name: "bundler",
|
27
|
-
title: "Account Abstraction",
|
28
|
-
description: "Bundler & Paymaster services",
|
29
|
-
// all actions allowed
|
30
|
-
actions: []
|
31
|
-
},
|
32
|
-
relayer: {
|
33
|
-
name: "relayer",
|
34
|
-
title: "Gasless Relayer",
|
35
|
-
description: "Enable gasless transactions",
|
36
|
-
// all actions allowed
|
37
|
-
actions: []
|
38
|
-
},
|
39
|
-
embeddedWallets: {
|
40
|
-
name: "embeddedWallets",
|
41
|
-
title: "In-App Wallets",
|
42
|
-
description: "E-mail and social login wallets for easy web3 onboarding",
|
43
|
-
// all actions allowed
|
44
|
-
actions: []
|
45
|
-
},
|
46
|
-
pay: {
|
47
|
-
name: "pay",
|
48
|
-
title: "Pay",
|
49
|
-
description: "Pay for a blockchain transaction with any currency",
|
50
|
-
// all actions allowed
|
51
|
-
actions: []
|
52
|
-
},
|
53
|
-
chainsaw: {
|
54
|
-
name: "chainsaw",
|
55
|
-
title: "Chainsaw",
|
56
|
-
description: "Indexed data for any EVM chain",
|
57
|
-
// all actions allowed
|
58
|
-
actions: []
|
59
|
-
}
|
60
|
-
};
|
61
|
-
const SERVICE_NAMES = Object.keys(SERVICE_DEFINITIONS);
|
62
|
-
const SERVICES = Object.values(SERVICE_DEFINITIONS);
|
63
|
-
function getServiceByName(name) {
|
64
|
-
return SERVICE_DEFINITIONS[name];
|
65
|
-
}
|
66
|
-
|
67
|
-
function authorizeClient(authOptions, apiKeyMeta) {
|
68
|
-
const {
|
69
|
-
origin,
|
70
|
-
bundleId,
|
71
|
-
secretKeyHash: providedSecretHash
|
72
|
-
} = authOptions;
|
73
|
-
const {
|
74
|
-
domains,
|
75
|
-
bundleIds,
|
76
|
-
secretHash
|
77
|
-
} = apiKeyMeta;
|
78
|
-
const authResult = {
|
79
|
-
authorized: true,
|
80
|
-
apiKeyMeta,
|
81
|
-
accountMeta: {
|
82
|
-
id: apiKeyMeta.accountId,
|
83
|
-
// TODO update this later
|
84
|
-
name: "",
|
85
|
-
creatorWalletAddress: apiKeyMeta.creatorWalletAddress,
|
86
|
-
limits: apiKeyMeta.limits,
|
87
|
-
rateLimits: apiKeyMeta.rateLimits,
|
88
|
-
usage: apiKeyMeta.usage
|
89
|
-
}
|
90
|
-
};
|
91
|
-
|
92
|
-
// check for public restrictions
|
93
|
-
if (domains.includes("*")) {
|
94
|
-
return authResult;
|
95
|
-
}
|
96
|
-
|
97
|
-
// check for secretHash
|
98
|
-
if (providedSecretHash) {
|
99
|
-
if (secretHash !== providedSecretHash) {
|
100
|
-
return {
|
101
|
-
authorized: false,
|
102
|
-
errorMessage: "Incorrect key provided. You can view your active API keys at https://thirdweb.com/dashboard/settings",
|
103
|
-
errorCode: "SECRET_INVALID",
|
104
|
-
status: 401
|
105
|
-
};
|
106
|
-
}
|
107
|
-
return authResult;
|
108
|
-
}
|
109
|
-
|
110
|
-
// validate domains
|
111
|
-
if (origin) {
|
112
|
-
if (authorizeDomain({
|
113
|
-
domains,
|
114
|
-
origin
|
115
|
-
})) {
|
116
|
-
return authResult;
|
117
|
-
}
|
118
|
-
return {
|
119
|
-
authorized: false,
|
120
|
-
errorMessage: `Invalid request: Unauthorized domain: ${origin}. You can view the restrictions on this API key at https://thirdweb.com/create-api-key`,
|
121
|
-
errorCode: "ORIGIN_UNAUTHORIZED",
|
122
|
-
status: 401
|
123
|
-
};
|
124
|
-
}
|
125
|
-
|
126
|
-
// validate bundleId
|
127
|
-
if (bundleId) {
|
128
|
-
if (authorizeBundleId({
|
129
|
-
bundleIds,
|
130
|
-
bundleId
|
131
|
-
})) {
|
132
|
-
return authResult;
|
133
|
-
}
|
134
|
-
return {
|
135
|
-
authorized: false,
|
136
|
-
errorMessage: `Invalid request: Unauthorized Bundle ID: ${bundleId}. You can view the restrictions on this API key at https://thirdweb.com/create-api-key`,
|
137
|
-
errorCode: "BUNDLE_UNAUTHORIZED",
|
138
|
-
status: 401
|
139
|
-
};
|
140
|
-
}
|
141
|
-
return {
|
142
|
-
authorized: false,
|
143
|
-
errorMessage: "The keys are invalid. Please check the secret-key/clientId and try again.",
|
144
|
-
errorCode: "UNAUTHORIZED",
|
145
|
-
status: 401
|
146
|
-
};
|
147
|
-
}
|
148
|
-
|
149
|
-
// Exposed for use in validating ecosystem partners settings
|
150
|
-
function authorizeDomain(_ref) {
|
151
|
-
let {
|
152
|
-
domains,
|
153
|
-
origin
|
154
|
-
} = _ref;
|
155
|
-
// find matching domain, or if all domains allowed
|
156
|
-
// embedded-wallet.thirdweb(-dev).com is automatically allowed
|
157
|
-
// because the rpc is passed from user's domain to embedded-wallet.thirdweb.com iframe for use.
|
158
|
-
// Note this doesn't allow embedded-wallets from being used if it's disabled. The service check that runs after enforces that.
|
159
|
-
return !![...domains, "embedded-wallet.thirdweb.com", "embedded-wallet.thirdweb-dev.com"].find(d => {
|
160
|
-
// if any domain is allowed, we'll return true
|
161
|
-
if (d === "*") {
|
162
|
-
return true;
|
163
|
-
}
|
164
|
-
|
165
|
-
// special rule for `localhost`
|
166
|
-
// if the domain is localhost, we'll allow any origin that starts with localhost
|
167
|
-
if (d === "localhost" && origin.startsWith("localhost")) {
|
168
|
-
return true;
|
169
|
-
}
|
170
|
-
|
171
|
-
// If the allowedDomain has a wildcard,
|
172
|
-
// we'll check that the ending of our domain matches the wildcard
|
173
|
-
if (d.startsWith("*.")) {
|
174
|
-
// get rid of the * and check if it ends with the `.<domain>.<tld>`
|
175
|
-
const domainRoot = d.slice(1);
|
176
|
-
return origin.endsWith(domainRoot);
|
177
|
-
}
|
178
|
-
|
179
|
-
// If there's no wildcard, we'll check for an exact match
|
180
|
-
return d === origin;
|
181
|
-
});
|
182
|
-
}
|
183
|
-
function authorizeBundleId(_ref2) {
|
184
|
-
let {
|
185
|
-
bundleIds,
|
186
|
-
bundleId
|
187
|
-
} = _ref2;
|
188
|
-
// find matching bundle id, or if all bundles allowed
|
189
|
-
return !!bundleIds.find(b => {
|
190
|
-
if (b === "*") {
|
191
|
-
return true;
|
192
|
-
}
|
193
|
-
return b === bundleId;
|
194
|
-
});
|
195
|
-
}
|
196
|
-
|
197
|
-
exports.SERVICES = SERVICES;
|
198
|
-
exports.SERVICE_DEFINITIONS = SERVICE_DEFINITIONS;
|
199
|
-
exports.SERVICE_NAMES = SERVICE_NAMES;
|
200
|
-
exports.authorizeBundleId = authorizeBundleId;
|
201
|
-
exports.authorizeClient = authorizeClient;
|
202
|
-
exports.authorizeDomain = authorizeDomain;
|
203
|
-
exports.getServiceByName = getServiceByName;
|
@@ -1,203 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
const SERVICE_DEFINITIONS = {
|
4
|
-
storage: {
|
5
|
-
name: "storage",
|
6
|
-
title: "Storage",
|
7
|
-
description: "IPFS Upload and Download",
|
8
|
-
actions: [{
|
9
|
-
name: "read",
|
10
|
-
title: "Download",
|
11
|
-
description: "Download a file from Storage"
|
12
|
-
}, {
|
13
|
-
name: "write",
|
14
|
-
title: "Upload",
|
15
|
-
description: "Upload a file to Storage"
|
16
|
-
}]
|
17
|
-
},
|
18
|
-
rpc: {
|
19
|
-
name: "rpc",
|
20
|
-
title: "RPC",
|
21
|
-
description: "Accelerated RPC Edge",
|
22
|
-
// all actions allowed
|
23
|
-
actions: []
|
24
|
-
},
|
25
|
-
bundler: {
|
26
|
-
name: "bundler",
|
27
|
-
title: "Account Abstraction",
|
28
|
-
description: "Bundler & Paymaster services",
|
29
|
-
// all actions allowed
|
30
|
-
actions: []
|
31
|
-
},
|
32
|
-
relayer: {
|
33
|
-
name: "relayer",
|
34
|
-
title: "Gasless Relayer",
|
35
|
-
description: "Enable gasless transactions",
|
36
|
-
// all actions allowed
|
37
|
-
actions: []
|
38
|
-
},
|
39
|
-
embeddedWallets: {
|
40
|
-
name: "embeddedWallets",
|
41
|
-
title: "In-App Wallets",
|
42
|
-
description: "E-mail and social login wallets for easy web3 onboarding",
|
43
|
-
// all actions allowed
|
44
|
-
actions: []
|
45
|
-
},
|
46
|
-
pay: {
|
47
|
-
name: "pay",
|
48
|
-
title: "Pay",
|
49
|
-
description: "Pay for a blockchain transaction with any currency",
|
50
|
-
// all actions allowed
|
51
|
-
actions: []
|
52
|
-
},
|
53
|
-
chainsaw: {
|
54
|
-
name: "chainsaw",
|
55
|
-
title: "Chainsaw",
|
56
|
-
description: "Indexed data for any EVM chain",
|
57
|
-
// all actions allowed
|
58
|
-
actions: []
|
59
|
-
}
|
60
|
-
};
|
61
|
-
const SERVICE_NAMES = Object.keys(SERVICE_DEFINITIONS);
|
62
|
-
const SERVICES = Object.values(SERVICE_DEFINITIONS);
|
63
|
-
function getServiceByName(name) {
|
64
|
-
return SERVICE_DEFINITIONS[name];
|
65
|
-
}
|
66
|
-
|
67
|
-
function authorizeClient(authOptions, apiKeyMeta) {
|
68
|
-
const {
|
69
|
-
origin,
|
70
|
-
bundleId,
|
71
|
-
secretKeyHash: providedSecretHash
|
72
|
-
} = authOptions;
|
73
|
-
const {
|
74
|
-
domains,
|
75
|
-
bundleIds,
|
76
|
-
secretHash
|
77
|
-
} = apiKeyMeta;
|
78
|
-
const authResult = {
|
79
|
-
authorized: true,
|
80
|
-
apiKeyMeta,
|
81
|
-
accountMeta: {
|
82
|
-
id: apiKeyMeta.accountId,
|
83
|
-
// TODO update this later
|
84
|
-
name: "",
|
85
|
-
creatorWalletAddress: apiKeyMeta.creatorWalletAddress,
|
86
|
-
limits: apiKeyMeta.limits,
|
87
|
-
rateLimits: apiKeyMeta.rateLimits,
|
88
|
-
usage: apiKeyMeta.usage
|
89
|
-
}
|
90
|
-
};
|
91
|
-
|
92
|
-
// check for public restrictions
|
93
|
-
if (domains.includes("*")) {
|
94
|
-
return authResult;
|
95
|
-
}
|
96
|
-
|
97
|
-
// check for secretHash
|
98
|
-
if (providedSecretHash) {
|
99
|
-
if (secretHash !== providedSecretHash) {
|
100
|
-
return {
|
101
|
-
authorized: false,
|
102
|
-
errorMessage: "Incorrect key provided. You can view your active API keys at https://thirdweb.com/dashboard/settings",
|
103
|
-
errorCode: "SECRET_INVALID",
|
104
|
-
status: 401
|
105
|
-
};
|
106
|
-
}
|
107
|
-
return authResult;
|
108
|
-
}
|
109
|
-
|
110
|
-
// validate domains
|
111
|
-
if (origin) {
|
112
|
-
if (authorizeDomain({
|
113
|
-
domains,
|
114
|
-
origin
|
115
|
-
})) {
|
116
|
-
return authResult;
|
117
|
-
}
|
118
|
-
return {
|
119
|
-
authorized: false,
|
120
|
-
errorMessage: `Invalid request: Unauthorized domain: ${origin}. You can view the restrictions on this API key at https://thirdweb.com/create-api-key`,
|
121
|
-
errorCode: "ORIGIN_UNAUTHORIZED",
|
122
|
-
status: 401
|
123
|
-
};
|
124
|
-
}
|
125
|
-
|
126
|
-
// validate bundleId
|
127
|
-
if (bundleId) {
|
128
|
-
if (authorizeBundleId({
|
129
|
-
bundleIds,
|
130
|
-
bundleId
|
131
|
-
})) {
|
132
|
-
return authResult;
|
133
|
-
}
|
134
|
-
return {
|
135
|
-
authorized: false,
|
136
|
-
errorMessage: `Invalid request: Unauthorized Bundle ID: ${bundleId}. You can view the restrictions on this API key at https://thirdweb.com/create-api-key`,
|
137
|
-
errorCode: "BUNDLE_UNAUTHORIZED",
|
138
|
-
status: 401
|
139
|
-
};
|
140
|
-
}
|
141
|
-
return {
|
142
|
-
authorized: false,
|
143
|
-
errorMessage: "The keys are invalid. Please check the secret-key/clientId and try again.",
|
144
|
-
errorCode: "UNAUTHORIZED",
|
145
|
-
status: 401
|
146
|
-
};
|
147
|
-
}
|
148
|
-
|
149
|
-
// Exposed for use in validating ecosystem partners settings
|
150
|
-
function authorizeDomain(_ref) {
|
151
|
-
let {
|
152
|
-
domains,
|
153
|
-
origin
|
154
|
-
} = _ref;
|
155
|
-
// find matching domain, or if all domains allowed
|
156
|
-
// embedded-wallet.thirdweb(-dev).com is automatically allowed
|
157
|
-
// because the rpc is passed from user's domain to embedded-wallet.thirdweb.com iframe for use.
|
158
|
-
// Note this doesn't allow embedded-wallets from being used if it's disabled. The service check that runs after enforces that.
|
159
|
-
return !![...domains, "embedded-wallet.thirdweb.com", "embedded-wallet.thirdweb-dev.com"].find(d => {
|
160
|
-
// if any domain is allowed, we'll return true
|
161
|
-
if (d === "*") {
|
162
|
-
return true;
|
163
|
-
}
|
164
|
-
|
165
|
-
// special rule for `localhost`
|
166
|
-
// if the domain is localhost, we'll allow any origin that starts with localhost
|
167
|
-
if (d === "localhost" && origin.startsWith("localhost")) {
|
168
|
-
return true;
|
169
|
-
}
|
170
|
-
|
171
|
-
// If the allowedDomain has a wildcard,
|
172
|
-
// we'll check that the ending of our domain matches the wildcard
|
173
|
-
if (d.startsWith("*.")) {
|
174
|
-
// get rid of the * and check if it ends with the `.<domain>.<tld>`
|
175
|
-
const domainRoot = d.slice(1);
|
176
|
-
return origin.endsWith(domainRoot);
|
177
|
-
}
|
178
|
-
|
179
|
-
// If there's no wildcard, we'll check for an exact match
|
180
|
-
return d === origin;
|
181
|
-
});
|
182
|
-
}
|
183
|
-
function authorizeBundleId(_ref2) {
|
184
|
-
let {
|
185
|
-
bundleIds,
|
186
|
-
bundleId
|
187
|
-
} = _ref2;
|
188
|
-
// find matching bundle id, or if all bundles allowed
|
189
|
-
return !!bundleIds.find(b => {
|
190
|
-
if (b === "*") {
|
191
|
-
return true;
|
192
|
-
}
|
193
|
-
return b === bundleId;
|
194
|
-
});
|
195
|
-
}
|
196
|
-
|
197
|
-
exports.SERVICES = SERVICES;
|
198
|
-
exports.SERVICE_DEFINITIONS = SERVICE_DEFINITIONS;
|
199
|
-
exports.SERVICE_NAMES = SERVICE_NAMES;
|
200
|
-
exports.authorizeBundleId = authorizeBundleId;
|
201
|
-
exports.authorizeClient = authorizeClient;
|
202
|
-
exports.authorizeDomain = authorizeDomain;
|
203
|
-
exports.getServiceByName = getServiceByName;
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"../../../../src/cf-worker","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACX,QAAQ,EACT,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAGV,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAGrB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AAEnC,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,GAAG;IACpD,OAAO,EAAE,WAAW,CAAC;IACrB,GAAG,EAAE,gBAAgB,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CA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CASrD"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"../../../../../src/core/authorize","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EAGvB,MAAM,QAAQ,CAAC;AAGhB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAElC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,GAAG,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAClD,GAAG,EAAE,CACH,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,cAAc,GAAG,eAAe,KACnC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAgBF,wBAAsB,SAAS,CAC7B,QAAQ,EAAE,kBAAkB,EAC5B,aAAa,EAAE,iBAAiB,EAChC,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,mBAAmB,CAAC,CAmO9B"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"../../../../../src/core/authorize","sources":["service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,MAAM,MAAM,2BAA2B,GAAG;IAAE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAAE,CAAC;AAEhF,wBAAgB,gBAAgB,CAC9B,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,iBAAiB,EAChC,oBAAoB,CAAC,EAAE,2BAA2B,GACjD,mBAAmB,CAgErB"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"../../../../../src/core/authorize","sources":["types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAE9D,MAAM,MAAM,mBAAmB,GAC3B;IACE,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,cAAc,GAAG,IAAI,CAAC;IAClC,WAAW,EAAE,eAAe,GAAG,IAAI,CAAC;CACrC,GACD;IACE,UAAU,EAAE,KAAK,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"../../../../../src/core/rateLimit","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAuB,MAAM,QAAQ,CAAC;AACrE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAK/C,KAAK,MAAM,GAAG;IACZ,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACvC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;CAC7D,CAAC;AAEF,wBAAsB,SAAS,CAAC,IAAI,EAAE;IACpC,WAAW,EAAE,mBAAmB,CAAC;IACjC,aAAa,EAAE,iBAAiB,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,eAAe,CAAC,CAsE3B"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"../../../../../src/core/rateLimit","sources":["types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GACvB;IACE,WAAW,EAAE,KAAK,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB,GACD;IACE,WAAW,EAAE,IAAI,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"services.d.ts","sourceRoot":"../../../../src/core","sources":["services.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4DtB,CAAC;AAEX,eAAO,MAAM,aAAa,EAErB,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAAE,CAAC;AAE1C,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAqC,CAAC;AAE3D,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,OAAO,GACjB,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEjE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEjD"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"../../../../src/core","sources":["types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAE1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CACnC,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"usage.d.ts","sourceRoot":"../../../../src/core","sources":["usage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gBAAgB;;;IAiB3B;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsEH,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
@@ -1,5 +0,0 @@
|
|
1
|
-
import type { CoreServiceConfig } from "../api";
|
2
|
-
import type { AuthorizationResult } from "../authorize/types";
|
3
|
-
import type { UsageLimitResult } from "./types";
|
4
|
-
export declare function usageLimit(authzResult: AuthorizationResult, serviceConfig: CoreServiceConfig): Promise<UsageLimitResult>;
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"../../../../../src/core/usageLimit","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,wBAAsB,UAAU,CAC9B,WAAW,EAAE,mBAAmB,EAChC,aAAa,EAAE,iBAAiB,GAC/B,OAAO,CAAC,gBAAgB,CAAC,CAmD3B"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"../../../../../src/core/usageLimit","sources":["types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GACxB;IACE,YAAY,EAAE,KAAK,CAAC;CACrB,GACD;IACE,YAAY,EAAE,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"../../../src","sources":["index.ts"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EACL,iBAAiB,EACjB,eAAe,GAChB,MAAM,yBAAyB,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"../../../../src/node","sources":["index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,eAAe,EACf,cAAc,EACf,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,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