Class Gateway

  • java.lang.Object

    • io.keychain.core.Gateway

public class Gateway

Gateway

Gateway manages Personas, Contacts, all associated private keys (blockchain and application). This class performs all blockchain network requests, all database interactions, and performs application-level cryptographic operations encrypt, decrypt, sign, and verify.

Static Methods

Return type Method and Description

static Context

initialize(android.content.Context context)

Initialize the module database

static.java.io.File

unarchiveFile(android.content.Context context, java.lang.String filename)

Load the configuration file from the APK package

Constructor Summary

Constructor and Description

Gateway(Context keychainContext, android.content.Context androidContext)

Instance Methods

Return type Method and Description

Asset

createAsset(java.lang.String assetName)

Create/issue custom digital asset

Contact

createContact(java.lang.String name, java.lang.String subName, Uri encryptionUri, Uri signatureUri)

Create a contact

Persona

createPersona(java.lang.String name, java.lang.String subName, SecurityLevel secLevel)

Create a new Persona and set the active person to the new Persona

btye[]

decryptThenVerify(java.lang.String cipherText)`

Decrypt then verify data using the active Persona

java.lang.String

decryptThenVerifyString(java.lang.String cipherText)

Decrypt then verify data to a string using the active Persona

void

deleteContact(Contact contact)

Delete a contact

void

deletePersona(Persona persona)

Delete a persona

java.util.ArrayList<Contact>

getContacts()

Get the set of contacts of the active Persona

java.util.ArrayList<Persona>

getPersonas()

Get the set of personas

Persona

getActivePersona()

Get the active persona

Persona

setActivePersona()

Set the active persona

void

rename(Facade facade, java.lang.String nameName, java.lang.String newSubName)

Rename facade

int

seed()

Seed the wallet

java.lang.String

signThenEncrypt(java.util.ArrayList<Contact> contactList, byte[] clearText)

Sign then encrypt data using the active Persona

java.lang.String

signThenEncrypt(java.util.ArrayList<Contact> contactList, byte[] clearText)

Sign then encrypt data using the active Persona

Transaction

transferAsset(Asset asset, Contact receiver, long amount)

Create a transaction that sends the asset to the specified receiver

Transaction

updateLedger(Transaction trxn)

Update local ledger with transaction from peers.