PHP WebShell

Текущая директория: /usr/lib/node_modules/bitgo/node_modules/@bitgo/sdk-coin-xtz/dist/src/lib

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

import { IndexedSignature, OriginationData, OriginationOp, RevealOp, TransactionOp, TransferData } from './iface';
/**
 * Helper method to get the transfer details from a generic multisig transaction operation.
 *
 * @param {TransactionOp} operation A transaction operation JSON
 * @returns {TransferData} Information about the destination, token and transfer amount
 */
export declare function getMultisigTransferDataFromOperation(operation: TransactionOp): TransferData;
/**
 *  Helper method to get the wallet or address initialization tx from an origination operation
 *
 * @param {OriginationOp} operation
 * @returns {OriginationData} Information about the wallet contract creating a forwarder contract
 */
export declare function getOriginationDataFromOperation(operation: OriginationOp): OriginationData;
/**
 * Helper method to build a singlesig transaction operation.
 *
 * @param {string} counter Source account next counter
 * @param {string} source The account that will pay for fees, and in singlesig transactions, where
 *        the funds are taken from
 * @param {string} amount The amount in mutez to be transferred
 * @param {string} destination The account address to send the funds to
 * @param {string} fee Fees in mutez to pay by the source account
 * @param {string} gasLimit Maximum amount in mutez to spend in gas fees
 * @param {string} storageLimit Maximum amount in mutez to spend in storage fees
 * @returns {TransactionOp}A Tezos transaction operation
 */
export declare function singlesigTransactionOperation(counter: string, source: string, amount: string, destination: string, fee?: string, gasLimit?: string, storageLimit?: string): TransactionOp;
/**
 * Create a multisig wallet transaction operation.
 *
 * @see {@link transactionOperation}
 * @param {string} counter Source account next counter
 * @param {string} source The account that will pay for fees, and in singlesig transactions, where
 *        the funds are taken from
 * @param {string} amount The amount in mutez to be transferred
 * @param {string} contractAddress If it is a multisig transfer, the smart contract address with the
 *        funds to be transferred from
 * @param {string} contractCounter If it is a multisig transfer, the smart contract counter to use
 *        in the next transaction
 * @param {string} destinationAddress An implicit or originated address to transfer fudns to
 * @param {string[]} signatures signatures List of signatures authorizing the funds transfer form
 *        the multisig wallet
 * @param {string} fee Fees in mutez to pay by the source account
 * @param {string} gasLimit Maximum amount in mutez to spend in gas fees
 * @param {string} storageLimit Maximum amount in mutez to spend in storage fees
 * @param {number} m The number of signers (owners) for the multisig wallet being used. Default is 3
 * @returns {TransactionOp} A Tezos operation with a generic multisig transfer
 */
export declare function multisigTransactionOperation(counter: string, source: string, amount: string, contractAddress: string, contractCounter: string, destinationAddress: string, signatures: IndexedSignature[], fee?: string, gasLimit?: string, storageLimit?: string, m?: number): TransactionOp;
/**
 * Replace the signatures in a multisig transaction operation with new ones.
 *
 * @param {TransactionOp} transaction Transaction to mutate
 * @param {IndexedSignature[]} signatures List of transactions and their order
 */
export declare function updateMultisigTransferSignatures(transaction: TransactionOp, signatures: IndexedSignature[]): void;
/**
 * Ge the list if multisig signatures if any in a convenient format.
 *
 * @param {TransactionOp} transaction The transaction to search the signatures in
 * @returns {IndexedSignature[]} A list of signatures and their order in teh transfer script
 */
export declare function getMultisigTransferSignatures(transaction: TransactionOp): IndexedSignature[];
/**
 * Helper function to build the Michelson script to be signed to transfer funds from a multisig
 * wallet.
 *
 * @param contractAddress The multisig smart contract address
 * @param {string} destinationAddress The destination account address (implicit or originated)
 * @param {number} amount Number of mutez to transfer
 * @param {string} contractCounter Wallet counter to use in the transaction
 * @returns A JSON representation of the Michelson script to sign and approve a transfer
 */
export declare function genericMultisigDataToSign(contractAddress: string, destinationAddress: string, amount: string, contractCounter: string): {
    data: {
        prim: string;
        args: any[];
    };
    type: {
        prim: string;
        args: any[];
    };
};
/**
 * Create a reveal operation for a public key.
 *
 * @param {string} counter Source account next counter
 * @param {string} source Source account address
 * @param {string} pubKey The public key to reveal
 * @param {string} fee Fees in mutez to pay by the source account
 * @param {string} gasLimit Maximum amount in mutez to spend in gas fees
 * @param {string} storageLimit Maximum amount in mutez to spend in storage fees
 * @returns An origination operation
 */
export declare function revealOperation(counter: string, source: string, pubKey: string, fee?: string, gasLimit?: string, storageLimit?: string): RevealOp;
/**
 * Create an origination operation for the generic multisg contract. It does not create a reveal
 * operation for the source account.
 *
 * @param {string} counter Valid source account counter to use
 * @param {string} source Source account address
 * @param {string} fee Fees in mutez to pay by the source account
 * @param {string} gasLimit Maximum amount in mutez to spend in gas fees
 * @param {string} storageLimit Maximum amount in mutez to spend in storage fees
 * @param {string} balance New multisig account initial balance taken from the source account
 * @param {string[]} pubKeys List of public keys of the multisig owner
 * @param {string} delegate Optional implicit address to delegate the wallet funds to
 * @param {number} threshold Minimum number of signatures required to authorize a multisig operation
 * @returns An origination operation
 */
export declare function genericMultisigOriginationOperation(counter: string, source: string, fee: string, gasLimit: string, storageLimit: string, balance: string, pubKeys: string[], delegate?: string, threshold?: number): OriginationOp;
/**
 * Get the public key of each owner of an multisig wallet origination contract.
 *
 * @param {OriginationOp} operation An operation with the generic multisig wallet origination
 * @returns {string[]} List of all the owners set in the origination transaction
 */
export declare function getOwnersPublicKeys(operation: OriginationOp): string[];
/**
 * Create an origination operation for a forwarder contract
 *
 * @param {string} contractAddress originated multisig address to forward funds
 * @param {string} counter Valid source account counter to use
 * @param {string} source Source account address
 * @param {string} fee Fees in mutez to pay by the source account
 * @param {string} gasLimit Maximum amount in mutez to spend in gas fees
 * @param {string} storageLimit Maximum amount in mutez to spend in storage fees
 * @param {string} balance New multisig account initial balance taken from the source account
 * @returns {OriginationOp} the operation
 */
export declare function forwarderOriginationOperation(contractAddress: string, counter: string, source: string, fee: string, gasLimit: string, storageLimit: string, balance: string): OriginationOp;
//# sourceMappingURL=multisigUtils.d.ts.map

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


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