@avalabs/core-wallets-sdk 3.1.0-alpha.1 → 3.1.0-alpha.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.
Files changed (27) hide show
  1. package/dist/index.d.ts +163 -39
  2. package/dist/index.js +1 -1
  3. package/esm/Avalanche/models.d.ts +2 -2
  4. package/esm/Avalanche/providers/AbstractProvider.d.ts +9 -2
  5. package/esm/Avalanche/providers/AbstractProvider.js +1 -1
  6. package/esm/Avalanche/providers/JsonRpcProvider.d.ts +4 -3
  7. package/esm/Avalanche/providers/JsonRpcProvider.js +1 -1
  8. package/esm/Avalanche/providers/constants.js +1 -1
  9. package/esm/Avalanche/providers/platformFeeConfig.js +1 -0
  10. package/esm/Avalanche/utils/convertGlacierUtxo.d.ts +2 -2
  11. package/esm/Avalanche/utils/getPchainUnixNow.js +1 -1
  12. package/esm/Avalanche/utils/getUtxosByTxFromGlacier.d.ts +3 -1
  13. package/esm/Avalanche/utils/getUtxosByTxFromGlacier.js +1 -1
  14. package/esm/Avalanche/utils/parseAvalancheTx.js +1 -1
  15. package/esm/Avalanche/utils/parsers/parseAddPermissionlessDelegatorTx.js +1 -1
  16. package/esm/Avalanche/utils/parsers/parseAddPermissionlessValidatorTx.js +1 -1
  17. package/esm/Avalanche/utils/sortUTXOs.d.ts +5 -4
  18. package/esm/Avalanche/utils/txSizeLimits.d.ts +9 -2
  19. package/esm/Avalanche/utils/txSizeLimits.js +1 -1
  20. package/esm/Avalanche/wallets/TxBuilderTypes.d.ts +110 -0
  21. package/esm/Avalanche/wallets/WalletAbstract.d.ts +17 -16
  22. package/esm/Avalanche/wallets/WalletAbstract.js +1 -1
  23. package/esm/BitcoinVM/providers/BitcoinProvider.d.ts +1 -0
  24. package/esm/BitcoinVM/providers/BitcoinProvider.js +1 -1
  25. package/esm/BitcoinVM/providers/BitcoinProviderAbstract.d.ts +1 -0
  26. package/esm/utils/assertFeeStateProvided.js +1 -0
  27. package/package.json +5 -5
