Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@mdx-js/react": "^1.6.22",
"@nevermined-io/catalog": "^1.2.0",
"@nevermined-io/providers": "^1.2.0",
"@nevermined-io/sdk": "^1.2.0",
"@nevermined-io/sdk": "^2.0.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the root package.json for the entire documentation. any reason why we are doing this?

"@nevermined-io/styles": "^0.1.1",
"axios": "^0.27.2",
"bem-helpers": "^1.1.0",
Expand Down
12 changes: 6 additions & 6 deletions tutorials/code/getting-started/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -540,16 +540,16 @@
integrity sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==

"@wry/context@^0.7.0", "@wry/context@^0.7.3":
version "0.7.3"
resolved "https://registry.yarnpkg.com/@wry/context/-/context-0.7.3.tgz#240f6dfd4db5ef54f81f6597f6714e58d4f476a1"
integrity sha512-Nl8WTesHp89RF803Se9X3IiHjdmLBrIvPMaJkl+rKVJAYyPsz1TEUbu89943HpvujtSJgDUx9W4vZw3K1Mr3sA==
version "0.7.4"
resolved "https://registry.yarnpkg.com/@wry/context/-/context-0.7.4.tgz#e32d750fa075955c4ab2cfb8c48095e1d42d5990"
integrity sha512-jmT7Sb4ZQWI5iyu3lobQxICu2nC/vbUhP0vIdd6tHC9PTfenmRmuIFqktc6GH9cgi+ZHnsLWPvfSvc4DrYmKiQ==
dependencies:
tslib "^2.3.0"

"@wry/equality@^0.5.6":
version "0.5.6"
resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.5.6.tgz#cd4a533c72c3752993ab8cbf682d3d20e3cb601e"
integrity sha512-D46sfMTngaYlrH+OspKf8mIJETntFnf6Hsjb0V41jAXJ7Bx2kB8Rv8RCUujuVWYttFtHkUNp7g+FwxNQAr6mXA==
version "0.5.7"
resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.5.7.tgz#72ec1a73760943d439d56b7b1e9985aec5d497bb"
integrity sha512-BRFORjsTuQv5gxcXsuDXx6oGRhuVsEGwZy6LOzRRfgu+eSfxbhUQ9L9YtSEIuIjY/o7g3iWFjrc5eSY1GXP2Dw==
dependencies:
tslib "^2.3.0"

Expand Down
58 changes: 58 additions & 0 deletions tutorials/tutorials/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Nevermined SDK Tutorial

## Overview

This tutorial demonstrates a basic example of using the Nevermined SDK to interact with the Nevermined network. The provided code, written in TypeScript, initializes the SDK, configures it, and retrieves information about SDK versions.
You can find [here](https://github.com/nevermined-io/docs/tree/getting-started-md/tutorials/code/getting-started) the code for this tutorial

## Prerequisites

Ensure you have the following installed:

- Node.js
- yarn (Node Package Manager)

## Setup

1. Install the Nevermined SDK package:

```
yarn add @nevermined-io/sdk

2. Create a TypeScript file (e.g., main.ts) and paste the following code:
```ts
import { Nevermined, NeverminedOptions } from '@nevermined-io/sdk'

const main = async () => {
const config: NeverminedOptions = {
// The web3 endpoint of the blockchain network to connect to, could be an Infura endpoint, Quicknode, or any other web3 provider
web3ProviderUri: 'https://goerli-rollup.arbitrum.io/rpc',
// The url of the marketplace api if you connect to one. It could be your own service if you run a Marketplace API
marketplaceUri: 'https://marketplace-api.goerli.nevermined.app',
// The url to a Nevermined node. It could be your own if you run a Nevermined Node
neverminedNodeUri: 'https://node.goerli.nevermined.app',
// The public address of the above Node
neverminedNodeAddress: '0x5838B5512cF9f12FE9f2beccB20eb47211F9B0bc',
// The url to access the nevermined subgraphs required to query for on-chain events
graphHttpUri: 'https://api.thegraph.com/subgraphs/name/nevermined-io/public',
// Folder where are copied the ABIs of the Nevermined Smart Contracts
artifactsFolder: './artifacts',
}

const sdk = await Nevermined.getInstance(config)
console.log(await sdk.utils.versions.get())
}

main().then(() => process.exit(0))
```

3. From the root folder run:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe some explanation of what artifacts are and why they are needed would be nice

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put " This will create an "artifacts" folder and download in it the Nevermined smart contract artifacts."
let me know what should I write there

```
mkdir artifacts && cd artifacts && wget -c https://artifacts.nevermined.network/421613/public/contracts_v3.5.2.tar.gz && tar -xzvf contracts_v3.5.2.tar.gz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this for the sake of simplicity?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it did not work in the other way

```
This will create an "artifacts" folder and download in it the Nevermined smart contract artifacts.



This will initialize the Nevermined SDK, configure it with the specified options, and output information about SDK versions.

Loading