Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
H34D committed Nov 14, 2022
1 parent f1c5143 commit 1a81cc7
Show file tree
Hide file tree
Showing 17 changed files with 59 additions and 90 deletions.
2 changes: 1 addition & 1 deletion docs/README.md
@@ -1,5 +1,5 @@
# Masa SDK
- v0.4.4 / [Exports](modules.md)
- v0.4.6 / [Exports](modules.md)

---

Expand Down
28 changes: 10 additions & 18 deletions docs/classes/Masa.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v0.4.4](../README.md) / [Exports](../modules.md) / Masa
- v0.4.6](../README.md) / [Exports](../modules.md) / Masa

# Class: Masa

Expand All @@ -12,7 +12,7 @@
### Properties

- [account](Masa.md#account)
- [arweaveClient](Masa.md#arweaveclient)
- [arweave](Masa.md#arweave)
- [client](Masa.md#client)
- [config](Masa.md#config)
- [contracts](Masa.md#contracts)
Expand Down Expand Up @@ -46,13 +46,13 @@

| Name | Type |
| :------ | :------ |
| `getBalances` | (`address`: `string`) => `Promise`<`undefined` \| { `ethBalance`: `BigNumber` ; `masaBalance`: `BigNumber` ; `usdcBalance`: `BigNumber` ; `wethBalance`: `BigNumber` }\> |
| `getBalances` | (`address`: `string`) => `Promise`<`undefined` \| { `ethBalance`: `BigNumber` ; `identityBalance`: `BigNumber` ; `masaBalance`: `BigNumber` ; `soulNameBalance`: `BigNumber` ; `soulbound2FABalance`: `BigNumber` ; `soulboundCreditScoreBalance`: `BigNumber` ; `usdcBalance`: `BigNumber` ; `wethBalance`: `BigNumber` }\> |

___

### arweaveClient
### arweave

`Readonly` **arweaveClient**: `default`
`Readonly` **arweave**: `default`

___

Expand All @@ -64,21 +64,13 @@ ___

### config

**config**: [`MasaConfig`](../interfaces/MasaConfig.md)
`Readonly` **config**: [`MasaConfig`](../interfaces/MasaConfig.md)

___

### contracts

**contracts**: `Object`

#### Type declaration

| Name | Type |
| :------ | :------ |
| `addresses` | [`Addresses`](../interfaces/Addresses.md) |
| `loadIdentityContracts` | () => `Promise`<[`IIdentityContracts`](../interfaces/IIdentityContracts.md)\> |
| `service` | [`ContractService`](ContractService.md) |
`Readonly` **contracts**: [`MasaContracts`](MasaContracts.md)

___

Expand Down Expand Up @@ -154,9 +146,9 @@ ___
| `burn` | (`soulName`: `string`) => `Promise`<`void`\> |
| `create` | (`soulName`: `string`, `duration`: `number`, `paymentMethod`: [`PaymentMethod`](../modules.md#paymentmethod)) => `Promise`<`void`\> |
| `getRegistrationPrice` | (`soulName`: `string`, `duration`: `number`, `paymentMethod`: [`PaymentMethod`](../modules.md#paymentmethod)) => `Promise`<`string` \| `BigNumber`\> |
| `list` | (`address?`: `string`) => `Promise`<`undefined` \| { `index`: `number` ; `metadata`: `undefined` \| [`ISoulName`](../interfaces/ISoulName.md) ; `tokenDetails`: [`string`, `BigNumber`, `BigNumber`, `BigNumber`, `boolean`] & { `active`: `boolean` ; `expirationDate`: `BigNumber` ; `identityId`: `BigNumber` ; `sbtName`: `string` ; `tokenId`: `BigNumber` } ; `tokenUri`: `string` }[]\> |
| `list` | (`address?`: `string`) => `Promise`<{ `index`: `number` ; `metadata`: `undefined` \| [`ISoulName`](../interfaces/ISoulName.md) ; `owner`: `string` ; `tokenDetails`: [`string`, `BigNumber`, `BigNumber`, `BigNumber`, `boolean`] & { `active`: `boolean` ; `expirationDate`: `BigNumber` ; `identityId`: `BigNumber` ; `sbtName`: `string` ; `tokenId`: `BigNumber` } ; `tokenUri`: `string` }[]\> |
| `loadSoulNameByName` | (`soulName`: `string`) => `Promise`<{ `metadata`: `undefined` \| [`ISoulName`](../interfaces/ISoulName.md) ; `owner`: `string` ; `tokenDetails`: [`string`, `BigNumber`, `BigNumber`, `BigNumber`, `boolean`] & { `active`: `boolean` ; `expirationDate`: `BigNumber` ; `identityId`: `BigNumber` ; `sbtName`: `string` ; `tokenId`: `BigNumber` } ; `tokenUri`: `string` }\> |
| `loadSoulNamesByIdentityId` | (`identityId`: `BigNumber`) => `Promise`<{ `index`: `number` ; `metadata`: `undefined` \| [`ISoulName`](../interfaces/ISoulName.md) ; `tokenDetails`: [`string`, `BigNumber`, `BigNumber`, `BigNumber`, `boolean`] & { `active`: `boolean` ; `expirationDate`: `BigNumber` ; `identityId`: `BigNumber` ; `sbtName`: `string` ; `tokenId`: `BigNumber` } ; `tokenUri`: `string` }[]\> |
| `loadSoulNamesByIdentityId` | (`identityId`: `BigNumber`) => `Promise`<{ `index`: `number` ; `metadata`: `undefined` \| [`ISoulName`](../interfaces/ISoulName.md) ; `owner`: `string` ; `tokenDetails`: [`string`, `BigNumber`, `BigNumber`, `BigNumber`, `boolean`] & { `active`: `boolean` ; `expirationDate`: `BigNumber` ; `identityId`: `BigNumber` ; `sbtName`: `string` ; `tokenId`: `BigNumber` } ; `tokenUri`: `string` }[]\> |
| `send` | (`soulName`: `string`, `receiver`: `string`) => `Promise`<`void`\> |

___
Expand All @@ -172,7 +164,7 @@ ___
| `burn` | (`twofaId`: `number`) => `Promise`<`boolean`\> |
| `create` | (`phoneNumber`: `string`, `code`: `string`) => `Promise`<[`Create2FAResult`](../interfaces/Create2FAResult.md)\> |
| `generate` | (`phoneNumber`: `string`) => `Promise`<`undefined` \| { `message`: `string` ; `status`: `string` ; `success`: `boolean` }\> |
| `list` | (`address?`: `string`) => `Promise`<`undefined` \| { `metadata`: [`I2FA`](../interfaces/I2FA.md) ; `tokenId`: `BigNumber` ; `tokenUri`: `string` }[]\> |
| `list` | (`address?`: `string`) => `Promise`<{ `metadata`: [`I2FA`](../interfaces/I2FA.md) ; `tokenId`: `BigNumber` ; `tokenUri`: `string` }[]\> |
| `load` | (`identityId`: `BigNumber`) => `Promise`<{ `metadata`: [`I2FA`](../interfaces/I2FA.md) ; `tokenId`: `BigNumber` ; `tokenUri`: `string` }[]\> |
| `mint` | (`address`: `string`, `phoneNumber`: `string`, `code`: `string`, `signature`: `string`) => `Promise`<`undefined` \| { `message`: `string` ; `status`: `string` ; `success`: `boolean` ; `tokenId`: `string` \| `BigNumber` }\> |

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

# Class: MasaClient

Expand Down
60 changes: 30 additions & 30 deletions docs/classes/ContractService.md → docs/classes/MasaContracts.md
@@ -1,58 +1,64 @@
[# Masa SDK
- v0.4.4](../README.md) / [Exports](../modules.md) / ContractService
- v0.4.6](../README.md) / [Exports](../modules.md) / MasaContracts

# Class: ContractService
# Class: MasaContracts

## Table of contents

### Constructors

- [constructor](ContractService.md#constructor)
- [constructor](MasaContracts.md#constructor)

### Properties

- [masa](ContractService.md#masa)
- [identity](MasaContracts.md#identity)
- [masaConfig](MasaContracts.md#masaconfig)

### Methods

- [checkOrGiveAllowance](ContractService.md#checkorgiveallowance)
- [getPaymentAddress](ContractService.md#getpaymentaddress)
- [getSoulNames](ContractService.md#getsoulnames)
- [isAvailable](ContractService.md#isavailable)
- [price](ContractService.md#price)
- [purchaseIdentity](ContractService.md#purchaseidentity)
- [purchaseIdentityAndName](ContractService.md#purchaseidentityandname)
- [purchaseName](ContractService.md#purchasename)
- [checkOrGiveAllowance](MasaContracts.md#checkorgiveallowance)
- [getPaymentAddress](MasaContracts.md#getpaymentaddress)
- [getSoulNames](MasaContracts.md#getsoulnames)
- [isAvailable](MasaContracts.md#isavailable)
- [price](MasaContracts.md#price)
- [purchaseIdentity](MasaContracts.md#purchaseidentity)
- [purchaseIdentityAndName](MasaContracts.md#purchaseidentityandname)
- [purchaseName](MasaContracts.md#purchasename)

## Constructors

### constructor

**new ContractService**(`masa`)
**new MasaContracts**(`masaConfig`)

#### Parameters

| Name | Type |
| :------ | :------ |
| `masa` | [`Masa`](Masa.md) |
| `masaConfig` | [`MasaConfig`](../interfaces/MasaConfig.md) |

## Properties

### masa
### identity

`Private` **masa**: [`Masa`](Masa.md)
**identity**: [`IIdentityContracts`](../interfaces/IIdentityContracts.md)

___

### masaConfig

`Private` **masaConfig**: [`MasaConfig`](../interfaces/MasaConfig.md)

## Methods

### checkOrGiveAllowance

`Private` **checkOrGiveAllowance**(`identityContracts`, `paymentAddress`, `signer`, `paymentMethod`, `prices`): `Promise`<`undefined` \| `ContractReceipt`\>
`Private` **checkOrGiveAllowance**(`paymentAddress`, `signer`, `paymentMethod`, `prices`): `Promise`<`undefined` \| `ContractReceipt`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `identityContracts` | [`IIdentityContracts`](../interfaces/IIdentityContracts.md) |
| `paymentAddress` | `string` |
| `signer` | `Signer` |
| `paymentMethod` | [`PaymentMethod`](../modules.md#paymentmethod) |
Expand Down Expand Up @@ -85,13 +91,12 @@ ___

### getSoulNames

**getSoulNames**(`identityContracts`, `address`): `Promise`<`string`[]\>
**getSoulNames**(`address`): `Promise`<`string`[]\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `identityContracts` | [`IIdentityContracts`](../interfaces/IIdentityContracts.md) |
| `address` | `string` |

#### Returns
Expand All @@ -102,13 +107,12 @@ ___

### isAvailable

**isAvailable**(`identityContracts`, `name`): `Promise`<`boolean`\>
**isAvailable**(`name`): `Promise`<`boolean`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `identityContracts` | [`IIdentityContracts`](../interfaces/IIdentityContracts.md) |
| `name` | `string` |

#### Returns
Expand All @@ -119,13 +123,12 @@ ___

### price

**price**(`identityContracts`, `name`, `duration?`): `Promise`<[`BigNumber`, `BigNumber`, `BigNumber`] & { `priceInETH`: `BigNumber` ; `priceInStableCoin`: `BigNumber` ; `priceInUtilityToken`: `BigNumber` }\>
**price**(`name`, `duration?`): `Promise`<[`BigNumber`, `BigNumber`, `BigNumber`] & { `priceInETH`: `BigNumber` ; `priceInStableCoin`: `BigNumber` ; `priceInUtilityToken`: `BigNumber` }\>

#### Parameters

| Name | Type | Default value |
| :------ | :------ | :------ |
| `identityContracts` | [`IIdentityContracts`](../interfaces/IIdentityContracts.md) | `undefined` |
| `name` | `string` | `undefined` |
| `duration` | `number` | `1` |

Expand All @@ -137,13 +140,12 @@ ___

### purchaseIdentity

**purchaseIdentity**(`identityContracts`, `signer`): `Promise`<`ContractTransaction`\>
**purchaseIdentity**(`signer`): `Promise`<`ContractTransaction`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `identityContracts` | [`IIdentityContracts`](../interfaces/IIdentityContracts.md) |
| `signer` | `Signer` |

#### Returns
Expand All @@ -154,13 +156,12 @@ ___

### purchaseIdentityAndName

**purchaseIdentityAndName**(`identityContracts`, `signer`, `name`, `paymentMethod`, `duration?`, `metadataURL`): `Promise`<`ContractTransaction`\>
**purchaseIdentityAndName**(`signer`, `name`, `paymentMethod`, `duration?`, `metadataURL`): `Promise`<`ContractTransaction`\>

#### Parameters

| Name | Type | Default value |
| :------ | :------ | :------ |
| `identityContracts` | [`IIdentityContracts`](../interfaces/IIdentityContracts.md) | `undefined` |
| `signer` | `Signer` | `undefined` |
| `name` | `string` | `undefined` |
| `paymentMethod` | [`PaymentMethod`](../modules.md#paymentmethod) | `undefined` |
Expand All @@ -175,13 +176,12 @@ ___

### purchaseName

**purchaseName**(`identityContracts`, `signer`, `name`, `paymentMethod`, `duration?`, `metadataURL`): `Promise`<`ContractTransaction`\>
**purchaseName**(`signer`, `name`, `paymentMethod`, `duration?`, `metadataURL`): `Promise`<`ContractTransaction`\>

#### Parameters

| Name | Type | Default value |
| :------ | :------ | :------ |
| `identityContracts` | [`IIdentityContracts`](../interfaces/IIdentityContracts.md) | `undefined` |
| `signer` | `Signer` | `undefined` |
| `name` | `string` | `undefined` |
| `paymentMethod` | [`PaymentMethod`](../modules.md#paymentmethod) | `undefined` |
Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/Addresses.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v0.4.4](../README.md) / [Exports](../modules.md) / Addresses
- v0.4.6](../README.md) / [Exports](../modules.md) / Addresses

# Interface: Addresses

Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/Attribute.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v0.4.4](../README.md) / [Exports](../modules.md) / Attribute
- v0.4.6](../README.md) / [Exports](../modules.md) / Attribute

# Interface: Attribute

Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/Create2FAResult.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v0.4.4](../README.md) / [Exports](../modules.md) / Create2FAResult
- v0.4.6](../README.md) / [Exports](../modules.md) / Create2FAResult

# Interface: Create2FAResult

Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/CreateCreditScoreResult.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v0.4.4](../README.md) / [Exports](../modules.md) / CreateCreditScoreResult
- v0.4.6](../README.md) / [Exports](../modules.md) / CreateCreditScoreResult

# Interface: CreateCreditScoreResult

Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/I2fa.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v0.4.4](../README.md) / [Exports](../modules.md) / I2FA
- v0.4.6](../README.md) / [Exports](../modules.md) / I2FA

# Interface: I2FA

Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/ICreditScore.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v0.4.4](../README.md) / [Exports](../modules.md) / ICreditScore
- v0.4.6](../README.md) / [Exports](../modules.md) / ICreditScore

# Interface: ICreditScore

Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/IIdentity.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v0.4.4](../README.md) / [Exports](../modules.md) / IIdentity
- v0.4.6](../README.md) / [Exports](../modules.md) / IIdentity

# Interface: IIdentity

Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/IIdentityContracts.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v0.4.4](../README.md) / [Exports](../modules.md) / IIdentityContracts
- v0.4.6](../README.md) / [Exports](../modules.md) / IIdentityContracts

# Interface: IIdentityContracts

Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/ISoulName.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v0.4.4](../README.md) / [Exports](../modules.md) / ISoulName
- v0.4.6](../README.md) / [Exports](../modules.md) / ISoulName

# Interface: ISoulName

Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/LoadContractArgs.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v0.4.4](../README.md) / [Exports](../modules.md) / LoadContractArgs
- v0.4.6](../README.md) / [Exports](../modules.md) / LoadContractArgs

# Interface: LoadContractArgs

Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/MasaArgs.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v0.4.4](../README.md) / [Exports](../modules.md) / MasaArgs
- v0.4.6](../README.md) / [Exports](../modules.md) / MasaArgs

# Interface: MasaArgs

Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/MasaConfig.md
@@ -1,5 +1,5 @@
[# Masa SDK
- v0.4.4](../README.md) / [Exports](../modules.md) / MasaConfig
- v0.4.6](../README.md) / [Exports](../modules.md) / MasaConfig

# Interface: MasaConfig

Expand Down

0 comments on commit 1a81cc7

Please sign in to comment.