Skip to content

Commit

Permalink
Merge pull request #33 from masa-finance/feature/sdk
Browse files Browse the repository at this point in the history
Feature/sdk
  • Loading branch information
H34D committed Nov 2, 2022
2 parents 421e658 + 19f7961 commit a25560e
Show file tree
Hide file tree
Showing 47 changed files with 2,152 additions and 97 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/publish-to-docs.yml
@@ -0,0 +1,28 @@
name: Publish to Docs

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
container: pandoc/latex
steps:
- uses: actions/checkout@v2
- name: Copy Changelog
run: |
cp CHANGELOG.md docs
- name: Pushes to another repository
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source-directory: 'docs'
target-directory: 'docs/developers/masa-react'
destination-github-username: 'masa-finance'
destination-repository-name: 'docs'
user-email: 13647606+H34D@users.noreply.github.com
target-branch: main
4 changes: 2 additions & 2 deletions README.md
@@ -1,4 +1,5 @@
# Setup
## Setup

```
git clone https://github.com/masa-finance/masa-react.git
Expand All @@ -13,4 +14,3 @@ mkcert masatools.finance
yarn
yarn storybook
```

1 change: 1 addition & 0 deletions docs/.nojekyll
@@ -0,0 +1 @@
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
19 changes: 19 additions & 0 deletions docs/README.md
@@ -0,0 +1,19 @@
# Masa React
/ [Exports](modules.md)

## Setup

```
git clone https://github.com/masa-finance/masa-react.git
sudo nano /etc/hosts
// add 127.0.0.1 masatools.finance
brew install mkcert
cd masa-react
mkcert masatools.finance
yarn
yarn storybook
```
53 changes: 53 additions & 0 deletions docs/interfaces/rest.MethodMetadata.md
@@ -0,0 +1,53 @@
[# Masa React
](../README.md) / [Exports](../modules.md) / [rest](../modules/rest.md) / MethodMetadata

# Interface: MethodMetadata

[rest](../modules/rest.md).MethodMetadata

## Table of contents

### Properties

