@avalabs/core-wallets-sdk 3.1.0-canary.de02ccd.0 → 3.1.0-canary.de092aa1

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.
Files changed (61) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.d.ts +201 -51
  3. package/esm/Avalanche/index.d.ts +3 -1
  4. package/esm/Avalanche/index.js +1 -1
  5. package/esm/Avalanche/models.d.ts +28 -3
  6. package/esm/Avalanche/models.js +1 -1
  7. package/esm/Avalanche/providers/AbstractProvider.d.ts +2 -8
  8. package/esm/Avalanche/providers/AbstractProvider.js +1 -1
  9. package/esm/Avalanche/providers/JsonRpcProvider.d.ts +4 -4
  10. package/esm/Avalanche/providers/JsonRpcProvider.js +1 -1
  11. package/esm/Avalanche/utils/appendAutoRenewedValidatorConfigAddressMaps.js +1 -0
  12. package/esm/Avalanche/utils/createAvalancheEvmUnsignedTx.d.ts +3 -2
  13. package/esm/Avalanche/utils/createAvalancheEvmUnsignedTx.js +1 -1
  14. package/esm/Avalanche/utils/createAvalancheUnsignedTx.js +1 -1
  15. package/esm/Avalanche/utils/getAvalancheDerivationPath.d.ts +3 -0
  16. package/esm/Avalanche/utils/getAvalancheDerivationPath.js +1 -0
  17. package/esm/Avalanche/utils/getPchainUnixNow.d.ts +3 -1
  18. package/esm/Avalanche/utils/getPchainUnixNow.js +1 -1
  19. package/esm/Avalanche/utils/getVmByChainAlias.d.ts +1 -1
  20. package/esm/Avalanche/utils/getXpubFromMnemonic.d.ts +1 -1
  21. package/esm/Avalanche/utils/getXpubFromMnemonic.js +1 -1
  22. package/esm/Avalanche/utils/parseAvalancheTx.js +1 -1
  23. package/esm/Avalanche/utils/parsers/index.js +1 -1
  24. package/esm/Avalanche/utils/parsers/parseAddAutoRenewedValidatorTx.js +1 -0
  25. package/esm/Avalanche/utils/parsers/parseSetAutoRenewedValidatorConfigTx.js +1 -0
  26. package/esm/Avalanche/wallets/AddressWallet.js +1 -1
  27. package/esm/Avalanche/wallets/SimpleSigner.d.ts +1 -1
  28. package/esm/Avalanche/wallets/SimpleSigner.js +1 -1
  29. package/esm/Avalanche/wallets/StaticSigner.js +1 -1
  30. package/esm/Avalanche/wallets/TxBuilderTypes.d.ts +61 -1
  31. package/esm/Avalanche/wallets/WalletAbstract.d.ts +23 -25
  32. package/esm/Avalanche/wallets/WalletAbstract.js +1 -1
  33. package/esm/Avalanche/wallets/WalletVoid.js +1 -1
  34. package/esm/Avalanche/wallets/ledger/LedgerLiveSigner.d.ts +16 -0
  35. package/esm/Avalanche/wallets/ledger/LedgerLiveSigner.js +1 -0
  36. package/esm/Avalanche/wallets/ledger/LedgerSigner.js +1 -1
  37. package/esm/Avalanche/wallets/ledger/SimpleLedgerSigner.d.ts +4 -2
  38. package/esm/Avalanche/wallets/ledger/SimpleLedgerSigner.js +1 -1
  39. package/esm/Avalanche/wallets/legacy/LedgerWallet.js +1 -1
  40. package/esm/Avalanche/wallets/legacy/MnemonicWallet.js +1 -1
  41. package/esm/Avalanche/wallets/legacy/MnemonicWalletVoid.js +1 -1
  42. package/esm/BitcoinVM/index.js +1 -1
  43. package/esm/BitcoinVM/utils/getBech32AddressFromXPub.js +1 -1
  44. package/esm/BitcoinVM/wallets/BitcoinWallet.js +1 -1
  45. package/esm/BitcoinVM/wallets/BitcoinWalletLedger.js +1 -1
  46. package/esm/EVM/LedgerSigner.js +1 -1
  47. package/esm/EVM/utils/getEvmDerivationPath.d.ts +5 -0
  48. package/esm/EVM/utils/getEvmDerivationPath.js +1 -0
  49. package/esm/EVM/utils/getWalletFromMnemonic.js +1 -1
  50. package/esm/SolanaVM/utils/maybeGetAssociatedTokenAccount.d.ts +40 -0
  51. package/esm/SolanaVM/utils/maybeGetAssociatedTokenAccount.js +1 -0
  52. package/esm/SolanaVM/utils/resolveTokenProgramForMint.d.ts +13 -0
  53. package/esm/SolanaVM/utils/resolveTokenProgramForMint.js +1 -0
  54. package/esm/SolanaVM/utils/transferToken.js +1 -1
  55. package/esm/SolanaVM/wallets/SolanaLedgerSigner.js +1 -1
  56. package/esm/index.d.ts +3 -0
  57. package/esm/index.js +1 -1
  58. package/esm/utils/getAddressDerivationPath.d.ts +8 -5
  59. package/esm/utils/getAddressDerivationPath.js +1 -1
  60. package/esm/utils/getPubKeyFromTransport.js +1 -1
  61. package/package.json +17 -12
package/dist/index.d.ts CHANGED
@@ -2,7 +2,6 @@ import * as bitcoinjs_lib from 'bitcoinjs-lib';
2
2
  import { Network, Psbt, ECPairInterface, Transaction as Transaction$1, networks } from 'bitcoinjs-lib';
3
3
  import Eth from '@ledgerhq/hw-app-eth';
4
4
  import Transport from '@ledgerhq/hw-transport';
5
- import * as ethers from 'ethers';
6
5
  import { Provider, VoidSigner, HDNodeWallet, TransactionResponse, JsonRpcProvider as JsonRpcProvider$1, FetchRequest, Network as Network$1, Contract, AbstractSigner, BytesLike, TransactionRequest, TypedDataDomain, TypedDataField } from 'ethers';
7
6
  import * as _avalabs_avalanchejs from '@avalabs/avalanchejs';
8
7
  import { VM, OutputOwners, TransferableOutput, Common, pvmSerial, Context, avm, pvm, evm, info, avaxSerial, utils, UnsignedTx, EVMUnsignedTx, Utxo, TransferOutput, Credential, Signature } from '@avalabs/avalanchejs';
@@ -13,7 +12,7 @@ import { BIP32Interface } from 'bip32';
13
12
  import { Utxo as Utxo$1, PChainUtxo, Network as Network$2 } from '@avalabs/glacier-sdk';
14
13
  import * as _avalabs_avalanchejs_dist_serializable_common_types from '@avalabs/avalanchejs/dist/serializable/common/types';
15
14
  import * as _solana_kit from '@solana/kit';
16
- import { CompilableTransactionMessage, Transaction as Transaction$2, IInstruction } from '@solana/kit';
15
+ import { CompilableTransactionMessage, Transaction as Transaction$2, IInstruction, Address } from '@solana/kit';
17
16
  import { Transaction } from '@ledgerhq/hw-app-btc/lib/types';
18
17
  import { WalletPolicy, PsbtV2 } from 'ledger-bitcoin';
19
18
 
@@ -469,6 +468,8 @@ declare function getEvmAddressFromPubKey(pubKey: Buffer): string;
469
468
  */
470
469
  declare function getBtcAddressFromPubKey(pubKey: Buffer, network: Network): string;
471
470
 
