@avalabs/core-wallets-sdk 3.1.0-alpha.5 → 3.1.0-alpha.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +371 -157
- package/esm/Avalanche/index.d.ts +2 -3
- package/esm/Avalanche/index.js +1 -1
- package/esm/Avalanche/models.d.ts +46 -6
- package/esm/Avalanche/models.js +1 -1
- package/esm/Avalanche/providers/AbstractProvider.d.ts +2 -1
- package/esm/Avalanche/providers/AbstractProvider.js +1 -1
- package/esm/Avalanche/providers/JsonRpcProvider.d.ts +1 -0
- package/esm/Avalanche/providers/JsonRpcProvider.js +1 -1
- package/esm/Avalanche/providers/constants.d.ts +2 -1
- package/esm/Avalanche/providers/constants.js +1 -1
- package/esm/Avalanche/providers/platformFeeConfig.js +1 -0
- package/esm/Avalanche/utils/addSignaturesToAvalancheTx.js +1 -1
- package/esm/Avalanche/utils/appendDisableAuthAddressMaps.js +1 -0
- package/esm/Avalanche/utils/convertGlacierUtxo.d.ts +5 -4
- package/esm/Avalanche/utils/convertGlacierUtxo.js +1 -1
- package/esm/Avalanche/utils/createAvalancheEvmUnsignedTx.d.ts +1 -1
- package/esm/Avalanche/utils/createAvalancheEvmUnsignedTx.js +1 -1
- package/esm/Avalanche/utils/createAvalancheUnsignedTx.d.ts +1 -1
- package/esm/Avalanche/utils/createAvalancheUnsignedTx.js +1 -1
- package/esm/Avalanche/utils/getAssetBalance.d.ts +2 -1
- package/esm/Avalanche/utils/getAssetBalance.js +1 -1
- package/esm/Avalanche/utils/getChainAliasByChainId.js +1 -1
- package/esm/Avalanche/utils/getPchainUnixNow.js +1 -1
- package/esm/Avalanche/utils/getStakedAssetBalance.d.ts +2 -1
- package/esm/Avalanche/utils/getTxOutputAddresses.js +1 -1
- package/esm/Avalanche/utils/getUtxosByTxFromGlacier.d.ts +5 -2
- package/esm/Avalanche/utils/getUtxosByTxFromGlacier.js +1 -1
- package/esm/Avalanche/utils/handleSubnetAuth.js +1 -1
- package/esm/Avalanche/utils/orderBy.js +1 -0
- package/esm/Avalanche/utils/parseAvalancheTx.d.ts +7 -1
- package/esm/Avalanche/utils/parseAvalancheTx.js +1 -1
- package/esm/Avalanche/utils/parsers/index.js +1 -1
- package/esm/Avalanche/utils/parsers/parseAddPermissionlessDelegatorTx.js +1 -1
- package/esm/Avalanche/utils/parsers/parseAddPermissionlessValidatorTx.js +1 -1
- package/esm/Avalanche/utils/parsers/parseAddSubnetValidorTx.js +1 -1
- package/esm/Avalanche/utils/parsers/parseBaseTx.js +1 -1
- package/esm/Avalanche/utils/parsers/parseConvertSubnetToL1Tx.js +1 -0
- package/esm/Avalanche/utils/parsers/parseCreateChainTx.js +1 -1
- package/esm/Avalanche/utils/parsers/parseCreateSubnetTx.js +1 -1
- package/esm/Avalanche/utils/parsers/parseDisableL1ValidatorTx.js +1 -0
- package/esm/Avalanche/utils/parsers/parseExportTx.js +1 -1
- package/esm/Avalanche/utils/parsers/parseImportTx.js +1 -1
- package/esm/Avalanche/utils/parsers/parseIncreaseL1ValidatorBalanceTx.js +1 -0
- package/esm/Avalanche/utils/parsers/parseRegisterL1ValidatorTx.js +1 -0
- package/esm/Avalanche/utils/parsers/parseRemoveSubnetValidatorTx.js +1 -1
- package/esm/Avalanche/utils/parsers/parseSetL1ValidatorWeightTx.js +1 -0
- package/esm/Avalanche/utils/parsers/parseTransferSubnetOwnershipTx.js +1 -1
- package/esm/Avalanche/utils/parsers/utils/chainIdToVm.js +1 -1
- package/esm/Avalanche/utils/populateCredential.js +1 -1
- package/esm/Avalanche/utils/sortUTXOs.d.ts +6 -4
- package/esm/Avalanche/utils/sortUTXOs.js +1 -1
- package/esm/Avalanche/utils/txSizeLimits.d.ts +10 -3
- package/esm/Avalanche/utils/txSizeLimits.js +1 -1
- package/esm/Avalanche/wallets/AddressWallet.js +1 -1
- package/esm/Avalanche/wallets/SimpleSigner.js +1 -1
- package/esm/Avalanche/wallets/StaticSigner.js +1 -1
- package/esm/Avalanche/wallets/TxBuilderTypes.d.ts +179 -0
- package/esm/Avalanche/wallets/WalletAbstract.d.ts +21 -22
- package/esm/Avalanche/wallets/WalletAbstract.js +1 -1
- package/esm/Avalanche/wallets/WalletVoid.js +1 -1
- package/esm/Avalanche/wallets/ledger/LedgerSigner.js +1 -1
- package/esm/Avalanche/wallets/ledger/SimpleLedgerSigner.js +1 -1
- package/esm/Avalanche/wallets/ledger/models.d.ts +1 -1
- package/esm/Avalanche/wallets/legacy/LedgerWallet.js +1 -1
- package/esm/Avalanche/wallets/legacy/MnemonicWallet.js +1 -1
- package/esm/Avalanche/wallets/legacy/MnemonicWalletVoid.js +1 -1
- package/esm/Avalanche/wallets/models.d.ts +1 -1
- package/esm/BitcoinVM/index.d.ts +5 -0
- package/esm/BitcoinVM/index.js +1 -0
- package/esm/BitcoinVM/models.d.ts +1 -1
- package/esm/BitcoinVM/providers/BitcoinProvider.d.ts +4 -3
- package/esm/BitcoinVM/providers/BitcoinProvider.js +1 -1
- package/esm/BitcoinVM/providers/BitcoinProviderAbstract.d.ts +1 -0
- package/esm/BitcoinVM/utils/getBech32AddressFromXPub.js +1 -1
- package/esm/BitcoinVM/wallets/BitcoinWallet.js +1 -1
- package/esm/BitcoinVM/wallets/BitcoinWalletLedger.js +1 -1
- package/esm/BitcoinVM/wallets/models.d.ts +1 -1
- package/esm/EVM/LedgerSigner.js +1 -1
- package/esm/EVM/utils/blockPolling.js +1 -1
- package/esm/EVM/utils/getWalletFromMnemonic.js +1 -1
- package/esm/SolanaVM/utils/compileSolanaTx.d.ts +9 -0
- package/esm/SolanaVM/utils/compileSolanaTx.js +1 -0
- package/esm/SolanaVM/utils/derivationPath.d.ts +3 -0
- package/esm/SolanaVM/utils/derivationPath.js +1 -0
- package/esm/SolanaVM/utils/deserializeSolanaTx.d.ts +6 -0
- package/esm/SolanaVM/utils/deserializeSolanaTx.js +1 -0
- package/esm/SolanaVM/utils/getSolanaPublicKeyFromLedger.d.ts +5 -0
- package/esm/SolanaVM/utils/getSolanaPublicKeyFromLedger.js +1 -0
- package/esm/SolanaVM/utils/serializeSolanaTx.d.ts +6 -0
- package/esm/SolanaVM/utils/serializeSolanaTx.js +1 -0
- package/esm/SolanaVM/utils/solanaProvider.d.ts +11 -0
- package/esm/SolanaVM/utils/solanaProvider.js +1 -0
- package/esm/SolanaVM/utils/transferSol.d.ts +14 -0
- package/esm/SolanaVM/utils/transferSol.js +1 -0
- package/esm/SolanaVM/utils/transferToken.d.ts +17 -0
- package/esm/SolanaVM/utils/transferToken.js +1 -0
- package/esm/SolanaVM/wallets/SolanaLedgerSigner.d.ts +10 -0
- package/esm/SolanaVM/wallets/SolanaLedgerSigner.js +1 -0
- package/esm/SolanaVM/wallets/SolanaSigner.d.ts +20 -0
- package/esm/SolanaVM/wallets/SolanaSigner.js +1 -0
- package/esm/abis/erc20.abi.js +1 -0
- package/esm/index.d.ts +30 -20
- package/esm/index.js +1 -1
- package/esm/utils/assertFeeStateProvided.js +1 -0
- package/esm/utils/getAddressDerivationPath.d.ts +4 -1
- package/esm/utils/getAddressDerivationPath.js +1 -1
- package/package.json +26 -9
- package/dist/index.js +0 -1
- package/esm/Avalanche/utils/getUtxoInfo.d.ts +0 -13
- package/esm/Avalanche/utils/getUtxoInfo.js +0 -1
- package/esm/Avalanche/utils/parsers/parseAddDelegatorTx.js +0 -1
- package/esm/Avalanche/utils/parsers/parseAddValidatorTx.js +0 -1
- package/esm/Avalanche/utils/parsers/parseTransformSubnetTx.js +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { Transaction } from '@ledgerhq/hw-app-btc/lib/types';
|
|
2
1
|
import * as bitcoinjs_lib from 'bitcoinjs-lib';
|
|
3
|
-
import { Network, Psbt, ECPairInterface, Transaction as Transaction$1 } from 'bitcoinjs-lib';
|
|
4
|
-
|
|
5
|
-
import
|
|
2
|
+
import { Network, Psbt, ECPairInterface, Transaction as Transaction$1, networks } from 'bitcoinjs-lib';
|
|
3
|
+
import Eth from '@ledgerhq/hw-app-eth';
|
|
4
|
+
import Transport from '@ledgerhq/hw-transport';
|
|
6
5
|
import * as ethers from 'ethers';
|
|
7
6
|
import { Provider, VoidSigner, HDNodeWallet, TransactionResponse, JsonRpcProvider as JsonRpcProvider$1, FetchRequest, Network as Network$1, Contract, AbstractSigner, BytesLike, TransactionRequest, TypedDataDomain, TypedDataField } from 'ethers';
|
|
8
|
-
import Transport from '@ledgerhq/hw-transport';
|
|
9
|
-
import Eth from '@ledgerhq/hw-app-eth';
|
|
10
7
|
import * as _avalabs_avalanchejs from '@avalabs/avalanchejs';
|
|
11
|
-
import { VM,
|
|
8
|
+
import { VM, OutputOwners, TransferableOutput, Common, pvmSerial, Context, avm, pvm, evm, info, avaxSerial, utils, UnsignedTx, EVMUnsignedTx, Utxo, TransferOutput, Credential, Signature } from '@avalabs/avalanchejs';
|
|
12
9
|
import * as _avalabs_avalanchejs_dist_vms_common from '@avalabs/avalanchejs/dist/vms/common';
|
|
13
10
|
import { Bip32Path } from 'bip32-path';
|
|
14
11
|
import AppZondax, { ResponseBase } from '@avalabs/hw-app-avalanche';
|
|
15
12
|
import { BIP32Interface } from 'bip32';
|
|
16
|
-
import { Utxo as Utxo$1, PChainUtxo } from '@avalabs/glacier-sdk';
|
|
17
|
-
import
|
|
13
|
+
import { Utxo as Utxo$1, PChainUtxo, Network as Network$2 } from '@avalabs/glacier-sdk';
|
|
14
|
+
import * as _avalabs_avalanchejs_dist_serializable_common_types from '@avalabs/avalanchejs/dist/serializable/common/types';
|
|
15
|
+
import * as _solana_kit from '@solana/kit';
|
|
16
|
+
import { CompilableTransactionMessage, Transaction as Transaction$2, IInstruction } from '@solana/kit';
|
|
17
|
+
import { Transaction } from '@ledgerhq/hw-app-btc/lib/types';
|
|
18
|
+
import { WalletPolicy, PsbtV2 } from 'ledger-bitcoin';
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
21
|
* Custom Bitcoin UTXO interface.
|
|
@@ -147,6 +148,7 @@ declare abstract class BitcoinProviderAbstract {
|
|
|
147
148
|
medium: number;
|
|
148
149
|
low: number;
|
|
149
150
|
}>;
|
|
151
|
+
abstract getAddressFromScript(script: string): Promise<string>;
|
|
150
152
|
}
|
|
151
153
|
|
|
152
154
|
declare class BitcoinProvider extends BitcoinProviderAbstract {
|
|
@@ -155,11 +157,12 @@ declare class BitcoinProvider extends BitcoinProviderAbstract {
|
|
|
155
157
|
private readonly extraParams?;
|
|
156
158
|
constructor(isMainnet?: boolean, apiKey?: string, explorerUrl?: string, nodeUrl?: string, extraParams?: Record<string, string> | undefined);
|
|
157
159
|
getTxHex(txHash: string): Promise<string>;
|
|
158
|
-
getUTXOs(address: string, withScripts?: boolean): Promise<{
|
|
160
|
+
getUTXOs(address: string, withScripts?: boolean, skipBatch?: boolean): Promise<{
|
|
159
161
|
confirmed: BitcoinInputUTXOWithOptionalScript[];
|
|
160
162
|
unconfirmed: BitcoinInputUTXOWithOptionalScript[];
|
|
161
163
|
}>;
|
|
162
|
-
|
|
164
|
+
getAddressFromScript(script: string): Promise<string>;
|
|
165
|
+
getScriptsForUtxos(utxos: BitcoinInputUTXOWithOptionalScript[], skipBatch?: boolean): Promise<BitcoinInputUTXO[]>;
|
|
163
166
|
private _parseUtxo;
|
|
164
167
|
getBalances(address: string): Promise<{
|
|
165
168
|
available: bigint;
|
|
@@ -167,7 +170,7 @@ declare class BitcoinProvider extends BitcoinProviderAbstract {
|
|
|
167
170
|
final: bigint;
|
|
168
171
|
}>;
|
|
169
172
|
getChainHeight(): Promise<number>;
|
|
170
|
-
getFeeRates(): Promise<{
|
|
173
|
+
getFeeRates(skipBatch?: boolean): Promise<{
|
|
171
174
|
low: number;
|
|
172
175
|
medium: number;
|
|
173
176
|
high: number;
|
|
@@ -557,11 +560,13 @@ declare class BitcoinWalletVoid extends BitcoinWalletAbstract {
|
|
|
557
560
|
signTx(tx: any): any;
|
|
558
561
|
}
|
|
559
562
|
|
|
563
|
+
declare const BtcNetworks: typeof networks;
|
|
564
|
+
|
|
560
565
|
type ChainIDAlias = 'X' | 'P' | 'C';
|
|
561
566
|
/**
|
|
562
567
|
* Types for parsed transaction
|
|
563
568
|
*/
|
|
564
|
-
type Tx = AddValidatorTx | AddDelegatorTx | ExportTx | ImportTx | BaseTx | CreateSubnetTx | CreateChainTx | AddSubnetValidatorTx | RemoveSubnetValidatorTx | AddPermissionlessValidatorTx | AddPermissionlessDelegatorTx | TransformSubnetTx | TransferSubnetOwnershipTx | 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;
|
|
565
570
|
interface FeeData {
|
|
566
571
|
totalAvaxBurned: bigint;
|
|
567
572
|
totalAvaxOutput: bigint;
|
|
@@ -581,6 +586,11 @@ declare enum TxType {
|
|
|
581
586
|
Import = "import",
|
|
582
587
|
CreateSubnet = "create_subnet",
|
|
583
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",
|
|
584
594
|
AddSubnetValidator = "add_subnet_validator",
|
|
585
595
|
RemoveSubnetValidator = "remove_subnet_validator",
|
|
586
596
|
AddPermissionlessValidator = "add_permissionless_validator",
|
|
@@ -589,7 +599,7 @@ declare enum TxType {
|
|
|
589
599
|
TransferSubnetOwnership = "transfer_subnet_ownership",
|
|
590
600
|
Unknown = "unknown"
|
|
591
601
|
}
|
|
592
|
-
interface BaseTx extends TxBase {
|
|
602
|
+
interface BaseTx$1 extends TxBase {
|
|
593
603
|
type: TxType.Base;
|
|
594
604
|
chain: VM;
|
|
595
605
|
outputs: {
|
|
@@ -659,6 +669,35 @@ interface RemoveSubnetValidatorTx extends TxBase {
|
|
|
659
669
|
nodeID: string;
|
|
660
670
|
subnetID: string;
|
|
661
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
|
+
}
|
|
662
701
|
interface AddPermissionlessValidatorTx extends TxBase {
|
|
663
702
|
type: TxType.AddPermissionlessValidator;
|
|
664
703
|
nodeID: string;
|
|
@@ -668,7 +707,7 @@ interface AddPermissionlessValidatorTx extends TxBase {
|
|
|
668
707
|
rewardOwner: OutputOwners;
|
|
669
708
|
delegationRewardOwner: OutputOwners;
|
|
670
709
|
stake: bigint;
|
|
671
|
-
stakeOuts: TransferableOutput[];
|
|
710
|
+
stakeOuts: readonly TransferableOutput[];
|
|
672
711
|
subnetID: string;
|
|
673
712
|
publicKey: undefined | string;
|
|
674
713
|
signature: undefined | string;
|
|
@@ -682,7 +721,7 @@ interface AddPermissionlessDelegatorTx extends TxBase {
|
|
|
682
721
|
stake: bigint;
|
|
683
722
|
subnetID: string;
|
|
684
723
|
delegatorRewardsOwner: OutputOwners;
|
|
685
|
-
stakeOuts: TransferableOutput[];
|
|
724
|
+
stakeOuts: readonly TransferableOutput[];
|
|
686
725
|
}
|
|
687
726
|
interface TransformSubnetTx extends TxBase {
|
|
688
727
|
type: TxType.TransformSubnet;
|
|
@@ -697,11 +736,11 @@ interface TransformSubnetTx extends TxBase {
|
|
|
697
736
|
minStakeDuration: number;
|
|
698
737
|
maxStakeDuration: number;
|
|
699
738
|
minDelegationFee: number;
|
|
700
|
-
minDelegatorStake:
|
|
739
|
+
minDelegatorStake: bigint;
|
|
701
740
|
maxValidatorWeightFactor: number;
|
|
702
741
|
uptimeRequirement: number;
|
|
703
742
|
}
|
|
704
|
-
interface TransferSubnetOwnershipTx extends TxBase {
|
|
743
|
+
interface TransferSubnetOwnershipTx$1 extends TxBase {
|
|
705
744
|
type: TxType.TransferSubnetOwnership;
|
|
706
745
|
subnetID: string;
|
|
707
746
|
threshold: number;
|
|
@@ -717,7 +756,12 @@ declare function isAddValidatorTx(tx: Tx): tx is AddValidatorTx;
|
|
|
717
756
|
declare function isAddDelegatorTx(tx: Tx): tx is AddDelegatorTx;
|
|
718
757
|
declare function isExportTx(tx: Tx): tx is ExportTx;
|
|
719
758
|
declare function isImportTx(tx: Tx): tx is ImportTx;
|
|
720
|
-
declare function isBaseTx(tx: Tx): tx is BaseTx;
|
|
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;
|
|
721
765
|
declare function isCreateSubnetTx(tx: Tx): tx is CreateSubnetTx;
|
|
722
766
|
declare function isCreateChainTx(tx: Tx): tx is CreateChainTx;
|
|
723
767
|
declare function isAddSubnetValidatorTx(tx: Tx): tx is AddSubnetValidatorTx;
|
|
@@ -725,7 +769,7 @@ declare function isRemoveSubnetValidatorTx(tx: Tx): tx is RemoveSubnetValidatorT
|
|
|
725
769
|
declare function isAddPermissionlessValidatorTx(tx: Tx): tx is AddPermissionlessValidatorTx;
|
|
726
770
|
declare function isAddPermissionlessDelegatorTx(tx: Tx): tx is AddPermissionlessDelegatorTx;
|
|
727
771
|
declare function isTransformSubnetTx(tx: Tx): tx is TransformSubnetTx;
|
|
728
|
-
declare function isTransferSubnetOwnershipTx(tx: Tx): tx is TransferSubnetOwnershipTx;
|
|
772
|
+
declare function isTransferSubnetOwnershipTx(tx: Tx): tx is TransferSubnetOwnershipTx$1;
|
|
729
773
|
|
|
730
774
|
declare class AbstractProvider {
|
|
731
775
|
protected baseUrl: string;
|
|
@@ -743,6 +787,7 @@ declare class AbstractProvider {
|
|
|
743
787
|
getApiX(): avm.AVMApi;
|
|
744
788
|
getApiP(): pvm.PVMApi;
|
|
745
789
|
getApiC(): evm.EVMApi;
|
|
790
|
+
getInfo(): info.InfoApi;
|
|
746
791
|
getApi(chain: ChainIDAlias): avm.AVMApi | pvm.PVMApi | evm.EVMApi;
|
|
747
792
|
getAvaxID(): string;
|
|
748
793
|
getAddress(publicKey: Buffer, chain: ChainIDAlias): string;
|
|
@@ -767,6 +812,7 @@ declare class JsonRpcProvider extends AbstractProvider {
|
|
|
767
812
|
static fromBaseURL(url: string): Promise<JsonRpcProvider>;
|
|
768
813
|
static getDefaultMainnetProvider(): JsonRpcProvider;
|
|
769
814
|
static getDefaultFujiProvider(): JsonRpcProvider;
|
|
815
|
+
static getDefaultDevnetProvider(): JsonRpcProvider;
|
|
770
816
|
}
|
|
771
817
|
|
|
772
818
|
/**
|
|
@@ -777,6 +823,183 @@ declare const MainnetContext: Context.Context;
|
|
|
777
823
|
* Avalanche Fuji testnet context
|
|
778
824
|
*/
|
|
779
825
|
declare const FujiContext: Context.Context;
|
|
826
|
+
declare const DevnetContext: Context.Context;
|
|
827
|
+
|
|
828
|
+
type BaseTx = {
|
|
829
|
+
utxoSet: utils.UtxoSet;
|
|
830
|
+
chain: 'X' | 'P';
|
|
831
|
+
toAddress: string;
|
|
832
|
+
amountsPerAsset: Record<string, bigint>;
|
|
833
|
+
feeState?: pvm.FeeState;
|
|
834
|
+
options?: Common.SpendOptions;
|
|
835
|
+
fromAddresses?: string[];
|
|
836
|
+
};
|
|
837
|
+
type ImportP = {
|
|
838
|
+
utxoSet: utils.UtxoSet;
|
|
839
|
+
sourceChain: 'X' | 'C';
|
|
840
|
+
toAddress?: string;
|
|
841
|
+
threshold?: number;
|
|
842
|
+
feeState?: pvm.FeeState;
|
|
843
|
+
locktime?: bigint;
|
|
844
|
+
};
|
|
845
|
+
type ExportP = {
|
|
846
|
+
amount: bigint;
|
|
847
|
+
utxoSet: utils.UtxoSet;
|
|
848
|
+
destination: 'X' | 'C';
|
|
849
|
+
feeState?: pvm.FeeState;
|
|
850
|
+
toAddress?: string;
|
|
851
|
+
};
|
|
852
|
+
type ConsolidateP = {
|
|
853
|
+
utxoSet: utils.UtxoSet;
|
|
854
|
+
amount: bigint;
|
|
855
|
+
feeState?: pvm.FeeState;
|
|
856
|
+
toAddress?: string;
|
|
857
|
+
options?: Common.SpendOptions;
|
|
858
|
+
};
|
|
859
|
+
type CreateSubnet = {
|
|
860
|
+
utxoSet: utils.UtxoSet;
|
|
861
|
+
rewardAddresses: string[];
|
|
862
|
+
feeState?: pvm.FeeState;
|
|
863
|
+
fromAddresses?: string[];
|
|
864
|
+
options?: Common.SpendOptions;
|
|
865
|
+
threshold?: number;
|
|
866
|
+
locktime?: bigint;
|
|
867
|
+
};
|
|
868
|
+
type CreateChain = {
|
|
869
|
+
utxoSet: utils.UtxoSet;
|
|
870
|
+
subnetId: string;
|
|
871
|
+
chainName: string;
|
|
872
|
+
vmID: string;
|
|
873
|
+
fxIds: string[];
|
|
874
|
+
genesisData: Record<string, unknown>;
|
|
875
|
+
subnetAuth: number[];
|
|
876
|
+
feeState?: pvm.FeeState;
|
|
877
|
+
options?: Common.SpendOptions;
|
|
878
|
+
fromAddresses?: string[];
|
|
879
|
+
};
|
|
880
|
+
type ConvertSubnetToL1 = {
|
|
881
|
+
utxoSet: utils.UtxoSet;
|
|
882
|
+
address: string;
|
|
883
|
+
chainId: string;
|
|
884
|
+
subnetId: string;
|
|
885
|
+
subnetAuth: number[];
|
|
886
|
+
options?: Common.SpendOptions;
|
|
887
|
+
feeState: pvm.FeeState;
|
|
888
|
+
fromAddresses?: string[];
|
|
889
|
+
validators: {
|
|
890
|
+
nodeId: string;
|
|
891
|
+
weight: bigint;
|
|
892
|
+
balance: bigint;
|
|
893
|
+
pubKey: string;
|
|
894
|
+
signature: string;
|
|
895
|
+
remainingBalanceOwner: {
|
|
896
|
+
addresses: string[];
|
|
897
|
+
threshold?: number;
|
|
898
|
+
};
|
|
899
|
+
deactivationOwner: {
|
|
900
|
+
addresses: string[];
|
|
901
|
+
threshold?: number;
|
|
902
|
+
};
|
|
903
|
+
}[];
|
|
904
|
+
};
|
|
905
|
+
type RegisterL1Validator = {
|
|
906
|
+
utxoSet: utils.UtxoSet;
|
|
907
|
+
balance: bigint;
|
|
908
|
+
signature: string;
|
|
909
|
+
feeState: pvm.FeeState;
|
|
910
|
+
message: string;
|
|
911
|
+
options?: Common.SpendOptions;
|
|
912
|
+
fromAddresses?: string[];
|
|
913
|
+
};
|
|
914
|
+
type SetL1ValidatorWeight = {
|
|
915
|
+
utxoSet: utils.UtxoSet;
|
|
916
|
+
feeState: pvm.FeeState;
|
|
917
|
+
message: string;
|
|
918
|
+
options?: Common.SpendOptions;
|
|
919
|
+
fromAddresses?: string[];
|
|
920
|
+
};
|
|
921
|
+
type DisableL1Validator = {
|
|
922
|
+
utxoSet: utils.UtxoSet;
|
|
923
|
+
feeState: pvm.FeeState;
|
|
924
|
+
disableAuth: number[];
|
|
925
|
+
validationId: string;
|
|
926
|
+
options?: Common.SpendOptions;
|
|
927
|
+
fromAddresses?: string[];
|
|
928
|
+
};
|
|
929
|
+
type IncreaseL1ValidatorBalance = {
|
|
930
|
+
utxoSet: utils.UtxoSet;
|
|
931
|
+
feeState: pvm.FeeState;
|
|
932
|
+
balance: bigint;
|
|
933
|
+
validationId: string;
|
|
934
|
+
options?: Common.SpendOptions;
|
|
935
|
+
fromAddresses?: string[];
|
|
936
|
+
};
|
|
937
|
+
type AddSubnetValidator = {
|
|
938
|
+
utxoSet: utils.UtxoSet;
|
|
939
|
+
nodeId: string;
|
|
940
|
+
start: bigint;
|
|
941
|
+
end: bigint;
|
|
942
|
+
weight: bigint;
|
|
943
|
+
subnetId: string;
|
|
944
|
+
subnetAuth: number[];
|
|
945
|
+
feeState?: pvm.FeeState;
|
|
946
|
+
fromAddresses?: string[];
|
|
947
|
+
options?: Common.SpendOptions;
|
|
948
|
+
};
|
|
949
|
+
type AddPermissionlessValidator = {
|
|
950
|
+
utxoSet: utils.UtxoSet;
|
|
951
|
+
nodeId: string;
|
|
952
|
+
start: bigint;
|
|
953
|
+
end: bigint;
|
|
954
|
+
weight: bigint;
|
|
955
|
+
subnetId: string;
|
|
956
|
+
shares: number;
|
|
957
|
+
fromAddresses?: string[];
|
|
958
|
+
rewardAddresses?: string[];
|
|
959
|
+
delegatorRewardAddresses?: string[];
|
|
960
|
+
publicKey?: Buffer;
|
|
961
|
+
signature?: Buffer;
|
|
962
|
+
options?: Common.SpendOptions;
|
|
963
|
+
stakingAssetId?: string;
|
|
964
|
+
locktime?: bigint;
|
|
965
|
+
threshold?: number;
|
|
966
|
+
feeState?: pvm.FeeState;
|
|
967
|
+
};
|
|
968
|
+
type AddPermissionlessDelegator = {
|
|
969
|
+
utxoSet: utils.UtxoSet;
|
|
970
|
+
nodeId: string;
|
|
971
|
+
start: bigint;
|
|
972
|
+
end: bigint;
|
|
973
|
+
weight: bigint;
|
|
974
|
+
subnetId: string;
|
|
975
|
+
fromAddresses?: string[];
|
|
976
|
+
rewardAddresses?: string[];
|
|
977
|
+
options?: Common.SpendOptions;
|
|
978
|
+
locktime?: bigint;
|
|
979
|
+
feeState?: pvm.FeeState;
|
|
980
|
+
stakingAssetId?: string;
|
|
981
|
+
threshold?: number;
|
|
982
|
+
};
|
|
983
|
+
type RemoveSubnetValidator = {
|
|
984
|
+
utxoSet: utils.UtxoSet;
|
|
985
|
+
nodeId: string;
|
|
986
|
+
subnetId: string;
|
|
987
|
+
subnetAuth: number[];
|
|
988
|
+
feeState?: pvm.FeeState;
|
|
989
|
+
fromAddresses?: string[];
|
|
990
|
+
options?: Common.SpendOptions;
|
|
991
|
+
};
|
|
992
|
+
type TransferSubnetOwnershipTx = {
|
|
993
|
+
utxoSet: utils.UtxoSet;
|
|
994
|
+
subnetId: string;
|
|
995
|
+
subnetAuth: number[];
|
|
996
|
+
subnetOwners: string[];
|
|
997
|
+
feeState?: pvm.FeeState;
|
|
998
|
+
fromAddresses?: string[];
|
|
999
|
+
options?: Common.SpendOptions;
|
|
1000
|
+
threshold?: number;
|
|
1001
|
+
locktime?: bigint;
|
|
1002
|
+
};
|
|
780
1003
|
|
|
781
1004
|
/**
|
|
782
1005
|
* An abstract class that that is shared by all wallet classes.
|
|
@@ -823,8 +1046,12 @@ declare abstract class WalletAbstract {
|
|
|
823
1046
|
* @param source What is the source chain of the atomic UTXOs
|
|
824
1047
|
*/
|
|
825
1048
|
getAtomicUTXOs(chain: ChainIDAlias, source: ChainIDAlias): Promise<utils.UtxoSet>;
|
|
1049
|
+
/**
|
|
1050
|
+
* Get the nonce of this wallet's C chain address
|
|
1051
|
+
*/
|
|
1052
|
+
getNonce(): Promise<number>;
|
|
826
1053
|
exportX(amount: bigint, utxoSet: utils.UtxoSet, destination: 'P' | 'C', toAddress?: string): Common.UnsignedTx;
|
|
827
|
-
importP(
|
|
1054
|
+
importP({ utxoSet, sourceChain, toAddress, threshold, feeState, locktime, }: ImportP): Common.UnsignedTx;
|
|
828
1055
|
importX(utxos: utils.UtxoSet, sourceChain: 'P' | 'C', toAddress?: string): Common.UnsignedTx;
|
|
829
1056
|
/**
|
|
830
1057
|
*
|
|
@@ -844,10 +1071,6 @@ declare abstract class WalletAbstract {
|
|
|
844
1071
|
* @param toAddress
|
|
845
1072
|
*/
|
|
846
1073
|
exportC(amount: bigint, destination: 'X' | 'P', nonce: bigint, baseFee: bigint, toAddress?: string): _avalabs_avalanchejs.EVMUnsignedTx;
|
|
847
|
-
/**
|
|
848
|
-
* Get the nonce of this wallet's C chain address
|
|
849
|
-
*/
|
|
850
|
-
getNonce(): Promise<number>;
|
|
851
1074
|
/**
|
|
852
1075
|
* Export the given amount of AVAX from the P chain. Export fee is automatically added.
|
|
853
1076
|
* @param amount
|
|
@@ -855,18 +1078,17 @@ declare abstract class WalletAbstract {
|
|
|
855
1078
|
* @param destination
|
|
856
1079
|
* @param toAddress
|
|
857
1080
|
*/
|
|
858
|
-
exportP(amount
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
}): Common.UnsignedTx;
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
}): Common.UnsignedTx;
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
addSubnetValidator(utxoSet: utils.UtxoSet, nodeId: string, start: bigint, end: bigint, weight: bigint, subnetId: string, subnetAuth: number[], fromAddresses?: string[], options?: Common.SpendOptions): Common.UnsignedTx;
|
|
1081
|
+
exportP({ amount, utxoSet, destination, feeState, toAddress }: ExportP): Common.UnsignedTx;
|
|
1082
|
+
consolidateP({ utxoSet, amount, feeState, toAddress, options, }: ConsolidateP): Common.UnsignedTx;
|
|
1083
|
+
baseTX({ utxoSet, chain, toAddress, amountsPerAsset, feeState, options, fromAddresses, }: BaseTx): Common.UnsignedTx;
|
|
1084
|
+
convertSubnetToL1({ utxoSet, chainId, subnetId, subnetAuth, feeState, address, validators, options, fromAddresses, }: ConvertSubnetToL1): Common.UnsignedTx;
|
|
1085
|
+
registerL1Validator({ utxoSet, balance, signature, message, feeState, fromAddresses, options, }: RegisterL1Validator): Common.UnsignedTx;
|
|
1086
|
+
setL1ValidatorWeight({ utxoSet, feeState, message, options, fromAddresses, }: SetL1ValidatorWeight): Common.UnsignedTx;
|
|
1087
|
+
disableL1Validator({ utxoSet, feeState, options, fromAddresses, disableAuth, validationId, }: DisableL1Validator): Common.UnsignedTx;
|
|
1088
|
+
increaseL1ValidatorBalance({ utxoSet, feeState, options, fromAddresses, balance, validationId, }: IncreaseL1ValidatorBalance): Common.UnsignedTx;
|
|
1089
|
+
createBlockchain({ utxoSet, subnetId, chainName, vmID, fxIds, genesisData, subnetAuth, feeState, options, fromAddresses, }: CreateChain): Common.UnsignedTx;
|
|
1090
|
+
createSubnet({ utxoSet, rewardAddresses, feeState, fromAddresses, options, threshold, locktime, }: CreateSubnet): Common.UnsignedTx;
|
|
1091
|
+
addSubnetValidator({ utxoSet, nodeId, start, end, weight, subnetId, subnetAuth, feeState, fromAddresses, options, }: AddSubnetValidator): Common.UnsignedTx;
|
|
870
1092
|
/**
|
|
871
1093
|
*
|
|
872
1094
|
* @param utxoSet The transaction will be constructed from these UTXOs.
|
|
@@ -883,7 +1105,7 @@ declare abstract class WalletAbstract {
|
|
|
883
1105
|
* @param signature the BLS signature, If the subnet is the primary network. Can be found in the Node on startup.
|
|
884
1106
|
* @param options
|
|
885
1107
|
*/
|
|
886
|
-
addPermissionlessValidator(utxoSet
|
|
1108
|
+
addPermissionlessValidator({ utxoSet, nodeId, start, end, weight, subnetId, shares, feeState, fromAddresses, rewardAddresses, delegatorRewardAddresses, publicKey, signature, options, threshold, locktime, stakingAssetId, }: AddPermissionlessValidator): Common.UnsignedTx;
|
|
887
1109
|
/**
|
|
888
1110
|
*
|
|
889
1111
|
* @param utxoSet The transaction will be constructed from these UTXOs.
|
|
@@ -896,10 +1118,9 @@ declare abstract class WalletAbstract {
|
|
|
896
1118
|
* @param rewardAddresses Will use active address if not provided. Given addresses will share the reward UTXO.
|
|
897
1119
|
* @param options
|
|
898
1120
|
*/
|
|
899
|
-
addPermissionlessDelegator(utxoSet
|
|
900
|
-
removeSubnetValidator(utxoSet
|
|
901
|
-
transferSubnetOwnershipTx(utxoSet
|
|
902
|
-
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;
|
|
1121
|
+
addPermissionlessDelegator({ utxoSet, nodeId, start, end, weight, subnetId, fromAddresses, rewardAddresses, options, locktime, feeState, threshold, stakingAssetId, }: AddPermissionlessDelegator): Common.UnsignedTx;
|
|
1122
|
+
removeSubnetValidator({ utxoSet, nodeId, subnetId, subnetAuth, fromAddresses, feeState, options, }: RemoveSubnetValidator): Common.UnsignedTx;
|
|
1123
|
+
transferSubnetOwnershipTx({ utxoSet, subnetId, subnetAuth, subnetOwners, feeState, fromAddresses, options, threshold, locktime, }: TransferSubnetOwnershipTx): Common.UnsignedTx;
|
|
903
1124
|
protected constructor(provider: AbstractProvider);
|
|
904
1125
|
}
|
|
905
1126
|
|
|
@@ -1350,7 +1571,7 @@ declare const addSignaturesToAvalancheTx: ({ transactionHex, signatures, chainAl
|
|
|
1350
1571
|
}>;
|
|
1351
1572
|
|
|
1352
1573
|
type GlacierOutput = Utxo$1 | PChainUtxo;
|
|
1353
|
-
declare const convertGlacierUtxo: (glacierUtxo: GlacierOutput,
|
|
1574
|
+
declare const convertGlacierUtxo: (glacierUtxo: GlacierOutput, network: Network$2) => Utxo<TransferOutput | pvmSerial.StakeableLockOut<TransferOutput>>;
|
|
1354
1575
|
|
|
1355
1576
|
type Params$2 = {
|
|
1356
1577
|
txBytes: Uint8Array;
|
|
@@ -1454,24 +1675,15 @@ declare function getStakeForAddresses(addresses: string[], api: pvm.PVMApi): Pro
|
|
|
1454
1675
|
*/
|
|
1455
1676
|
declare function getUnixNow(): bigint;
|
|
1456
1677
|
|
|
1457
|
-
type UtxoInfo = {
|
|
1458
|
-
utxoId: string;
|
|
1459
|
-
assetId: string;
|
|
1460
|
-
locktime: bigint;
|
|
1461
|
-
stakeableLocktime: bigint;
|
|
1462
|
-
threshold: number;
|
|
1463
|
-
amount: bigint;
|
|
1464
|
-
};
|
|
1465
|
-
declare const getUtxoInfo: (utxo: Utxo) => UtxoInfo;
|
|
1466
|
-
|
|
1467
1678
|
type Params = {
|
|
1468
1679
|
transactionHex: string;
|
|
1469
1680
|
chainAlias: ChainIDAlias;
|
|
1470
|
-
|
|
1681
|
+
network: Network$2;
|
|
1471
1682
|
url: string;
|
|
1472
1683
|
token?: string;
|
|
1684
|
+
headers?: Record<string, string>;
|
|
1473
1685
|
};
|
|
1474
|
-
declare const getUtxosByTxFromGlacier: ({ transactionHex, chainAlias,
|
|
1686
|
+
declare const getUtxosByTxFromGlacier: ({ transactionHex, chainAlias, network, url, token, headers, }: Params) => Promise<Utxo<_avalabs_avalanchejs_dist_serializable_common_types.Serializable>[]>;
|
|
1475
1687
|
|
|
1476
1688
|
declare const getVmByChainAlias: (chainAlias: string) => "EVM" | "AVM" | "PVM";
|
|
1477
1689
|
|
|
@@ -1488,10 +1700,16 @@ declare function getXpubFromMnemonic(mnemonic: string): string;
|
|
|
1488
1700
|
*/
|
|
1489
1701
|
declare function isBech32Address(address: string, hasChainId?: boolean): boolean;
|
|
1490
1702
|
|
|
1703
|
+
type ParseOptions = {
|
|
1704
|
+
/**
|
|
1705
|
+
* Tolerance percentage range where the burned amount is considered valid.
|
|
1706
|
+
*/
|
|
1707
|
+
feeTolerance?: number;
|
|
1708
|
+
};
|
|
1491
1709
|
/**
|
|
1492
1710
|
* Returns human readable data from a given a transaction buffer,
|
|
1493
1711
|
*/
|
|
1494
|
-
declare function parseAvalancheTx(unsignedTx: Common.UnsignedTx, provider: JsonRpcProvider, currentAddress: string): Promise<Tx>;
|
|
1712
|
+
declare function parseAvalancheTx(unsignedTx: Common.UnsignedTx, provider: JsonRpcProvider, currentAddress: string, { feeTolerance }?: ParseOptions): Promise<Tx>;
|
|
1495
1713
|
|
|
1496
1714
|
declare const emptySignature: Signature;
|
|
1497
1715
|
declare const populateCredential: (indices: number[], existingCredentialData?: {
|
|
@@ -1503,14 +1721,15 @@ declare function signedTxToHex(signedTx: avaxSerial.SignedTx): string;
|
|
|
1503
1721
|
|
|
1504
1722
|
/**
|
|
1505
1723
|
* The UTXOs will be sorted in the following order.
|
|
1506
|
-
* 1-
|
|
1507
|
-
* 2-
|
|
1724
|
+
* 1- Highest value unlocked UTXO (for fees)
|
|
1725
|
+
* 2- LockedStakeable UTXOs with the highest locktime to lowest
|
|
1726
|
+
* 3- Rest of the unlocked UTXOs highest to lowest
|
|
1508
1727
|
* @remark Does not check for locked UTXOs
|
|
1509
1728
|
*/
|
|
1510
1729
|
declare function sortUTXOsStaking(utxos: Utxo[]): Utxo[];
|
|
1511
1730
|
declare function sortUTXOsByAmount(utxos: Utxo[], isDescending: boolean): Utxo[];
|
|
1512
|
-
declare const sortUTXOsByAmountDescending: (utxos: Utxo[]) => Utxo[];
|
|
1513
|
-
declare const sortUTXOsByAmountAscending: (utxos: Utxo[]) => Utxo[];
|
|
1731
|
+
declare const sortUTXOsByAmountDescending: (utxos: Utxo[]) => Utxo<_avalabs_avalanchejs_dist_serializable_common_types.Serializable>[];
|
|
1732
|
+
declare const sortUTXOsByAmountAscending: (utxos: Utxo[]) => Utxo<_avalabs_avalanchejs_dist_serializable_common_types.Serializable>[];
|
|
1514
1733
|
|
|
1515
1734
|
/**
|
|
1516
1735
|
* The list of transaction types supported by `getMaximumUtxoSet`.
|
|
@@ -1536,9 +1755,16 @@ declare const P_CHAIN_TX_SIZE_LIMIT = 65536;
|
|
|
1536
1755
|
* @param utxos - list of UTXOs to be consumed by the transaction.
|
|
1537
1756
|
* @param sizeSupportedTx - one of the supported transaction types
|
|
1538
1757
|
* @param limit - optional - byte size limit, defaults to 64kb.
|
|
1758
|
+
* @param feeState - current fee state on the chain
|
|
1539
1759
|
* @returns the largest prefix of sorted `utxos` before hitting the size limit. If no such prefix exists, then an empty array.
|
|
1540
1760
|
*/
|
|
1541
|
-
declare function getMaximumUtxoSet(wallet
|
|
1761
|
+
declare function getMaximumUtxoSet({ wallet, utxos, sizeSupportedTx, limit, feeState, }: {
|
|
1762
|
+
wallet: WalletAbstract;
|
|
1763
|
+
utxos: Utxo[];
|
|
1764
|
+
sizeSupportedTx: SizeSupportedTx;
|
|
1765
|
+
limit?: number;
|
|
1766
|
+
feeState?: pvm.FeeState;
|
|
1767
|
+
}): Utxo[];
|
|
1542
1768
|
|
|
1543
1769
|
/**
|
|
1544
1770
|
* Verifies the given derivation path is valid, starts with `m`, and of the right length
|
|
@@ -1555,10 +1781,12 @@ type index_AddSubnetValidatorTx = AddSubnetValidatorTx;
|
|
|
1555
1781
|
type index_AddValidatorTx = AddValidatorTx;
|
|
1556
1782
|
type index_AddressWallet = AddressWallet;
|
|
1557
1783
|
declare const index_AddressWallet: typeof AddressWallet;
|
|
1558
|
-
type index_BaseTx = BaseTx;
|
|
1559
1784
|
type index_ChainIDAlias = ChainIDAlias;
|
|
1785
|
+
type index_ConvertSubnetToL1Tx = ConvertSubnetToL1Tx;
|
|
1560
1786
|
type index_CreateChainTx = CreateChainTx;
|
|
1561
1787
|
type index_CreateSubnetTx = CreateSubnetTx;
|
|
1788
|
+
declare const index_DevnetContext: typeof DevnetContext;
|
|
1789
|
+
type index_DisableL1ValidatorTx = DisableL1ValidatorTx;
|
|
1562
1790
|
type index_ExportTx = ExportTx;
|
|
1563
1791
|
type index_FeeData = FeeData;
|
|
1564
1792
|
declare const index_FujiContext: typeof FujiContext;
|
|
@@ -1566,6 +1794,7 @@ type index_GetAvaxBalanceDict = GetAvaxBalanceDict;
|
|
|
1566
1794
|
type index_GetStakedAvaxBalanceDict = GetStakedAvaxBalanceDict;
|
|
1567
1795
|
type index_GlacierOutput = GlacierOutput;
|
|
1568
1796
|
type index_ImportTx = ImportTx;
|
|
1797
|
+
type index_IncreaseL1ValidatorBalanceTx = IncreaseL1ValidatorBalanceTx;
|
|
1569
1798
|
type index_JsonRpcProvider = JsonRpcProvider;
|
|
1570
1799
|
declare const index_JsonRpcProvider: typeof JsonRpcProvider;
|
|
1571
1800
|
type index_LedgerGetXpubResponse = LedgerGetXpubResponse;
|
|
@@ -1579,7 +1808,9 @@ declare const index_MnemonicWallet: typeof MnemonicWallet;
|
|
|
1579
1808
|
type index_MnemonicWalletVoid = MnemonicWalletVoid;
|
|
1580
1809
|
declare const index_MnemonicWalletVoid: typeof MnemonicWalletVoid;
|
|
1581
1810
|
declare const index_P_CHAIN_TX_SIZE_LIMIT: typeof P_CHAIN_TX_SIZE_LIMIT;
|
|
1811
|
+
type index_RegisterL1ValidatorTx = RegisterL1ValidatorTx;
|
|
1582
1812
|
type index_RemoveSubnetValidatorTx = RemoveSubnetValidatorTx;
|
|
1813
|
+
type index_SetL1ValidatorWeightTx = SetL1ValidatorWeightTx;
|
|
1583
1814
|
type index_SignMessageRequest = SignMessageRequest;
|
|
1584
1815
|
type index_SignTxBufferRequest = SignTxBufferRequest;
|
|
1585
1816
|
type index_SignTxRequest = SignTxRequest;
|
|
@@ -1592,14 +1823,12 @@ type index_SizeSupportedTx = SizeSupportedTx;
|
|
|
1592
1823
|
declare const index_SizeSupportedTx: typeof SizeSupportedTx;
|
|
1593
1824
|
type index_StaticSigner = StaticSigner;
|
|
1594
1825
|
declare const index_StaticSigner: typeof StaticSigner;
|
|
1595
|
-
type index_TransferSubnetOwnershipTx = TransferSubnetOwnershipTx;
|
|
1596
1826
|
type index_TransformSubnetTx = TransformSubnetTx;
|
|
1597
1827
|
type index_Tx = Tx;
|
|
1598
1828
|
type index_TxBase = TxBase;
|
|
1599
1829
|
type index_TxType = TxType;
|
|
1600
1830
|
declare const index_TxType: typeof TxType;
|
|
1601
1831
|
type index_UnknownTx = UnknownTx;
|
|
1602
|
-
type index_UtxoInfo = UtxoInfo;
|
|
1603
1832
|
type index_WalletAbstract = WalletAbstract;
|
|
1604
1833
|
declare const index_WalletAbstract: typeof WalletAbstract;
|
|
1605
1834
|
type index_WalletVoid = WalletVoid;
|
|
@@ -1621,7 +1850,6 @@ declare const index_getStakeForAddresses: typeof getStakeForAddresses;
|
|
|
1621
1850
|
declare const index_getStakedAssetBalance: typeof getStakedAssetBalance;
|
|
1622
1851
|
declare const index_getUTXOsForAddresses: typeof getUTXOsForAddresses;
|
|
1623
1852
|
declare const index_getUnixNow: typeof getUnixNow;
|
|
1624
|
-
declare const index_getUtxoInfo: typeof getUtxoInfo;
|
|
1625
1853
|
declare const index_getUtxosByTxFromGlacier: typeof getUtxosByTxFromGlacier;
|
|
1626
1854
|
declare const index_getVmByChainAlias: typeof getVmByChainAlias;
|
|
1627
1855
|
declare const index_getXpubFromMnemonic: typeof getXpubFromMnemonic;
|
|
@@ -1632,12 +1860,17 @@ declare const index_isAddSubnetValidatorTx: typeof isAddSubnetValidatorTx;
|
|
|
1632
1860
|
declare const index_isAddValidatorTx: typeof isAddValidatorTx;
|
|
1633
1861
|
declare const index_isBaseTx: typeof isBaseTx;
|
|
1634
1862
|
declare const index_isBech32Address: typeof isBech32Address;
|
|
1863
|
+
declare const index_isConvertSubnetToL1Tx: typeof isConvertSubnetToL1Tx;
|
|
1635
1864
|
declare const index_isCreateChainTx: typeof isCreateChainTx;
|
|
1636
1865
|
declare const index_isCreateSubnetTx: typeof isCreateSubnetTx;
|
|
1866
|
+
declare const index_isDisableL1ValidatorTx: typeof isDisableL1ValidatorTx;
|
|
1637
1867
|
declare const index_isExportTx: typeof isExportTx;
|
|
1638
1868
|
declare const index_isImportTx: typeof isImportTx;
|
|
1869
|
+
declare const index_isIncreaseL1ValidatorBalance: typeof isIncreaseL1ValidatorBalance;
|
|
1639
1870
|
declare const index_isObsidianApp: typeof isObsidianApp;
|
|
1871
|
+
declare const index_isRegisterL1ValidatorTx: typeof isRegisterL1ValidatorTx;
|
|
1640
1872
|
declare const index_isRemoveSubnetValidatorTx: typeof isRemoveSubnetValidatorTx;
|
|
1873
|
+
declare const index_isSetL1ValidatorWeightTx: typeof isSetL1ValidatorWeightTx;
|
|
1641
1874
|
declare const index_isTransferSubnetOwnershipTx: typeof isTransferSubnetOwnershipTx;
|
|
1642
1875
|
declare const index_isTransformSubnetTx: typeof isTransformSubnetTx;
|
|
1643
1876
|
declare const index_parseAvalancheTx: typeof parseAvalancheTx;
|
|
@@ -1649,96 +1882,8 @@ declare const index_sortUTXOsByAmountDescending: typeof sortUTXOsByAmountDescend
|
|
|
1649
1882
|
declare const index_sortUTXOsStaking: typeof sortUTXOsStaking;
|
|
1650
1883
|
declare const index_verifyDerivationPath: typeof verifyDerivationPath;
|
|
1651
1884
|
declare namespace index {
|
|
1652
|
-
export {
|
|
1653
|
-
|
|
1654
|
-
index_AddDelegatorTx as AddDelegatorTx,
|
|
1655
|
-
index_AddPermissionlessDelegatorTx as AddPermissionlessDelegatorTx,
|
|
1656
|
-
index_AddPermissionlessValidatorTx as AddPermissionlessValidatorTx,
|
|
1657
|
-
index_AddSubnetValidatorTx as AddSubnetValidatorTx,
|
|
1658
|
-
index_AddValidatorTx as AddValidatorTx,
|
|
1659
|
-
index_AddressWallet as AddressWallet,
|
|
1660
|
-
index_BaseTx as BaseTx,
|
|
1661
|
-
index_ChainIDAlias as ChainIDAlias,
|
|
1662
|
-
index_CreateChainTx as CreateChainTx,
|
|
1663
|
-
index_CreateSubnetTx as CreateSubnetTx,
|
|
1664
|
-
index_ExportTx as ExportTx,
|
|
1665
|
-
index_FeeData as FeeData,
|
|
1666
|
-
index_FujiContext as FujiContext,
|
|
1667
|
-
index_GetAvaxBalanceDict as GetAvaxBalanceDict,
|
|
1668
|
-
index_GetStakedAvaxBalanceDict as GetStakedAvaxBalanceDict,
|
|
1669
|
-
index_GlacierOutput as GlacierOutput,
|
|
1670
|
-
index_ImportTx as ImportTx,
|
|
1671
|
-
index_JsonRpcProvider as JsonRpcProvider,
|
|
1672
|
-
index_LedgerGetXpubResponse as LedgerGetXpubResponse,
|
|
1673
|
-
index_LedgerSigner as LedgerSigner,
|
|
1674
|
-
index_LedgerWallet as LedgerWallet,
|
|
1675
|
-
index_MainnetContext as MainnetContext,
|
|
1676
|
-
index_MnemonicWallet as MnemonicWallet,
|
|
1677
|
-
index_MnemonicWalletVoid as MnemonicWalletVoid,
|
|
1678
|
-
index_P_CHAIN_TX_SIZE_LIMIT as P_CHAIN_TX_SIZE_LIMIT,
|
|
1679
|
-
index_RemoveSubnetValidatorTx as RemoveSubnetValidatorTx,
|
|
1680
|
-
index_SignMessageRequest as SignMessageRequest,
|
|
1681
|
-
index_SignTxBufferRequest as SignTxBufferRequest,
|
|
1682
|
-
index_SignTxRequest as SignTxRequest,
|
|
1683
|
-
index_Signer as Signer,
|
|
1684
|
-
index_SimpleLedgerSigner as SimpleLedgerSigner,
|
|
1685
|
-
index_SimpleSigner as SimpleSigner,
|
|
1686
|
-
index_SizeSupportedTx as SizeSupportedTx,
|
|
1687
|
-
index_StaticSigner as StaticSigner,
|
|
1688
|
-
index_TransferSubnetOwnershipTx as TransferSubnetOwnershipTx,
|
|
1689
|
-
index_TransformSubnetTx as TransformSubnetTx,
|
|
1690
|
-
index_Tx as Tx,
|
|
1691
|
-
index_TxBase as TxBase,
|
|
1692
|
-
index_TxType as TxType,
|
|
1693
|
-
index_UnknownTx as UnknownTx,
|
|
1694
|
-
index_UtxoInfo as UtxoInfo,
|
|
1695
|
-
index_WalletAbstract as WalletAbstract,
|
|
1696
|
-
index_WalletVoid as WalletVoid,
|
|
1697
|
-
index_addSignaturesToAvalancheTx as addSignaturesToAvalancheTx,
|
|
1698
|
-
index_convertGlacierUtxo as convertGlacierUtxo,
|
|
1699
|
-
index_createAvalancheEvmUnsignedTx as createAvalancheEvmUnsignedTx,
|
|
1700
|
-
index_createAvalancheUnsignedTx as createAvalancheUnsignedTx,
|
|
1701
|
-
index_digestMessage as digestMessage,
|
|
1702
|
-
index_emptySignature as emptySignature,
|
|
1703
|
-
index_getAddressFromXpub as getAddressFromXpub,
|
|
1704
|
-
index_getAddressPublicKeyFromXpub as getAddressPublicKeyFromXpub,
|
|
1705
|
-
index_getAssetBalance as getAssetBalance,
|
|
1706
|
-
index_getLedgerProvider as getLedgerProvider,
|
|
1707
|
-
index_getMaximumUtxoSet as getMaximumUtxoSet,
|
|
1708
|
-
index_getPaginatedUTXOs as getPaginatedUTXOs,
|
|
1709
|
-
index_getPchainUnixNow as getPchainUnixNow,
|
|
1710
|
-
index_getStakeForAddresses as getStakeForAddresses,
|
|
1711
|
-
index_getStakedAssetBalance as getStakedAssetBalance,
|
|
1712
|
-
index_getUTXOsForAddresses as getUTXOsForAddresses,
|
|
1713
|
-
index_getUnixNow as getUnixNow,
|
|
1714
|
-
index_getUtxoInfo as getUtxoInfo,
|
|
1715
|
-
index_getUtxosByTxFromGlacier as getUtxosByTxFromGlacier,
|
|
1716
|
-
index_getVmByChainAlias as getVmByChainAlias,
|
|
1717
|
-
index_getXpubFromMnemonic as getXpubFromMnemonic,
|
|
1718
|
-
index_isAddDelegatorTx as isAddDelegatorTx,
|
|
1719
|
-
index_isAddPermissionlessDelegatorTx as isAddPermissionlessDelegatorTx,
|
|
1720
|
-
index_isAddPermissionlessValidatorTx as isAddPermissionlessValidatorTx,
|
|
1721
|
-
index_isAddSubnetValidatorTx as isAddSubnetValidatorTx,
|
|
1722
|
-
index_isAddValidatorTx as isAddValidatorTx,
|
|
1723
|
-
index_isBaseTx as isBaseTx,
|
|
1724
|
-
index_isBech32Address as isBech32Address,
|
|
1725
|
-
index_isCreateChainTx as isCreateChainTx,
|
|
1726
|
-
index_isCreateSubnetTx as isCreateSubnetTx,
|
|
1727
|
-
index_isExportTx as isExportTx,
|
|
1728
|
-
index_isImportTx as isImportTx,
|
|
1729
|
-
index_isObsidianApp as isObsidianApp,
|
|
1730
|
-
index_isRemoveSubnetValidatorTx as isRemoveSubnetValidatorTx,
|
|
1731
|
-
index_isTransferSubnetOwnershipTx as isTransferSubnetOwnershipTx,
|
|
1732
|
-
index_isTransformSubnetTx as isTransformSubnetTx,
|
|
1733
|
-
index_parseAvalancheTx as parseAvalancheTx,
|
|
1734
|
-
index_populateCredential as populateCredential,
|
|
1735
|
-
index_signedTxToHex as signedTxToHex,
|
|
1736
|
-
index_sortUTXOsByAmount as sortUTXOsByAmount,
|
|
1737
|
-
index_sortUTXOsByAmountAscending as sortUTXOsByAmountAscending,
|
|
1738
|
-
index_sortUTXOsByAmountDescending as sortUTXOsByAmountDescending,
|
|
1739
|
-
index_sortUTXOsStaking as sortUTXOsStaking,
|
|
1740
|
-
index_verifyDerivationPath as verifyDerivationPath,
|
|
1741
|
-
};
|
|
1885
|
+
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 };
|
|
1886
|
+
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_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 };
|
|
1742
1887
|
}
|
|
1743
1888
|
|
|
1744
1889
|
/**
|
|
@@ -1746,8 +1891,11 @@ declare namespace index {
|
|
|
1746
1891
|
* @param addressIndex Which index is the address on
|
|
1747
1892
|
* @param pathSpec BIP44 vs LedgerLive
|
|
1748
1893
|
* @param vm Which VM is this address on. Coin index changes between Avalanche and EVM
|
|
1894
|
+
* @param withRoot If false, skips the "m/" prefix. Needed for Solana Ledger app.
|
|
1749
1895
|
*/
|
|
1750
|
-
declare function getAddressDerivationPath(addressIndex: number, pathSpec: DerivationPath,
|
|
1896
|
+
declare function getAddressDerivationPath(addressIndex: number, pathSpec: DerivationPath, // Irrelevant for Solana
|
|
1897
|
+
vm: 'SVM', withRoot?: boolean): string;
|
|
1898
|
+
declare function getAddressDerivationPath(addressIndex: number, pathSpec: DerivationPath, vm: 'EVM' | 'AVM' | 'PVM', withRoot?: never): string;
|
|
1751
1899
|
|
|
1752
1900
|
/**
|
|
1753
1901
|
* Get the public key from a given private key.
|
|
@@ -1792,4 +1940,70 @@ declare function openLedgerApp(transport: Transport, applicationName: string): P
|
|
|
1792
1940
|
*/
|
|
1793
1941
|
declare function quitLedgerApp(transport: Transport): Promise<Buffer>;
|
|
1794
1942
|
|
|
1795
|
-
|
|
1943
|
+
declare const compileSolanaTx: (compilableTx: CompilableTransactionMessage) => Readonly<Readonly<{
|
|
1944
|
+
messageBytes: _solana_kit.TransactionMessageBytes;
|
|
1945
|
+
signatures: _solana_kit.SignaturesMap;
|
|
1946
|
+
}> & _solana_kit.TransactionWithLifetime>;
|
|
1947
|
+
|
|
1948
|
+
type SolanaProvider = ReturnType<typeof getSolanaProvider>;
|
|
1949
|
+
declare const isSolanaProvider: (something: unknown) => something is _solana_kit.RpcDevnet<(_solana_kit.GetAccountInfoApi & _solana_kit.GetBalanceApi & _solana_kit.GetBlockApi & _solana_kit.GetBlockCommitmentApi & _solana_kit.GetBlockHeightApi & _solana_kit.GetBlockProductionApi & _solana_kit.GetBlocksApi & _solana_kit.GetBlocksWithLimitApi & _solana_kit.GetBlockTimeApi & _solana_kit.GetClusterNodesApi & _solana_kit.GetEpochInfoApi & _solana_kit.GetEpochScheduleApi & _solana_kit.GetFeeForMessageApi & _solana_kit.GetFirstAvailableBlockApi & _solana_kit.GetGenesisHashApi & _solana_kit.GetHealthApi & _solana_kit.GetHighestSnapshotSlotApi & _solana_kit.GetIdentityApi & _solana_kit.GetInflationGovernorApi & _solana_kit.GetInflationRateApi & _solana_kit.GetInflationRewardApi & _solana_kit.GetLargestAccountsApi & _solana_kit.GetLatestBlockhashApi & _solana_kit.GetLeaderScheduleApi & _solana_kit.GetMaxRetransmitSlotApi & _solana_kit.GetMaxShredInsertSlotApi & _solana_kit.GetMinimumBalanceForRentExemptionApi & _solana_kit.GetMultipleAccountsApi & _solana_kit.GetProgramAccountsApi & _solana_kit.GetRecentPerformanceSamplesApi & _solana_kit.GetRecentPrioritizationFeesApi & _solana_kit.GetSignaturesForAddressApi & _solana_kit.GetSignatureStatusesApi & _solana_kit.GetSlotApi & _solana_kit.GetSlotLeaderApi & _solana_kit.GetSlotLeadersApi & _solana_kit.GetStakeMinimumDelegationApi & _solana_kit.GetSupplyApi & _solana_kit.GetTokenAccountBalanceApi & _solana_kit.GetTokenAccountsByDelegateApi & _solana_kit.GetTokenAccountsByOwnerApi & _solana_kit.GetTokenLargestAccountsApi & _solana_kit.GetTokenSupplyApi & _solana_kit.GetTransactionApi & _solana_kit.GetTransactionCountApi & _solana_kit.GetVersionApi & _solana_kit.GetVoteAccountsApi & _solana_kit.IsBlockhashValidApi & _solana_kit.MinimumLedgerSlotApi & _solana_kit.SendTransactionApi & _solana_kit.SimulateTransactionApi) | (_solana_kit.RequestAirdropApi & _solana_kit.GetAccountInfoApi & _solana_kit.GetBalanceApi & _solana_kit.GetBlockApi & _solana_kit.GetBlockCommitmentApi & _solana_kit.GetBlockHeightApi & _solana_kit.GetBlockProductionApi & _solana_kit.GetBlocksApi & _solana_kit.GetBlocksWithLimitApi & _solana_kit.GetBlockTimeApi & _solana_kit.GetClusterNodesApi & _solana_kit.GetEpochInfoApi & _solana_kit.GetEpochScheduleApi & _solana_kit.GetFeeForMessageApi & _solana_kit.GetFirstAvailableBlockApi & _solana_kit.GetGenesisHashApi & _solana_kit.GetHealthApi & _solana_kit.GetHighestSnapshotSlotApi & _solana_kit.GetIdentityApi & _solana_kit.GetInflationGovernorApi & _solana_kit.GetInflationRateApi & _solana_kit.GetInflationRewardApi & _solana_kit.GetLargestAccountsApi & _solana_kit.GetLatestBlockhashApi & _solana_kit.GetLeaderScheduleApi & _solana_kit.GetMaxRetransmitSlotApi & _solana_kit.GetMaxShredInsertSlotApi & _solana_kit.GetMinimumBalanceForRentExemptionApi & _solana_kit.GetMultipleAccountsApi & _solana_kit.GetProgramAccountsApi & _solana_kit.GetRecentPerformanceSamplesApi & _solana_kit.GetRecentPrioritizationFeesApi & _solana_kit.GetSignaturesForAddressApi & _solana_kit.GetSignatureStatusesApi & _solana_kit.GetSlotApi & _solana_kit.GetSlotLeaderApi & _solana_kit.GetSlotLeadersApi & _solana_kit.GetStakeMinimumDelegationApi & _solana_kit.GetSupplyApi & _solana_kit.GetTokenAccountBalanceApi & _solana_kit.GetTokenAccountsByDelegateApi & _solana_kit.GetTokenAccountsByOwnerApi & _solana_kit.GetTokenLargestAccountsApi & _solana_kit.GetTokenSupplyApi & _solana_kit.GetTransactionApi & _solana_kit.GetTransactionCountApi & _solana_kit.GetVersionApi & _solana_kit.GetVoteAccountsApi & _solana_kit.IsBlockhashValidApi & _solana_kit.MinimumLedgerSlotApi & _solana_kit.SendTransactionApi & _solana_kit.SimulateTransactionApi)> | _solana_kit.RpcMainnet<(_solana_kit.GetAccountInfoApi & _solana_kit.GetBalanceApi & _solana_kit.GetBlockApi & _solana_kit.GetBlockCommitmentApi & _solana_kit.GetBlockHeightApi & _solana_kit.GetBlockProductionApi & _solana_kit.GetBlocksApi & _solana_kit.GetBlocksWithLimitApi & _solana_kit.GetBlockTimeApi & _solana_kit.GetClusterNodesApi & _solana_kit.GetEpochInfoApi & _solana_kit.GetEpochScheduleApi & _solana_kit.GetFeeForMessageApi & _solana_kit.GetFirstAvailableBlockApi & _solana_kit.GetGenesisHashApi & _solana_kit.GetHealthApi & _solana_kit.GetHighestSnapshotSlotApi & _solana_kit.GetIdentityApi & _solana_kit.GetInflationGovernorApi & _solana_kit.GetInflationRateApi & _solana_kit.GetInflationRewardApi & _solana_kit.GetLargestAccountsApi & _solana_kit.GetLatestBlockhashApi & _solana_kit.GetLeaderScheduleApi & _solana_kit.GetMaxRetransmitSlotApi & _solana_kit.GetMaxShredInsertSlotApi & _solana_kit.GetMinimumBalanceForRentExemptionApi & _solana_kit.GetMultipleAccountsApi & _solana_kit.GetProgramAccountsApi & _solana_kit.GetRecentPerformanceSamplesApi & _solana_kit.GetRecentPrioritizationFeesApi & _solana_kit.GetSignaturesForAddressApi & _solana_kit.GetSignatureStatusesApi & _solana_kit.GetSlotApi & _solana_kit.GetSlotLeaderApi & _solana_kit.GetSlotLeadersApi & _solana_kit.GetStakeMinimumDelegationApi & _solana_kit.GetSupplyApi & _solana_kit.GetTokenAccountBalanceApi & _solana_kit.GetTokenAccountsByDelegateApi & _solana_kit.GetTokenAccountsByOwnerApi & _solana_kit.GetTokenLargestAccountsApi & _solana_kit.GetTokenSupplyApi & _solana_kit.GetTransactionApi & _solana_kit.GetTransactionCountApi & _solana_kit.GetVersionApi & _solana_kit.GetVoteAccountsApi & _solana_kit.IsBlockhashValidApi & _solana_kit.MinimumLedgerSlotApi & _solana_kit.SendTransactionApi & _solana_kit.SimulateTransactionApi) | (_solana_kit.RequestAirdropApi & _solana_kit.GetAccountInfoApi & _solana_kit.GetBalanceApi & _solana_kit.GetBlockApi & _solana_kit.GetBlockCommitmentApi & _solana_kit.GetBlockHeightApi & _solana_kit.GetBlockProductionApi & _solana_kit.GetBlocksApi & _solana_kit.GetBlocksWithLimitApi & _solana_kit.GetBlockTimeApi & _solana_kit.GetClusterNodesApi & _solana_kit.GetEpochInfoApi & _solana_kit.GetEpochScheduleApi & _solana_kit.GetFeeForMessageApi & _solana_kit.GetFirstAvailableBlockApi & _solana_kit.GetGenesisHashApi & _solana_kit.GetHealthApi & _solana_kit.GetHighestSnapshotSlotApi & _solana_kit.GetIdentityApi & _solana_kit.GetInflationGovernorApi & _solana_kit.GetInflationRateApi & _solana_kit.GetInflationRewardApi & _solana_kit.GetLargestAccountsApi & _solana_kit.GetLatestBlockhashApi & _solana_kit.GetLeaderScheduleApi & _solana_kit.GetMaxRetransmitSlotApi & _solana_kit.GetMaxShredInsertSlotApi & _solana_kit.GetMinimumBalanceForRentExemptionApi & _solana_kit.GetMultipleAccountsApi & _solana_kit.GetProgramAccountsApi & _solana_kit.GetRecentPerformanceSamplesApi & _solana_kit.GetRecentPrioritizationFeesApi & _solana_kit.GetSignaturesForAddressApi & _solana_kit.GetSignatureStatusesApi & _solana_kit.GetSlotApi & _solana_kit.GetSlotLeaderApi & _solana_kit.GetSlotLeadersApi & _solana_kit.GetStakeMinimumDelegationApi & _solana_kit.GetSupplyApi & _solana_kit.GetTokenAccountBalanceApi & _solana_kit.GetTokenAccountsByDelegateApi & _solana_kit.GetTokenAccountsByOwnerApi & _solana_kit.GetTokenLargestAccountsApi & _solana_kit.GetTokenSupplyApi & _solana_kit.GetTransactionApi & _solana_kit.GetTransactionCountApi & _solana_kit.GetVersionApi & _solana_kit.GetVoteAccountsApi & _solana_kit.IsBlockhashValidApi & _solana_kit.MinimumLedgerSlotApi & _solana_kit.SendTransactionApi & _solana_kit.SimulateTransactionApi)>;
|
|
1950
|
+
declare const getSolanaProvider: ({ isTestnet, rpcUrl, }: {
|
|
1951
|
+
isTestnet: boolean;
|
|
1952
|
+
rpcUrl: string;
|
|
1953
|
+
}) => _solana_kit.RpcDevnet<(_solana_kit.GetAccountInfoApi & _solana_kit.GetBalanceApi & _solana_kit.GetBlockApi & _solana_kit.GetBlockCommitmentApi & _solana_kit.GetBlockHeightApi & _solana_kit.GetBlockProductionApi & _solana_kit.GetBlocksApi & _solana_kit.GetBlocksWithLimitApi & _solana_kit.GetBlockTimeApi & _solana_kit.GetClusterNodesApi & _solana_kit.GetEpochInfoApi & _solana_kit.GetEpochScheduleApi & _solana_kit.GetFeeForMessageApi & _solana_kit.GetFirstAvailableBlockApi & _solana_kit.GetGenesisHashApi & _solana_kit.GetHealthApi & _solana_kit.GetHighestSnapshotSlotApi & _solana_kit.GetIdentityApi & _solana_kit.GetInflationGovernorApi & _solana_kit.GetInflationRateApi & _solana_kit.GetInflationRewardApi & _solana_kit.GetLargestAccountsApi & _solana_kit.GetLatestBlockhashApi & _solana_kit.GetLeaderScheduleApi & _solana_kit.GetMaxRetransmitSlotApi & _solana_kit.GetMaxShredInsertSlotApi & _solana_kit.GetMinimumBalanceForRentExemptionApi & _solana_kit.GetMultipleAccountsApi & _solana_kit.GetProgramAccountsApi & _solana_kit.GetRecentPerformanceSamplesApi & _solana_kit.GetRecentPrioritizationFeesApi & _solana_kit.GetSignaturesForAddressApi & _solana_kit.GetSignatureStatusesApi & _solana_kit.GetSlotApi & _solana_kit.GetSlotLeaderApi & _solana_kit.GetSlotLeadersApi & _solana_kit.GetStakeMinimumDelegationApi & _solana_kit.GetSupplyApi & _solana_kit.GetTokenAccountBalanceApi & _solana_kit.GetTokenAccountsByDelegateApi & _solana_kit.GetTokenAccountsByOwnerApi & _solana_kit.GetTokenLargestAccountsApi & _solana_kit.GetTokenSupplyApi & _solana_kit.GetTransactionApi & _solana_kit.GetTransactionCountApi & _solana_kit.GetVersionApi & _solana_kit.GetVoteAccountsApi & _solana_kit.IsBlockhashValidApi & _solana_kit.MinimumLedgerSlotApi & _solana_kit.SendTransactionApi & _solana_kit.SimulateTransactionApi) | (_solana_kit.RequestAirdropApi & _solana_kit.GetAccountInfoApi & _solana_kit.GetBalanceApi & _solana_kit.GetBlockApi & _solana_kit.GetBlockCommitmentApi & _solana_kit.GetBlockHeightApi & _solana_kit.GetBlockProductionApi & _solana_kit.GetBlocksApi & _solana_kit.GetBlocksWithLimitApi & _solana_kit.GetBlockTimeApi & _solana_kit.GetClusterNodesApi & _solana_kit.GetEpochInfoApi & _solana_kit.GetEpochScheduleApi & _solana_kit.GetFeeForMessageApi & _solana_kit.GetFirstAvailableBlockApi & _solana_kit.GetGenesisHashApi & _solana_kit.GetHealthApi & _solana_kit.GetHighestSnapshotSlotApi & _solana_kit.GetIdentityApi & _solana_kit.GetInflationGovernorApi & _solana_kit.GetInflationRateApi & _solana_kit.GetInflationRewardApi & _solana_kit.GetLargestAccountsApi & _solana_kit.GetLatestBlockhashApi & _solana_kit.GetLeaderScheduleApi & _solana_kit.GetMaxRetransmitSlotApi & _solana_kit.GetMaxShredInsertSlotApi & _solana_kit.GetMinimumBalanceForRentExemptionApi & _solana_kit.GetMultipleAccountsApi & _solana_kit.GetProgramAccountsApi & _solana_kit.GetRecentPerformanceSamplesApi & _solana_kit.GetRecentPrioritizationFeesApi & _solana_kit.GetSignaturesForAddressApi & _solana_kit.GetSignatureStatusesApi & _solana_kit.GetSlotApi & _solana_kit.GetSlotLeaderApi & _solana_kit.GetSlotLeadersApi & _solana_kit.GetStakeMinimumDelegationApi & _solana_kit.GetSupplyApi & _solana_kit.GetTokenAccountBalanceApi & _solana_kit.GetTokenAccountsByDelegateApi & _solana_kit.GetTokenAccountsByOwnerApi & _solana_kit.GetTokenLargestAccountsApi & _solana_kit.GetTokenSupplyApi & _solana_kit.GetTransactionApi & _solana_kit.GetTransactionCountApi & _solana_kit.GetVersionApi & _solana_kit.GetVoteAccountsApi & _solana_kit.IsBlockhashValidApi & _solana_kit.MinimumLedgerSlotApi & _solana_kit.SendTransactionApi & _solana_kit.SimulateTransactionApi)> | _solana_kit.RpcMainnet<(_solana_kit.GetAccountInfoApi & _solana_kit.GetBalanceApi & _solana_kit.GetBlockApi & _solana_kit.GetBlockCommitmentApi & _solana_kit.GetBlockHeightApi & _solana_kit.GetBlockProductionApi & _solana_kit.GetBlocksApi & _solana_kit.GetBlocksWithLimitApi & _solana_kit.GetBlockTimeApi & _solana_kit.GetClusterNodesApi & _solana_kit.GetEpochInfoApi & _solana_kit.GetEpochScheduleApi & _solana_kit.GetFeeForMessageApi & _solana_kit.GetFirstAvailableBlockApi & _solana_kit.GetGenesisHashApi & _solana_kit.GetHealthApi & _solana_kit.GetHighestSnapshotSlotApi & _solana_kit.GetIdentityApi & _solana_kit.GetInflationGovernorApi & _solana_kit.GetInflationRateApi & _solana_kit.GetInflationRewardApi & _solana_kit.GetLargestAccountsApi & _solana_kit.GetLatestBlockhashApi & _solana_kit.GetLeaderScheduleApi & _solana_kit.GetMaxRetransmitSlotApi & _solana_kit.GetMaxShredInsertSlotApi & _solana_kit.GetMinimumBalanceForRentExemptionApi & _solana_kit.GetMultipleAccountsApi & _solana_kit.GetProgramAccountsApi & _solana_kit.GetRecentPerformanceSamplesApi & _solana_kit.GetRecentPrioritizationFeesApi & _solana_kit.GetSignaturesForAddressApi & _solana_kit.GetSignatureStatusesApi & _solana_kit.GetSlotApi & _solana_kit.GetSlotLeaderApi & _solana_kit.GetSlotLeadersApi & _solana_kit.GetStakeMinimumDelegationApi & _solana_kit.GetSupplyApi & _solana_kit.GetTokenAccountBalanceApi & _solana_kit.GetTokenAccountsByDelegateApi & _solana_kit.GetTokenAccountsByOwnerApi & _solana_kit.GetTokenLargestAccountsApi & _solana_kit.GetTokenSupplyApi & _solana_kit.GetTransactionApi & _solana_kit.GetTransactionCountApi & _solana_kit.GetVersionApi & _solana_kit.GetVoteAccountsApi & _solana_kit.IsBlockhashValidApi & _solana_kit.MinimumLedgerSlotApi & _solana_kit.SendTransactionApi & _solana_kit.SimulateTransactionApi) | (_solana_kit.RequestAirdropApi & _solana_kit.GetAccountInfoApi & _solana_kit.GetBalanceApi & _solana_kit.GetBlockApi & _solana_kit.GetBlockCommitmentApi & _solana_kit.GetBlockHeightApi & _solana_kit.GetBlockProductionApi & _solana_kit.GetBlocksApi & _solana_kit.GetBlocksWithLimitApi & _solana_kit.GetBlockTimeApi & _solana_kit.GetClusterNodesApi & _solana_kit.GetEpochInfoApi & _solana_kit.GetEpochScheduleApi & _solana_kit.GetFeeForMessageApi & _solana_kit.GetFirstAvailableBlockApi & _solana_kit.GetGenesisHashApi & _solana_kit.GetHealthApi & _solana_kit.GetHighestSnapshotSlotApi & _solana_kit.GetIdentityApi & _solana_kit.GetInflationGovernorApi & _solana_kit.GetInflationRateApi & _solana_kit.GetInflationRewardApi & _solana_kit.GetLargestAccountsApi & _solana_kit.GetLatestBlockhashApi & _solana_kit.GetLeaderScheduleApi & _solana_kit.GetMaxRetransmitSlotApi & _solana_kit.GetMaxShredInsertSlotApi & _solana_kit.GetMinimumBalanceForRentExemptionApi & _solana_kit.GetMultipleAccountsApi & _solana_kit.GetProgramAccountsApi & _solana_kit.GetRecentPerformanceSamplesApi & _solana_kit.GetRecentPrioritizationFeesApi & _solana_kit.GetSignaturesForAddressApi & _solana_kit.GetSignatureStatusesApi & _solana_kit.GetSlotApi & _solana_kit.GetSlotLeaderApi & _solana_kit.GetSlotLeadersApi & _solana_kit.GetStakeMinimumDelegationApi & _solana_kit.GetSupplyApi & _solana_kit.GetTokenAccountBalanceApi & _solana_kit.GetTokenAccountsByDelegateApi & _solana_kit.GetTokenAccountsByOwnerApi & _solana_kit.GetTokenLargestAccountsApi & _solana_kit.GetTokenSupplyApi & _solana_kit.GetTransactionApi & _solana_kit.GetTransactionCountApi & _solana_kit.GetVersionApi & _solana_kit.GetVoteAccountsApi & _solana_kit.IsBlockhashValidApi & _solana_kit.MinimumLedgerSlotApi & _solana_kit.SendTransactionApi & _solana_kit.SimulateTransactionApi)>;
|
|
1954
|
+
|
|
1955
|
+
declare const deserializeTransactionMessage: (payload: string, prov: SolanaProvider) => Promise<_solana_kit.CompilableTransactionMessage<_solana_kit.TransactionVersion, _solana_kit.IInstruction<string, readonly (_solana_kit.IAccountLookupMeta<string, string> | _solana_kit.IAccountMeta<string>)[]>>>;
|
|
1956
|
+
|
|
1957
|
+
declare const serializeSolanaTx: (tx: Transaction$2) => _solana_kit.Base64EncodedWireTransaction;
|
|
1958
|
+
|
|
1959
|
+
declare const transferSol: ({ from, to, amount, provider, }: {
|
|
1960
|
+
from: string;
|
|
1961
|
+
to: string;
|
|
1962
|
+
amount: bigint;
|
|
1963
|
+
provider: SolanaProvider;
|
|
1964
|
+
}) => Promise<_solana_kit.ITransactionMessageWithFeePayer<string> & Omit<_solana_kit.TransactionMessageWithBlockhashLifetime & Readonly<{
|
|
1965
|
+
instructions: readonly _solana_kit.IInstruction<string, readonly (_solana_kit.IAccountLookupMeta<string, string> | _solana_kit.IAccountMeta<string>)[]>[];
|
|
1966
|
+
version: 0;
|
|
1967
|
+
}>, "feePayer">>;
|
|
1968
|
+
|
|
1969
|
+
declare const transferToken: ({ from, to, mint, amount, decimals, provider, }: {
|
|
1970
|
+
from: string;
|
|
1971
|
+
to: string;
|
|
1972
|
+
mint: string;
|
|
1973
|
+
amount: bigint;
|
|
1974
|
+
decimals: number;
|
|
1975
|
+
provider: SolanaProvider;
|
|
1976
|
+
}) => Promise<_solana_kit.ITransactionMessageWithFeePayer<string> & Omit<_solana_kit.TransactionMessageWithBlockhashLifetime & Readonly<{
|
|
1977
|
+
instructions: readonly IInstruction<string, readonly (_solana_kit.IAccountLookupMeta<string, string> | _solana_kit.IAccountMeta<string>)[]>[];
|
|
1978
|
+
version: 0;
|
|
1979
|
+
}>, "feePayer">>;
|
|
1980
|
+
|
|
1981
|
+
declare const getSolanaDerivationPath: (accountIndex: number, withRoot?: boolean) => string;
|
|
1982
|
+
|
|
1983
|
+
declare const getSolanaPublicKeyFromLedger: (accountIndex: number, transport: Transport) => Promise<Buffer>;
|
|
1984
|
+
|
|
1985
|
+
declare class SolanaSigner {
|
|
1986
|
+
#private;
|
|
1987
|
+
constructor(privateKey: Buffer);
|
|
1988
|
+
static fromMnemonic(mnemonic: string, accountIndex: number): SolanaSigner;
|
|
1989
|
+
/**
|
|
1990
|
+
* @param message Base-64 encoded message bytes
|
|
1991
|
+
* @returns Base-64 encoded signature
|
|
1992
|
+
*/
|
|
1993
|
+
signMessage(message: string): Promise<string>;
|
|
1994
|
+
/**
|
|
1995
|
+
* @param base64EncodedTx Base-64 encoded transaction
|
|
1996
|
+
* @param provider SolanaProvider
|
|
1997
|
+
* @returns
|
|
1998
|
+
*/
|
|
1999
|
+
signTx(base64EncodedTx: string, provider: SolanaProvider): Promise<string>;
|
|
2000
|
+
}
|
|
2001
|
+
|
|
2002
|
+
declare class SolanaLedgerSigner {
|
|
2003
|
+
#private;
|
|
2004
|
+
constructor(accountIndex: number, transport: Transport);
|
|
2005
|
+
signTx(base64EncodedTx: string, provider: SolanaProvider): Promise<string>;
|
|
2006
|
+
}
|
|
2007
|
+
|
|
2008
|
+
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 };
|
|
2009
|
+
export type { BitcoinHistoryTx, BitcoinInputUTXO, BitcoinInputUTXOWithOptionalScript, BitcoinLedgerInputUTXO, BitcoinOutputUTXO, BitcoinTx, SolanaProvider };
|