Skip to content

Commit

Permalink
feat: update readme and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
monitz87 committed Jun 18, 2020
1 parent 45453ad commit 02bd830
Show file tree
Hide file tree
Showing 284 changed files with 1,726 additions and 1,783 deletions.
57 changes: 0 additions & 57 deletions README.md
Expand Up @@ -9,63 +9,6 @@ A Javascript SDK for interacting with the Polymath network for the browser and N
- 3.0
- 3.1

# Usage

First, configure your Polymath Client:

```ts
// polyClient.ts
import { Polymath, browserUtils } from '@polymathnetwork/sdk';

// create the necessary Web3 providers on its own. You can pass custom ones
// if you want though.
const config = {
polymathRegistryAddress: '0x1234...',
};

// You could have multiple configs for each network you support:
const networkConfigs = {
['1']: {
/* */
},
['42']: {
/* */
},
};
const networkId = await browserUtils.getNetworkId();
const config = networkConfigs[networkId];

// You'll want to reuse the smae instance of the Polymath client in the rest of
// your app for the same network.
export const polyClient = new Polymath(config);
```

Initializing your client

```ts
// Pending
```

Finally, let's start a procedure to reserve a Security Token

```ts
// Builds a list of transactions required to reserve a security token
const transactionQueue = await polyClient.reserveSecurityToken({
name: 'My Token',
symbol: 'MY-TOKEN',
});

// We can listen to events for individual transactions as well as the queue
// itself. For now, let's just listen to the whole queue

await transactionQueue.run(); // Will run sequentially every transaction required

// At this point my token has been reserved
const myTokenReservation = await polyClient.getSecurityTokenReservation({
symbol: 'MY-TOKEN',
});
```

# Documentation

https://developers.polymath.network/developers/
2 changes: 1 addition & 1 deletion docs/api/README.md
@@ -1,4 +1,4 @@
# @polymathnetwork/sdk - v2.0.1-beta.123
# @polymathnetwork/sdk - v2.0.1-beta.126

# Getting Started

Expand Down
8 changes: 4 additions & 4 deletions docs/api/classes/_context_.context.md
Expand Up @@ -28,7 +28,7 @@ Context in which the SDK is being used

\+ **new Context**(`params`: [ConstructorParams](../interfaces/_context_.constructorparams.md)): *[Context](_context_.context.md)*

