/** * [NOTE] [AS] To break this modules dependency on Wrapper, search for * all references to 'p2p' imported from Wrapper and replace them with * a direct call to whatever Wrapper.p2p was calling */ import { P2P } from '@shardeum-foundation/lib-types'; /** FUNCTIONS */ export declare function init(): void; /** * Sets a global account by creating and broadcasting a transaction. * * This function performs the following steps: * 1. Logs the initiation of the setGlobal process if console logging is enabled. * 2. Checks if the current node is active. If not, logs a message and returns. * 3. Creates a transaction (`tx`) for setting a global account with the provided parameters. * 4. Signs the transaction (`signedTx`). * 5. Checks if the state manager is available and logs the state. * 6. Determines the nodes to which the transaction will be broadcasted. * 7. Finds the home node and consensus group for the current node. * 8. Removes the current node from the consensus group. * 9. Sets up a timeout and receipt handling mechanism to process receipts or handle timeouts. * 10. Broadcasts the transaction to the consensus group to trigger the creation of a receipt collection. * * @param address - The address of the global account to set. * @param addressHash - The hash of the address. * @param value - The value to set for the global account. * @param when - The timestamp or condition when the value should be set. * @param source - The source node initiating the transaction. * @param afterStateHash - The state hash after the transaction is applied. */ export declare function setGlobal(address: any, addressHash: any, value: any, when: any, source: any, afterStateHash: any): void; export declare function createMakeReceiptHandle(txHash: string): string; export declare function getGlobalTxReceipt(txHash: P2P.GlobalAccountsTypes.TxHash): P2P.GlobalAccountsTypes.GlobalTxReceipt | null; export declare function makeReceipt(signedTx: P2P.GlobalAccountsTypes.SignedSetGlobalTx, sender: P2P.P2PTypes.NodeInfo['id']): void; export declare function processReceipt(receipt: P2P.GlobalAccountsTypes.Receipt): boolean; export declare function attemptCleanup(): void;