@xchainjs/xchain-thorchain 3.0.9 → 3.0.11

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/lib/index.esm.js CHANGED
@@ -3414,8 +3414,8 @@ class Client extends Client$1 {
3414
3414
  * @param {TxParams&Address} params The transfer options.
3415
3415
  * @returns {PreparedTx} The raw unsigned transaction.
3416
3416
  */
3417
- prepareTx({ sender, recipient, asset, amount, memo, }) {
3418
- return __awaiter(this, void 0, void 0, function* () {
3417
+ prepareTx(_a) {
3418
+ return __awaiter(this, arguments, void 0, function* ({ sender, recipient, asset, amount, memo, }) {
3419
3419
  // Validate sender and recipient addresses
3420
3420
  if (!this.validateAddress(sender))
3421
3421
  throw Error('Invalid sender address');
@@ -3493,8 +3493,8 @@ class ClientKeystore extends Client {
3493
3493
  * @param {number} index Derivation path index of the address to be generated.
3494
3494
  * @returns {string} A promise that resolves to the generated address.
3495
3495
  */
3496
- getAddressAsync(index = 0) {
3497
- return __awaiter(this, void 0, void 0, function* () {
3496
+ getAddressAsync() {
3497
+ return __awaiter(this, arguments, void 0, function* (index = 0) {
3498
3498
  return this.getAddress(index);
3499
3499
  });
3500
3500
  }
@@ -3536,8 +3536,8 @@ class ClientKeystore extends Client {
3536
3536
  * index 0 will be used
3537
3537
  * @returns {Uint8Array} The private key
3538
3538
  */
3539
- getPrivateKey(index = 0) {
3540
- return __awaiter(this, void 0, void 0, function* () {
3539
+ getPrivateKey() {
3540
+ return __awaiter(this, arguments, void 0, function* (index = 0) {
3541
3541
  // Generate seed from mnemonic
3542
3542
  const mnemonicChecked = new EnglishMnemonic(this.phrase);
3543
3543
  const seed = yield Bip39.mnemonicToSeed(mnemonicChecked);
@@ -3553,8 +3553,8 @@ class ClientKeystore extends Client {
3553
3553
  * index 0 will be used
3554
3554
  * @returns {Uint8Array} The public key
3555
3555
  */
3556
- getPubKey(index = 0) {
3557
- return __awaiter(this, void 0, void 0, function* () {
3556
+ getPubKey() {
3557
+ return __awaiter(this, arguments, void 0, function* (index = 0) {
3558
3558
  // Get private key
3559
3559
  const privateKey = yield this.getPrivateKey(index);
3560
3560
  // Derive public key
@@ -3594,8 +3594,8 @@ class ClientKeystore extends Client {
3594
3594
  * value of 600000000 will be used
3595
3595
  * @returns {string} The deposit hash
3596
3596
  */
3597
- deposit({ walletIndex = 0, asset = AssetRuneNative, amount, memo, gasLimit = new BigNumber(DEPOSIT_GAS_LIMIT_VALUE), }) {
3598
- return __awaiter(this, void 0, void 0, function* () {
3597
+ deposit(_a) {
3598
+ return __awaiter(this, arguments, void 0, function* ({ walletIndex = 0, asset = AssetRuneNative, amount, memo, gasLimit = new BigNumber(DEPOSIT_GAS_LIMIT_VALUE), }) {
3599
3599
  // Get sender address
3600
3600
  const sender = yield this.getAddressAsync(walletIndex);
3601
3601
  // Create signer
@@ -3612,8 +3612,8 @@ class ClientKeystore extends Client {
3612
3612
  *
3613
3613
  * @deprecated Use prepare Tx instead
3614
3614
  */
3615
- transferOffline({ walletIndex = 0, recipient, asset, amount, memo, gasLimit = new BigNumber(DEFAULT_GAS_LIMIT_VALUE), }) {
3616
- return __awaiter(this, void 0, void 0, function* () {
3615
+ transferOffline(_a) {
3616
+ return __awaiter(this, arguments, void 0, function* ({ walletIndex = 0, recipient, asset, amount, memo, gasLimit = new BigNumber(DEFAULT_GAS_LIMIT_VALUE), }) {
3617
3617
  // Get sender address
3618
3618
  const sender = yield this.getAddressAsync(walletIndex);
3619
3619
  // Prepare unsigned transaction
@@ -3765,8 +3765,8 @@ class ClientLedger extends Client {
3765
3765
  * @param {boolean} verify True to check the address against the Ledger device, otherwise false
3766
3766
  * @returns {string} A promise that resolves to the generated address.
3767
3767
  */
3768
- getAddressAsync(index, verify = false) {
3769
- return __awaiter(this, void 0, void 0, function* () {
3768
+ getAddressAsync(index_1) {
3769
+ return __awaiter(this, arguments, void 0, function* (index, verify = false) {
3770
3770
  const derivationPath = parseDerivationPath(this.getFullDerivationPath(index || 0));
3771
3771
  const { bech32Address } = verify
3772
3772
  ? yield this.app.showAddressAndPubKey(derivationPath, this.getPrefix(this.network))
@@ -3814,8 +3814,8 @@ class ClientLedger extends Client {
3814
3814
  * value of 600000000 will be used
3815
3815
  * @returns {string} The deposit hash
3816
3816
  */
3817
- deposit({ walletIndex = 0, asset = AssetRuneNative, amount, memo, gasLimit = new BigNumber(DEPOSIT_GAS_LIMIT_VALUE), }) {
3818
- return __awaiter(this, void 0, void 0, function* () {
3817
+ deposit(_a) {
3818
+ return __awaiter(this, arguments, void 0, function* ({ walletIndex = 0, asset = AssetRuneNative, amount, memo, gasLimit = new BigNumber(DEPOSIT_GAS_LIMIT_VALUE), }) {
3819
3819
  const sender = yield this.getAddressAsync(walletIndex || 0);
3820
3820
  const account = yield this.getAccount(sender);
3821
3821
  const formattedDP = parseDerivationPath(this.getFullDerivationPath(walletIndex || 0));
package/lib/index.js CHANGED
@@ -3442,8 +3442,8 @@ class Client extends xchainCosmosSdk.Client {
3442
3442
  * @param {TxParams&Address} params The transfer options.
3443
3443
  * @returns {PreparedTx} The raw unsigned transaction.
3444
3444
  */
3445
- prepareTx({ sender, recipient, asset, amount, memo, }) {
3446
- return __awaiter(this, void 0, void 0, function* () {
3445
+ prepareTx(_a) {
3446
+ return __awaiter(this, arguments, void 0, function* ({ sender, recipient, asset, amount, memo, }) {
3447
3447
  // Validate sender and recipient addresses
3448
3448
  if (!this.validateAddress(sender))
3449
3449
  throw Error('Invalid sender address');
@@ -3521,8 +3521,8 @@ class ClientKeystore extends Client {
3521
3521
  * @param {number} index Derivation path index of the address to be generated.
3522
3522
  * @returns {string} A promise that resolves to the generated address.
3523
3523
  */
3524
- getAddressAsync(index = 0) {
3525
- return __awaiter(this, void 0, void 0, function* () {
3524
+ getAddressAsync() {
3525
+ return __awaiter(this, arguments, void 0, function* (index = 0) {
3526
3526
  return this.getAddress(index);
3527
3527
  });
3528
3528
  }
@@ -3564,8 +3564,8 @@ class ClientKeystore extends Client {
3564
3564
  * index 0 will be used
3565
3565
  * @returns {Uint8Array} The private key
3566
3566
  */
3567
- getPrivateKey(index = 0) {
3568
- return __awaiter(this, void 0, void 0, function* () {
3567
+ getPrivateKey() {
3568
+ return __awaiter(this, arguments, void 0, function* (index = 0) {
3569
3569
  // Generate seed from mnemonic
3570
3570
  const mnemonicChecked = new crypto$1.EnglishMnemonic(this.phrase);
3571
3571
  const seed = yield crypto$1.Bip39.mnemonicToSeed(mnemonicChecked);
@@ -3581,8 +3581,8 @@ class ClientKeystore extends Client {
3581
3581
  * index 0 will be used
3582
3582
  * @returns {Uint8Array} The public key
3583
3583
  */
3584
- getPubKey(index = 0) {
3585
- return __awaiter(this, void 0, void 0, function* () {
3584
+ getPubKey() {
3585
+ return __awaiter(this, arguments, void 0, function* (index = 0) {
3586
3586
  // Get private key
3587
3587
  const privateKey = yield this.getPrivateKey(index);
3588
3588
  // Derive public key
@@ -3622,8 +3622,8 @@ class ClientKeystore extends Client {
3622
3622
  * value of 600000000 will be used
3623
3623
  * @returns {string} The deposit hash
3624
3624
  */
3625
- deposit({ walletIndex = 0, asset = AssetRuneNative, amount, memo, gasLimit = new BigNumber__default.default(DEPOSIT_GAS_LIMIT_VALUE), }) {
3626
- return __awaiter(this, void 0, void 0, function* () {
3625
+ deposit(_a) {
3626
+ return __awaiter(this, arguments, void 0, function* ({ walletIndex = 0, asset = AssetRuneNative, amount, memo, gasLimit = new BigNumber__default.default(DEPOSIT_GAS_LIMIT_VALUE), }) {
3627
3627
  // Get sender address
3628
3628
  const sender = yield this.getAddressAsync(walletIndex);
3629
3629
  // Create signer
@@ -3640,8 +3640,8 @@ class ClientKeystore extends Client {
3640
3640
  *
3641
3641
  * @deprecated Use prepare Tx instead
3642
3642
  */
3643
- transferOffline({ walletIndex = 0, recipient, asset, amount, memo, gasLimit = new BigNumber__default.default(DEFAULT_GAS_LIMIT_VALUE), }) {
3644
- return __awaiter(this, void 0, void 0, function* () {
3643
+ transferOffline(_a) {
3644
+ return __awaiter(this, arguments, void 0, function* ({ walletIndex = 0, recipient, asset, amount, memo, gasLimit = new BigNumber__default.default(DEFAULT_GAS_LIMIT_VALUE), }) {
3645
3645
  // Get sender address
3646
3646
  const sender = yield this.getAddressAsync(walletIndex);
3647
3647
  // Prepare unsigned transaction
@@ -3793,8 +3793,8 @@ class ClientLedger extends Client {
3793
3793
  * @param {boolean} verify True to check the address against the Ledger device, otherwise false
3794
3794
  * @returns {string} A promise that resolves to the generated address.
3795
3795
  */
3796
- getAddressAsync(index, verify = false) {
3797
- return __awaiter(this, void 0, void 0, function* () {
3796
+ getAddressAsync(index_1) {
3797
+ return __awaiter(this, arguments, void 0, function* (index, verify = false) {
3798
3798
  const derivationPath = parseDerivationPath(this.getFullDerivationPath(index || 0));
3799
3799
  const { bech32Address } = verify
3800
3800
  ? yield this.app.showAddressAndPubKey(derivationPath, this.getPrefix(this.network))
@@ -3842,8 +3842,8 @@ class ClientLedger extends Client {
3842
3842
  * value of 600000000 will be used
3843
3843
  * @returns {string} The deposit hash
3844
3844
  */
3845
- deposit({ walletIndex = 0, asset = AssetRuneNative, amount, memo, gasLimit = new BigNumber__default.default(DEPOSIT_GAS_LIMIT_VALUE), }) {
3846
- return __awaiter(this, void 0, void 0, function* () {
3845
+ deposit(_a) {
3846
+ return __awaiter(this, arguments, void 0, function* ({ walletIndex = 0, asset = AssetRuneNative, amount, memo, gasLimit = new BigNumber__default.default(DEPOSIT_GAS_LIMIT_VALUE), }) {
3847
3847
  const sender = yield this.getAddressAsync(walletIndex || 0);
3848
3848
  const account = yield this.getAccount(sender);
3849
3849
  const formattedDP = parseDerivationPath(this.getFullDerivationPath(walletIndex || 0));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xchainjs/xchain-thorchain",
3
- "version": "3.0.9",
3
+ "version": "3.0.11",
4
4
  "description": "Custom Thorchain client and utilities used by XChainJS clients",
5
5
  "keywords": [
6
6
  "THORChain",
@@ -45,10 +45,10 @@
45
45
  "@scure/base": "^1.2.6",
46
46
  "@scure/bip32": "^1.7.0",
47
47
  "@xchainjs/ledger-thorchain": "^0.3.1",
48
- "@xchainjs/xchain-client": "2.0.5",
49
- "@xchainjs/xchain-cosmos-sdk": "2.0.5",
50
- "@xchainjs/xchain-crypto": "1.0.3",
51
- "@xchainjs/xchain-util": "2.0.3",
48
+ "@xchainjs/xchain-client": "2.0.7",
49
+ "@xchainjs/xchain-cosmos-sdk": "2.0.7",
50
+ "@xchainjs/xchain-crypto": "1.0.5",
51
+ "@xchainjs/xchain-util": "2.0.4",
52
52
  "axios": "1.8.4",
53
53
  "bignumber.js": "^9.0.0",
54
54
  "cosmjs-types": "0.9.0",