/// import BigNumber from 'bignumber.js'; import { BaseCoin as CoinConfig } from '@bitgo-beta/statics'; import { BaseAddress, BaseKey, BaseTransactionBuilder, FeeOptions, PublicKey as BasePublicKey, TransactionType } from '@bitgo-beta/sdk-core'; import { Transaction } from './transaction'; import { Blockhash, Transaction as SolTransaction } from '@solana/web3.js'; import { KeyPair } from '.'; import { DurableNonceParams, InstructionParams, Nonce } from './iface'; export declare abstract class TransactionBuilder extends BaseTransactionBuilder { protected _transaction: Transaction; private _signatures; private _lamportsPerSignature; protected _sender: string; protected _recentBlockhash: Blockhash; protected _nonceInfo: Nonce; protected _instructionsData: InstructionParams[]; protected _signers: KeyPair[]; protected _memo?: string; protected _feePayer?: string; constructor(_coinConfig: Readonly); /** * The transaction type. */ protected abstract get transactionType(): TransactionType; /** * Initialize the transaction builder fields using the decoded transaction data * * @param {Transaction} tx the transaction data */ initBuilder(tx: Transaction): void; /** @inheritdoc */ protected fromImplementation(rawTransaction: string): Transaction; /** @inheritdoc */ protected buildImplementation(): Promise; /** * Builds the solana transaction. */ protected buildSolTransaction(): SolTransaction; /** @inheritdoc */ protected get transaction(): Transaction; /** @inheritdoc */ protected set transaction(transaction: Transaction); /** @inheritdoc */ protected signImplementation(key: BaseKey): Transaction; /** @inheritDoc */ addSignature(publicKey: BasePublicKey, signature: Buffer): void; /** * Sets the sender of this transaction. * This account will be responsible for paying transaction fees. * * @param {string} senderAddress the account that is sending this transaction * @returns {TransactionBuilder} This transaction builder */ sender(senderAddress: string): this; /** * Set the transaction nonce * Requires both optional params in order to use the durable nonce * * @param {Blockhash} blockHash The latest blockHash * @param {DurableNonceParams} [durableNonceParams] An object containing the walletNonceAddress and the authWalletAddress (required for durable nonce) * @returns {TransactionBuilder} This transaction builder */ nonce(blockHash: Blockhash, durableNonceParams?: DurableNonceParams): this; /** * Set the memo * * @param {string} memo * @returns {TransactionBuilder} This transaction builder */ memo(memo: string): this; fee(feeOptions: FeeOptions): this; feePayer(feePayer: string): this; /** @inheritdoc */ validateAddress(address: BaseAddress, addressFormat?: string): void; /** @inheritdoc */ validateKey(key: BaseKey): void; /** @inheritdoc */ validateRawTransaction(rawTransaction: string): void; /** @inheritdoc */ validateTransaction(transaction?: Transaction): void; /** @inheritdoc */ validateValue(value: BigNumber): void; /** Validates the memo * * @param {string} memo - the memo as string */ validateMemo(memo: string): void; /** * Validates that the given key is not already in this._signers * * @param {BaseKey} key - The key to check */ private checkDuplicatedSigner; /** * Validates that the sender field is defined */ private validateSender; /** * Validates that the nonce field is defined */ private validateNonce; } //# sourceMappingURL=transactionBuilder.d.ts.map