From b4471a24f044a16ce80496efe72cd2665a7aaeee Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 21 Dec 2022 18:14:06 +0000 Subject: [PATCH 01/16] chore(release): 1.0.1 [skip ci] # [@ripio/sdk-nft-v1.0.1](https://github.com/ripio/sdkjs/compare/@ripio/sdk-nft-v1.0.0...@ripio/sdk-nft-v1.0.1) (2022-12-21) ### Bug Fixes * add uint8arrays as a dependency ([e8b36f2](https://github.com/ripio/sdkjs/commit/e8b36f2ab60ffc2f0ca4d249082f9ef93d911793)) --- packages/nft/CHANGELOG.md | 7 +++++++ packages/nft/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/nft/CHANGELOG.md b/packages/nft/CHANGELOG.md index c9012e4..71fa017 100644 --- a/packages/nft/CHANGELOG.md +++ b/packages/nft/CHANGELOG.md @@ -1,3 +1,10 @@ +# [@ripio/sdk-nft-v1.0.1](https://github.com/ripio/sdkjs/compare/@ripio/sdk-nft-v1.0.0...@ripio/sdk-nft-v1.0.1) (2022-12-21) + + +### Bug Fixes + +* add uint8arrays as a dependency ([e8b36f2](https://github.com/ripio/sdkjs/commit/e8b36f2ab60ffc2f0ca4d249082f9ef93d911793)) + # [@ripio/sdk-nft-v1.0.1-dev.1](https://github.com/ripio/sdkjs/compare/@ripio/sdk-nft-v1.0.0...@ripio/sdk-nft-v1.0.1-dev.1) (2022-12-21) diff --git a/packages/nft/package.json b/packages/nft/package.json index 883abbc..ba91d21 100644 --- a/packages/nft/package.json +++ b/packages/nft/package.json @@ -1,6 +1,6 @@ { "name": "@ripio/sdk-nft", - "version": "1.0.1-dev.1", + "version": "1.0.1", "description": "Tools to interact with a NFT", "files": [ "dist" From fa7813c273ca080262d3224e668fb9f31ca76503 Mon Sep 17 00:00:00 2001 From: Agustin Date: Wed, 4 Jan 2023 08:33:39 -0300 Subject: [PATCH 02/16] feat: add docs --- docs/README.md | 15 + docs/v1.0.0/README.md | 984 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 999 insertions(+) create mode 100644 docs/README.md create mode 100644 docs/v1.0.0/README.md diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..640ef7f --- /dev/null +++ b/docs/README.md @@ -0,0 +1,15 @@ +## What is Ripio SDK js? + +Ripio SDK js is a library written in javascript that allows you to interact with any EVM. As a main feature, Ripio SDK grants simplicity in writing code to transact on blockchain. It has 3 layers of abstraction that goes from, the most generic in terms of interaction with Smart Contracts, to a more oriented design for each of the use cases/industries where you can develop a dApp. + +Ripio SDK js uses [Ethers js](https://docs.ethers.io/v5/) to perform the interaction with the blockchain while simplifying its use. Also Ripio SDK uses [ipfs-http-client](https://www.npmjs.com/package/ipfs-http-client) to be able to interact with the InterPlanetary File System (IPFS - a protocol, hypermedia and file sharing peer-to-peer network for storing and sharing data in a distributed file system). + +## Architecture + +Ripio SDK has several layers of abstraction that range from the most generic in terms of interaction with Smart Contracts to a design more oriented to each of the industries where a dApp can be developed. + +Contract Layer: This set of classes allows developers to interact with the blockchain using few lines of code. It also allows you to execute transactions with any type of smart contract. + +Standard Layer: Contains a set of classes that allow developers to interact more clearly with many of the ERC standards (e.g. ERC20, ERC721). It also makes it easier to perform some tasks associated with this type of contract. + +Gaming Layer (work in progress): set of classes that represent specific functionalities of a use case, in this particular case gaming. The game developer can interact only with these classes in the layer without getting involved with contracts or ERCs. The game developer can increase functionality by inheriting from any of these classes. \ No newline at end of file diff --git a/docs/v1.0.0/README.md b/docs/v1.0.0/README.md new file mode 100644 index 0000000..fb57f1c --- /dev/null +++ b/docs/v1.0.0/README.md @@ -0,0 +1,984 @@ +## Installation + +To install ripiosdk we recommend node 16 or above, although it might work with lower versions. + +``` +npm i @ripio/sdk +``` + +## Overview + +### Connectors + +Connectors are classes that allow you to interact with the blockchain by wrapping up the account and provider. The connectors provide you with the ability to interact with the RPC API and they work as a bridge between Manager classes and the blockchain (see: Managers documentation section) + +The following classes are exported on the connectors submodule for CommonJS: + +
+```javascript +const { BrowserWeb3Connector, JsonRPCWeb3Connector } = require('@ripio/sdk/connectors'); +``` +

+ +For TypeScript import them from the origin (submodules will come in the near future): + +
+```javascript +import { BrowserWeb3Connector, JsonRPCWeb3Connector } from '@ripio/sdk'; +``` +

+ +
+BrowserWeb3Connector | This class uses an injected web3 browser extension (e.g. Metamask) to connect to the Blockchain and provide the user with the ability to sign transactions. This connector provides the functionality to switch and add chains to the web3 browser extension as well as to sign messages. +-- | -- +JsonRPCWeb3Connector | The JSON-RPC API is another popular method for interacting with EVM Blockchain and is available in all major Ethereum node implementations as well as many third-party web services (e.g. INFURA). To use this connector, you must provide a url of the EVM node to connect to and private key with which the transactions will be signed (it can be ignored if you only want a read-only connection). +

+ +Sometimes it is necessary to have a connector instance to perform certain tasks. It is possible to instantiate a BrowserWeb3Connector and JsonRPCWeb3Connector and they must be activated as well. Also, those instances can be used in activation of a ContractManager (see: Contract Manager activation section). + +#### BrowserWeb3Connector + +When activating the BrowserWeb3Connector a web3 browser extension is required to inject on window.ethereum a Web3 Provider: + +
+```javascript +const connector = new BrowserWeb3Connector(); +const {chainId, provider, account} = await connector.activate(); +``` +

+ +Is a good idea to deactivate the connector when you are not going to use it anymore or your program ends. To remove any listeners to events that are still active. + +
+```javascript +await connector.deactivate(); +``` +

+ +#### JsonRPCWeb3Conector + +When activating the JsonRPCWeb3Connector the Json RPC url is required to connect to the blockchain, and an optional private key can be passed to be able to sing transactions or messages: + +
+```javascript +const WSS = 'JSON-RPC-API-URL' +const PRIVATE_KEY = '...'; +const connector = new JsonRPCWeb3Connector(WSS, PRIVATE_KEY); +const {chainId, provider, account} = await connector.activate(); +``` +

+ +With this connector you could also deactivate it after finishing working with it or before your program ends to remove any listeners to events that are still active. We strongly recommend doing it when you are using a websocket provider. + +
+```javascript +await connector.deactivate(); +``` +

+ +### Shared functionality: + +The connectors share the following functionalities: + +- Sign messages: + +
+```javascript +const message = “The answer to life, the universe and everything.”; +await connector.signMessage(message); '0x058...91c' +``` +

+ +- Obtain transaction data: + +```javascript +const txHash = “0xf3c...586”; +await connector.getTransaction(txHash); +{ + hash: '0x4ad...f4a', + type: 0, + accessList: null, + blockHash: '0x749...469', + blockNumber: 2641, + transactionIndex: 0, + confirmations: 6, + from: '0xB19...048D', + gasPrice: BigNumber { _hex: '0x00', _isBigNumber: true }, + gasLimit: BigNumber { _hex: '0x6691b7', _isBigNumber: true }, + to: '0xd2e...222', + value: BigNumber { _hex: '0x00', _isBigNumber: true }, + nonce: 239, + data: '0x162...000', + r: '0x3e4...07c', + s: '0x60c...c5c', + v: 42, + creates: null, + chainId: 1, + wait: [Function (anonymous)] +} +``` + +- Obtain native chain balance: + +
+```javascript +await connector.getBalance(“0x5dB...36b”); +‘84.4242’ +``` +

+- Transfer native chain balance: + +
+```javascript +await connector.transferBalance("1", "0x5dB...36b"); +{  + chainId: 1337,  + confirmations: 0,  + data: '0x',  + from: '0x8577181F3D8A38a532Ef8F3D6Fd9a31baE73b1EA',  + gasLimit: { BigNumber: "21000" },  + gasPrice: { BigNumber: "1" },  + hash: '0xdbf6b710ded42ae0fcfb0ec601235afce5acd0a01b785002cf0581fab4d53b52',  + nonce: 5,  + r: '0x7502ebb9c10e1664d9a344b636c1151a9ebc6b9dd1aa2bad9f739d15368a83f9',  + s: '0x3a71b2b3a2a90527e2cf221606b89af5ac8195b8146f9d2776e4ca342b7e37b2',  + to: '0x8ba1f109551bD432803012645Ac136ddd64DBA72',  + type: null,  + v: 2710,  + value: { BigNumber: "1000000000000000000" },  + wait: [Function],  + cancel: [Function: cancelTransaction],  + speedUp: [Function: speedUpTransaction],  + change: [Function: changeBalanceTransaction] +} +``` +

+- Change balance transfer on native chain: + +
+```javascript +const to = "0x8ba1f109551bD432803012645Ac136ddd64DBA72"; +const value = BigNumber { _hex: '0xDE0B6B3A7640000', _isBigNumber: true }; +const gasSpeed = BigNumber { _hex: '0x01', _isBigNumber: true }; +const txResponse = await connector.transferBalance("1", "0x5dB...36b"); +await connector.changeBalanceTransaction(txResponse, to, value, gasSpeed); +{  + chainId: 1337,  + confirmations: 0,  + data: '0x',  + from: '0x8577181F3D8A38a532Ef8F3D6Fd9a31baE73b1EA',  + gasLimit: { BigNumber: "21000" },  + gasPrice: { BigNumber: "1" },  + hash: '0xdbf6b710ded42ae0fcfb0ec601235afce5acd0a01b785002cf0581fab4d53b52',  + nonce: 5,  + r: '0x7502ebb9c10e1664d9a344b636c1151a9ebc6b9dd1aa2bad9f739d15368a83f9',  + s: '0x3a71b2b3a2a90527e2cf221606b89af5ac8195b8146f9d2776e4ca342b7e37b2',  + to: '0x8ba1f109551bD432803012645Ac136ddd64DBA72',  + type: null,  + v: 2710,  + value: { BigNumber: "1000000000000000000" },  + wait: [Function] +} +``` +

+ +- Sign typed data: + +
+```javascript +const domain = { + name: “ContractName”, + version: '1', + chainId: “100”, + verifyingContract: “0x123...789”} +const value = “0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff”; +const deadline = “0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff”; +const nonce = “0x0000000000000000000000000000000000000000000000000000000000000000”; +const message = { + owner: “0x123...888”, + spender: “0x123...999”, + value, + nonce, + deadline +} +const signer = new EIP2612PermitTypedDataSigner(domain, message); +await connector.signTypedData(signer); +{ + r: '0xff406d8a920f957f867379275961a5ac94a7376c02c5b89e64f9715c6b4ff31f', + s: '0x7bb422355272555eca2757411c9a127ce6260387558940715b51fca444b8edcd', + _vs: '0xfbb422355272555eca2757411c9a127ce6260387558940715b51fca444b8edcd', + recoveryParam: 1, + v: 28, + yParityAndS: '0xfbb422355272555eca2757411c9a127ce6260387558940715b51fca444b8edcd', + compact: '0xff406d8a920f957f867379275961a5ac94a7376c02c5b89e64f9715c6b4ff31ffbb422355272555eca2757411c9a127ce6260387558940715b51fca444b8edcd' +} +``` +

+ +### Managers + +A ContractManager is an abstraction which represents a connection to a specific contract on the Blockchain, so that applications can interact with the contract methods and events. + +To instantiate a ContractManager class it must be imported from the base export or the managers module. + +
+```javascript +import { ContractManager } from ‘@ripio/sdk’; +// Or from managers module +import { ContractManager } from ‘@ripio/sdk/managers’; +const contract = new ContractManager(); +``` +

+ +The Contract Manager class allows you to interact with an on-chain contract regardless of the functions it contains. In order to use it, it must be activated. + +
+```javascript +await contract.activate({ + contractAddress: CONTRACT_ADDRESS, + contractAbi: CONTRACT_ABI +}); +``` +

+ +The CONTRACT_ADDRESS parameter is the string address of a contract available on the blockchain which you want to interact with. + +In order to communicate with the on-chain contract, this class needs to know what methods are available and the parameters that the functions require, which is what the CONTRACT_ABI parameter (Application Binary Interface, ABI) provides. + +ABI Example: + +
+```javascript +let abi = [ +...  + { + "inputs": [], + "name": "name", + "outputs": [  + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function"  + }, +... +] +``` +

+ +After activating the ContractManager instance you can make a call to a method of the instantiated contract by calling the ‘execute’ function provided by the manager class. The following example gets the result of calling a "name" method that returns a string value, in case that the method called does not exists on the contract’s ABI it will throw an error: + +
+```javascript +await contract.execute({ method: “name” }); +{ + value: ‘ContractName’, + isTransaction: false +} +await contract.execute({ + method: ‘balanceOf’, + params: [‘0x12...789’] +}); +{ + value: BigNumber { _hex: '0x42', _isBigNumber: true }, + isTransaction: false +} +await contract.execute({ + method: ‘mint’, + params: [ ‘0x12...789’ ], + value: ‘1’, // paying 1 ether   +}); +{ + value: { + chainId: 1337, + confirmations: 0, + data: '0x', + from: '0x8577181F3D8A38a532Ef8F3D6Fd9a31baE73b1EA', + gasLimit: { BigNumber: "21000" }, + gasPrice: { BigNumber: "1" }, + hash: '0xdbf6b710ded42ae0fcfb0ec601235afce5acd0a01b785002cf0581fab4d53b52', + nonce: 5, + r: '0x7502ebb9c10e1664d9a344b636c1151a9ebc6b9dd1aa2bad9f739d15368a83f9', + s: '0x3a71b2b3a2a90527e2cf221606b89af5ac8195b8146f9d2776e4ca342b7e37b2', + to: '0x8ba1f109551bD432803012645Ac136ddd64DBA72', + type: null, + v: 2710, + value: { BigNumber: "1000000000000000000" }, + wait: [Function], + cancel: [Function: cancelTransaction], + speedUp: [Function: speedUpTransaction], + change: [Function: changeTransaction] + },   + isTransaction: true +} +``` +

+ +In this case the function only returns a value. It does not sign any transaction (modify contract values). These cases will be shown in the following sections. + +In case that an error occurs during the execution of the “execute” function, an error will be thrown, containing a generic error and the error that originated that exception. By catching the error with a try-catch statement, and inspecting the “cause” of the exception, you’ll be able to see what happened internally. + +
+```javascript +// Let's assume that something goes wrong while calling the previous function. Be cautious and wrap it in a try-catch and inspect the error. +try { + await contract.execute({ + method: ‘balanceOf’, + params: [‘0x12...789’] + }); +} catch (error) { + console.log(error); + console.log(error.cause); +} +``` +

+ +The following list are managers that follow the standards but can also be used with contracts that extend or implement them, whether standards or a particular design: + +
+Token20Manager | It represents a standard ERC20 contract that implements a fungible token (a coin). +-- | -- +NFT721Manager | It represents a standard ERC721 contract that implements non-fungible tokens (NFTs). +

+ +#### Token20Manager + +In most cases you will want to instantiate a contract designed under an ERC standard (eg ERC20 for a fungible token contract). In that case you can instantiate the contract with a specific class of the mentioned standard: + +
+```javascript +// commonJS +const { Token20Manager } = require('@rgc/sdk/managers'); +// TS +import { Token20Manager } from '@rgc/sdk'; +const contract = new Token20Manager(); +``` +

