Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
juliancwirko committed Apr 10, 2023
1 parent b067c32 commit 057edaa
Showing 1 changed file with 20 additions and 22 deletions.
42 changes: 20 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ Just copy and include the `elven.js` script from the `build` directory (in this
Transaction,
Address,
TransactionPayload,
TokenPayment,
ContractCallPayloadBuilder,
TokenTransfer,
ContractFunction,
U32Value,
} from './elven.js';
Expand All @@ -56,16 +55,31 @@ or from CDN:
Transaction,
Address,
TransactionPayload,
TokenPayment,
ContractCallPayloadBuilder,
TokenTransfer,
ContractFunction,
U32Value,
} from 'https://unpkg.com/elven.js@0.7.0/build/elven.js';
} from 'https://unpkg.com/elven.js@0.9.0/build/elven.js';
// Your code here
</script>
```

### SDK reference

Please check the docs here: [www.elvenjs.com/docs/sdk-reference.html](https://www.elvenjs.com/docs/sdk-reference.html)

### Recipes

Please check how to use it with a couple of recipes here: [www.elvenjs.com/docs/recipes.html](https://www.elvenjs.com/docs/recipes.html)

Check for more complete examples in the [example/index.html](/example/index.html)

### Usage example with static website (base demo):

Check out the example file: [example/index.html](/example/index.html)

You will find the whole demo there. The same is deployed here: [elvenjs.netlify.app](https://elvenjs.netlify.app)

### Usage in frontend frameworks

Elven.js from v0.3.0 can also be used in many different frameworks by importing it from node_modules (of course, it is a client-side library). When it comes to React/Nextjs, it is advised to use one of the ready templates, for example, the one mentioned above. But Elven.js can be helpful in other frameworks where there are no templates yet. Example:
Expand All @@ -80,12 +94,6 @@ import { ElvenJS } from 'elven.js';

The types should also be exported.

### Usage example with static website (base demo):

Check out the example file: [example/index.html](/example/index.html)

You will find the whole demo there. The same is deployed here: [elvenjs.netlify.app](https://elvenjs.netlify.app)

### What can it do?

The API is limited for now, this will change, but even now, it can do most of the core operations:
Expand Down Expand Up @@ -117,16 +125,6 @@ The API is limited for now, this will change, but even now, it can do most of th

Why? Because it is supposed to be a browser script, it should be as small as possible. All that functionality can be replaced if needed by a custom implementation or other libraries. There will be docs with examples for that. And in the future, there may be more similar libraries, but optional and separated.

### SDK reference

Please check the docs here: [www.elvenjs.com/docs/sdk-reference.html](https://www.elvenjs.com/docs/sdk-reference.html)

### Recipes

Please check how to use it with a couple of recipes here: [www.elvenjs.com/docs/recipes.html](https://www.elvenjs.com/docs/recipes.html)

Check for more complete examples in the [example/index.html](/example/index.html)

### Development

1. clone the repo
Expand All @@ -135,7 +133,6 @@ Check for more complete examples in the [example/index.html](/example/index.html
4. test on example -> `npm run dev:server`
5. rebuild with every change in the script


### Articles

- [How to Interact With the MultiversX Blockchain in a Simple Static Website](https://hackernoon.com/how-to-interact-with-the-elrond-blockchain-in-a-simple-static-website)
Expand All @@ -150,6 +147,7 @@ If you need to use MultiversX SDK with React-based projects, you can try these t

- [sdk-dapp](https://github.com/multiversx/mx-sdk-dapp) - for standard React-based SPA
- [nextjs-dapp-template](https://github.com/xdevguild/nextjs-dapp-template) - or Nextjs apps
- [useElven](https://www.useelven.com) - React Hooks for interacting with MultiversX blockchain

If you are interested in creating and managing your own PFP NFT collection, you might be interested in:

Expand Down

0 comments on commit 057edaa

Please sign in to comment.