Skip to content

Commit

Permalink
chore(release): 0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rryter committed Aug 13, 2021
1 parent cd314d0 commit 5afb6f9
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 75 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [0.5.8](https://github.com/ERC725Alliance/erc725.js/compare/v0.5.7...v0.5.8) (2021-08-13)
### [0.6.0](https://github.com/ERC725Alliance/erc725.js/compare/v0.5.7...v0.6.0) (2021-08-13)

### Feature

- **API:** Adjusted API to be more consistent
- https://github.com/ERC725Alliance/erc725.js/issues/30
- https://github.com/ERC725Alliance/erc725.js/pull/31

### Bug Fixes

* **mocha:** increase timeout time ([b7ce1a0](https://github.com/ERC725Alliance/erc725.js/commit/b7ce1a07711b8251f4447d613c4c5a522b5e263f))
- **mocha:** increase timeout time ([b7ce1a0](https://github.com/ERC725Alliance/erc725.js/commit/b7ce1a07711b8251f4447d613c4c5a522b5e263f))

### [0.5.7](https://github.com/ERC725Alliance/erc725.js/compare/v0.2.0...v0.5.7) (2021-07-30)

Expand Down
12 changes: 6 additions & 6 deletions docs/technical-reference/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# erc725.js - v0.5.7
# @erc725/erc725.js - v0.6.0

## Classes

Expand All @@ -24,7 +24,7 @@ Renames and exports: [ERC725](classes/ERC725.md)

#### Defined in

[types/ERC725JSONSchema.ts:3](https://github.com/ERC725Alliance/erc725.js/blob/8d9f3d2/src/types/ERC725JSONSchema.ts#L3)
[types/ERC725JSONSchema.ts:3](https://github.com/ERC725Alliance/erc725.js/blob/596689d/src/types/ERC725JSONSchema.ts#L3)

___

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

#### Defined in

[types/ERC725JSONSchema.ts:5](https://github.com/ERC725Alliance/erc725.js/blob/8d9f3d2/src/types/ERC725JSONSchema.ts#L5)
[types/ERC725JSONSchema.ts:5](https://github.com/ERC725Alliance/erc725.js/blob/596689d/src/types/ERC725JSONSchema.ts#L5)

___

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

#### Defined in

[types/ERC725JSONSchema.ts:15](https://github.com/ERC725Alliance/erc725.js/blob/8d9f3d2/src/types/ERC725JSONSchema.ts#L15)
[types/ERC725JSONSchema.ts:15](https://github.com/ERC725Alliance/erc725.js/blob/596689d/src/types/ERC725JSONSchema.ts#L15)

## Functions

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

#### Defined in

[lib/utils.ts:388](https://github.com/ERC725Alliance/erc725.js/blob/8d9f3d2/src/lib/utils.ts#L388)
[lib/utils.ts:388](https://github.com/ERC725Alliance/erc725.js/blob/596689d/src/lib/utils.ts#L388)

___

Expand All @@ -97,4 +97,4 @@ KeyValuePair[] An array of key-value objects

#### Defined in

[lib/utils.ts:462](https://github.com/ERC725Alliance/erc725.js/blob/8d9f3d2/src/lib/utils.ts#L462)
[lib/utils.ts:462](https://github.com/ERC725Alliance/erc725.js/blob/596689d/src/lib/utils.ts#L462)
85 changes: 42 additions & 43 deletions docs/technical-reference/classes/ERC725.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ This package is currently in early stages of development, <br/>use only for test

## Type parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| Name | Type | Description |
| :------- | :---------------------- | :----------------------------------------- |
| `Schema` | extends `GenericSchema` | **Work in progress, nothing to see here**. |

## Constructors
Expand All @@ -24,22 +24,22 @@ https://github.com/ERC725Alliance/erc725.js/tree/main/examples/src/instantiation

#### Type parameters

| Name | Type |
| :------ | :------ |
| Name | Type |
| :------- | :---------------------- |
| `Schema` | extends `GenericSchema` |

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `schema` | [`ERC725JSONSchema`](../interfaces/ERC725JSONSchema.md)[] | More information available here: [LSP-2-ERC725YJSONSchema](https://github.com/lukso-network/LIPs/blob/master/LSPs/LSP-2-ERC725YJSONSchema.md) |
| `address?` | `any` | Address of the ERC725 contract you want to interact with |
| `provider?` | `any` | |
| `config?` | [`ERC725Config`](../interfaces/ERC725Config.md) | Configuration object. |
| Name | Type | Description |
| :---------- | :-------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------- |
| `schema` | [`ERC725JSONSchema`](../interfaces/ERC725JSONSchema.md)[] | More information available here: [LSP-2-ERC725YJSONSchema](https://github.com/lukso-network/LIPs/blob/master/LSPs/LSP-2-ERC725YJSONSchema.md) |
| `address?` | `any` | Address of the ERC725 contract you want to interact with |
| `provider?` | `any` | |
| `config?` | [`ERC725Config`](../interfaces/ERC725Config.md) | Configuration object. |

#### Defined in

[index.ts:93](https://github.com/ERC725Alliance/erc725.js/blob/8d9f3d2/src/index.ts#L93)
[index.ts:93](https://github.com/ERC725Alliance/erc725.js/blob/596689d/src/index.ts#L93)

## Properties

Expand All @@ -49,17 +49,17 @@ https://github.com/ERC725Alliance/erc725.js/tree/main/examples/src/instantiation

#### Type declaration

| Name | Type |
| :------ | :------ |
| `address?` | `string` |
| `config` | [`ERC725Config`](../interfaces/ERC725Config.md) |
| `provider?` | `any` |
| `providerType?` | ``null`` \| `ProviderType` |
| `schema` | [`ERC725JSONSchema`](../interfaces/ERC725JSONSchema.md)[] |
| Name | Type |
| :-------------- | :-------------------------------------------------------- |
| `address?` | `string` |
| `config` | [`ERC725Config`](../interfaces/ERC725Config.md) |
| `provider?` | `any` |
| `providerType?` | `null` \| `ProviderType` |
| `schema` | [`ERC725JSONSchema`](../interfaces/ERC725JSONSchema.md)[] |

#### Defined in

[index.ts:72](https://github.com/ERC725Alliance/erc725.js/blob/8d9f3d2/src/index.ts#L72)
[index.ts:72](https://github.com/ERC725Alliance/erc725.js/blob/596689d/src/index.ts#L72)

## Methods

Expand All @@ -77,8 +77,8 @@ It does the `decoding` and `fetching` of external references for you automatical

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| Name | Type | Description |
| :----- | :------- | :------------------------------------- |
| `data` | `Object` | An object with one or many properties. |

#### Returns
Expand All @@ -97,9 +97,9 @@ https://github.com/ERC725Alliance/erc725.js/tree/main/examples/src/decodeData.js

#### Defined in

[index.ts:338](https://github.com/ERC725Alliance/erc725.js/blob/8d9f3d2/src/index.ts#L338)
[index.ts:337](https://github.com/ERC725Alliance/erc725.js/blob/596689d/src/index.ts#L337)

___
---

### encodeData

Expand All @@ -109,8 +109,8 @@ To be able to store your data on the blockchain, you need to encode it according

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| Name | Type | Description |
| :----- | :------- | :----------------------------------------------------------------------------------- |
| `data` | `Object` | An object with one or many properties, containing the data that needs to be encoded. |

#### Returns
Expand All @@ -131,34 +131,33 @@ https://github.com/ERC725Alliance/erc725.js/tree/main/examples/src/encodeData.js
https://github.com/ERC725Alliance/erc725.js/tree/main/examples/src/encodeData.js#L39-L67
```

```
:::tip
When encoding JSON it is possible to pass in the JSON object and the URL where it is available publicly.
The JSON will be hashed with `keccak256`.
:::

#### Defined in

[index.ts:311](https://github.com/ERC725Alliance/erc725.js/blob/8d9f3d2/src/index.ts#L311)
[index.ts:310](https://github.com/ERC725Alliance/erc725.js/blob/596689d/src/index.ts#L310)

___
---

### fetchData

**fetchData**(`keyOrKeys?`): `Promise`<`Object`\>

Since [`getData`](ERC725.md#getdata) exclusively returns data that is stored on the blockchain, `fetchData` comes in handy.
Additionally to the data from the blockchain, `fetchData` also returns data from IPFS or HTTP(s) endpoints
stored as [`JSONURL`](https://github.com/lukso-network/LIPs/blob/master/LSPs/LSP-2-ERC725YJSONSchema.md#jsonurl), or [`ASSETURL`](https://github.com/lukso-network/LIPs/blob/master/LSPs/LSP-2-ERC725YJSONSchema.md#asseturl).
stored as [`JSONURL`](https://github.com/lukso-network/LIPs/blob/master/LSPs/LSP-2-ERC725YJSONSchema.md#jsonurl) or [`ASSETURL`](https://github.com/lukso-network/LIPs/blob/master/LSPs/LSP-2-ERC725YJSONSchema.md#asseturl).

:::info
To ensure **data authenticity** `fetchData` compares the `hash` of the fetched JSON with the `hash` stored on the blockchain.
:::

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| Name | Type | Description |
| :----------- | :--------------------- | :------------------------------------------------------------------------------------------------------- |
| `keyOrKeys?` | `string` \| `string`[] | The name (or the encoded name as the schema ‘key’) of the schema element in the class instance’s schema. |

#### Returns
Expand All @@ -181,9 +180,9 @@ https://github.com/ERC725Alliance/erc725.js/tree/main/examples/src/fetchData.js#

#### Defined in

[index.ts:230](https://github.com/ERC725Alliance/erc725.js/blob/8d9f3d2/src/index.ts#L230)
[index.ts:230](https://github.com/ERC725Alliance/erc725.js/blob/596689d/src/index.ts#L230)

___
---

### getData

Expand All @@ -193,16 +192,16 @@ Gets **decoded data** for one, many or all keys of the specified `ERC725` smart-
When omitting the `keyOrKeys` parameter, it will get all the keys (as per [ERC725JSONSchema](../interfaces/ERC725JSONSchema.md) definition).

:::caution
Data returned by this function does not contain external data of [`JSONURL`](https://github.com/lukso-network/LIPs/blob/master/LSPs/LSP-2-ERC725YJSONSchema.md#jsonurl),
Data returned by this function does not contain external data of [`JSONURL`](https://github.com/lukso-network/LIPs/blob/master/LSPs/LSP-2-ERC725YJSONSchema.md#jsonurl)
or [`ASSETURL`](https://github.com/lukso-network/LIPs/blob/master/LSPs/LSP-2-ERC725YJSONSchema.md#asseturl) schema elements.

If you would like to receive everything in one go, you can use [`fetchData`](ERC725.md#fetchdata) for that.
:::

#### Parameters

| Name | Type |
| :------ | :------ |
| Name | Type |
| :------------ | :--------------------- |
| `keysOrKeys?` | `string` \| `string`[] |

#### Returns
Expand All @@ -225,9 +224,9 @@ https://github.com/ERC725Alliance/erc725.js/tree/main/examples/src/getData.js#L4

#### Defined in

[index.ts:182](https://github.com/ERC725Alliance/erc725.js/blob/8d9f3d2/src/index.ts#L182)
[index.ts:182](https://github.com/ERC725Alliance/erc725.js/blob/596689d/src/index.ts#L182)

___
---

### getOwner

Expand All @@ -238,8 +237,8 @@ Not directly related to ERC725 specifications.

#### Parameters

| Name | Type |
| :------ | :------ |
| Name | Type |
| :--------- | :------- |
| `address?` | `string` |

#### Returns
Expand All @@ -249,17 +248,17 @@ Not directly related to ERC725 specifications.
The address of the contract owner as stored in the contract.

:::warning
This method is not yet supported when using the `graph` provider type.
This method is not yet supported when using the `graph` provider type.
:::

```javascript title="Example"
await myERC725.getOwner();
// '0x94933413384997F9402cc07a650e8A34d60F437A'

await myERC725.getOwner("0x3000783905Cc7170cCCe49a4112Deda952DDBe24");
await myERC725.getOwner('0x3000783905Cc7170cCCe49a4112Deda952DDBe24');
// '0x7f1b797b2Ba023Da2482654b50724e92EB5a7091'
```

#### Defined in

[index.ts:366](https://github.com/ERC725Alliance/erc725.js/blob/8d9f3d2/src/index.ts#L366)
[index.ts:365](https://github.com/ERC725Alliance/erc725.js/blob/596689d/src/index.ts#L365)
5 changes: 3 additions & 2 deletions docs/technical-reference/interfaces/ERC725Config.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@

```js title=Example
const config = {
ipfsGateway: 'https://ipfs.lukso.network/ipfs/'
ipfsGateway: 'https://ipfs.lukso.network/ipfs/',
};
```

Make sure to use the following format: `<url>/ipfs/`.<br/>
Another example: `https://cloudflare-ipfs.com/ipfs/`

#### Defined in

[types/Config.ts:11](https://github.com/ERC725Alliance/erc725.js/blob/8d9f3d2/src/types/Config.ts#L11)
[types/Config.ts:11](https://github.com/ERC725Alliance/erc725.js/blob/596689d/src/types/Config.ts#L11)
Loading

0 comments on commit 5afb6f9

Please sign in to comment.