@thirdweb-dev/service-utils 0.4.19 → 0.4.20-nightly-b2be63ada-20240312194347

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('../../dist/index-62b88cac.cjs.dev.js');
5
+ var index = require('../../dist/index-654b0c0c.cjs.dev.js');
6
6
  var aws4fetch = require('aws4fetch');
7
7
  var zod = require('zod');
8
8
  var services = require('../../dist/services-508322f3.cjs.dev.js');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('../../dist/index-aa324361.cjs.prod.js');
5
+ var index = require('../../dist/index-5d77a48b.cjs.prod.js');
6
6
  var aws4fetch = require('aws4fetch');
7
7
  var zod = require('zod');
8
8
  var services = require('../../dist/services-5c4d6977.cjs.prod.js');
@@ -1,5 +1,5 @@
1
- import { a as authorize } from '../../dist/index-3b9a0743.esm.js';
2
- export { r as rateLimit, u as usageLimit } from '../../dist/index-3b9a0743.esm.js';
1
+ import { a as authorize } from '../../dist/index-4aff8737.esm.js';
2
+ export { r as rateLimit, u as usageLimit } from '../../dist/index-4aff8737.esm.js';
3
3
  import { AwsClient } from 'aws4fetch';
4
4
  import { z } from 'zod';
5
5
  export { b as SERVICES, S as SERVICE_DEFINITIONS, a as SERVICE_NAMES, g as getServiceByName } from '../../dist/services-2aecbda8.esm.js';
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"../../../../../src/core/authorize","sources":["client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,MAAM,MAAM,0BAA0B,GAAG;IACvC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AAEF,wBAAgB,eAAe,CAC7B,WAAW,EAAE,0BAA0B,EACvC,UAAU,EAAE,cAAc,GACzB,mBAAmB,CA2GrB"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"../../../../../src/core/authorize","sources":["client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,MAAM,MAAM,0BAA0B,GAAG;IACvC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AAEF,wBAAgB,eAAe,CAC7B,WAAW,EAAE,0BAA0B,EACvC,UAAU,EAAE,cAAc,GACzB,mBAAmB,CAkHrB"}
@@ -112,7 +112,10 @@ function authorizeClient(authOptions, apiKeyMeta) {
112
112
  if (origin) {
113
113
  if (
114
114
  // find matching domain, or if all domains allowed
115
- domains.find(d => {
115
+ // embedded-wallet.thirdweb(-dev).com is automatically allowed
116
+ // because the rpc is passed from user's domain to embedded-wallet.thirdweb.com iframe for use.
117
+ // Note this doesn't allow embedded-wallets from being used if it's disabled. The service check that runs after enforces that.
118
+ [...domains, "embedded-wallet.thirdweb.com", "embedded-wallet.thirdweb-dev.com"].find(d => {
116
119
  // if any domain is allowed, we'll return true
117
120
  if (d === "*") {
118
121
  return true;
@@ -114,7 +114,10 @@ function authorizeClient(authOptions, apiKeyMeta) {
114
114
  if (origin) {
115
115
  if (
116
116
  // find matching domain, or if all domains allowed
117
- domains.find(d => {
117
+ // embedded-wallet.thirdweb(-dev).com is automatically allowed
118
+ // because the rpc is passed from user's domain to embedded-wallet.thirdweb.com iframe for use.
119
+ // Note this doesn't allow embedded-wallets from being used if it's disabled. The service check that runs after enforces that.
120
+ [...domains, "embedded-wallet.thirdweb.com", "embedded-wallet.thirdweb-dev.com"].find(d => {
118
121
  // if any domain is allowed, we'll return true
119
122
  if (d === "*") {
120
123
  return true;
@@ -114,7 +114,10 @@ function authorizeClient(authOptions, apiKeyMeta) {
114
114
  if (origin) {
115
115
  if (
116
116
  // find matching domain, or if all domains allowed
117
- domains.find(d => {
117
+ // embedded-wallet.thirdweb(-dev).com is automatically allowed
118
+ // because the rpc is passed from user's domain to embedded-wallet.thirdweb.com iframe for use.
119
+ // Note this doesn't allow embedded-wallets from being used if it's disabled. The service check that runs after enforces that.
120
+ [...domains, "embedded-wallet.thirdweb.com", "embedded-wallet.thirdweb-dev.com"].find(d => {
118
121
  // if any domain is allowed, we'll return true
119
122
  if (d === "*") {
120
123
  return true;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var node_crypto = require('node:crypto');
6
- var index = require('../../dist/index-62b88cac.cjs.dev.js');
6
+ var index = require('../../dist/index-654b0c0c.cjs.dev.js');
7
7
  var services = require('../../dist/services-508322f3.cjs.dev.js');
8
8
 
9
9
  /**
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var node_crypto = require('node:crypto');
6
- var index = require('../../dist/index-aa324361.cjs.prod.js');
6
+ var index = require('../../dist/index-5d77a48b.cjs.prod.js');
7
7
  var services = require('../../dist/services-5c4d6977.cjs.prod.js');
8
8
 
9
9
  /**
@@ -1,6 +1,6 @@
1
1
  import { createHash } from 'node:crypto';
2
- import { a as authorize } from '../../dist/index-3b9a0743.esm.js';
3
- export { r as rateLimit, u as usageLimit } from '../../dist/index-3b9a0743.esm.js';
2
+ import { a as authorize } from '../../dist/index-4aff8737.esm.js';
3
+ export { r as rateLimit, u as usageLimit } from '../../dist/index-4aff8737.esm.js';
4
4
  export { b as SERVICES, S as SERVICE_DEFINITIONS, a as SERVICE_NAMES, g as getServiceByName } from '../../dist/services-2aecbda8.esm.js';
5
5
 
6
6
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thirdweb-dev/service-utils",
3
- "version": "0.4.19",
3
+ "version": "0.4.20-nightly-b2be63ada-20240312194347",
4
4
  "main": "dist/thirdweb-dev-service-utils.cjs.js",
5
5
  "module": "dist/thirdweb-dev-service-utils.esm.js",
6
6
  "exports": {