Skip to content
This repository has been archived by the owner on Jul 12, 2019. It is now read-only.

Commit

Permalink
documentation changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
kedarchandrayan committed Jan 23, 2018
1 parent d1644a0 commit eaabea2
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 49 deletions.
57 changes: 57 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,60 @@
OpenST-Platform
============

OpenST Platform is a npm package exposing all the needed functionalities provided by OpenST-Protocol.

# Install OpenST Platform

```bash
npm install @openstfoundation/openst-platform --save
```

# Set EVN Variables
Populate all the needed environment variables in test/open_st_env_vars.sh file and then source it.

##### Source the environment variable file:
```bash
source test/open_st_env_vars.sh
```

# Example:

Require the npm package to start using the exported functionalities.

```js
const openSTPlatform = require('@openstfoundation/openst-platform')
```

## On-Boarding Services

For on-boarding partner companies, we have 2 services:
- **propose branded token** - To start the registration process, a propose step is needed.

```js
openSTPlatform.services.onBoarding.proposeBt(
'0x8312731f3c4446b6aae61caebdf9c9249409f140', // address which will perform proposal transaction
'testtest', // passphrase of the address above
'KC', // symbol of the branded token
'Kedar Coin', // name of the branded token
100 // how many branded tokens will 1 OST correspond to
)
```

This returns a Promise, which resolves into transaction hash of the proposal transaction.

- **get registration status** - The transaction hash which is obtained above, can be used to fetch the current status of the registration.

```js
proposalTxHash = '0x55ee82802027eb83e45ac33ba8e681765f141cd5781d4a6e2fcd57e56276519e'
openSTPlatform.services.onBoarding.getRegistrationStatus(
proposalTxHash // this is the transaction hash which is obtained while proposing the branded token
)
```

This returns a Promise which resolves to an object having the ERC20 contract address of the branded token, uuid of the
branded token and various flags signifying the steps which are done and pending.


# [OpenST platform](https://simpletoken.org) - bridging cryptocurrencies and mainstream consumer apps

While OpenST 0.9 is available as-is for anyone to use, we caution that this is early stage software and under heavy ongoing development and improvement. Please report bugs and suggested improvements.
Expand Down
5 changes: 0 additions & 5 deletions config/core_addresses.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ const allAddresses = {
passphrase: process.env.OST_FOUNDATION_PASSPHRASE
},

company: {
address: process.env.OST_COMPANY_ADDR,
passphrase: process.env.OST_COMPANY_PASSPHRASE
},