+ +The advantage of using a specific class from a standard is that the concrete functions are coded to be called directly: + +
+```javascript +const contract = new Token20Manager(); +const address = ‘0x123...789’ +await contract.activate({ + contractAddress: CONTRACT_ADDRESS, + contractAbi: CONTRACT_ABI +}); +const name = await contract.name(); +const symbol = await contract.symbol(); +const balance = await contract.balanceOf(address); +``` +

+ +#### NFT721Manager + +When working with NFTs it is recommended to use the NFT721Manager that follows the ERC721 standard (for a non fungible token contract). If that’s the case you can instantiate the manager of the mentioned standard: + +
+```javascript +// commonJS +const { NFT721Manager } = require('@rgc/sdk/managers'); +// TS +import { NFT721Manager } from '@rgc/sdk'; + +const contract = new NFT721Manager(); + +```` +

+ +The advantage of using a specific class from a standard is that the concrete functions are coded to be called directly: + +
+```javascript +const contract = new NFT721Manager(); +const address = ‘0x123...789’ +await contract.activate({ + contractAddress: CONTRACT_ADDRESS, + contractAbi: CONTRACT_ABI +}); +const owner = ‘0x12...789’; +const spender = ‘0x23...678’; +const allowance = await contract.allowance(owner, spender); +const balance = await contract.balanceOf(address); +const totalSupply = await contract.totalSupply(); +```` + +

+ +#### Activation + +ContractManager and any class that represents a standard must be activated in order to be used. The activation process includes providing the ABI and the contract’s address on the blockchain. In addition to that, activation is important because it allows you to set up the connection to the Blockchain and the way in which transactions will be signed (except in read-only functions). +When you activate a ContractManager a connector is generated internally depending on the parameters provided in the activate method. + +Activating a manager without parameters in addition to contractAddress and ABI generates a BrowserWeb3Connector, which will connect and sign transactions with the injected web3 browser extension: + +
+```javascript +await contract.activate({ + contractAddress: CONTRACT_ADDRESS, + contractAbi: CONTRACT_ABI +}); +``` +

+ +On the other hand, if the Blockchain node URL is added, it will generate a JsonRPCWeb3Connector, which will connect without depending on any browser extension. In this case, the manager will be in read only mode(transactions cannot be signed): + +
+```javascript +await contract.activate({ + contractAddress: CONTRACT_ADDRESS, + contractAbi: CONTRACT_ABI, + providerWss: WSS +}); +``` +

+ +If a private key is added to this last call, it will generate a JsonRPCWeb3Connector, same as the previous one, but it will be possible to sign transactions using the private key provided. + +
+```javascript +await contract.activate({ +contractAddress: CONTRACT_ADDRESS, + contractAbi: CONTRACT_ABI, + providerWss: WSS, + privateKey: PRIVATE_KEY +}); +``` +

+ +Sometimes it is necessary to have a connector instance to perform certain tasks. It is possible to instantiate a BrowserWeb3Connector and JsonRPCWeb3Connector and they must be activated as well. Also, those instances can be used in activation of a ContractManager. + +With BrowserWeb3Connector: + +
+```javascript +let browserConn = new BrowserWeb3Connector(); +let chain = await browserConn.activate(); +await contract.activate({ + contractAddress: CONTRACT_ADDRESS, + contractAbi: CONTRACT_ABI, + connector: browserConn +}); +``` +

+ +With JsonRPCWeb3Connector: + +
+```javascript +let jsonRPCConn = new JsonRPCWeb3Connector(WSS, PRIVATE_KEY); +chain = await jsonRPCConn.activate(); +await contract.activate({ + contractAddress: CONTRACT_ADDRESS, + contractAbi: CONTRACT_ABI, + connector: jsonRPCConn +}); +``` +

+ +### Injected web3 interaction + +When activating a BrowserWeb3Connector the web3 browser extension will receive a request that the user must approve so that the connector can operate on behalf of the connected account. If this request is rejected then the activation process will fail. + +Once the BrowserWeb3Connector is active the following methods are available to be used: + +- Add a new chain: + +
+```javascript +const chainId = 100; +const chainName = ‘Ripio testnet’; +const rpcUrl = ‘https://testnet.ripio.com’; +const currencyName = ‘NAME’; +const currencySymbol = ‘SYMBOL’; +await connector.addChain( + chainId, + chainName, + rpcUrl, + currencyName, + currencySymbol +); +``` +

+ +- Request a chain switch: + +
+```javascript +const chainId = 100; +await connector.switchChain(chainId); +``` +