- [author](rest.MethodMetadata.md#author)
- [authorPicture](rest.MethodMetadata.md#authorpicture)
- [description](rest.MethodMetadata.md#description)
- [method](rest.MethodMetadata.md#method)
- [name](rest.MethodMetadata.md#name)
- [parameters](rest.MethodMetadata.md#parameters)

## Properties

### author

**author**: `string`

___

### authorPicture

**authorPicture**: `string`

___

### description

**description**: `string`

___

### method

**method**: ``"GET"`` \| ``"POST"`` \| ``"PUT"`` \| ``"DELETE"`` \| ``"OPTIONS"``

___

### name

**name**: `string`

___

### parameters

**parameters**: [`Parameter`](rest.Parameter.md)[]
53 changes: 53 additions & 0 deletions docs/interfaces/rest.Parameter.md
@@ -0,0 +1,53 @@
[# Masa React
](../README.md) / [Exports](../modules.md) / [rest](../modules/rest.md) / Parameter

# Interface: Parameter

[rest](../modules/rest.md).Parameter

## Table of contents

### Properties

- [dataType](rest.Parameter.md#datatype)
- [default](rest.Parameter.md#default)
- [description](rest.Parameter.md#description)
- [key](rest.Parameter.md#key)
- [name](rest.Parameter.md#name)
- [required](rest.Parameter.md#required)

## Properties

### dataType

**dataType**: ``"string"`` \| ``"number"``

___

### default

**default**: `string`

___

### description

**description**: `string`

___

### key

**key**: `number`

___

### name

**name**: `string`

___

### required

**required**: ``"yes"`` \| ``"no"``
127 changes: 127 additions & 0 deletions docs/modules.md
@@ -0,0 +1,127 @@
[# Masa React
](README.md) / Exports

# # Masa React

## Table of contents

### Namespaces

- [rest](modules/rest.md)

### Variables

- [addresses](modules.md#addresses)

### Functions

- [AccessTokenProvider](modules.md#accesstokenprovider)
- [MasaToolsProvider](modules.md#masatoolsprovider)
- [MasaToolsWrapper](modules.md#masatoolswrapper)
- [loadIdentityContracts](modules.md#loadidentitycontracts)
- [useContractCall](modules.md#usecontractcall)
- [useMasaTools](modules.md#usemasatools)

## Variables

### addresses

`Const` **addresses**: `Addresses`

## Functions

### AccessTokenProvider

**AccessTokenProvider**(`__namedParameters`): `Element`

#### Parameters

| Name | Type |
| :------ | :------ |
| `__namedParameters` | `AccessTokenProps` |

#### Returns

`Element`

___

### MasaToolsProvider

**MasaToolsProvider**(`__namedParameters`): `Element`

#### Parameters

| Name | Type |
| :------ | :------ |
| `__namedParameters` | `MasaToolsProviderProps` |

#### Returns

`Element`

___

### MasaToolsWrapper

**MasaToolsWrapper**(`__namedParameters`): `Element`

#### Parameters

| Name | Type |
| :------ | :------ |
| `__namedParameters` | `MasaToolsWrapperProps` |

#### Returns

`Element`

___

### loadIdentityContracts

**loadIdentityContracts**(`__namedParameters`): `Promise`<`IIdentityContracts`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `__namedParameters` | `LoadContractArgs` |

#### Returns

`Promise`<`IIdentityContracts`\>

___

### useContractCall

**useContractCall**(`__namedParameters`): `Object`

#### Parameters

| Name | Type |
| :------ | :------ |
| `__namedParameters` | `Object` |
| `__namedParameters.method` | `Promise`<`any`\> |

#### Returns

`Object`

| Name | Type |
| :------ | :------ |
| `data` | `any` |
| `error` | `any` |
| `getData` | () => `any` |
| `loading` | `boolean` |

___

### useMasaTools

**useMasaTools**(): `MasaToolsShape`

#### Returns

`MasaToolsShape`
39 changes: 39 additions & 0 deletions docs/modules/rest.accounts.md
@@ -0,0 +1,39 @@
[# Masa React
](../README.md) / [Exports](../modules.md) / [rest](rest.md) / accounts

# Namespace: accounts

[rest](rest.md).accounts

## Table of contents

### Variables

- [metadata](rest.accounts.md#metadata)

### Functions

- [useMethod](rest.accounts.md#usemethod)

## Variables

### metadata

`Const` **metadata**: [`MethodMetadata`](../interfaces/rest.MethodMetadata.md)

## Functions

### useMethod

**useMethod**(): `Object`

#### Returns

`Object`

| Name | Type |
| :------ | :------ |
| `data` | `unknown` |
| `error` | `undefined` \| `Error` |
| `getData` | (`lazyData?`: `any`) => `Promise`<`void`\> |
| `loading` | `boolean` |
45 changes: 45 additions & 0 deletions docs/modules/rest.auth.md
@@ -0,0 +1,45 @@
[# Masa React
](../README.md) / [Exports](../modules.md) / [rest](rest.md) / auth

# Namespace: auth

[rest](rest.md).auth

## Table of contents

### Variables

- [metadata](rest.auth.md#metadata)

### Functions

- [useMethod](rest.auth.md#usemethod)

## Variables

### metadata

`Const` **metadata**: [`MethodMetadata`](../interfaces/rest.MethodMetadata.md)

## Functions

### useMethod

**useMethod**(`__namedParameters`): `Object`

#### Parameters

| Name | Type |
| :------ | :------ |
| `__namedParameters` | `any` |

#### Returns

`Object`

| Name | Type |
| :------ | :------ |
| `data` | `unknown` |
| `error` | `undefined` \| `Error` |
| `getData` | (`lazyData?`: `any`) => `Promise`<`void`\> |
| `loading` | `boolean` |

0 comments on commit a25560e

Please sign in to comment.