function MessageTypeMapping(code) {
    switch (code) {
        case MsgCodes.PublicMessage:
            return new PublicMessage();
        case MsgCodes.PrivateMessage:
            return new PrivateMessage();
        case MsgCodes.RevertedTx:
            return new RevertedTx();
        case MsgCodes.Offer:
            return new Offer();
        case MsgCodes.SignatureRequest:
            return new SignatureRequest();
        case MsgCodes.SettlementRequest:
            return new SettlementRequest();
        case MsgCodes.OutputMetadata:
            return new OutputMetadata();
        default:
            return null;
    }
}
// MessageTypeMapping holds a mapping of message codes to message types.
MessageTypeMapping holds a mapping of message codes to message types.
MessageTypeMapping holds a mapping of message codes to message types .
function MessageTypeMapping(code) {
    switch (code) {
        case MsgCodes.PublicMessage:
            return new PublicMessage();
        case MsgCodes.PrivateMessage:
            return new PrivateMessage();
        case MsgCodes.RevertedTx:
            return new RevertedTx();
        case MsgCodes.Offer:
            return new Offer();
        case MsgCodes.SignatureRequest:
            return new SignatureRequest();
        case MsgCodes.SettlementRequest:
            return new SettlementRequest();
        case MsgCodes.OutputMetadata:
            return new OutputMetadata();
        default:
            return null;
    }
}
function MessageTypeMapping ( code ) { switch ( code ) { case MsgCodes . PublicMessage : return new PublicMessage ( ) ; case MsgCodes . PrivateMessage : return new PrivateMessage ( ) ; case MsgCodes . RevertedTx : return new RevertedTx ( ) ; case MsgCodes . Offer : return new Offer ( ) ; case MsgCodes . SignatureRequest : return new SignatureRequest ( ) ; case MsgCodes . SettlementRequest : return new SettlementRequest ( ) ; case MsgCodes . OutputMetadata : return new OutputMetadata ( ) ; default : return null ; } }
MessageTypeMapping holds a mapping of message codes to message types.
MessageTypeMapping holds a mapping of message codes to message types .