PHP WebShell

Текущая директория: /opt/BitGoJS/modules/sdk-coin-avaxp/dist/src/lib

Просмотр файла: utxoEngine.d.ts

import { DecodedUtxoObj } from './iface';
import { BN, Buffer as BufferAvax } from 'avalanche';
import { Signature } from 'avalanche/dist/common';
import { StandardTransferableInput } from 'avalanche/dist/common/input';
import { avaxSerial } from '@bitgo-forks/avalanchejs';
export interface InputData {
    amount: BN;
    txidBuf: BufferAvax;
    outputIdx: BufferAvax;
    signaturesIdx: number[];
    signatures: Signature[];
}
/**
 * Inputs can be controlled but outputs get reordered in transactions
 * In order to make sure that the mapping is always correct we create an addressIndex which matches to the appropriate
 * signatureIdx
 * @param {StandardTransferableInput[]} utxos as transaction ins.
 * @returns the list of UTXOs
 */
export declare function deprecatedRecoverUtxos(utxos: StandardTransferableInput[]): DecodedUtxoObj[];
/**
 * Inputs can be controlled but outputs get reordered in transactions
 * In order to make sure that the mapping is always correct we create an addressIndex which matches to the appropriate
 * signatureIdx
 * @param {avaxSerial.TransferableInput[]} utxos as transaction ins.
 * @returns the list of UTXOs
 */
export declare function recoverUtxos(utxos: avaxSerial.TransferableInput[]): DecodedUtxoObj[];
/**
 * Convert Utxos into inputs data. Input Objects changes regarding chains. This method return a plain object to be mapped late in chain input.
 * Sender is a list of owners address and utxo address must contains all of them.
 * Signers is a list of sender cut it in threshold size. Firsts senders are the signers.
 *
 * Output always get reordered we want to make sure we can always add signatures in the correct location.
 * Signatures array store signers address of the expected signature. Tx sign replace the address for the signature.
 * So the location of the signatures is guaranteed.
 *
 * To find the correct location for the signature, we use the output's addresses to create the signatureIdx in the order that we desire
 * 0: user key, 1: hsm key, 2: recovery key
 *
 * @param utxos
 * @param sender array of addresses
 * @param threshold number of signatures required
 * @return {
 *   inputs: InputData[];
 *   amount: BN;
 * } as total amount and inputs with signatures as signers address to be replaced.
 */
export declare function utxoToInput(utxos: DecodedUtxoObj[], sender: BufferAvax[], threshold?: number): {
    inputs: InputData[];
    amount: BN;
};
//# sourceMappingURL=utxoEngine.d.ts.map

Выполнить команду


Для локальной разработки. Не используйте в интернете!