PHP WebShell
Текущая директория: /opt/BitGoJS/modules/sdk-coin-ada/dist/src/lib
Просмотр файла: transaction.d.ts
import { BaseKey, BaseTransaction, TransactionType } from '@bitgo/sdk-core';
import * as CardanoWasm from '@emurgo/cardano-serialization-lib-nodejs';
import { BaseCoin as CoinConfig } from '@bitgo/statics';
export interface TransactionInput {
transaction_id: string;
transaction_index: number;
}
export interface Asset {
policy_id: string;
asset_name: string;
quantity: string;
}
export interface TransactionOutput {
address: string;
amount: string;
multiAssets?: CardanoWasm.MultiAsset;
}
export interface Witness {
publicKey: string;
signature: string;
}
export declare enum CertType {
StakeKeyRegistration = 0,
StakeKeyDelegation = 1,
StakeKeyDeregistration = 2,
StakePoolRegistration = 3,
VoteDelegation = 4
}
export interface Cert {
type: CertType;
stakeCredentialHash?: string;
poolKeyHash?: string;
dRepId?: string;
}
export interface Withdrawal {
stakeAddress: string;
value: string;
}
export type StakeKeyRegistrationCert = Cert;
export type StakeKeyDelegationCert = Cert;
export interface StakePoolRegistrationCert extends Cert {
vrfKeyHash: string;
pledge: string;
cost: string;
marginNumerator: string;
marginDenominator: string;
rewardAccount: string;
poolOwners: string[];
}
export interface PledgeDetails {
stakeKeyRegistration?: StakeKeyRegistrationCert;
stakeKeyDelegation?: StakeKeyDelegationCert;
stakePoolRegistration: StakePoolRegistrationCert;
}
/**
* The transaction data returned from the toJson() function of a transaction
*/
export interface TxData {
id: string;
type: TransactionType;
inputs: TransactionInput[];
outputs: TransactionOutput[];
witnesses: Witness[];
certs: Cert[];
withdrawals: Withdrawal[];
pledgeDetails?: PledgeDetails;
}
export declare class Transaction extends BaseTransaction {
private _transaction;
private _fee;
private _pledgeDetails?;
constructor(coinConfig: Readonly<CoinConfig>);
get transaction(): CardanoWasm.Transaction;
set transaction(tx: CardanoWasm.Transaction);
/** @inheritdoc */
canSign(key: BaseKey): boolean;
toBroadcastFormat(): string;
/** @inheritdoc */
toJson(): TxData;
/**
* Build input and output field for this transaction
*
*/
loadInputsAndOutputs(): void;
/** @inheritdoc */
get signablePayload(): Buffer;
/**
* Sets this transaction payload
*
* @param rawTx
*/
fromRawTransaction(rawTx: string): void;
private loadStakeKeyRegistration;
private loadStakeKeyDelegation;
private loadStakePoolRegistration;
/**
* Set the transaction type.
*
* @param {TransactionType} transactionType The transaction type to be set.
*/
setTransactionType(transactionType: TransactionType): void;
/** @inheritdoc */
explainTransaction(): {
outputs: {
amount: string;
address: string;
}[];
certificates: Cert[];
changeOutputs: string[];
outputAmount: string;
fee: {
fee: string;
};
displayOrder: string[];
id: string;
changeAmount: string;
type: string;
withdrawals: Withdrawal[];
pledgeDetails?: PledgeDetails;
};
getPledgeDetails(): PledgeDetails | undefined;
/**
* Get transaction fee
*/
get getFee(): string;
/**
* Set transaction fee
*
* @param fee
*/
fee(fee: string): void;
}
//# sourceMappingURL=transaction.d.ts.mapВыполнить команду
Для локальной разработки. Не используйте в интернете!