@imtbl/sdk 1.31.0-alpha.1 → 1.31.0

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.0-alpha.1';
163
+ const SDK_VERSION$1 = '1.31.0';
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.0-alpha.1' };
14174
+ const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.31.0' };
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.0-alpha.1',
14246
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.31.0',
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.0-alpha.1' };
14720
+ const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.31.0' };
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.0-alpha.1',
14759
+ sdkVersion: 'ts-immutable-sdk-1.31.0',
14760
14760
  baseConfig,
14761
14761
  });
14762
14762
  const production = ({ baseConfig }) => createImmutableXConfiguration({
@@ -25138,8 +25138,10 @@ class AuthManager {
25138
25138
  }
25139
25139
  async getLogoutArgs() {
25140
25140
  const user = await this.getUser();
25141
+ const { oidcConfiguration } = this.config;
25141
25142
  return {
25142
25143
  id_token_hint: user?.idToken,
25144
+ post_logout_redirect_uri: oidcConfiguration.logoutRedirectUri,
25143
25145
  };
25144
25146
  }
25145
25147
  async logout() {
@@ -26042,374 +26044,6 @@ const openPopupCenter = ({ url, title, width, height, }) => {
26042
26044
  return newWindow;
26043
26045
  };
26044
26046
 
26045
- /* eslint-disable max-len */
26046
- const PASSPORT_OVERLAY = 'passport-overlay';
26047
- const PASSPORT_OVERLAY_CLOSE = `${PASSPORT_OVERLAY}-close`;
26048
- const PASSPORT_OVERLAY_TRY_AGAIN = `${PASSPORT_OVERLAY}-try-again`;
26049
- const CLOSE_BUTTON_SVG = `
26050
- <svg
26051
- viewBox="0 0 20 20"
26052
- fill="none"
26053
- xmlns="http://www.w3.org/2000/svg"
26054
- style="width: 20px"
26055
- >
26056
- <path
26057
- 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"
26058
- fill="#F3F3F3"
26059
- />
26060
- </svg>
26061
- `;
26062
- const POPUP_BLOCKED_SVG = `
26063
- <svg
26064
- viewBox="0 0 17 16"
26065
- fill="none"
26066
- xmlns="http://www.w3.org/2000/svg"
26067
- style="width: 16px"
26068
- >
26069
- <path
26070
- fill-rule="evenodd"
26071
- clip-rule="evenodd"
26072
- 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"
26073
- fill="#E01A3D"
26074
- />
26075
- </svg>
26076
- `;
26077
- const IMMUTABLE_LOGO_SVG = `
26078
- <svg
26079
- style="max-width: 123px; margin-bottom: 24px"
26080
- viewBox="0 0 124 112"
26081
- fill="none"
26082
- xmlns="http://www.w3.org/2000/svg"
26083
- >
26084
- <g clip-path="url(#clip0_332_47939)">
26085
- <g clip-path="url(#clip1_332_47939)">
26086
- <path
26087
- d="M4.10008 74.9453H0.5V93.6041H4.10008V74.9453Z"
26088
- fill="#F3F3F3"
26089
- />
26090
- <path
26091
- 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"
26092
- fill="#F3F3F3"
26093
- />
26094
- <path
26095
- 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"
26096
- fill="#F3F3F3"
26097
- />
26098
- <path
26099
- 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"
26100
- fill="#F3F3F3"
26101
- />
26102
- <path
26103
- 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"
26104
- fill="#F3F3F3"
26105
- />
26106
- <path
26107
- 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"
26108
- fill="#F3F3F3"
26109
- />
26110
- <path
26111
- d="M108.931 74.9453H105.462V93.6041H108.931V74.9453Z"
26112
- fill="#F3F3F3"
26113
- />
26114
- <path
26115
- 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"
26116
- fill="#F3F3F3"
26117
- />
26118
- </g>
26119
- <path
26120
- 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"
26121
- fill="#F3F3F3"
26122
- />
26123
- <path
26124
- 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"
26125
- fill="#F3F3F3"
26126
- />
26127
- <path
26128
- 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"
26129
- fill="#F3F3F3"
26130
- />
26131
- <path
26132
- 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"
26133
- fill="#F3F3F3"
26134
- />
26135
- <path
26136
- 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"
26137
- fill="#F3F3F3"
26138
- />
26139
- <path
26140
- 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"
26141
- fill="#F3F3F3"
26142
- />
26143
- <path
26144
- 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"
26145
- fill="#F3F3F3"
26146
- />
26147
- <path
26148
- d="M90.1424 109H91.7154V102.301H94.1794V101.025H87.6894V102.301H90.1424V109Z"
26149
- fill="#F3F3F3"
26150
- />
26151
- <g clip-path="url(#clip2_332_47939)">
26152
- <circle
26153
- cx="61.5"
26154
- cy="30"
26155
- r="28.125"
26156
- fill="url(#paint0_radial_332_47939)"
26157
- />
26158
- <circle
26159
- cx="61.5"
26160
- cy="30"
26161
- r="28.125"
26162
- fill="url(#paint1_radial_332_47939)"
26163
- />
26164
- <path
26165
- 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"
26166
- fill="#131313"
26167
- />
26168
- <path
26169
- fill-rule="evenodd"
26170
- clip-rule="evenodd"
26171
- 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"
26172
- fill="url(#paint2_radial_332_47939)"
26173
- />
26174
- <path
26175
- fill-rule="evenodd"
26176
- clip-rule="evenodd"
26177
- 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"
26178
- fill="url(#paint3_radial_332_47939)"
26179
- />
26180
- </g>
26181
- </g>
26182
- <defs>
26183
- <radialGradient
26184
- id="paint0_radial_332_47939"
26185
- cx="0"
26186
- cy="0"
26187
- r="1"
26188
- gradientUnits="userSpaceOnUse"
26189
- gradientTransform="translate(48.3053 16.7373) rotate(44.9817) scale(58.4359 123.929)"
26190
- >
26191
- <stop stop-color="#A3EEF8" />
26192
- <stop offset="0.177083" stop-color="#A4DCF5" />
26193
- <stop offset="0.380208" stop-color="#A6AEEC" />
26194
- <stop offset="1" stop-color="#ECBEE1" />
26195
- </radialGradient>
26196
- <radialGradient
26197
- id="paint1_radial_332_47939"
26198
- cx="0"
26199
- cy="0"
26200
- r="1"
26201
- gradientUnits="userSpaceOnUse"
26202
- gradientTransform="translate(63.9394 54.6335) rotate(84.265) scale(30.2672 57.9018)"
26203
- >
26204
- <stop stop-color="#FCF5EE" />
26205
- <stop offset="0.715135" stop-color="#ECBEE1" stop-opacity="0" />
26206
- </radialGradient>
26207
- <radialGradient
26208
- id="paint2_radial_332_47939"
26209
- cx="0"
26210
- cy="0"
26211
- r="1"
26212
- gradientUnits="userSpaceOnUse"
26213
- gradientTransform="translate(47.4257 15.8532) rotate(44.9817) scale(62.3316 132.191)"
26214
- >
26215
- <stop stop-color="#A3EEF8" />
26216
- <stop offset="0.177083" stop-color="#A4DCF5" />
26217
- <stop offset="0.380208" stop-color="#A6AEEC" />
26218
- <stop offset="1" stop-color="#ECBEE1" />
26219
- </radialGradient>
26220
- <radialGradient
26221
- id="paint3_radial_332_47939"
26222
- cx="0"
26223
- cy="0"
26224
- r="1"
26225
- gradientUnits="userSpaceOnUse"
26226
- gradientTransform="translate(64.102 56.2758) rotate(84.265) scale(32.2851 61.7619)"
26227
- >
26228
- <stop stop-color="#FCF5EE" />
26229
- <stop offset="0.715135" stop-color="#ECBEE1" stop-opacity="0" />
26230
- </radialGradient>
26231
- <clipPath id="clip0_332_47939">
26232
- <rect
26233
- width="123"
26234
- height="112"
26235
- fill="white"
26236
- transform="translate(0.5)"
26237
- />
26238
- </clipPath>
26239
- <clipPath id="clip1_332_47939">
26240
- <rect
26241
- width="123"
26242
- height="19"
26243
- fill="white"
26244
- transform="translate(0.5 75)"
26245
- />
26246
- </clipPath>
26247
- <clipPath id="clip2_332_47939">
26248
- <rect
26249
- width="60"
26250
- height="60"
26251
- fill="white"
26252
- transform="translate(31.5)"
26253
- />
26254
- </clipPath>
26255
- </defs>
26256
- </svg>
26257
- `;
26258
-
26259
- const getCloseButton = () => `
26260
- <button
26261
- class="${PASSPORT_OVERLAY_CLOSE}"
26262
- style="
26263
- background: #f3f3f326;
26264
- border: none;
26265
- border-radius: 50%;
26266
- width: 48px;
26267
- height: 48px;
26268
- position: absolute;
26269
- top: 40px;
26270
- right: 40px;
26271
- cursor: pointer;
26272
- display: flex;
26273
- align-items: center;
26274
- justify-content: center;
26275
- "
26276
- >
26277
- ${CLOSE_BUTTON_SVG}
26278
- </button>
26279
- `;
26280
- const getBlockedContents = () => `
26281
- <div
26282
- style="
26283
- color: #e01a3d;
26284
- display: flex;
26285
- align-items: center;
26286
- gap: 4px;
26287
- margin-bottom: 10px;
26288
- "
26289
- >
26290
- ${POPUP_BLOCKED_SVG}
26291
- Pop-up blocked
26292
- </div>
26293
- <p style="color: #b6b6b6; text-align: center; margin: 0">
26294
- Please adjust your browser settings <br />and try again below
26295
- </p>
26296
- `;
26297
- const getRefocusContents = () => `
26298
- <p style="color: #b6b6b6; text-align: center; margin: 0">
26299
- Secure pop-up didn't open?<br />We'll help you re-launch
26300
- </p>
26301
- `;
26302
- const getTryAgainButton = () => `
26303
- <button
26304
- class="${PASSPORT_OVERLAY_TRY_AGAIN}"
26305
- style="
26306
- margin-top: 27px;
26307
- color: #f3f3f3;
26308
- background: transparent;
26309
- padding: 12px 24px;
26310
- border-radius: 30px;
26311
- border: 2px solid #f3f3f3;
26312
- font-size: 1em;
26313
- font-weight: 500;
26314
- cursor: pointer;
26315
- "
26316
- >
26317
- Try again
26318
- </button>
26319
- `;
26320
- const getOverlay = (contents) => `
26321
- <div
26322
- class="${PASSPORT_OVERLAY}"
26323
- style="
26324
- position: fixed;
26325
- top: 0;
26326
- left: 0;
26327
- width: 100%;
26328
- height: 100%;
26329
- background: rgba(13, 13, 13, 0.48);
26330
- backdrop-filter: blur(28px);
26331
- display: flex;
26332
- flex-direction: column;
26333
- justify-content: center;
26334
- align-items: center;
26335
- font-size: 16px;
26336
- line-height: 1.5;
26337
- font-family: Roboto;
26338
- font-style: normal;
26339
- font-weight: 400;
26340
- font-feature-settings: 'clig' off, 'liga' off;
26341
- z-index: 2147483647;
26342
- "
26343
- >
26344
- ${getCloseButton()}
26345
- <div
26346
- style="
26347
- display: flex;
26348
- flex-direction: column;
26349
- align-items: center;
26350
- max-width: 400px;
26351
- "
26352
- >
26353
- ${IMMUTABLE_LOGO_SVG}
26354
- ${contents}
26355
- ${getTryAgainButton()}
26356
- </div>
26357
- </div>
26358
- `;
26359
- const getBlockedOverlay = () => getOverlay(getBlockedContents());
26360
- const getRefocusOverlay = () => getOverlay(getRefocusContents());
26361
-
26362
- class Overlay {
26363
- overlay;
26364
- isBlockedOverlay;
26365
- tryAgainListener;
26366
- onCloseListener;
26367
- constructor(isBlockedOverlay = false) {
26368
- this.isBlockedOverlay = isBlockedOverlay;
26369
- }
26370
- append(tryAgainOnClick, onCloseClick) {
26371
- this.appendOverlay();
26372
- this.updateTryAgainButton(tryAgainOnClick);
26373
- this.updateCloseButton(onCloseClick);
26374
- }
26375
- update(tryAgainOnClick) {
26376
- this.updateTryAgainButton(tryAgainOnClick);
26377
- }
26378
- remove() {
26379
- if (this.overlay) {
26380
- this.overlay.remove();
26381
- }
26382
- }
26383
- appendOverlay() {
26384
- if (!this.overlay) {
26385
- const overlay = document.createElement('div');
26386
- overlay.innerHTML = this.isBlockedOverlay ? getBlockedOverlay() : getRefocusOverlay();
26387
- document.body.insertAdjacentElement('beforeend', overlay);
26388
- this.overlay = overlay;
26389
- }
26390
- }
26391
- updateTryAgainButton(tryAgainOnClick) {
26392
- const tryAgainButton = this.overlay?.querySelector(`.${PASSPORT_OVERLAY_TRY_AGAIN}`);
26393
- if (tryAgainButton) {
26394
- if (this.tryAgainListener) {
26395
- tryAgainButton.removeEventListener('click', this.tryAgainListener);
26396
- }
26397
- this.tryAgainListener = tryAgainOnClick;
26398
- tryAgainButton.addEventListener('click', tryAgainOnClick);
26399
- }
26400
- }
26401
- updateCloseButton(onCloseClick) {
26402
- const closeButton = this.overlay?.querySelector(`.${PASSPORT_OVERLAY_CLOSE}`);
26403
- if (closeButton) {
26404
- if (this.onCloseListener) {
26405
- closeButton.removeEventListener('click', this.onCloseListener);
26406
- }
26407
- this.onCloseListener = onCloseClick;
26408
- closeButton.addEventListener('click', onCloseClick);
26409
- }
26410
- }
26411
- }
26412
-
26413
26047
  const CONFIRMATION_WINDOW_TITLE = 'Confirm this transaction';
26414
26048
  const CONFIRMATION_WINDOW_HEIGHT = 720;
26415
26049
  const CONFIRMATION_WINDOW_WIDTH = 480;
@@ -26417,8 +26051,6 @@ const CONFIRMATION_WINDOW_CLOSED_POLLING_DURATION = 1000;
26417
26051
  class ConfirmationScreen {
26418
26052
  config;
26419
26053
  confirmationWindow;
26420
- popupOptions;
26421
- overlay;
26422
26054
  constructor(config) {
26423
26055
  this.config = config;
26424
26056
  }
@@ -26450,25 +26082,26 @@ class ConfirmationScreen {
26450
26082
  break;
26451
26083
  }
26452
26084
  case ReceiveMessage.TRANSACTION_CONFIRMED: {
26453
- this.closeWindow();
26454
26085
  resolve({ confirmed: true });
26455
26086
  break;
26456
26087
  }
26457
26088
  case ReceiveMessage.TRANSACTION_ERROR: {
26458
- this.closeWindow();
26459
26089
  reject(new Error('Error during transaction confirmation'));
26460
26090
  break;
26461
26091
  }
26462
26092
  case ReceiveMessage.TRANSACTION_REJECTED: {
26463
- this.closeWindow();
26464
26093
  reject(new Error('User rejected transaction'));
26465
26094
  break;
26466
26095
  }
26467
26096
  default:
26468
- this.closeWindow();
26469
26097
  reject(new Error('Unsupported message type'));
26470
26098
  }
26471
26099
  };
26100
+ if (!this.confirmationWindow) {
26101
+ resolve({ confirmed: false });
26102
+ return;
26103
+ }
26104
+ window.addEventListener('message', messageHandler);
26472
26105
  let href = '';
26473
26106
  if (chainType === TransactionApprovalRequestChainTypeEnum.Starkex) {
26474
26107
  href = this.getHref('transaction', { transactionId, etherAddress, chainType });
@@ -26478,7 +26111,6 @@ class ConfirmationScreen {
26478
26111
  transactionID: transactionId, etherAddress, chainType, chainID: chainId,
26479
26112
  });
26480
26113
  }
26481
- window.addEventListener('message', messageHandler);
26482
26114
  this.showConfirmationScreen(href, messageHandler, resolve);
26483
26115
  });
