@imtbl/sdk 1.31.1-alpha.1 → 1.31.1

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/index.js CHANGED
@@ -160,7 +160,7 @@ const flattenProperties$1 = (properties) => {
160
160
  };
161
161
 
162
162
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
163
- const SDK_VERSION$1 = '1.31.1-alpha.1';
163
+ const SDK_VERSION$1 = '1.31.1';
164
164
  const getFrameParentDomain$1 = () => {
165
165
  if (isNode$1()) {
166
166
  return '';
@@ -14171,7 +14171,7 @@ class MultiRollupApiClients {
14171
14171
  }
14172
14172
 
14173
14173
  // eslint-disable-next-line @typescript-eslint/naming-convention
14174
- const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.31.1-alpha.1' };
14174
+ const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.31.1' };
14175
14175
  const createConfig$1 = ({ basePath, headers, }) => {
14176
14176
  if (!basePath.trim()) {
14177
14177
  throw Error('basePath can not be empty');
@@ -14243,7 +14243,7 @@ class APIError extends Error {
14243
14243
 
14244
14244
  /* eslint-disable implicit-arrow-linebreak */
14245
14245
  const defaultHeaders$1 = {
14246
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.31.1-alpha.1',
14246
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.31.1',
14247
14247
  };
14248
14248
  /**
14249
14249
  * createAPIConfiguration to create a custom Configuration
@@ -14717,7 +14717,7 @@ var blockchain_data = /*#__PURE__*/Object.freeze({
14717
14717
  /* eslint-disable @typescript-eslint/naming-convention */
14718
14718
  class ApiConfiguration extends index$2.Configuration {
14719
14719
  }
14720
- const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.31.1-alpha.1' };
14720
+ const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.31.1' };
14721
14721
  /**
14722
14722
  * @dev use createImmutableXConfiguration instead
14723
14723
  */
@@ -14756,7 +14756,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
14756
14756
  chainID,
14757
14757
  coreContractAddress,
14758
14758
  registrationContractAddress,
14759
- sdkVersion: 'ts-immutable-sdk-1.31.1-alpha.1',
14759
+ sdkVersion: 'ts-immutable-sdk-1.31.1',
14760
14760
  baseConfig,
14761
14761
  });
14762
14762
  const production = ({ baseConfig }) => createImmutableXConfiguration({
@@ -25939,8 +25939,7 @@ class PassportConfiguration {
25939
25939
  relayerUrl;
25940
25940
  multiRollupConfig;
25941
25941
  crossSdkBridgeEnabled;
25942
- popupOverlayOptions;
25943
- constructor({ baseConfig, overrides, crossSdkBridgeEnabled, popupOverlayOptions, ...oidcConfiguration }) {
25942
+ constructor({ baseConfig, overrides, crossSdkBridgeEnabled, ...oidcConfiguration }) {
25944
25943
  validateConfiguration(oidcConfiguration, [
25945
25944
  'clientId',
25946
25945
  'redirectUri',
@@ -25948,10 +25947,6 @@ class PassportConfiguration {
25948
25947
  this.oidcConfiguration = oidcConfiguration;
25949
25948
  this.baseConfig = baseConfig;
25950
25949
  this.crossSdkBridgeEnabled = crossSdkBridgeEnabled || false;
25951
- this.popupOverlayOptions = popupOverlayOptions || {
25952
- disableGenericPopupOverlay: false,
25953
- disableBlockedPopupOverlay: false,
25954
- };
25955
25950
  if (overrides) {
25956
25951
  validateConfiguration(overrides, [
25957
25952
  'authenticationDomain',
@@ -26047,389 +26042,6 @@ const openPopupCenter = ({ url, title, width, height, }) => {
26047
26042
  return newWindow;
26048
26043
  };
26049
26044
 
26050
- /* eslint-disable max-len */
26051
- const PASSPORT_OVERLAY = 'passport-overlay';
26052
- const PASSPORT_OVERLAY_CLOSE = `${PASSPORT_OVERLAY}-close`;
26053
- const PASSPORT_OVERLAY_TRY_AGAIN = `${PASSPORT_OVERLAY}-try-again`;
26054
- const CLOSE_BUTTON_SVG = `
26055
- <svg
26056
- viewBox="0 0 20 20"
26057
- fill="none"
26058
- xmlns="http://www.w3.org/2000/svg"
26059
- style="width: 20px"
26060
- >
26061
- <path
26062
- d="M16.25 5.75833L14.2417 3.75L10 7.99167L5.75833 3.75L3.75 5.75833L7.99167 10L3.75 14.2417L5.75833 16.25L10 12.0083L14.2417 16.25L16.25 14.2417L12.0083 10L16.25 5.75833Z"
26063
- fill="#F3F3F3"
26064
- />
26065
- </svg>
26066
- `;
26067
- const POPUP_BLOCKED_SVG = `
26068
- <svg
26069
- viewBox="0 0 17 16"
26070
- fill="none"
26071
- xmlns="http://www.w3.org/2000/svg"
26072
- style="width: 16px"
26073
- >
26074
- <path
26075
- fill-rule="evenodd"
26076
- clip-rule="evenodd"
26077
- d="M0.5 14.3333L8.5 0.333336L16.5 14.3333H0.5ZM9.16667 10.6667V12H7.83333V10.6667H9.16667ZM9.16667 5.33334L9.16667 9.33334H7.83333L7.83333 5.33334H9.16667Z"
26078
- fill="#E01A3D"
26079
- />
26080
- </svg>
26081
- `;
26082
- const IMMUTABLE_LOGO_SVG = `
26083
- <svg
26084
- style="max-width: 123px; margin-bottom: 24px"
26085
- viewBox="0 0 124 112"
26086
- fill="none"
26087
- xmlns="http://www.w3.org/2000/svg"
26088
- >
26089
- <g clip-path="url(#clip0_332_47939)">
26090
- <g clip-path="url(#clip1_332_47939)">
26091
- <path
26092
- d="M4.10008 74.9453H0.5V93.6041H4.10008V74.9453Z"
26093
- fill="#F3F3F3"
26094
- />
26095
- <path
26096
- d="M22.9585 80.0212C21.1727 80.0212 19.5283 80.7622 18.5505 82.3115C17.8209 80.8013 16.3595 80.0212 14.4691 80.0212C12.864 80.0212 11.3786 80.7231 10.4792 82.1681V80.282H7.00976V93.6063H10.4792V86.2032C10.4792 84.3432 11.7445 82.9503 13.3475 82.9503H13.5565C14.9787 82.9503 15.643 83.8477 15.643 85.6187V93.6085H19.1124V86.2054C19.1124 84.3453 20.3647 82.9525 21.9676 82.9525H22.1767C23.5989 82.9525 24.237 83.8499 24.237 85.6208V93.6106H27.7064V85.2188C27.7064 83.6435 27.3274 82.3832 26.5717 81.4315C25.8029 80.4949 24.6029 80.0256 22.9585 80.0256V80.0212Z"
26097
- fill="#F3F3F3"
26098
- />
26099
- <path
26100
- d="M46.0291 80.0212C44.2432 80.0212 42.5989 80.7622 41.621 82.3115C40.8914 80.8013 39.43 80.0212 37.5396 80.0212C35.9345 80.0212 34.4492 80.7231 33.5497 82.1681V80.282H30.0803V93.6063H33.5497V86.2032C33.5497 84.3432 34.8151 82.9503 36.418 82.9503H36.6271C38.0493 82.9503 38.7135 83.8477 38.7135 85.6187V93.6085H42.1829V86.2054C42.1829 84.3453 43.4352 82.9525 45.0381 82.9525H45.2472C46.6694 82.9525 47.3075 83.8499 47.3075 85.6208V93.6106H50.7769V85.2188C50.7769 83.6435 50.398 82.3832 49.6422 81.4315C48.8734 80.4949 47.6734 80.0256 46.0291 80.0256V80.0212Z"
26101
- fill="#F3F3F3"
26102
- />
26103
- <path
26104
- d="M72.3077 89.2061V83.0785H75.2936V80.282H72.3077V75.9622H68.8383V80.282H61.4312V87.6851C61.4312 89.5451 60.192 91.0683 58.6805 91.0683H58.4715C57.2061 91.0683 56.4896 90.1318 56.4896 88.413V80.282H53.0202V88.8041C53.0202 90.3534 53.3991 91.5746 54.1549 92.4872C54.8975 93.4107 56.0322 93.867 57.5328 93.867C59.188 93.867 60.6102 93.0218 61.4312 91.655V93.6063H64.9006V83.0807H68.8405V90.1448C68.8405 92.396 70.0536 93.6063 72.3099 93.6063H75.7009V90.6794H73.7843C72.5582 90.6794 72.3099 90.4317 72.3099 89.2083L72.3077 89.2061Z"
26105
- fill="#F3F3F3"
26106
- />
26107
- <path
26108
- d="M88.0757 84.8082C88.0757 81.7378 85.8325 80.0191 82.4676 80.0191C79.1027 80.0191 77.0033 81.8791 76.7158 84.404H80.1982C80.2766 83.5979 81.0977 82.8156 82.35 82.8156H82.5722C83.8506 82.8156 84.7109 83.7391 84.7109 84.9364V85.2623L81.346 85.5622C79.9108 85.6795 78.7369 86.0945 77.8243 86.8246C76.9118 87.5525 76.4544 88.5934 76.4544 89.9471C76.4152 92.2895 78.4363 93.8888 80.8364 93.8627C82.5438 93.8627 83.9529 93.1348 84.7871 91.9766C84.8132 92.6785 84.8655 93.226 84.9439 93.6019H88.2042C88.1127 92.9783 88.0735 92.0005 88.0735 90.675V84.806L88.0757 84.8082ZM84.7109 88.1653C84.7109 89.8428 83.3148 91.0661 81.738 91.0661H81.5289C80.5772 91.0661 79.8737 90.5316 79.8737 89.7124C79.8737 89.204 80.0697 88.8281 80.4596 88.5543C80.8516 88.2805 81.3068 88.124 81.8164 88.0849L84.7109 87.785V88.1653Z"
26109
- fill="#F3F3F3"
26110
- />
26111
- <path
26112
- d="M97.7935 80.0212C96.0076 80.0212 94.5201 81.036 93.9452 82.0116V74.9475H90.4758V93.6063H93.9452V91.8766C94.5201 92.8523 96.0055 93.867 97.7935 93.867C101.537 93.9322 103.765 90.5881 103.726 86.9441C103.765 83.3002 101.535 79.956 97.7935 80.0212ZM97.2055 91.0683H96.9964C95.4044 91.1074 93.919 89.3908 93.9452 86.9441C93.919 84.4974 95.4065 82.7808 96.9964 82.8199H97.2055C98.9522 82.8199 100.257 84.4192 100.257 86.9181C100.257 89.4169 98.9391 91.0683 97.2055 91.0683Z"
26113
- fill="#F3F3F3"
26114
- />
26115
- <path
26116
- d="M108.931 74.9453H105.462V93.6041H108.931V74.9453Z"
26117
- fill="#F3F3F3"
26118
- />
26119
- <path
26120
- d="M117.057 80.0212C113.146 79.9691 110.667 82.9612 110.706 86.9441C110.641 91.1987 113.705 93.9192 117.057 93.867C120.33 93.867 122.443 92.0461 123.094 89.3908H119.651C119.403 90.3665 118.555 91.0683 117.303 91.0683H117.081C115.633 91.0683 114.2 89.8189 114.069 88.0371H123.094C123.133 87.4656 123.147 87.0484 123.147 86.7877C123.186 82.8982 120.956 79.9821 117.057 80.0212ZM114.071 85.3688C114.15 83.7934 115.363 82.8178 116.824 82.8178H117.033C118.495 82.8178 119.708 83.7934 119.784 85.3688H114.071Z"
26121
- fill="#F3F3F3"
26122
- />
26123
- </g>
26124
- <path
26125
- d="M30.4851 101.025V109H32.0581V106.195H33.2571C35.0941 106.195 36.7221 105.7 36.7221 103.665C36.7221 101.256 34.8521 101.025 33.2131 101.025H30.4851ZM33.2461 102.257C34.1041 102.257 35.1051 102.367 35.1051 103.676C35.1051 104.732 34.3351 104.974 33.3561 104.974H32.0581V102.257H33.2461Z"
26126
- fill="#F3F3F3"
26127
- />
26128
- <path
26129
- d="M36.9683 109H38.5743L39.1353 107.383H42.2373L42.7983 109H44.5034L41.5224 101.025H39.9383L36.9683 109ZM40.6863 102.95L41.7863 106.096H39.5863L40.6863 102.95Z"
26130
- fill="#F3F3F3"
26131
- />
26132
- <path
26133
- d="M49.1875 105.689C50.0345 105.843 50.6615 106.096 50.6615 106.778C50.6615 107.636 49.7705 107.889 49.0665 107.889C48.1205 107.889 47.3065 107.537 47.1305 106.371H45.6125C45.7555 108.087 47.0535 109.143 49.0115 109.143C50.6175 109.143 52.2455 108.34 52.2455 106.701C52.2455 105.051 50.8155 104.534 49.5175 104.303L48.4725 104.116C47.8345 103.995 47.3615 103.687 47.3615 103.126C47.3615 102.411 48.1755 102.136 48.9015 102.136C49.6495 102.136 50.4635 102.444 50.5845 103.379H52.1025C52.0255 101.85 50.6175 100.882 48.9675 100.882C47.4935 100.882 45.7885 101.586 45.7885 103.192C45.7885 104.578 46.8775 105.249 48.1755 105.502L49.1875 105.689Z"
26134
- fill="#F3F3F3"
26135
- />
26136
- <path
26137
- d="M57.5244 105.689C58.3714 105.843 58.9984 106.096 58.9984 106.778C58.9984 107.636 58.1074 107.889 57.4034 107.889C56.4574 107.889 55.6434 107.537 55.4674 106.371H53.9494C54.0924 108.087 55.3904 109.143 57.3484 109.143C58.9544 109.143 60.5824 108.34 60.5824 106.701C60.5824 105.051 59.1524 104.534 57.8544 104.303L56.8094 104.116C56.1714 103.995 55.6984 103.687 55.6984 103.126C55.6984 102.411 56.5124 102.136 57.2384 102.136C57.9864 102.136 58.8004 102.444 58.9214 103.379H60.4394C60.3624 101.85 58.9544 100.882 57.3044 100.882C55.8304 100.882 54.1254 101.586 54.1254 103.192C54.1254 104.578 55.2144 105.249 56.5124 105.502L57.5244 105.689Z"
26138
- fill="#F3F3F3"
26139
- />
26140
- <path
26141
- d="M62.5544 101.025V109H64.1274V106.195H65.3264C67.1634 106.195 68.7914 105.7 68.7914 103.665C68.7914 101.256 66.9214 101.025 65.2824 101.025H62.5544ZM65.3154 102.257C66.1734 102.257 67.1744 102.367 67.1744 103.676C67.1744 104.732 66.4044 104.974 65.4254 104.974H64.1274V102.257H65.3154Z"
26142
- fill="#F3F3F3"
26143
- />
26144
- <path
26145
- d="M71.8888 105.007C71.8888 103.137 72.9228 102.136 74.1658 102.136C75.4088 102.136 76.4428 103.137 76.4428 105.007C76.4428 106.877 75.4088 107.889 74.1658 107.889C72.9228 107.889 71.8888 106.877 71.8888 105.007ZM78.0708 105.007C78.0708 102.532 76.5418 100.882 74.1658 100.882C71.7898 100.882 70.2608 102.532 70.2608 105.007C70.2608 107.482 71.7898 109.143 74.1658 109.143C76.5418 109.143 78.0708 107.482 78.0708 105.007Z"
26146
- fill="#F3F3F3"
26147
- />
26148
- <path
26149
- d="M85.0133 109H86.7623L84.9913 105.546C85.9813 105.128 86.4323 104.358 86.4323 103.445C86.4323 101.773 85.4313 101.025 82.8023 101.025H80.1843V109H81.7573V105.876H83.0553H83.4293L85.0133 109ZM82.9783 102.257C84.0453 102.257 84.8153 102.532 84.8153 103.456C84.8153 104.237 84.2763 104.655 83.0553 104.655H81.7573V102.257H82.9783Z"
26150
- fill="#F3F3F3"
26151
- />
26152
- <path
26153
- d="M90.1424 109H91.7154V102.301H94.1794V101.025H87.6894V102.301H90.1424V109Z"
26154
- fill="#F3F3F3"
26155
- />
26156
- <g clip-path="url(#clip2_332_47939)">
26157
- <circle
26158
- cx="61.5"
26159
- cy="30"
26160
- r="28.125"
26161
- fill="url(#paint0_radial_332_47939)"
26162
- />
26163
- <circle
26164
- cx="61.5"
26165
- cy="30"
26166
- r="28.125"
26167
- fill="url(#paint1_radial_332_47939)"
26168
- />
26169
- <path
26170
- d="M61.5 0C44.9315 0 31.5 13.4315 31.5 30C31.5 46.5685 44.9315 60 61.5 60C78.0685 60 91.5 46.5685 91.5 30C91.5 13.4315 78.0685 0 61.5 0ZM60.3397 11.4576C61.1729 11.0494 62.0508 11.0774 62.8588 11.5359C65.6603 13.1323 68.4534 14.7428 71.2325 16.37C72.1272 16.8956 72.5857 17.7372 72.5885 18.7717C72.6053 22.3979 72.5997 26.0214 72.5885 29.6477C72.5885 29.7819 72.5019 29.9776 72.3928 30.0419C71.3164 30.685 70.226 31.3029 69.0433 31.9851V31.4147C69.0433 27.685 69.0322 23.9581 69.0517 20.2283C69.0545 19.5126 68.8085 19.0513 68.1738 18.6906C64.9222 16.8425 61.6873 14.9609 58.4469 13.0904C58.3071 13.0093 58.1701 12.9226 57.9576 12.794C58.7908 12.3215 59.5401 11.8462 60.3341 11.4576H60.3397ZM59.7442 48.5564C59.5624 48.4641 59.4282 48.3998 59.2968 48.3243C55.0051 45.8499 50.719 43.3588 46.4133 40.904C45.2055 40.2162 44.6547 39.2349 44.6687 37.8565C44.6938 34.9264 44.6855 31.9963 44.6715 29.0634C44.6659 27.7409 45.2027 26.7819 46.3658 26.1221C49.3882 24.4026 52.3938 22.658 55.3993 20.9105C55.6594 20.7596 55.8495 20.7344 56.1207 20.8966C57.158 21.52 58.2148 22.1156 59.3192 22.753C59.1095 22.8788 58.9501 22.9739 58.788 23.069C55.5335 24.9478 52.2847 26.8322 49.0219 28.6999C48.4879 29.0047 48.239 29.4017 48.2446 30.0224C48.2614 32.3318 48.2642 34.6412 48.2446 36.9506C48.239 37.5881 48.4935 37.9935 49.0415 38.3066C52.4832 40.2749 55.911 42.2656 59.35 44.2395C59.6407 44.4073 59.7637 44.5806 59.7582 44.9273C59.733 46.11 59.7498 47.2954 59.7498 48.5592L59.7442 48.5564ZM59.7442 41.9413C59.445 41.7707 59.2297 41.6505 59.0144 41.5247C56.2856 39.9506 53.5596 38.3709 50.8253 36.808C50.5289 36.6403 50.4199 36.4585 50.4226 36.1146C50.4422 34.3392 50.4338 32.5638 50.4282 30.7884C50.4282 30.548 50.4646 30.383 50.7022 30.2488C51.7088 29.6869 52.7041 29.0997 53.7022 28.5266C53.7749 28.4846 53.8532 28.4539 53.9846 28.3896V30.383C53.9846 31.4623 54.0014 32.5443 53.979 33.6235C53.9651 34.2386 54.2027 34.6552 54.7395 34.9571C56.2856 35.8294 57.8122 36.7353 59.3583 37.6048C59.6631 37.7754 59.7554 37.9655 59.7498 38.301C59.7302 39.4809 59.7414 40.6636 59.7414 41.9385L59.7442 41.9413ZM56.5932 18.6375C56.0144 18.2964 55.5196 18.2992 54.9408 18.6375C51.6976 20.5331 48.4404 22.4035 45.1859 24.2824C45.0489 24.3635 44.9063 24.4362 44.6631 24.5676C44.7498 23.3318 44.4842 22.1659 44.9063 21.0363C45.1356 20.4185 45.5662 19.9543 46.1365 19.6244C48.8514 18.0559 51.5634 16.4846 54.2838 14.9245C55.2763 14.3541 56.2884 14.3681 57.281 14.9413C60.3705 16.7195 63.4571 18.5033 66.5382 20.2926C66.6696 20.3681 66.8346 20.5387 66.8346 20.6673C66.8569 21.9366 66.8486 23.2088 66.8486 24.5704C65.7274 23.9245 64.6929 23.3262 63.6584 22.7279C61.3015 21.3663 58.939 20.0186 56.5932 18.6375ZM78.3033 38.5974C78.2223 39.5955 77.6379 40.3029 76.774 40.8006C73.4664 42.7018 70.1617 44.6142 66.8569 46.521C65.8197 47.1193 64.7824 47.7176 63.7423 48.3159C63.6165 48.3886 63.4879 48.4501 63.3173 48.5396C63.3061 48.3663 63.2922 48.2404 63.2922 48.1146C63.2922 47.0186 63.2978 45.9254 63.2866 44.8294C63.2866 44.5806 63.3453 44.4296 63.5746 44.2982C68.3947 41.5247 73.212 38.7428 78.0266 35.9637C78.0993 35.9217 78.1803 35.8882 78.3173 35.8239C78.3173 36.7968 78.3732 37.7027 78.3033 38.5974ZM78.3285 31.6971C78.3201 32.8322 77.7078 33.6291 76.7377 34.1883C72.9688 36.3551 69.2027 38.5331 65.4366 40.7083C64.7488 41.1053 64.0582 41.4995 63.3201 41.9245C63.3089 41.7372 63.295 41.6142 63.295 41.4883C63.295 40.4091 63.3062 39.3271 63.2866 38.2479C63.281 37.9404 63.3844 37.7782 63.65 37.6244C67.075 35.6589 70.4888 33.671 73.9194 31.7167C74.5289 31.37 74.7973 30.9422 74.7917 30.2265C74.7665 26.4967 74.7805 22.767 74.7805 19.0373V18.3858C75.6752 18.9254 76.514 19.37 77.2801 19.9124C77.979 20.4073 78.3313 21.1566 78.3341 22.0205C78.3453 25.247 78.3537 28.4734 78.3313 31.6999L78.3285 31.6971Z"
26171
- fill="#131313"
26172
- />
26173
- <path
26174
- fill-rule="evenodd"
26175
- clip-rule="evenodd"
26176
- d="M61.5 0C44.9315 0 31.5 13.4315 31.5 30C31.5 46.5685 44.9315 60 61.5 60C78.0685 60 91.5 46.5685 91.5 30C91.5 13.4315 78.0685 0 61.5 0ZM61.5 2.5C46.3122 2.5 34 14.8122 34 30C34 45.1878 46.3122 57.5 61.5 57.5C76.6878 57.5 89 45.1878 89 30C89 14.8122 76.6878 2.5 61.5 2.5Z"
26177
- fill="url(#paint2_radial_332_47939)"
26178
- />
26179
- <path
26180
- fill-rule="evenodd"
26181
- clip-rule="evenodd"
26182
- d="M61.5 0C44.9315 0 31.5 13.4315 31.5 30C31.5 46.5685 44.9315 60 61.5 60C78.0685 60 91.5 46.5685 91.5 30C91.5 13.4315 78.0685 0 61.5 0ZM61.5 2.5C46.3122 2.5 34 14.8122 34 30C34 45.1878 46.3122 57.5 61.5 57.5C76.6878 57.5 89 45.1878 89 30C89 14.8122 76.6878 2.5 61.5 2.5Z"
26183
- fill="url(#paint3_radial_332_47939)"
26184
- />
26185
- </g>
26186
- </g>
26187
- <defs>
26188
- <radialGradient
26189
- id="paint0_radial_332_47939"
26190
- cx="0"
26191
- cy="0"
26192
- r="1"
26193
- gradientUnits="userSpaceOnUse"
26194
- gradientTransform="translate(48.3053 16.7373) rotate(44.9817) scale(58.4359 123.929)"
26195
- >
26196
- <stop stop-color="#A3EEF8" />
26197
- <stop offset="0.177083" stop-color="#A4DCF5" />
26198
- <stop offset="0.380208" stop-color="#A6AEEC" />
26199
- <stop offset="1" stop-color="#ECBEE1" />
26200
- </radialGradient>
26201
- <radialGradient
26202
- id="paint1_radial_332_47939"
26203
- cx="0"
26204
- cy="0"
26205
- r="1"
26206
- gradientUnits="userSpaceOnUse"
26207
- gradientTransform="translate(63.9394 54.6335) rotate(84.265) scale(30.2672 57.9018)"
26208
- >
26209
- <stop stop-color="#FCF5EE" />
26210
- <stop offset="0.715135" stop-color="#ECBEE1" stop-opacity="0" />
26211
- </radialGradient>
26212
- <radialGradient
26213
- id="paint2_radial_332_47939"
26214
- cx="0"
26215
- cy="0"
26216
- r="1"
26217
- gradientUnits="userSpaceOnUse"
26218
- gradientTransform="translate(47.4257 15.8532) rotate(44.9817) scale(62.3316 132.191)"
26219
- >
26220
- <stop stop-color="#A3EEF8" />
26221
- <stop offset="0.177083" stop-color="#A4DCF5" />
26222
- <stop offset="0.380208" stop-color="#A6AEEC" />
26223
- <stop offset="1" stop-color="#ECBEE1" />
26224
- </radialGradient>
26225
- <radialGradient
26226
- id="paint3_radial_332_47939"
26227
- cx="0"
26228
- cy="0"
26229
- r="1"
26230
- gradientUnits="userSpaceOnUse"
26231
- gradientTransform="translate(64.102 56.2758) rotate(84.265) scale(32.2851 61.7619)"
26232
- >
26233
- <stop stop-color="#FCF5EE" />
26234
- <stop offset="0.715135" stop-color="#ECBEE1" stop-opacity="0" />
26235
- </radialGradient>
26236
- <clipPath id="clip0_332_47939">
26237
- <rect
26238
- width="123"
26239
- height="112"
26240
- fill="white"
26241
- transform="translate(0.5)"
26242
- />
26243
- </clipPath>
26244
- <clipPath id="clip1_332_47939">
26245
- <rect
26246
- width="123"
26247
- height="19"
26248
- fill="white"
26249
- transform="translate(0.5 75)"
26250
- />
26251
- </clipPath>
26252
- <clipPath id="clip2_332_47939">
26253
- <rect
26254
- width="60"
26255
- height="60"
26256
- fill="white"
26257
- transform="translate(31.5)"
26258
- />
26259
- </clipPath>
26260
- </defs>
26261
- </svg>
26262
- `;
26263
-
26264
- const getCloseButton = () => `
26265
- <button
26266
- class="${PASSPORT_OVERLAY_CLOSE}"
26267
- style="
26268
- background: #f3f3f326;
26269
- border: none;
26270
- border-radius: 50%;
26271
- width: 48px;
26272
- height: 48px;
26273
- position: absolute;
26274
- top: 40px;
26275
- right: 40px;
26276
- cursor: pointer;
26277
- display: flex;
26278
- align-items: center;
26279
- justify-content: center;
26280
- "
26281
- >
26282
- ${CLOSE_BUTTON_SVG}
26283
- </button>
26284
- `;
26285
- const getBlockedContents = () => `
26286
- <div
26287
- style="
26288
- color: #e01a3d;
26289
- display: flex;
26290
- align-items: center;
26291
- gap: 4px;
26292
- margin-bottom: 10px;
26293
- "
26294
- >
26295
- ${POPUP_BLOCKED_SVG}
26296
- Pop-up blocked
26297
- </div>
26298
- <p style="color: #b6b6b6; text-align: center; margin: 0">
26299
- Please adjust your browser settings <br />and try again below
26300
- </p>
26301
- `;
26302
- const getGenericContents = () => `
26303
- <p style="color: #b6b6b6; text-align: center; margin: 0">
26304
- Secure pop-up didn't open?<br />We'll help you re-launch
26305
- </p>
26306
- `;
26307
- const getTryAgainButton = () => `
26308
- <button
26309
- class="${PASSPORT_OVERLAY_TRY_AGAIN}"
26310
- style="
26311
- margin-top: 27px;
26312
- color: #f3f3f3;
26313
- background: transparent;
26314
- padding: 12px 24px;
26315
- border-radius: 30px;
26316
- border: 2px solid #f3f3f3;
26317
- font-size: 1em;
26318
- font-weight: 500;
26319
- cursor: pointer;
26320
- "
26321
- >
26322
- Try again
26323
- </button>
26324
- `;
26325
- const getOverlay = (contents) => `
26326
- <div
26327
- class="${PASSPORT_OVERLAY}"
26328
- style="
26329
- position: fixed;
26330
- top: 0;
26331
- left: 0;
26332
- width: 100%;
26333
- height: 100%;
26334
- background: rgba(13, 13, 13, 0.48);
26335
- backdrop-filter: blur(28px);
26336
- display: flex;
26337
- flex-direction: column;
26338
- justify-content: center;
26339
- align-items: center;
26340
- font-size: 16px;
26341
- line-height: 1.5;
26342
- font-family: Roboto;
26343
- font-style: normal;
26344
- font-weight: 400;
26345
- font-feature-settings: 'clig' off, 'liga' off;
26346
- z-index: 2147483647;
26347
- "
26348
- >
26349
- ${getCloseButton()}
26350
- <div
26351
- style="
26352
- display: flex;
26353
- flex-direction: column;
26354
- align-items: center;
26355
- max-width: 400px;
26356
- "
26357
- >
26358
- ${IMMUTABLE_LOGO_SVG}
26359
- ${contents}
26360
- ${getTryAgainButton()}
26361
- </div>
26362
- </div>
26363
- `;
26364
- const getBlockedOverlay = () => getOverlay(getBlockedContents());
26365
- const getGenericOverlay = () => getOverlay(getGenericContents());
26366
-
26367
- class Overlay {
26368
- disableGenericPopupOverlay;
26369
- disableBlockedPopupOverlay;
26370
- overlay;
26371
- isBlockedOverlay;
26372
- tryAgainListener;
26373
- onCloseListener;
26374
- constructor(popupOverlayOptions, isBlockedOverlay = false) {
26375
- this.disableBlockedPopupOverlay = popupOverlayOptions.disableBlockedPopupOverlay || false;
26376
- this.disableGenericPopupOverlay = popupOverlayOptions.disableGenericPopupOverlay || false;
26377
- this.isBlockedOverlay = isBlockedOverlay;
26378
- }
26379
- append(tryAgainOnClick, onCloseClick) {
26380
- if (this.shouldAppendOverlay()) {
26381
- this.appendOverlay();
26382
- this.updateTryAgainButton(tryAgainOnClick);
26383
- this.updateCloseButton(onCloseClick);
26384
- }
26385
- }
26386
- update(tryAgainOnClick) {
26387
- this.updateTryAgainButton(tryAgainOnClick);
26388
- }
26389
- remove() {
26390
- if (this.overlay) {
26391
- this.overlay.remove();
26392
- }
26393
- }
26394
- shouldAppendOverlay() {
26395
- if (this.disableGenericPopupOverlay && this.disableBlockedPopupOverlay)
26396
- return false;
26397
- if (this.disableGenericPopupOverlay && !this.isBlockedOverlay)
26398
- return false;
26399
- if (this.disableBlockedPopupOverlay && this.isBlockedOverlay)
26400
- return false;
26401
- return true;
26402
- }
26403
- appendOverlay() {
26404
- if (!this.overlay) {
26405
- const overlay = document.createElement('div');
26406
- overlay.innerHTML = this.isBlockedOverlay ? getBlockedOverlay() : getGenericOverlay();
26407
- document.body.insertAdjacentElement('beforeend', overlay);
26408
- this.overlay = overlay;
26409
- }
26410
- }
26411
- updateTryAgainButton(tryAgainOnClick) {
26412
- const tryAgainButton = this.overlay?.querySelector(`.${PASSPORT_OVERLAY_TRY_AGAIN}`);
26413
- if (tryAgainButton) {
26414
- if (this.tryAgainListener) {
26415
- tryAgainButton.removeEventListener('click', this.tryAgainListener);
26416
- }
26417
- this.tryAgainListener = tryAgainOnClick;
26418
- tryAgainButton.addEventListener('click', tryAgainOnClick);
26419
- }
26420
- }
26421
- updateCloseButton(onCloseClick) {
26422
- const closeButton = this.overlay?.querySelector(`.${PASSPORT_OVERLAY_CLOSE}`);
26423
- if (closeButton) {
26424
- if (this.onCloseListener) {
26425
- closeButton.removeEventListener('click', this.onCloseListener);
26426
- }
26427
- this.onCloseListener = onCloseClick;
26428
- closeButton.addEventListener('click', onCloseClick);
26429
- }
26430
- }
26431
- }
26432
-
26433
26045
  const CONFIRMATION_WINDOW_TITLE = 'Confirm this transaction';
26434
26046
  const CONFIRMATION_WINDOW_HEIGHT = 720;
26435
26047
  const CONFIRMATION_WINDOW_WIDTH = 480;
@@ -26437,8 +26049,6 @@ const CONFIRMATION_WINDOW_CLOSED_POLLING_DURATION = 1000;
26437
26049
  class ConfirmationScreen {
26438
26050
  config;
26439
26051
  confirmationWindow;
26440
- popupOptions;
26441
- overlay;
26442
26052
  constructor(config) {
26443
26053
  this.config = config;
26444
26054
  }
@@ -26470,25 +26080,26 @@ class ConfirmationScreen {
26470
26080
  break;
26471
26081
  }
26472
26082
  case ReceiveMessage.TRANSACTION_CONFIRMED: {
26473
- this.closeWindow();
26474
26083
  resolve({ confirmed: true });
26475
26084
  break;
26476
26085
  }
26477
26086
  case ReceiveMessage.TRANSACTION_ERROR: {
26478
- this.closeWindow();
26479
26087
  reject(new Error('Error during transaction confirmation'));
26480
26088
  break;
26481
26089
  }
26482
26090
  case ReceiveMessage.TRANSACTION_REJECTED: {
26483
- this.closeWindow();
26484
26091
  reject(new Error('User rejected transaction'));
26485
26092
  break;
26486
26093
  }
26487
26094
  default:
26488
- this.closeWindow();
26489
26095
  reject(new Error('Unsupported message type'));
26490
26096
  }
26491
26097
  };
26098
+ if (!this.confirmationWindow) {
26099
+ resolve({ confirmed: false });
26100
+ return;
26101
+ }
26102
+ window.addEventListener('message', messageHandler);
26492
26103
  let href = '';
26493
26104
  if (chainType === TransactionApprovalRequestChainTypeEnum.Starkex) {
26494
26105
  href = this.getHref('transaction', { transactionId, etherAddress, chainType });
@@ -26498,7 +26109,6 @@ class ConfirmationScreen {
26498
26109
  transactionID: transactionId, etherAddress, chainType, chainID: chainId,
26499
26110
  });
26500
26111
  }
26501
- window.addEventListener('message', messageHandler);
26502
26112
  this.showConfirmationScreen(href, messageHandler, resolve);
26503
26113
  });
26504
26114
  }
@@ -26518,25 +26128,25 @@ class ConfirmationScreen {
26518
26128
  break;
26519
26129
  }
26520
26130
  case ReceiveMessage.MESSAGE_CONFIRMED: {
26521
- this.closeWindow();
26522
26131
  resolve({ confirmed: true });
26523
26132
  break;
26524
26133
  }
26525
26134
  case ReceiveMessage.MESSAGE_ERROR: {
26526
- this.closeWindow();
26527
26135
  reject(new Error('Error during message confirmation'));
26528
26136
  break;
26529
26137
  }
26530
26138
  case ReceiveMessage.MESSAGE_REJECTED: {
26531
- this.closeWindow();
26532
26139
  reject(new Error('User rejected message'));
26533
26140
  break;
26534
26141
  }
26535
26142
  default:
26536
- this.closeWindow();
26537
26143
  reject(new Error('Unsupported message type'));
26538
26144
  }
26539
26145
  };
26146
+ if (!this.confirmationWindow) {
26147
+ resolve({ confirmed: false });
26148
+ return;
26149
+ }
26540
26150
  window.addEventListener('message', messageHandler);
26541
26151
  const href = this.getHref('zkevm/message', { messageID, etherAddress });
26542
26152
  this.showConfirmationScreen(href, messageHandler, resolve);
@@ -26547,60 +26157,27 @@ class ConfirmationScreen {
26547
26157
  // There is no need to open a confirmation window if cross-sdk bridge is enabled
26548
26158
  return;
26549
26159
  }
26550
- this.popupOptions = popupOptions;
26551
- try {
26552
- // confirmationWindow need to call close on in try again, then reopen
26553
- this.confirmationWindow = openPopupCenter({
26554
- url: this.getHref('loading'),
26555
- title: CONFIRMATION_WINDOW_TITLE,
26556
- width: popupOptions?.width || CONFIRMATION_WINDOW_WIDTH,
26557
- height: popupOptions?.height || CONFIRMATION_WINDOW_HEIGHT,
26558
- });
26559
- this.overlay = new Overlay(this.config.popupOverlayOptions);
26560
- }
26561
- catch (e) {
26562
- // If an error is thrown here then the popup is blocked
26563
- this.overlay = new Overlay(this.config.popupOverlayOptions, true);
26564
- }
26565
- this.overlay.append(() => this.recreateConfirmationWindow(this.getHref('loading')), () => this.closeWindow());
26160
+ this.confirmationWindow = openPopupCenter({
26161
+ url: this.getHref('loading'),
26162
+ title: CONFIRMATION_WINDOW_TITLE,
26163
+ width: popupOptions?.width || CONFIRMATION_WINDOW_WIDTH,
26164
+ height: popupOptions?.height || CONFIRMATION_WINDOW_HEIGHT,
26165
+ });
26566
26166
  }
26567
26167
  closeWindow() {
26568
26168
  this.confirmationWindow?.close();
26569
- this.overlay?.remove();
26570
- this.overlay = undefined;
26571
26169
  }
26572
26170
  showConfirmationScreen(href, messageHandler, resolve) {
26573
- // If popup blocked, the confirmation window will not exist
26574
- if (this.confirmationWindow) {
26575
- this.confirmationWindow.location.href = href; // update confirmation window before calling close on old window
26576
- }
26577
- // This indicates the user closed the overlay so the transaction should be rejected
26578
- if (!this.overlay) {
26579
- resolve({ confirmed: false });
26580
- return;
26581
- }
26582
- this.overlay.update(() => this.recreateConfirmationWindow(href));
26171
+ this.confirmationWindow.location.href = href;
26583
26172
  // https://stackoverflow.com/questions/9388380/capture-the-close-event-of-popup-window-in-javascript/48240128#48240128
26584
26173
  const timer = setInterval(() => {
26585
26174
  if (this.confirmationWindow?.closed) {
26586
26175
  clearInterval(timer);
26587
26176
  window.removeEventListener('message', messageHandler);
26588
26177
  resolve({ confirmed: false });
26589
- this.confirmationWindow = undefined;
26590
26178
  }
26591
26179
  }, CONFIRMATION_WINDOW_CLOSED_POLLING_DURATION);
26592
26180
  }
26593
- recreateConfirmationWindow(href) {
26594
- try {
26595
- this.confirmationWindow = openPopupCenter({
26596
- url: href,
26597
- title: CONFIRMATION_WINDOW_TITLE,
26598
- width: this.popupOptions?.width || CONFIRMATION_WINDOW_WIDTH,
26599
- height: this.popupOptions?.height || CONFIRMATION_WINDOW_HEIGHT,
26600
- });
26601
- }
26602
- catch { /* Empty */ }
26603
- }
26604
26181
  }
26605
26182
 
26606
26183
  var RelayerTransactionStatus;
@@ -57880,7 +57457,7 @@ const flattenProperties = (properties) => {
57880
57457
  };
57881
57458
 
57882
57459
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
57883
- const SDK_VERSION = '1.31.1-alpha.1';
57460
+ const SDK_VERSION = '1.31.1';
57884
57461
  const getFrameParentDomain = () => {
57885
57462
  if (isNode()) {
57886
57463
  return '';
@@ -63102,7 +62679,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
63102
62679
  maxPriorityFeePerGas: BigNumber$1.from(10e9),
63103
62680
  };
63104
62681
 
63105
- const SDK_VERSION_MARKER = '1.31.1-alpha.1';
62682
+ const SDK_VERSION_MARKER = '1.31.1';
63106
62683
  // This SDK version is replaced by the `yarn build` command ran on the root level
63107
62684
  const globalPackageVersion = () => SDK_VERSION_MARKER;
63108
62685
 
package/dist/orderbook.js CHANGED
@@ -132,7 +132,7 @@ const flattenProperties = (properties) => {
132
132
  };
133
133
 
134
134
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
135
- const SDK_VERSION = '1.31.1-alpha.1';
135
+ const SDK_VERSION = '1.31.1';
136
136
  const getFrameParentDomain = () => {
137
137
  if (isNode()) {
138
138
  return '';
@@ -13529,20 +13529,12 @@ interface PassportOverrides {
13529
13529
  passportMrBasePath: string;
13530
13530
  imxApiClients?: ImxApiClients;
13531
13531
  }
13532
- interface PopupOverlayOptions {
13533
- disableGenericPopupOverlay?: boolean;
13534
- disableBlockedPopupOverlay?: boolean;
13535
- }
13536
13532
  interface PassportModuleConfiguration extends ModuleConfiguration<PassportOverrides>, OidcConfiguration {
13537
13533
  /**
13538
13534
  * This flag indicates that Passport is being used in a cross-sdk bridge scenario
13539
13535
  * and not directly on the web.
13540
13536
  */
13541
13537
  crossSdkBridgeEnabled?: boolean;
13542
- /**
13543
- * Options for disabling the Passport popup overlays.
13544
- */
13545
- popupOverlayOptions?: PopupOverlayOptions;
13546
13538
  }
13547
13539
  type DeviceConnectResponse = {
13548
13540
  code: string;