Skip to content

Commit

Permalink
fix: Upgrade and try again
Browse files Browse the repository at this point in the history
  • Loading branch information
richtera committed Nov 7, 2023
1 parent b15a536 commit 51895c1
Show file tree
Hide file tree
Showing 23 changed files with 388 additions and 201 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -7,4 +7,5 @@ coverage
*.log
yarn.lock
types
.cspell.json
.cspell.json
.env.test
12 changes: 8 additions & 4 deletions README.md
Expand Up @@ -41,17 +41,21 @@ const myContracts = await lspFactory.UniversalProfile.deploy({
{
width: 500,
height: 500,
verificationFunction: 'keccak256(bytes)',
verificationData: '0xfdafad027ecfe57eb4ad047b938805d1dec209d6e9f960fc320d7b9b11cbed14',
verification: {
method: 'keccak256(bytes)',
data: '0xfdafad027ecfe57eb4ad047b938805d1dec209d6e9f960fc320d7b9b11cbed14',
},
url: 'ipfs://QmPLqMFHxiUgYAom3Zg4SiwoxDaFcZpHXpCmiDzxrtjSGp',
},
],
backgroundImage: [
{
width: 500,
height: 500,
verificationFunction: 'keccak256(bytes)',
verificationData: '0xfdafad027ecfe57eb4ad047b938805d1dec209d6e9f960fc320d7b9b11cbed14',
verification: {
method: 'keccak256(bytes)',
data: '0xfdafad027ecfe57eb4ad047b938805d1dec209d6e9f960fc320d7b9b11cbed14',
},
url: 'ipfs://QmPLqMFHxiUgYAom3Zg4SiwoxDaFcZpHXpCmiDzxrtjSGp',
},
],
Expand Down
192 changes: 128 additions & 64 deletions docs/classes/lsp4-digital-asset-metadata.md

Large diffs are not rendered by default.

66 changes: 44 additions & 22 deletions docs/classes/universal-profile.md
Expand Up @@ -391,80 +391,102 @@ const myLocalAvatar = new File();
{
"width": 1800,
"height": 1800,
"verificationFunction": "keccak256(bytes)",
"verificationData": "0x5c6125b5a553337b5ad55610c47114bf58d33c7a21aef14b0ed4c214203c9ca7",
"verification": {
"method": "keccak256(bytes)",
"data": "0x5c6125b5a553337b5ad55610c47114bf58d33c7a21aef14b0ed4c214203c9ca7",
},
"url": "ipfs://QmPCQwamReJshNiqSSzf4zMVffNiDx44ykTf1zY95vG6rv"
},
{
"width": 1024,
"height": 1024,
"verificationFunction": "keccak256(bytes)",
"verificationData": "0xc4d1d37a8545012be38a8f33f9a53daceab955a17310bcfffe00f34811506938",
"verification": {
"method": "keccak256(bytes)",
"data": "0xc4d1d37a8545012be38a8f33f9a53daceab955a17310bcfffe00f34811506938",
},
"url": "ipfs://Qme8tedX78TaxVwtvacJyS7bcSwe69F4aNnknUzL3gYdFY"
},
{
"width": 640,
"height": 640,
"verificationFunction": "keccak256(bytes)",
"verificationData": "0xa63ebb82e8c428c9a02f1c0a040199748844dccf62e75fcd85454bce4acd4afd",
"verification": {
"method": "keccak256(bytes)",
"data": "0xa63ebb82e8c428c9a02f1c0a040199748844dccf62e75fcd85454bce4acd4afd",
},
"url": "ipfs://QmdQRdeeGGmWCPs1iCtxiNzHMZemFpvcsdvweCdnufHdqr"
},
{
"width": 320,
"height": 320,
"verificationFunction": "keccak256(bytes)",
"verificationData": "0x2ab638bb61f4cb686c3ca5ca09285e4507ad2328c0b5f6e10378425ed7c75cd9",
"verification": {
"method": "keccak256(bytes)",
"data": "0x2ab638bb61f4cb686c3ca5ca09285e4507ad2328c0b5f6e10378425ed7c75cd9",
},
"url": "ipfs://QmfYYafv6ucuKSm3EbcJxho9Cr2g5Pa3yhv7TaANbP8jbg"
},
{
"width": 180,
"height": 180,
"verificationFunction": "keccak256(bytes)",
"verificationData": "0xefb0b36b3bba2338c18b2b55a0cbc52f04eda03e9b58ca8d04a92fc9b1387853",
"verification": {
"method": "keccak256(bytes)",
"data": "0xefb0b36b3bba2338c18b2b55a0cbc52f04eda03e9b58ca8d04a92fc9b1387853",
},
"url": "ipfs://QmU5XJfL1V5tBLfm7xYMGYEi7VLiwDCfsCc8KswRgXNQSr"
}
],
backgroundImage: [
{
"width": 1800,
"height": 1800,
"verificationFunction": "keccak256(bytes)",
"verificationData": "0x5c6125b5a553337b5ad55610c47114bf58d33c7a21aef14b0ed4c214203c9ca7",
"verification": {
"method": "keccak256(bytes)",
"data": "0x5c6125b5a553337b5ad55610c47114bf58d33c7a21aef14b0ed4c214203c9ca7",
},
"url": "ipfs://QmPCQwamReJshNiqSSzf4zMVffNiDx44ykTf1zY95vG6rv"
},
{
"width": 1024,
"height": 1024,
"verificationFunction": "keccak256(bytes)",
"verificationData": "0xc4d1d37a8545012be38a8f33f9a53daceab955a17310bcfffe00f34811506938",
"verification": {
"method": "keccak256(bytes)",
"data": "0xc4d1d37a8545012be38a8f33f9a53daceab955a17310bcfffe00f34811506938",
},
"url": "ipfs://Qme8tedX78TaxVwtvacJyS7bcSwe69F4aNnknUzL3gYdFY"
},
{
"width": 640,
"height": 640,
"verificationFunction": "keccak256(bytes)",
"verificationData": "0xa63ebb82e8c428c9a02f1c0a040199748844dccf62e75fcd85454bce4acd4afd",
"verification": {
"method": "keccak256(bytes)",
"data": "0xa63ebb82e8c428c9a02f1c0a040199748844dccf62e75fcd85454bce4acd4afd",
},
"url": "ipfs://QmdQRdeeGGmWCPs1iCtxiNzHMZemFpvcsdvweCdnufHdqr"
},
{
"width": 320,
"height": 320,
"verificationFunction": "keccak256(bytes)",
"verificationData": "0x2ab638bb61f4cb686c3ca5ca09285e4507ad2328c0b5f6e10378425ed7c75cd9",
"verification": {
"method": "keccak256(bytes)",
"data": "0x2ab638bb61f4cb686c3ca5ca09285e4507ad2328c0b5f6e10378425ed7c75cd9",
},
"url": "ipfs://QmfYYafv6ucuKSm3EbcJxho9Cr2g5Pa3yhv7TaANbP8jbg"
},
{
"width": 180,
"height": 180,
"verificationFunction": "keccak256(bytes)",
"verificationData": "0xefb0b36b3bba2338c18b2b55a0cbc52f04eda03e9b58ca8d04a92fc9b1387853",
"verification": {
"method": "keccak256(bytes)",
"data": "0xefb0b36b3bba2338c18b2b55a0cbc52f04eda03e9b58ca8d04a92fc9b1387853",
},
"url": "ipfs://QmU5XJfL1V5tBLfm7xYMGYEi7VLiwDCfsCc8KswRgXNQSr"
}
],
avatar: [
{
"verificationFunction": "keccak256(bytes)",
"verificationData": "0x5f3dbd89cde4dde36241c501203b67a93b89908063f5516535136bc25f712e11",
"verification": {
"method": "keccak256(bytes)",
"data": "0x5f3dbd89cde4dde36241c501203b67a93b89908063f5516535136bc25f712e11",
},
"url": "ipfs://QmWkAki4mLq2cshpbKs4HFCaZdpUX1jLKKfb5y8YMATkwk",
"fileType": "image/jpeg"
}
Expand Down
30 changes: 19 additions & 11 deletions docs/deployment/digital-asset.md
Expand Up @@ -197,7 +197,7 @@ await lspFactory.LSP8IdentifiableDigitalAsset.deploy({
});
```

You can also provide the JSON file yourself to generate the verificationData value:
You can also provide the JSON file yourself to generate the verification data value:

```javascript title='Providing a previously uploaded LSP4 metadata URL and JSON file itself'
await lspFactory.LSP8IdentifiableDigitalAsset.deploy({
Expand All @@ -209,13 +209,15 @@ await lspFactory.LSP8IdentifiableDigitalAsset.deploy({
});
```

Or you can provide the verificationData value and then uploaded file URL:
Or you can provide the verification data value and then uploaded file URL:

```javascript title='Providing a previously uploaded LSP4 metadata URL and verificationData values'
```javascript title='Providing a previously uploaded LSP4 metadata URL and verification data values'
await lspFactory.LSP8IdentifiableDigitalAsset.deploy({
digitalAssetMetadata: {
verificationData: '0xfdafad027ecfe57eb4ad047b938805d1dec209d6e9f960fc320d7b9b11cbed14',
verificationFunction: 'keccak256(utf8)',
verification: {
method: 'keccak256(utf8)',
data: '0xfdafad027ecfe57eb4ad047b938805d1dec209d6e9f960fc320d7b9b11cbed14',
},
url: 'https://mycoolserver.com/file.json'
},
...
Expand Down Expand Up @@ -244,8 +246,10 @@ await lspFactory.LSP8IdentifiableDigitalAsset.deploy({
{
width: 500,
height: 500,
verificationFunction: 'keccak256(bytes)',
verificationData: '0xfdafad027ecfe57eb4ad044b938805d1dec209d6e9f960fc320d7b9b11cced14',
verification: {
method: 'keccak256(bytes)',
data: '0xfdafad027ecfe57eb4ad044b938805d1dec209d6e9f960fc320d7b9b11cced14',
},
url: 'ipfs://QmPLqMFDxiUgYAom3Zg4SiwoxDaFcZpHXpCmiDzxrajSGp',
}
... // Multiple sizes of the image should be included
Expand All @@ -266,8 +270,10 @@ await lspFactory.LSP8IdentifiableDigitalAsset.deploy({
{
width: 256,
height: 256,
verificationFunction: 'keccak256(bytes)',
verificationData: '0xfdafad027ecfe57eb4ad044b938805d1dec209d6e9f960fc320d7b9b11cced14',
verification: {
method: 'keccak256(bytes)',
data: '0xfdafad027ecfe57eb4ad044b938805d1dec209d6e9f960fc320d7b9b11cced14',
},
url: 'ipfs://QmPLqMFDxiUgYAom3Zg4SiwoxDaFcZpHXpCmiDzxrajSGp',
}
... // Multiple sizes of the icon image should be included
Expand All @@ -286,8 +292,10 @@ await lspFactory.LSP8IdentifiableDigitalAsset.deploy({
digitalAssetMetadata: {
assets: [
{
verificationFunction: 'keccak256(bytes)',
verificationData: '0xfdafad027ecfe57eb4ad044b938805d1dec209d6e9f960fc320d7b9b11cced14',
verification: {
method: 'keccak256(bytes)',
data: '0xfdafad027ecfe57eb4ad044b938805d1dec209d6e9f960fc320d7b9b11cced14',
},
url: 'ipfs://QmPLqMFDxiUgYAom3Zg4SiwoxDaFcZpHXpCmiDzxrajSGp',
fileType: 'fbx'
}
Expand Down
30 changes: 20 additions & 10 deletions docs/deployment/universal-profile.md
Expand Up @@ -147,8 +147,10 @@ Or you can provide the hash value and then uploaded file URL:
await lspFactory.UniversalProfile.deploy({
controllerAddresses: ['0x...'],
lsp3Profile: {
verificationData: '0xfdafad027ecfe57eb4ad047b938805d1dec209d6e9f960fc320d7b9b11cbed14',
verificationFunction: 'keccak256(utf8)',
verification: {
data: '0xfdafad027ecfe57eb4ad047b938805d1dec209d6e9f960fc320d7b9b11cbed14',
method: 'keccak256(utf8)',
},
url: 'https://mycoolserver.com/file.json',
},
});
Expand Down Expand Up @@ -176,8 +178,10 @@ const myUniversalProfileData = {
{
width: 500,
height: 500,
verificationFunction: 'keccak256(bytes)',
verificationData: '0xfdafad027ecfe57eb4ad044b938805d1dec209d6e9f960fc320d7b9b11cced14', // bytes32 hex string of the image verificationData
verification: {
method: 'keccak256(bytes)',
data: '0xfdafad027ecfe57eb4ad044b938805d1dec209d6e9f960fc320d7b9b11cced14', // bytes32 hex string of the image verificationData
},
url: 'ipfs://QmPLqMFDxiUgYAom3Zg4SiwoxDaFcZpHXpCmiDzxrajSGp',
},
... // Multiple image sizes should be included
Expand All @@ -186,8 +190,10 @@ const myUniversalProfileData = {
{
width: 500,
height: 500,
verificationFunction: 'keccak256(bytes)',
verificationData: '0xfdafad027ecfe57eb4ad047b938805d1dec209d6e9f960fc320d7b9b11cbed14', // bytes32 hex string of the image hash
verification: {
method: 'keccak256(bytes)',
datas: '0xfdafad027ecfe57eb4ad047b938805d1dec209d6e9f960fc320d7b9b11cbed14', // bytes32 hex string of the image hash
},
url: 'ipfs://QmPLqMFHxiUDYAom3Zg4SiwoxDaFcZpHXpAmiDzxrtjSGp',
},
... // Multiple image sizes should be included
Expand Down Expand Up @@ -223,8 +229,10 @@ Avatar files passed as a metadata objects will be set directly on the [LSP3 Prof
asset: [
myLocalAvatar,
{
verificationFunction: 'keccak256(bytes)',
verificationData: '0x5f3dbd89cde4dde36241c501203b67a93b89908063f5516535136bc25f712e11',
verification: {
method: 'keccak256(bytes)',
data: '0x5f3dbd89cde4dde36241c501203b67a93b89908063f5516535136bc25f712e11',
},
url: 'ipfs://QmWkAki4mLq2c9hsbKs4HFCaZdpUX1jLKKBb5y8YMATkak',
fileType: 'image/obj',
},
Expand Down Expand Up @@ -327,8 +335,10 @@ await myLSPFactory.UniversalProfile.uploadProfileData(myLSP3MetaData);

/**
{
verificationData: '0x1234...',
verificationFunction: 'keccak256(utf8)',
verification: {
data: '0x1234...',
method: 'keccak256(utf8)',
},
url: 'https://ipfs.lukso.network/ipfs/QmPzUfdKhY6vfcLNDnitwKanpm5GqjYSmw9todNVmi4bqy',
json: {
LSP3Profile: {
Expand Down
16 changes: 10 additions & 6 deletions docs/getting-started.md
Expand Up @@ -61,19 +61,23 @@ const myLSP3MetaData = {
{
width: 500,
height: 500,
verificationFunction: 'keccak256(bytes)',
// bytes32 hex string of the image hash
verificationData: '0xfdafad027ecfe57eb4ad047b938805d1dec209d6e9f960fc320d7b9b11cbed14',
verification: {
method: 'keccak256(bytes)',
// bytes32 hex string of the image hash
data: '0xfdafad027ecfe57eb4ad047b938805d1dec209d6e9f960fc320d7b9b11cbed14',
},
url: 'ipfs://QmPLqMFHxiUgYAom3Zg4SiwoxDaFcZpHXpCmiDzxrtjSGp',
},
],
backgroundImage: [
{
width: 500,
height: 500,
verificationFunction: 'keccak256(bytes)',
// bytes32 hex string of the image hash
verificationData: '0xfdafad027ecfe57eb4ad047b938805d1dec209d6e9f960fc320d7b9b11cbed14',
verification: {
method: 'keccak256(bytes)',
// bytes32 hex string of the image hash
data: '0xfdafad027ecfe57eb4ad047b938805d1dec209d6e9f960fc320d7b9b11cbed14',
},
url: 'ipfs://QmPLqMFHxiUgYAom3Zg4SiwoxDaFcZpHXpCmiDzxrtjSGp',
},
],
Expand Down
24 changes: 18 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 51895c1

Please sign in to comment.