26484
26116
  }
@@ -26498,25 +26130,25 @@ class ConfirmationScreen {
26498
26130
  break;
26499
26131
  }
26500
26132
  case ReceiveMessage.MESSAGE_CONFIRMED: {
26501
- this.closeWindow();
26502
26133
  resolve({ confirmed: true });
26503
26134
  break;
26504
26135
  }
26505
26136
  case ReceiveMessage.MESSAGE_ERROR: {
26506
- this.closeWindow();
26507
26137
  reject(new Error('Error during message confirmation'));
26508
26138
  break;
26509
26139
  }
26510
26140
  case ReceiveMessage.MESSAGE_REJECTED: {
26511
- this.closeWindow();
26512
26141
  reject(new Error('User rejected message'));
26513
26142
  break;
26514
26143
  }
26515
26144
  default:
26516
- this.closeWindow();
26517
26145
  reject(new Error('Unsupported message type'));
26518
26146
  }
26519
26147
  };
26148
+ if (!this.confirmationWindow) {
26149
+ resolve({ confirmed: false });
26150
+ return;
26151
+ }
26520
26152
  window.addEventListener('message', messageHandler);
26521
26153
  const href = this.getHref('zkevm/message', { messageID, etherAddress });
26522
26154
  this.showConfirmationScreen(href, messageHandler, resolve);
