@layerzerolabs/lz-aptos-sdk-v1 2.3.21 → 2.3.23

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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @layerzerolabs/lz-aptos-sdk-v1
2
2
 
3
+ ## 2.3.23
4
+
5
+ ### Patch Changes
6
+
7
+ - 1e42a63: bump version: default distribution tag is `latest`
8
+ - 43c0e8f: endpoints: bouncebit, gravity ... testnet: bartio bera chain
9
+ - Updated dependencies [1e42a63]
10
+ - Updated dependencies [43c0e8f]
11
+ - @layerzerolabs/lz-definitions@2.3.23
12
+
13
+ ## 2.3.22
14
+
15
+ ### Patch Changes
16
+
17
+ - 571e2c2: update oft sdk
18
+ - Updated dependencies [571e2c2]
19
+ - @layerzerolabs/lz-definitions@2.3.22
20
+
3
21
  ## 2.3.21
4
22
 
5
23
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -721,6 +721,9 @@ var Endpoint = class {
721
721
  };
722
722
  }
723
723
  async getOracleFee(oracleAddr, dstChainId) {
724
+ if (this.sdk.accounts.layerzero === void 0) {
725
+ throw new Error("endpoint sdk accounts layerzero is undefined when invoke getOracleFee");
726
+ }
724
727
  const resource = await this.sdk.client.getAccountResource(
725
728
  this.sdk.accounts.layerzero,
726
729
  `${this.module}::FeeStore`
@@ -737,6 +740,9 @@ var Endpoint = class {
737
740
  return BigInt(response);
738
741
  }
739
742
  async getRegisterEvents(start, limit) {
743
+ if (this.sdk.accounts.layerzero === void 0) {
744
+ throw new Error("endpoint sdk accounts layerzero is undefined when invoke getRegisterEvents");
745
+ }
740
746
  return this.sdk.client.getEventsByEventHandle(
741
747
  this.sdk.accounts.layerzero,
742
748
  `${this.module}::UaRegistry`,
@@ -1759,6 +1765,9 @@ var Executor = class {
1759
1765
  return this.sdk.sendAndConfirmTransaction(signer, transaction);
1760
1766
  }
1761
1767
  async getDefaultAdapterParams(chainId) {
1768
+ if (this.sdk.accounts.layerzero === void 0) {
1769
+ throw new Error("endpoint sdk accounts layerzero is undefined when invoke getDefaultAdapterParams");
1770
+ }
1762
1771
  const resource = await this.sdk.client.getAccountResource(
1763
1772
  this.sdk.accounts.layerzero,
1764
1773
  `${this.module}::AdapterParamsConfig`
@@ -1850,6 +1859,9 @@ var Executor = class {
1850
1859
  }
1851
1860
  async isAirdropped(guid, receiver) {
1852
1861
  try {
1862
+ if (this.sdk.accounts.layerzero === void 0) {
1863
+ throw new Error("endpoint sdk accounts layerzero is undefined when invoke isAirdropped");
1864
+ }
1853
1865
  const resource = await this.sdk.client.getAccountResource(
1854
1866
  this.sdk.accounts.layerzero,
1855
1867
  `${this.module}::JobStore`
@@ -1928,6 +1940,9 @@ var Executor = class {
1928
1940
  const uaTypeInfo = await this.sdk.LayerzeroModule.Endpoint.getUATypeInfo(
1929
1941
  aptos2__namespace.HexString.fromBuffer(packet.dst_address)
1930
1942
  );
1943
+ if (this.sdk.accounts.executor_ext === void 0) {
1944
+ throw new Error("sdk accounts executor_ext is undefined when invoked rebuildTypeArgsScript");
1945
+ }
1931
1946
  const bytecode = rebuildCompileScriptBytecode(
1932
1947
  SCRIPT_BYTECODE,
1933
1948
  [
@@ -1959,6 +1974,9 @@ var Executor = class {
1959
1974
  */
1960
1975
  async getLzReceiveTypeArguments(packet) {
1961
1976
  const bytecode = await this.rebuildTypeArgsScript(packet);
1977
+ if (this.sdk.accounts.layerzero_apps_pubkey === void 0) {
1978
+ throw new Error("sdk accounts layerzero_apps_pubkey is undefined when invoked getLzReceiveTypeArguments");
1979
+ }
1962
1980
  const typeInfos = await getLzReceiveTypeArguments(
1963
1981
  new aptos2__namespace.HexString(bytecode).toUint8Array(),
1964
1982
  this.sdk,
@@ -2072,6 +2090,9 @@ var ExecutorConfig = class {
2072
2090
  }
2073
2091
  module;
2074
2092
  async getDefaultExecutor(remoteChainId) {
2093
+ if (this.sdk.accounts.layerzero === void 0) {
2094
+ throw new Error("sdk accounts layerzero is undefined when invoke getDefaultExecutor");
2095
+ }
2075
2096
  const resource = await this.sdk.client.getAccountResource(
2076
2097
  this.sdk.accounts.layerzero,
2077
2098
  `${this.module}::ConfigStore`
@@ -2129,6 +2150,9 @@ var MsgLibAuth = class {
2129
2150
  module;
2130
2151
  moduleName;
2131
2152
  async isAllowed(msglibReceive) {
2153
+ if (this.sdk.accounts.msglib_auth === void 0) {
2154
+ throw new Error("sdk accounts msglib_auth is undefined when invoke isAllowed");
2155
+ }
2132
2156
  const resource = await this.sdk.client.getAccountResource(
2133
2157
  this.sdk.accounts.msglib_auth,
2134
2158
  `${this.module}::GlobalStore`
@@ -2169,6 +2193,9 @@ var MsgLibConfig = class {
2169
2193
  moduleName;
2170
2194
  semverModule;
2171
2195
  async getDefaultSendMsgLib(remoteChainId) {
2196
+ if (this.sdk.accounts.layerzero === void 0) {
2197
+ throw new Error("sdk accounts layerzero is undefined when invoke getDefaultSendMsgLib");
2198
+ }
2172
2199
  const resource = await this.sdk.client.getAccountResource(
2173
2200
  this.sdk.accounts.layerzero,
2174
2201
  `${this.module}::MsgLibConfig`
@@ -2195,6 +2222,9 @@ var MsgLibConfig = class {
2195
2222
  }
2196
2223
  }
2197
2224
  async getDefaultReceiveMsgLib(remoteChainId) {
2225
+ if (this.sdk.accounts.layerzero === void 0) {
2226
+ throw new Error("sdk accounts layerzero is undefined when invoke getDefaultReceiveMsgLib");
2227
+ }
2198
2228
  const resource = await this.sdk.client.getAccountResource(
2199
2229
  this.sdk.accounts.layerzero,
2200
2230
  `${this.module}::MsgLibConfig`
@@ -2262,6 +2292,9 @@ var PacketEvent = class {
2262
2292
  }
2263
2293
  module;
2264
2294
  async getInboundEvents(start, limit) {
2295
+ if (this.sdk.accounts.layerzero === void 0) {
2296
+ throw new Error("sdk accounts layerzero is undefined when invoke getInboundEvents");
2297
+ }
2265
2298
  return this.sdk.client.getEventsByEventHandle(
2266
2299
  this.sdk.accounts.layerzero,
2267
2300
  `${this.module}::EventStore`,
@@ -2270,6 +2303,9 @@ var PacketEvent = class {
2270
2303
  );
2271
2304
  }
2272
2305
  async getInboundEventCount() {
2306
+ if (this.sdk.accounts.layerzero === void 0) {
2307
+ throw new Error("sdk accounts layerzero is undefined when invoke getInboundEventCount");
2308
+ }
2273
2309
  const resource = await this.sdk.client.getAccountResource(
2274
2310
  this.sdk.accounts.layerzero,
2275
2311
  `${this.module}::EventStore`
@@ -2278,6 +2314,9 @@ var PacketEvent = class {
2278
2314
  return new BN__default.default(inbound_events.counter).toNumber();
2279
2315
  }
2280
2316
  async getOutboundEvents(start, limit) {
2317
+ if (this.sdk.accounts.layerzero === void 0) {
2318
+ throw new Error("sdk accounts layerzero is undefined when invoke getOutboundEvents");
2319
+ }
2281
2320
  return this.sdk.client.getEventsByEventHandle(
2282
2321
  this.sdk.accounts.layerzero,
2283
2322
  `${this.module}::EventStore`,
@@ -2289,6 +2328,9 @@ var PacketEvent = class {
2289
2328
  );
2290
2329
  }
2291
2330
  async getOutboundEventCount() {
2331
+ if (this.sdk.accounts.layerzero === void 0) {
2332
+ throw new Error("sdk accounts layerzero is undefined when invoke getOutboundEventCount");
2333
+ }
2292
2334
  const resource = await this.sdk.client.getAccountResource(
2293
2335
  this.sdk.accounts.layerzero,
2294
2336
  `${this.module}::EventStore`
@@ -2338,6 +2380,9 @@ var UlnConfig = class {
2338
2380
  return this.sdk.sendAndConfirmTransaction(signer, transaction);
2339
2381
  }
2340
2382
  async getChainAddressSize(remoteChainId) {
2383
+ if (this.sdk.accounts.layerzero === void 0) {
2384
+ throw new Error("sdk accounts layerzero is undefined when invoke getChainAddressSize");
2385
+ }
2341
2386
  const resource = await this.sdk.client.getAccountResource(
2342
2387
  this.sdk.accounts.layerzero,
2343
2388
  `${this.module}::ChainConfig`
@@ -2359,6 +2404,9 @@ var UlnConfig = class {
2359
2404
  }
2360
2405
  }
2361
2406
  async getDefaultAppConfig(remoteChainId, query) {
2407
+ if (this.sdk.accounts.layerzero === void 0) {
2408
+ throw new Error("sdk accounts layerzero is undefined when invoke getDefaultAppConfig");
2409
+ }
2362
2410
  const resource = await this.sdk.client.getAccountResource(
2363
2411
  this.sdk.accounts.layerzero,
2364
2412
  `${this.module}::DefaultUlnConfig`,
@@ -2394,6 +2442,9 @@ var UlnConfig = class {
2394
2442
  ...defaultConfig
2395
2443
  };
2396
2444
  try {
2445
+ if (this.sdk.accounts.layerzero === void 0) {
2446
+ throw new Error("sdk accounts layerzero is undefined when invoke getAppConfig");
2447
+ }
2397
2448
  const resource = await this.sdk.client.getAccountResource(
2398
2449
  this.sdk.accounts.layerzero,
2399
2450
  `${this.module}::UaUlnConfig`,
@@ -2445,6 +2496,9 @@ var UlnConfig = class {
2445
2496
  const config = await this.getAppConfig(uaAddress, dstChainId, query);
2446
2497
  const oracleFee = await this.sdk.LayerzeroModule.Uln.Signer.getFee(config.oracle, dstChainId, query);
2447
2498
  const relayerFee = await this.sdk.LayerzeroModule.Uln.Signer.getFee(config.relayer, dstChainId, query);
2499
+ if (this.sdk.accounts.layerzero === void 0) {
2500
+ throw new Error("sdk accounts layerzero is undefined when invoke quoteFee");
2501
+ }
2448
2502
  const treasuryConfigResource = await this.sdk.client.getAccountResource(
2449
2503
  this.sdk.accounts.layerzero,
2450
2504
  `${this.sdk.LayerzeroModule.Uln.MsgLibV1.module}::GlobalStore`,
@@ -2485,6 +2539,9 @@ var UlnReceive = class {
2485
2539
  return this.sdk.sendAndConfirmTransaction(signer, transaction);
2486
2540
  }
2487
2541
  async getProposal(oracle, hash) {
2542
+ if (this.sdk.accounts.layerzero === void 0) {
2543
+ throw new Error("sdk accounts layerzero is undefined when invoke getProposal");
2544
+ }
2488
2545
  const resource = await this.sdk.client.getAccountResource(
2489
2546
  this.sdk.accounts.layerzero,
2490
2547
  `${this.module}::ProposalStore`