Skip to content

Commit 02bd830

Browse files
committed
feat: update readme and docs
1 parent 45453ad commit 02bd830

284 files changed

Lines changed: 1726 additions & 1783 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -9,63 +9,6 @@ A Javascript SDK for interacting with the Polymath network for the browser and N
99
- 3.0
1010
- 3.1
1111

12-
# Usage
13-
14-
First, configure your Polymath Client:
15-
16-
```ts
17-
// polyClient.ts
18-
import { Polymath, browserUtils } from '@polymathnetwork/sdk';
19-
20-
// create the necessary Web3 providers on its own. You can pass custom ones
21-
// if you want though.
22-
const config = {
23-
polymathRegistryAddress: '0x1234...',
24-
};
25-
26-
// You could have multiple configs for each network you support:
27-
const networkConfigs = {
28-
['1']: {
29-
/* */
30-
},
31-
['42']: {
32-
/* */
33-
},
34-
};
35-
const networkId = await browserUtils.getNetworkId();
36-
const config = networkConfigs[networkId];
37-
38-
// You'll want to reuse the smae instance of the Polymath client in the rest of
39-
// your app for the same network.
40-
export const polyClient = new Polymath(config);
41-
```
42-
43-
Initializing your client
44-
45-
```ts
46-
// Pending
47-
```
48-
49-
Finally, let's start a procedure to reserve a Security Token
50-
51-
```ts
52-
// Builds a list of transactions required to reserve a security token
53-
const transactionQueue = await polyClient.reserveSecurityToken({
54-
name: 'My Token',
55-
symbol: 'MY-TOKEN',
56-
});
57-
58-
// We can listen to events for individual transactions as well as the queue
59-
// itself. For now, let's just listen to the whole queue
60-
61-
await transactionQueue.run(); // Will run sequentially every transaction required
62-
63-
// At this point my token has been reserved
64-
const myTokenReservation = await polyClient.getSecurityTokenReservation({
65-
symbol: 'MY-TOKEN',
66-
});
67-
```
68-
6912
# Documentation
7013

7114
https://developers.polymath.network/developers/

docs/api/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# @polymathnetwork/sdk - v2.0.1-beta.123
1+
# @polymathnetwork/sdk - v2.0.1-beta.126
22

33
# Getting Started
44

docs/api/classes/_context_.context.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Context in which the SDK is being used
2828

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

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

3333
**Parameters:**
3434

@@ -44,20 +44,20 @@ Name | Type |
4444

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

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

4949
___
5050

5151
### currentWallet
5252

5353
**currentWallet**: *Wallet*
5454

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

5757
___
5858

5959
### factories
6060

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

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

docs/api/classes/_entities_checkpoint_.checkpoint.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Represents a snapshot of the Security Token's supply and Tokenholder balances at
3838

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

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

4343
Create a new Chekpoint instance
4444

@@ -56,15 +56,15 @@ Name | Type |
5656

5757
**createdAt**: *Date*
5858

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

6161
___
6262

6363
### dividendDistributions
6464

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

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

6969
dividend distributions associated to this snapshot
7070

@@ -74,7 +74,7 @@ ___
7474

7575
**index**: *number*
7676

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

7979
numerical index of the checkpoint associated to this snapshot
8080

@@ -84,23 +84,23 @@ ___
8484

8585
**securityTokenId**: *string*
8686

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

8989
___
9090

9191
### securityTokenSymbol
9292

9393
**securityTokenSymbol**: *string*
9494

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

9797
___
9898

9999
### tokenholderBalances
100100

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

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

105105
tokenholder balances at this specific checkpoint
106106

@@ -110,7 +110,7 @@ ___
110110

111111
**totalSupply**: *BigNumber*
112112

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

115115
___
116116

@@ -120,7 +120,7 @@ ___
120120

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

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

125125
## Methods
126126

@@ -130,7 +130,7 @@ ___
130130

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

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

135135
Hydrate the entity
136136

@@ -150,7 +150,7 @@ ___
150150

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

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

155155
Convert entity to a POJO (Plain Old Javascript Object)
156156

@@ -178,7 +178,7 @@ ___
178178

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

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

183183
Generate the Checkpoint's UUID from its identifying properties
184184

@@ -199,7 +199,7 @@ ___
199199

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

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

204204
Unserialize string to Checkpoint object
205205

0 commit comments

Comments
 (0)