PHP WebShell
Текущая директория: /usr/lib/node_modules/bitgo/node_modules/@bitgo/sdk-core/dist/src/bitgo/walletUtil
Просмотр файла: utxoMessageProof.d.ts
import * as utxolib from '@bitgo/utxo-lib';
import { IWallet } from '../wallet/iWallet';
export declare const MIDNIGHT_TNC_HASH = "31a6bab50a84b8439adcfb786bb2020f6807e6e8fda629b424110fc7bb1c6b8b";
type MessageInfo = {
message: string;
address: string;
};
type BulkMessageResponse = {
success: boolean;
numMessages: number;
transactions: Record<string, unknown>[];
};
export interface IMessageProvider {
/**
* Returns the messages and addresses that we want to sign. We call this function multiple times until there are no more
* messages. If there are no more messages, an empty array is returned. Note that we only return messages in sets of 200.
*/
getMessagesAndAddressesToSign(): Promise<MessageInfo[]>;
}
/**
* The Midnight drop service can return up to 1000 messages per request. However, UTXO coins
* can only have a maximum of 200 messages per transaction. We make this wrapper function that
* handles the pagination and batching of messages, keeping a local cache of the unprocessed messages.
*/
export declare class MidnightMessageProvider implements IMessageProvider {
private wallet;
private destinationAddress;
protected unprocessedMessagesCache: MessageInfo[];
protected network: utxolib.Network;
protected midnightClaimUrl: string;
protected prevId: string | undefined;
protected ranOnce: boolean;
private readonly numMessagesPerTransaction;
constructor(wallet: IWallet, destinationAddress: string);
getMessagesAndAddressesToSign(): Promise<MessageInfo[]>;
}
/**
* Bulk signs BIP322 messages for the Midnight airdrop.
* @param wallet The wallet to sign the messages with.
* @param destinationAddress The ADA address the rewards will get sent to
* @param walletPassphrase (Optional) The wallet passphrase of the wallet
*/
export declare function bulkSignBip322MidnightMessages(wallet: IWallet, destinationAddress: string, walletPassphrase?: string): Promise<BulkMessageResponse>;
export {};
//# sourceMappingURL=utxoMessageProof.d.ts.mapВыполнить команду
Для локальной разработки. Не используйте в интернете!