@@ -26527,60 +26159,27 @@ class ConfirmationScreen {
26527
26159
  // There is no need to open a confirmation window if cross-sdk bridge is enabled
26528
26160
  return;
26529
26161
  }
26530
- this.popupOptions = popupOptions;
26531
- try {
26532
- // confirmationWindow need to call close on in try again, then reopen
26533
- this.confirmationWindow = openPopupCenter({
26534
- url: this.getHref('loading'),
26535
- title: CONFIRMATION_WINDOW_TITLE,
26536
- width: popupOptions?.width || CONFIRMATION_WINDOW_WIDTH,
26537
- height: popupOptions?.height || CONFIRMATION_WINDOW_HEIGHT,
26538
- });
26539
- this.overlay = new Overlay();
26540
- }
26541
- catch (e) {
26542
- // If an error is thrown here then the popup is blocked
26543
- this.overlay = new Overlay(true);
26544
- }
26545
- this.overlay.append(() => this.recreateConfirmationWindow(this.getHref('loading')), () => this.closeWindow());
26162
+ this.confirmationWindow = openPopupCenter({
26163
+ url: this.getHref('loading'),
26164
+ title: CONFIRMATION_WINDOW_TITLE,
26165
+ width: popupOptions?.width || CONFIRMATION_WINDOW_WIDTH,
26166
+ height: popupOptions?.height || CONFIRMATION_WINDOW_HEIGHT,
26167
+ });
26546
26168
  }
