import { RpcProvider } from "./rpc-provider"; import { BigNumberish } from "./types"; export interface L1ToL2Message { l2_contract_address: string; entry_point_selector: string; l1_contract_address: string; payload: Array; paid_fee_on_l1: string; nonce: string; } export interface L2ToL1Message { from_address: string; payload: string[]; to_address: string; } export interface FlushResponse { messages_to_l1: Array; messages_to_l2: Array; generated_l2_transactions: Array; l1_provider: string; } export interface LoadL1MessagingContractResponse { messaging_contract_address: string; } export interface L1ToL2MockTxRequest { l2_contract_address: string; l1_contract_address: string; entry_point_selector: string; payload: Array; nonce: string; paidFeeOnL1: string; } export interface L1ToL2MockTxResponse { transaction_hash: string; } export interface L2ToL1MockTxRequest { l2_contract_address: string; l1_contract_address: string; payload: Array; } export interface L2ToL1MockTxResponse { message_hash: string; } /** * https://starknet-io.github.io/starknet-devnet/docs/postman */ export declare class Postman { private rpcProvider; constructor(rpcProvider: RpcProvider); /** * https://starknet-io.github.io/starknet-devnet/docs/postman#flush */ flush(additionalArgs?: { dryRun: boolean; }): Promise; /** * If `address` specified, tries to load an L1 messaging contract from that address. * If `address` omitted, deploys a new messaging contract by relying on the first predeployed * account of the L1 network specified with `networkUrl`, assuming default mnemonic seed. * If this predeployed account assumption does not hold, you should specify the private key * of the account to be used in `deployerAccountPrivateKey`. * More info in: https://starknet-io.github.io/starknet-devnet/docs/postman#load */ loadL1MessagingContract(networkUrl: string, messagingContractAddress?: string, deployerAccountPrivateKey?: string): Promise; /** * https://starknet-io.github.io/starknet-devnet/docs/postman#mock-transactions */ sendMessageToL2(l2ContractAddress: string, entryPointSelector: string, l1ContractAddress: string, payload: BigNumberish[], nonce: BigNumberish, paidFeeOnL1: BigNumberish): Promise; /** * https://starknet-io.github.io/starknet-devnet/docs/postman#l2-l1 */ consumeMessageFromL2(fromAddress: string, toAddress: string, payload: BigNumberish[]): Promise; }