package/dist/index.d.ts CHANGED
@@ -8,12 +8,14 @@ import { Provider, VoidSigner, HDNodeWallet, TransactionResponse, JsonRpcProvide
8
8
  import Transport from '@ledgerhq/hw-transport';
9
9
  import Eth from '@ledgerhq/hw-app-eth';
10
10
  import * as _avalabs_avalanchejs from '@avalabs/avalanchejs';
11
- import { VM, Common, OutputOwners, TransferableOutput, pvmSerial, Context, avm, pvm, evm, avaxSerial, utils, UnsignedTx, EVMUnsignedTx, Utxo, Credential, Signature } from '@avalabs/avalanchejs';
11
+ import { VM, Common, OutputOwners, TransferableOutput, pvmSerial, Context, info, avm, pvm, evm, avaxSerial, utils, UnsignedTx, EVMUnsignedTx, Utxo, TransferOutput, Credential, Signature } from '@avalabs/avalanchejs';
12
12
  import * as _avalabs_avalanchejs_dist_vms_common from '@avalabs/avalanchejs/dist/vms/common';
13
13
  import { Bip32Path } from 'bip32-path';
14
14
  import AppZondax, { ResponseBase } from '@avalabs/hw-app-avalanche';
15
15
  import { BIP32Interface } from 'bip32';
16
+ import { GetUpgradesInfoResponse } from '@avalabs/avalanchejs/dist/info/model';
16
17
  import { Utxo as Utxo$1, PChainUtxo } from '@avalabs/glacier-sdk';
18
+ import * as _avalabs_avalanchejs_dist_serializable_common_types from '@avalabs/avalanchejs/dist/serializable/common/types';
17
19
  import { WalletAbstract as WalletAbstract$1 } from 'Avalanche/wallets';
18
20
 
19
21
  /**
@@ -147,6 +149,7 @@ declare abstract class BitcoinProviderAbstract {
147
149
  medium: number;
148
150
  low: number;
149
151
  }>;
152
+ abstract getAddressFromScript(script: string): Promise<string>;
150
153
  }
151
154
 
152
155
  declare class BitcoinProvider extends BitcoinProviderAbstract {
@@ -159,6 +162,7 @@ declare class BitcoinProvider extends BitcoinProviderAbstract {
159
162
  confirmed: BitcoinInputUTXOWithOptionalScript[];
160
163
  unconfirmed: BitcoinInputUTXOWithOptionalScript[];
161
164
  }>;
165
+ getAddressFromScript(script: string): Promise<string>;
162
166
  getScriptsForUtxos(utxos: BitcoinInputUTXOWithOptionalScript[]): Promise<BitcoinInputUTXO[]>;
163
167
  private _parseUtxo;
164
168
  getBalances(address: string): Promise<{
@@ -561,7 +565,7 @@ type ChainIDAlias = 'X' | 'P' | 'C';
561
565
  /**
562
566
  * Types for parsed transaction
563
567
  */
564
- type Tx = AddValidatorTx | AddDelegatorTx | ExportTx | ImportTx | BaseTx | CreateSubnetTx | CreateChainTx | AddSubnetValidatorTx | RemoveSubnetValidatorTx | AddPermissionlessValidatorTx | AddPermissionlessDelegatorTx | TransformSubnetTx | TransferSubnetOwnershipTx | UnknownTx;
568
+ type Tx = AddValidatorTx | AddDelegatorTx | ExportTx | ImportTx | BaseTx$1 | CreateSubnetTx | CreateChainTx | AddSubnetValidatorTx | RemoveSubnetValidatorTx | AddPermissionlessValidatorTx | AddPermissionlessDelegatorTx | TransformSubnetTx | TransferSubnetOwnershipTx$1 | UnknownTx;
565
569
  interface FeeData {
566
570
  totalAvaxBurned: bigint;
567
571
  totalAvaxOutput: bigint;
@@ -589,7 +593,7 @@ declare enum TxType {
589
593
  TransferSubnetOwnership = "transfer_subnet_ownership",
590
594
  Unknown = "unknown"
591
595
  }
592
- interface BaseTx extends TxBase {
596
+ interface BaseTx$1 extends TxBase {
593
597
  type: TxType.Base;
594
598
  chain: VM;
595
599
  outputs: {
@@ -668,7 +672,7 @@ interface AddPermissionlessValidatorTx extends TxBase {
668
672
  rewardOwner: OutputOwners;
669
673
  delegationRewardOwner: OutputOwners;
670
674
  stake: bigint;
671
- stakeOuts: TransferableOutput[];
675
+ stakeOuts: readonly TransferableOutput[];
672
676
  subnetID: string;
673
677
  publicKey: undefined | string;
674
678
  signature: undefined | string;
@@ -682,7 +686,7 @@ interface AddPermissionlessDelegatorTx extends TxBase {
682
686
  stake: bigint;
683
687
  subnetID: string;
684
688
  delegatorRewardsOwner: OutputOwners;
685
- stakeOuts: TransferableOutput[];
689
+ stakeOuts: readonly TransferableOutput[];
686
690
  }
687
691
  interface TransformSubnetTx extends TxBase {
688
692
  type: TxType.TransformSubnet;
@@ -701,7 +705,7 @@ interface TransformSubnetTx extends TxBase {
701
705
  maxValidatorWeightFactor: number;
702
706
  uptimeRequirement: number;
703
707
  }
704
- interface TransferSubnetOwnershipTx extends TxBase {
708
+ interface TransferSubnetOwnershipTx$1 extends TxBase {
705
709
  type: TxType.TransferSubnetOwnership;
706
710
  subnetID: string;
707
711
  threshold: number;
@@ -717,7 +721,7 @@ declare function isAddValidatorTx(tx: Tx): tx is AddValidatorTx;
717
721
  declare function isAddDelegatorTx(tx: Tx): tx is AddDelegatorTx;
718
722
  declare function isExportTx(tx: Tx): tx is ExportTx;
719
723
  declare function isImportTx(tx: Tx): tx is ImportTx;
720
- declare function isBaseTx(tx: Tx): tx is BaseTx;
724
+ declare function isBaseTx(tx: Tx): tx is BaseTx$1;
721
725
  declare function isCreateSubnetTx(tx: Tx): tx is CreateSubnetTx;
722
726
  declare function isCreateChainTx(tx: Tx): tx is CreateChainTx;
723
727
  declare function isAddSubnetValidatorTx(tx: Tx): tx is AddSubnetValidatorTx;
@@ -725,24 +729,28 @@ declare function isRemoveSubnetValidatorTx(tx: Tx): tx is RemoveSubnetValidatorT
725
729
  declare function isAddPermissionlessValidatorTx(tx: Tx): tx is AddPermissionlessValidatorTx;
726
730
  declare function isAddPermissionlessDelegatorTx(tx: Tx): tx is AddPermissionlessDelegatorTx;
727
731
  declare function isTransformSubnetTx(tx: Tx): tx is TransformSubnetTx;
728
- declare function isTransferSubnetOwnershipTx(tx: Tx): tx is TransferSubnetOwnershipTx;
732
+ declare function isTransferSubnetOwnershipTx(tx: Tx): tx is TransferSubnetOwnershipTx$1;
729
733
 
730
734
  declare class AbstractProvider {
731
735
  protected baseUrl: string;
732
736
  protected context: Context.Context;
737
+ protected upgradesInfo?: info.GetUpgradesInfoResponse | undefined;
733
738
  evmRpc: JsonRpcProvider$1;
734
- constructor(baseUrl: string, context: Context.Context);
739
+ constructor(baseUrl: string, context: Context.Context, upgradesInfo?: info.GetUpgradesInfoResponse | undefined);
735
740
  /**
736
741
  * @link https://docs.ethers.io/v5/api/providers/provider/#Provider-getFeeData
737
742
  */
738
743
  getEvmFeeData(): Promise<ethers.FeeData>;
739
744
  getContext(): Context.Context;
745
+ isEtnaEnabled(): boolean;
746
+ getUpgradesInfo(): info.GetUpgradesInfoResponse | undefined;
740
747
  getChainID(chainAlias: ChainIDAlias): string;
741
748
  getNetworkID(): number;
742
749
  getHrp(): string;
743
750
  getApiX(): avm.AVMApi;
744
751
  getApiP(): pvm.PVMApi;
745
752
  getApiC(): evm.EVMApi;
753
+ getInfo(): info.InfoApi;
746
754
  getApi(chain: ChainIDAlias): avm.AVMApi | pvm.PVMApi | evm.EVMApi;
747
755
  getAvaxID(): string;
748
756
  getAddress(publicKey: Buffer, chain: ChainIDAlias): string;
@@ -757,13 +765,16 @@ declare class AbstractProvider {
757
765
  getApiByChainID(chainID: string): avm.AVMApi | pvm.PVMApi | evm.EVMApi | undefined;
758
766
  issueTx(tx: avaxSerial.SignedTx): Promise<_avalabs_avalanchejs_dist_vms_common.IssueTxResponse>;
759
767
  issueTxHex(txHex: string, vm: VM): Promise<_avalabs_avalanchejs_dist_vms_common.IssueTxResponse>;
768
+ waitForTransaction(txHex: string, vm: VM, timeout?: number): Promise<{
769
+ success: boolean;
770
+ }>;
760
771
  }
761
772
 
762
773
  declare class JsonRpcProvider extends AbstractProvider {
763
- constructor(baseUrl: string, context: Context.Context);
774
+ constructor(baseUrl: string, context: Context.Context, upgradesInfo?: GetUpgradesInfoResponse);
764
775
  static fromBaseURL(url: string): Promise<JsonRpcProvider>;
765
- static getDefaultMainnetProvider(): JsonRpcProvider;
766
- static getDefaultFujiProvider(): JsonRpcProvider;
776
+ static getDefaultMainnetProvider(upgradesInfo?: GetUpgradesInfoResponse): JsonRpcProvider;
777
+ static getDefaultFujiProvider(upgradesInfo?: GetUpgradesInfoResponse): JsonRpcProvider;
767
778
  }
768
779
 
769
780
  /**
@@ -775,6 +786,113 @@ declare const MainnetContext: Context.Context;
775
786
  */
776
787
  declare const FujiContext: Context.Context;
777
788
 
789
+ type BaseTx = {
790
+ utxoSet: utils.UtxoSet;
791
+ chain: 'X' | 'P';
792
+ toAddress: string;
793
+ amountsPerAsset: Record<string, bigint>;
794
+ feeState?: pvm.FeeState;
795
+ options?: Common.SpendOptions;
796
+ fromAddresses?: string[];
797
+ };
798
+ type ImportP = {
799
+ utxoSet: utils.UtxoSet;
800
+ sourceChain: 'X' | 'C';
801
+ toAddress?: string;
802
+ threshold?: number;
803
+ feeState?: pvm.FeeState;
804
+ locktime?: bigint;
805
+ };
806
+ type ExportP = {
807
+ amount: bigint;
808
+ utxoSet: utils.UtxoSet;
809
+ destination: 'X' | 'C';
810
+ feeState?: pvm.FeeState;
811
+ toAddress?: string;
812
+ };
813
+ type ConsolidateP = {
814
+ utxoSet: utils.UtxoSet;
815
+ amount: bigint;
816
+ feeState?: pvm.FeeState;
817
+ toAddress?: string;
818
+ options?: Common.SpendOptions;
819
+ };
820
+ type CreateSubnet = {
821
+ utxoSet: utils.UtxoSet;
822
+ rewardAddresses: string[];
823
+ feeState?: pvm.FeeState;
824
+ fromAddresses?: string[];
825
+ options?: Common.SpendOptions;
826
+ threshold?: number;
827
+ locktime?: bigint;
828
+ };
829
+ type AddSubnetValidator = {
830
+ utxoSet: utils.UtxoSet;
831
+ nodeId: string;
832
+ start: bigint;
833
+ end: bigint;
834
+ weight: bigint;
835
+ subnetId: string;
836
+ subnetAuth: number[];
837
+ feeState?: pvm.FeeState;
838
+ fromAddresses?: string[];
839
+ options?: Common.SpendOptions;
840
+ };
841
+ type AddPermissionlessValidator = {
842
+ utxoSet: utils.UtxoSet;
843
+ nodeId: string;
844
+ start: bigint;
845
+ end: bigint;
846
+ weight: bigint;
847
+ subnetId: string;
848
+ shares: number;
849
+ fromAddresses?: string[];
850
+ rewardAddresses?: string[];
851
+ delegatorRewardAddresses?: string[];
852
+ publicKey?: Buffer;
853
+ signature?: Buffer;
854
+ options?: Common.SpendOptions;
855
+ stakingAssetId?: string;
856
+ locktime?: bigint;
857
+ threshold?: number;
858
+ feeState?: pvm.FeeState;
859
+ };
860
+ type AddPermissionlessDelegator = {
861
+ utxoSet: utils.UtxoSet;
862
+ nodeId: string;
863
+ start: bigint;
864
+ end: bigint;
865
+ weight: bigint;
866
+ subnetId: string;
867
+ fromAddresses?: string[];
868
+ rewardAddresses?: string[];
869
+ options?: Common.SpendOptions;
870
+ locktime?: bigint;
871
+ feeState?: pvm.FeeState;
872
+ stakingAssetId?: string;
873
+ threshold?: number;
874
+ };
875
+ type RemoveSubnetValidator = {
876
+ utxoSet: utils.UtxoSet;
877
+ nodeId: string;
878
+ subnetId: string;
879
+ subnetAuth: number[];
880
+ feeState?: pvm.FeeState;
881
+ fromAddresses?: string[];
882
+ options?: Common.SpendOptions;
883
+ };
884
+ type TransferSubnetOwnershipTx = {
885
+ utxoSet: utils.UtxoSet;
886
+ subnetId: string;
887
+ subnetAuth: number[];
888
+ subnetOwners: string[];
889
+ feeState?: pvm.FeeState;
890
+ fromAddresses?: string[];
891
+ options?: Common.SpendOptions;
892
+ threshold?: number;
893
+ locktime?: bigint;
894
+ };
895
+
778
896
  /**
779
897
  * An abstract class that that is shared by all wallet classes.
780
898
  */
@@ -820,8 +938,12 @@ declare abstract class WalletAbstract {
820
938
  * @param source What is the source chain of the atomic UTXOs
821
939
  */
822
940
  getAtomicUTXOs(chain: ChainIDAlias, source: ChainIDAlias): Promise<utils.UtxoSet>;
941
+ /**
942
+ * Get the nonce of this wallet's C chain address
943
+ */
944
+ getNonce(): Promise<number>;
823
945
  exportX(amount: bigint, utxoSet: utils.UtxoSet, destination: 'P' | 'C', toAddress?: string): Common.UnsignedTx;
824
- importP(utxos: utils.UtxoSet, sourceChain: 'X' | 'C', toAddress?: string): Common.UnsignedTx;
946
+ importP({ utxoSet, sourceChain, toAddress, threshold, feeState, locktime, }: ImportP): Common.UnsignedTx;
825
947
  importX(utxos: utils.UtxoSet, sourceChain: 'P' | 'C', toAddress?: string): Common.UnsignedTx;
826
948
  /**
827
949
  *
@@ -841,10 +963,6 @@ declare abstract class WalletAbstract {
841
963
  * @param toAddress
842
964
  */
843
965
  exportC(amount: bigint, destination: 'X' | 'P', nonce: bigint, baseFee: bigint, toAddress?: string): _avalabs_avalanchejs.EVMUnsignedTx;
844
- /**
845
- * Get the nonce of this wallet's C chain address
846
- */
847
- getNonce(): Promise<number>;
848
966
  /**
849
967
  * Export the given amount of AVAX from the P chain. Export fee is automatically added.
850
968
  * @param amount
@@ -852,18 +970,18 @@ declare abstract class WalletAbstract {
852
970
  * @param destination
853
971
  * @param toAddress
854
972
  */
855
- exportP(amount: bigint, utxoSet: utils.UtxoSet, destination: 'X' | 'C', toAddress?: string): Common.UnsignedTx;
856
- addValidator(utxos: utils.UtxoSet, nodeID: string, stakeAmount: bigint, startDate: bigint, endDate: bigint, delegationFee: number, config?: {
973
+ exportP({ amount, utxoSet, destination, feeState, toAddress }: ExportP): Common.UnsignedTx;
974
+ addValidator(utxos: utils.UtxoSet, nodeId: string, stakeAmount: bigint, startDate: bigint, endDate: bigint, delegationFee: number, config?: {
857
975
  rewardAddress?: string;
858
976
  }): Common.UnsignedTx;
859
- addDelegator(utxos: utils.UtxoSet, nodeID: string, stakeAmount: bigint, startDate: bigint, endDate: bigint, config?: {
977
+ addDelegator(utxos: utils.UtxoSet, nodeId: string, stakeAmount: bigint, startDate: bigint, endDate: bigint, config?: {
860
978
  rewardAddress?: string;
861
979
  }): Common.UnsignedTx;
862
- consolidateP(utxoSet: utils.UtxoSet, amount: bigint, toAddress?: string, options?: Common.SpendOptions): Common.UnsignedTx;
863
- baseTX(utxoSet: utils.UtxoSet, chain: 'X' | 'P', toAddress: string, amountsPerAsset: Record<string, bigint>, options?: Common.SpendOptions, fromAddresses?: string[]): Common.UnsignedTx;
980
+ consolidateP({ utxoSet, amount, feeState, toAddress, options, }: ConsolidateP): Common.UnsignedTx;
981
+ baseTX({ utxoSet, chain, toAddress, amountsPerAsset, feeState, options, fromAddresses, }: BaseTx): Common.UnsignedTx;
864
982
  createBlockchain(utxoSet: utils.UtxoSet, subnetId: string, chainName: string, vmID: string, fxIds: string[], genesisData: Record<string, unknown>, subnetAuth: number[], options?: Common.SpendOptions, fromAddresses?: string[]): Common.UnsignedTx;
865
- createSubnet(utxoSet: utils.UtxoSet, rewardAddresses: string[], fromAddresses?: string[], options?: Common.SpendOptions, threshold?: number, locktime?: bigint): Common.UnsignedTx;
866
- addSubnetValidator(utxoSet: utils.UtxoSet, nodeId: string, start: bigint, end: bigint, weight: bigint, subnetId: string, subnetAuth: number[], fromAddresses?: string[], options?: Common.SpendOptions): Common.UnsignedTx;
983
+ createSubnet({ utxoSet, rewardAddresses, feeState, fromAddresses, options, threshold, locktime, }: CreateSubnet): Common.UnsignedTx;
984
+ addSubnetValidator({ utxoSet, nodeId, start, end, weight, subnetId, subnetAuth, feeState, fromAddresses, options, }: AddSubnetValidator): Common.UnsignedTx;
867
985
  /**
868
986
  *
869
987
  * @param utxoSet The transaction will be constructed from these UTXOs.
@@ -880,7 +998,7 @@ declare abstract class WalletAbstract {
880
998
  * @param signature the BLS signature, If the subnet is the primary network. Can be found in the Node on startup.
881
999
  * @param options
882
1000
  */
883
- addPermissionlessValidator(utxoSet: utils.UtxoSet, nodeId: string, start: bigint, end: bigint, weight: bigint, subnetId: string, shares: number, fromAddresses?: string[], rewardAddresses?: string[], delegatorRewardAddresses?: string[], publicKey?: Buffer, signature?: Buffer, options?: Common.SpendOptions): Common.UnsignedTx;
1001
+ addPermissionlessValidator({ utxoSet, nodeId, start, end, weight, subnetId, shares, feeState, fromAddresses, rewardAddresses, delegatorRewardAddresses, publicKey, signature, options, threshold, locktime, stakingAssetId, }: AddPermissionlessValidator): Common.UnsignedTx;
884
1002
  /**
885
1003
  *
886
1004
  * @param utxoSet The transaction will be constructed from these UTXOs.
@@ -893,9 +1011,9 @@ declare abstract class WalletAbstract {
893
1011
  * @param rewardAddresses Will use active address if not provided. Given addresses will share the reward UTXO.
894
1012
  * @param options
895
1013
  */
896
- addPermissionlessDelegator(utxoSet: utils.UtxoSet, nodeId: string, start: bigint, end: bigint, weight: bigint, subnetId: string, fromAddresses?: string[], rewardAddresses?: string[], options?: Common.SpendOptions): Common.UnsignedTx;
897
- removeSubnetValidator(utxoSet: utils.UtxoSet, nodeId: string, subnetId: string, subnetAuth: number[], fromAddresses?: string[], options?: Common.SpendOptions): Common.UnsignedTx;
898
- transferSubnetOwnershipTx(utxoSet: utils.UtxoSet, subnetId: string, subnetAuth: number[], subnetOwners: string[], fromAddresses?: string[], options?: Common.SpendOptions, threshold?: number, locktime?: bigint): Common.UnsignedTx;
1014
+ addPermissionlessDelegator({ utxoSet, nodeId, start, end, weight, subnetId, fromAddresses, rewardAddresses, options, locktime, feeState, threshold, stakingAssetId, }: AddPermissionlessDelegator): Common.UnsignedTx;
1015
+ removeSubnetValidator({ utxoSet, nodeId, subnetId, subnetAuth, fromAddresses, feeState, options, }: RemoveSubnetValidator): Common.UnsignedTx;
1016
+ transferSubnetOwnershipTx({ utxoSet, subnetId, subnetAuth, subnetOwners, feeState, fromAddresses, options, threshold, locktime, }: TransferSubnetOwnershipTx): Common.UnsignedTx;
899
1017
  transformSubnetTx(utxoSet: utils.UtxoSet, subnetId: string, assetId: string, initialSupply: bigint, maximumSupply: bigint, minConsumptionRate: bigint, maxConsumptionRate: bigint, minValidatorStake: bigint, maxValidatorStake: bigint, minStakeDuration: number, maxStakeDuration: number, minDelegationFee: number, minDelegatorStake: number, maxValidatorWeightFactor: number, uptimeRequirement: number, subnetAuth: number[], fromAddresses?: string[], options?: Common.SpendOptions): Common.UnsignedTx;
900
1018
  protected constructor(provider: AbstractProvider);
901
1019
  }
@@ -1347,7 +1465,7 @@ declare const addSignaturesToAvalancheTx: ({ transactionHex, signatures, chainAl
1347
1465
  }>;
1348
1466
 
1349
1467
  type GlacierOutput = Utxo$1 | PChainUtxo;
1350
- declare const convertGlacierUtxo: (glacierUtxo: GlacierOutput, isTestnet: boolean) => Utxo;
1468
+ declare const convertGlacierUtxo: (glacierUtxo: GlacierOutput, isTestnet: boolean) => Utxo<TransferOutput | pvmSerial.StakeableLockOut<TransferOutput>>;
1351
1469
 
1352
1470
  type Params$2 = {
1353
1471
  txBytes: Uint8Array;
@@ -1467,8 +1585,9 @@ type Params = {
1467
1585
  isTestnet: boolean;
1468
1586
  url: string;
1469
1587
  token?: string;
1588
+ headers?: Record<string, string>;
1470
1589
  };
1471
- declare const getUtxosByTxFromGlacier: ({ transactionHex, chainAlias, isTestnet, url, token, }: Params) => Promise<Utxo[]>;
1590
+ declare const getUtxosByTxFromGlacier: ({ transactionHex, chainAlias, isTestnet, url, token, headers, }: Params) => Promise<Utxo<_avalabs_avalanchejs_dist_serializable_common_types.Serializable>[]>;
1472
1591
 
1473
1592
  declare const getVmByChainAlias: (chainAlias: string) => "EVM" | "AVM" | "PVM";
1474
1593
 
@@ -1504,10 +1623,10 @@ declare function signedTxToHex(signedTx: avaxSerial.SignedTx): string;
1504
1623
  * 2- Highest value UTXOs to lowest
1505
1624
  * @remark Does not check for locked UTXOs
1506
1625
  */
1507
- declare function sortUTXOsStaking(utxos: Utxo[]): Utxo[];
1508
- declare function sortUTXOsByAmount(utxos: Utxo[], isDescending: boolean): Utxo[];
1509
- declare const sortUTXOsByAmountDescending: (utxos: Utxo[]) => Utxo[];
1510
- declare const sortUTXOsByAmountAscending: (utxos: Utxo[]) => Utxo[];
1626
+ declare function sortUTXOsStaking(utxos: Utxo[]): Utxo<_avalabs_avalanchejs_dist_serializable_common_types.Serializable>[];
1627
+ declare function sortUTXOsByAmount(utxos: Utxo[], isDescending: boolean): Utxo<_avalabs_avalanchejs_dist_serializable_common_types.Serializable>[];
1628
+ declare const sortUTXOsByAmountDescending: (utxos: Utxo[]) => Utxo<_avalabs_avalanchejs_dist_serializable_common_types.Serializable>[];
1629
+ declare const sortUTXOsByAmountAscending: (utxos: Utxo[]) => Utxo<_avalabs_avalanchejs_dist_serializable_common_types.Serializable>[];
1511
1630
 
1512
1631
  /**
1513
1632
  * The list of transaction types supported by `getMaximumUtxoSet`.
@@ -1533,9 +1652,16 @@ declare const P_CHAIN_TX_SIZE_LIMIT = 65536;
1533
1652
  * @param utxos - list of UTXOs to be consumed by the transaction.
1534
1653
  * @param sizeSupportedTx - one of the supported transaction types
1535
1654
  * @param limit - optional - byte size limit, defaults to 64kb.
1655
+ * @param feeState - current fee state on the chain
1536
1656
  * @returns the largest prefix of sorted `utxos` before hitting the size limit. If no such prefix exists, then an empty array.
1537
1657
  */
1538
- declare function getMaximumUtxoSet(wallet: WalletAbstract$1, utxos: Utxo[], sizeSupportedTx: SizeSupportedTx, limit?: number): Utxo[];
1658
+ declare function getMaximumUtxoSet({ wallet, utxos, sizeSupportedTx, limit, feeState, }: {
1659
+ wallet: WalletAbstract$1;
1660
+ utxos: Utxo[];
1661
+ sizeSupportedTx: SizeSupportedTx;
1662
+ limit?: number;
1663
+ feeState?: pvm.FeeState;
1664
+ }): Utxo[];
1539
1665
 
1540
1666
  /**
1541
1667
  * Verifies the given derivation path is valid, starts with `m`, and of the right length
@@ -1552,7 +1678,6 @@ type index_AddSubnetValidatorTx = AddSubnetValidatorTx;
1552
1678
  type index_AddValidatorTx = AddValidatorTx;
1553
1679
  type index_AddressWallet = AddressWallet;
1554
1680
  declare const index_AddressWallet: typeof AddressWallet;
1555
- type index_BaseTx = BaseTx;
1556
1681
  type index_ChainIDAlias = ChainIDAlias;
1557
1682
  type index_CreateChainTx = CreateChainTx;
1558
1683
  type index_CreateSubnetTx = CreateSubnetTx;
@@ -1589,7 +1714,6 @@ type index_SizeSupportedTx = SizeSupportedTx;
1589
1714
  declare const index_SizeSupportedTx: typeof SizeSupportedTx;
1590
1715
  type index_StaticSigner = StaticSigner;
1591
1716
  declare const index_StaticSigner: typeof StaticSigner;
1592
- type index_TransferSubnetOwnershipTx = TransferSubnetOwnershipTx;
1593
1717
  type index_TransformSubnetTx = TransformSubnetTx;
1594
1718
  type index_Tx = Tx;
1595
1719
  type index_TxBase = TxBase;
@@ -1654,7 +1778,7 @@ declare namespace index {
1654
1778
  index_AddSubnetValidatorTx as AddSubnetValidatorTx,
1655
1779
  index_AddValidatorTx as AddValidatorTx,
1656
1780
  index_AddressWallet as AddressWallet,
1657
- index_BaseTx as BaseTx,
1781
+ BaseTx$1 as BaseTx,
1658
1782
  index_ChainIDAlias as ChainIDAlias,
1659
1783
  index_CreateChainTx as CreateChainTx,
1660
1784
  index_CreateSubnetTx as CreateSubnetTx,
@@ -1682,7 +1806,7 @@ declare namespace index {
1682
1806
  index_SimpleSigner as SimpleSigner,
1683
1807
  index_SizeSupportedTx as SizeSupportedTx,
1684
1808
  index_StaticSigner as StaticSigner,
1685
- index_TransferSubnetOwnershipTx as TransferSubnetOwnershipTx,
1809
+ TransferSubnetOwnershipTx$1 as TransferSubnetOwnershipTx,
1686
1810
  index_TransformSubnetTx as TransformSubnetTx,
1687
1811
  index_Tx as Tx,
1688
1812
  index_TxBase as TxBase,