Integra Development Help

V 1.0

 

Overview

The Integra Ledger utilizes Hyperledger Fabric and Hyperledger Composer with its block chain infrastructure. Smart Contracts execution and data access is performed  through a RESTful api. Global Legal Blockchain Consortium members run their own nodes and their identities are established through the Integra Ledger certificate authority. Integra Inc runs a publicly accessible API Gateway allowing non consumerism participants to interact with the Ledger.

 

Integra Inc. has produced the Integra Wallet. which allows users to generate and store PGP key pairs used to secure Ledger interactions. These keys are bound to an Integra account and also serve to facilitate then generation of an OAuth tokens which are used for general SaaS communication with the ledger following standard web development practices. 

 

Providing an additional layer of security, the wallet can act as a secure Proxy allowing for locally deployed application to communicate through a secured channel providing VPN like protection.

 

In addition, the wallet provides an embedded Node webserver allowing the for deployment and running of web based application with the wallet including offline capability.

 

Wallet

To begin,

·      Install and run the Wallet

·      From the Key Management Screen, Set the location and create a keychain.

·      Create a PGP key pair

 

Next

·      From the Login Screen create an Integra account. You must create the key pair first as these keys are used to encrypt the data during the account creation.

 

For standard Web Development

·      From the API screen, note the auth token.

·      Access the API setting the token in the header following the onscreen example.

·      Access the API as document in the API section

 

For development using the Wallet as a proxy

·      Launch the Wallet.

·      Access the API

·      Notice that you do not need to include the Token header like in standard development as the Wallet Proxy will perform the validation securely using you generated key pair.

 API

 

The first foundational service of the Integra Ledger provides the issuances of a unique legal identifier. String data can also be bound to the ID with current support for a value field and a metadata field. The API also provides methods to confirm the existence of the id and the existence of the value.

 

One common use case is for a user to create a SHA 256 Hash of a PDF document and register the hash on the Integra Ledger. The call returns a GUID as an identifier which the client can then store as a foreign key. NetDocuments executed this design in one of the early Integra proof of concepts.

 

The current API provides 3 end point

 

·      registerIdentity

·      identityExists

·      valueExists

 

For testing purposes use http://integrawalletproxy.azurewebsites.net/fwd/api/as the base endpoint address.

 

All calls to the ledger must go through the Wallet Proxy or must include the following header with the token is obtained from the API screen of the Wallet.

 

Content_Type : application/x-www-form-urlencoded

Authorization : Bearer token_from_wallet

 

 

registerIdentity (GET)

 

Register a new identity on the Integra Ledger passing in

·      type – use whatever string you want as the name space

·      value (optional) – the value to be stored. In the example we are using a SHA256 Has of a document

·      metadata (optional) – pass any metadata as a string

 

http://integrawalletproxy.azurewebsites.net/fwd/api/registerIdentity?type=com.integraledger.document&value=84105b92e3907e2140e2e54117a6bc0811185f50&metadata=testMetaData

 

returns

 

{  
   
"identityId":"b3e6bdea-2305-4bc0-aec7-f1b4d114dbc3"
}

 

identityExists (GET)

 

Check for the existence of an identity on the Integra Ledger passing in

·      id – the identity to check for

 

 

http://integrawalletproxy.azurewebsites.net/fwd/api/identityExists?id=b3e6bdea-2305-4bc0-aec7-f1b4d114dbc3

 

returns

 

{  
   
"exists":true,
   
"data":[  
      
{  
         
"$class":"com.integraledger.identityregistry.IntegraIdentity",
         
"identityId":"b3e6bdea-2305-4bc0-aec7-f1b4d114dbc3",
         
"identityType":"com.integraledger.document",
         
"creationDate":"2018-02-22T21:38:19.022Z",
         
"value":"84105b92e3907e2140e2e54117a6bc0811185f50",

    "metaData":"testMetaData"
      
}
   
]
}

 

 

valueExists

 

Check for the existence of a value on the Integra Ledger passing in

·      value – the value to check for

 

 

 

http://integrawalletproxy.azurewebsites.net/fwd/api/valueExists?value=84105b92e3907e2140e2e54117a6bc0811185f50

 

return

{  
   
"exists":true,
   
"data":[  
      
{  
         
"$class":"com.integraledger.identityregistry.HashVal",
         
"value":"84105b92e3907e2140e2e54117a6bc0811185f50",
         
"creationDate":"2018-02-22T21:38:19.030Z",
         
"identityId":"b3e6bdea-2305-4bc0-aec7-f1b4d114dbc3",
         
"metaData":"testMetaData"
      
}
   
]
}