Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
H34D committed Mar 29, 2023
1 parent 2946ae0 commit 7256a47
Show file tree
Hide file tree
Showing 49 changed files with 295 additions and 198 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,20 @@ 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).

#### [v1.12.1](https://github.com/masa-finance/masa-sdk/compare/v1.12.0...v1.12.1)

> 29 March 2023
- update contracts [`775a64a`](https://github.com/masa-finance/masa-sdk/commit/775a64a6aee494fd4c93fd7f8dedcbb8f311d445)

#### [v1.12.0](https://github.com/masa-finance/masa-sdk/compare/v1.11.5...v1.12.0)

> 29 March 2023
- refactor masa-contracts [`fe39bd7`](https://github.com/masa-finance/masa-sdk/commit/fe39bd7cb7c149daee79262c5b205e78f1f1d117)
- update docs [`b17199b`](https://github.com/masa-finance/masa-sdk/commit/b17199b5e161d2ce748a636432432f655054ab3c)
- fix potential import errors [`89a0d37`](https://github.com/masa-finance/masa-sdk/commit/89a0d37238bcb04984d866edf1abf2614abf49af)

#### [v1.11.5](https://github.com/masa-finance/masa-sdk/compare/v1.11.4...v1.11.5)

> 28 March 2023
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
@@ -1,5 +1,5 @@
# Masa SDK
- v1.11.5 / [Exports](modules.md)
- v1.12.1 / [Exports](modules.md)

<!-- TOC -->
* [Installation](#installation)
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/ContractFactory.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v1.11.5](../README.md) / [Exports](../modules.md) / ContractFactory
- v1.12.1](../README.md) / [Exports](../modules.md) / ContractFactory

# Class: ContractFactory

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/ERC20__factory.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v1.11.5](../README.md) / [Exports](../modules.md) / ERC20\_\_factory
- v1.12.1](../README.md) / [Exports](../modules.md) / ERC20\_\_factory

# Class: ERC20\_\_factory

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/Masa.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v1.11.5](../README.md) / [Exports](../modules.md) / Masa
- v1.12.1](../README.md) / [Exports](../modules.md) / Masa

# Class: Masa

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/MasaAccount.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v1.11.5](../README.md) / [Exports](../modules.md) / MasaAccount
- v1.12.1](../README.md) / [Exports](../modules.md) / MasaAccount

# Class: MasaAccount

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/MasaArweave.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v1.11.5](../README.md) / [Exports](../modules.md) / MasaArweave
- v1.12.1](../README.md) / [Exports](../modules.md) / MasaArweave

# Class: MasaArweave

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/MasaClient.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v1.11.5](../README.md) / [Exports](../modules.md) / MasaClient
- v1.12.1](../README.md) / [Exports](../modules.md) / MasaClient

# Class: MasaClient

Expand Down
105 changes: 11 additions & 94 deletions docs/classes/MasaContracts.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v1.11.5](../README.md) / [Exports](../modules.md) / MasaContracts
- v1.12.1](../README.md) / [Exports](../modules.md) / MasaContracts

# Class: MasaContracts