471
+ declare const getEVMDerivationPath: (accountIndex: number, pathSpec: DerivationPath, withRoot?: boolean) => string;
472
+
472
473
  declare class LedgerSigner$1 extends AbstractSigner {
473
474
  readonly type: string;
474
475
  readonly path: string;
@@ -566,7 +567,7 @@ type ChainIDAlias = 'X' | 'P' | 'C';
566
567
  /**
567
568
  * Types for parsed transaction
568
569
  */
569
- type Tx = AddValidatorTx | AddDelegatorTx | ExportTx | ImportTx | BaseTx$1 | CreateSubnetTx | CreateChainTx | AddSubnetValidatorTx | RemoveSubnetValidatorTx | AddPermissionlessValidatorTx | AddPermissionlessDelegatorTx | TransformSubnetTx | TransferSubnetOwnershipTx$1 | ConvertSubnetToL1Tx | RegisterL1ValidatorTx | SetL1ValidatorWeightTx | DisableL1ValidatorTx | IncreaseL1ValidatorBalanceTx | UnknownTx;
570
+ type Tx = AddValidatorTx | AddDelegatorTx | ExportTx | ImportTx | BaseTx$1 | CreateSubnetTx | CreateChainTx | AddSubnetValidatorTx | RemoveSubnetValidatorTx | AddPermissionlessValidatorTx | AddPermissionlessDelegatorTx | TransformSubnetTx | TransferSubnetOwnershipTx$1 | ConvertSubnetToL1Tx | RegisterL1ValidatorTx | SetL1ValidatorWeightTx | DisableL1ValidatorTx | IncreaseL1ValidatorBalanceTx | AddAutoRenewedValidatorTx | SetAutoRenewedValidatorConfigTx | UnknownTx;
570
571
  interface FeeData {
571
572
  totalAvaxBurned: bigint;
572
573
  totalAvaxOutput: bigint;
@@ -592,6 +593,8 @@ declare enum TxType {
592
593
  SetL1ValidatorWeight = "set_l1_validator_weight",
593
594
  IncreaseL1ValidatorBalance = "increase_l1_validator_balance",
594
595
  DisableL1Validator = "disable_l1_validator",
596
+ AddAutoRenewedValidator = "add_auto_renewed_validator",
597
+ SetAutoRenewedValidatorConfig = "set_auto_renewed_validator_config",
595
598
  AddSubnetValidator = "add_subnet_validator",
596
599
  RemoveSubnetValidator = "remove_subnet_validator",
597
600
  AddPermissionlessValidator = "add_permissionless_validator",
@@ -699,6 +702,27 @@ interface DisableL1ValidatorTx extends TxBase {
699
702
  type: TxType.DisableL1Validator;
700
703
  validationId: string;
701
704
  }
705
+ interface AddAutoRenewedValidatorTx extends TxBase {
706
+ type: TxType.AddAutoRenewedValidator;
707
+ nodeID: string;
708
+ stake: bigint;
709
+ stakeOuts: readonly TransferableOutput[];
710
+ rewardOwner: OutputOwners;
711
+ delegationRewardOwner: OutputOwners;
712
+ owner: OutputOwners;
713
+ delegationFee: number;
714
+ autoCompoundRewardShares: number;
715
+ period: bigint;
716
+ signer: pvmSerial.Signer | pvmSerial.SignerEmpty;
717
+ publicKey: undefined | string;
718
+ signature: undefined | string;
719
+ }
720
+ interface SetAutoRenewedValidatorConfigTx extends TxBase {
721
+ type: TxType.SetAutoRenewedValidatorConfig;
722
+ txId: string;
723
+ autoCompoundRewardShares: number;
724
+ period: bigint;
725
+ }
702
726
  interface AddPermissionlessValidatorTx extends TxBase {
703
727
  type: TxType.AddPermissionlessValidator;
704
728
  nodeID: string;
@@ -771,16 +795,14 @@ declare function isAddPermissionlessValidatorTx(tx: Tx): tx is AddPermissionless
771
795
  declare function isAddPermissionlessDelegatorTx(tx: Tx): tx is AddPermissionlessDelegatorTx;
772
796
  declare function isTransformSubnetTx(tx: Tx): tx is TransformSubnetTx;
773
797
  declare function isTransferSubnetOwnershipTx(tx: Tx): tx is TransferSubnetOwnershipTx$1;
798
+ declare function isAddAutoRenewedValidatorTx(tx: Tx): tx is AddAutoRenewedValidatorTx;
799
+ declare function isSetAutoRenewedValidatorConfigTx(tx: Tx): tx is SetAutoRenewedValidatorConfigTx;
774
800
 
775
801
  declare class AbstractProvider {
776
802
  protected baseUrl: string;
777
803
  protected context: Context.Context;
778
- evmRpc: JsonRpcProvider$1;
779
- constructor(baseUrl: string, context: Context.Context);
780
- /**
781
- * @link https://docs.ethers.io/v5/api/providers/provider/#Provider-getFeeData
782
- */
783
- getEvmFeeData(): Promise<ethers.FeeData>;
804
+ fetchOptions?: RequestInit | undefined;
805
+ constructor(baseUrl: string, context: Context.Context, fetchOptions?: RequestInit | undefined);
784
806
  getContext(): Context.Context;
785
807
  getChainID(chainAlias: ChainIDAlias): string;
786
808
  getNetworkID(): number;
@@ -809,11 +831,11 @@ declare class AbstractProvider {
809
831
  }
810
832
 
811
833
  declare class JsonRpcProvider extends AbstractProvider {
812
- constructor(baseUrl: string, context: Context.Context);
834
+ constructor(baseUrl: string, context: Context.Context, fetchOptions?: RequestInit);
813
835
  static fromBaseURL(url: string): Promise<JsonRpcProvider>;
814
- static getDefaultMainnetProvider(): JsonRpcProvider;
815
- static getDefaultFujiProvider(): JsonRpcProvider;
816
- static getDefaultDevnetProvider(): JsonRpcProvider;
836
+ static getDefaultMainnetProvider(fetchOptions?: RequestInit): JsonRpcProvider;
837
+ static getDefaultFujiProvider(fetchOptions?: RequestInit): JsonRpcProvider;
838
+ static getDefaultDevnetProvider(fetchOptions?: RequestInit): JsonRpcProvider;
817
839
  }
818
840
 
819
841
  /**
@@ -980,6 +1002,38 @@ type AddPermissionlessDelegator = {
980
1002
  feeState?: pvm.FeeState;
981
1003
  stakingAssetId?: string;
982
1004
  threshold?: number;
1005
+ /**
1006
+ * Optional outputs to bundle atomically with the delegation. Each entry
1007
+ * produces an additional transferable output on the resulting tx,
1008
+ * created at delegation submission time (distinct from the reward
1009
+ * output, which P-Chain emits later when the delegation ends).
1010
+ *
1011
+ * Note: the per-output `threshold` / `locktime` below configure that
1012
+ * specific output's OutputOwners. They are independent from the
1013
+ * top-level `threshold` / `locktime` on this type, which apply to the
1014
+ * delegation **reward** output. Most consumers can omit both pairs.
1015
+ *
1016
+ * - `addresses` are the **co-owners** of the output (P-Chain bech32, e.g.
1017
+ * `P-fuji1...` / `P-avax1...`); parsed to raw bytes internally. Pass
1018
+ * a single-element array for the common single-recipient case;
1019
+ * multiple addresses combined with `threshold` describe a multisig
1020
+ * recipient.
1021
+ * - `assetId` defaults to AVAX when omitted. To use a non-AVAX asset
1022
+ * (e.g. a custom subnet's staking asset), pass its assetId — the
1023
+ * caller's UTXO set must contain enough UTXOs of that asset to fund
1024
+ * the output.
1025
+ * - `threshold` is the number of signatures required to spend the
1026
+ * output; defaults to 1 (any one of `addresses`).
1027
+ * - `locktime` (unix seconds) locks the output until that time; defaults
1028
+ * to 0 (immediately spendable).
1029
+ */
1030
+ additionalOutputs?: readonly {
1031
+ addresses: readonly string[];
1032
+ amount: bigint;
1033
+ assetId?: string;
1034
+ threshold?: number;
1035
+ locktime?: bigint;
1036
+ }[];
983
1037
  };
984
1038
  type RemoveSubnetValidator = {
985
1039
  utxoSet: utils.UtxoSet;
@@ -990,6 +1044,34 @@ type RemoveSubnetValidator = {
990
1044
  fromAddresses?: string[];
991
1045
  options?: Common.SpendOptions;
992
1046
  };
1047
+ type AddAutoRenewedValidator = {
1048
+ utxoSet: utils.UtxoSet;
1049
+ nodeId: string;
1050
+ weight: bigint;
1051
+ shares: number;
1052
+ feeState: pvm.FeeState;
1053
+ fromAddresses?: string[];
1054
+ rewardAddresses?: string[];
1055
+ delegatorRewardAddresses?: string[];
1056
+ ownerAddresses?: string[];
1057
+ publicKey: Buffer;
1058
+ signature: Buffer;
1059
+ autoCompoundRewardShares: number;
1060
+ period: bigint;
1061
+ options?: Common.SpendOptions;
1062
+ locktime?: bigint;
1063
+ threshold?: number;
1064
+ };
1065
+ type SetAutoRenewedValidatorConfig = {
1066
+ utxoSet: utils.UtxoSet;
1067
+ feeState: pvm.FeeState;
1068
+ validatorTxId: string;
1069
+ auth: number[];
1070
+ autoCompoundRewardShares: number;
1071
+ period: bigint;
1072
+ fromAddresses?: string[];
1073
+ options?: Common.SpendOptions;
1074
+ };
993
1075
  type TransferSubnetOwnershipTx = {
994
1076
  utxoSet: utils.UtxoSet;
995
1077
  subnetId: string;
@@ -1047,13 +1129,9 @@ declare abstract class WalletAbstract {
1047
1129
  * @param source What is the source chain of the atomic UTXOs
1048
1130
  */
1049
1131
  getAtomicUTXOs(chain: ChainIDAlias, source: ChainIDAlias): Promise<utils.UtxoSet>;
1050
- /**
1051
- * Get the nonce of this wallet's C chain address
1052
- */
1053
- getNonce(): Promise<number>;
1054
- exportX(amount: bigint, utxoSet: utils.UtxoSet, destination: 'P' | 'C', toAddress?: string): Common.UnsignedTx;
1055
- importP({ utxoSet, sourceChain, toAddress, threshold, feeState, locktime, }: ImportP): Common.UnsignedTx;
1056
- importX(utxos: utils.UtxoSet, sourceChain: 'P' | 'C', toAddress?: string): Common.UnsignedTx;
1132
+ exportX(amount: bigint, utxoSet: utils.UtxoSet, destination: 'P' | 'C', toAddress?: string): _avalabs_avalanchejs.UnsignedTx;
1133
+ importP({ utxoSet, sourceChain, toAddress, threshold, feeState, locktime, }: ImportP): _avalabs_avalanchejs.UnsignedTx;
1134
+ importX(utxos: utils.UtxoSet, sourceChain: 'P' | 'C', toAddress?: string): _avalabs_avalanchejs.UnsignedTx;
1057
1135
  /**
1058
1136
  *
1059
1137
  * @param utxos
@@ -1062,7 +1140,7 @@ declare abstract class WalletAbstract {
1062
1140
  * @param feeAssetId
1063
1141
  * @param toAddress Must be hex EVM address.
1064
1142
  */
1065
- importC(utxos: utils.UtxoSet, sourceChain: 'P' | 'X', baseFee: bigint, feeAssetId?: string, toAddress?: string): Common.UnsignedTx;
1143
+ importC(utxos: utils.UtxoSet, sourceChain: 'P' | 'X', baseFee: bigint, feeAssetId?: string, toAddress?: string): _avalabs_avalanchejs.UnsignedTx;
1066
1144
  /**
1067
1145
  *
1068
1146
  * @param amount
@@ -1079,17 +1157,19 @@ declare abstract class WalletAbstract {
1079
1157
  * @param destination
1080
1158
  * @param toAddress
1081
1159
  */
1082
- exportP({ amount, utxoSet, destination, feeState, toAddress }: ExportP): Common.UnsignedTx;
1083
- consolidateP({ utxoSet, amount, feeState, toAddress, options, }: ConsolidateP): Common.UnsignedTx;
1084
- baseTX({ utxoSet, chain, toAddress, amountsPerAsset, feeState, options, fromAddresses, }: BaseTx): Common.UnsignedTx;
1085
- convertSubnetToL1({ utxoSet, chainId, subnetId, subnetAuth, feeState, address, validators, options, fromAddresses, }: ConvertSubnetToL1): Common.UnsignedTx;
1086
- registerL1Validator({ utxoSet, balance, signature, message, feeState, fromAddresses, options, }: RegisterL1Validator): Common.UnsignedTx;
1087
- setL1ValidatorWeight({ utxoSet, feeState, message, options, fromAddresses, }: SetL1ValidatorWeight): Common.UnsignedTx;
1088
- disableL1Validator({ utxoSet, feeState, options, fromAddresses, disableAuth, validationId, }: DisableL1Validator): Common.UnsignedTx;
1089
- increaseL1ValidatorBalance({ utxoSet, feeState, options, fromAddresses, balance, validationId, }: IncreaseL1ValidatorBalance): Common.UnsignedTx;
1090
- createBlockchain({ utxoSet, subnetId, chainName, vmID, fxIds, genesisData, subnetAuth, feeState, options, fromAddresses, }: CreateChain): Common.UnsignedTx;
1091
- createSubnet({ utxoSet, rewardAddresses, feeState, fromAddresses, options, threshold, locktime, }: CreateSubnet): Common.UnsignedTx;
1092
- addSubnetValidator({ utxoSet, nodeId, start, end, weight, subnetId, subnetAuth, feeState, fromAddresses, options, }: AddSubnetValidator): Common.UnsignedTx;
1160
+ exportP({ amount, utxoSet, destination, feeState, toAddress }: ExportP): _avalabs_avalanchejs.UnsignedTx;
1161
+ consolidateP({ utxoSet, amount, feeState, toAddress, options, }: ConsolidateP): _avalabs_avalanchejs.UnsignedTx;
1162
+ baseTX({ utxoSet, chain, toAddress, amountsPerAsset, feeState, options, fromAddresses, }: BaseTx): _avalabs_avalanchejs.UnsignedTx;
1163
+ convertSubnetToL1({ utxoSet, chainId, subnetId, subnetAuth, feeState, address, validators, options, fromAddresses, }: ConvertSubnetToL1): _avalabs_avalanchejs.UnsignedTx;
1164
+ registerL1Validator({ utxoSet, balance, signature, message, feeState, fromAddresses, options, }: RegisterL1Validator): _avalabs_avalanchejs.UnsignedTx;
1165
+ setL1ValidatorWeight({ utxoSet, feeState, message, options, fromAddresses, }: SetL1ValidatorWeight): _avalabs_avalanchejs.UnsignedTx;
1166
+ disableL1Validator({ utxoSet, feeState, options, fromAddresses, disableAuth, validationId, }: DisableL1Validator): _avalabs_avalanchejs.UnsignedTx;
1167
+ increaseL1ValidatorBalance({ utxoSet, feeState, options, fromAddresses, balance, validationId, }: IncreaseL1ValidatorBalance): _avalabs_avalanchejs.UnsignedTx;
1168
+ addAutoRenewedValidator({ utxoSet, nodeId, weight, shares, feeState, fromAddresses, rewardAddresses, delegatorRewardAddresses, ownerAddresses, publicKey, signature, autoCompoundRewardShares, period, options, locktime, threshold, }: AddAutoRenewedValidator): _avalabs_avalanchejs.UnsignedTx;
1169
+ setAutoRenewedValidatorConfig({ utxoSet, feeState, validatorTxId, auth, autoCompoundRewardShares, period, fromAddresses, options, }: SetAutoRenewedValidatorConfig): _avalabs_avalanchejs.UnsignedTx;
1170
+ createBlockchain({ utxoSet, subnetId, chainName, vmID, fxIds, genesisData, subnetAuth, feeState, options, fromAddresses, }: CreateChain): _avalabs_avalanchejs.UnsignedTx;
1171
+ createSubnet({ utxoSet, rewardAddresses, feeState, fromAddresses, options, threshold, locktime, }: CreateSubnet): _avalabs_avalanchejs.UnsignedTx;
1172
+ addSubnetValidator({ utxoSet, nodeId, start, end, weight, subnetId, subnetAuth, feeState, fromAddresses, options, }: AddSubnetValidator): _avalabs_avalanchejs.UnsignedTx;
1093
1173
  /**
1094
1174
  *
1095
1175
  * @param utxoSet The transaction will be constructed from these UTXOs.
@@ -1106,7 +1186,7 @@ declare abstract class WalletAbstract {
1106
1186
  * @param signature the BLS signature, If the subnet is the primary network. Can be found in the Node on startup.
1107
1187
  * @param options
1108
1188
  */
1109
- addPermissionlessValidator({ utxoSet, nodeId, start, end, weight, subnetId, shares, feeState, fromAddresses, rewardAddresses, delegatorRewardAddresses, publicKey, signature, options, threshold, locktime, stakingAssetId, }: AddPermissionlessValidator): Common.UnsignedTx;
1189
+ addPermissionlessValidator({ utxoSet, nodeId, start, end, weight, subnetId, shares, feeState, fromAddresses, rewardAddresses, delegatorRewardAddresses, publicKey, signature, options, threshold, locktime, stakingAssetId, }: AddPermissionlessValidator): _avalabs_avalanchejs.UnsignedTx;
1110
1190
  /**
1111
1191
  *
1112
1192
  * @param utxoSet The transaction will be constructed from these UTXOs.
@@ -1119,9 +1199,9 @@ declare abstract class WalletAbstract {
1119
1199
  * @param rewardAddresses Will use active address if not provided. Given addresses will share the reward UTXO.
1120
1200
  * @param options
1121
1201
  */
1122
- addPermissionlessDelegator({ utxoSet, nodeId, start, end, weight, subnetId, fromAddresses, rewardAddresses, options, locktime, feeState, threshold, stakingAssetId, }: AddPermissionlessDelegator): Common.UnsignedTx;
1123
- removeSubnetValidator({ utxoSet, nodeId, subnetId, subnetAuth, fromAddresses, feeState, options, }: RemoveSubnetValidator): Common.UnsignedTx;
1124
- transferSubnetOwnershipTx({ utxoSet, subnetId, subnetAuth, subnetOwners, feeState, fromAddresses, options, threshold, locktime, }: TransferSubnetOwnershipTx): Common.UnsignedTx;
1202
+ addPermissionlessDelegator({ utxoSet, nodeId, start, end, weight, subnetId, fromAddresses, rewardAddresses, options, locktime, feeState, threshold, stakingAssetId, additionalOutputs, }: AddPermissionlessDelegator): _avalabs_avalanchejs.UnsignedTx;
1203
+ removeSubnetValidator({ utxoSet, nodeId, subnetId, subnetAuth, fromAddresses, feeState, options, }: RemoveSubnetValidator): _avalabs_avalanchejs.UnsignedTx;
1204
+ transferSubnetOwnershipTx({ utxoSet, subnetId, subnetAuth, subnetOwners, feeState, fromAddresses, options, threshold, locktime, }: TransferSubnetOwnershipTx): _avalabs_avalanchejs.UnsignedTx;
1125
1205
  protected constructor(provider: AbstractProvider);
1126
1206
  }
1127
1207
 
@@ -1443,7 +1523,7 @@ declare class StaticSigner extends WalletVoid implements Signer {
1443
1523
  */
1444
1524
  declare class SimpleSigner implements Signer {
1445
1525
  /**
1446
- * Node for `m/44'/9000'/0'`
1526
+ * Node for `m/44'/9000'/n'`
1447
1527
  * @private {BIP32Interface}
1448
1528
  */
1449
1529
  private accountNodeXP;
@@ -1543,12 +1623,13 @@ declare class LedgerSigner extends WalletVoid implements Signer {
1543
1623
  declare class SimpleLedgerSigner implements Signer {
1544
1624
  private activeAccountIndex;
1545
1625
  private provider;
1626
+ private pathSpec;
1546
1627
  private accountNode;
1547
1628
  /**
1548
1629
  * @param {number} activeAccountIndex - the index of the primary account used for static signing
1549
- * @param {string} xpubXP - optional extended public key of `m/44'/9000'/0`
1630
+ * @param {string} xpubXP - optional extended public key of `m/44'/9000'/${activeAccountIndex}`
1550
1631
  */
1551
- constructor(activeAccountIndex: number, provider: JsonRpcProvider, xpubXP?: string);
1632
+ constructor(activeAccountIndex: number, provider: JsonRpcProvider, xpubXP?: string, pathSpec?: DerivationPath);
1552
1633
  private reSerializeTx;
1553
1634
  private getChainAlias;
1554
1635
  private getAccountPath;
@@ -1560,6 +1641,18 @@ declare class SimpleLedgerSigner implements Signer {
1560
1641
  signMessage(request: SignMessageRequest): Promise<Buffer>;
1561
1642
  }
1562
1643
 
1644
+ /**
1645
+ * Ledger signer that can use multiple LedgerLive derivation paths for signing transactions.
1646
+ */
1647
+ declare class LedgerLiveSigner implements Signer {
1648
+ #private;
1649
+ private accountIndices;
1650
+ constructor(accountIndices: number[]);
1651
+ signMessage(request: SignMessageRequest): Promise<Buffer>;
1652
+ signTx(txRequest: SignTxRequest): Promise<UnsignedTx>;
1653
+ signTxBuffer(txRequest: SignTxBufferRequest): Promise<Buffer[]>;
1654
+ }
1655
+
1563
1656
  declare const addSignaturesToAvalancheTx: ({ transactionHex, signatures, chainAlias, provider, utxos, }: {
1564
1657
  transactionHex: string;
1565
1658
  signatures: Uint8Array[];
@@ -1578,9 +1671,10 @@ type Params$2 = {
1578
1671
  txBytes: Uint8Array;
1579
1672
  fromAddress: string;
1580
1673
  vm: VM;
1674
+ credentials?: Credential[];
1581
1675
  utxos: Utxo[];
1582
1676
  };
1583
- declare const createAvalancheEvmUnsignedTx: ({ txBytes, fromAddress, vm, utxos, }: Params$2) => Promise<UnsignedTx>;
1677
+ declare const createAvalancheEvmUnsignedTx: ({ txBytes, fromAddress, vm, credentials, utxos, }: Params$2) => Promise<UnsignedTx>;
1584
1678
 
1585
1679
  type Params$1 = {
1586
1680
  tx: avaxSerial.AvaxTx;
@@ -1654,7 +1748,7 @@ declare function getAssetBalance(utxoSet: utils.UtxoSet, assetID: string): GetAv
1654
1748
  /**
1655
1749
  * Get the current p-chain timestamp in unix
1656
1750
  */
1657
- declare function getPchainUnixNow(isTestnet: boolean): Promise<bigint>;
1751
+ declare function getPchainUnixNow(provider: AbstractProvider): Promise<bigint>;
1658
1752
 
1659
1753
  interface GetStakedAvaxBalanceDict {
1660
1754
  /**
@@ -1686,13 +1780,13 @@ type Params = {
1686
1780
  };
1687
1781
  declare const getUtxosByTxFromGlacier: ({ transactionHex, chainAlias, network, url, token, headers, }: Params) => Promise<Utxo<_avalabs_avalanchejs_dist_serializable_common_types.Serializable>[]>;
1688
1782
 
1689
- declare const getVmByChainAlias: (chainAlias: string) => "EVM" | "AVM" | "PVM";
1783
+ declare const getVmByChainAlias: (chainAlias: string) => "AVM" | "EVM" | "PVM";
1690
1784
 
1691
1785
  /**
1692
1786
  * Get the xpub for m/44'/9000'/0' from the given mnemonic
1693
1787
  * @param mnemonic
1694
1788
  */
1695
- declare function getXpubFromMnemonic(mnemonic: string): string;
1789
+ declare function getXpubFromMnemonic(mnemonic: string, accountIndex: number): string;
1696
1790
 
1697
1791
  /**
1698
1792
  * Verify the given address is a valid Avalanche bech32 address
@@ -1777,8 +1871,11 @@ declare function getMaximumUtxoSet({ wallet, utxos, sizeSupportedTx, limit, feeS
1777
1871
  */
1778
1872
  declare function verifyDerivationPath(path: string): any;
1779
1873
 
1874
+ declare const getAvalancheDerivationPath: (accountIndex: number, withRoot?: boolean) => string;
1875
+
1780
1876
  type index_AbstractProvider = AbstractProvider;
1781
1877
  declare const index_AbstractProvider: typeof AbstractProvider;
1878
+ type index_AddAutoRenewedValidatorTx = AddAutoRenewedValidatorTx;
1782
1879
  type index_AddDelegatorTx = AddDelegatorTx;
1783
1880
  type index_AddPermissionlessDelegatorTx = AddPermissionlessDelegatorTx;
1784
1881
  type index_AddPermissionlessValidatorTx = AddPermissionlessValidatorTx;
@@ -1803,6 +1900,8 @@ type index_IncreaseL1ValidatorBalanceTx = IncreaseL1ValidatorBalanceTx;
1803
1900
  type index_JsonRpcProvider = JsonRpcProvider;
1804
1901
  declare const index_JsonRpcProvider: typeof JsonRpcProvider;
1805
1902
  type index_LedgerGetXpubResponse = LedgerGetXpubResponse;
1903
+ type index_LedgerLiveSigner = LedgerLiveSigner;
1904
+ declare const index_LedgerLiveSigner: typeof LedgerLiveSigner;
1806
1905
  type index_LedgerSigner = LedgerSigner;
1807
1906
  declare const index_LedgerSigner: typeof LedgerSigner;
1808
1907
  type index_LedgerWallet = LedgerWallet;
@@ -1816,6 +1915,7 @@ declare const index_P_CHAIN_TX_SIZE_LIMIT: typeof P_CHAIN_TX_SIZE_LIMIT;
1816
1915
  type index_ParseOptions = ParseOptions;
1817
1916
  type index_RegisterL1ValidatorTx = RegisterL1ValidatorTx;
1818
1917
  type index_RemoveSubnetValidatorTx = RemoveSubnetValidatorTx;
1918
+ type index_SetAutoRenewedValidatorConfigTx = SetAutoRenewedValidatorConfigTx;
1819
1919
  type index_SetL1ValidatorWeightTx = SetL1ValidatorWeightTx;
1820
1920
  type index_SignMessageRequest = SignMessageRequest;
1821
1921
  type index_SignTxBufferRequest = SignTxBufferRequest;
@@ -1848,6 +1948,7 @@ declare const index_emptySignature: typeof emptySignature;
1848
1948
  declare const index_getAddressFromXpub: typeof getAddressFromXpub;
1849
1949
  declare const index_getAddressPublicKeyFromXpub: typeof getAddressPublicKeyFromXpub;
1850
1950
  declare const index_getAssetBalance: typeof getAssetBalance;
1951
+ declare const index_getAvalancheDerivationPath: typeof getAvalancheDerivationPath;
1851
1952
  declare const index_getLedgerProvider: typeof getLedgerProvider;
1852
1953
  declare const index_getMaximumUtxoSet: typeof getMaximumUtxoSet;
1853
1954
  declare const index_getPaginatedUTXOs: typeof getPaginatedUTXOs;
@@ -1859,6 +1960,7 @@ declare const index_getUnixNow: typeof getUnixNow;
1859
1960
  declare const index_getUtxosByTxFromGlacier: typeof getUtxosByTxFromGlacier;
1860
1961
  declare const index_getVmByChainAlias: typeof getVmByChainAlias;
1861
1962
  declare const index_getXpubFromMnemonic: typeof getXpubFromMnemonic;
1963
+ declare const index_isAddAutoRenewedValidatorTx: typeof isAddAutoRenewedValidatorTx;
1862
1964
  declare const index_isAddDelegatorTx: typeof isAddDelegatorTx;
1863
1965
  declare const index_isAddPermissionlessDelegatorTx: typeof isAddPermissionlessDelegatorTx;
1864
1966
  declare const index_isAddPermissionlessValidatorTx: typeof isAddPermissionlessValidatorTx;
@@ -1876,6 +1978,7 @@ declare const index_isIncreaseL1ValidatorBalance: typeof isIncreaseL1ValidatorBa
1876
1978
  declare const index_isObsidianApp: typeof isObsidianApp;
1877
1979
  declare const index_isRegisterL1ValidatorTx: typeof isRegisterL1ValidatorTx;
1878
1980
  declare const index_isRemoveSubnetValidatorTx: typeof isRemoveSubnetValidatorTx;
1981
+ declare const index_isSetAutoRenewedValidatorConfigTx: typeof isSetAutoRenewedValidatorConfigTx;
1879
1982
  declare const index_isSetL1ValidatorWeightTx: typeof isSetL1ValidatorWeightTx;
1880
1983
  declare const index_isTransferSubnetOwnershipTx: typeof isTransferSubnetOwnershipTx;
1881
1984
  declare const index_isTransformSubnetTx: typeof isTransformSubnetTx;
@@ -1888,20 +1991,23 @@ declare const index_sortUTXOsByAmountDescending: typeof sortUTXOsByAmountDescend
1888
1991
  declare const index_sortUTXOsStaking: typeof sortUTXOsStaking;
1889
1992
  declare const index_verifyDerivationPath: typeof verifyDerivationPath;
1890
1993
  declare namespace index {
1891
- export { index_AbstractProvider as AbstractProvider, index_AddressWallet as AddressWallet, index_DevnetContext as DevnetContext, index_FujiContext as FujiContext, index_JsonRpcProvider as JsonRpcProvider, index_LedgerSigner as LedgerSigner, index_LedgerWallet as LedgerWallet, index_MainnetContext as MainnetContext, index_MnemonicWallet as MnemonicWallet, index_MnemonicWalletVoid as MnemonicWalletVoid, index_P_CHAIN_TX_SIZE_LIMIT as P_CHAIN_TX_SIZE_LIMIT, index_SimpleLedgerSigner as SimpleLedgerSigner, index_SimpleSigner as SimpleSigner, index_SizeSupportedTx as SizeSupportedTx, index_StaticSigner as StaticSigner, index_TxType as TxType, index_WalletAbstract as WalletAbstract, index_WalletVoid as WalletVoid, index_addSignaturesToAvalancheTx as addSignaturesToAvalancheTx, index_convertGlacierUtxo as convertGlacierUtxo, index_createAvalancheEvmUnsignedTx as createAvalancheEvmUnsignedTx, index_createAvalancheUnsignedTx as createAvalancheUnsignedTx, index_digestMessage as digestMessage, index_emptySignature as emptySignature, index_getAddressFromXpub as getAddressFromXpub, index_getAddressPublicKeyFromXpub as getAddressPublicKeyFromXpub, index_getAssetBalance as getAssetBalance, index_getLedgerProvider as getLedgerProvider, index_getMaximumUtxoSet as getMaximumUtxoSet, index_getPaginatedUTXOs as getPaginatedUTXOs, index_getPchainUnixNow as getPchainUnixNow, index_getStakeForAddresses as getStakeForAddresses, index_getStakedAssetBalance as getStakedAssetBalance, index_getUTXOsForAddresses as getUTXOsForAddresses, index_getUnixNow as getUnixNow, index_getUtxosByTxFromGlacier as getUtxosByTxFromGlacier, index_getVmByChainAlias as getVmByChainAlias, index_getXpubFromMnemonic as getXpubFromMnemonic, index_isAddDelegatorTx as isAddDelegatorTx, index_isAddPermissionlessDelegatorTx as isAddPermissionlessDelegatorTx, index_isAddPermissionlessValidatorTx as isAddPermissionlessValidatorTx, index_isAddSubnetValidatorTx as isAddSubnetValidatorTx, index_isAddValidatorTx as isAddValidatorTx, index_isBaseTx as isBaseTx, index_isBech32Address as isBech32Address, index_isConvertSubnetToL1Tx as isConvertSubnetToL1Tx, index_isCreateChainTx as isCreateChainTx, index_isCreateSubnetTx as isCreateSubnetTx, index_isDisableL1ValidatorTx as isDisableL1ValidatorTx, index_isExportTx as isExportTx, index_isImportTx as isImportTx, index_isIncreaseL1ValidatorBalance as isIncreaseL1ValidatorBalance, index_isObsidianApp as isObsidianApp, index_isRegisterL1ValidatorTx as isRegisterL1ValidatorTx, index_isRemoveSubnetValidatorTx as isRemoveSubnetValidatorTx, index_isSetL1ValidatorWeightTx as isSetL1ValidatorWeightTx, index_isTransferSubnetOwnershipTx as isTransferSubnetOwnershipTx, index_isTransformSubnetTx as isTransformSubnetTx, index_parseAvalancheTx as parseAvalancheTx, index_populateCredential as populateCredential, index_signedTxToHex as signedTxToHex, index_sortUTXOsByAmount as sortUTXOsByAmount, index_sortUTXOsByAmountAscending as sortUTXOsByAmountAscending, index_sortUTXOsByAmountDescending as sortUTXOsByAmountDescending, index_sortUTXOsStaking as sortUTXOsStaking, index_verifyDerivationPath as verifyDerivationPath };
1892
- export type { index_AddDelegatorTx as AddDelegatorTx, index_AddPermissionlessDelegatorTx as AddPermissionlessDelegatorTx, index_AddPermissionlessValidatorTx as AddPermissionlessValidatorTx, index_AddSubnetValidatorTx as AddSubnetValidatorTx, index_AddValidatorTx as AddValidatorTx, BaseTx$1 as BaseTx, index_ChainIDAlias as ChainIDAlias, index_ConvertSubnetToL1Tx as ConvertSubnetToL1Tx, index_CreateChainTx as CreateChainTx, index_CreateSubnetTx as CreateSubnetTx, index_DisableL1ValidatorTx as DisableL1ValidatorTx, index_ExportTx as ExportTx, index_FeeData as FeeData, index_GetAvaxBalanceDict as GetAvaxBalanceDict, index_GetStakedAvaxBalanceDict as GetStakedAvaxBalanceDict, index_GlacierOutput as GlacierOutput, index_ImportTx as ImportTx, index_IncreaseL1ValidatorBalanceTx as IncreaseL1ValidatorBalanceTx, index_LedgerGetXpubResponse as LedgerGetXpubResponse, index_ParseOptions as ParseOptions, index_RegisterL1ValidatorTx as RegisterL1ValidatorTx, index_RemoveSubnetValidatorTx as RemoveSubnetValidatorTx, index_SetL1ValidatorWeightTx as SetL1ValidatorWeightTx, index_SignMessageRequest as SignMessageRequest, index_SignTxBufferRequest as SignTxBufferRequest, index_SignTxRequest as SignTxRequest, index_Signer as Signer, TransferSubnetOwnershipTx$1 as TransferSubnetOwnershipTx, index_TransformSubnetTx as TransformSubnetTx, index_Tx as Tx, index_TxBase as TxBase, index_UnknownTx as UnknownTx };
1994
+ export { index_AbstractProvider as AbstractProvider, index_AddressWallet as AddressWallet, index_DevnetContext as DevnetContext, index_FujiContext as FujiContext, index_JsonRpcProvider as JsonRpcProvider, index_LedgerLiveSigner as LedgerLiveSigner, index_LedgerSigner as LedgerSigner, index_LedgerWallet as LedgerWallet, index_MainnetContext as MainnetContext, index_MnemonicWallet as MnemonicWallet, index_MnemonicWalletVoid as MnemonicWalletVoid, index_P_CHAIN_TX_SIZE_LIMIT as P_CHAIN_TX_SIZE_LIMIT, index_SimpleLedgerSigner as SimpleLedgerSigner, index_SimpleSigner as SimpleSigner, index_SizeSupportedTx as SizeSupportedTx, index_StaticSigner as StaticSigner, index_TxType as TxType, index_WalletAbstract as WalletAbstract, index_WalletVoid as WalletVoid, index_addSignaturesToAvalancheTx as addSignaturesToAvalancheTx, index_convertGlacierUtxo as convertGlacierUtxo, index_createAvalancheEvmUnsignedTx as createAvalancheEvmUnsignedTx, index_createAvalancheUnsignedTx as createAvalancheUnsignedTx, index_digestMessage as digestMessage, index_emptySignature as emptySignature, index_getAddressFromXpub as getAddressFromXpub, index_getAddressPublicKeyFromXpub as getAddressPublicKeyFromXpub, index_getAssetBalance as getAssetBalance, index_getAvalancheDerivationPath as getAvalancheDerivationPath, index_getLedgerProvider as getLedgerProvider, index_getMaximumUtxoSet as getMaximumUtxoSet, index_getPaginatedUTXOs as getPaginatedUTXOs, index_getPchainUnixNow as getPchainUnixNow, index_getStakeForAddresses as getStakeForAddresses, index_getStakedAssetBalance as getStakedAssetBalance, index_getUTXOsForAddresses as getUTXOsForAddresses, index_getUnixNow as getUnixNow, index_getUtxosByTxFromGlacier as getUtxosByTxFromGlacier, index_getVmByChainAlias as getVmByChainAlias, index_getXpubFromMnemonic as getXpubFromMnemonic, index_isAddAutoRenewedValidatorTx as isAddAutoRenewedValidatorTx, index_isAddDelegatorTx as isAddDelegatorTx, index_isAddPermissionlessDelegatorTx as isAddPermissionlessDelegatorTx, index_isAddPermissionlessValidatorTx as isAddPermissionlessValidatorTx, index_isAddSubnetValidatorTx as isAddSubnetValidatorTx, index_isAddValidatorTx as isAddValidatorTx, index_isBaseTx as isBaseTx, index_isBech32Address as isBech32Address, index_isConvertSubnetToL1Tx as isConvertSubnetToL1Tx, index_isCreateChainTx as isCreateChainTx, index_isCreateSubnetTx as isCreateSubnetTx, index_isDisableL1ValidatorTx as isDisableL1ValidatorTx, index_isExportTx as isExportTx, index_isImportTx as isImportTx, index_isIncreaseL1ValidatorBalance as isIncreaseL1ValidatorBalance, index_isObsidianApp as isObsidianApp, index_isRegisterL1ValidatorTx as isRegisterL1ValidatorTx, index_isRemoveSubnetValidatorTx as isRemoveSubnetValidatorTx, index_isSetAutoRenewedValidatorConfigTx as isSetAutoRenewedValidatorConfigTx, index_isSetL1ValidatorWeightTx as isSetL1ValidatorWeightTx, index_isTransferSubnetOwnershipTx as isTransferSubnetOwnershipTx, index_isTransformSubnetTx as isTransformSubnetTx, index_parseAvalancheTx as parseAvalancheTx, index_populateCredential as populateCredential, index_signedTxToHex as signedTxToHex, index_sortUTXOsByAmount as sortUTXOsByAmount, index_sortUTXOsByAmountAscending as sortUTXOsByAmountAscending, index_sortUTXOsByAmountDescending as sortUTXOsByAmountDescending, index_sortUTXOsStaking as sortUTXOsStaking, index_verifyDerivationPath as verifyDerivationPath };
1995
+ export type { index_AddAutoRenewedValidatorTx as AddAutoRenewedValidatorTx, index_AddDelegatorTx as AddDelegatorTx, index_AddPermissionlessDelegatorTx as AddPermissionlessDelegatorTx, index_AddPermissionlessValidatorTx as AddPermissionlessValidatorTx, index_AddSubnetValidatorTx as AddSubnetValidatorTx, index_AddValidatorTx as AddValidatorTx, BaseTx$1 as BaseTx, index_ChainIDAlias as ChainIDAlias, index_ConvertSubnetToL1Tx as ConvertSubnetToL1Tx, index_CreateChainTx as CreateChainTx, index_CreateSubnetTx as CreateSubnetTx, index_DisableL1ValidatorTx as DisableL1ValidatorTx, index_ExportTx as ExportTx, index_FeeData as FeeData, index_GetAvaxBalanceDict as GetAvaxBalanceDict, index_GetStakedAvaxBalanceDict as GetStakedAvaxBalanceDict, index_GlacierOutput as GlacierOutput, index_ImportTx as ImportTx, index_IncreaseL1ValidatorBalanceTx as IncreaseL1ValidatorBalanceTx, index_LedgerGetXpubResponse as LedgerGetXpubResponse, index_ParseOptions as ParseOptions, index_RegisterL1ValidatorTx as RegisterL1ValidatorTx, index_RemoveSubnetValidatorTx as RemoveSubnetValidatorTx, index_SetAutoRenewedValidatorConfigTx as SetAutoRenewedValidatorConfigTx, index_SetL1ValidatorWeightTx as SetL1ValidatorWeightTx, index_SignMessageRequest as SignMessageRequest, index_SignTxBufferRequest as SignTxBufferRequest, index_SignTxRequest as SignTxRequest, index_Signer as Signer, TransferSubnetOwnershipTx$1 as TransferSubnetOwnershipTx, index_TransformSubnetTx as TransformSubnetTx, index_Tx as Tx, index_TxBase as TxBase, index_UnknownTx as UnknownTx };
1893
1996
  }
1894
1997
 
1998
+ type DerivationPathOptions = {
1999
+ withRoot?: boolean;
2000
+ pathSpec?: DerivationPath;
2001
+ };
1895
2002
  /**
1896
2003
  * Get the derivation path used by wallet addresses
1897
2004
  * @param addressIndex Which index is the address on
1898
- * @param pathSpec BIP44 vs LedgerLive
1899
2005
  * @param vm Which VM is this address on. Coin index changes between Avalanche and EVM
1900
- * @param withRoot If false, skips the "m/" prefix. Needed for Solana Ledger app.
2006
+ * @param options
2007
+ * @param options.withRoot If false, skips the "m/" prefix. Needed for Solana Ledger app.
2008
+ * @param options.pathSpec Only relevant (and required) for EVM.
1901
2009
  */
1902
- declare function getAddressDerivationPath(addressIndex: number, pathSpec: DerivationPath, // Irrelevant for Solana
1903
- vm: 'SVM', withRoot?: boolean): string;
1904
- declare function getAddressDerivationPath(addressIndex: number, pathSpec: DerivationPath, vm: 'EVM' | 'AVM' | 'PVM', withRoot?: never): string;
2010
+ declare function getAddressDerivationPath(accountIndex: number, vm: 'SVM' | 'EVM' | 'AVM' | 'PVM', options?: DerivationPathOptions): string;
1905
2011
 
1906
2012
  /**
1907
2013
  * Get the public key from a given private key.
@@ -1988,6 +2094,50 @@ declare const getSolanaDerivationPath: (accountIndex: number, withRoot?: boolean
1988
2094
 
1989
2095
  declare const getSolanaPublicKeyFromLedger: (accountIndex: number, transport: Transport) => Promise<Buffer>;
1990
2096
 
2097
+ /**
2098
+ * Helper to abstract confirming the existence of an Associated Token Account (ATA).
2099
+ * Useful for transferring SPL tokens, as each wallet must have an ATA for each token they own.
2100
+ * If a ATA does not exist, gas estimates must include a one-time rent-exempt minimum for creating
2101
+ * and holding an ATA on-chain.
2102
+ * @param mint - The mint address of the token.
2103
+ * @param owner - The public key of the wallet owner.
2104
+ * @param provider - An instance of SolanaProvider to interact with the Solana blockchain.
2105
+ * @param tokenProgram - SPL Token program id for this mint (legacy or Token-2022). If omitted, it is resolved via RPC.
2106
+ * @returns { ataAddress: string; exists: boolean; info: SolanaAccountInfo } - The ATA address, a boolean indicating if it exists, and the account info if it does.
2107
+ */
2108
+ declare const maybeGetAssociatedTokenAccount: ({ mint, owner, provider, tokenProgram: tokenProgramOverride, }: {
2109
+ mint: string;
2110
+ owner: string;
2111
+ provider: SolanaProvider;
2112
+ tokenProgram?: Address<string> | undefined;
2113
+ }) => Promise<{
2114
+ address: Address<string>;
2115
+ exists: boolean;
2116
+ info: Readonly<{
2117
+ context: Readonly<{
2118
+ slot: bigint;
2119
+ }>;
2120
+ value: (Readonly<{
2121
+ executable: boolean;
2122
+ lamports: _solana_kit.Lamports;
2123
+ owner: Address<string>;
2124
+ rentEpoch: bigint;
2125
+ space: bigint;
2126
+ }> & Readonly<{
2127
+ data: _solana_kit.Base64EncodedDataResponse;
2128
+ }>) | null;
2129
+ }>;
2130
+ }>;
2131
+
2132
+ /**
2133
+ * Loads the mint account and returns the SPL Token program that owns it
2134
+ * (legacy Tokenkeg... or Token-2022 TokenzQd...).
2135
+ */
2136
+ declare const resolveTokenProgramForMint: ({ mint, provider, }: {
2137
+ mint: string;
2138
+ provider: SolanaProvider;
2139
+ }) => Promise<Address>;
2140
+
1991
2141
  declare class SolanaSigner {
1992
2142
  #private;
1993
2143
  constructor(privateKey: Buffer);
@@ -2011,5 +2161,5 @@ declare class SolanaLedgerSigner {
2011
2161
  signTx(base64EncodedTx: string, provider: SolanaProvider): Promise<string>;
2012
2162
  }
2013
2163
 
2014
- export { index as Avalanche, BitcoinLedgerWallet, BitcoinProvider, BitcoinProviderAbstract, BitcoinWallet, BitcoinWalletAbstract, BitcoinWalletVoid, BtcNetworks, DerivationPath, ETH_ACCOUNT_PATH, ETH_COIN_PATH, JsonRpcBatchInternal, LedgerSigner$1 as LedgerSigner, SolanaLedgerSigner, SolanaSigner, addEncodedSigToPsbt, compileSolanaTx, createPSBTV2, createPsbt, createTransferTx, createWalletPolicy, deserializeTransactionMessage, formatAddressForNetworkBech32, getAddressDerivationPath, getAddressFromXPub, getAddressPrivateKeyFromXPriv, getAddressPublicKeyFromXPub, getAppEth, getBech32Address, getBech32AddressFromXPub, getBtcAddressFromPubKey, getEvmAddressFromPubKey, getLedgerAppInfo, getLedgerExtendedPublicKey, getMaxTransferAmount, getPubKeyFromTransport, getPublicKeyFromPrivateKey, getSolanaDerivationPath, getSolanaProvider, getSolanaPublicKeyFromLedger, getTransferTxDetails, getVoidSigner, getWalletFromMnemonic, getXpubFromMnemonic$1 as getXpubFromMnemonic, isERC20Transfer, isNativeTxn, isSolanaProvider, omitUndefinedKeys, onBalanceChange, openLedgerApp, psbt2ToPsbt0, quitLedgerApp, selectUtxos, serializeSolanaTx, transferSol, transferToken };
2164
+ export { index as Avalanche, BitcoinLedgerWallet, BitcoinProvider, BitcoinProviderAbstract, BitcoinWallet, BitcoinWalletAbstract, BitcoinWalletVoid, BtcNetworks, DerivationPath, ETH_ACCOUNT_PATH, ETH_COIN_PATH, JsonRpcBatchInternal, LedgerSigner$1 as LedgerSigner, SolanaLedgerSigner, SolanaSigner, addEncodedSigToPsbt, compileSolanaTx, createPSBTV2, createPsbt, createTransferTx, createWalletPolicy, deserializeTransactionMessage, formatAddressForNetworkBech32, getAddressDerivationPath, getAddressFromXPub, getAddressPrivateKeyFromXPriv, getAddressPublicKeyFromXPub, getAppEth, getBech32Address, getBech32AddressFromXPub, getBtcAddressFromPubKey, getEVMDerivationPath, getEvmAddressFromPubKey, getLedgerAppInfo, getLedgerExtendedPublicKey, getMaxTransferAmount, getPubKeyFromTransport, getPublicKeyFromPrivateKey, getSolanaDerivationPath, getSolanaProvider, getSolanaPublicKeyFromLedger, getTransferTxDetails, getVoidSigner, getWalletFromMnemonic, getXpubFromMnemonic$1 as getXpubFromMnemonic, isERC20Transfer, isNativeTxn, isSolanaProvider, maybeGetAssociatedTokenAccount, omitUndefinedKeys, onBalanceChange, openLedgerApp, psbt2ToPsbt0, quitLedgerApp, resolveTokenProgramForMint, selectUtxos, serializeSolanaTx, transferSol, transferToken };
2015
2165
  export type { BitcoinHistoryTx, BitcoinInputUTXO, BitcoinInputUTXOWithOptionalScript, BitcoinLedgerInputUTXO, BitcoinOutputUTXO, BitcoinTx, SolanaProvider };
@@ -1,4 +1,4 @@
1
- export { AddDelegatorTx, AddPermissionlessDelegatorTx, AddPermissionlessValidatorTx, AddSubnetValidatorTx, AddValidatorTx, BaseTx, ChainIDAlias, ConvertSubnetToL1Tx, CreateChainTx, CreateSubnetTx, DisableL1ValidatorTx, ExportTx, FeeData, ImportTx, IncreaseL1ValidatorBalanceTx, RegisterL1ValidatorTx, RemoveSubnetValidatorTx, SetL1ValidatorWeightTx, TransferSubnetOwnershipTx, TransformSubnetTx, Tx, TxBase, TxType, UnknownTx, isAddDelegatorTx, isAddPermissionlessDelegatorTx, isAddPermissionlessValidatorTx, isAddSubnetValidatorTx, isAddValidatorTx, isBaseTx, isConvertSubnetToL1Tx, isCreateChainTx, isCreateSubnetTx, isDisableL1ValidatorTx, isExportTx, isImportTx, isIncreaseL1ValidatorBalance, isRegisterL1ValidatorTx, isRemoveSubnetValidatorTx, isSetL1ValidatorWeightTx, isTransferSubnetOwnershipTx, isTransformSubnetTx } from './models.js';
1
+ export { AddAutoRenewedValidatorTx, AddDelegatorTx, AddPermissionlessDelegatorTx, AddPermissionlessValidatorTx, AddSubnetValidatorTx, AddValidatorTx, BaseTx, ChainIDAlias, ConvertSubnetToL1Tx, CreateChainTx, CreateSubnetTx, DisableL1ValidatorTx, ExportTx, FeeData, ImportTx, IncreaseL1ValidatorBalanceTx, RegisterL1ValidatorTx, RemoveSubnetValidatorTx, SetAutoRenewedValidatorConfigTx, SetL1ValidatorWeightTx, TransferSubnetOwnershipTx, TransformSubnetTx, Tx, TxBase, TxType, UnknownTx, isAddAutoRenewedValidatorTx, isAddDelegatorTx, isAddPermissionlessDelegatorTx, isAddPermissionlessValidatorTx, isAddSubnetValidatorTx, isAddValidatorTx, isBaseTx, isConvertSubnetToL1Tx, isCreateChainTx, isCreateSubnetTx, isDisableL1ValidatorTx, isExportTx, isImportTx, isIncreaseL1ValidatorBalance, isRegisterL1ValidatorTx, isRemoveSubnetValidatorTx, isSetAutoRenewedValidatorConfigTx, isSetL1ValidatorWeightTx, isTransferSubnetOwnershipTx, isTransformSubnetTx } from './models.js';
2
2
  export { WalletAbstract } from './wallets/WalletAbstract.js';
3
3
  export { WalletVoid } from './wallets/WalletVoid.js';
4
4
  export { isObsidianApp } from './wallets/ledger/isObsidianApp.js';
@@ -11,6 +11,7 @@ export { StaticSigner } from './wallets/StaticSigner.js';
11
11
  export { SimpleSigner } from './wallets/SimpleSigner.js';
12
12
  export { LedgerSigner } from './wallets/ledger/LedgerSigner.js';
13
13
  export { SimpleLedgerSigner } from './wallets/ledger/SimpleLedgerSigner.js';
14
+ export { LedgerLiveSigner } from './wallets/ledger/LedgerLiveSigner.js';
14
15
  export { LedgerGetXpubResponse, SignMessageRequest, SignTxBufferRequest, SignTxRequest, Signer } from './wallets/models.js';
15
16
  export { AbstractProvider } from './providers/AbstractProvider.js';
16
17
  export { JsonRpcProvider } from './providers/JsonRpcProvider.js';
@@ -38,3 +39,4 @@ export { signedTxToHex } from './utils/signedTxToHex.js';
38
39
  export { sortUTXOsByAmount, sortUTXOsByAmountAscending, sortUTXOsByAmountDescending, sortUTXOsStaking } from './utils/sortUTXOs.js';
39
40
  export { P_CHAIN_TX_SIZE_LIMIT, SizeSupportedTx, getMaximumUtxoSet } from './utils/txSizeLimits.js';
40
41
  export { verifyDerivationPath } from './utils/verifyDerivationPath.js';
42
+ export { getAvalancheDerivationPath } from './utils/getAvalancheDerivationPath.js';
@@ -1 +1 @@
1
- export{TxType,isAddDelegatorTx,isAddPermissionlessDelegatorTx,isAddPermissionlessValidatorTx,isAddSubnetValidatorTx,isAddValidatorTx,isBaseTx,isConvertSubnetToL1Tx,isCreateChainTx,isCreateSubnetTx,isDisableL1ValidatorTx,isExportTx,isImportTx,isIncreaseL1ValidatorBalance,isRegisterL1ValidatorTx,isRemoveSubnetValidatorTx,isSetL1ValidatorWeightTx,isTransferSubnetOwnershipTx,isTransformSubnetTx}from"./models.js";export{WalletAbstract}from"./wallets/WalletAbstract.js";export{WalletVoid}from"./wallets/WalletVoid.js";export{isObsidianApp}from"./wallets/ledger/isObsidianApp.js";export{getLedgerProvider}from"./wallets/ledger/getLedgerProvider.js";export{AddressWallet}from"./wallets/AddressWallet.js";export{MnemonicWalletVoid}from"./wallets/legacy/MnemonicWalletVoid.js";export{LedgerWallet}from"./wallets/legacy/LedgerWallet.js";export{MnemonicWallet}from"./wallets/legacy/MnemonicWallet.js";export{StaticSigner}from"./wallets/StaticSigner.js";export{SimpleSigner}from"./wallets/SimpleSigner.js";export{LedgerSigner}from"./wallets/ledger/LedgerSigner.js";export{SimpleLedgerSigner}from"./wallets/ledger/SimpleLedgerSigner.js";export{AbstractProvider}from"./providers/AbstractProvider.js";export{JsonRpcProvider}from"./providers/JsonRpcProvider.js";export{DevnetContext,FujiContext,MainnetContext}from"./providers/constants.js";export{addSignaturesToAvalancheTx}from"./utils/addSignaturesToAvalancheTx.js";export{convertGlacierUtxo}from"./utils/convertGlacierUtxo.js";export{createAvalancheEvmUnsignedTx}from"./utils/createAvalancheEvmUnsignedTx.js";export{createAvalancheUnsignedTx}from"./utils/createAvalancheUnsignedTx.js";export{digestMessage}from"./utils/digestMessage.js";export{getAddressFromXpub}from"./utils/getAddressFromXpub.js";export{getAddressPublicKeyFromXpub}from"./utils/getAddressPublicKeyFromXpub.js";export{getPaginatedUTXOs,getUTXOsForAddresses}from"./utils/getAllUTXOs.js";export{getAssetBalance}from"./utils/getAssetBalance.js";export{getPchainUnixNow}from"./utils/getPchainUnixNow.js";export{getStakedAssetBalance}from"./utils/getStakedAssetBalance.js";export{getStakeForAddresses}from"./utils/getStakeForAddresses.js";export{getUnixNow}from"./utils/getUnixNow.js";export{getUtxosByTxFromGlacier}from"./utils/getUtxosByTxFromGlacier.js";export{getVmByChainAlias}from"./utils/getVmByChainAlias.js";export{getXpubFromMnemonic}from"./utils/getXpubFromMnemonic.js";export{isBech32Address}from"./utils/isBech32Address.js";export{parseAvalancheTx}from"./utils/parseAvalancheTx.js";export{emptySignature,populateCredential}from"./utils/populateCredential.js";export{signedTxToHex}from"./utils/signedTxToHex.js";export{sortUTXOsByAmount,sortUTXOsByAmountAscending,sortUTXOsByAmountDescending,sortUTXOsStaking}from"./utils/sortUTXOs.js";export{P_CHAIN_TX_SIZE_LIMIT,SizeSupportedTx,getMaximumUtxoSet}from"./utils/txSizeLimits.js";export{verifyDerivationPath}from"./utils/verifyDerivationPath.js";
1
+ export{TxType,isAddAutoRenewedValidatorTx,isAddDelegatorTx,isAddPermissionlessDelegatorTx,isAddPermissionlessValidatorTx,isAddSubnetValidatorTx,isAddValidatorTx,isBaseTx,isConvertSubnetToL1Tx,isCreateChainTx,isCreateSubnetTx,isDisableL1ValidatorTx,isExportTx,isImportTx,isIncreaseL1ValidatorBalance,isRegisterL1ValidatorTx,isRemoveSubnetValidatorTx,isSetAutoRenewedValidatorConfigTx,isSetL1ValidatorWeightTx,isTransferSubnetOwnershipTx,isTransformSubnetTx}from"./models.js";export{WalletAbstract}from"./wallets/WalletAbstract.js";export{WalletVoid}from"./wallets/WalletVoid.js";export{isObsidianApp}from"./wallets/ledger/isObsidianApp.js";export{getLedgerProvider}from"./wallets/ledger/getLedgerProvider.js";export{AddressWallet}from"./wallets/AddressWallet.js";export{MnemonicWalletVoid}from"./wallets/legacy/MnemonicWalletVoid.js";export{LedgerWallet}from"./wallets/legacy/LedgerWallet.js";export{MnemonicWallet}from"./wallets/legacy/MnemonicWallet.js";export{StaticSigner}from"./wallets/StaticSigner.js";export{SimpleSigner}from"./wallets/SimpleSigner.js";export{LedgerSigner}from"./wallets/ledger/LedgerSigner.js";export{SimpleLedgerSigner}from"./wallets/ledger/SimpleLedgerSigner.js";export{LedgerLiveSigner}from"./wallets/ledger/LedgerLiveSigner.js";export{AbstractProvider}from"./providers/AbstractProvider.js";export{JsonRpcProvider}from"./providers/JsonRpcProvider.js";export{DevnetContext,FujiContext,MainnetContext}from"./providers/constants.js";export{addSignaturesToAvalancheTx}from"./utils/addSignaturesToAvalancheTx.js";export{convertGlacierUtxo}from"./utils/convertGlacierUtxo.js";export{createAvalancheEvmUnsignedTx}from"./utils/createAvalancheEvmUnsignedTx.js";export{createAvalancheUnsignedTx}from"./utils/createAvalancheUnsignedTx.js";export{digestMessage}from"./utils/digestMessage.js";export{getAddressFromXpub}from"./utils/getAddressFromXpub.js";export{getAddressPublicKeyFromXpub}from"./utils/getAddressPublicKeyFromXpub.js";export{getPaginatedUTXOs,getUTXOsForAddresses}from"./utils/getAllUTXOs.js";export{getAssetBalance}from"./utils/getAssetBalance.js";export{getPchainUnixNow}from"./utils/getPchainUnixNow.js";export{getStakedAssetBalance}from"./utils/getStakedAssetBalance.js";export{getStakeForAddresses}from"./utils/getStakeForAddresses.js";export{getUnixNow}from"./utils/getUnixNow.js";export{getUtxosByTxFromGlacier}from"./utils/getUtxosByTxFromGlacier.js";export{getVmByChainAlias}from"./utils/getVmByChainAlias.js";export{getXpubFromMnemonic}from"./utils/getXpubFromMnemonic.js";export{isBech32Address}from"./utils/isBech32Address.js";export{parseAvalancheTx}from"./utils/parseAvalancheTx.js";export{emptySignature,populateCredential}from"./utils/populateCredential.js";export{signedTxToHex}from"./utils/signedTxToHex.js";export{sortUTXOsByAmount,sortUTXOsByAmountAscending,sortUTXOsByAmountDescending,sortUTXOsStaking}from"./utils/sortUTXOs.js";export{P_CHAIN_TX_SIZE_LIMIT,SizeSupportedTx,getMaximumUtxoSet}from"./utils/txSizeLimits.js";export{verifyDerivationPath}from"./utils/verifyDerivationPath.js";export{getAvalancheDerivationPath}from"./utils/getAvalancheDerivationPath.js";
@@ -4,7 +4,7 @@ type ChainIDAlias = 'X' | 'P' | 'C';
4
4
  /**
5
5
  * Types for parsed transaction
6
6
  */
7
- type Tx = AddValidatorTx | AddDelegatorTx | ExportTx | ImportTx | BaseTx | CreateSubnetTx | CreateChainTx | AddSubnetValidatorTx | RemoveSubnetValidatorTx | AddPermissionlessValidatorTx | AddPermissionlessDelegatorTx | TransformSubnetTx | TransferSubnetOwnershipTx | ConvertSubnetToL1Tx | RegisterL1ValidatorTx | SetL1ValidatorWeightTx | DisableL1ValidatorTx | IncreaseL1ValidatorBalanceTx | UnknownTx;
7
+ type Tx = AddValidatorTx | AddDelegatorTx | ExportTx | ImportTx | BaseTx | CreateSubnetTx | CreateChainTx | AddSubnetValidatorTx | RemoveSubnetValidatorTx | AddPermissionlessValidatorTx | AddPermissionlessDelegatorTx | TransformSubnetTx | TransferSubnetOwnershipTx | ConvertSubnetToL1Tx | RegisterL1ValidatorTx | SetL1ValidatorWeightTx | DisableL1ValidatorTx | IncreaseL1ValidatorBalanceTx | AddAutoRenewedValidatorTx | SetAutoRenewedValidatorConfigTx | UnknownTx;
8
8
  interface FeeData {
9
9
  totalAvaxBurned: bigint;
10
10
  totalAvaxOutput: bigint;
@@ -30,6 +30,8 @@ declare enum TxType {
30
30
  SetL1ValidatorWeight = "set_l1_validator_weight",
31
31
  IncreaseL1ValidatorBalance = "increase_l1_validator_balance",
32
32
  DisableL1Validator = "disable_l1_validator",
33
+ AddAutoRenewedValidator = "add_auto_renewed_validator",
34
+ SetAutoRenewedValidatorConfig = "set_auto_renewed_validator_config",
33
35
  AddSubnetValidator = "add_subnet_validator",
34
36
  RemoveSubnetValidator = "remove_subnet_validator",
35
37
  AddPermissionlessValidator = "add_permissionless_validator",
@@ -137,6 +139,27 @@ interface DisableL1ValidatorTx extends TxBase {
137
139
  type: TxType.DisableL1Validator;
138
140
  validationId: string;
139
141
  }
142
+ interface AddAutoRenewedValidatorTx extends TxBase {
143
+ type: TxType.AddAutoRenewedValidator;
144
+ nodeID: string;
145
+ stake: bigint;
146
+ stakeOuts: readonly TransferableOutput[];
147
+ rewardOwner: OutputOwners;
148
+ delegationRewardOwner: OutputOwners;
149
+ owner: OutputOwners;
150
+ delegationFee: number;
151
+ autoCompoundRewardShares: number;
152
+ period: bigint;
153
+ signer: pvmSerial.Signer | pvmSerial.SignerEmpty;
154
+ publicKey: undefined | string;
155
+ signature: undefined | string;
156
+ }
157
+ interface SetAutoRenewedValidatorConfigTx extends TxBase {
158
+ type: TxType.SetAutoRenewedValidatorConfig;
159
+ txId: string;
160
+ autoCompoundRewardShares: number;
161
+ period: bigint;
162
+ }
140
163
  interface AddPermissionlessValidatorTx extends TxBase {
141
164
  type: TxType.AddPermissionlessValidator;
142
165
  nodeID: string;
@@ -209,6 +232,8 @@ declare function isAddPermissionlessValidatorTx(tx: Tx): tx is AddPermissionless
209
232
  declare function isAddPermissionlessDelegatorTx(tx: Tx): tx is AddPermissionlessDelegatorTx;
210
233
  declare function isTransformSubnetTx(tx: Tx): tx is TransformSubnetTx;
211
234
  declare function isTransferSubnetOwnershipTx(tx: Tx): tx is TransferSubnetOwnershipTx;
235
+ declare function isAddAutoRenewedValidatorTx(tx: Tx): tx is AddAutoRenewedValidatorTx;
236
+ declare function isSetAutoRenewedValidatorConfigTx(tx: Tx): tx is SetAutoRenewedValidatorConfigTx;
212
237
 
213
- export { TxType, isAddDelegatorTx, isAddPermissionlessDelegatorTx, isAddPermissionlessValidatorTx, isAddSubnetValidatorTx, isAddValidatorTx, isBaseTx, isConvertSubnetToL1Tx, isCreateChainTx, isCreateSubnetTx, isDisableL1ValidatorTx, isExportTx, isImportTx, isIncreaseL1ValidatorBalance, isRegisterL1ValidatorTx, isRemoveSubnetValidatorTx, isSetL1ValidatorWeightTx, isTransferSubnetOwnershipTx, isTransformSubnetTx };
214
- export type { AddDelegatorTx, AddPermissionlessDelegatorTx, AddPermissionlessValidatorTx, AddSubnetValidatorTx, AddValidatorTx, BaseTx, ChainIDAlias, ConvertSubnetToL1Tx, CreateChainTx, CreateSubnetTx, DisableL1ValidatorTx, ExportTx, FeeData, ImportTx, IncreaseL1ValidatorBalanceTx, RegisterL1ValidatorTx, RemoveSubnetValidatorTx, SetL1ValidatorWeightTx, TransferSubnetOwnershipTx, TransformSubnetTx, Tx, TxBase, UnknownTx };
238
+ export { TxType, isAddAutoRenewedValidatorTx, isAddDelegatorTx, isAddPermissionlessDelegatorTx, isAddPermissionlessValidatorTx, isAddSubnetValidatorTx, isAddValidatorTx, isBaseTx, isConvertSubnetToL1Tx, isCreateChainTx, isCreateSubnetTx, isDisableL1ValidatorTx, isExportTx, isImportTx, isIncreaseL1ValidatorBalance, isRegisterL1ValidatorTx, isRemoveSubnetValidatorTx, isSetAutoRenewedValidatorConfigTx, isSetL1ValidatorWeightTx, isTransferSubnetOwnershipTx, isTransformSubnetTx };
239
+ export type { AddAutoRenewedValidatorTx, AddDelegatorTx, AddPermissionlessDelegatorTx, AddPermissionlessValidatorTx, AddSubnetValidatorTx, AddValidatorTx, BaseTx, ChainIDAlias, ConvertSubnetToL1Tx, CreateChainTx, CreateSubnetTx, DisableL1ValidatorTx, ExportTx, FeeData, ImportTx, IncreaseL1ValidatorBalanceTx, RegisterL1ValidatorTx, RemoveSubnetValidatorTx, SetAutoRenewedValidatorConfigTx, SetL1ValidatorWeightTx, TransferSubnetOwnershipTx, TransformSubnetTx, Tx, TxBase, UnknownTx };
@@ -1 +1 @@
1
- var e=(e=>(e.Base="base",e.AddValidator="add_validator",e.AddDelegator="add_delegator",e.Export="export",e.Import="import",e.CreateSubnet="create_subnet",e.CreateChain="create_chain",e.ConvertSubnetToL1="convert_subnet_to_l1",e.RegisterL1Validator="register_l1_validator",e.SetL1ValidatorWeight="set_l1_validator_weight",e.IncreaseL1ValidatorBalance="increase_l1_validator_balance",e.DisableL1Validator="disable_l1_validator",e.AddSubnetValidator="add_subnet_validator",e.RemoveSubnetValidator="remove_subnet_validator",e.AddPermissionlessValidator="add_permissionless_validator",e.AddPermissionlessDelegator="add_permissionless_delegator",e.TransformSubnet="transform_subnet",e.TransferSubnetOwnership="transfer_subnet_ownership",e.Unknown="unknown",e))(e||{});function t(e){return"add_validator"===e.type}function r(e){return"add_delegator"===e.type}function n(e){return"export"===e.type}function a(e){return"import"===e.type}function o(e){return"base"===e.type}function i(e){return"convert_subnet_to_l1"===e.type}function d(e){return"register_l1_validator"===e.type}function s(e){return"set_l1_validator_weight"===e.type}function _(e){return"disable_l1_validator"===e.type}function u(e){return"increase_l1_validator_balance"===e.type}function l(e){return"create_subnet"===e.type}function c(e){return"create_chain"===e.type}function p(e){return"add_subnet_validator"===e.type}function b(e){return"remove_subnet_validator"===e.type}function f(e){return"add_permissionless_validator"===e.type}function v(e){return"add_permissionless_delegator"===e.type}function y(e){return"transform_subnet"===e.type}function m(e){return"transfer_subnet_ownership"===e.type}export{e as TxType,r as isAddDelegatorTx,v as isAddPermissionlessDelegatorTx,f as isAddPermissionlessValidatorTx,p as isAddSubnetValidatorTx,t as isAddValidatorTx,o as isBaseTx,i as isConvertSubnetToL1Tx,c as isCreateChainTx,l as isCreateSubnetTx,_ as isDisableL1ValidatorTx,n as isExportTx,a as isImportTx,u as isIncreaseL1ValidatorBalance,d as isRegisterL1ValidatorTx,b as isRemoveSubnetValidatorTx,s as isSetL1ValidatorWeightTx,m as isTransferSubnetOwnershipTx,y as isTransformSubnetTx};
1
+ var e=(e=>(e.Base="base",e.AddValidator="add_validator",e.AddDelegator="add_delegator",e.Export="export",e.Import="import",e.CreateSubnet="create_subnet",e.CreateChain="create_chain",e.ConvertSubnetToL1="convert_subnet_to_l1",e.RegisterL1Validator="register_l1_validator",e.SetL1ValidatorWeight="set_l1_validator_weight",e.IncreaseL1ValidatorBalance="increase_l1_validator_balance",e.DisableL1Validator="disable_l1_validator",e.AddAutoRenewedValidator="add_auto_renewed_validator",e.SetAutoRenewedValidatorConfig="set_auto_renewed_validator_config",e.AddSubnetValidator="add_subnet_validator",e.RemoveSubnetValidator="remove_subnet_validator",e.AddPermissionlessValidator="add_permissionless_validator",e.AddPermissionlessDelegator="add_permissionless_delegator",e.TransformSubnet="transform_subnet",e.TransferSubnetOwnership="transfer_subnet_ownership",e.Unknown="unknown",e))(e||{});function t(e){return"add_validator"===e.type}function r(e){return"add_delegator"===e.type}function n(e){return"export"===e.type}function a(e){return"import"===e.type}function o(e){return"base"===e.type}function i(e){return"convert_subnet_to_l1"===e.type}function d(e){return"register_l1_validator"===e.type}function _(e){return"set_l1_validator_weight"===e.type}function u(e){return"disable_l1_validator"===e.type}function s(e){return"increase_l1_validator_balance"===e.type}function l(e){return"create_subnet"===e.type}function c(e){return"create_chain"===e.type}function p(e){return"add_subnet_validator"===e.type}function f(e){return"remove_subnet_validator"===e.type}function v(e){return"add_permissionless_validator"===e.type}function b(e){return"add_permissionless_delegator"===e.type}function y(e){return"transform_subnet"===e.type}function g(e){return"transfer_subnet_ownership"===e.type}function m(e){return"add_auto_renewed_validator"===e.type}function w(e){return"set_auto_renewed_validator_config"===e.type}export{e as TxType,m as isAddAutoRenewedValidatorTx,r as isAddDelegatorTx,b as isAddPermissionlessDelegatorTx,v as isAddPermissionlessValidatorTx,p as isAddSubnetValidatorTx,t as isAddValidatorTx,o as isBaseTx,i as isConvertSubnetToL1Tx,c as isCreateChainTx,l as isCreateSubnetTx,u as isDisableL1ValidatorTx,n as isExportTx,a as isImportTx,s as isIncreaseL1ValidatorBalance,d as isRegisterL1ValidatorTx,f as isRemoveSubnetValidatorTx,w as isSetAutoRenewedValidatorConfigTx,_ as isSetL1ValidatorWeightTx,g as isTransferSubnetOwnershipTx,y as isTransformSubnetTx};
@@ -1,18 +1,12 @@
1
1
  import * as _avalabs_avalanchejs_dist_vms_common from '@avalabs/avalanchejs/dist/vms/common';
2
- import * as ethers from 'ethers';
3
- import { JsonRpcProvider } from 'ethers';
4
2
  import { Context, avm, pvm, evm, info, VM, avaxSerial } from '@avalabs/avalanchejs';
5
3
  import { ChainIDAlias } from '../models.js';
6
4
 
7
5
  declare class AbstractProvider {
8
6
  protected baseUrl: string;
9
7
  protected context: Context.Context;
10
- evmRpc: JsonRpcProvider;
11
- constructor(baseUrl: string, context: Context.Context);
12
- /**
13
- * @link https://docs.ethers.io/v5/api/providers/provider/#Provider-getFeeData
14
- */
15
- getEvmFeeData(): Promise<ethers.FeeData>;
8
+ fetchOptions?: RequestInit | undefined;
9
+ constructor(baseUrl: string, context: Context.Context, fetchOptions?: RequestInit | undefined);
16
10
  getContext(): Context.Context;
17
11
  getChainID(chainAlias: ChainIDAlias): string;
18
12
  getNetworkID(): number;