A sample web service app written using Spring Boot to showcase sending a Swift Transaction and as well as decoding them.
Java 1.8 nem-apps-libgit clone https://github.com/NEMPH/nem-apps-lib.git
cd nem-apps-lib
mvn clean install
Import it as a maven dependency
<dependency>
<groupId>io.nem.apps</groupId>
<artifactId>nem-apps-lib</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
ConfigurationBuilder.nodeNetworkName("mijinnet").nodeNetworkProtocol("http")
.nodeNetworkUri("a1.dfintech.com").nodeNetworkPort("7895")
.setup();
Method: POST
Endpoint URL: mpmsf/transaction/transfer/multisig/announce
Post Parameter format:
{"multisigPrivateKey":"<multisig account private key>","senderPrivateKey":"<sender private key>","recepientPublicKey":"<recepient public key>","accountNumber":"<bank account number>","swiftMessage":"<Swift>"}
Method: POST
Endpoint URL: mpmsf/transaction/transfer/multisig/cosign
Post Parameter format:
{"signers":[{"<signer private key1>","<signer private key2>"},"multisigHash":"<multisig hash>","multisigPublicKey":"<multisig account public key>"}
Output: Transaction Hash
Method: POST
Endpoint URL: mpmsf/transaction/transfer/announce
Post Parameter format:
{"senderPrivateKey":"<sender private key>","recepientPublicKey":"<recepient public key>","accountNumber":"<bank account number>","swiftMessage":"<Swift>"}
Output: Transaction Hash
Method: POST
Endpoint URL: mpmsf/transaction/hash/decode
Post Parameter format:
{"senderPrivateKey":"<sender private key>","recepientPublicKey":"<recepient public key>","hash":"<transaction hash>"}
Output: Decoded Transaction Message (Swift Message)
The project is a Spring Boot Web Service Project. It can be excuted by running the spring boot command to bring up the embedded tomcat.mvn clean install
Copyright (c) 2017