Skip to content

Commit

Permalink
Merge pull request #250 from ERC725Alliance/develop
Browse files Browse the repository at this point in the history
Release v0.16.0
  • Loading branch information
Hugoo authored Oct 28, 2022
2 parents 6ef86bc + b8a01b7 commit ed3522b
Show file tree
Hide file tree
Showing 34 changed files with 2,204 additions and 1,405 deletions.
21 changes: 18 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,33 @@

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.15.0](https://github.com/ERC725Alliance/erc725.js/compare/v0.14.4...v0.15.0) (2022-09-14)
## [0.16.0](https://github.com/ERC725Alliance/erc725.js/compare/v0.15.0...v0.16.0) (2022-10-27)

### ⚠ BREAKING CHANGES

- It is now recommended to initialise the library with an RPC URL over the Web3 or Ethers provider, you can check the [erc725.js documentation](https://docs.lukso.tech/tools/erc725js/providers#rpc-url) to get more information.

### Features

- add [supportsInterface](https://docs.lukso.tech/tools/erc725js/classes/ERC725#supportsinterface) ([#243](https://github.com/ERC725Alliance/erc725.js/issues/243)) ([a2b0828](https://github.com/ERC725Alliance/erc725.js/commit/a2b08288e9aaede8a1a3307c1371672eb7b50969))
- make library compatible with RPC urls ([263de19](https://github.com/ERC725Alliance/erc725.js/commit/263de1983f08c9f31f0cc931e581fe8af52bd541))

### Bug Fixes

- change lsp7 interface id from `0xe33f65c3` to `0x5fcaac27` ([6aa6eb3](https://github.com/ERC725Alliance/erc725.js/commit/6aa6eb30d427609c89ebc1920fc9ecf03c0dd68b))
- update return type for `fetchData` ([#247](https://github.com/ERC725Alliance/erc725.js/issues/247)) ([7ffcd64](https://github.com/ERC725Alliance/erc725.js/commit/7ffcd64b2c0ee841b71472d0d6d869e4149db37d))

## [0.15.0](https://github.com/ERC725Alliance/erc725.js/compare/v0.14.4...v0.15.0) (2022-09-14)

### ⚠ BREAKING CHANGES

* add LSP6 `ENCRYPT` permission in for encrypt/decrypt permissions methods. (#223)
- add LSP6 `ENCRYPT` permission in for encrypt/decrypt permissions methods. (#223)

### [0.14.4](https://github.com/ERC725Alliance/erc725.js/compare/v0.14.3...v0.14.4) (2022-07-25)

### Features

* expose dynamic parts to public encodeKeyName ([#213](https://github.com/ERC725Alliance/erc725.js/issues/213)) ([73f1265](https://github.com/ERC725Alliance/erc725.js/commit/73f126570eaf5f118c48859ee878608afc48a0aa))
- expose dynamic parts to public encodeKeyName ([#213](https://github.com/ERC725Alliance/erc725.js/issues/213)) ([73f1265](https://github.com/ERC725Alliance/erc725.js/commit/73f126570eaf5f118c48859ee878608afc48a0aa))

### [0.14.3](https://github.com/ERC725Alliance/erc725.js/compare/v0.14.2...v0.14.3) (2022-07-07)

Expand Down
107 changes: 76 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,12 @@ const schema = [
];

const address = '0x3000783905Cc7170cCCe49a4112Deda952DDBe24';
const provider = new Web3.providers.HttpProvider(
'https://rpc.l16.lukso.network',
);
const RPC_URL = 'https://rpc.l16.lukso.network';
const config = {
ipfsGateway: 'https://ipfs.lukso.network/ipfs/',
ipfsGateway: 'https://2eff.lukso.dev/ipfs/',
};

const erc725 = new ERC725(schema, address, provider, config);
const erc725 = new ERC725(schema, address, RPC_URL, config);
```

## Usage
Expand All @@ -87,35 +85,82 @@ const erc725 = new ERC725(schema, address, provider, config);
await erc725.getOwner();
// > '0x28D25E70819140daF65b724158D00c373D1a18ee'

await erc725.getData('SupportedStandards:LSP3UniversalProfile');
/* > {
'SupportedStandards:LSP3UniversalProfile': '0xabe425d6'
}
*/

await erc725.getData('LSP3Profile');
/* > {
LSP3Profile: {
hashFunction: 'keccak256(utf8)',
hash: '0xd96ff7776660095f661d16010c4349aa7478a9129ce0670f771596a6ff2d864a',
url: 'ipfs://QmbTmcbp8ZW23vkQrqkasMFqNg2z1iP4e3BCUMz9PKDsSV'
}
}
await myErc725.getData();
/**
[
{
name: 'SupportedStandards:LSP3UniversalProfile',
key: '0xeafec4d89fa9619884b60000abe425d64acd861a49b8ddf5c0b6962110481f38',
value: '0xabe425d6',
},
{
name: 'LSP1UniversalReceiverDelegate',
key: '0x0cfc51aec37c55a4d0b1a65c6255c4bf2fbdf6277f3cc0730c45b828b6db8b47',
value: '0x50A02EF693fF6961A7F9178d1e53CC8BbE1DaD68',
},
{
name: 'LSP12IssuedAssets[]',
key: '0x7c8c3416d6cda87cd42c71ea1843df28ac4850354f988d55ee2eaa47b6dc05cd',
value: [
'0xc444009d38d3046bb0cF81Fa2Cd295ce46A67C78',
'0x4fEbC3491230571F6e1829E46602e3b110215A2E',
'0xB92a8DdA288638491AEE5C2a003D4CAbfa47aE3F',
'0x1e52e7F1707dcda57dD33F003B2311652A465acA',
'0x0BDA71aA980D37Ea56E8a3784E4c309101DAf3E4',
'0xfDB4D9C299438B9839e9d04E34B9609C5b56600D',
'0x081D3F0bff8ae2339cb65113822eEc1510704d5c',
'0x55C98c6944B7497FaAf4db0386a1aD1E6efF526E',
'0x90D1a1D68fa23AEEE991220703f1a1C3782e0b35',
'0xdB5AB19792d9fB61c1Dff57810Fb7C6f839Af8ED'
],
},
{
name: 'LSP3Profile',
key: '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5',
value: {
hashFunction: 'keccak256(utf8)',
hash: '0x70546a2accab18748420b63c63b5af4cf710848ae83afc0c51dd8ad17fb5e8b3',
url: 'ipfs://QmecrGejUQVXpW4zS948pNvcnQrJ1KiAoM6bdfrVcWZsn5',
},
},
]
*/

await erc725.fetchData('LSP3Profile'); // downloads and verifies the linked JSON
/* > {
LSP3Profile: { // key of the schema
LSP3Profile: { // content of the JSON structure as per https://github.com/lukso-network/LIPs/blob/master/LSPs/LSP-3-UniversalProfile.md
name: '...',
links: [Array],
description: "...",
profileImage: [Array],
backgroundImage: [Array],
tags: [Array]
}
await myErc725.fetchData();
/**
[
{
name: 'SupportedStandards:LSP3UniversalProfile',
key: '0xeafec4d89fa9619884b60000abe425d64acd861a49b8ddf5c0b6962110481f38',
value: '0xabe425d6'
},
{
name: 'LSP3Profile',
key: '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5',
value: { LSP3Profile: [Object] }
},
{
name: 'LSP1UniversalReceiverDelegate',
key: '0x0cfc51aec37c55a4d0b1a65c6255c4bf2fbdf6277f3cc0730c45b828b6db8b47',
value: '0xE2D6038acD92200790Df695Ebd13856CdF2a6942'
},
{
name: 'LSP12IssuedAssets[]',
key: '0x7c8c3416d6cda87cd42c71ea1843df28ac4850354f988d55ee2eaa47b6dc05cd',
value: [
'0xc444009d38d3046bb0cF81Fa2Cd295ce46A67C78',
'0x4fEbC3491230571F6e1829E46602e3b110215A2E',
'0xB92a8DdA288638491AEE5C2a003D4CAbfa47aE3F',
'0x1e52e7F1707dcda57dD33F003B2311652A465acA',
'0x0BDA71aA980D37Ea56E8a3784E4c309101DAf3E4',
'0xfDB4D9C299438B9839e9d04E34B9609C5b56600D',
'0x081D3F0bff8ae2339cb65113822eEc1510704d5c',
'0x55C98c6944B7497FaAf4db0386a1aD1E6efF526E',
'0x90D1a1D68fa23AEEE991220703f1a1C3782e0b35',
'0xdB5AB19792d9fB61c1Dff57810Fb7C6f839Af8ED'
]
}
}
]
*/
```

Expand Down
Loading

0 comments on commit ed3522b

Please sign in to comment.