@avalabs/core-wallets-sdk 3.1.0-alpha.9 → 3.1.0-canary.03cd702.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/index.d.ts +190 -29
  2. package/dist/index.js +1 -1
  3. package/esm/Avalanche/index.d.ts +2 -2
  4. package/esm/Avalanche/index.js +1 -1
  5. package/esm/Avalanche/models.d.ts +42 -3
  6. package/esm/Avalanche/models.js +1 -1
  7. package/esm/Avalanche/providers/AbstractProvider.d.ts +5 -6
  8. package/esm/Avalanche/providers/AbstractProvider.js +1 -1
  9. package/esm/Avalanche/providers/JsonRpcProvider.d.ts +4 -3
  10. package/esm/Avalanche/providers/JsonRpcProvider.js +1 -1
  11. package/esm/Avalanche/providers/constants.d.ts +20 -1
  12. package/esm/Avalanche/providers/constants.js +1 -1
  13. package/esm/Avalanche/utils/convertGlacierUtxo.d.ts +2 -2
  14. package/esm/Avalanche/utils/getChainAliasByChainId.js +1 -1
  15. package/esm/Avalanche/utils/getUtxosByTxFromGlacier.d.ts +3 -2
  16. package/esm/Avalanche/utils/getUtxosByTxFromGlacier.js +1 -1
  17. package/esm/Avalanche/utils/handleSubnetAuth.js +1 -1
  18. package/esm/Avalanche/utils/parseAvalancheTx.d.ts +7 -1
  19. package/esm/Avalanche/utils/parseAvalancheTx.js +1 -1
  20. package/esm/Avalanche/utils/parsers/index.js +1 -1
  21. package/esm/Avalanche/utils/parsers/parseConvertSubnetTx.js +1 -0
  22. package/esm/Avalanche/utils/parsers/parseDisableL1ValidatorTx.js +1 -0
  23. package/esm/Avalanche/utils/parsers/parseIncreaseL1ValidatorBalanceTx.js +1 -0
  24. package/esm/Avalanche/utils/parsers/parseRegisterL1ValidatorTx.js +1 -0
  25. package/esm/Avalanche/utils/parsers/parseSetL1ValidatorWeightTx.js +1 -0
  26. package/esm/Avalanche/utils/parsers/parseTransformSubnetTx.js +1 -1
  27. package/esm/Avalanche/utils/parsers/utils/chainIdToVm.js +1 -1
  28. package/esm/Avalanche/utils/txSizeLimits.d.ts +1 -1
  29. package/esm/Avalanche/utils/txSizeLimits.js +1 -1
  30. package/esm/Avalanche/wallets/AddressWallet.js +1 -1
  31. package/esm/Avalanche/wallets/SimpleSigner.js +1 -1
  32. package/esm/Avalanche/wallets/StaticSigner.js +1 -1
  33. package/esm/Avalanche/wallets/TxBuilderTypes.d.ts +80 -11
  34. package/esm/Avalanche/wallets/WalletAbstract.d.ts +8 -3
  35. package/esm/Avalanche/wallets/WalletAbstract.js +1 -1
  36. package/esm/Avalanche/wallets/WalletVoid.js +1 -1
  37. package/esm/Avalanche/wallets/ledger/LedgerSigner.js +1 -1
  38. package/esm/Avalanche/wallets/ledger/SimpleLedgerSigner.js +1 -1
  39. package/esm/utils/assertFeeStateProvided.js +1 -0
  40. package/package.json +5 -5
package/dist/index.d.ts CHANGED
@@ -8,13 +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, Info, avaxSerial, utils, UnsignedTx, EVMUnsignedTx, Utxo, TransferOutput, 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
- import { GetUpgradesInfoResponse } from '@avalabs/avalanchejs/dist/info/model';
14
13
  import { Bip32Path } from 'bip32-path';
15
14
  import AppZondax, { ResponseBase } from '@avalabs/hw-app-avalanche';
16
15
  import { BIP32Interface } from 'bip32';
17
- import { Utxo as Utxo$1, PChainUtxo } from '@avalabs/glacier-sdk';
16
+ import { GetUpgradesInfoResponse } from '@avalabs/avalanchejs/dist/info/model';
17
+ import * as _avalabs_avalanchejs_dist_vms_pvm from '@avalabs/avalanchejs/dist/vms/pvm';
18
+ import { Utxo as Utxo$1, PChainUtxo, Network as Network$2 } from '@avalabs/glacier-sdk';
18
19
  import * as _avalabs_avalanchejs_dist_serializable_common_types from '@avalabs/avalanchejs/dist/serializable/common/types';
