Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Change to verification object #343

Merged
merged 5 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@ await myErc725.getData();
name: 'LSP3Profile',
key: '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5',
value: {
verificationFunction: 'keccak256(utf8)',
verificationData: '0x70546a2accab18748420b63c63b5af4cf710848ae83afc0c51dd8ad17fb5e8b3',
verification: {
method: 'keccak256(utf8)',
data: '0x70546a2accab18748420b63c63b5af4cf710848ae83afc0c51dd8ad17fb5e8b3'
},
url: 'ipfs://QmecrGejUQVXpW4zS948pNvcnQrJ1KiAoM6bdfrVcWZsn5',
},
},
Expand Down
68 changes: 44 additions & 24 deletions docs/classes/ERC725.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,10 @@ myErc725.decodeData([
name: 'LSP3Profile',
key: '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5',
value: {
verificationFunction: 'keccak256(utf8)',
verificationData: '0x820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361',
verification: {
method: 'keccak256(utf8)',
data: '0x820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361'
},
url: 'ipfs://QmYr1VJLwerg6pEoscdhVGugo39pa6rycEZLjtRPDfW84UAx',
},
},
Expand All @@ -165,8 +167,10 @@ myErc725.decodeData({
name: 'LSP3Profile',
key: '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5',
value: {
verificationFunction: 'keccak256(utf8)',
verificationData: '0x820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361',
verification: {
method: 'keccak256(utf8)',
data: '0x820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361'
},
url: 'ipfs://QmYr1VJLwerg6pEoscdhVGugo39pa6rycEZLjtRPDfW84UAx',
},
}
Expand Down Expand Up @@ -206,8 +210,10 @@ myErc725.decodeData([
name: 'LSP3Profile',
key: '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5',
value: {
verificationData: '0x820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361',
verificationFunction: 'keccak256(utf8)',
verification: {
data: '0x820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361',
method: 'keccak256(utf8)'
},
url: 'ipfs://QmYr1VJLwerg6pEoscdhVGugo39pa6rycEZLjtRPDfW84UAx',
},
},
Expand Down Expand Up @@ -256,8 +262,10 @@ myErc725.decodeData(
name: 'MyKeyName:aaaabbbbccccddddeeeeffff111122223333444455556666777788889999aaaa:true',
key: '0x35e6950bc8d2aaaabbbb00000000000000000000000000000000000000000001',
value: {
verificationFunction: 'keccak256(utf8)',
verificationData: '0x820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361',
verification: {
method: 'keccak256(utf8)',
data: '0x820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361'
},
url: 'ifps://QmYr1VJLwerg6pEoscdhVGugo39pa6rycEZLjtRPDfW84UAx',
},
},
Expand Down Expand Up @@ -479,9 +487,10 @@ myErc725.encodeData([
{
keyName: 'LSP3Profile',
value: {
verificationFunction: 'keccak256(utf8)',
verificationData:
'0x820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361',
verification: {
method: 'keccak256(utf8)',
data: '0x820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361',
},
url: 'ipfs://QmYr1VJLwerg6pEoscdhVGugo39pa6rycEZLjtRPDfW84UAx',
},
},
Expand Down Expand Up @@ -565,9 +574,10 @@ myErc725.encodeData([
{
keyName: 'LSP3Profile',
value: {
verificationFunction: 'keccak256(utf8)',
verificationData:
'0x820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361',
verification: {
method: 'keccak256(utf8)',
data: '0x820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361',
},
url: 'ipfs://QmYr1VJLwerg6pEoscdhVGugo39pa6rycEZLjtRPDfW84UAx',
},
},
Expand Down Expand Up @@ -1065,8 +1075,10 @@ await myErc725.getData();
name: 'LSP3Profile',
key: '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5',
value: {
verificationFunction: 'keccak256(utf8)',
verificationData: '0x70546a2accab18748420b63c63b5af4cf710848ae83afc0c51dd8ad17fb5e8b3',
verification: {
method: 'keccak256(utf8)',
data: '0x70546a2accab18748420b63c63b5af4cf710848ae83afc0c51dd8ad17fb5e8b3',
},
url: 'ipfs://QmecrGejUQVXpW4zS948pNvcnQrJ1KiAoM6bdfrVcWZsn5',
},
},
Expand All @@ -1083,8 +1095,10 @@ await myErc725.getData('LSP3Profile');
name: 'LSP3Profile',
key: '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5',
value: {
verificationFunction: 'keccak256(utf8)',
verificationData: '0xd96ff7776660095f661d16010c4349aa7478a9129ce0670f771596a6ff2d864a',
verification: {
method: 'keccak256(utf8)',
data: '0xd96ff7776660095f661d16010c4349aa7478a9129ce0670f771596a6ff2d864a',
},
url: 'ipfs://QmbTmcbp8ZW23vkQrqkasMFqNg2z1iP4e3BCUMz9PKDsSV'
},
}
Expand All @@ -1097,8 +1111,10 @@ await myErc725.getData(['LSP3Profile']);
name: 'LSP3Profile',
key: '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5',
value: {
verificationFunction: 'keccak256(utf8)',
verificationData: '0xd96ff7776660095f661d16010c4349aa7478a9129ce0670f771596a6ff2d864a',
verification: {
method: 'keccak256(utf8)',
data: '0xd96ff7776660095f661d16010c4349aa7478a9129ce0670f771596a6ff2d864a',
},
url: 'ipfs://QmbTmcbp8ZW23vkQrqkasMFqNg2z1iP4e3BCUMz9PKDsSV'
},
}
Expand All @@ -1125,8 +1141,10 @@ await myErc725.getData(['LSP3Profile', 'LSP1UniversalReceiverDelegate']);
name: 'LSP3Profile',
key: '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5',
value: {
verificationFunction: 'keccak256(utf8)',
verificationData: '0xeeafeebeb416923dfb0dcf4c66b045c72742121ce2a06f93ae044ee0efb70777',
verification: {
method: 'keccak256(utf8)',
data: '0xeeafeebeb416923dfb0dcf4c66b045c72742121ce2a06f93ae044ee0efb70777',
},
url: 'ipfs://QmZnG5Z5B5Dq8iFFtsL5i7AnrgH16P4DJ8UhY7j8RzX51p'
}
},
Expand Down Expand Up @@ -1185,8 +1203,10 @@ await myErc725.getData([
name: 'LSP3Profile',
key: '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5',
value: {
verificationFunction: 'keccak256(utf8)',
verificationData: '0xeeafeebeb416923dfb0dcf4c66b045c72742121ce2a06f93ae044ee0efb70777',
verification: {
method: 'keccak256(utf8)',
data: '0xeeafeebeb416923dfb0dcf4c66b045c72742121ce2a06f93ae044ee0efb70777',
},
url: 'ipfs://QmZnG5Z5B5Dq8iFFtsL5i7AnrgH16P4DJ8UhY7j8RzX51p'
}
},
Expand Down
6 changes: 4 additions & 2 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ await erc725.getData(['LSP3Profile', 'SupportedStandards:LSP3Profile']);
{
LSP3Profile: {
url: 'ipfs://QmXybv2LdJWscy1C6yRKUjvnaj6aqKktZX4g4xmz2nyYj2',
verificationData: '0xb4f9d72e83bbe7e250ed9ec80332c493b7b3d73e0d72f7b2c7ab01c39216eb1a',
verificationFunction: 'keccak256(utf8)'
verification: {
data: '0xb4f9d72e83bbe7e250ed9ec80332c493b7b3d73e0d72f7b2c7ab01c39216eb1a',
method: 'keccak256(utf8)'
}
},
'SupportedStandards:LSP3Profile': '0x5ef83ad9'
}
Expand Down
12 changes: 8 additions & 4 deletions examples/src/decodeData.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ const decodedDataOneKey = myERC725.decodeData([
name: 'LSP3Profile',
key: '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5',
value: {
verificationFunction: 'keccak256(utf8)',
verificationData: '0x820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361',
verification: {
method: 'keccak256(utf8)',
data: '0x820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361',
},
url: 'ipfs://QmYr1VJLwerg6pEoscdhVGugo39pa6rycEZLjtRPDfW84UAx'
}
}
Expand Down Expand Up @@ -56,8 +58,10 @@ const decodedDataManyKeys = myERC725.decodeData([
name: 'LSP3Profile',
key: '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5',
value: {
verificationFunction: 'keccak256(utf8)',
verificationData: '0x820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361',
verification: {
method: 'keccak256(utf8)',
data: '0x820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361',
},
url: 'ipfs://QmYr1VJLwerg6pEoscdhVGugo39pa6rycEZLjtRPDfW84UAx'
}
},
Expand Down
14 changes: 8 additions & 6 deletions examples/src/encodeData.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ const encodedDataOneKey = myERC725.encodeData({
const encodedDataOneKeyV2 = myERC725.encodeData({
keyName: 'LSP3Profile',
value: {
verificationFunction: 'keccak256(utf8)',
verificationData:
'0x820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361',
verification: {
method: 'keccak256(utf8)',
data: '0x820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361',
},
url: 'ipfs://QmYr1VJLwerg6pEoscdhVGugo39pa6rycEZLjtRPDfW84UAx',
},
});
Expand All @@ -46,9 +47,10 @@ const encodedDataManyKeys = myERC725.encodeData([
{
keyName: 'LSP3Profile',
value: {
verificationFunction: 'keccak256(utf8)',
verificationData:
'0x820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361',
verification: {
method: 'keccak256(utf8)',
data: '0x820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361',
},
url: 'ipfs://QmYr1VJLwerg6pEoscdhVGugo39pa6rycEZLjtRPDfW84UAx',
},
},
Expand Down
18 changes: 12 additions & 6 deletions examples/src/getData.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ const dataAllKeys = await myERC725.getData();
name: 'LSP3Profile',
key: '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5',
value: {
verificationFunction: 'keccak256(utf8)',
verificationData: '0xd96ff7776660095f661d16010c4349aa7478a9129ce0670f771596a6ff2d864a',
verification: {
method: 'keccak256(utf8)',
data: '0xd96ff7776660095f661d16010c4349aa7478a9129ce0670f771596a6ff2d864a',
},
url: 'ipfs://QmbTmcbp8ZW23vkQrqkasMFqNg2z1iP4e3BCUMz9PKDsSV'
}
},
Expand Down Expand Up @@ -46,8 +48,10 @@ const dataOneKey = await myERC725.getData('LSP3Profile');
key: '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5',
name: 'LSP3Profile',
value: {
verificationFunction: 'keccak256(utf8)',
verificationData: '0xd96ff7776660095f661d16010c4349aa7478a9129ce0670f771596a6ff2d864a',
verification: {
method: 'keccak256(utf8)',
data: '0xd96ff7776660095f661d16010c4349aa7478a9129ce0670f771596a6ff2d864a',
},
url: 'ipfs://QmbTmcbp8ZW23vkQrqkasMFqNg2z1iP4e3BCUMz9PKDsSV'
}
}
Expand All @@ -63,8 +67,10 @@ const dataManyKeys = await myERC725.getData([
key: '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5',
name: 'LSP3Profile',
value: {
verificationFunction: 'keccak256(utf8)',
verificationData: '0xd96ff7776660095f661d16010c4349aa7478a9129ce0670f771596a6ff2d864a',
verification: {
method: 'keccak256(utf8)',
data: '0xd96ff7776660095f661d16010c4349aa7478a9129ce0670f771596a6ff2d864a',
},
url: 'ipfs://QmbTmcbp8ZW23vkQrqkasMFqNg2z1iP4e3BCUMz9PKDsSV'
}
},
Expand Down
56 changes: 32 additions & 24 deletions examples/src/instantiation.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,67 +61,75 @@ export const profileJson = {
{
width: 1800,
height: 1712,
verificationFunction: 'keccak256(bytes)',
verificationData:
'0xfbcfcbbc86d886e862419361c48251d778884a90429d36c8d002559cbcb52972',
verification: {
method: 'keccak256(bytes)',
CJ42 marked this conversation as resolved.
Show resolved Hide resolved
data: '0xfbcfcbbc86d886e862419361c48251d778884a90429d36c8d002559cbcb52972',
},
url: 'ipfs://QmNPh6hP5igFzPf4mPtKBa6Wttnmi3YNVMAptC7drzyeDB',
},
{
width: 1024,
height: 974,
verificationFunction: 'keccak256(bytes)',
verificationData:
'0xa9399df007997de92a820c6c2ec1cb2d3f5aa5fc1adf294157de563eba39bb6e',
verification: {
method: 'keccak256(bytes)',
data: '0xa9399df007997de92a820c6c2ec1cb2d3f5aa5fc1adf294157de563eba39bb6e',
},
url: 'ipfs://QmW4wM4r9yWeY1gUCtt7c6v3ve7Fzdg8CKvTS96NU9Uiwr',
},
{
width: 640,
height: 609,
verificationFunction: 'keccak256(bytes)',
verificationData:
'0xb316a695125cb0566da252266cfc9d5750a740bbdffa86712bb17508e70e6a31',
verification: {
method: 'keccak256(bytes)',
data: '0xb316a695125cb0566da252266cfc9d5750a740bbdffa86712bb17508e70e6a31',
},
url: 'ipfs://QmXGELsqGidAHMwYRsEv6Z4emzMggtc5GXZYGFK7r6zFBg',
},
{
width: 320,
height: 304,
verificationFunction: 'keccak256(bytes)',
verificationData:
'0xd22a272ff5b257056cc302bcdcca1c0ea00bf912aef310eb3fa7556696b1e780',
verification: {
method: 'keccak256(bytes)',
data: '0xd22a272ff5b257056cc302bcdcca1c0ea00bf912aef310eb3fa7556696b1e780',
},
url: 'ipfs://QmRr2urTVi12VzYa5cSHDjJXACfapaeGZW2BuNmQ8rHjCG',
},
{
width: 180,
height: 171,
verificationFunction: 'keccak256(bytes)',
verificationData:
'0xf80d0c1492de5e148392b3a724739682e9b9564ef5fb97c06c1574bbb5e5f340',
verification: {
method: 'keccak256(bytes)',
data: '0xf80d0c1492de5e148392b3a724739682e9b9564ef5fb97c06c1574bbb5e5f340',
},
url: 'ipfs://QmVeFyhHtdXR34UZanqU2qSuBTfGtBraG7hhN5byjJNAY5',
},
],
backgroundImage: [
{
width: 1800,
height: 1013,
verificationFunction: 'keccak256(bytes)',
verificationData:
'0x98fe032f81c43426fbcfb21c780c879667a08e2a65e8ae38027d4d61cdfe6f55',
verification: {
method: 'keccak256(bytes)',
data: '0x98fe032f81c43426fbcfb21c780c879667a08e2a65e8ae38027d4d61cdfe6f55',
},
url: 'ipfs://QmPJESHbVkPtSaHntNVY5F6JDLW8v69M2d6khXEYGUMn7N',
},
{
width: 1024,
height: 576,
verificationFunction: 'keccak256(bytes)',
verificationData:
'0xfce1c7436a77a009a97e48e4e10c92e89fd95fe1556fc5c62ecef57cea51aa37',
verification: {
method: 'keccak256(bytes)',
data: '0xfce1c7436a77a009a97e48e4e10c92e89fd95fe1556fc5c62ecef57cea51aa37',
},
url: 'ipfs://QmZc9uMJxyUeUpuowJ7AD6MKoNTaWdVNcBj72iisRyM9Su',
},
{
width: 640,
height: 360,
verificationFunction: 'keccak256(bytes)',
verificationData:
'0x10a5cf2479992f1c555ad71e0a2866827f66fef6941a0c99f8d3b03e6b8b4009',
verification: {
method: 'keccak256(bytes)',
data: '0x10a5cf2479992f1c555ad71e0a2866827f66fef6941a0c99f8d3b03e6b8b4009',
},
url: 'ipfs://QmbP3eTmUx1UQ2eZ8hrDz8j98yP2CTmsJvfp72LZKnkKj1',
},
],
Expand Down
Loading
Loading