Releases: ERC725Alliance/erc725.js
v0.17.1
v0.17.0
⚠ BREAKING CHANGES
- refactor: change permission
ADDPERMISSIONS
->ADDCONTROLLER
(122efa9)
Features
- add encoding / decoding for
bytes[CompactBytesArray]
(#261) (8d3e4e9) - add decoding/encoding support for tuples of
CompactBytesArray
(#264) (d9ce0f0) - add encoding/decoding for other types of
compactBytesArray
(#262) (9268a32) - Add support for
bool
(valueType) andBoolean
(valueContent) (#266) (86d606e)
Bug Fixes
- Encode key name should parse any number (hex or decimal) for uint type (eb7385e)
New Contributors
- @skimaharvey made their first contribution in #236
- @magalimorin18 made their first contribution in #247
Full Changelog: v0.16.0...v0.17.0
v0.16.0
⚠ 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 to get more information.
Features
- add supportsInterface (#243) (a2b0828)
- make library compatible with RPC urls (263de19)
Bug Fixes
- change lsp7 interface id from
0xe33f65c3
to0x5fcaac27
(6aa6eb3) - update return type for
fetchData
(#247) (7ffcd64)
New Contributors
- @MitchTODO made their first contribution in #222
Full Changelog: v0.15.0...v0.16.0
v0.15.0
v0.14.4
v0.14.3
What's Changed
- Update JsonRpc eth_call parameters by @CallumGrindle in #194
Full Changelog: v0.14.2...v0.14.3
v0.14.2
v0.14.1
Minor update to update the LSP-2 schemas.
v0.14.0
This release brings a lot of breaking changes and new features.
⚠️ Breaking changes
Use array instead of object
The parameters of decodeData
, encodeData
, getData
and fetchData
have been unified to always use the same array of objects:
[
{
name: 'LSP3Profile',
key: '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5',
value: {
hashFunction: 'keccak256(utf8)',
hash: '0x820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361',
url: 'ipfs://QmYr1VJLwerg6pEoscdhVGugo39pa6rycEZLjtRPDfW84UAx',
},
},
]
The output/input are not an object anymore. The key of the previous object is now set under the keyName
property.
❌ Before:
{
LSP3Profile: {
hash: '0x820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361',
hashFunction: 'keccak256(utf8)',
url: 'ipfs://QmYr1VJLwerg6pEoscdhVGugo39pa6rycEZLjtRPDfW84UAx',
},
}
✅ After:
[
{
name: 'LSP3Profile',
key: '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5',
value: {
hashFunction: 'keccak256(utf8)',
hash: '0x820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361',
url: 'ipfs://QmYr1VJLwerg6pEoscdhVGugo39pa6rycEZLjtRPDfW84UAx',
},
},
]
Support of dynamic keys
All the functions now supports dynamic keys (Mapping
and MappingWithGrouping
). They can be used with the dynamicKeyParts
property:
erc725.encodeData([
{
keyName: 'DynamicKey:<address>',
dynamicKeyParts: ['0xbedbedbedbedbedbedbedbedbedbedbedbedbedb'],
value: '0xcafecafecafecafecafecafecafecafecafecafe',
},
]);
⚠ BREAKING CHANGES
- fetchData as same output as decodeData
- getData as same output as decodeData
- add dynamic keys for getData
- use array for decodeData
- use array for encodeData
Features
- add dynamic keys for getData (7a46786)
- add dynamicKeys for decodeData (f386e15)
- add non array input on decodeData (0774a86)
- add support for hashed key for encodeData (23323a0)
- add BytesN value content (#184) (7e073e4)
- add tuples support (7f3d1a0)
Bug Fixes
- encodeKeyName returns lowercase keys (80566eb)
improvement
v0.14.0-beta.0
This release brings a lot of breaking changes and new features.
⚠️ Breaking changes
Use array instead of object
The parameters of decodeData
, encodeData
, getData
and fetchData
have been unified to always use the same array of objects:
[
{
name: 'LSP3Profile',
key: '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5',
value: {
hashFunction: 'keccak256(utf8)',
hash: '0x820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361',
url: 'ipfs://QmYr1VJLwerg6pEoscdhVGugo39pa6rycEZLjtRPDfW84UAx',
},
},
]
The output/input are not an object anymore. The key of the previous object is now set under the keyName
property.
❌ Before:
{
LSP3Profile: {
hash: '0x820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361',
hashFunction: 'keccak256(utf8)',
url: 'ipfs://QmYr1VJLwerg6pEoscdhVGugo39pa6rycEZLjtRPDfW84UAx',
}
}
✅ After:
[
{
name: 'LSP3Profile',
key: '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5',
value: {
hashFunction: 'keccak256(utf8)',
hash: '0x820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361',
url: 'ipfs://QmYr1VJLwerg6pEoscdhVGugo39pa6rycEZLjtRPDfW84UAx',
},
},
]
Support of dynamic keys
All the functions now supports dynamic keys (Mapping
and MappingWithGrouping
). They can be used with the dynamicKeyParts
property:
erc725.encodeData(
[
{
keyName: 'DynamicKey:<address>',
dynamicKeyParts: ['0xbedbedbedbedbedbedbedbedbedbedbedbedbedb'],
value: '0xcafecafecafecafecafecafecafecafecafecafe',
},
],
);
⚠ BREAKING CHANGES
- fetchData as same output as decodeData
- getData as same output as decodeData
- add dynamic keys for getData
- use array for decodeData
- use array for encodeData
Features
- add dynamic keys for getData (7a46786)
- add dynamicKeys for decodeData (f386e15)
- add non array input on decodeData (0774a86)
- add support for hashed key for encodeData (23323a0)
Bug Fixes
- encodeKeyName returns lowercase keys (80566eb)