26547
26169
  closeWindow() {
26548
26170
  this.confirmationWindow?.close();
26549
- this.overlay?.remove();
26550
- this.overlay = undefined;
26551
26171
  }
26552
26172
  showConfirmationScreen(href, messageHandler, resolve) {
26553
- // If popup blocked, the confirmation window will not exist
26554
- if (this.confirmationWindow) {
26555
- this.confirmationWindow.location.href = href; // update confirmation window before calling close on old window
26556
- }
26557
- // This indicates the user closed the overlay so the transaction should be rejected
26558
- if (!this.overlay) {
26559
- resolve({ confirmed: false });
26560
- return;
26561
- }
26562
- this.overlay.update(() => this.recreateConfirmationWindow(href));
26173
+ this.confirmationWindow.location.href = href;
26563
26174
  // https://stackoverflow.com/questions/9388380/capture-the-close-event-of-popup-window-in-javascript/48240128#48240128
26564
26175
  const timer = setInterval(() => {
26565
26176
  if (this.confirmationWindow?.closed) {
26566
26177
  clearInterval(timer);
26567
26178
  window.removeEventListener('message', messageHandler);
26568
26179
  resolve({ confirmed: false });
26569
- this.confirmationWindow = undefined;
26570
26180
  }
26571
26181
  }, CONFIRMATION_WINDOW_CLOSED_POLLING_DURATION);
26572
26182
  }
