/// /// import { BaseCoin as CoinConfig, AvalancheNetwork } from '@bitgo/statics'; import { BaseKey, BaseTransaction, TransactionType } from '@bitgo/sdk-core'; import { KeyPair } from './keyPair'; import { DecodedUtxoObj, TxData } from './iface'; import { UnsignedTx, BaseTx } from 'avalanche/dist/apis/platformvm'; import { BN, Buffer as BufferAvax } from 'avalanche'; import { Credential, Signature } from 'avalanche/dist/common'; export declare class Transaction extends BaseTransaction { protected _avaxpTransaction: UnsignedTx; private _credentials; _type: TransactionType; _network: AvalancheNetwork; _networkID: number; _assetId: BufferAvax; _blockchainID: BufferAvax; _memo?: BufferAvax; _threshold: number; _locktime: BN; _fromPubKeys: BufferAvax[]; _utxos: DecodedUtxoObj[]; _txFee: BN; constructor(coinConfig: Readonly); get avaxPTransaction(): BaseTx; set avaxPTransaction(tx: BaseTx); get signature(): string[]; set credentials(credentials: Credential[]); get credentials(): Credential[]; get hasCredentials(): boolean; /** @inheritdoc */ canSign({ key }: BaseKey): boolean; /** * Sign a avaxp transaction and update the transaction hex * validator, delegator, import, exports extend baseTx * unsignedTx: UnsignedTx = new UnsignedTx(baseTx) (baseTx = addValidatorTx) * const tx: Tx = unsignedTx.sign(keychain) (tx is type standard signed tx) * get baseTx then create new unsignedTx then sign * * @param {KeyPair} keyPair */ sign(keyPair: KeyPair): void; /** @inheritdoc */ /** * should be of signedTx doing this with baseTx */ toBroadcastFormat(): string; toJson(): TxData; setTransaction(tx: UnsignedTx): void; /** * Set the transaction type * * @param {TransactionType} transactionType The transaction type to be set */ setTransactionType(transactionType: TransactionType): void; /** * Returns the portion of the transaction that needs to be signed in Buffer format. * Only needed for coins that support adding signatures directly (e.g. TSS). */ get signablePayload(): Buffer; /** * Avax wrapper to create signature and return it for credentials * @param prv */ createSignature(prv: Buffer): Signature; } //# sourceMappingURL=transaction.d.ts.map