import { Address , BigNumberish , BigNumberJson , Bytes32 , HexString } from "./basic" ; import { AppIdentity , MultisigOperation , ContractAddresses } from "./contracts" ; import { enumify } from "./utils" ; export type MinimalTransaction = { to : Address ; value : BigNumberish ; data : HexString ; } ; export interface EthereumCommitment { signatures : string [ ] ; encode ( ) : HexString ; hashToSign ( ) : Bytes32 ; getSignedTransaction ( ) : Promise < MinimalTransaction > ; } export const CommitmentTypes = enumify ( { Conditional : "conditional" , SetState : "setState" , Setup : "setup" , Withdraw : "withdraw" , } ) ; export type CommitmentTypes = typeof CommitmentTypes [ keyof typeof CommitmentTypes ] ; export type MultisigTransaction = MinimalTransaction & { operation : MultisigOperation ; } ; export type SetStateCommitmentJSON = { readonly appIdentity : AppIdentity ; readonly appIdentityHash : HexString ; readonly appStateHash : HexString ; readonly challengeRegistryAddress : Address ; readonly signatures : string [ ] ; readonly stateTimeout : BigNumberJson ; readonly versionNumber : BigNumberJson ; readonly transactionData : HexString ; } ; export type ConditionalTransactionCommitmentJSON = { readonly appIdentityHash : HexString ; readonly contractAddresses : ContractAddresses ; readonly freeBalanceAppIdentityHash : HexString ; readonly interpreterAddr : Address ; readonly interpreterParams : HexString ; readonly multisigAddress : Address ; readonly multisigOwners : Address [ ] ; readonly signatures : string [ ] ; readonly transactionData : HexString ; } ;