Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
H34D committed May 22, 2023
1 parent 34fd7ca commit c433671
Show file tree
Hide file tree
Showing 61 changed files with 694 additions and 180 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v2.2.0](https://github.com/masa-finance/masa-sdk/compare/v2.1.1...v2.2.0)

> 22 May 2023
- Bump @typescript-eslint/parser from 5.59.5 to 5.59.6 [`#84`](https://github.com/masa-finance/masa-sdk/pull/84)
- Bump webpack from 5.82.1 to 5.83.1 [`#83`](https://github.com/masa-finance/masa-sdk/pull/83)
- Bump @typescript-eslint/eslint-plugin from 5.59.5 to 5.59.6 [`#82`](https://github.com/masa-finance/masa-sdk/pull/82)
- Bump terser-webpack-plugin from 5.3.8 to 5.3.9 [`#81`](https://github.com/masa-finance/masa-sdk/pull/81)
- Bump eslint from 8.40.0 to 8.41.0 [`#80`](https://github.com/masa-finance/masa-sdk/pull/80)
- added support for asbt and sssbt 2.0 [`b82aa10`](https://github.com/masa-finance/masa-sdk/commit/b82aa108a09196a53e4ad4950ec6bf9411e0484a)
- update docs [`72830da`](https://github.com/masa-finance/masa-sdk/commit/72830dafe105cede551077c483ec634740a50611)

#### [v2.1.1](https://github.com/masa-finance/masa-sdk/compare/v2.1.0...v2.1.1)

> 19 May 2023
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/ContractFactory.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v2.1.1](../README.md) / [Exports](../modules.md) / ContractFactory
- v2.2.0](../README.md) / [Exports](../modules.md) / ContractFactory

# Class: ContractFactory

Expand Down
56 changes: 54 additions & 2 deletions docs/classes/CreditScore.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v2.1.1](../README.md) / [Exports](../modules.md) / CreditScore
- v2.2.0](../README.md) / [Exports](../modules.md) / CreditScore

# Class: CreditScore

Expand Down Expand Up @@ -27,8 +27,10 @@
- [burn](CreditScore.md#burn)
- [checkOrGiveAllowance](CreditScore.md#checkorgiveallowance)
- [formatPrice](CreditScore.md#formatprice)
- [getMintPrice](CreditScore.md#getmintprice)
- [getPaymentAddress](CreditScore.md#getpaymentaddress)
- [getPrice](CreditScore.md#getprice)
- [loadSBTContract](CreditScore.md#loadsbtcontract)
- [mint](CreditScore.md#mint)
- [sign](CreditScore.md#sign)
- [verify](CreditScore.md#verify)
Expand Down Expand Up @@ -169,6 +171,28 @@ ___

___

### getMintPrice

`Protected` **getMintPrice**(`paymentMethod`, `contract`, `slippage?`): `Promise`<{ `formattedMintFee`: `string` ; `formattedPrice`: `string` ; `formattedProtocolFee`: `string` ; `mintFee`: `BigNumber` ; `paymentAddress`: `string` ; `price`: `BigNumber` ; `protocolFee`: `BigNumber` }\>

#### Parameters

| Name | Type | Default value |
| :------ | :------ | :------ |
| `paymentMethod` | [`PaymentMethod`](../modules.md#paymentmethod) | `undefined` |
| `contract` | `MasaSBT` \| `MasaSBTSelfSovereign` \| `MasaSBTAuthority` | `undefined` |
| `slippage` | `undefined` \| `number` | `250` |

#### Returns

`Promise`<{ `formattedMintFee`: `string` ; `formattedPrice`: `string` ; `formattedProtocolFee`: `string` ; `mintFee`: `BigNumber` ; `paymentAddress`: `string` ; `price`: `BigNumber` ; `protocolFee`: `BigNumber` }\>

#### Inherited from

[MasaModuleBase](MasaModuleBase.md).[getMintPrice](MasaModuleBase.md#getmintprice)

___

### getPaymentAddress

`Private` **getPaymentAddress**(`paymentMethod`): `string`
Expand Down Expand Up @@ -210,6 +234,34 @@ gets the price for a credit score

___

### loadSBTContract

`Protected` **loadSBTContract**<`Contract`\>(`masaConfig`, `address`, `factory?`): `Promise`<`undefined` \| `Contract`\>

#### Type parameters

| Name | Type |
| :------ | :------ |
| `Contract` | extends `MasaSBT` \| `MasaSBTSelfSovereign` \| `MasaSBTAuthority` |

#### Parameters

| Name | Type | Default value |
| :------ | :------ | :------ |
| `masaConfig` | [`MasaConfig`](../interfaces/MasaConfig.md) | `undefined` |
| `address` | `string` | `undefined` |
| `factory` | [`ContractFactory`](ContractFactory.md) | `MasaSBTSelfSovereign__factory` |

#### Returns

`Promise`<`undefined` \| `Contract`\>

#### Inherited from

[MasaModuleBase](MasaModuleBase.md).[loadSBTContract](MasaModuleBase.md#loadsbtcontract)

___

### mint

**mint**(`paymentMethod`, `identityId`, `authorityAddress`, `signatureDate`, `signature`, `slippage?`): `Promise`<`ContractTransaction`\>
Expand Down Expand Up @@ -262,7 +314,7 @@ verify a signature created during one of the SBT signing flows
| Name | Type |
| :------ | :------ |
| `errorMessage` | `string` |
| `contract` | `SoulLinker` \| `SoulStore` \| `MasaSBTSelfSovereign` \| `MasaSBTAuthority` |
| `contract` | `MasaSBT` \| `MasaSBTSelfSovereign` \| `MasaSBTAuthority` \| `SoulLinker` \| `SoulStore` |
| `domain` | `TypedDataDomain` |
| `types` | `Record`<`string`, `TypedDataField`[]\> |
| `value` | `Record`<`string`, `string` \| `number` \| `BigNumber`\> |
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/ERC20__factory.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v2.1.1](../README.md) / [Exports](../modules.md) / ERC20\_\_factory
- v2.2.0](../README.md) / [Exports](../modules.md) / ERC20\_\_factory

# Class: ERC20\_\_factory

Expand Down
56 changes: 54 additions & 2 deletions docs/classes/Green.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v2.1.1](../README.md) / [Exports](../modules.md) / Green
- v2.2.0](../README.md) / [Exports](../modules.md) / Green

# Class: Green

Expand Down Expand Up @@ -27,8 +27,10 @@
- [burn](Green.md#burn)
- [checkOrGiveAllowance](Green.md#checkorgiveallowance)
- [formatPrice](Green.md#formatprice)
- [getMintPrice](Green.md#getmintprice)
- [getPaymentAddress](Green.md#getpaymentaddress)
- [getPrice](Green.md#getprice)
- [loadSBTContract](Green.md#loadsbtcontract)
- [mint](Green.md#mint)
- [sign](Green.md#sign)
- [verify](Green.md#verify)
Expand Down Expand Up @@ -169,6 +171,28 @@ ___

___

### getMintPrice

`Protected` **getMintPrice**(`paymentMethod`, `contract`, `slippage?`): `Promise`<{ `formattedMintFee`: `string` ; `formattedPrice`: `string` ; `formattedProtocolFee`: `string` ; `mintFee`: `BigNumber` ; `paymentAddress`: `string` ; `price`: `BigNumber` ; `protocolFee`: `BigNumber` }\>

#### Parameters

| Name | Type | Default value |
| :------ | :------ | :------ |
| `paymentMethod` | [`PaymentMethod`](../modules.md#paymentmethod) | `undefined` |
| `contract` | `MasaSBT` \| `MasaSBTSelfSovereign` \| `MasaSBTAuthority` | `undefined` |
| `slippage` | `undefined` \| `number` | `250` |

#### Returns

`Promise`<{ `formattedMintFee`: `string` ; `formattedPrice`: `string` ; `formattedProtocolFee`: `string` ; `mintFee`: `BigNumber` ; `paymentAddress`: `string` ; `price`: `BigNumber` ; `protocolFee`: `BigNumber` }\>

#### Inherited from

[MasaModuleBase](MasaModuleBase.md).[getMintPrice](MasaModuleBase.md#getmintprice)

___

### getPaymentAddress

`Private` **getPaymentAddress**(`paymentMethod`): `string`
Expand Down Expand Up @@ -210,6 +234,34 @@ Gets the price for a masa green

___

### loadSBTContract

`Protected` **loadSBTContract**<`Contract`\>(`masaConfig`, `address`, `factory?`): `Promise`<`undefined` \| `Contract`\>

#### Type parameters

| Name | Type |
| :------ | :------ |
| `Contract` | extends `MasaSBT` \| `MasaSBTSelfSovereign` \| `MasaSBTAuthority` |

#### Parameters

| Name | Type | Default value |
| :------ | :------ | :------ |
| `masaConfig` | [`MasaConfig`](../interfaces/MasaConfig.md) | `undefined` |
| `address` | `string` | `undefined` |
| `factory` | [`ContractFactory`](ContractFactory.md) | `MasaSBTSelfSovereign__factory` |

#### Returns

`Promise`<`undefined` \| `Contract`\>

#### Inherited from

[MasaModuleBase](MasaModuleBase.md).[loadSBTContract](MasaModuleBase.md#loadsbtcontract)

___

### mint

**mint**(`paymentMethod`, `receiver`, `authorityAddress`, `signatureDate`, `signature`, `slippage?`): `Promise`<`ContractTransaction`\>
Expand Down Expand Up @@ -262,7 +314,7 @@ verify a signature created during one of the SBT signing flows
| Name | Type |
| :------ | :------ |
| `errorMessage` | `string` |
| `contract` | `SoulLinker` \| `SoulStore` \| `MasaSBTSelfSovereign` \| `MasaSBTAuthority` |
| `contract` | `MasaSBT` \| `MasaSBTSelfSovereign` \| `MasaSBTAuthority` \| `SoulLinker` \| `SoulStore` |
| `domain` | `TypedDataDomain` |
| `types` | `Record`<`string`, `TypedDataField`[]\> |
| `value` | `Record`<`string`, `string` \| `number` \| `BigNumber`\> |
Expand Down
56 changes: 54 additions & 2 deletions docs/classes/Identity.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v2.1.1](../README.md) / [Exports](../modules.md) / Identity
- v2.2.0](../README.md) / [Exports](../modules.md) / Identity

# Class: Identity

Expand All @@ -26,7 +26,9 @@
- [burn](Identity.md#burn)
- [checkOrGiveAllowance](Identity.md#checkorgiveallowance)
- [formatPrice](Identity.md#formatprice)
- [getMintPrice](Identity.md#getmintprice)
- [getPaymentAddress](Identity.md#getpaymentaddress)
- [loadSBTContract](Identity.md#loadsbtcontract)
- [purchase](Identity.md#purchase)
- [purchaseIdentityAndName](Identity.md#purchaseidentityandname)
- [verify](Identity.md#verify)
Expand Down Expand Up @@ -155,6 +157,28 @@ ___

___

### getMintPrice

`Protected` **getMintPrice**(`paymentMethod`, `contract`, `slippage?`): `Promise`<{ `formattedMintFee`: `string` ; `formattedPrice`: `string` ; `formattedProtocolFee`: `string` ; `mintFee`: `BigNumber` ; `paymentAddress`: `string` ; `price`: `BigNumber` ; `protocolFee`: `BigNumber` }\>

#### Parameters

| Name | Type | Default value |
| :------ | :------ | :------ |
| `paymentMethod` | [`PaymentMethod`](../modules.md#paymentmethod) | `undefined` |
| `contract` | `MasaSBT` \| `MasaSBTSelfSovereign` \| `MasaSBTAuthority` | `undefined` |
| `slippage` | `undefined` \| `number` | `250` |

#### Returns

`Promise`<{ `formattedMintFee`: `string` ; `formattedPrice`: `string` ; `formattedProtocolFee`: `string` ; `mintFee`: `BigNumber` ; `paymentAddress`: `string` ; `price`: `BigNumber` ; `protocolFee`: `BigNumber` }\>

#### Inherited from

[MasaModuleBase](MasaModuleBase.md).[getMintPrice](MasaModuleBase.md#getmintprice)

___

### getPaymentAddress

`Private` **getPaymentAddress**(`paymentMethod`): `string`
Expand All @@ -177,6 +201,34 @@ Gets the payment address for a given payment method

___

### loadSBTContract

`Protected` **loadSBTContract**<`Contract`\>(`masaConfig`, `address`, `factory?`): `Promise`<`undefined` \| `Contract`\>

#### Type parameters

| Name | Type |
| :------ | :------ |
| `Contract` | extends `MasaSBT` \| `MasaSBTSelfSovereign` \| `MasaSBTAuthority` |

#### Parameters

| Name | Type | Default value |
| :------ | :------ | :------ |
| `masaConfig` | [`MasaConfig`](../interfaces/MasaConfig.md) | `undefined` |
| `address` | `string` | `undefined` |
| `factory` | [`ContractFactory`](ContractFactory.md) | `MasaSBTSelfSovereign__factory` |

#### Returns

`Promise`<`undefined` \| `Contract`\>

#### Inherited from

[MasaModuleBase](MasaModuleBase.md).[loadSBTContract](MasaModuleBase.md#loadsbtcontract)

___

### purchase

**purchase**(): `Promise`<`ContractTransaction`\>
Expand Down Expand Up @@ -224,7 +276,7 @@ verify a signature created during one of the SBT signing flows
| Name | Type |
| :------ | :------ |
| `errorMessage` | `string` |
| `contract` | `SoulLinker` \| `SoulStore` \| `MasaSBTSelfSovereign` \| `MasaSBTAuthority` |
| `contract` | `MasaSBT` \| `MasaSBTSelfSovereign` \| `MasaSBTAuthority` \| `SoulLinker` \| `SoulStore` |
| `domain` | `TypedDataDomain` |
| `types` | `Record`<`string`, `TypedDataField`[]\> |
| `value` | `Record`<`string`, `string` \| `number` \| `BigNumber`\> |
Expand Down
18 changes: 16 additions & 2 deletions docs/classes/Masa.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v2.1.1](../README.md) / [Exports](../modules.md) / Masa
- v2.2.0](../README.md) / [Exports](../modules.md) / Masa

# Class: Masa

Expand All @@ -13,6 +13,7 @@

- [account](Masa.md#account)
- [arweave](Masa.md#arweave)
- [asbt](Masa.md#asbt)
- [client](Masa.md#client)
- [config](Masa.md#config)
- [contracts](Masa.md#contracts)
Expand All @@ -22,6 +23,7 @@
- [sbt](Masa.md#sbt)
- [session](Masa.md#session)
- [soulName](Masa.md#soulname)
- [sssbt](Masa.md#sssbt)
- [utils](Masa.md#utils)

## Constructors
Expand Down Expand Up @@ -50,6 +52,12 @@ ___

___

### asbt

`Readonly` **asbt**: [`MasaASBT`](MasaASBT.md)<`ReferenceSBTAuthority`\>

___

### client

`Readonly` **client**: [`MasaClient`](MasaClient.md)
Expand Down Expand Up @@ -88,7 +96,7 @@ ___

### sbt

`Readonly` **sbt**: [`MasaSBT`](MasaSBT.md)
`Readonly` **sbt**: [`MasaSBT`](MasaSBT.md)<`MasaSBT`\>

___

Expand All @@ -104,6 +112,12 @@ ___

___

### sssbt

`Readonly` **sssbt**: [`MasaSSSBT`](MasaSSSBT.md)<`ReferenceSBTSelfSovereign`\>

___

### utils

**utils**: `Object`
Expand Down

0 comments on commit c433671

Please sign in to comment.