*Defined in [src/Context.ts:45](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/Context.ts#L45)*
*Defined in [src/Context.ts:45](https://github.com/PolymathNetwork/polymath-sdk/blob/45453ad/src/Context.ts#L45)*

**Parameters:**

Expand All @@ -44,20 +44,20 @@ Name | Type |

**contractWrappers**: *[PolymathBase](_polymathbase_.polymathbase.md)*

*Defined in [src/Context.ts:41](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/Context.ts#L41)*
*Defined in [src/Context.ts:41](https://github.com/PolymathNetwork/polymath-sdk/blob/45453ad/src/Context.ts#L41)*

___

### currentWallet

**currentWallet**: *Wallet*

*Defined in [src/Context.ts:43](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/Context.ts#L43)*
*Defined in [src/Context.ts:43](https://github.com/PolymathNetwork/polymath-sdk/blob/45453ad/src/Context.ts#L43)*

___

### factories

**factories**: *[Factories](../interfaces/_context_.factories.md)*

*Defined in [src/Context.ts:45](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/Context.ts#L45)*
*Defined in [src/Context.ts:45](https://github.com/PolymathNetwork/polymath-sdk/blob/45453ad/src/Context.ts#L45)*
26 changes: 13 additions & 13 deletions docs/api/classes/_entities_checkpoint_.checkpoint.md
Expand Up @@ -38,7 +38,7 @@ Represents a snapshot of the Security Token's supply and Tokenholder balances at

\+ **new Checkpoint**(`params`: [Params](../interfaces/_entities_checkpoint_.params.md) & [UniqueIdentifiers](../interfaces/_entities_checkpoint_.uniqueidentifiers.md)): *[Checkpoint](_entities_checkpoint_.checkpoint.md)*

*Defined in [src/entities/Checkpoint.ts:106](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/entities/Checkpoint.ts#L106)*
*Defined in [src/entities/Checkpoint.ts:106](https://github.com/PolymathNetwork/polymath-sdk/blob/45453ad/src/entities/Checkpoint.ts#L106)*

Create a new Chekpoint instance

Expand All @@ -56,15 +56,15 @@ Name | Type |

**createdAt**: *Date*

*Defined in [src/entities/Checkpoint.ts:106](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/entities/Checkpoint.ts#L106)*
*Defined in [src/entities/Checkpoint.ts:106](https://github.com/PolymathNetwork/polymath-sdk/blob/45453ad/src/entities/Checkpoint.ts#L106)*

___

### dividendDistributions

**dividendDistributions**: *[DividendDistribution](_entities_dividenddistribution_.dividenddistribution.md)[]*

*Defined in [src/entities/Checkpoint.ts:88](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/entities/Checkpoint.ts#L88)*
*Defined in [src/entities/Checkpoint.ts:88](https://github.com/PolymathNetwork/polymath-sdk/blob/45453ad/src/entities/Checkpoint.ts#L88)*

dividend distributions associated to this snapshot

Expand All @@ -74,7 +74,7 @@ ___

**index**: *number*

*Defined in [src/entities/Checkpoint.ts:97](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/entities/Checkpoint.ts#L97)*
*Defined in [src/entities/Checkpoint.ts:97](https://github.com/PolymathNetwork/polymath-sdk/blob/45453ad/src/entities/Checkpoint.ts#L97)*

numerical index of the checkpoint associated to this snapshot

Expand All @@ -84,23 +84,23 @@ ___

**securityTokenId**: *string*

*Defined in [src/entities/Checkpoint.ts:92](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/entities/Checkpoint.ts#L92)*
*Defined in [src/entities/Checkpoint.ts:92](https://github.com/PolymathNetwork/polymath-sdk/blob/45453ad/src/entities/Checkpoint.ts#L92)*

___

### securityTokenSymbol

**securityTokenSymbol**: *string*

*Defined in [src/entities/Checkpoint.ts:90](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/entities/Checkpoint.ts#L90)*
*Defined in [src/entities/Checkpoint.ts:90](https://github.com/PolymathNetwork/polymath-sdk/blob/45453ad/src/entities/Checkpoint.ts#L90)*

___

### tokenholderBalances

**tokenholderBalances**: *[TokenholderBalance](../interfaces/_types_index_.tokenholderbalance.md)[]*

*Defined in [src/entities/Checkpoint.ts:102](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/entities/Checkpoint.ts#L102)*
*Defined in [src/entities/Checkpoint.ts:102](https://github.com/PolymathNetwork/polymath-sdk/blob/45453ad/src/entities/Checkpoint.ts#L102)*

tokenholder balances at this specific checkpoint

Expand All @@ -110,7 +110,7 @@ ___

**totalSupply**: *BigNumber*

*Defined in [src/entities/Checkpoint.ts:104](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/entities/Checkpoint.ts#L104)*
*Defined in [src/entities/Checkpoint.ts:104](https://github.com/PolymathNetwork/polymath-sdk/blob/45453ad/src/entities/Checkpoint.ts#L104)*

___

Expand All @@ -120,7 +120,7 @@ ___

*Overrides [Entity](_entities_entity_.entity.md).[uid](_entities_entity_.entity.md#abstract-uid)*

*Defined in [src/entities/Checkpoint.ts:83](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/entities/Checkpoint.ts#L83)*
*Defined in [src/entities/Checkpoint.ts:83](https://github.com/PolymathNetwork/polymath-sdk/blob/45453ad/src/entities/Checkpoint.ts#L83)*

## Methods

Expand All @@ -130,7 +130,7 @@ ___

*Overrides [Entity](_entities_entity_.entity.md).[_refresh](_entities_entity_.entity.md#abstract-_refresh)*

*Defined in [src/entities/Checkpoint.ts:164](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/entities/Checkpoint.ts#L164)*
*Defined in [src/entities/Checkpoint.ts:164](https://github.com/PolymathNetwork/polymath-sdk/blob/45453ad/src/entities/Checkpoint.ts#L164)*

Hydrate the entity

Expand All @@ -150,7 +150,7 @@ ___

*Overrides [Entity](_entities_entity_.entity.md).[toPojo](_entities_entity_.entity.md#abstract-topojo)*

*Defined in [src/entities/Checkpoint.ts:137](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/entities/Checkpoint.ts#L137)*
*Defined in [src/entities/Checkpoint.ts:137](https://github.com/PolymathNetwork/polymath-sdk/blob/45453ad/src/entities/Checkpoint.ts#L137)*

Convert entity to a POJO (Plain Old Javascript Object)

Expand Down Expand Up @@ -178,7 +178,7 @@ ___

**generateId**(`__namedParameters`: object): *string*

*Defined in [src/entities/Checkpoint.ts:58](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/entities/Checkpoint.ts#L58)*
*Defined in [src/entities/Checkpoint.ts:58](https://github.com/PolymathNetwork/polymath-sdk/blob/45453ad/src/entities/Checkpoint.ts#L58)*

Generate the Checkpoint's UUID from its identifying properties

Expand All @@ -199,7 +199,7 @@ ___

**unserialize**(`serialized`: string): *[UniqueIdentifiers](../interfaces/_entities_checkpoint_.uniqueidentifiers.md)*

*Defined in [src/entities/Checkpoint.ts:70](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/entities/Checkpoint.ts#L70)*
*Defined in [src/entities/Checkpoint.ts:70](https://github.com/PolymathNetwork/polymath-sdk/blob/45453ad/src/entities/Checkpoint.ts#L70)*

Unserialize string to Checkpoint object

Expand Down

0 comments on commit 02bd830

Please sign in to comment.