diff --git a/docs/standards/rpc-api.md b/docs/standards/rpc-api.md index f5da7f2f67..5dc3d36d7e 100644 --- a/docs/standards/rpc-api.md +++ b/docs/standards/rpc-api.md @@ -11,7 +11,7 @@ This page is under active development. ::: -The [LUKSO Extension](../guides/browser-extension/install-browser-extension.md) uses the RPC API methods from the table below. The methods are grouped by category: signing methods, standard methods, and LUKSO-specific methods. +The [LUKSO UP Browser Extension](../guides/browser-extension/install-browser-extension.md) uses the RPC API methods from the table below. The methods are grouped by category: signing methods, standard methods, and LUKSO-specific methods. ## Supported Methods @@ -147,17 +147,17 @@ params: [ #### Returns -##### 1. `String Array` - Array of universal profile addresses the user selected for this relay service +##### 1. `String Array` - Array of Universal Profile addresses the user selected for this relay service It returns an array of Universal Profile addresses. ### up_import {#up_import} -Add a Universal Profile address. +Add a Universal Profile address to the UP Browser Extension. #### Parameters -##### 1. `String` - Universal profile address to add to the extension +##### 1. `String` - Universal Profile address to add to the extension The Universal Profile address to add. @@ -168,3 +168,86 @@ params: ['0x311611C9A46a192C14Ea993159a0498EDE5578aC']; #### Returns ##### 1. `String` - New controller address, to be added to the profile by the dapp. + +### up_generateLsp23Address {#up_generateLsp23Address} + +It allows the creation of a Universal Profile for the UP Browser Extension using the [LSP23 Standard](https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-23-LinkedContractsFactory.md), which under the hood will wrap many operations/transactions into one, simplifying deployment. + +To perform the deployment of a Universal Profile, the dApp needs the salt and the controllerAddress. The controllerAddress will be injected in the dataKeys and dataValues array, then the salt and the encoded dataKeys and dataValues are sent to the relayer to deploy the profile. Previously, the relayer had to do several consecutive transactions to deploy a profile. Now, all those transactions are taking place at the smart contract level, so the relayer only creates one transaction. + +**up_generateLsp23Address**: should be used for creating a new Universal Profile using the UP Browser Extension + +**up_import**: should be used for adding already existing Universal Profiles to the UP Browser Extension + +##### Parameters + +
Name | +Type | +Description | +
primaryImplementationContractAddress | +string | +Universal Profile implementation address | +
secondaryImplementationContractAddress | +string | +Key Manager implementation address | +
secondaryContractInitializationCalldata | +string | +initialization calldata for for the Key Manager contract | +
secondaryContractAddControlledContractAddress | +boolean | +the my.universalprofile.cloud sets it as true | +
secondaryContractExtraInitializationParams | +string | +my.universalprofile.cloud sets it as '0x' | +
upPostDeploymentModuleAddress | +string | +address of the post deployment module | +
linkedContractsFactoryAddress | +string | +address of the linkedContractsFactory (LSP23) | +
dataKeys | +string[] | +data that will be set on a smart contract, e.g: adding controllers, adding LSP3 metadata, or adding default controller permissions | +
dataValues | +string[] | +data that will be set on a smart contract, e.g: adding controllers, adding LSP3 metadata, or adding default controller permissions | +
dataKeysControllerIndex | +number | +an array index where the controller key is placed | +
dataValuesControllerIndex | +number | +array index where the controller value is placed | +