Initializing FastTrack API

Before initializing FastTrack API, you have to check the state of FastTrack API if it has been configured previously.

To check the state of FastTrack API:


If the state of FastTrack API is set to true, you can call the following code snippet to get the instance of FastTrack API:

FastTrack fastTrack = FastTrack.getInstance();

If the state of FastTrack API is set to false, you can start the initialization of FastTrack API using the following code snippet:

// 1. This is entry point for initialization the FastTrack API.

TransactionSignatureKey signKey = new TransactionSignatureKey(MessengerConfigurations.getSignaturePublicKeyPem());

new FastTrack.Builder(this.getApplicationContext())
                .withMspObfuscationKeys(Collections.singletonList(MessengerConfigurations.getObfuscationKey())) //for MSP
                .withMspVerificationKeys(Collections.singletonList(signKey)) // For MSP

In FastTrack API, to pass an optional parameter, use the .withxxxxx() method.

To use the Transaction Signing service, the obfuscation Keys .withMspObfuscationKeys() and the verification Key .withMspVerificationKeys() are required.