19
20
  import { WalletAbstract as WalletAbstract$1 } from 'Avalanche/wallets';
20
21
 
@@ -565,7 +566,7 @@ type ChainIDAlias = 'X' | 'P' | 'C';
565
566
  /**
566
567
  * Types for parsed transaction
567
568
  */
568
- type Tx = AddValidatorTx | AddDelegatorTx | ExportTx | ImportTx | BaseTx$1 | CreateSubnetTx | CreateChainTx | AddSubnetValidatorTx | RemoveSubnetValidatorTx | AddPermissionlessValidatorTx | AddPermissionlessDelegatorTx | TransformSubnetTx | TransferSubnetOwnershipTx$1 | UnknownTx;
569
+ type Tx = AddValidatorTx | AddDelegatorTx | ExportTx | ImportTx | BaseTx$1 | CreateSubnetTx | CreateChainTx | AddSubnetValidatorTx | RemoveSubnetValidatorTx | AddPermissionlessValidatorTx | AddPermissionlessDelegatorTx | TransformSubnetTx | TransferSubnetOwnershipTx$1 | ConvertSubnetToL1Tx | RegisterL1ValidatorTx | SetL1ValidatorWeightTx | DisableL1ValidatorTx | IncreaseL1ValidatorBalanceTx | UnknownTx;
569
570
  interface FeeData {
570
571
  totalAvaxBurned: bigint;
571
572
  totalAvaxOutput: bigint;
@@ -585,6 +586,11 @@ declare enum TxType {
585
586
  Import = "import",
586
587
  CreateSubnet = "create_subnet",
587
588
  CreateChain = "create_chain",
589
+ ConvertSubnetToL1 = "convert_subnet_to_l1",
590
+ RegisterL1Validator = "register_l1_validator",
591
+ SetL1ValidatorWeight = "set_l1_validator_weight",
592
+ IncreaseL1ValidatorBalance = "increase_l1_validator_balance",
593
+ DisableL1Validator = "disable_l1_validator",
588
594
  AddSubnetValidator = "add_subnet_validator",
589
595
  RemoveSubnetValidator = "remove_subnet_validator",
590
596
  AddPermissionlessValidator = "add_permissionless_validator",
@@ -663,6 +669,35 @@ interface RemoveSubnetValidatorTx extends TxBase {
663
669
  nodeID: string;
664
670
  subnetID: string;
665
671
  }
672
+ interface ConvertSubnetToL1Tx extends TxBase {
673
+ type: TxType.ConvertSubnetToL1;
674
+ managerAddress: string;
675
+ validators: {
676
+ nodeId: string;
677
+ stake: bigint;
678
+ balance: bigint;
679
+ remainingBalanceOwners: string[];
680
+ deactivationOwners: string[];
681
+ }[];
682
+ subnetID: string;
683
+ chainID: string;
684
+ }
685
+ interface RegisterL1ValidatorTx extends TxBase {
686
+ type: TxType.RegisterL1Validator;
687
+ balance: bigint;
688
+ }
689
+ interface SetL1ValidatorWeightTx extends TxBase {
690
+ type: TxType.SetL1ValidatorWeight;
691
+ }
692
+ interface IncreaseL1ValidatorBalanceTx extends TxBase {
693
+ type: TxType.IncreaseL1ValidatorBalance;
694
+ balance: bigint;
695
+ validationId: string;
696
+ }
697
+ interface DisableL1ValidatorTx extends TxBase {
698
+ type: TxType.DisableL1Validator;
699
+ validationId: string;
700
+ }
666
701
  interface AddPermissionlessValidatorTx extends TxBase {
667
702
  type: TxType.AddPermissionlessValidator;
668
703
  nodeID: string;
@@ -701,7 +736,7 @@ interface TransformSubnetTx extends TxBase {
701
736
  minStakeDuration: number;
702
737
  maxStakeDuration: number;
703
738
  minDelegationFee: number;
704
- minDelegatorStake: number;
739
+ minDelegatorStake: bigint;
705
740
  maxValidatorWeightFactor: number;
706
741
  uptimeRequirement: number;
707
742
  }
@@ -722,6 +757,11 @@ declare function isAddDelegatorTx(tx: Tx): tx is AddDelegatorTx;
722
757
  declare function isExportTx(tx: Tx): tx is ExportTx;
723
758
  declare function isImportTx(tx: Tx): tx is ImportTx;
724
759
  declare function isBaseTx(tx: Tx): tx is BaseTx$1;
760
+ declare function isConvertSubnetToL1Tx(tx: Tx): tx is ConvertSubnetToL1Tx;
761
+ declare function isRegisterL1ValidatorTx(tx: Tx): tx is RegisterL1ValidatorTx;
762
+ declare function isSetL1ValidatorWeightTx(tx: Tx): tx is SetL1ValidatorWeightTx;
763
+ declare function isDisableL1ValidatorTx(tx: Tx): tx is DisableL1ValidatorTx;
764
+ declare function isIncreaseL1ValidatorBalance(tx: Tx): tx is IncreaseL1ValidatorBalanceTx;
725
765
  declare function isCreateSubnetTx(tx: Tx): tx is CreateSubnetTx;
726
766
  declare function isCreateChainTx(tx: Tx): tx is CreateChainTx;
727
767
  declare function isAddSubnetValidatorTx(tx: Tx): tx is AddSubnetValidatorTx;
@@ -734,23 +774,23 @@ declare function isTransferSubnetOwnershipTx(tx: Tx): tx is TransferSubnetOwners
734
774
  declare class AbstractProvider {
735
775
  protected baseUrl: string;
736
776
  protected context: Context.Context;
737
- protected upgradesInfo: GetUpgradesInfoResponse;
777
+ protected upgradesInfo?: info.GetUpgradesInfoResponse | undefined;
738
778
  evmRpc: JsonRpcProvider$1;
739
- constructor(baseUrl: string, context: Context.Context, upgradesInfo: GetUpgradesInfoResponse);
779
+ constructor(baseUrl: string, context: Context.Context, upgradesInfo?: info.GetUpgradesInfoResponse | undefined);
740
780
  /**
741
781
  * @link https://docs.ethers.io/v5/api/providers/provider/#Provider-getFeeData
742
782
  */
743
783
  getEvmFeeData(): Promise<ethers.FeeData>;
744
784
  getContext(): Context.Context;
745
785
  isEtnaEnabled(): boolean;
746
- getUpgradesInfo(): GetUpgradesInfoResponse;
786
+ getUpgradesInfo(): info.GetUpgradesInfoResponse | undefined;
747
787
  getChainID(chainAlias: ChainIDAlias): string;
748
788
  getNetworkID(): number;
749
789
  getHrp(): string;
750
790
  getApiX(): avm.AVMApi;
751
791
  getApiP(): pvm.PVMApi;
752
792
  getApiC(): evm.EVMApi;
753
- getInfo(): Info;
793
+ getInfo(): info.InfoApi;
754
794
  getApi(chain: ChainIDAlias): avm.AVMApi | pvm.PVMApi | evm.EVMApi;
755
795
  getAvaxID(): string;
756
796
  getAddress(publicKey: Buffer, chain: ChainIDAlias): string;
@@ -771,10 +811,11 @@ declare class AbstractProvider {
771
811
  }
772
812
 
773
813
  declare class JsonRpcProvider extends AbstractProvider {
774
- constructor(baseUrl: string, context: Context.Context, upgradesInfo: GetUpgradesInfoResponse);
814
+ constructor(baseUrl: string, context: Context.Context, upgradesInfo?: GetUpgradesInfoResponse);
775
815
  static fromBaseURL(url: string): Promise<JsonRpcProvider>;
776
- static getDefaultMainnetProvider(upgradesInfo: GetUpgradesInfoResponse): JsonRpcProvider;
777
- static getDefaultFujiProvider(upgradesInfo: GetUpgradesInfoResponse): JsonRpcProvider;
816
+ static getDefaultMainnetProvider(upgradesInfo?: GetUpgradesInfoResponse): JsonRpcProvider;
817
+ static getDefaultFujiProvider(upgradesInfo?: GetUpgradesInfoResponse): JsonRpcProvider;
818
+ static getDefaultDevnetProvider(upgradesInfo?: GetUpgradesInfoResponse): JsonRpcProvider;
778
819
  }
779
820
 
780
821
  /**
@@ -785,13 +826,31 @@ declare const MainnetContext: Context.Context;
785
826
  * Avalanche Fuji testnet context
786
827
  */
787
828
  declare const FujiContext: Context.Context;
829
+ declare const DevnetContext: {
830
+ addPrimaryNetworkDelegatorFee: bigint;
831
+ addPrimaryNetworkValidatorFee: bigint;
832
+ addSubnetDelegatorFee: bigint;
833
+ addSubnetValidatorFee: bigint;
834
+ avaxAssetID: string;
835
+ baseTxFee: bigint;
836
+ cBlockchainID: string;
837
+ createAssetTxFee: bigint;
838
+ createBlockchainTxFee: bigint;
839
+ createSubnetTxFee: bigint;
840
+ hrp: string;
841
+ networkID: number;
842
+ pBlockchainID: string;
843
+ transformSubnetTxFee: bigint;
844
+ xBlockchainID: string;
845
+ platformFeeConfig: _avalabs_avalanchejs_dist_vms_pvm.FeeConfig;
846
+ };
788
847
 
789
848
  type BaseTx = {
790
849
  utxoSet: utils.UtxoSet;
791
850
  chain: 'X' | 'P';
792
851
  toAddress: string;
793
852
  amountsPerAsset: Record<string, bigint>;
794
- feeState: pvm.FeeState;
853
+ feeState?: pvm.FeeState;
795
854
  options?: Common.SpendOptions;
796
855
  fromAddresses?: string[];
797
856
  };
@@ -800,27 +859,96 @@ type ImportP = {
800
859
  sourceChain: 'X' | 'C';
801
860
  toAddress?: string;
802
861
  threshold?: number;
803
- feeState: pvm.FeeState;
862
+ feeState?: pvm.FeeState;
804
863
  locktime?: bigint;
805
864
  };
806
865
  type ExportP = {
807
866
  amount: bigint;
808
867
  utxoSet: utils.UtxoSet;
809
868
  destination: 'X' | 'C';
810
- feeState: pvm.FeeState;
869
+ feeState?: pvm.FeeState;
811
870
  toAddress?: string;
812
871
  };
813
872
  type ConsolidateP = {
814
873
  utxoSet: utils.UtxoSet;
815
874
  amount: bigint;
816
- feeState: pvm.FeeState;
875
+ feeState?: pvm.FeeState;
817
876
  toAddress?: string;
818
877
  options?: Common.SpendOptions;
819
878
  };
879
+ type CreateChain = {
880
+ utxoSet: utils.UtxoSet;
881
+ subnetId: string;
882
+ chainName: string;
883
+ vmID: string;
884
+ fxIds: string[];
885
+ genesisData: Record<string, unknown>;
886
+ subnetAuth: number[];
887
+ feeState?: pvm.FeeState;
888
+ options?: Common.SpendOptions;
889
+ fromAddresses?: string[];
890
+ };
891
+ type ConvertSubnetToL1 = {
892
+ utxoSet: utils.UtxoSet;
893
+ address: string;
894
+ chainId: string;
895
+ subnetId: string;
896
+ subnetAuth: number[];
897
+ options?: Common.SpendOptions;
898
+ feeState: pvm.FeeState;
899
+ fromAddresses?: string[];
900
+ validators: {
901
+ nodeId: string;
902
+ weight: bigint;
903
+ balance: bigint;
904
+ pubKey: string;
905
+ signature: string;
906
+ remainingBalanceOwner: {
907
+ addresses: string[];
908
+ threshold?: number;
909
+ };
910
+ deactivationOwner: {
911
+ addresses: string[];
912
+ threshold?: number;
913
+ };
914
+ }[];
915
+ };
916
+ type RegisterL1Validator = {
917
+ utxoSet: utils.UtxoSet;
918
+ balance: bigint;
919
+ signature: string;
920
+ feeState: pvm.FeeState;
921
+ message: string;
922
+ options?: Common.SpendOptions;
923
+ fromAddresses?: string[];
924
+ };
925
+ type SetL1ValidatorWeight = {
926
+ utxoSet: utils.UtxoSet;
927
+ feeState: pvm.FeeState;
928
+ message: string;
929
+ options?: Common.SpendOptions;
930
+ fromAddresses?: string[];
931
+ };
932
+ type DisableL1Validator = {
933
+ utxoSet: utils.UtxoSet;
934
+ feeState: pvm.FeeState;
935
+ disableAuth: number[];
936
+ validationId: string;
937
+ options?: Common.SpendOptions;
938
+ fromAddresses?: string[];
939
+ };
940
+ type IncreaseL1ValidatorBalance = {
941
+ utxoSet: utils.UtxoSet;
942
+ feeState: pvm.FeeState;
943
+ balance: bigint;
944
+ validationId: string;
945
+ options?: Common.SpendOptions;
946
+ fromAddresses?: string[];
947
+ };
820
948
  type CreateSubnet = {
821
949
  utxoSet: utils.UtxoSet;
822
950
  rewardAddresses: string[];
823
- feeState: pvm.FeeState;
951
+ feeState?: pvm.FeeState;
824
952
  fromAddresses?: string[];
825
953
  options?: Common.SpendOptions;
826
954
  threshold?: number;
@@ -834,7 +962,7 @@ type AddSubnetValidator = {
834
962
  weight: bigint;
835
963
  subnetId: string;
836
964
  subnetAuth: number[];
837
- feeState: pvm.FeeState;
965
+ feeState?: pvm.FeeState;
838
966
  fromAddresses?: string[];
839
967
  options?: Common.SpendOptions;
840
968
  };
@@ -855,7 +983,7 @@ type AddPermissionlessValidator = {
855
983
  stakingAssetId?: string;
856
984
  locktime?: bigint;
857
985
  threshold?: number;
858
- feeState: pvm.FeeState;
986
+ feeState?: pvm.FeeState;
859
987
  };
860
988
  type AddPermissionlessDelegator = {
861
989
  utxoSet: utils.UtxoSet;
@@ -868,7 +996,7 @@ type AddPermissionlessDelegator = {
868
996
  rewardAddresses?: string[];
869
997
  options?: Common.SpendOptions;
870
998
  locktime?: bigint;
871
- feeState: pvm.FeeState;
999
+ feeState?: pvm.FeeState;
872
1000
  stakingAssetId?: string;
873
1001
  threshold?: number;
874
1002
  };
@@ -877,7 +1005,7 @@ type RemoveSubnetValidator = {
877
1005
  nodeId: string;
878
1006
  subnetId: string;
879
1007
  subnetAuth: number[];
880
- feeState: pvm.FeeState;
1008
+ feeState?: pvm.FeeState;
881
1009
  fromAddresses?: string[];
882
1010
  options?: Common.SpendOptions;
883
1011
  };
@@ -886,7 +1014,7 @@ type TransferSubnetOwnershipTx = {
886
1014
  subnetId: string;
887
1015
  subnetAuth: number[];
888
1016
  subnetOwners: string[];
889
- feeState: pvm.FeeState;
1017
+ feeState?: pvm.FeeState;
890
1018
  fromAddresses?: string[];
891
1019
  options?: Common.SpendOptions;
892
1020
  threshold?: number;
@@ -979,7 +1107,12 @@ declare abstract class WalletAbstract {
979
1107
  }): Common.UnsignedTx;
980
1108
  consolidateP({ utxoSet, amount, feeState, toAddress, options, }: ConsolidateP): Common.UnsignedTx;
981
1109
  baseTX({ utxoSet, chain, toAddress, amountsPerAsset, feeState, options, fromAddresses, }: BaseTx): Common.UnsignedTx;
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;
1110
+ convertSubnetToL1({ utxoSet, chainId, subnetId, subnetAuth, feeState, address, validators, options, fromAddresses, }: ConvertSubnetToL1): Common.UnsignedTx;
1111
+ registerL1Validator({ utxoSet, balance, signature, message, feeState, fromAddresses, options, }: RegisterL1Validator): Common.UnsignedTx;
1112
+ setL1ValidatorWeight({ utxoSet, feeState, message, options, fromAddresses, }: SetL1ValidatorWeight): Common.UnsignedTx;
1113
+ disableL1Validator({ utxoSet, feeState, options, fromAddresses, disableAuth, validationId, }: DisableL1Validator): Common.UnsignedTx;
1114
+ increaseL1ValidatorBalance({ utxoSet, feeState, options, fromAddresses, balance, validationId, }: IncreaseL1ValidatorBalance): Common.UnsignedTx;
1115
+ createBlockchain({ utxoSet, subnetId, chainName, vmID, fxIds, genesisData, subnetAuth, feeState, options, fromAddresses, }: CreateChain): Common.UnsignedTx;
983
1116
  createSubnet({ utxoSet, rewardAddresses, feeState, fromAddresses, options, threshold, locktime, }: CreateSubnet): Common.UnsignedTx;
984
1117
  addSubnetValidator({ utxoSet, nodeId, start, end, weight, subnetId, subnetAuth, feeState, fromAddresses, options, }: AddSubnetValidator): Common.UnsignedTx;
985
1118
  /**
@@ -1014,7 +1147,7 @@ declare abstract class WalletAbstract {
1014
1147
  addPermissionlessDelegator({ utxoSet, nodeId, start, end, weight, subnetId, fromAddresses, rewardAddresses, options, locktime, feeState, threshold, stakingAssetId, }: AddPermissionlessDelegator): Common.UnsignedTx;
1015
1148
  removeSubnetValidator({ utxoSet, nodeId, subnetId, subnetAuth, fromAddresses, feeState, options, }: RemoveSubnetValidator): Common.UnsignedTx;
1016
1149
  transferSubnetOwnershipTx({ utxoSet, subnetId, subnetAuth, subnetOwners, feeState, fromAddresses, options, threshold, locktime, }: TransferSubnetOwnershipTx): Common.UnsignedTx;
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;
1150
+ 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: bigint, maxValidatorWeightFactor: number, uptimeRequirement: number, subnetAuth: number[], fromAddresses?: string[], options?: Common.SpendOptions): Common.UnsignedTx;
1018
1151
  protected constructor(provider: AbstractProvider);
1019
1152
  }
1020
1153
 
@@ -1465,7 +1598,7 @@ declare const addSignaturesToAvalancheTx: ({ transactionHex, signatures, chainAl
1465
1598
  }>;
1466
1599
 
1467
1600
  type GlacierOutput = Utxo$1 | PChainUtxo;
1468
- declare const convertGlacierUtxo: (glacierUtxo: GlacierOutput, isTestnet: boolean) => Utxo<TransferOutput | pvmSerial.StakeableLockOut<TransferOutput>>;
1601
+ declare const convertGlacierUtxo: (glacierUtxo: GlacierOutput, network: Network$2) => Utxo<TransferOutput | pvmSerial.StakeableLockOut<TransferOutput>>;
1469
1602
 
1470
1603
  type Params$2 = {
1471
1604
  txBytes: Uint8Array;
@@ -1582,12 +1715,12 @@ declare const getUtxoInfo: (utxo: Utxo) => UtxoInfo;
1582
1715
  type Params = {
1583
1716
  transactionHex: string;
1584
1717
  chainAlias: ChainIDAlias;
1585
- isTestnet: boolean;
1718
+ network: Network$2;
1586
1719
  url: string;
1587
1720
  token?: string;
1588
1721
  headers?: Record<string, string>;
1589
1722
  };
1590
- declare const getUtxosByTxFromGlacier: ({ transactionHex, chainAlias, isTestnet, url, token, headers, }: Params) => Promise<Utxo<_avalabs_avalanchejs_dist_serializable_common_types.Serializable>[]>;
1723
+ declare const getUtxosByTxFromGlacier: ({ transactionHex, chainAlias, network, url, token, headers, }: Params) => Promise<Utxo<_avalabs_avalanchejs_dist_serializable_common_types.Serializable>[]>;
1591
1724
 
1592
1725
  declare const getVmByChainAlias: (chainAlias: string) => "EVM" | "AVM" | "PVM";
1593
1726
 
@@ -1604,10 +1737,16 @@ declare function getXpubFromMnemonic(mnemonic: string): string;
1604
1737
  */
1605
1738
  declare function isBech32Address(address: string, hasChainId?: boolean): boolean;
1606
1739
 
1740
+ type ParseOptions = {
1741
+ /**
1742
+ * Tolerance percentage range where the burned amount is considered valid.
1743
+ */
1744
+ feeTolerance?: number;
1745
+ };
1607
1746
  /**
1608
1747
  * Returns human readable data from a given a transaction buffer,
1609
1748
  */
1610
- declare function parseAvalancheTx(unsignedTx: Common.UnsignedTx, provider: JsonRpcProvider, currentAddress: string): Promise<Tx>;
1749
+ declare function parseAvalancheTx(unsignedTx: Common.UnsignedTx, provider: JsonRpcProvider, currentAddress: string, { feeTolerance }?: ParseOptions): Promise<Tx>;
1611
1750
 
1612
1751
  declare const emptySignature: Signature;
1613
1752
  declare const populateCredential: (indices: number[], existingCredentialData?: {
@@ -1660,7 +1799,7 @@ declare function getMaximumUtxoSet({ wallet, utxos, sizeSupportedTx, limit, feeS
1660
1799
  utxos: Utxo[];
1661
1800
  sizeSupportedTx: SizeSupportedTx;
1662
1801
  limit?: number;
1663
- feeState: pvm.FeeState;
1802
+ feeState?: pvm.FeeState;
1664
1803
  }): Utxo[];
1665
1804
 
1666
1805
  /**
@@ -1679,8 +1818,11 @@ type index_AddValidatorTx = AddValidatorTx;
1679
1818
  type index_AddressWallet = AddressWallet;
1680
1819
  declare const index_AddressWallet: typeof AddressWallet;
1681
1820
  type index_ChainIDAlias = ChainIDAlias;
1821
+ type index_ConvertSubnetToL1Tx = ConvertSubnetToL1Tx;
1682
1822
  type index_CreateChainTx = CreateChainTx;
1683
1823
  type index_CreateSubnetTx = CreateSubnetTx;
1824
+ declare const index_DevnetContext: typeof DevnetContext;
1825
+ type index_DisableL1ValidatorTx = DisableL1ValidatorTx;
1684
1826
  type index_ExportTx = ExportTx;
1685
1827
  type index_FeeData = FeeData;
1686
1828
  declare const index_FujiContext: typeof FujiContext;
@@ -1688,6 +1830,7 @@ type index_GetAvaxBalanceDict = GetAvaxBalanceDict;
1688
1830
  type index_GetStakedAvaxBalanceDict = GetStakedAvaxBalanceDict;
1689
1831
  type index_GlacierOutput = GlacierOutput;
1690
1832
  type index_ImportTx = ImportTx;
1833
+ type index_IncreaseL1ValidatorBalanceTx = IncreaseL1ValidatorBalanceTx;
1691
1834
  type index_JsonRpcProvider = JsonRpcProvider;
1692
1835
  declare const index_JsonRpcProvider: typeof JsonRpcProvider;
1693
1836
  type index_LedgerGetXpubResponse = LedgerGetXpubResponse;
@@ -1701,7 +1844,9 @@ declare const index_MnemonicWallet: typeof MnemonicWallet;
1701
1844
  type index_MnemonicWalletVoid = MnemonicWalletVoid;
1702
1845
  declare const index_MnemonicWalletVoid: typeof MnemonicWalletVoid;
1703
1846
  declare const index_P_CHAIN_TX_SIZE_LIMIT: typeof P_CHAIN_TX_SIZE_LIMIT;
1847
+ type index_RegisterL1ValidatorTx = RegisterL1ValidatorTx;
1704
1848
  type index_RemoveSubnetValidatorTx = RemoveSubnetValidatorTx;
1849
+ type index_SetL1ValidatorWeightTx = SetL1ValidatorWeightTx;
1705
1850
  type index_SignMessageRequest = SignMessageRequest;
1706
1851
  type index_SignTxBufferRequest = SignTxBufferRequest;
1707
1852
  type index_SignTxRequest = SignTxRequest;
@@ -1753,12 +1898,17 @@ declare const index_isAddSubnetValidatorTx: typeof isAddSubnetValidatorTx;
1753
1898
  declare const index_isAddValidatorTx: typeof isAddValidatorTx;
1754
1899
  declare const index_isBaseTx: typeof isBaseTx;
1755
1900
  declare const index_isBech32Address: typeof isBech32Address;
1901
+ declare const index_isConvertSubnetToL1Tx: typeof isConvertSubnetToL1Tx;
1756
1902
  declare const index_isCreateChainTx: typeof isCreateChainTx;
1757
1903
  declare const index_isCreateSubnetTx: typeof isCreateSubnetTx;
1904
+ declare const index_isDisableL1ValidatorTx: typeof isDisableL1ValidatorTx;
1758
1905
  declare const index_isExportTx: typeof isExportTx;
1759
1906
  declare const index_isImportTx: typeof isImportTx;
1907
+ declare const index_isIncreaseL1ValidatorBalance: typeof isIncreaseL1ValidatorBalance;
1760
1908
  declare const index_isObsidianApp: typeof isObsidianApp;
1909
+ declare const index_isRegisterL1ValidatorTx: typeof isRegisterL1ValidatorTx;
1761
1910
  declare const index_isRemoveSubnetValidatorTx: typeof isRemoveSubnetValidatorTx;
1911
+ declare const index_isSetL1ValidatorWeightTx: typeof isSetL1ValidatorWeightTx;
1762
1912
  declare const index_isTransferSubnetOwnershipTx: typeof isTransferSubnetOwnershipTx;
1763
1913
  declare const index_isTransformSubnetTx: typeof isTransformSubnetTx;
1764
1914
  declare const index_parseAvalancheTx: typeof parseAvalancheTx;
@@ -1780,8 +1930,11 @@ declare namespace index {
1780
1930
  index_AddressWallet as AddressWallet,
1781
1931
  BaseTx$1 as BaseTx,
1782
1932
  index_ChainIDAlias as ChainIDAlias,
1933
+ index_ConvertSubnetToL1Tx as ConvertSubnetToL1Tx,
1783
1934
  index_CreateChainTx as CreateChainTx,
1784
1935
  index_CreateSubnetTx as CreateSubnetTx,
1936
+ index_DevnetContext as DevnetContext,
1937
+ index_DisableL1ValidatorTx as DisableL1ValidatorTx,
1785
1938
  index_ExportTx as ExportTx,
1786
1939
  index_FeeData as FeeData,
1787
1940
  index_FujiContext as FujiContext,
@@ -1789,6 +1942,7 @@ declare namespace index {
1789
1942
  index_GetStakedAvaxBalanceDict as GetStakedAvaxBalanceDict,
1790
1943
  index_GlacierOutput as GlacierOutput,
1791
1944
  index_ImportTx as ImportTx,
1945
+ index_IncreaseL1ValidatorBalanceTx as IncreaseL1ValidatorBalanceTx,
1792
1946
  index_JsonRpcProvider as JsonRpcProvider,
1793
1947
  index_LedgerGetXpubResponse as LedgerGetXpubResponse,
1794
1948
  index_LedgerSigner as LedgerSigner,
@@ -1797,7 +1951,9 @@ declare namespace index {
1797
1951
  index_MnemonicWallet as MnemonicWallet,
1798
1952
  index_MnemonicWalletVoid as MnemonicWalletVoid,
1799
1953
  index_P_CHAIN_TX_SIZE_LIMIT as P_CHAIN_TX_SIZE_LIMIT,
1954
+ index_RegisterL1ValidatorTx as RegisterL1ValidatorTx,
1800
1955
  index_RemoveSubnetValidatorTx as RemoveSubnetValidatorTx,
1956
+ index_SetL1ValidatorWeightTx as SetL1ValidatorWeightTx,
1801
1957
  index_SignMessageRequest as SignMessageRequest,
1802
1958
  index_SignTxBufferRequest as SignTxBufferRequest,
1803
1959
  index_SignTxRequest as SignTxRequest,
@@ -1843,12 +1999,17 @@ declare namespace index {
1843
1999
  index_isAddValidatorTx as isAddValidatorTx,
1844
2000
  index_isBaseTx as isBaseTx,
1845
2001
  index_isBech32Address as isBech32Address,
2002
+ index_isConvertSubnetToL1Tx as isConvertSubnetToL1Tx,
1846
2003
  index_isCreateChainTx as isCreateChainTx,
1847
2004
  index_isCreateSubnetTx as isCreateSubnetTx,
2005
+ index_isDisableL1ValidatorTx as isDisableL1ValidatorTx,
1848
2006
  index_isExportTx as isExportTx,
1849
2007
  index_isImportTx as isImportTx,
2008
+ index_isIncreaseL1ValidatorBalance as isIncreaseL1ValidatorBalance,
1850
2009
  index_isObsidianApp as isObsidianApp,
2010
+ index_isRegisterL1ValidatorTx as isRegisterL1ValidatorTx,
1851
2011
  index_isRemoveSubnetValidatorTx as isRemoveSubnetValidatorTx,
2012
+ index_isSetL1ValidatorWeightTx as isSetL1ValidatorWeightTx,
1852
2013
  index_isTransferSubnetOwnershipTx as isTransferSubnetOwnershipTx,
1853
2014
  index_isTransformSubnetTx as isTransformSubnetTx,
1854
2015
  index_parseAvalancheTx as parseAvalancheTx,