Expand All @@ -22,14 +22,13 @@
- [identity](MasaContracts.md#identity)
- [instances](MasaContracts.md#instances)
- [masa](MasaContracts.md#masa)
- [sbt](MasaContracts.md#sbt)
- [soulLinker](MasaContracts.md#soullinker)
- [soulName](MasaContracts.md#soulname)
- [tools](MasaContracts.md#tools)

### Methods

- [parseLogs](MasaContracts.md#parselogs)
- [sbt](MasaContracts.md#sbt)

## Constructors

Expand All @@ -51,46 +50,19 @@ MasaBase.constructor

### creditScore

**creditScore**: `Object`

#### Type declaration

| Name | Type |
| :------ | :------ |
| `getPrice` | (`paymentMethod`: [`PaymentMethod`](../modules.md#paymentmethod), `slippage`: `undefined` \| `number`) => `Promise`<{ `formattedPrice`: `string` ; `paymentAddress`: `string` ; `price`: `BigNumber` }\> |
| `mint` | (`paymentMethod`: [`PaymentMethod`](../modules.md#paymentmethod), `identityId`: `BigNumber`, `authorityAddress`: `string`, `signatureDate`: `number`, `signature`: `string`, `slippage`: `undefined` \| `number`) => `Promise`<`ContractTransaction`\> |
| `sign` | (`identityId`: `BigNumber`) => `Promise`<`undefined` \| { `authorityAddress`: `string` ; `signature`: `string` ; `signatureDate`: `number` }\> |
| `types` | { `MintCreditScore`: { `name`: `string` = "identityId"; `type`: `string` = "uint256" }[] } |
| `types.MintCreditScore` | { `name`: `string` = "identityId"; `type`: `string` = "uint256" }[] |
**creditScore**: `CreditScore`

___

### green

**green**: `Object`

#### Type declaration

| Name | Type |
| :------ | :------ |
| `getPrice` | (`paymentMethod`: [`PaymentMethod`](../modules.md#paymentmethod), `slippage`: `undefined` \| `number`) => `Promise`<{ `formattedMintTransactionFee`: `string` ; `formattedPrice`: `string` ; `mintTransactionEstimatedGas`: `BigNumber` ; `mintTransactionFee`: `BigNumber` ; `paymentAddress`: `string` ; `price`: `BigNumber` }\> |
| `mint` | (`paymentMethod`: [`PaymentMethod`](../modules.md#paymentmethod), `receiver`: `string`, `authorityAddress`: `string`, `signatureDate`: `number`, `signature`: `string`, `slippage`: `undefined` \| `number`) => `Promise`<`ContractTransaction`\> |
| `sign` | (`receiver`: `string`) => `Promise`<`undefined` \| { `authorityAddress`: `string` ; `signature`: `string` ; `signatureDate`: `number` }\> |
| `types` | { `MintGreen`: { `name`: `string` = "to"; `type`: `string` = "address" }[] } |
| `types.MintGreen` | { `name`: `string` = "to"; `type`: `string` = "address" }[] |
**green**: `Green`

___

### identity

**identity**: `Object`

#### Type declaration

| Name | Type |
| :------ | :------ |
| `purchase` | () => `Promise`<`ContractTransaction`\> |
| `purchaseIdentityAndName` | (`paymentMethod`: [`PaymentMethod`](../modules.md#paymentmethod), `name`: `string`, `nameLength`: `number`, `duration`: `number`, `metadataURL`: `string`, `authorityAddress`: `string`, `signature`: `string`) => `Promise`<`ContractTransaction`\> |
**identity**: `Identity`

___

Expand All @@ -110,53 +82,21 @@ MasaBase.masa

___

### soulLinker

**soulLinker**: `Object`

#### Type declaration
### sbt

| Name | Type |
| :------ | :------ |
| `addLink` | (`tokenAddress`: `string`, `paymentMethod`: [`PaymentMethod`](../modules.md#paymentmethod), `readerIdentityId`: `BigNumber`, `ownerIdentityId`: `BigNumber`, `tokenId`: `BigNumber`, `signatureDate`: `number`, `expirationDate`: `number`, `signature`: `string`, `slippage`: `undefined` \| `number`) => `Promise`<`boolean`\> |
| `getPrice` | (`tokenAddress`: `string`, `paymentMethod`: [`PaymentMethod`](../modules.md#paymentmethod), `slippage`: `undefined` \| `number`) => `Promise`<{ `paymentAddress`: `string` ; `price`: `BigNumber` }\> |
| `signLink` | (`readerIdentityId`: `BigNumber`, `ownerIdentityId`: `BigNumber`, `tokenAddress`: `string`, `tokenId`: `BigNumber`, `signatureDate`: `number`, `expirationOffset`: `number`) => `Promise`<{ `expirationDate`: `number` ; `signature`: `string` ; `signatureDate`: `number` }\> |
| `types` | { `Link`: { `name`: `string` = "readerIdentityId"; `type`: `string` = "uint256" }[] } |
| `types.Link` | { `name`: `string` = "readerIdentityId"; `type`: `string` = "uint256" }[] |
**sbt**: `SBT`

___

### soulName

**soulName**: `Object`

#### Type declaration
### soulLinker

| Name | Type |
| :------ | :------ |
| `getPrice` | (`paymentMethod`: [`PaymentMethod`](../modules.md#paymentmethod), `nameLength`: `number`, `duration`: `number`, `slippage`: `undefined` \| `number`) => `Promise`<{ `formattedPrice`: `string` ; `paymentAddress`: `string` ; `price`: `BigNumber` }\> |
| `getSoulnameData` | (`soulName`: `string`) => `Promise`<{ `exists`: `boolean` ; `tokenId`: `BigNumber` }\> |
| `isAvailable` | (`soulName`: `string`) => `Promise`<`boolean`\> |
| `purchase` | (`paymentMethod`: [`PaymentMethod`](../modules.md#paymentmethod), `name`: `string`, `nameLength`: `number`, `duration`: `number`, `metadataURL`: `string`, `authorityAddress`: `string`, `signature`: `string`, `receiver?`: `string`) => `Promise`<`ContractTransaction`\> |
| `sign` | (`soulName`: `string`, `soulNameLength`: `number`, `duration`: `number`, `metadataUrl`: `string`, `receiver`: `string`) => `Promise`<`undefined` \| { `authorityAddress`: `string` ; `signature`: `string` }\> |
| `types` | { `MintSoulName`: { `name`: `string` = "to"; `type`: `string` = "address" }[] } |
| `types.MintSoulName` | { `name`: `string` = "to"; `type`: `string` = "address" }[] |
**soulLinker**: `SoulLinker`

___

### tools

`Private` **tools**: `Object`

#### Type declaration
### soulName

| Name | Type |
| :------ | :------ |
| `addSlippage` | (`price`: `BigNumber`, `slippage`: `number`) => `BigNumber` |
| `checkOrGiveAllowance` | (`paymentAddress`: `string`, `paymentMethod`: [`PaymentMethod`](../modules.md#paymentmethod), `spenderAddress`: `string`, `price`: `BigNumber`) => `Promise`<`undefined` \| `ContractReceipt`\> |
| `formatPrice` | (`paymentAddress`: `string`, `price`: `BigNumber`) => `Promise`<`string`\> |
| `getPaymentAddress` | (`paymentMethod`: [`PaymentMethod`](../modules.md#paymentmethod)) => `string` |
| `verify` | (`errorMessage`: `string`, `contract`: `SoulLinker` \| `SoulStore` \| `MasaSBTSelfSovereign`, `domain`: `TypedDataDomain`, `types`: `Record`<`string`, `TypedDataField`[]\>, `value`: `Record`<`string`, `string` \| `number` \| `BigNumber`\>, `signature`: `string`, `authorityAddress`: `string`) => `Promise`<`void`\> |
**soulName**: `SoulName`

## Methods

Expand All @@ -174,26 +114,3 @@ ___
#### Returns

`LogDescription`[]

___

### sbt

**sbt**<`Contract`\>(`address`, `factory?`): `Promise`<{ `getPrice`: (`paymentMethod`: [`PaymentMethod`](../modules.md#paymentmethod), `slippage`: `undefined` \| `number`) => `Promise`<`undefined` \| { `formattedPrice`: `string` ; `paymentAddress`: `string` ; `price`: `BigNumber` }\> ; `prepareMint`: (`paymentMethod`: [`PaymentMethod`](../modules.md#paymentmethod), `name`: `string`, `types`: `Record`<`string`, `TypedDataField`[]\>, `value`: `Record`<`string`, `string` \| `number` \| `BigNumber`\>, `signature`: `string`, `authorityAddress`: `string`, `slippage`: `undefined` \| `number`) => `Promise`<`undefined` \| { `paymentAddress`: `string` = priceObject.paymentAddress; `price`: `BigNumber` = priceObject.price }\> ; `selfSovereignSBT`: `undefined` \| `Contract` ; `sign`: (`name`: `string`, `types`: `Record`<`string`, `TypedDataField`[]\>, `value`: `Record`<`string`, `string` \| `number` \| `BigNumber`\>) => `Promise`<`undefined` \| { `authorityAddress`: `string` ; `signature`: `string` }\> }\>

#### Type parameters

| Name | Type |
| :------ | :------ |
| `Contract` | extends `MasaSBTSelfSovereign`<`Contract`\> |

#### Parameters

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

#### Returns

`Promise`<{ `getPrice`: (`paymentMethod`: [`PaymentMethod`](../modules.md#paymentmethod), `slippage`: `undefined` \| `number`) => `Promise`<`undefined` \| { `formattedPrice`: `string` ; `paymentAddress`: `string` ; `price`: `BigNumber` }\> ; `prepareMint`: (`paymentMethod`: [`PaymentMethod`](../modules.md#paymentmethod), `name`: `string`, `types`: `Record`<`string`, `TypedDataField`[]\>, `value`: `Record`<`string`, `string` \| `number` \| `BigNumber`\>, `signature`: `string`, `authorityAddress`: `string`, `slippage`: `undefined` \| `number`) => `Promise`<`undefined` \| { `paymentAddress`: `string` = priceObject.paymentAddress; `price`: `BigNumber` = priceObject.price }\> ; `selfSovereignSBT`: `undefined` \| `Contract` ; `sign`: (`name`: `string`, `types`: `Record`<`string`, `TypedDataField`[]\>, `value`: `Record`<`string`, `string` \| `number` \| `BigNumber`\>) => `Promise`<`undefined` \| { `authorityAddress`: `string` ; `signature`: `string` }\> }\>
10 changes: 5 additions & 5 deletions docs/classes/MasaCreditScore.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v1.11.5](../README.md) / [Exports](../modules.md) / MasaCreditScore
- v1.12.1](../README.md) / [Exports](../modules.md) / MasaCreditScore

# Class: MasaCreditScore

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

### list

**list**(`address?`): `Promise`<{ `metadata?`: [`ICreditScore`](../interfaces/ICreditScore.md) ; `tokenId`: `BigNumber` ; `tokenUri`: `string` }[]\>
**list**(`address?`): `Promise`<[`CreditScoreDetails`](../interfaces/CreditScoreDetails.md)[]\>

#### Parameters

Expand All @@ -105,13 +105,13 @@ ___

#### Returns

`Promise`<{ `metadata?`: [`ICreditScore`](../interfaces/ICreditScore.md) ; `tokenId`: `BigNumber` ; `tokenUri`: `string` }[]\>
`Promise`<[`CreditScoreDetails`](../interfaces/CreditScoreDetails.md)[]\>

___

### load

**load**(`creditScoreId`): `Promise`<{ `metadata?`: [`ICreditScore`](../interfaces/ICreditScore.md) ; `tokenId`: `BigNumber` ; `tokenUri`: `string` }\>
**load**(`creditScoreId`): `Promise`<[`CreditScoreDetails`](../interfaces/CreditScoreDetails.md)\>

#### Parameters

Expand All @@ -121,4 +121,4 @@ ___

#### Returns

`Promise`<{ `metadata?`: [`ICreditScore`](../interfaces/ICreditScore.md) ; `tokenId`: `BigNumber` ; `tokenUri`: `string` }\>
`Promise`<[`CreditScoreDetails`](../interfaces/CreditScoreDetails.md)\>
10 changes: 5 additions & 5 deletions docs/classes/MasaGreen.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v1.11.5](../README.md) / [Exports](../modules.md) / MasaGreen
- v1.12.1](../README.md) / [Exports](../modules.md) / MasaGreen

# Class: MasaGreen

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

### list

**list**(`address?`): `Promise`<{ `metadata?`: [`IGreen`](../interfaces/IGreen.md) ; `tokenId`: `BigNumber` ; `tokenUri`: `string` }[]\>
**list**(`address?`): `Promise`<[`GreenDetails`](../interfaces/GreenDetails.md)[]\>

Lits all greens on the current network

Expand All @@ -134,13 +134,13 @@ Lits all greens on the current network

#### Returns

`Promise`<{ `metadata?`: [`IGreen`](../interfaces/IGreen.md) ; `tokenId`: `BigNumber` ; `tokenUri`: `string` }[]\>
`Promise`<[`GreenDetails`](../interfaces/GreenDetails.md)[]\>

___

### load

**load**(`identityId`): `Promise`<{ `metadata?`: [`IGreen`](../interfaces/IGreen.md) ; `tokenId`: `BigNumber` ; `tokenUri`: `string` }[]\>
**load**(`identityId`): `Promise`<[`GreenDetails`](../interfaces/GreenDetails.md)[]\>

Loads all greens for an identity on the current network

Expand All @@ -152,7 +152,7 @@ Loads all greens for an identity on the current network

#### Returns

`Promise`<{ `metadata?`: [`IGreen`](../interfaces/IGreen.md) ; `tokenId`: `BigNumber` ; `tokenUri`: `string` }[]\>
`Promise`<[`GreenDetails`](../interfaces/GreenDetails.md)[]\>

___

Expand Down
6 changes: 3 additions & 3 deletions docs/classes/MasaIdentity.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v1.11.5](../README.md) / [Exports](../modules.md) / MasaIdentity
- v1.12.1](../README.md) / [Exports](../modules.md) / MasaIdentity

# Class: MasaIdentity

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

### show

**show**(`address?`): `Promise`<`undefined` \| { `metadata?`: [`IIdentity`](../interfaces/IIdentity.md) ; `tokenId`: `BigNumber` ; `tokenUri`: `string` }\>
**show**(`address?`): `Promise`<`undefined` \| [`IdentityDetails`](../interfaces/IdentityDetails.md)\>

#### Parameters

Expand All @@ -128,4 +128,4 @@ ___

#### Returns

`Promise`<`undefined` \| { `metadata?`: [`IIdentity`](../interfaces/IIdentity.md) ; `tokenId`: `BigNumber` ; `tokenUri`: `string` }\>
`Promise`<`undefined` \| [`IdentityDetails`](../interfaces/IdentityDetails.md)\>
2 changes: 1 addition & 1 deletion docs/classes/MasaSBT.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v1.11.5](../README.md) / [Exports](../modules.md) / MasaSBT
- v1.12.1](../README.md) / [Exports](../modules.md) / MasaSBT

# Class: MasaSBT

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/MasaSession.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v1.11.5](../README.md) / [Exports](../modules.md) / MasaSession
- v1.12.1](../README.md) / [Exports](../modules.md) / MasaSession

# Class: MasaSession

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/MasaSoulLinker.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v1.11.5](../README.md) / [Exports](../modules.md) / MasaSoulLinker
- v1.12.1](../README.md) / [Exports](../modules.md) / MasaSoulLinker

# Class: MasaSoulLinker

Expand Down
10 changes: 5 additions & 5 deletions docs/classes/MasaSoulName.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v1.11.5](../README.md) / [Exports](../modules.md) / MasaSoulName
- v1.12.1](../README.md) / [Exports](../modules.md) / MasaSoulName

# Class: MasaSoulName

Expand Down Expand Up @@ -64,7 +64,7 @@ MasaBase.masa

### burn

**burn**(`soulName`): `Promise`<`void`\>
**burn**(`soulName`): `Promise`<`boolean`\>

#### Parameters

Expand All @@ -74,7 +74,7 @@ MasaBase.masa

#### Returns

`Promise`<`void`\>
`Promise`<`boolean`\>

___

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

### send

**send**(`soulName`, `receiver`): `Promise`<`void`\>
**send**(`soulName`, `receiver`): `Promise`<`boolean`\>

#### Parameters

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

#### Returns

`Promise`<`void`\>
`Promise`<`boolean`\>

___

Expand Down

0 comments on commit 7256a47

Please sign in to comment.