@layerzerolabs/lz-foundation 3.0.67 → 3.0.68-ton.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.d.mts CHANGED
@@ -244,22 +244,22 @@ declare const base64_decode: typeof decode;
244
244
  export { base64_decode as decode, base64_encode as encode };
245
245
  }
246
246
 
247
- interface Address$5 {
247
+ interface Address$7 {
248
248
  raw(): Uint8Array;
249
249
  hr(): string;
250
250
  hex(): Hex;
251
251
  }
252
252
 
253
- declare const Address$4: {
254
- from: (address: string | Uint8Array, chain: _layerzerolabs_lz_definitions.Chain) => Address$5;
253
+ declare const Address$6: {
254
+ from: (address: string | Uint8Array, chain: _layerzerolabs_lz_definitions.Chain) => Address$7;
255
255
  };
256
- type Address$4 = Address$5;
256
+ type Address$6 = Address$7;
257
257
 
258
258
  /**
259
259
  * Represents an Aptos address.
260
260
  * @see {@link AddressInterface}
261
261
  */
262
- declare class Address$3 implements Address$4 {
262
+ declare class Address$5 implements Address$6 {
263
263
  /**
264
264
  * The raw address data.
265
265
  */
@@ -275,7 +275,7 @@ declare class Address$3 implements Address$4 {
275
275
  * @param {Uint8Array | string} value - The address value.
276
276
  * @returns {Address} The Address instance.
277
277
  */
278
- static from(value: Uint8Array | string): Address$3;
278
+ static from(value: Uint8Array | string): Address$5;
279
279
  /**
280
280
  * Inspects the address.
281
281
  * @returns {string} The address as a string.
@@ -304,14 +304,14 @@ declare class Address$3 implements Address$4 {
304
304
  }
305
305
 
306
306
  declare namespace aptos {
307
- export { Address$3 as Address };
307
+ export { Address$5 as Address };
308
308
  }
309
309
 
310
310
  /**
311
311
  * Represents an EVM address.
312
312
  * @see {@link AddressInterface}
313
313
  */
314
- declare class Address$2 implements Address$4 {
314
+ declare class Address$4 implements Address$6 {
315
315
  /**
316
316
  * The raw address data.
317
317
  */
@@ -327,7 +327,7 @@ declare class Address$2 implements Address$4 {
327
327
  * @param {Uint8Array | string} value - The address value.
328
328
  * @returns {Address} The Address instance.
329
329
  */
330
- static from(value: Uint8Array | string): Address$2;
330
+ static from(value: Uint8Array | string): Address$4;
331
331
  /**
332
332
  * Inspects the address.
333
333
  * @returns {string} The address as a string.
@@ -363,14 +363,77 @@ declare function toChecksumAddress(address: string): string;
363
363
 
364
364
  declare const evm_toChecksumAddress: typeof toChecksumAddress;
365
365
  declare namespace evm {
366
- export { Address$2 as Address, evm_toChecksumAddress as toChecksumAddress };
366
+ export { Address$4 as Address, evm_toChecksumAddress as toChecksumAddress };
367
+ }
368
+
369
+ /**
370
+ * Represents an Initia address.
371
+ * @see {@link AddressInterface}
372
+ */
373
+ declare class Address$3 implements Address$6 {
374
+ /**
375
+ * The raw address data.
376
+ */
377
+ private data;
378
+ /**
379
+ * Creates an instance of Address.
380
+ * @param {Uint8Array | string} value - The address value.
381
+ * @throws {Error} If the address is invalid.
382
+ */
383
+ constructor(value: Uint8Array | string);
384
+ /**
385
+ * Creates an Address instance from a value.
386
+ * @param {Uint8Array | string} value - The address value.
387
+ * @returns {Address} The Address instance.
388
+ */
389
+ static from(value: Uint8Array | string): Address$3;
390
+ /**
391
+ * Inspects the address.
392
+ * @returns {string} The address as a string.
393
+ */
394
+ inspect(): string;
395
+ /**
396
+ * Converts the address to a string.
397
+ * @returns {string} The address as a string.
398
+ */
399
+ toString(): string;
400
+ /**
401
+ * Gets the raw address data.
402
+ * @returns {Uint8Array} The raw address data.
403
+ */
404
+ raw(): Uint8Array;
405
+ /**
406
+ * Gets the human-readable address.
407
+ * @returns {string} The human-readable address.
408
+ */
409
+ hr(): string;
410
+ /**
411
+ * Gets the address as a hexadecimal string.
412
+ * @returns {Hex} The address as a hexadecimal string.
413
+ */
414
+ hex(): Hex;
415
+ private checkPrefixAndLength;
416
+ /**
417
+ * Checks if a string is a valid Initia account address.
418
+ * @param data string to check
419
+ */
420
+ private validateInitiaAddress;
421
+ /**
422
+ * Converts a hex address into an account address
423
+ * @param hexAddress hex address
424
+ */
425
+ private fromHex;
426
+ }
427
+
428
+ declare namespace initia {
429
+ export { Address$3 as Address };
367
430
  }
368
431
 
369
432
  /**
370
433
  * Represents a Solana address.
371
434
  * @see {@link AddressInterface}
372
435
  */
373
- declare class Address$1 implements Address$4 {
436
+ declare class Address$2 implements Address$6 {
374
437
  /**
375
438
  * The raw address data.
376
439
  */
@@ -386,7 +449,7 @@ declare class Address$1 implements Address$4 {
386
449
  * @param {Uint8Array | string} value - The address value.
387
450
  * @returns {Address} The Address instance.
388
451
  */
389
- static from(value: Uint8Array | string): Address$1;
452
+ static from(value: Uint8Array | string): Address$2;
390
453
  /**
391
454
  * Inspects the address.
392
455
  * @returns {string} The address as a string.
@@ -415,6 +478,67 @@ declare class Address$1 implements Address$4 {
415
478
  }
416
479
 
417
480
  declare namespace solana {
481
+ export { Address$2 as Address };
482
+ }
483
+
484
+ /**
485
+ * Represents a Ton address.
486
+ * @see {@link AddressInterface}
487
+ */
488
+ declare class Address$1 implements Address$6 {
489
+ private workchain;
490
+ /**
491
+ * The raw address data.
492
+ */
493
+ private data;
494
+ private testOnly;
495
+ private bounceable;
496
+ /**
497
+ * Creates an instance of Address.
498
+ * @param {Uint8Array | string} value - The address value.
499
+ * @throws {Error} If the address is invalid.
500
+ */
501
+ constructor(value: Uint8Array | string);
502
+ /**
503
+ * Creates an Address instance from a value.
504
+ * @param {Uint8Array | string} value - The address value.
505
+ * @returns {Address} The Address instance.
506
+ */
507
+ static from(value: Uint8Array | string): Address$1;
508
+ /**
509
+ * Inspects the address.
510
+ * @returns {string} The address as a string.
511
+ */
512
+ inspect(): string;
513
+ /**
514
+ * Converts the address to a string.
515
+ * @returns {string} The address as a string.
516
+ */
517
+ toString(): string;
518
+ /**
519
+ * Gets the raw address data.
520
+ * @returns {Uint8Array} The raw address data.
521
+ */
522
+ raw(): Uint8Array;
523
+ /**
524
+ * Gets the human-readable address.
525
+ * @returns {string} The human-readable address.
526
+ */
527
+ hr(): string;
528
+ /**
529
+ * Gets the address as a hexadecimal string.
530
+ * @returns {Hex} The address as a hexadecimal string.
531
+ */
532
+ hex(): Hex;
533
+ private isFriendly;
534
+ private isRaw;
535
+ private parseRaw;
536
+ private parseFriendlyAddress;
537
+ private crc16;
538
+ private toStringBuffer;
539
+ }
540
+
541
+ declare namespace ton {
418
542
  export { Address$1 as Address };
419
543
  }
420
544
 
@@ -422,7 +546,7 @@ declare namespace solana {
422
546
  * Represents a Tron address.
423
547
  * @see {@link AddressInterface}
424
548
  */
425
- declare class Address implements Address$4 {
549
+ declare class Address implements Address$6 {
426
550
  /**
427
551
  * The raw address data.
428
552
  */
@@ -472,4 +596,4 @@ type tron_Address = Address;
472
596
  export { tron_Address as Address };
473
597
  }
474
598
 
475
- export { Address$4 as Address, Ed25519Signer, type HashSigner, type KeyPair, Secp256k1Signer, SignAlgorithm, aptos, base58, base58check, base64, blake2b, ed25519, evm, keccak_256, secp256k1, sha2_256, sha3_256, signHash, solana, tron };
599
+ export { Address$6 as Address, Ed25519Signer, type HashSigner, type KeyPair, Secp256k1Signer, SignAlgorithm, aptos, base58, base58check, base64, blake2b, ed25519, evm, initia, keccak_256, secp256k1, sha2_256, sha3_256, signHash, solana, ton, tron };
package/dist/index.d.ts CHANGED
@@ -244,22 +244,22 @@ declare const base64_decode: typeof decode;
244
244
  export { base64_decode as decode, base64_encode as encode };
245
245
  }
246
246
 
247
- interface Address$5 {
247
+ interface Address$7 {
248
248
  raw(): Uint8Array;
249
249
  hr(): string;
250
250
  hex(): Hex;
251
251
  }
252
252
 
253
- declare const Address$4: {
254
- from: (address: string | Uint8Array, chain: _layerzerolabs_lz_definitions.Chain) => Address$5;
253
+ declare const Address$6: {
254
+ from: (address: string | Uint8Array, chain: _layerzerolabs_lz_definitions.Chain) => Address$7;
255
255
  };
256
- type Address$4 = Address$5;
256
+ type Address$6 = Address$7;
257
257
 
258
258
  /**
259
259
  * Represents an Aptos address.
260
260
  * @see {@link AddressInterface}
261
261
  */
262
- declare class Address$3 implements Address$4 {
262
+ declare class Address$5 implements Address$6 {
263
263
  /**
264
264
  * The raw address data.
265
265
  */
@@ -275,7 +275,7 @@ declare class Address$3 implements Address$4 {
275
275
  * @param {Uint8Array | string} value - The address value.
276
276
  * @returns {Address} The Address instance.
277
277
  */
278
- static from(value: Uint8Array | string): Address$3;
278
+ static from(value: Uint8Array | string): Address$5;
279
279
  /**
280
280
  * Inspects the address.
281
281
  * @returns {string} The address as a string.
@@ -304,14 +304,14 @@ declare class Address$3 implements Address$4 {
304
304
  }
305
305
 
306
306
  declare namespace aptos {
307
- export { Address$3 as Address };
307
+ export { Address$5 as Address };
308
308
  }
309
309
 
310
310
  /**
311
311
  * Represents an EVM address.
312
312
  * @see {@link AddressInterface}
313
313
  */
314
- declare class Address$2 implements Address$4 {
314
+ declare class Address$4 implements Address$6 {
315
315
  /**
316
316
  * The raw address data.
317
317
  */
@@ -327,7 +327,7 @@ declare class Address$2 implements Address$4 {
327
327
  * @param {Uint8Array | string} value - The address value.
328
328
  * @returns {Address} The Address instance.
329
329
  */
330
- static from(value: Uint8Array | string): Address$2;
330
+ static from(value: Uint8Array | string): Address$4;
331
331
  /**
332
332
  * Inspects the address.
333
333
  * @returns {string} The address as a string.
@@ -363,14 +363,77 @@ declare function toChecksumAddress(address: string): string;
363
363
 
364
364
  declare const evm_toChecksumAddress: typeof toChecksumAddress;
365
365
  declare namespace evm {
366
- export { Address$2 as Address, evm_toChecksumAddress as toChecksumAddress };
366
+ export { Address$4 as Address, evm_toChecksumAddress as toChecksumAddress };
367
+ }
368
+
369
+ /**
370
+ * Represents an Initia address.
371
+ * @see {@link AddressInterface}
372
+ */
373
+ declare class Address$3 implements Address$6 {
374
+ /**
375
+ * The raw address data.
376
+ */
377
+ private data;
378
+ /**
379
+ * Creates an instance of Address.
380
+ * @param {Uint8Array | string} value - The address value.
381
+ * @throws {Error} If the address is invalid.
382
+ */
383
+ constructor(value: Uint8Array | string);
384
+ /**
385
+ * Creates an Address instance from a value.
386
+ * @param {Uint8Array | string} value - The address value.
387
+ * @returns {Address} The Address instance.
388
+ */
389
+ static from(value: Uint8Array | string): Address$3;
390
+ /**
391
+ * Inspects the address.
392
+ * @returns {string} The address as a string.
393
+ */
394
+ inspect(): string;
395
+ /**
396
+ * Converts the address to a string.
397
+ * @returns {string} The address as a string.
398
+ */
399
+ toString(): string;
400
+ /**
401
+ * Gets the raw address data.
402
+ * @returns {Uint8Array} The raw address data.
403
+ */
404
+ raw(): Uint8Array;
405
+ /**
406
+ * Gets the human-readable address.
407
+ * @returns {string} The human-readable address.
408
+ */
409
+ hr(): string;
410
+ /**
411
+ * Gets the address as a hexadecimal string.
412
+ * @returns {Hex} The address as a hexadecimal string.
413
+ */
414
+ hex(): Hex;
415
+ private checkPrefixAndLength;
416
+ /**
417
+ * Checks if a string is a valid Initia account address.
418
+ * @param data string to check
419
+ */
420
+ private validateInitiaAddress;
421
+ /**
422
+ * Converts a hex address into an account address
423
+ * @param hexAddress hex address
424
+ */
425
+ private fromHex;
426
+ }
427
+
428
+ declare namespace initia {
429
+ export { Address$3 as Address };
367
430
  }
368
431
 
369
432
  /**
370
433
  * Represents a Solana address.
371
434
  * @see {@link AddressInterface}
372
435
  */
373
- declare class Address$1 implements Address$4 {
436
+ declare class Address$2 implements Address$6 {
374
437
  /**
375
438
  * The raw address data.
376
439
  */
@@ -386,7 +449,7 @@ declare class Address$1 implements Address$4 {
386
449
  * @param {Uint8Array | string} value - The address value.
387
450
  * @returns {Address} The Address instance.
388
451
  */
389
- static from(value: Uint8Array | string): Address$1;
452
+ static from(value: Uint8Array | string): Address$2;
390
453
  /**
391
454
  * Inspects the address.
392
455
  * @returns {string} The address as a string.
@@ -415,6 +478,67 @@ declare class Address$1 implements Address$4 {
415
478
  }
416
479
 
417
480
  declare namespace solana {
481
+ export { Address$2 as Address };
482
+ }
483
+
484
+ /**
485
+ * Represents a Ton address.
486
+ * @see {@link AddressInterface}
487
+ */
488
+ declare class Address$1 implements Address$6 {
489
+ private workchain;
490
+ /**
491
+ * The raw address data.
492
+ */
493
+ private data;
494
+ private testOnly;
495
+ private bounceable;
496
+ /**
497
+ * Creates an instance of Address.
498
+ * @param {Uint8Array | string} value - The address value.
499
+ * @throws {Error} If the address is invalid.
500
+ */
501
+ constructor(value: Uint8Array | string);
502
+ /**
503
+ * Creates an Address instance from a value.
504
+ * @param {Uint8Array | string} value - The address value.
505
+ * @returns {Address} The Address instance.
506
+ */
507
+ static from(value: Uint8Array | string): Address$1;
508
+ /**
509
+ * Inspects the address.
510
+ * @returns {string} The address as a string.
511
+ */
512
+ inspect(): string;
513
+ /**
514
+ * Converts the address to a string.
515
+ * @returns {string} The address as a string.
516
+ */
517
+ toString(): string;
518
+ /**
519
+ * Gets the raw address data.
520
+ * @returns {Uint8Array} The raw address data.
521
+ */
522
+ raw(): Uint8Array;
523
+ /**
524
+ * Gets the human-readable address.
525
+ * @returns {string} The human-readable address.
526
+ */
527
+ hr(): string;
528
+ /**
529
+ * Gets the address as a hexadecimal string.
530
+ * @returns {Hex} The address as a hexadecimal string.
531
+ */
532
+ hex(): Hex;
533
+ private isFriendly;
534
+ private isRaw;
535
+ private parseRaw;
536
+ private parseFriendlyAddress;
537
+ private crc16;
538
+ private toStringBuffer;
539
+ }
540
+
541
+ declare namespace ton {
418
542
  export { Address$1 as Address };
419
543
  }
420
544
 
@@ -422,7 +546,7 @@ declare namespace solana {
422
546
  * Represents a Tron address.
423
547
  * @see {@link AddressInterface}
424
548
  */
425
- declare class Address implements Address$4 {
549
+ declare class Address implements Address$6 {
426
550
  /**
427
551
  * The raw address data.
428
552
  */
@@ -472,4 +596,4 @@ type tron_Address = Address;
472
596
  export { tron_Address as Address };
473
597
  }
474
598
 
475
- export { Address$4 as Address, Ed25519Signer, type HashSigner, type KeyPair, Secp256k1Signer, SignAlgorithm, aptos, base58, base58check, base64, blake2b, ed25519, evm, keccak_256, secp256k1, sha2_256, sha3_256, signHash, solana, tron };
599
+ export { Address$6 as Address, Ed25519Signer, type HashSigner, type KeyPair, Secp256k1Signer, SignAlgorithm, aptos, base58, base58check, base64, blake2b, ed25519, evm, initia, keccak_256, secp256k1, sha2_256, sha3_256, signHash, solana, ton, tron };