26573
- recreateConfirmationWindow(href) {
26574
- try {
26575
- this.confirmationWindow = openPopupCenter({
26576
- url: href,
26577
- title: CONFIRMATION_WINDOW_TITLE,
26578
- width: this.popupOptions?.width || CONFIRMATION_WINDOW_WIDTH,
26579
- height: this.popupOptions?.height || CONFIRMATION_WINDOW_HEIGHT,
26580
- });
26581
- }
26582
- catch { /* Empty */ }
26583
- }
26584
26183
  }
26585
26184
 
26586
26185
  var RelayerTransactionStatus;
@@ -57977,7 +57576,7 @@ const flattenProperties = (properties) => {
57977
57576
  };
57978
57577
 
57979
57578
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
57980
- const SDK_VERSION = '1.31.0-alpha.1';
57579
+ const SDK_VERSION = '1.31.0';
57981
57580
  const getFrameParentDomain = () => {
57982
57581
  if (isNode()) {
57983
57582
  return '';
@@ -63199,7 +62798,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
63199
62798
  maxPriorityFeePerGas: BigNumber$1.from(10e9),
63200
62799
  };
63201
62800
 
63202
- const SDK_VERSION_MARKER = '1.31.0-alpha.1';
62801
+ const SDK_VERSION_MARKER = '1.31.0';
63203
62802
  // This SDK version is replaced by the `yarn build` command ran on the root level
63204
62803
  const globalPackageVersion = () => SDK_VERSION_MARKER;
63205
62804
 
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.0-alpha.1';
135
+ const SDK_VERSION = '1.31.0';
136
136
  const getFrameParentDomain = () => {
137
137
  if (isNode()) {
138
138
  return '';