+ +An injected web3 provider will emit events so that the user can listen to them and act accordingly. To do that, the manager instances contain a [NodeJS EventEmitter](https://nodejs.org/api/events.html) that will be listening to these events, handling the changes and re-emitting them. The manager instances have methods for the user to create or delete listeners as follows: + +
+```javascript +const manager = new ContractManager(); +await manager.activate(...); +const event = ProviderEvents.CHAIN_CHANGED; +function listener(chainId){...} +// add a listener to a certain event +manager.on(event, listener); // alias: addListener(...) +// add a one-time listener to a certain event +manager.once(event, listener); +// remove an event listener from an event +manager.off(event, listener); // alias: removeListener(...) +// remove all listeners for an event +manager.removeAllListeners(event?); +``` +

+ +Once the manager gets activated with a BrowserWeb3Provider it will subscribe to the following injected web3 provider events so that the user can listen to them with the previous explained methods: + +- CONNECT: 'connect' (Emits a ConnectInfo object). +- DISCONNECT: 'disconnect' (Emits a ProviderRpcError object). +- ACCOUNT_CHANGED: 'accountsChanged' (Emits a JsonRpcSigner or Wallet object). +- CHAIN_CHANGED: 'chainChanged' (Emits a number representing the chain Id). + +### Transaction management + +The manager instances have a safeMode, active by default, that will impact on the execute function by first executing the transaction with callStatic (this does not actually change any state, but is free). This can be used to determine if a transaction will fail or succeed. + +When sending a transaction, this could be through the execute function of a manager instance or a transferBalance of a connector instance, the response obtained includes all properties of a Transaction as well as several properties that are useful once it has been mined, for example: + +- wait(confirmations?): + +An asynchronous function that receives the amount of confirmations to wait for before considering that the transaction has been included in the chain. It is recommended to use the getMinConfirmations function, it will return an amount based on the chainId being provided or a default value. + +
+```javascript +const tx = await manager.execute(...); +const confirmations = getMinConfirmations(manager.connector.chainId); +await tx.transactionResponse.wait(confirmations); // amount of confirmations for the specific chain or a default value +const confirmations = 10; +await tx.transactionResponse.wait(confirmations); // 10 confirmations +``` +

+ +- cancel(gasSpeed?): + +An asynchronous function that cancels a transaction by sending a transaction with value 0, the same nonce and a higher fee. If no parameter was passed to the cancel function then it will use the speedUpPercentage value available on the connector class with a 10% default value.It can be canceled if the transaction is still in the mem pool, in case that the transaction was already mined then it will fail. + +
+```javascript +const tx = await manager.execute(...); +const response = await tx.transactionResponse.cancel(); // default gas price 10% up +const gasSpeed = BigNumber.from(40); +const response = await tx.transactionResponse.cancel(gasSpeed); +``` +

+ +- speedUp(gasSpeed?): + +An asynchronous function that speeds up a transaction by re-sending it with a higher fee. If no parameter was passed to the speedUp function then it will use the speedUpPercentage value available on the connector class with a 10% default value. It can be speeded up if the transaction is still in the mem pool, in case that the transaction was already mined then it will fail. + +
+```javascript +const tx = await manager.execute(...); +const response = await tx.transactionResponse.speedUp(); // default gas price 10% up +const gasSpeed = BigNumber.from(40); +const response = await tx.transactionResponse.speedUp(gasSpeed); +``` +

+ +- change(newParams, gasSpeed?): + +An asynchronous function that changes the transaction by repeating the execution of the same method but updating the parameters passed to the function with new ones. If no gasSpeed parameter was passed to the change function then it will use the speedUpPercentage value available on the connector class with a 10% default value. It can be changed if the transaction is still in the mem pool, in case that the transaction was already mined then it will fail. + +
+```javascript +const tx = await manager.execute(...); +const response = await tx.transactionResponse.change({to: ‘0x...123’}); // default gas price 10% up +const gasSpeed = BigNumber.from(100); +const response = await tx.transactionResponse.change({to: ‘0x...123’}, gasSpeed); +``` +

+ +### NFT + +Class to represent a NFT + +
+```javascript +// commonJS +const { NFT } = require('@rgc/sdk'); +// TS +import { NFT } from '@rgc/sdk'; +// Create NFT instance +const nft = new NFT({ + tokenId: '42', + nftMetadata: { + name: 'fake-name', + description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', + image: 'ipfs://fake-uri', + attributes: [ + { + trait_type: 'fake-trait', + value: 'fake-value' + }, + { + trait_type: 'fake-trait-2', + value: 'fake-value' + } + ] + } +}); +// Access nft properties +nft.tokenId; +// 43 +nft.name; +// 'fake-name' +nft.description; +// 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.' +nft.imageUri; +// 'ipfs://fake-uri' +nft.attributes; +// [ +// { trait_type: 'fake-trait', value: 'fake-value' }, +// { trait_type: 'fake-trait-2', value: 'fake-value' } +// ] +nft.jsonData; +// { +// name: 'fake-name', +// description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', +// image: 'ipfs://fake-uri', +// attributes: [ +// { trait_type: 'fake-trait', value: 'fake-value' }, +// { trait_type: 'fake-trait-2', value: 'fake-value' } +// ] +// } +``` +

+ +#### NFTFactory + +Given a NFT721Manager, a StorageType (StorageIpfs, StorageAws, StorageHttp) and a NFT_METADATA_FORMAT, it creates a NFTFactory instance to interact with NFTs + +
+```javascript +// commonJS +const { NFTFactory } = require('@rgc/sdk'); +// TS +import { NFTFactory } from '@rgc/sdk'; +// Create NFTFactory instance +const nftFactory = new NFTFactory(NFT_MANAGER, STORAGE, FORMAT); +``` +

+ +Where: + +- NFT_MANAGER is a NFT721Manager instance activated +- STORAGE is a StorageIpfs, StorageAws or StorageHttp instance +- FORMAT is a NFT_METADATA_FORMAT enum (IMAGE, JSON, JSON_WITH_IMAGE) + +NFTFactory methods: + +- createNFT: + +
+```javascript +nftFactory.createNFT("aTokenId"); +NFT {...} // NFT instance +```` + +

+ +#### StorageIpfs + +When working with NFTs a good practice is to store your NFTs data on Ipfs, which is a protocol and peer-to-peer network for storing and sharing data in a distributed file system. For this reason a StorageIpfs class is given: + +
+```javascript +// commonJS +const { StorageIpfs } = require('@rgc/sdk'); +// TS +import { StorageIpfs } from '@rgc/sdk'; +// Create StorageIpfs instance +const ipfs = new StorageIpfs(IPFS_URL); +``` +

+ +Where IPFS_URL is the api gateway to a node. + +The StorageIpfs class arranges a variety of methods to interact with the ipfs nodes: + +- storeFile: + +
+```javascript +await ipfs.storeFile(“./images/cat.png”); +‘Qmj…Ehb’ // CID of the file +```` + +

+ +- storeMetadata: + +
+```javascript +const data = {image: 'QmP…Weh', {description: ‘Marvin the Paranoid Android’} }; +await ipfs.storeMetadata(data); +‘Qmj…Ehb’ +``` +

+ +- getStringData: + +
+```javascript +const resource = await ipfs.getData(‘Qmj…Ehb’); +await resource.getStringData(); +‘Marvin the Paranoid Android’ +``` +

+ +- getJsonData: + +
+```javascript +const resource = await ipfs.getData(‘Qmj…Ehb’); +await resource.getJsonData(); +{image: 'ipfs://fake-uri/image.png', level: 42, name: 'Marvin'} +``` +

+ +- getBase64Data: + +
+```javascript +const resource = await ipfs.getData(‘Qmj…Ehb’); +await resource.getBase64Data(); +‘RWwgc2VudGlkbyBkZSBsYSB2aWRhLCBlbCB1bml2ZXJzbyB5IHRvZG8gbG8gZGVtw6Fz’ +``` +

+ +#### StorageAws + +You can also store your NFTs data on Aws S3 Buckets. For this reason a StorageAws class is given: + +
+```javascript +// commonJS +const { StorageAws } = require('@rgc/sdk'); +// TS +import { StorageAws } from '@rgc/sdk'; +// Create StorageAws instance +const aws = new StorageAws('sa-east-1'); +``` +

+ +The StorageAws class arranges a variety of methods to interact: + +- storeFile: + +
+```javascript +await aws.storeFile(“./images/cat.png”); +‘cat.png’ +```` + +

+ +- storeMetadata: + +
+```javascript +const data = {image: 'QmP…Weh', {description: ‘Marvin the Paranoid Android’} }; +await aws.storeMetadata(data); +‘metada.json’ +``` +

+ +- getStringData: + +
+```javascript +const resource = await aws.getData(‘text.txt’); +await resource.getStringData(); +‘Marvin the Paranoid Android’ +``` +

+ +- getJsonData: + +
+```javascript +const resource = await aws.getData(‘metadata.json’); +await resource.getJsonData(); +{image: 'aws://fake-uri/image.png', level: 42, name: 'Marvin'} +``` +

+ +- getBase64Data: + +
+```javascript +const resource = await aws.getData(‘cat.png’); +await resource.getBase64Data(); +‘RWwgc2VudGlkbyBkZSBsYSB2aWRhLCBlbCB1bml2ZXJzbyB5IHRvZG8gbG8gZGVtw6Fz’ +``` +

+ +#### StorageHttp + +Get NFTs data on Aws S3 Buckets with http. For that, a StorageHttp class is given: + +
+```javascript +// commonJS +const { StorageHttp } = require('@rgc/sdk'); +// TS +import { StorageHttp } from '@rgc/sdk'; +// Create StorageHttp instance +const client = new StorageHttp(); +``` +

+ +The StorageHttp class arranges a variety of methods to interact: + +- getStringData: + +
+```javascript +const resource = await client.getData(‘https://text.txt’); +await resource.getStringData(); +‘Marvin the Paranoid Android’ +```` + +

+ +- getJsonData: + +
+```javascript +const resource = await client.getData(‘https://metadata.json’); +await resource.getJsonData(); +{image: 'aws://fake-uri/image.png', level: 42, name: 'Marvin'} +``` +

+ +- getBase64Data: + +
+```javascript +const resource = await client.getData(‘https://cat.png’); +await resource.getBase64Data(); +‘RWwgc2VudGlkbyBkZSBsYSB2aWRhLCBlbCB1bml2ZXJzbyB5IHRvZG8gbG8gZGVtw6Fz’ +``` +

+ +### Utils and others + +The utils submodule exports certain functionalities related to: + +#### Connectors + +- verifyMessage(nonce, signature, expectedAddress): It takes a nonce, a signature, and an expected address, and returns true if the signature is valid for the nonce and the expected address. + +
+```javascript +// commonJS +const { connectorsUtils } = require('@rgc/sdk/utils'); +// TS +import { connectorsUtils } from '@rgc/sdk'; + +const message = ‘Log in with nonce: 999’; +const expected = ‘0x12...789’ +const signature = ‘abc...123’; +connectorsUtils.verifyMessage(message, signature, expected); +true + +```` +

+ +- getMinConfirmations(chainId): It returns the minimum number of confirmations required for a transaction to be considered valid for a specific chain. + +
+```javascript +// commonJS +const { connectorsUtils } = require('@rgc/sdk/utils'); +// TS +import { connectorsUtils } from '@rgc/sdk'; + +connectorsUtils.getMinConfirmations(100); +1 +```` + +

+ +#### Conversions + +- fromWei(value, unit): It takes a BigNumberish value and a unit and returns a string. + +
+```javascript +// commonJS +const { conversions } = require('@rgc/sdk/utils'); +const { enums } = require('@rgc/sdk/types'); +// TS +import { conversions } from '@rgc/sdk'; +import { enums } from '@rgc/sdk'; + +conversions.fromWei('1', enums.UnitTypes.ETHER); +'0.000000000000000001' +conversions.fromWei('1', enums.UnitTypes.WEI); +'1' + +```` +

+ +- toWei(value, unit): It converts a string value representing a unit type into WEI (BigNumber). + +
+```javascript +// commonJS +const { conversions } = require('@rgc/sdk/utils'); +const { enums } = require('@rgc/sdk/types'); +// TS +import { conversions } from '@rgc/sdk'; +import { enums } from '@rgc/sdk'; + +conversions.toWei('1', enums.UnitTypes.ETHER)BigNumber { _hex: '0x0de0b6b3a7640000', _isBigNumber: true } +conversions.toWei('1', enums.UnitTypes.WEI)BigNumber { _hex: '0x01', _isBigNumber: true } +conversions.toWei('1', enums.UnitTypes.ETHER).toString(); +'1000000000000000000' +conversions.toWei('1', enums.UnitTypes.WEI).toString(); +'1' +```` + +

+ +- numberToHex(num): It converts a number to a hex string (only integers). + +
+```javascript +// commonJS +const { conversions } = require('@rgc/sdk/utils'); +// TS +import { conversions } from '@rgc/sdk'; + +conversions.numberToHex(123); +‘0x7b’ + +```` +

+ +- hexToNumber(hex): It takes a hexadecimal string and returns a number. + +
+```javascript +// commonJS +const { conversions } = require('@rgc/sdk/utils'); +// TS +import { conversions } from '@rgc/sdk'; + +conversions.hexToNumber(‘0x7b’); +123 +```` + +

From 279d33691c1f6c947534001994dd9055471ddb2f Mon Sep 17 00:00:00 2001 From: Agustin Date: Wed, 4 Jan 2023 14:53:43 -0300 Subject: [PATCH 03/16] update docs --- README.md | 10 +- docs/sdk-nft/v1.0.0/README.md | 98 +++++++++++++++++ docs/sdk-storage-aws/v1.0.0/README.md | 76 +++++++++++++ docs/sdk-storage-http/v1.0.0/README.md | 57 ++++++++++ docs/sdk-storage-ipfs/v1.0.0/README.md | 145 +++++++++++++++++++++++++ docs/{v1.0.0 => sdk/v2.0.0}/README.md | 2 +- packages/nft/README.md | 10 +- packages/sdk/README.md | 10 +- packages/storageAws/README.md | 11 +- packages/storageHttp/README.md | 10 +- packages/storageIpfs/README.md | 10 +- 11 files changed, 416 insertions(+), 23 deletions(-) create mode 100644 docs/sdk-nft/v1.0.0/README.md create mode 100644 docs/sdk-storage-aws/v1.0.0/README.md create mode 100644 docs/sdk-storage-http/v1.0.0/README.md create mode 100644 docs/sdk-storage-ipfs/v1.0.0/README.md rename docs/{v1.0.0 => sdk/v2.0.0}/README.md (99%) diff --git a/README.md b/README.md index a29abcb..c7b5c43 100644 --- a/README.md +++ b/README.md @@ -37,4 +37,12 @@ The deploys are automatically done by merging using semantic-release. Follow the [commit style guide](https://github.com/semantic-release/semantic-release#how-does-it-work) so the commits will be added to the changelog. -Later, during the CI (in develop and main branches) a new package version will be created and uploaded to npmjs registry. +# Documentation + +Read the [docs](https://ripio.github.io/sdkjs) on github pages. + +- [sdk](https://ripio.github.io/sdkjs/sdk/v2.0.0) +- [sdk nft](https://ripio.github.io/sdkjs/sdk-nft/v1.0.0) +- [sdk storage aws](https://ripio.github.io/sdkjs/sdk-storage-aws/v1.0.0) +- [sdk storage http](https://ripio.github.io/sdkjs/sdk-storage-http/v1.0.0) +- [sdk storage ipfs](https://ripio.github.io/sdkjs/sdk-storage-ipfs/v1.0.0) \ No newline at end of file diff --git a/docs/sdk-nft/v1.0.0/README.md b/docs/sdk-nft/v1.0.0/README.md new file mode 100644 index 0000000..dc817f8 --- /dev/null +++ b/docs/sdk-nft/v1.0.0/README.md @@ -0,0 +1,98 @@ +## Installation + +To install ripio sdk-nft we recommend node 16 or above, although it might work with lower versions. + +``` +npm install @ripio/sdk-nft +``` + +## Overview + +### NFT + +Class to represent a NFT + +
+```javascript +// commonJS +const { NFT } = require('@rgc/sdk'); +// TS +import { NFT } from '@rgc/sdk'; +// Create NFT instance +const nft = new NFT({ + tokenId: '42', + nftMetadata: { + name: 'fake-name', + description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', + image: 'ipfs://fake-uri', + attributes: [ + { + trait_type: 'fake-trait', + value: 'fake-value' + }, + { + trait_type: 'fake-trait-2', + value: 'fake-value' + } + ] + } +}); +// Access nft properties +nft.tokenId; +// 43 +nft.name; +// 'fake-name' +nft.description; +// 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.' +nft.imageUri; +// 'ipfs://fake-uri' +nft.attributes; +// [ +// { trait_type: 'fake-trait', value: 'fake-value' }, +// { trait_type: 'fake-trait-2', value: 'fake-value' } +// ] +nft.jsonData; +// { +// name: 'fake-name', +// description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', +// image: 'ipfs://fake-uri', +// attributes: [ +// { trait_type: 'fake-trait', value: 'fake-value' }, +// { trait_type: 'fake-trait-2', value: 'fake-value' } +// ] +// } +``` +

+ +#### NFTFactory + +Given a NFT721Manager, a StorageType (StorageIpfs, StorageAws, StorageHttp) and a NFT_METADATA_FORMAT, it creates a NFTFactory instance to interact with NFTs + +
+```javascript +// commonJS +const { NFTFactory } = require('@rgc/sdk'); +// TS +import { NFTFactory } from '@rgc/sdk'; +// Create NFTFactory instance +const nftFactory = new NFTFactory(NFT_MANAGER, STORAGE, FORMAT); +``` +

+ +Where: + +- NFT_MANAGER is a NFT721Manager instance activated +- STORAGE is a StorageIpfs, StorageAws or StorageHttp instance +- FORMAT is a NFT_METADATA_FORMAT enum (IMAGE, JSON, JSON_WITH_IMAGE) + +NFTFactory methods: + +- createNFT: + +
+```javascript +nftFactory.createNFT("aTokenId"); +NFT {...} // NFT instance +```` + +

diff --git a/docs/sdk-storage-aws/v1.0.0/README.md b/docs/sdk-storage-aws/v1.0.0/README.md new file mode 100644 index 0000000..89dbaa7 --- /dev/null +++ b/docs/sdk-storage-aws/v1.0.0/README.md @@ -0,0 +1,76 @@ +## Installation + +To install ripio sdk-storage-aws we recommend node 16 or above, although it might work with lower versions. + +``` +npm install @ripio/sdk-storage-aws +``` + +## Overview + +### StorageAws + +You can also store your NFTs data on Aws S3 Buckets. For this reason a StorageAws class is given: + +
+```javascript +// commonJS +const { StorageAws } = require('@rgc/sdk'); +// TS +import { StorageAws } from '@rgc/sdk'; +// Create StorageAws instance +const aws = new StorageAws('sa-east-1'); +``` +

+ +The StorageAws class arranges a variety of methods to interact: + +- storeFile: + +
+```javascript +await aws.storeFile(“./images/cat.png”); +‘cat.png’ +```` + +

+ +- storeMetadata: + +
+```javascript +const data = {image: 'QmP…Weh', {description: ‘Marvin the Paranoid Android’} }; +await aws.storeMetadata(data); +‘metada.json’ +``` +

+ +- getStringData: + +
+```javascript +const resource = await aws.getData(‘text.txt’); +await resource.getStringData(); +‘Marvin the Paranoid Android’ +``` +

+ +- getJsonData: + +
+```javascript +const resource = await aws.getData(‘metadata.json’); +await resource.getJsonData(); +{image: 'aws://fake-uri/image.png', level: 42, name: 'Marvin'} +``` +

+ +- getBase64Data: + +
+```javascript +const resource = await aws.getData(‘cat.png’); +await resource.getBase64Data(); +‘RWwgc2VudGlkbyBkZSBsYSB2aWRhLCBlbCB1bml2ZXJzbyB5IHRvZG8gbG8gZGVtw6Fz’ +``` +

diff --git a/docs/sdk-storage-http/v1.0.0/README.md b/docs/sdk-storage-http/v1.0.0/README.md new file mode 100644 index 0000000..5fe7370 --- /dev/null +++ b/docs/sdk-storage-http/v1.0.0/README.md @@ -0,0 +1,57 @@ +## Installation + +To install ripio sdk-storage-http we recommend node 16 or above, although it might work with lower versions. + +``` +npm install @ripio/sdk-storage-http +``` + +## Overview + +### StorageHttp + +Get NFTs data on Aws S3 Buckets with http. For that, a StorageHttp class is given: + +
+```javascript +// commonJS +const { StorageHttp } = require('@rgc/sdk'); +// TS +import { StorageHttp } from '@rgc/sdk'; +// Create StorageHttp instance +const client = new StorageHttp(); +``` +

+ +The StorageHttp class arranges a variety of methods to interact: + +- getStringData: + +
+```javascript +const resource = await client.getData(‘https://text.txt’); +await resource.getStringData(); +‘Marvin the Paranoid Android’ +```` + +

+ +- getJsonData: + +
+```javascript +const resource = await client.getData(‘https://metadata.json’); +await resource.getJsonData(); +{image: 'aws://fake-uri/image.png', level: 42, name: 'Marvin'} +``` +

+ +- getBase64Data: + +
+```javascript +const resource = await client.getData(‘https://cat.png’); +await resource.getBase64Data(); +‘RWwgc2VudGlkbyBkZSBsYSB2aWRhLCBlbCB1bml2ZXJzbyB5IHRvZG8gbG8gZGVtw6Fz’ +``` +

\ No newline at end of file diff --git a/docs/sdk-storage-ipfs/v1.0.0/README.md b/docs/sdk-storage-ipfs/v1.0.0/README.md new file mode 100644 index 0000000..dfe0019 --- /dev/null +++ b/docs/sdk-storage-ipfs/v1.0.0/README.md @@ -0,0 +1,145 @@ +## Installation + +To install ripio sdk-storage-ipfs we recommend node 16 or above, although it might work with lower versions. + +``` +npm install @ripio/sdk-storage-ipfs +``` + +## Overview + +### StorageIpfs + +When working with NFTs a good practice is to store your NFTs data on Ipfs, which is a protocol and peer-to-peer network for storing and sharing data in a distributed file system. For this reason a StorageIpfs class is given: + +
+```javascript +// commonJS +const { StorageIpfs } = require('@rgc/sdk'); +// TS +import { StorageIpfs } from '@rgc/sdk'; +// Create StorageIpfs instance +const ipfs = new StorageIpfs(IPFS_URL); +``` +

+ +Where IPFS_URL is the api gateway to a node. + +The StorageIpfs class arranges a variety of methods to interact with the ipfs nodes: + +- storeFile: + +
+```javascript +await ipfs.storeFile(“./images/cat.png”); +‘Qmj…Ehb’ // CID of the file +```` + +

+ +- storeMetadata: + +
+```javascript +const data = {image: 'QmP…Weh', {description: ‘Marvin the Paranoid Android’} }; +await ipfs.storeMetadata(data); +‘Qmj…Ehb’ +``` +

+ +- getStringData: + +
+```javascript +const resource = await ipfs.getData(‘Qmj…Ehb’); +await resource.getStringData(); +‘Marvin the Paranoid Android’ +``` +

+ +- getJsonData: + +
+```javascript +const resource = await ipfs.getData(‘Qmj…Ehb’); +await resource.getJsonData(); +{image: 'ipfs://fake-uri/image.png', level: 42, name: 'Marvin'} +``` +

+ +- getBase64Data: + +
+```javascript +const resource = await ipfs.getData(‘Qmj…Ehb’); +await resource.getBase64Data(); +‘RWwgc2VudGlkbyBkZSBsYSB2aWRhLCBlbCB1bml2ZXJzbyB5IHRvZG8gbG8gZGVtw6Fz’ +``` +

+ +#### StorageAws + +You can also store your NFTs data on Aws S3 Buckets. For this reason a StorageAws class is given: + +
+```javascript +// commonJS +const { StorageAws } = require('@rgc/sdk'); +// TS +import { StorageAws } from '@rgc/sdk'; +// Create StorageAws instance +const aws = new StorageAws('sa-east-1'); +``` +

+ +The StorageAws class arranges a variety of methods to interact: + +- storeFile: + +
+```javascript +await aws.storeFile(“./images/cat.png”); +‘cat.png’ +```` + +

+ +- storeMetadata: + +
+```javascript +const data = {image: 'QmP…Weh', {description: ‘Marvin the Paranoid Android’} }; +await aws.storeMetadata(data); +‘metada.json’ +``` +

+ +- getStringData: + +
+```javascript +const resource = await aws.getData(‘text.txt’); +await resource.getStringData(); +‘Marvin the Paranoid Android’ +``` +

+ +- getJsonData: + +
+```javascript +const resource = await aws.getData(‘metadata.json’); +await resource.getJsonData(); +{image: 'aws://fake-uri/image.png', level: 42, name: 'Marvin'} +``` +

+ +- getBase64Data: + +
+```javascript +const resource = await aws.getData(‘cat.png’); +await resource.getBase64Data(); +‘RWwgc2VudGlkbyBkZSBsYSB2aWRhLCBlbCB1bml2ZXJzbyB5IHRvZG8gbG8gZGVtw6Fz’ +``` +

diff --git a/docs/v1.0.0/README.md b/docs/sdk/v2.0.0/README.md similarity index 99% rename from docs/v1.0.0/README.md rename to docs/sdk/v2.0.0/README.md index fb57f1c..5edeb53 100644 --- a/docs/v1.0.0/README.md +++ b/docs/sdk/v2.0.0/README.md @@ -1,6 +1,6 @@ ## Installation -To install ripiosdk we recommend node 16 or above, although it might work with lower versions. +To install ripio sdk we recommend node 16 or above, although it might work with lower versions. ``` npm i @ripio/sdk diff --git a/packages/nft/README.md b/packages/nft/README.md index 5f60496..9ccebbb 100644 --- a/packages/nft/README.md +++ b/packages/nft/README.md @@ -18,11 +18,13 @@ npm install @ripio/sdk-nft ### Documentation -Read the [docs](https://github.com/ripio/sdkjs/wiki) in our project's wiki. +Read the [docs](https://ripio.github.io/sdkjs) on github pages. -- [Intro](https://github.com/ripio/sdkjs/wiki/1.-Intro) -- [Getting started](https://github.com/ripio/sdkjs/wiki/2.-Getting-started) -- [Overview](https://github.com/ripio/sdkjs/wiki/3.-Overview) +- [sdk](https://ripio.github.io/sdkjs/sdk/v2.0.0) +- [sdk nft](https://ripio.github.io/sdkjs/sdk-nft/v1.0.0) +- [sdk storage aws](https://ripio.github.io/sdkjs/sdk-storage-aws/v1.0.0) +- [sdk storage http](https://ripio.github.io/sdkjs/sdk-storage-http/v1.0.0) +- [sdk storage ipfs](https://ripio.github.io/sdkjs/sdk-storage-ipfs/v1.0.0) # License diff --git a/packages/sdk/README.md b/packages/sdk/README.md index 3f82a27..fa4eb06 100644 --- a/packages/sdk/README.md +++ b/packages/sdk/README.md @@ -20,11 +20,13 @@ npm install @ripio/sdk ### Documentation -Read the [docs](https://github.com/ripio/sdkjs/wiki) in our project's wiki. +Read the [docs](https://ripio.github.io/sdkjs) on github pages. -- [Intro](https://github.com/ripio/sdkjs/wiki/1.-Intro) -- [Getting started](https://github.com/ripio/sdkjs/wiki/2.-Getting-started) -- [Overview](https://github.com/ripio/sdkjs/wiki/3.-Overview) +- [sdk](https://ripio.github.io/sdkjs/sdk/v2.0.0) +- [sdk nft](https://ripio.github.io/sdkjs/sdk-nft/v1.0.0) +- [sdk storage aws](https://ripio.github.io/sdkjs/sdk-storage-aws/v1.0.0) +- [sdk storage http](https://ripio.github.io/sdkjs/sdk-storage-http/v1.0.0) +- [sdk storage ipfs](https://ripio.github.io/sdkjs/sdk-storage-ipfs/v1.0.0) # License diff --git a/packages/storageAws/README.md b/packages/storageAws/README.md index b06c7ae..fb9a12c 100644 --- a/packages/storageAws/README.md +++ b/packages/storageAws/README.md @@ -18,12 +18,13 @@ npm install @ripio/sdk-storage-aws ### Documentation -Read the [docs](https://github.com/ripio/sdkjs/wiki) in our project's wiki. - -- [Intro](https://github.com/ripio/sdkjs/wiki/1.-Intro) -- [Getting started](https://github.com/ripio/sdkjs/wiki/2.-Getting-started) -- [Overview](https://github.com/ripio/sdkjs/wiki/3.-Overview) +Read the [docs](https://ripio.github.io/sdkjs) on github pages. +- [sdk](https://ripio.github.io/sdkjs/sdk/v2.0.0) +- [sdk nft](https://ripio.github.io/sdkjs/sdk-nft/v1.0.0) +- [sdk storage aws](https://ripio.github.io/sdkjs/sdk-storage-aws/v1.0.0) +- [sdk storage http](https://ripio.github.io/sdkjs/sdk-storage-http/v1.0.0) +- [sdk storage ipfs](https://ripio.github.io/sdkjs/sdk-storage-ipfs/v1.0.0) # License Apache 2.0 diff --git a/packages/storageHttp/README.md b/packages/storageHttp/README.md index b0a91d3..4b103cb 100644 --- a/packages/storageHttp/README.md +++ b/packages/storageHttp/README.md @@ -18,11 +18,13 @@ npm install @ripio/sdk-storage-http ### Documentation -Read the [docs](https://github.com/ripio/sdkjs/wiki) in our project's wiki. +Read the [docs](https://ripio.github.io/sdkjs) on github pages. -- [Intro](https://github.com/ripio/sdkjs/wiki/1.-Intro) -- [Getting started](https://github.com/ripio/sdkjs/wiki/2.-Getting-started) -- [Overview](https://github.com/ripio/sdkjs/wiki/3.-Overview) +- [sdk](https://ripio.github.io/sdkjs/sdk/v2.0.0) +- [sdk nft](https://ripio.github.io/sdkjs/sdk-nft/v1.0.0) +- [sdk storage aws](https://ripio.github.io/sdkjs/sdk-storage-aws/v1.0.0) +- [sdk storage http](https://ripio.github.io/sdkjs/sdk-storage-http/v1.0.0) +- [sdk storage ipfs](https://ripio.github.io/sdkjs/sdk-storage-ipfs/v1.0.0) # License diff --git a/packages/storageIpfs/README.md b/packages/storageIpfs/README.md index 3877fd1..9922e3c 100644 --- a/packages/storageIpfs/README.md +++ b/packages/storageIpfs/README.md @@ -18,11 +18,13 @@ npm install @ripio/sdk-storage-ipfs ### Documentation -Read the [docs](https://github.com/ripio/sdkjs/wiki) in our project's wiki. +Read the [docs](https://ripio.github.io/sdkjs) on github pages. -- [Intro](https://github.com/ripio/sdkjs/wiki/1.-Intro) -- [Getting started](https://github.com/ripio/sdkjs/wiki/2.-Getting-started) -- [Overview](https://github.com/ripio/sdkjs/wiki/3.-Overview) +- [sdk](https://ripio.github.io/sdkjs/sdk/v2.0.0) +- [sdk nft](https://ripio.github.io/sdkjs/sdk-nft/v1.0.0) +- [sdk storage aws](https://ripio.github.io/sdkjs/sdk-storage-aws/v1.0.0) +- [sdk storage http](https://ripio.github.io/sdkjs/sdk-storage-http/v1.0.0) +- [sdk storage ipfs](https://ripio.github.io/sdkjs/sdk-storage-ipfs/v1.0.0) # License From 960cd2918fe0dce71b237047f12757b58c029414 Mon Sep 17 00:00:00 2001 From: Agustin Date: Wed, 4 Jan 2023 15:52:58 -0300 Subject: [PATCH 04/16] update docs structure --- README.md | 10 +++++----- docs/sdk-nft/{v1.0.0 => }/README.md | 0 docs/sdk-storage-aws/{v1.0.0 => }/README.md | 0 docs/sdk-storage-http/{v1.0.0 => }/README.md | 0 docs/sdk-storage-ipfs/{v1.0.0 => }/README.md | 0 docs/sdk/{v2.0.0 => }/README.md | 0 packages/nft/README.md | 10 +++++----- packages/sdk/README.md | 10 +++++----- packages/storageAws/README.md | 10 +++++----- packages/storageHttp/README.md | 10 +++++----- packages/storageIpfs/README.md | 10 +++++----- 11 files changed, 30 insertions(+), 30 deletions(-) rename docs/sdk-nft/{v1.0.0 => }/README.md (100%) rename docs/sdk-storage-aws/{v1.0.0 => }/README.md (100%) rename docs/sdk-storage-http/{v1.0.0 => }/README.md (100%) rename docs/sdk-storage-ipfs/{v1.0.0 => }/README.md (100%) rename docs/sdk/{v2.0.0 => }/README.md (100%) diff --git a/README.md b/README.md index c7b5c43..8aa41ae 100644 --- a/README.md +++ b/README.md @@ -41,8 +41,8 @@ Follow the [commit style guide](https://github.com/semantic-release/semantic-rel Read the [docs](https://ripio.github.io/sdkjs) on github pages. -- [sdk](https://ripio.github.io/sdkjs/sdk/v2.0.0) -- [sdk nft](https://ripio.github.io/sdkjs/sdk-nft/v1.0.0) -- [sdk storage aws](https://ripio.github.io/sdkjs/sdk-storage-aws/v1.0.0) -- [sdk storage http](https://ripio.github.io/sdkjs/sdk-storage-http/v1.0.0) -- [sdk storage ipfs](https://ripio.github.io/sdkjs/sdk-storage-ipfs/v1.0.0) \ No newline at end of file +- [sdk](https://ripio.github.io/sdkjs/sdk) +- [sdk nft](https://ripio.github.io/sdkjs/sdk-nft) +- [sdk storage aws](https://ripio.github.io/sdkjs/sdk-storage-aws) +- [sdk storage http](https://ripio.github.io/sdkjs/sdk-storage-http) +- [sdk storage ipfs](https://ripio.github.io/sdkjs/sdk-storage-ipfs) \ No newline at end of file diff --git a/docs/sdk-nft/v1.0.0/README.md b/docs/sdk-nft/README.md similarity index 100% rename from docs/sdk-nft/v1.0.0/README.md rename to docs/sdk-nft/README.md diff --git a/docs/sdk-storage-aws/v1.0.0/README.md b/docs/sdk-storage-aws/README.md similarity index 100% rename from docs/sdk-storage-aws/v1.0.0/README.md rename to docs/sdk-storage-aws/README.md diff --git a/docs/sdk-storage-http/v1.0.0/README.md b/docs/sdk-storage-http/README.md similarity index 100% rename from docs/sdk-storage-http/v1.0.0/README.md rename to docs/sdk-storage-http/README.md diff --git a/docs/sdk-storage-ipfs/v1.0.0/README.md b/docs/sdk-storage-ipfs/README.md similarity index 100% rename from docs/sdk-storage-ipfs/v1.0.0/README.md rename to docs/sdk-storage-ipfs/README.md diff --git a/docs/sdk/v2.0.0/README.md b/docs/sdk/README.md similarity index 100% rename from docs/sdk/v2.0.0/README.md rename to docs/sdk/README.md diff --git a/packages/nft/README.md b/packages/nft/README.md index 9ccebbb..2ebf9c3 100644 --- a/packages/nft/README.md +++ b/packages/nft/README.md @@ -20,11 +20,11 @@ npm install @ripio/sdk-nft Read the [docs](https://ripio.github.io/sdkjs) on github pages. -- [sdk](https://ripio.github.io/sdkjs/sdk/v2.0.0) -- [sdk nft](https://ripio.github.io/sdkjs/sdk-nft/v1.0.0) -- [sdk storage aws](https://ripio.github.io/sdkjs/sdk-storage-aws/v1.0.0) -- [sdk storage http](https://ripio.github.io/sdkjs/sdk-storage-http/v1.0.0) -- [sdk storage ipfs](https://ripio.github.io/sdkjs/sdk-storage-ipfs/v1.0.0) +- [sdk](https://ripio.github.io/sdkjs/sdk) +- [sdk nft](https://ripio.github.io/sdkjs/sdk-nft) +- [sdk storage aws](https://ripio.github.io/sdkjs/sdk-storage-aws) +- [sdk storage http](https://ripio.github.io/sdkjs/sdk-storage-http) +- [sdk storage ipfs](https://ripio.github.io/sdkjs/sdk-storage-ipfs) # License diff --git a/packages/sdk/README.md b/packages/sdk/README.md index fa4eb06..3b1ea76 100644 --- a/packages/sdk/README.md +++ b/packages/sdk/README.md @@ -22,11 +22,11 @@ npm install @ripio/sdk Read the [docs](https://ripio.github.io/sdkjs) on github pages. -- [sdk](https://ripio.github.io/sdkjs/sdk/v2.0.0) -- [sdk nft](https://ripio.github.io/sdkjs/sdk-nft/v1.0.0) -- [sdk storage aws](https://ripio.github.io/sdkjs/sdk-storage-aws/v1.0.0) -- [sdk storage http](https://ripio.github.io/sdkjs/sdk-storage-http/v1.0.0) -- [sdk storage ipfs](https://ripio.github.io/sdkjs/sdk-storage-ipfs/v1.0.0) +- [sdk](https://ripio.github.io/sdkjs/sdk) +- [sdk nft](https://ripio.github.io/sdkjs/sdk-nft) +- [sdk storage aws](https://ripio.github.io/sdkjs/sdk-storage-aws) +- [sdk storage http](https://ripio.github.io/sdkjs/sdk-storage-http) +- [sdk storage ipfs](https://ripio.github.io/sdkjs/sdk-storage-ipfs) # License diff --git a/packages/storageAws/README.md b/packages/storageAws/README.md index fb9a12c..ae4a523 100644 --- a/packages/storageAws/README.md +++ b/packages/storageAws/README.md @@ -20,11 +20,11 @@ npm install @ripio/sdk-storage-aws Read the [docs](https://ripio.github.io/sdkjs) on github pages. -- [sdk](https://ripio.github.io/sdkjs/sdk/v2.0.0) -- [sdk nft](https://ripio.github.io/sdkjs/sdk-nft/v1.0.0) -- [sdk storage aws](https://ripio.github.io/sdkjs/sdk-storage-aws/v1.0.0) -- [sdk storage http](https://ripio.github.io/sdkjs/sdk-storage-http/v1.0.0) -- [sdk storage ipfs](https://ripio.github.io/sdkjs/sdk-storage-ipfs/v1.0.0) +- [sdk](https://ripio.github.io/sdkjs/sdk) +- [sdk nft](https://ripio.github.io/sdkjs/sdk-nft) +- [sdk storage aws](https://ripio.github.io/sdkjs/sdk-storage-aws) +- [sdk storage http](https://ripio.github.io/sdkjs/sdk-storage-http) +- [sdk storage ipfs](https://ripio.github.io/sdkjs/sdk-storage-ipfs) # License Apache 2.0 diff --git a/packages/storageHttp/README.md b/packages/storageHttp/README.md index 4b103cb..aa2a692 100644 --- a/packages/storageHttp/README.md +++ b/packages/storageHttp/README.md @@ -20,11 +20,11 @@ npm install @ripio/sdk-storage-http Read the [docs](https://ripio.github.io/sdkjs) on github pages. -- [sdk](https://ripio.github.io/sdkjs/sdk/v2.0.0) -- [sdk nft](https://ripio.github.io/sdkjs/sdk-nft/v1.0.0) -- [sdk storage aws](https://ripio.github.io/sdkjs/sdk-storage-aws/v1.0.0) -- [sdk storage http](https://ripio.github.io/sdkjs/sdk-storage-http/v1.0.0) -- [sdk storage ipfs](https://ripio.github.io/sdkjs/sdk-storage-ipfs/v1.0.0) +- [sdk](https://ripio.github.io/sdkjs/sdk) +- [sdk nft](https://ripio.github.io/sdkjs/sdk-nft) +- [sdk storage aws](https://ripio.github.io/sdkjs/sdk-storage-aws) +- [sdk storage http](https://ripio.github.io/sdkjs/sdk-storage-http) +- [sdk storage ipfs](https://ripio.github.io/sdkjs/sdk-storage-ipfs) # License diff --git a/packages/storageIpfs/README.md b/packages/storageIpfs/README.md index 9922e3c..7f4f052 100644 --- a/packages/storageIpfs/README.md +++ b/packages/storageIpfs/README.md @@ -20,11 +20,11 @@ npm install @ripio/sdk-storage-ipfs Read the [docs](https://ripio.github.io/sdkjs) on github pages. -- [sdk](https://ripio.github.io/sdkjs/sdk/v2.0.0) -- [sdk nft](https://ripio.github.io/sdkjs/sdk-nft/v1.0.0) -- [sdk storage aws](https://ripio.github.io/sdkjs/sdk-storage-aws/v1.0.0) -- [sdk storage http](https://ripio.github.io/sdkjs/sdk-storage-http/v1.0.0) -- [sdk storage ipfs](https://ripio.github.io/sdkjs/sdk-storage-ipfs/v1.0.0) +- [sdk](https://ripio.github.io/sdkjs/sdk) +- [sdk nft](https://ripio.github.io/sdkjs/sdk-nft) +- [sdk storage aws](https://ripio.github.io/sdkjs/sdk-storage-aws) +- [sdk storage http](https://ripio.github.io/sdkjs/sdk-storage-http) +- [sdk storage ipfs](https://ripio.github.io/sdkjs/sdk-storage-ipfs) # License From 3c9cbde082a63ae6aa7ca1ea0db9fda2298f4262 Mon Sep 17 00:00:00 2001 From: Agustin Date: Wed, 4 Jan 2023 16:03:21 -0300 Subject: [PATCH 05/16] update sdk docs --- docs/sdk/README.md | 273 --------------------------------------------- 1 file changed, 273 deletions(-) diff --git a/docs/sdk/README.md b/docs/sdk/README.md index 5edeb53..34ad987 100644 --- a/docs/sdk/README.md +++ b/docs/sdk/README.md @@ -599,279 +599,6 @@ const response = await tx.transactionResponse.change({to: ‘0x...123’}, gasSp ```
-### NFT - -Class to represent a NFT - -
-```javascript -// commonJS -const { NFT } = require('@rgc/sdk'); -// TS -import { NFT } from '@rgc/sdk'; -// Create NFT instance -const nft = new NFT({ - tokenId: '42', - nftMetadata: { - name: 'fake-name', - description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', - image: 'ipfs://fake-uri', - attributes: [ - { - trait_type: 'fake-trait', - value: 'fake-value' - }, - { - trait_type: 'fake-trait-2', - value: 'fake-value' - } - ] - } -}); -// Access nft properties -nft.tokenId; -// 43 -nft.name; -// 'fake-name' -nft.description; -// 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.' -nft.imageUri; -// 'ipfs://fake-uri' -nft.attributes; -// [ -// { trait_type: 'fake-trait', value: 'fake-value' }, -// { trait_type: 'fake-trait-2', value: 'fake-value' } -// ] -nft.jsonData; -// { -// name: 'fake-name', -// description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', -// image: 'ipfs://fake-uri', -// attributes: [ -// { trait_type: 'fake-trait', value: 'fake-value' }, -// { trait_type: 'fake-trait-2', value: 'fake-value' } -// ] -// } -``` -

- -#### NFTFactory - -Given a NFT721Manager, a StorageType (StorageIpfs, StorageAws, StorageHttp) and a NFT_METADATA_FORMAT, it creates a NFTFactory instance to interact with NFTs - -
-```javascript -// commonJS -const { NFTFactory } = require('@rgc/sdk'); -// TS -import { NFTFactory } from '@rgc/sdk'; -// Create NFTFactory instance -const nftFactory = new NFTFactory(NFT_MANAGER, STORAGE, FORMAT); -``` -

- -Where: - -- NFT_MANAGER is a NFT721Manager instance activated -- STORAGE is a StorageIpfs, StorageAws or StorageHttp instance -- FORMAT is a NFT_METADATA_FORMAT enum (IMAGE, JSON, JSON_WITH_IMAGE) - -NFTFactory methods: - -- createNFT: - -
-```javascript -nftFactory.createNFT("aTokenId"); -NFT {...} // NFT instance -```` - -

- -#### StorageIpfs - -When working with NFTs a good practice is to store your NFTs data on Ipfs, which is a protocol and peer-to-peer network for storing and sharing data in a distributed file system. For this reason a StorageIpfs class is given: - -
-```javascript -// commonJS -const { StorageIpfs } = require('@rgc/sdk'); -// TS -import { StorageIpfs } from '@rgc/sdk'; -// Create StorageIpfs instance -const ipfs = new StorageIpfs(IPFS_URL); -``` -

- -Where IPFS_URL is the api gateway to a node. - -The StorageIpfs class arranges a variety of methods to interact with the ipfs nodes: - -- storeFile: - -
-```javascript -await ipfs.storeFile(“./images/cat.png”); -‘Qmj…Ehb’ // CID of the file -```` - -

- -- storeMetadata: - -
-```javascript -const data = {image: 'QmP…Weh', {description: ‘Marvin the Paranoid Android’} }; -await ipfs.storeMetadata(data); -‘Qmj…Ehb’ -``` -

- -- getStringData: - -
-```javascript -const resource = await ipfs.getData(‘Qmj…Ehb’); -await resource.getStringData(); -‘Marvin the Paranoid Android’ -``` -

- -- getJsonData: - -
-```javascript -const resource = await ipfs.getData(‘Qmj…Ehb’); -await resource.getJsonData(); -{image: 'ipfs://fake-uri/image.png', level: 42, name: 'Marvin'} -``` -

- -- getBase64Data: - -
-```javascript -const resource = await ipfs.getData(‘Qmj…Ehb’); -await resource.getBase64Data(); -‘RWwgc2VudGlkbyBkZSBsYSB2aWRhLCBlbCB1bml2ZXJzbyB5IHRvZG8gbG8gZGVtw6Fz’ -``` -

- -#### StorageAws - -You can also store your NFTs data on Aws S3 Buckets. For this reason a StorageAws class is given: - -
-```javascript -// commonJS -const { StorageAws } = require('@rgc/sdk'); -// TS -import { StorageAws } from '@rgc/sdk'; -// Create StorageAws instance -const aws = new StorageAws('sa-east-1'); -``` -

- -The StorageAws class arranges a variety of methods to interact: - -- storeFile: - -
-```javascript -await aws.storeFile(“./images/cat.png”); -‘cat.png’ -```` - -

- -- storeMetadata: - -
-```javascript -const data = {image: 'QmP…Weh', {description: ‘Marvin the Paranoid Android’} }; -await aws.storeMetadata(data); -‘metada.json’ -``` -

- -- getStringData: - -
-```javascript -const resource = await aws.getData(‘text.txt’); -await resource.getStringData(); -‘Marvin the Paranoid Android’ -``` -

- -- getJsonData: - -
-```javascript -const resource = await aws.getData(‘metadata.json’); -await resource.getJsonData(); -{image: 'aws://fake-uri/image.png', level: 42, name: 'Marvin'} -``` -

- -- getBase64Data: - -
-```javascript -const resource = await aws.getData(‘cat.png’); -await resource.getBase64Data(); -‘RWwgc2VudGlkbyBkZSBsYSB2aWRhLCBlbCB1bml2ZXJzbyB5IHRvZG8gbG8gZGVtw6Fz’ -``` -

- -#### StorageHttp - -Get NFTs data on Aws S3 Buckets with http. For that, a StorageHttp class is given: - -
-```javascript -// commonJS -const { StorageHttp } = require('@rgc/sdk'); -// TS -import { StorageHttp } from '@rgc/sdk'; -// Create StorageHttp instance -const client = new StorageHttp(); -``` -

- -The StorageHttp class arranges a variety of methods to interact: - -- getStringData: - -
-```javascript -const resource = await client.getData(‘https://text.txt’); -await resource.getStringData(); -‘Marvin the Paranoid Android’ -```` - -

- -- getJsonData: - -
-```javascript -const resource = await client.getData(‘https://metadata.json’); -await resource.getJsonData(); -{image: 'aws://fake-uri/image.png', level: 42, name: 'Marvin'} -``` -

- -- getBase64Data: - -
-```javascript -const resource = await client.getData(‘https://cat.png’); -await resource.getBase64Data(); -‘RWwgc2VudGlkbyBkZSBsYSB2aWRhLCBlbCB1bml2ZXJzbyB5IHRvZG8gbG8gZGVtw6Fz’ -``` -

- ### Utils and others The utils submodule exports certain functionalities related to: From 7f759c09ce138e8f5dcafbc5a31f9c170fc98361 Mon Sep 17 00:00:00 2001 From: Agustin Date: Thu, 5 Jan 2023 11:17:22 -0300 Subject: [PATCH 06/16] remove html from docs --- docs/README.md | 10 ++- docs/sdk-nft/README.md | 14 ++--- docs/sdk-storage-aws/README.md | 23 +++---- docs/sdk-storage-http/README.md | 18 +++--- docs/sdk-storage-ipfs/README.md | 85 ++----------------------- docs/sdk/README.md | 108 ++++++-------------------------- 6 files changed, 56 insertions(+), 202 deletions(-) diff --git a/docs/README.md b/docs/README.md index 640ef7f..1c12622 100644 --- a/docs/README.md +++ b/docs/README.md @@ -12,4 +12,12 @@ Contract Layer: This set of classes allows developers to interact with the block Standard Layer: Contains a set of classes that allow developers to interact more clearly with many of the ERC standards (e.g. ERC20, ERC721). It also makes it easier to perform some tasks associated with this type of contract. -Gaming Layer (work in progress): set of classes that represent specific functionalities of a use case, in this particular case gaming. The game developer can interact only with these classes in the layer without getting involved with contracts or ERCs. The game developer can increase functionality by inheriting from any of these classes. \ No newline at end of file +Gaming Layer (work in progress): set of classes that represent specific functionalities of a use case, in this particular case gaming. The game developer can interact only with these classes in the layer without getting involved with contracts or ERCs. The game developer can increase functionality by inheriting from any of these classes. + +### Resources + +- [sdk](https://ripio.github.io/sdkjs/sdk) +- [sdk nft](https://ripio.github.io/sdkjs/sdk-nft) +- [sdk storage aws](https://ripio.github.io/sdkjs/sdk-storage-aws) +- [sdk storage http](https://ripio.github.io/sdkjs/sdk-storage-http) +- [sdk storage ipfs](https://ripio.github.io/sdkjs/sdk-storage-ipfs) \ No newline at end of file diff --git a/docs/sdk-nft/README.md b/docs/sdk-nft/README.md index dc817f8..3452d30 100644 --- a/docs/sdk-nft/README.md +++ b/docs/sdk-nft/README.md @@ -12,7 +12,6 @@ npm install @ripio/sdk-nft Class to represent a NFT -
```javascript // commonJS const { NFT } = require('@rgc/sdk'); @@ -62,13 +61,11 @@ nft.jsonData; // ] // } ``` -

#### NFTFactory Given a NFT721Manager, a StorageType (StorageIpfs, StorageAws, StorageHttp) and a NFT_METADATA_FORMAT, it creates a NFTFactory instance to interact with NFTs -
```javascript // commonJS const { NFTFactory } = require('@rgc/sdk'); @@ -77,7 +74,6 @@ import { NFTFactory } from '@rgc/sdk'; // Create NFTFactory instance const nftFactory = new NFTFactory(NFT_MANAGER, STORAGE, FORMAT); ``` -

Where: @@ -89,10 +85,14 @@ NFTFactory methods: - createNFT: -
```javascript nftFactory.createNFT("aTokenId"); NFT {...} // NFT instance -```` +``` + +### Other resources -

+- [sdk](https://ripio.github.io/sdkjs/sdk) +- [sdk storage aws](https://ripio.github.io/sdkjs/sdk-storage-aws) +- [sdk storage http](https://ripio.github.io/sdkjs/sdk-storage-http) +- [sdk storage ipfs](https://ripio.github.io/sdkjs/sdk-storage-ipfs) \ No newline at end of file diff --git a/docs/sdk-storage-aws/README.md b/docs/sdk-storage-aws/README.md index 89dbaa7..3c3052c 100644 --- a/docs/sdk-storage-aws/README.md +++ b/docs/sdk-storage-aws/README.md @@ -12,7 +12,6 @@ npm install @ripio/sdk-storage-aws You can also store your NFTs data on Aws S3 Buckets. For this reason a StorageAws class is given: -
```javascript // commonJS const { StorageAws } = require('@rgc/sdk'); @@ -21,56 +20,50 @@ import { StorageAws } from '@rgc/sdk'; // Create StorageAws instance const aws = new StorageAws('sa-east-1'); ``` -

The StorageAws class arranges a variety of methods to interact: - storeFile: -
```javascript await aws.storeFile(“./images/cat.png”); ‘cat.png’ -```` - -

+``` - storeMetadata: -
```javascript const data = {image: 'QmP…Weh', {description: ‘Marvin the Paranoid Android’} }; await aws.storeMetadata(data); ‘metada.json’ ``` -

- getStringData: -
```javascript const resource = await aws.getData(‘text.txt’); await resource.getStringData(); ‘Marvin the Paranoid Android’ ``` -

- - getJsonData: -
```javascript const resource = await aws.getData(‘metadata.json’); await resource.getJsonData(); {image: 'aws://fake-uri/image.png', level: 42, name: 'Marvin'} ``` -

- getBase64Data: -
```javascript const resource = await aws.getData(‘cat.png’); await resource.getBase64Data(); ‘RWwgc2VudGlkbyBkZSBsYSB2aWRhLCBlbCB1bml2ZXJzbyB5IHRvZG8gbG8gZGVtw6Fz’ ``` -

+ +### Other resources + +- [sdk](https://ripio.github.io/sdkjs/sdk) +- [sdk nft](https://ripio.github.io/sdkjs/sdk-nft) +- [sdk storage http](https://ripio.github.io/sdkjs/sdk-storage-http) +- [sdk storage ipfs](https://ripio.github.io/sdkjs/sdk-storage-ipfs) \ No newline at end of file diff --git a/docs/sdk-storage-http/README.md b/docs/sdk-storage-http/README.md index 5fe7370..3019bfe 100644 --- a/docs/sdk-storage-http/README.md +++ b/docs/sdk-storage-http/README.md @@ -12,7 +12,6 @@ npm install @ripio/sdk-storage-http Get NFTs data on Aws S3 Buckets with http. For that, a StorageHttp class is given: -
```javascript // commonJS const { StorageHttp } = require('@rgc/sdk'); @@ -21,37 +20,36 @@ import { StorageHttp } from '@rgc/sdk'; // Create StorageHttp instance const client = new StorageHttp(); ``` -

The StorageHttp class arranges a variety of methods to interact: - getStringData: -
```javascript const resource = await client.getData(‘https://text.txt’); await resource.getStringData(); ‘Marvin the Paranoid Android’ -```` - -

+``` - getJsonData: -
```javascript const resource = await client.getData(‘https://metadata.json’); await resource.getJsonData(); {image: 'aws://fake-uri/image.png', level: 42, name: 'Marvin'} ``` -

- getBase64Data: -
```javascript const resource = await client.getData(‘https://cat.png’); await resource.getBase64Data(); ‘RWwgc2VudGlkbyBkZSBsYSB2aWRhLCBlbCB1bml2ZXJzbyB5IHRvZG8gbG8gZGVtw6Fz’ ``` -

\ No newline at end of file + +### Other resources + +- [sdk](https://ripio.github.io/sdkjs/sdk) +- [sdk nft](https://ripio.github.io/sdkjs/sdk-nft) +- [sdk storage aws](https://ripio.github.io/sdkjs/sdk-storage-aws) +- [sdk storage ipfs](https://ripio.github.io/sdkjs/sdk-storage-ipfs) \ No newline at end of file diff --git a/docs/sdk-storage-ipfs/README.md b/docs/sdk-storage-ipfs/README.md index dfe0019..011a6c7 100644 --- a/docs/sdk-storage-ipfs/README.md +++ b/docs/sdk-storage-ipfs/README.md @@ -12,7 +12,6 @@ npm install @ripio/sdk-storage-ipfs When working with NFTs a good practice is to store your NFTs data on Ipfs, which is a protocol and peer-to-peer network for storing and sharing data in a distributed file system. For this reason a StorageIpfs class is given: -
```javascript // commonJS const { StorageIpfs } = require('@rgc/sdk'); @@ -21,7 +20,6 @@ import { StorageIpfs } from '@rgc/sdk'; // Create StorageIpfs instance const ipfs = new StorageIpfs(IPFS_URL); ``` -

Where IPFS_URL is the api gateway to a node. @@ -29,117 +27,46 @@ The StorageIpfs class arranges a variety of methods to interact with the ipfs no - storeFile: -
```javascript await ipfs.storeFile(“./images/cat.png”); ‘Qmj…Ehb’ // CID of the file -```` - -

+``` - storeMetadata: -
```javascript const data = {image: 'QmP…Weh', {description: ‘Marvin the Paranoid Android’} }; await ipfs.storeMetadata(data); ‘Qmj…Ehb’ ``` -

- getStringData: -
```javascript const resource = await ipfs.getData(‘Qmj…Ehb’); await resource.getStringData(); ‘Marvin the Paranoid Android’ ``` -

- getJsonData: -
```javascript const resource = await ipfs.getData(‘Qmj…Ehb’); await resource.getJsonData(); {image: 'ipfs://fake-uri/image.png', level: 42, name: 'Marvin'} ``` -

- getBase64Data: -
```javascript const resource = await ipfs.getData(‘Qmj…Ehb’); await resource.getBase64Data(); ‘RWwgc2VudGlkbyBkZSBsYSB2aWRhLCBlbCB1bml2ZXJzbyB5IHRvZG8gbG8gZGVtw6Fz’ ``` -

- -#### StorageAws - -You can also store your NFTs data on Aws S3 Buckets. For this reason a StorageAws class is given: - -
-```javascript -// commonJS -const { StorageAws } = require('@rgc/sdk'); -// TS -import { StorageAws } from '@rgc/sdk'; -// Create StorageAws instance -const aws = new StorageAws('sa-east-1'); -``` -

- -The StorageAws class arranges a variety of methods to interact: -- storeFile: - -
-```javascript -await aws.storeFile(“./images/cat.png”); -‘cat.png’ -```` - -

- -- storeMetadata: - -
-```javascript -const data = {image: 'QmP…Weh', {description: ‘Marvin the Paranoid Android’} }; -await aws.storeMetadata(data); -‘metada.json’ -``` -

+### Other resources -- getStringData: - -
-```javascript -const resource = await aws.getData(‘text.txt’); -await resource.getStringData(); -‘Marvin the Paranoid Android’ -``` -

- -- getJsonData: - -
-```javascript -const resource = await aws.getData(‘metadata.json’); -await resource.getJsonData(); -{image: 'aws://fake-uri/image.png', level: 42, name: 'Marvin'} -``` -

- -- getBase64Data: - -
-```javascript -const resource = await aws.getData(‘cat.png’); -await resource.getBase64Data(); -‘RWwgc2VudGlkbyBkZSBsYSB2aWRhLCBlbCB1bml2ZXJzbyB5IHRvZG8gbG8gZGVtw6Fz’ -``` -

+- [sdk](https://ripio.github.io/sdkjs/sdk) +- [sdk nft](https://ripio.github.io/sdkjs/sdk-nft) +- [sdk storage aws](https://ripio.github.io/sdkjs/sdk-storage-aws) +- [sdk storage http](https://ripio.github.io/sdkjs/sdk-storage-http) \ No newline at end of file diff --git a/docs/sdk/README.md b/docs/sdk/README.md index 34ad987..e2e6994 100644 --- a/docs/sdk/README.md +++ b/docs/sdk/README.md @@ -14,25 +14,19 @@ Connectors are classes that allow you to interact with the blockchain by wrappin The following classes are exported on the connectors submodule for CommonJS: -
```javascript const { BrowserWeb3Connector, JsonRPCWeb3Connector } = require('@ripio/sdk/connectors'); ``` -

For TypeScript import them from the origin (submodules will come in the near future): -
```javascript import { BrowserWeb3Connector, JsonRPCWeb3Connector } from '@ripio/sdk'; ``` -

-
BrowserWeb3Connector | This class uses an injected web3 browser extension (e.g. Metamask) to connect to the Blockchain and provide the user with the ability to sign transactions. This connector provides the functionality to switch and add chains to the web3 browser extension as well as to sign messages. -- | -- JsonRPCWeb3Connector | The JSON-RPC API is another popular method for interacting with EVM Blockchain and is available in all major Ethereum node implementations as well as many third-party web services (e.g. INFURA). To use this connector, you must provide a url of the EVM node to connect to and private key with which the transactions will be signed (it can be ignored if you only want a read-only connection). -

Sometimes it is necessary to have a connector instance to perform certain tasks. It is possible to instantiate a BrowserWeb3Connector and JsonRPCWeb3Connector and they must be activated as well. Also, those instances can be used in activation of a ContractManager (see: Contract Manager activation section). @@ -40,41 +34,33 @@ Sometimes it is necessary to have a connector instance to perform certain tasks. When activating the BrowserWeb3Connector a web3 browser extension is required to inject on window.ethereum a Web3 Provider: -
```javascript const connector = new BrowserWeb3Connector(); const {chainId, provider, account} = await connector.activate(); ``` -

Is a good idea to deactivate the connector when you are not going to use it anymore or your program ends. To remove any listeners to events that are still active. -
```javascript await connector.deactivate(); ``` -

#### JsonRPCWeb3Conector When activating the JsonRPCWeb3Connector the Json RPC url is required to connect to the blockchain, and an optional private key can be passed to be able to sing transactions or messages: -
```javascript const WSS = 'JSON-RPC-API-URL' const PRIVATE_KEY = '...'; const connector = new JsonRPCWeb3Connector(WSS, PRIVATE_KEY); const {chainId, provider, account} = await connector.activate(); ``` -

With this connector you could also deactivate it after finishing working with it or before your program ends to remove any listeners to events that are still active. We strongly recommend doing it when you are using a websocket provider. -
```javascript await connector.deactivate(); ``` -

### Shared functionality: @@ -82,12 +68,10 @@ The connectors share the following functionalities: - Sign messages: -
```javascript const message = “The answer to life, the universe and everything.”; await connector.signMessage(message); '0x058...91c' ``` -

- Obtain transaction data: @@ -120,15 +104,13 @@ await connector.getTransaction(txHash); - Obtain native chain balance: -
```javascript await connector.getBalance(“0x5dB...36b”); ‘84.4242’ ``` -

+ - Transfer native chain balance: -
```javascript await connector.transferBalance("1", "0x5dB...36b"); {  @@ -152,10 +134,9 @@ await connector.transferBalance("1", "0x5dB...36b"); change: [Function: changeBalanceTransaction] } ``` -

+ - Change balance transfer on native chain: -
```javascript const to = "0x8ba1f109551bD432803012645Ac136ddd64DBA72"; const value = BigNumber { _hex: '0xDE0B6B3A7640000', _isBigNumber: true }; @@ -180,11 +161,9 @@ await connector.changeBalanceTransaction(txResponse, to, value, gasSpeed); wait: [Function] } ``` -

- Sign typed data: -
```javascript const domain = { name: “ContractName”, @@ -213,7 +192,6 @@ await connector.signTypedData(signer); compact: '0xff406d8a920f957f867379275961a5ac94a7376c02c5b89e64f9715c6b4ff31ffbb422355272555eca2757411c9a127ce6260387558940715b51fca444b8edcd' } ``` -

### Managers @@ -221,25 +199,21 @@ A ContractManager is an abstraction which represents a connection to a specific To instantiate a ContractManager class it must be imported from the base export or the managers module. -
```javascript import { ContractManager } from ‘@ripio/sdk’; // Or from managers module import { ContractManager } from ‘@ripio/sdk/managers’; const contract = new ContractManager(); ``` -

The Contract Manager class allows you to interact with an on-chain contract regardless of the functions it contains. In order to use it, it must be activated. -
```javascript await contract.activate({ contractAddress: CONTRACT_ADDRESS, contractAbi: CONTRACT_ABI }); ``` -

The CONTRACT_ADDRESS parameter is the string address of a contract available on the blockchain which you want to interact with. @@ -247,7 +221,6 @@ In order to communicate with the on-chain contract, this class needs to know wha ABI Example: -
```javascript let abi = [ ...  @@ -267,11 +240,9 @@ let abi = [ ... ] ``` -

After activating the ContractManager instance you can make a call to a method of the instantiated contract by calling the ‘execute’ function provided by the manager class. The following example gets the result of calling a "name" method that returns a string value, in case that the method called does not exists on the contract’s ABI it will throw an error: -
```javascript await contract.execute({ method: “name” }); { @@ -315,13 +286,11 @@ await contract.execute({ isTransaction: true } ``` -

In this case the function only returns a value. It does not sign any transaction (modify contract values). These cases will be shown in the following sections. In case that an error occurs during the execution of the “execute” function, an error will be thrown, containing a generic error and the error that originated that exception. By catching the error with a try-catch statement, and inspecting the “cause” of the exception, you’ll be able to see what happened internally. -
```javascript // Let's assume that something goes wrong while calling the previous function. Be cautious and wrap it in a try-catch and inspect the error. try { @@ -334,21 +303,18 @@ try { console.log(error.cause); } ``` -

The following list are managers that follow the standards but can also be used with contracts that extend or implement them, whether standards or a particular design: -
+ Token20Manager | It represents a standard ERC20 contract that implements a fungible token (a coin). -- | -- NFT721Manager | It represents a standard ERC721 contract that implements non-fungible tokens (NFTs). -

#### Token20Manager In most cases you will want to instantiate a contract designed under an ERC standard (eg ERC20 for a fungible token contract). In that case you can instantiate the contract with a specific class of the mentioned standard: -
```javascript // commonJS const { Token20Manager } = require('@rgc/sdk/managers'); @@ -356,11 +322,9 @@ const { Token20Manager } = require('@rgc/sdk/managers'); import { Token20Manager } from '@rgc/sdk'; const contract = new Token20Manager(); ``` -

The advantage of using a specific class from a standard is that the concrete functions are coded to be called directly: -
```javascript const contract = new Token20Manager(); const address = ‘0x123...789’ @@ -372,13 +336,11 @@ const name = await contract.name(); const symbol = await contract.symbol(); const balance = await contract.balanceOf(address); ``` -

#### NFT721Manager When working with NFTs it is recommended to use the NFT721Manager that follows the ERC721 standard (for a non fungible token contract). If that’s the case you can instantiate the manager of the mentioned standard: -
```javascript // commonJS const { NFT721Manager } = require('@rgc/sdk/managers'); @@ -387,12 +349,10 @@ import { NFT721Manager } from '@rgc/sdk'; const contract = new NFT721Manager(); -```` -

+``` The advantage of using a specific class from a standard is that the concrete functions are coded to be called directly: -
```javascript const contract = new NFT721Manager(); const address = ‘0x123...789’ @@ -405,9 +365,7 @@ const spender = ‘0x23...678’; const allowance = await contract.allowance(owner, spender); const balance = await contract.balanceOf(address); const totalSupply = await contract.totalSupply(); -```` - -

+``` #### Activation @@ -416,18 +374,16 @@ When you activate a ContractManager a connector is generated internally dependin Activating a manager without parameters in addition to contractAddress and ABI generates a BrowserWeb3Connector, which will connect and sign transactions with the injected web3 browser extension: -
```javascript await contract.activate({ contractAddress: CONTRACT_ADDRESS, contractAbi: CONTRACT_ABI }); ``` -

On the other hand, if the Blockchain node URL is added, it will generate a JsonRPCWeb3Connector, which will connect without depending on any browser extension. In this case, the manager will be in read only mode(transactions cannot be signed): -
+ ```javascript await contract.activate({ contractAddress: CONTRACT_ADDRESS, @@ -435,11 +391,9 @@ await contract.activate({ providerWss: WSS }); ``` -

If a private key is added to this last call, it will generate a JsonRPCWeb3Connector, same as the previous one, but it will be possible to sign transactions using the private key provided. -
```javascript await contract.activate({ contractAddress: CONTRACT_ADDRESS, @@ -448,13 +402,11 @@ contractAddress: CONTRACT_ADDRESS, privateKey: PRIVATE_KEY }); ``` -

Sometimes it is necessary to have a connector instance to perform certain tasks. It is possible to instantiate a BrowserWeb3Connector and JsonRPCWeb3Connector and they must be activated as well. Also, those instances can be used in activation of a ContractManager. With BrowserWeb3Connector: -
```javascript let browserConn = new BrowserWeb3Connector(); let chain = await browserConn.activate(); @@ -464,11 +416,9 @@ await contract.activate({ connector: browserConn }); ``` -

With JsonRPCWeb3Connector: -
```javascript let jsonRPCConn = new JsonRPCWeb3Connector(WSS, PRIVATE_KEY); chain = await jsonRPCConn.activate(); @@ -478,7 +428,6 @@ await contract.activate({ connector: jsonRPCConn }); ``` -

### Injected web3 interaction @@ -488,7 +437,6 @@ Once the BrowserWeb3Connector is active the following methods are available to b - Add a new chain: -
```javascript const chainId = 100; const chainName = ‘Ripio testnet’; @@ -503,20 +451,16 @@ await connector.addChain( currencySymbol ); ``` -

- Request a chain switch: -
```javascript const chainId = 100; await connector.switchChain(chainId); ``` -

An injected web3 provider will emit events so that the user can listen to them and act accordingly. To do that, the manager instances contain a [NodeJS EventEmitter](https://nodejs.org/api/events.html) that will be listening to these events, handling the changes and re-emitting them. The manager instances have methods for the user to create or delete listeners as follows: -
```javascript const manager = new ContractManager(); await manager.activate(...); @@ -531,7 +475,6 @@ manager.off(event, listener); // alias: removeListener(...) // remove all listeners for an event manager.removeAllListeners(event?); ``` -

Once the manager gets activated with a BrowserWeb3Provider it will subscribe to the following injected web3 provider events so that the user can listen to them with the previous explained methods: @@ -550,7 +493,6 @@ When sending a transaction, this could be through the execute function of a mana An asynchronous function that receives the amount of confirmations to wait for before considering that the transaction has been included in the chain. It is recommended to use the getMinConfirmations function, it will return an amount based on the chainId being provided or a default value. -
```javascript const tx = await manager.execute(...); const confirmations = getMinConfirmations(manager.connector.chainId); @@ -558,46 +500,39 @@ await tx.transactionResponse.wait(confirmations); // amount of confirmations for const confirmations = 10; await tx.transactionResponse.wait(confirmations); // 10 confirmations ``` -

- cancel(gasSpeed?): An asynchronous function that cancels a transaction by sending a transaction with value 0, the same nonce and a higher fee. If no parameter was passed to the cancel function then it will use the speedUpPercentage value available on the connector class with a 10% default value.It can be canceled if the transaction is still in the mem pool, in case that the transaction was already mined then it will fail. -
```javascript const tx = await manager.execute(...); const response = await tx.transactionResponse.cancel(); // default gas price 10% up const gasSpeed = BigNumber.from(40); const response = await tx.transactionResponse.cancel(gasSpeed); ``` -

- speedUp(gasSpeed?): An asynchronous function that speeds up a transaction by re-sending it with a higher fee. If no parameter was passed to the speedUp function then it will use the speedUpPercentage value available on the connector class with a 10% default value. It can be speeded up if the transaction is still in the mem pool, in case that the transaction was already mined then it will fail. -
```javascript const tx = await manager.execute(...); const response = await tx.transactionResponse.speedUp(); // default gas price 10% up const gasSpeed = BigNumber.from(40); const response = await tx.transactionResponse.speedUp(gasSpeed); ``` -

- change(newParams, gasSpeed?): An asynchronous function that changes the transaction by repeating the execution of the same method but updating the parameters passed to the function with new ones. If no gasSpeed parameter was passed to the change function then it will use the speedUpPercentage value available on the connector class with a 10% default value. It can be changed if the transaction is still in the mem pool, in case that the transaction was already mined then it will fail. -
```javascript const tx = await manager.execute(...); const response = await tx.transactionResponse.change({to: ‘0x...123’}); // default gas price 10% up const gasSpeed = BigNumber.from(100); const response = await tx.transactionResponse.change({to: ‘0x...123’}, gasSpeed); ``` -

### Utils and others @@ -607,7 +542,6 @@ The utils submodule exports certain functionalities related to: - verifyMessage(nonce, signature, expectedAddress): It takes a nonce, a signature, and an expected address, and returns true if the signature is valid for the nonce and the expected address. -
```javascript // commonJS const { connectorsUtils } = require('@rgc/sdk/utils'); @@ -620,12 +554,10 @@ const signature = ‘abc...123’; connectorsUtils.verifyMessage(message, signature, expected); true -```` -

+``` - getMinConfirmations(chainId): It returns the minimum number of confirmations required for a transaction to be considered valid for a specific chain. -
```javascript // commonJS const { connectorsUtils } = require('@rgc/sdk/utils'); @@ -634,15 +566,13 @@ import { connectorsUtils } from '@rgc/sdk'; connectorsUtils.getMinConfirmations(100); 1 -```` +``` -

#### Conversions - fromWei(value, unit): It takes a BigNumberish value and a unit and returns a string. -
```javascript // commonJS const { conversions } = require('@rgc/sdk/utils'); @@ -656,12 +586,10 @@ conversions.fromWei('1', enums.UnitTypes.ETHER); conversions.fromWei('1', enums.UnitTypes.WEI); '1' -```` -

+``` - toWei(value, unit): It converts a string value representing a unit type into WEI (BigNumber). -
```javascript // commonJS const { conversions } = require('@rgc/sdk/utils'); @@ -676,13 +604,10 @@ conversions.toWei('1', enums.UnitTypes.ETHER).toString(); '1000000000000000000' conversions.toWei('1', enums.UnitTypes.WEI).toString(); '1' -```` - -

+``` - numberToHex(num): It converts a number to a hex string (only integers). -
```javascript // commonJS const { conversions } = require('@rgc/sdk/utils'); @@ -692,12 +617,10 @@ import { conversions } from '@rgc/sdk'; conversions.numberToHex(123); ‘0x7b’ -```` -

+``` - hexToNumber(hex): It takes a hexadecimal string and returns a number. -
```javascript // commonJS const { conversions } = require('@rgc/sdk/utils'); @@ -706,6 +629,11 @@ import { conversions } from '@rgc/sdk'; conversions.hexToNumber(‘0x7b’); 123 -```` +``` + +### Other resources -

+- [sdk nft](https://ripio.github.io/sdkjs/sdk-nft) +- [sdk storage aws](https://ripio.github.io/sdkjs/sdk-storage-aws) +- [sdk storage http](https://ripio.github.io/sdkjs/sdk-storage-http) +- [sdk storage ipfs](https://ripio.github.io/sdkjs/sdk-storage-ipfs) \ No newline at end of file From 84ad566d777cb79cca96c50a71cf3b8a7001ffcd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Jan 2023 13:37:46 +0000 Subject: [PATCH 07/16] build(deps): bump json5 from 2.2.1 to 2.2.3 Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3. - [Release notes](https://github.com/json5/json5/releases) - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md) - [Commits](https://github.com/json5/json5/compare/v2.2.1...v2.2.3) --- updated-dependencies: - dependency-name: json5 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 273 +++------------------------------------------- 1 file changed, 13 insertions(+), 260 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4428841..40707fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7173,58 +7173,6 @@ "node": ">= 10.0.0" } }, - "node_modules/ganache/node_modules/base64-js": { - "version": "1.5.1", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/ganache/node_modules/bn.js": { - "version": "4.12.0", - "dev": true, - "license": "MIT" - }, - "node_modules/ganache/node_modules/brorand": { - "version": "1.1.0", - "dev": true, - "license": "MIT" - }, - "node_modules/ganache/node_modules/buffer": { - "version": "6.0.3", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, "node_modules/ganache/node_modules/bufferutil": { "version": "4.0.5", "dev": true, @@ -7249,20 +7197,6 @@ "node": ">=6" } }, - "node_modules/ganache/node_modules/elliptic": { - "version": "6.5.4", - "dev": true, - "license": "MIT", - "dependencies": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, "node_modules/ganache/node_modules/emittery": { "version": "0.10.0", "dev": true, @@ -7274,71 +7208,6 @@ "url": "https://github.com/sindresorhus/emittery?sponsor=1" } }, - "node_modules/ganache/node_modules/hash.js": { - "version": "1.1.7", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "node_modules/ganache/node_modules/hmac-drbg": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/ganache/node_modules/ieee754": { - "version": "1.2.1", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, - "node_modules/ganache/node_modules/inherits": { - "version": "2.0.4", - "dev": true, - "license": "ISC" - }, - "node_modules/ganache/node_modules/is-buffer": { - "version": "2.0.5", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/ganache/node_modules/keccak": { "version": "3.0.1", "dev": true, @@ -7401,16 +7270,6 @@ "node": ">=10" } }, - "node_modules/ganache/node_modules/minimalistic-assert": { - "version": "1.0.1", - "dev": true, - "license": "ISC" - }, - "node_modules/ganache/node_modules/minimalistic-crypto-utils": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, "node_modules/ganache/node_modules/napi-macros": { "version": "2.0.0", "dev": true, @@ -7421,35 +7280,6 @@ "dev": true, "license": "MIT" }, - "node_modules/ganache/node_modules/node-gyp-build": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "bin": { - "node-gyp-build": "bin.js", - "node-gyp-build-optional": "optional.js", - "node-gyp-build-test": "build-test.js" - } - }, - "node_modules/ganache/node_modules/queue-microtask": { - "version": "1.2.3", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, "node_modules/ganache/node_modules/queue-tick": { "version": "1.0.0", "dev": true, @@ -9211,9 +9041,10 @@ "license": "ISC" }, "node_modules/json5": { - "version": "2.2.1", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, - "license": "MIT", "bin": { "json5": "lib/cli.js" }, @@ -9788,9 +9619,8 @@ }, "node_modules/node-gyp-build": { "version": "4.3.0", + "devOptional": true, "license": "MIT", - "optional": true, - "peer": true, "bin": { "node-gyp-build": "bin.js", "node-gyp-build-optional": "optional.js", @@ -14798,7 +14628,7 @@ }, "packages/nft": { "name": "@ripio/sdk-nft", - "version": "1.0.0-dev.1", + "version": "1.0.1", "license": "Apache 2.0", "dependencies": { "@babel/runtime": "^7.17.7", @@ -14808,7 +14638,7 @@ }, "packages/sdk": { "name": "@ripio/sdk", - "version": "2.0.0-dev.1", + "version": "2.0.0", "license": "Apache 2.0", "dependencies": { "@babel/runtime": "^7.17.7", @@ -14817,7 +14647,7 @@ }, "packages/storageAws": { "name": "@ripio/sdk-storage-aws", - "version": "1.0.0-dev.1", + "version": "1.0.0", "license": "Apache 2.0", "dependencies": { "@aws-sdk/client-s3": "^3.197.0", @@ -14827,7 +14657,7 @@ }, "packages/storageHttp": { "name": "@ripio/sdk-storage-http", - "version": "1.0.0-dev.1", + "version": "1.0.0", "license": "Apache 2.0", "dependencies": { "@babel/runtime": "^7.17.7", @@ -14837,7 +14667,7 @@ }, "packages/storageIpfs": { "name": "@ripio/sdk-storage-ipfs", - "version": "1.0.0-dev.1", + "version": "1.0.0", "license": "Apache 2.0", "dependencies": { "@babel/runtime": "^7.17.7", @@ -19644,26 +19474,6 @@ "node-gyp-build": "4.3.0" } }, - "base64-js": { - "version": "1.5.1", - "dev": true - }, - "bn.js": { - "version": "4.12.0", - "dev": true - }, - "brorand": { - "version": "1.1.0", - "dev": true - }, - "buffer": { - "version": "6.0.3", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, "bufferutil": { "version": "4.0.5", "dev": true, @@ -19679,52 +19489,10 @@ "queue-tick": "^1.0.0" } }, - "elliptic": { - "version": "6.5.4", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, "emittery": { "version": "0.10.0", "dev": true }, - "hash.js": { - "version": "1.1.7", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "hmac-drbg": { - "version": "1.0.1", - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "ieee754": { - "version": "1.2.1", - "dev": true - }, - "inherits": { - "version": "2.0.4", - "dev": true - }, - "is-buffer": { - "version": "2.0.5", - "dev": true - }, "keccak": { "version": "3.0.1", "dev": true, @@ -19767,14 +19535,6 @@ } } }, - "minimalistic-assert": { - "version": "1.0.1", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "dev": true - }, "napi-macros": { "version": "2.0.0", "dev": true @@ -19783,14 +19543,6 @@ "version": "2.0.2", "dev": true }, - "node-gyp-build": { - "version": "4.3.0", - "dev": true - }, - "queue-microtask": { - "version": "1.2.3", - "dev": true - }, "queue-tick": { "version": "1.0.0", "dev": true @@ -20962,7 +20714,9 @@ "dev": true }, "json5": { - "version": "2.2.1", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, "jsonfile": { @@ -21320,8 +21074,7 @@ }, "node-gyp-build": { "version": "4.3.0", - "optional": true, - "peer": true + "devOptional": true }, "node-int64": { "version": "0.4.0", From 6c183df232888eb7a421f722644e732fcf4421eb Mon Sep 17 00:00:00 2001 From: Federico Aviles Date: Thu, 16 Feb 2023 11:32:46 -0300 Subject: [PATCH 08/16] replace rgc with ripio --- docs/sdk-nft/README.md | 8 +++---- docs/sdk-storage-aws/README.md | 4 ++-- docs/sdk-storage-http/README.md | 4 ++-- docs/sdk-storage-ipfs/README.md | 4 ++-- docs/sdk/README.md | 40 ++++++++++++++++----------------- 5 files changed, 30 insertions(+), 30 deletions(-) diff --git a/docs/sdk-nft/README.md b/docs/sdk-nft/README.md index 3452d30..f66d9c5 100644 --- a/docs/sdk-nft/README.md +++ b/docs/sdk-nft/README.md @@ -14,9 +14,9 @@ Class to represent a NFT ```javascript // commonJS -const { NFT } = require('@rgc/sdk'); +const { NFT } = require('@ripio/sdk'); // TS -import { NFT } from '@rgc/sdk'; +import { NFT } from '@ripio/sdk'; // Create NFT instance const nft = new NFT({ tokenId: '42', @@ -68,9 +68,9 @@ Given a NFT721Manager, a StorageType (StorageIpfs, StorageAws, StorageHttp) and ```javascript // commonJS -const { NFTFactory } = require('@rgc/sdk'); +const { NFTFactory } = require('@ripio/sdk'); // TS -import { NFTFactory } from '@rgc/sdk'; +import { NFTFactory } from '@ripio/sdk'; // Create NFTFactory instance const nftFactory = new NFTFactory(NFT_MANAGER, STORAGE, FORMAT); ``` diff --git a/docs/sdk-storage-aws/README.md b/docs/sdk-storage-aws/README.md index 3c3052c..c582fd3 100644 --- a/docs/sdk-storage-aws/README.md +++ b/docs/sdk-storage-aws/README.md @@ -14,9 +14,9 @@ You can also store your NFTs data on Aws S3 Buckets. For this reason a StorageAw ```javascript // commonJS -const { StorageAws } = require('@rgc/sdk'); +const { StorageAws } = require('@ripio/sdk-storage-aws'); // TS -import { StorageAws } from '@rgc/sdk'; +import { StorageAws } from '@ripio/sdk-storage-aws'; // Create StorageAws instance const aws = new StorageAws('sa-east-1'); ``` diff --git a/docs/sdk-storage-http/README.md b/docs/sdk-storage-http/README.md index 3019bfe..93d5143 100644 --- a/docs/sdk-storage-http/README.md +++ b/docs/sdk-storage-http/README.md @@ -14,9 +14,9 @@ Get NFTs data on Aws S3 Buckets with http. For that, a StorageHttp class is give ```javascript // commonJS -const { StorageHttp } = require('@rgc/sdk'); +const { StorageHttp } = require('@ripio/sdk-storage-http'); // TS -import { StorageHttp } from '@rgc/sdk'; +import { StorageHttp } from '@ripio/sdk-storage-http'; // Create StorageHttp instance const client = new StorageHttp(); ``` diff --git a/docs/sdk-storage-ipfs/README.md b/docs/sdk-storage-ipfs/README.md index 011a6c7..5f0d739 100644 --- a/docs/sdk-storage-ipfs/README.md +++ b/docs/sdk-storage-ipfs/README.md @@ -14,9 +14,9 @@ When working with NFTs a good practice is to store your NFTs data on Ipfs, which ```javascript // commonJS -const { StorageIpfs } = require('@rgc/sdk'); +const { StorageIpfs } = require('@ripio/sdk-storage-ipfs'); // TS -import { StorageIpfs } from '@rgc/sdk'; +import { StorageIpfs } from '@ripio/sdk-storage-ipfs'; // Create StorageIpfs instance const ipfs = new StorageIpfs(IPFS_URL); ``` diff --git a/docs/sdk/README.md b/docs/sdk/README.md index e2e6994..6a18aad 100644 --- a/docs/sdk/README.md +++ b/docs/sdk/README.md @@ -317,9 +317,9 @@ In most cases you will want to instantiate a contract designed under an ERC stan ```javascript // commonJS -const { Token20Manager } = require('@rgc/sdk/managers'); +const { Token20Manager } = require('@ripio/sdk/managers'); // TS -import { Token20Manager } from '@rgc/sdk'; +import { Token20Manager } from '@ripio/sdk'; const contract = new Token20Manager(); ``` @@ -343,9 +343,9 @@ When working with NFTs it is recommended to use the NFT721Manager that follows t ```javascript // commonJS -const { NFT721Manager } = require('@rgc/sdk/managers'); +const { NFT721Manager } = require('@ripio/sdk/managers'); // TS -import { NFT721Manager } from '@rgc/sdk'; +import { NFT721Manager } from '@ripio/sdk'; const contract = new NFT721Manager(); @@ -544,9 +544,9 @@ The utils submodule exports certain functionalities related to: ```javascript // commonJS -const { connectorsUtils } = require('@rgc/sdk/utils'); +const { connectorsUtils } = require('@ripio/sdk/utils'); // TS -import { connectorsUtils } from '@rgc/sdk'; +import { connectorsUtils } from '@ripio/sdk'; const message = ‘Log in with nonce: 999’; const expected = ‘0x12...789’ @@ -560,9 +560,9 @@ true ```javascript // commonJS -const { connectorsUtils } = require('@rgc/sdk/utils'); +const { connectorsUtils } = require('@ripio/sdk/utils'); // TS -import { connectorsUtils } from '@rgc/sdk'; +import { connectorsUtils } from '@ripio/sdk'; connectorsUtils.getMinConfirmations(100); 1 @@ -575,11 +575,11 @@ connectorsUtils.getMinConfirmations(100); ```javascript // commonJS -const { conversions } = require('@rgc/sdk/utils'); -const { enums } = require('@rgc/sdk/types'); +const { conversions } = require('@ripio/sdk/utils'); +const { enums } = require('@ripio/sdk/types'); // TS -import { conversions } from '@rgc/sdk'; -import { enums } from '@rgc/sdk'; +import { conversions } from '@ripio/sdk'; +import { enums } from '@ripio/sdk'; conversions.fromWei('1', enums.UnitTypes.ETHER); '0.000000000000000001' @@ -592,11 +592,11 @@ conversions.fromWei('1', enums.UnitTypes.WEI); ```javascript // commonJS -const { conversions } = require('@rgc/sdk/utils'); -const { enums } = require('@rgc/sdk/types'); +const { conversions } = require('@ripio/sdk/utils'); +const { enums } = require('@ripio/sdk/types'); // TS -import { conversions } from '@rgc/sdk'; -import { enums } from '@rgc/sdk'; +import { conversions } from '@ripio/sdk'; +import { enums } from '@ripio/sdk'; conversions.toWei('1', enums.UnitTypes.ETHER)BigNumber { _hex: '0x0de0b6b3a7640000', _isBigNumber: true } conversions.toWei('1', enums.UnitTypes.WEI)BigNumber { _hex: '0x01', _isBigNumber: true } @@ -610,9 +610,9 @@ conversions.toWei('1', enums.UnitTypes.WEI).toString(); ```javascript // commonJS -const { conversions } = require('@rgc/sdk/utils'); +const { conversions } = require('@ripio/sdk/utils'); // TS -import { conversions } from '@rgc/sdk'; +import { conversions } from '@ripio/sdk'; conversions.numberToHex(123); ‘0x7b’ @@ -623,9 +623,9 @@ conversions.numberToHex(123); ```javascript // commonJS -const { conversions } = require('@rgc/sdk/utils'); +const { conversions } = require('@ripio/sdk/utils'); // TS -import { conversions } from '@rgc/sdk'; +import { conversions } from '@ripio/sdk'; conversions.hexToNumber(‘0x7b’); 123 From 8e178fbbfbd3da4e6f129db9707cfa09247786f5 Mon Sep 17 00:00:00 2001 From: Federico Aviles Date: Thu, 16 Feb 2023 11:52:27 -0300 Subject: [PATCH 09/16] use correct package --- docs/sdk-nft/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/sdk-nft/README.md b/docs/sdk-nft/README.md index f66d9c5..08b5d39 100644 --- a/docs/sdk-nft/README.md +++ b/docs/sdk-nft/README.md @@ -14,9 +14,9 @@ Class to represent a NFT ```javascript // commonJS -const { NFT } = require('@ripio/sdk'); +const { NFT } = require('@ripio/sdk-nft'); // TS -import { NFT } from '@ripio/sdk'; +import { NFT } from '@ripio/sdk-nft'; // Create NFT instance const nft = new NFT({ tokenId: '42', @@ -68,9 +68,9 @@ Given a NFT721Manager, a StorageType (StorageIpfs, StorageAws, StorageHttp) and ```javascript // commonJS -const { NFTFactory } = require('@ripio/sdk'); +const { NFTFactory } = require('@ripio/sdk-nft'); // TS -import { NFTFactory } from '@ripio/sdk'; +import { NFTFactory } from '@ripio/sdk-nft'; // Create NFTFactory instance const nftFactory = new NFTFactory(NFT_MANAGER, STORAGE, FORMAT); ``` From dfe46b7eb9a9412f5fb0043732cad7f193110d71 Mon Sep 17 00:00:00 2001 From: Federico Aviles Date: Thu, 16 Feb 2023 14:17:25 -0300 Subject: [PATCH 10/16] fix: Update readme --- packages/nft/README.md | 2 +- packages/sdk/README.md | 4 ++-- packages/storageAws/README.md | 2 +- packages/storageHttp/README.md | 2 +- packages/storageIpfs/README.md | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/nft/README.md b/packages/nft/README.md index 2ebf9c3..f4e7032 100644 --- a/packages/nft/README.md +++ b/packages/nft/README.md @@ -2,7 +2,7 @@ Classes to interact with NFTs. -#### Disclaimer +### Disclaimer This repository is still a "work in progress", we appreciate any feedback you can provide us. diff --git a/packages/sdk/README.md b/packages/sdk/README.md index 3b1ea76..2e192ed 100644 --- a/packages/sdk/README.md +++ b/packages/sdk/README.md @@ -1,10 +1,10 @@ # Intro -#### What is Ripio SDK js? +### What is Ripio SDK js? Ripio SDK js is a library written in javascript that allows you to interact with any EVM. As a main feature, Ripio SDK grants simplicity in writing code to transact on blockchain. It has 3 layers of abstraction that goes from, the most generic in terms of interaction with Smart Contracts, to a more oriented design for each of the use cases/industries where you can develop a dApp. Ripio SDK js uses Ethers js to perform the interaction with the blockchain while simplifying its use. -#### Disclaimer +### Disclaimer This repository is still a "work in progress", we appreciate any feedback you can provide us. diff --git a/packages/storageAws/README.md b/packages/storageAws/README.md index ae4a523..ec50aba 100644 --- a/packages/storageAws/README.md +++ b/packages/storageAws/README.md @@ -2,7 +2,7 @@ Upload and get NFTs data stored on an AWS S3 bucket -#### Disclaimer +### Disclaimer This repository is still a "work in progress", we appreciate any feedback you can provide us. diff --git a/packages/storageHttp/README.md b/packages/storageHttp/README.md index aa2a692..ed67be7 100644 --- a/packages/storageHttp/README.md +++ b/packages/storageHttp/README.md @@ -2,7 +2,7 @@ Get NFTs data stored on an AWS S3 bucket -#### Disclaimer +### Disclaimer This repository is still a "work in progress", we appreciate any feedback you can provide us. diff --git a/packages/storageIpfs/README.md b/packages/storageIpfs/README.md index 7f4f052..ae3c9e8 100644 --- a/packages/storageIpfs/README.md +++ b/packages/storageIpfs/README.md @@ -2,7 +2,7 @@ Upload and get NFTs data stored on IPFS -#### Disclaimer +### Disclaimer This repository is still a "work in progress", we appreciate any feedback you can provide us. From 0979b4ff3c03feda0a240510f0907631c2a27585 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 16 Feb 2023 17:48:42 +0000 Subject: [PATCH 11/16] chore(release): 2.0.1 [skip ci] # [@ripio/sdk-v2.0.1](https://github.com/ripio/sdkjs/compare/@ripio/sdk-v2.0.0...@ripio/sdk-v2.0.1) (2023-02-16) ### Bug Fixes * Update readme ([dfe46b7](https://github.com/ripio/sdkjs/commit/dfe46b7eb9a9412f5fb0043732cad7f193110d71)) --- packages/sdk/CHANGELOG.md | 7 +++++++ packages/sdk/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.md index 4ece00d..962fead 100644 --- a/packages/sdk/CHANGELOG.md +++ b/packages/sdk/CHANGELOG.md @@ -1,3 +1,10 @@ +# [@ripio/sdk-v2.0.1](https://github.com/ripio/sdkjs/compare/@ripio/sdk-v2.0.0...@ripio/sdk-v2.0.1) (2023-02-16) + + +### Bug Fixes + +* Update readme ([dfe46b7](https://github.com/ripio/sdkjs/commit/dfe46b7eb9a9412f5fb0043732cad7f193110d71)) + # [@ripio/sdk-v2.0.0](https://github.com/ripio/sdkjs/compare/@ripio/sdk-v1.1.0...@ripio/sdk-v2.0.0) (2022-12-02) diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 82c626f..d339930 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@ripio/sdk", - "version": "2.0.0", + "version": "2.0.1", "description": "SDK to interact with Smart Contracts and wallets", "files": [ "dist" From f6525434848b01cf46852d5c070e5c3e0a87db43 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 16 Feb 2023 17:49:22 +0000 Subject: [PATCH 12/16] chore(release): 1.0.2 [skip ci] # [@ripio/sdk-nft-v1.0.2](https://github.com/ripio/sdkjs/compare/@ripio/sdk-nft-v1.0.1...@ripio/sdk-nft-v1.0.2) (2023-02-16) ### Bug Fixes * Update readme ([dfe46b7](https://github.com/ripio/sdkjs/commit/dfe46b7eb9a9412f5fb0043732cad7f193110d71)) --- packages/nft/CHANGELOG.md | 7 +++++++ packages/nft/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/nft/CHANGELOG.md b/packages/nft/CHANGELOG.md index 71fa017..743c706 100644 --- a/packages/nft/CHANGELOG.md +++ b/packages/nft/CHANGELOG.md @@ -1,3 +1,10 @@ +# [@ripio/sdk-nft-v1.0.2](https://github.com/ripio/sdkjs/compare/@ripio/sdk-nft-v1.0.1...@ripio/sdk-nft-v1.0.2) (2023-02-16) + + +### Bug Fixes + +* Update readme ([dfe46b7](https://github.com/ripio/sdkjs/commit/dfe46b7eb9a9412f5fb0043732cad7f193110d71)) + # [@ripio/sdk-nft-v1.0.1](https://github.com/ripio/sdkjs/compare/@ripio/sdk-nft-v1.0.0...@ripio/sdk-nft-v1.0.1) (2022-12-21) diff --git a/packages/nft/package.json b/packages/nft/package.json index ba91d21..7928dc7 100644 --- a/packages/nft/package.json +++ b/packages/nft/package.json @@ -1,6 +1,6 @@ { "name": "@ripio/sdk-nft", - "version": "1.0.1", + "version": "1.0.2", "description": "Tools to interact with a NFT", "files": [ "dist" From 773f0c7e4ca947bc35a4cb95d69f61f3acae0b24 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 16 Feb 2023 17:50:01 +0000 Subject: [PATCH 13/16] chore(release): 1.0.1 [skip ci] # [@ripio/sdk-storage-aws-v1.0.1](https://github.com/ripio/sdkjs/compare/@ripio/sdk-storage-aws-v1.0.0...@ripio/sdk-storage-aws-v1.0.1) (2023-02-16) ### Bug Fixes * Update readme ([dfe46b7](https://github.com/ripio/sdkjs/commit/dfe46b7eb9a9412f5fb0043732cad7f193110d71)) --- packages/storageAws/CHANGELOG.md | 7 +++++++ packages/storageAws/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/storageAws/CHANGELOG.md b/packages/storageAws/CHANGELOG.md index 39b4bdf..c925f59 100644 --- a/packages/storageAws/CHANGELOG.md +++ b/packages/storageAws/CHANGELOG.md @@ -1,3 +1,10 @@ +# [@ripio/sdk-storage-aws-v1.0.1](https://github.com/ripio/sdkjs/compare/@ripio/sdk-storage-aws-v1.0.0...@ripio/sdk-storage-aws-v1.0.1) (2023-02-16) + + +### Bug Fixes + +* Update readme ([dfe46b7](https://github.com/ripio/sdkjs/commit/dfe46b7eb9a9412f5fb0043732cad7f193110d71)) + # @ripio/sdk-storage-aws-v1.0.0 (2022-12-02) diff --git a/packages/storageAws/package.json b/packages/storageAws/package.json index d427f2b..bc1a8b5 100644 --- a/packages/storageAws/package.json +++ b/packages/storageAws/package.json @@ -1,6 +1,6 @@ { "name": "@ripio/sdk-storage-aws", - "version": "1.0.0", + "version": "1.0.1", "description": "Get and upload data related to a NFT hosted on AWS", "files": [ "dist" From 52431a74cd0dc2fdbfb180897fb1ae68293616af Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 16 Feb 2023 17:50:40 +0000 Subject: [PATCH 14/16] chore(release): 1.0.1 [skip ci] # [@ripio/sdk-storage-http-v1.0.1](https://github.com/ripio/sdkjs/compare/@ripio/sdk-storage-http-v1.0.0...@ripio/sdk-storage-http-v1.0.1) (2023-02-16) ### Bug Fixes * Update readme ([dfe46b7](https://github.com/ripio/sdkjs/commit/dfe46b7eb9a9412f5fb0043732cad7f193110d71)) --- packages/storageHttp/CHANGELOG.md | 7 +++++++ packages/storageHttp/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/storageHttp/CHANGELOG.md b/packages/storageHttp/CHANGELOG.md index 0e3db17..8144d67 100644 --- a/packages/storageHttp/CHANGELOG.md +++ b/packages/storageHttp/CHANGELOG.md @@ -1,3 +1,10 @@ +# [@ripio/sdk-storage-http-v1.0.1](https://github.com/ripio/sdkjs/compare/@ripio/sdk-storage-http-v1.0.0...@ripio/sdk-storage-http-v1.0.1) (2023-02-16) + + +### Bug Fixes + +* Update readme ([dfe46b7](https://github.com/ripio/sdkjs/commit/dfe46b7eb9a9412f5fb0043732cad7f193110d71)) + # @ripio/sdk-storage-http-v1.0.0 (2022-12-02) diff --git a/packages/storageHttp/package.json b/packages/storageHttp/package.json index 2ea7d8c..7683527 100644 --- a/packages/storageHttp/package.json +++ b/packages/storageHttp/package.json @@ -1,6 +1,6 @@ { "name": "@ripio/sdk-storage-http", - "version": "1.0.0", + "version": "1.0.1", "description": "Get data related to a NFT through http", "files": [ "dist" From b44e1518cce34a47f653b6b0e94bd311923806fe Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 16 Feb 2023 17:51:20 +0000 Subject: [PATCH 15/16] chore(release): 1.0.1 [skip ci] # [@ripio/sdk-storage-ipfs-v1.0.1](https://github.com/ripio/sdkjs/compare/@ripio/sdk-storage-ipfs-v1.0.0...@ripio/sdk-storage-ipfs-v1.0.1) (2023-02-16) ### Bug Fixes * Update readme ([dfe46b7](https://github.com/ripio/sdkjs/commit/dfe46b7eb9a9412f5fb0043732cad7f193110d71)) --- packages/storageIpfs/CHANGELOG.md | 7 +++++++ packages/storageIpfs/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/storageIpfs/CHANGELOG.md b/packages/storageIpfs/CHANGELOG.md index 89bbb35..d0fda03 100644 --- a/packages/storageIpfs/CHANGELOG.md +++ b/packages/storageIpfs/CHANGELOG.md @@ -1,3 +1,10 @@ +# [@ripio/sdk-storage-ipfs-v1.0.1](https://github.com/ripio/sdkjs/compare/@ripio/sdk-storage-ipfs-v1.0.0...@ripio/sdk-storage-ipfs-v1.0.1) (2023-02-16) + + +### Bug Fixes + +* Update readme ([dfe46b7](https://github.com/ripio/sdkjs/commit/dfe46b7eb9a9412f5fb0043732cad7f193110d71)) + # @ripio/sdk-storage-ipfs-v1.0.0 (2022-12-02) diff --git a/packages/storageIpfs/package.json b/packages/storageIpfs/package.json index a123b25..aaaae8d 100644 --- a/packages/storageIpfs/package.json +++ b/packages/storageIpfs/package.json @@ -1,6 +1,6 @@ { "name": "@ripio/sdk-storage-ipfs", - "version": "1.0.0", + "version": "1.0.1", "description": "Get and upload data related to a NFT hosted on Ipfs", "files": [ "dist" From dd9868c4863704c9be38022ce8d427eee3552ebb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Aug 2023 10:41:20 +0000 Subject: [PATCH 16/16] build(deps): bump protobufjs from 6.11.3 to 6.11.4 Bumps [protobufjs](https://github.com/protobufjs/protobuf.js) from 6.11.3 to 6.11.4. - [Release notes](https://github.com/protobufjs/protobuf.js/releases) - [Changelog](https://github.com/protobufjs/protobuf.js/blob/master/CHANGELOG.md) - [Commits](https://github.com/protobufjs/protobuf.js/commits) --- updated-dependencies: - dependency-name: protobufjs dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 40707fe..4e60ba1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12790,9 +12790,10 @@ } }, "node_modules/protobufjs": { - "version": "6.11.3", + "version": "6.11.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", + "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", "hasInstallScript": true, - "license": "BSD-3-Clause", "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -14628,7 +14629,7 @@ }, "packages/nft": { "name": "@ripio/sdk-nft", - "version": "1.0.1", + "version": "1.0.2", "license": "Apache 2.0", "dependencies": { "@babel/runtime": "^7.17.7", @@ -14638,7 +14639,7 @@ }, "packages/sdk": { "name": "@ripio/sdk", - "version": "2.0.0", + "version": "2.0.1", "license": "Apache 2.0", "dependencies": { "@babel/runtime": "^7.17.7", @@ -14647,7 +14648,7 @@ }, "packages/storageAws": { "name": "@ripio/sdk-storage-aws", - "version": "1.0.0", + "version": "1.0.1", "license": "Apache 2.0", "dependencies": { "@aws-sdk/client-s3": "^3.197.0", @@ -14657,7 +14658,7 @@ }, "packages/storageHttp": { "name": "@ripio/sdk-storage-http", - "version": "1.0.0", + "version": "1.0.1", "license": "Apache 2.0", "dependencies": { "@babel/runtime": "^7.17.7", @@ -14667,7 +14668,7 @@ }, "packages/storageIpfs": { "name": "@ripio/sdk-storage-ipfs", - "version": "1.0.0", + "version": "1.0.1", "license": "Apache 2.0", "dependencies": { "@babel/runtime": "^7.17.7", @@ -23218,7 +23219,9 @@ } }, "protobufjs": { - "version": "6.11.3", + "version": "6.11.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", + "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", "requires": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2",