utilityChainOwner: {
address: process.env.OST_UTILITY_CHAIN_OWNER_ADDR,
passphrase: process.env.OST_UTILITY_CHAIN_OWNER_PASSPHRASE
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ const OpenSTPlatform = function () {
oThis.helpers.transactionLogger = transactionLogger;
};

module.exports = OpenSTPlatform;
module.exports = new OpenSTPlatform();

61 changes: 18 additions & 43 deletions test/open_st_env_vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,72 +13,47 @@ export OST_VALUE_GAS_PRICE='0xBA43B7400'
export OST_VALUE_CHAIN_ID=2001
export OST_UTILITY_CHAIN_ID=2000

export OST_FOUNDATION_ADDR=''
export OST_FOUNDATION_ADDR='0x8312731f3c4446b6aae61caebdf9c9249409f140'
export OST_FOUNDATION_PASSPHRASE='testtest'

export OST_COMPANY_ADDR=''
export OST_COMPANY_PASSPHRASE='testtest'

export OST_VALUE_DEPLOYER_ADDR=''
export OST_VALUE_DEPLOYER_ADDR='0x9bf1719d44f1db612e5c6a481174c2a7e76a8dcc'
export OST_VALUE_DEPLOYER_PASSPHRASE='testtest'

export OST_UTILITY_DEPLOYER_ADDR=''
export OST_UTILITY_DEPLOYER_ADDR='0x0c73cdf56bd9cffb5e361d455aa125f05f65a7e9'
export OST_UTILITY_DEPLOYER_PASSPHRASE='testtest'

export OST_VALUE_OPS_ADDR=''
export OST_VALUE_OPS_ADDR='0x6573461ac54f536b387d44427e96a8812c84d2f5'
export OST_VALUE_OPS_PASSPHRASE='testtest'

export OST_UTILITY_CHAIN_OWNER_ADDR=''
export OST_UTILITY_REGISTRAR_CONTRACT_ADDR=''
export OST_OPENSTUTILITY_CONTRACT_ADDR=''
export OST_OPENSTUTILITY_ST_PRIME_UUID=''
export OST_UTILITY_CHAIN_OWNER_ADDR='0x5b88081e6bfa5f67f2d9e78736939cde7f9eb04f'
export OST_UTILITY_REGISTRAR_CONTRACT_ADDR='0x6a00042D978CB064Eb1968E47932e7455DcBdbdB'
export OST_OPENSTUTILITY_CONTRACT_ADDR='0x73A3d32FAf13AFfDDB423b073F6D07e142571044'
export OST_OPENSTUTILITY_ST_PRIME_UUID='0x728981d31c6e0c7b7c6694aadabe04064e70c294f8af32c2c7fa8b93bb8a6672'

export OST_VALUE_REGISTRAR_ADDR=''
export OST_VALUE_REGISTRAR_ADDR='0x43a376fe822d2db2e3dc6ef48f4b8d40f36e66b5'
export OST_VALUE_REGISTRAR_PASSPHRASE='testtest'

export OST_UTILITY_REGISTRAR_ADDR=''
export OST_STAKER_ADDR='0x8312731f3c4446b6aae61caebdf9c9249409f140'
export OST_STAKER_PASSPHRASE='testtest'

export OST_UTILITY_REGISTRAR_ADDR='0x43a376fe822d2db2e3dc6ef48f4b8d40f36e66b5'
export OST_UTILITY_REGISTRAR_PASSPHRASE='testtest'

export OST_MANAGED_KEY_PASSPHRASE='testtest'
export OST_UTILITY_CHAIN_OWNER_PASSPHRASE='testtest'

export OST_SIMPLE_TOKEN_CONTRACT_ADDR=''
export OST_OPENSTVALUE_CONTRACT_ADDR=''
export OST_STPRIME_CONTRACT_ADDR=''
export OST_VALUE_CORE_CONTRACT_ADDR=''
export OST_VALUE_REGISTRAR_CONTRACT_ADDR=''

export OST_UTILITY_TOKEN_CONTRACT_ADDR=''
export OST_SIMPLE_TOKEN_CONTRACT_ADDR='0x31Ba69B3A68602bdF0FBF427c41a557B2748B434'
export OST_OPENSTVALUE_CONTRACT_ADDR='0x41A219823c94854DA24543b73529AdC57209563f'
export OST_STPRIME_CONTRACT_ADDR='0xC9Df819d1A25d3eDE865F0ed834120828030a0Ec'
export OST_VALUE_CORE_CONTRACT_ADDR='0x989A948B14D00A9E2c003e43d93BE3A994B0e958'
export OST_VALUE_REGISTRAR_CONTRACT_ADDR='0x575A8144d4a5081698531F1D101e2960DEa56C22'

export OST_UTILITY_STPRIME_TOTAL_SUPPLY=800000000

export OST_MEMBER_CONFIG_FILE_PATH='./config.json'

export USE_MOCK_SIMPLE_TOKEN=0

export OST_FOUNDATION_ADDR='0x8312731f3c4446b6aae61caebdf9c9249409f140'
export OST_UTILITY_REGISTRAR_ADDR='0x43a376fe822d2db2e3dc6ef48f4b8d40f36e66b5'
export OST_VALUE_REGISTRAR_ADDR='0x43a376fe822d2db2e3dc6ef48f4b8d40f36e66b5'
export OST_UTILITY_CHAIN_OWNER_ADDR='0x5b88081e6bfa5f67f2d9e78736939cde7f9eb04f'
export OST_STAKER_ADDR='0x8312731f3c4446b6aae61caebdf9c9249409f140'
export OST_STAKER_PASSPHRASE='testtest'
export OST_VALUE_OPS_ADDR='0x6573461ac54f536b387d44427e96a8812c84d2f5'
export OST_VALUE_DEPLOYER_ADDR='0x9bf1719d44f1db612e5c6a481174c2a7e76a8dcc'
export OST_UTILITY_DEPLOYER_ADDR='0x0c73cdf56bd9cffb5e361d455aa125f05f65a7e9'

export OST_SIMPLE_TOKEN_CONTRACT_ADDR='0x31Ba69B3A68602bdF0FBF427c41a557B2748B434'

export OST_VALUE_REGISTRAR_CONTRACT_ADDR='0x575A8144d4a5081698531F1D101e2960DEa56C22'

export OST_OPENSTVALUE_CONTRACT_ADDR='0x41A219823c94854DA24543b73529AdC57209563f'

export OST_UTILITY_REGISTRAR_CONTRACT_ADDR='0x6a00042D978CB064Eb1968E47932e7455DcBdbdB'
export OST_OPENSTUTILITY_CONTRACT_ADDR='0x73A3d32FAf13AFfDDB423b073F6D07e142571044'
export OST_OPENSTUTILITY_ST_PRIME_UUID='0x728981d31c6e0c7b7c6694aadabe04064e70c294f8af32c2c7fa8b93bb8a6672'
export OST_STPRIME_CONTRACT_ADDR='0xC9Df819d1A25d3eDE865F0ed834120828030a0Ec'

export OST_VALUE_CORE_CONTRACT_ADDR='0x989A948B14D00A9E2c003e43d93BE3A994B0e958'

# SUPPORTED CACHING ENGINES VALUES=> 'none', 'redis', 'memcached'
export OST_CACHING_ENGINE='redis'
export WORKERS=1 # only in case of in memory caching
Expand Down

0 comments on commit eaabea2

Please sign in to comment.