Skip to content

Releases: ERC725Alliance/erc725.js

v0.17.0

07 Feb 16:01
ed3522b
Compare
Choose a tag to compare

⚠ 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) and Boolean (valueContent) (#266) (86d606e)

Bug Fixes

  • Encode key name should parse any number (hex or decimal) for uint type (eb7385e)

New Contributors

Full Changelog: v0.16.0...v0.17.0

v0.16.0

28 Oct 09:42
6ef86bc
Compare
Choose a tag to compare

⚠ 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

Bug Fixes

  • change lsp7 interface id from 0xe33f65c3 to 0x5fcaac27 (6aa6eb3)
  • update return type for fetchData (#247) (7ffcd64)

New Contributors

Full Changelog: v0.15.0...v0.16.0

v0.15.0

14 Sep 11:56
0d0064d
Compare
Choose a tag to compare

Release v0.15.0

Updates permissions encoding to include ENCRYPT permission. This is a breaking change and should not be used with LSP6 contract versions lower than 0.7.0

⚠ BREAKING CHANGES

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

v0.14.4

25 Jul 09:02
44ab226
Compare
Choose a tag to compare

This release includes minor changes

  • enable dynamic key parts in encodeKeyName function
  • documentation corrections

Features

  • expose dynamic parts to public encodeKeyName (#213) (73f1265)

v0.14.3

07 Jul 15:47
714495f
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.14.2...v0.14.3

v0.14.2

24 Jun 15:16
303720a
Compare
Choose a tag to compare

release v0.14.2

Bug Fixes

  • Update JsonRpc eth_call parameters (470e846)

v0.14.1

15 Jun 12:16
22c5e1a
Compare
Choose a tag to compare

Minor update to update the LSP-2 schemas.

v0.14.0

14 Jun 18:52
4401e62
Compare
Choose a tag to compare

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

  • change fetchData output to non object (1d4d570)
  • fetchData as same output as decodeData (59c3a87)
  • getData as same output as decodeData (0f3b149)
  • use array for decodeData (261d100)
  • use array for encodeData (a2e6cdd)

v0.14.0-beta.0

09 Jun 15:01
0c75f63
Compare
Choose a tag to compare
v0.14.0-beta.0 Pre-release
Pre-release

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)

improvement

  • change fetchData output to non object (1d4d570)
  • fetchData as same output as decodeData (59c3a87)
  • getData as same output as decodeData (0f3b149)
  • use array for decodeData (261d100)
  • use array for encodeData (a2e6cdd)

v0.13.0

02 Jun 09:21
ebea7f5
Compare
Choose a tag to compare

This version updates all schemas as the LSP2 has deprecated Bytes20Mapping and Bytes20MappingWithGrouping in favour of: Mapping and MappingWithGrouping (commit).

⚠ BREAKING CHANGES

  • remove old LSP2 Key Types: Bytes20Mapping and Bytes20MappingWithGrouping and add new encoding for Mapping and MappingWithGrouping.

Features

improvement

  • change fetchData output to non object (1d4d570)
  • remove old LSP2 Key Types (Bytes20..) (1e1cd43)

New Contributors

Full Changelog: v0.12.0...v0.13.0