#banking #swift #message-parser #generate #iso15022

swift-iso15022

Library for generating SWIFT messages following the ISO 15022 standard

4 releases

0.1.4-dev Jan 5, 2024
0.1.3-dev Jan 3, 2024
0.1.2-dev Jan 3, 2024
0.1.1-dev Jan 3, 2024

#125 in Finance

26 downloads per month

MIT license

205KB
4K SLoC

swift-iso15022-rust

Rust SWIFT ISO 15022 SDK

Rust SWIFT ISO 15022 SDK is a comprehensive library for handling SWIFT messages in Rust, focusing on the MT103 format initially and with plans to extend support to various ISO 15022 messages.

Features

  • MT103 Message Handling: Create and interpret SWIFT MT103 messages effortlessly.
  • Extensible Architecture: Designed to accommodate new ISO 15022 message types seamlessly.
  • Parsing and Serialization: Efficient parsing and serialization mechanisms for message manipulation.
  • Typed Structures: Well-defined Rust structs for different SWIFT message types.
  • Error Handling: Robust error handling for improved reliability.

Table of Contents

ISO 15022 Standard

The ISO 15022 standard is an international messaging standard developed by the International Organization for Standardization (ISO). It defines a set of principles to standardize financial messages exchanged between financial institutions and other participants in the financial industry.

Installation

Add the Rust SWIFT SDK to your Cargo.toml:

[dependencies]
swift_iso15022 = "0.1.2-dev"

Library usage example

use swift_iso15022::mt::{MessageTrait, Mt103};

fn main() {
    let input = "\
        :20:TEST-IBAN001\r\n\
        :13C:/SNDTIME/0701+0200\r\n\
        :23B:CRED\r\n\
        :32A:060804EUR18001,01\r\n\
        :33B:EUR18001,01\r\n\
        :50K:/KUNDE WO FOO FOO\r\n\
        SYMMACH. FOO OREOKASTRO-DIAVATA\r\n\
        GR-57008 FOO\r\n\
        GREECE\r\n\
        :52A://TAGRPRNKGRAAXXX052/S/20115\r\n\
        PRNKGRAAXXX\r\n\
        :57A:GENODE51LOS\r\n\
        :59:/DE66593922000000045500\r\n\
        FOO DER VOLKS-RAIFFEISENBANK\r\n\
        RAIFFEISENPLATZ\r\n\
        D-66787 WADGASSEN-HOSTENBACH\r\n\
        GERMANY\r\n\
        :70:TEST IBAN 01P DE\r\n\
        IBAN FOO\r\n\
        :71A:SHA";

    let input_parsed = Mt103::parse_str_swift(input).unwrap();
    assert_eq!(input_parsed.sender_reference.0, "TEST-IBAN001");
}

Dependencies

~10MB
~175K SLoC