Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Then it's serialized form (step 5 is omitted in this example) is as follows:

## **Ed25519 signature**

MultiversX uses the [Ed25519](https://ed25519.cr.yp.to/) algorithm to sign transactions. In order to obtain the signature, one can use generic software libraries such as [PyNaCl](https://pynacl.readthedocs.io/en/stable/signing/), [tweetnacl-js](https://github.com/dchest/tweetnacl-js#signatures) or components of MultiversX SDK such as [mx-sdk-js-wallet](https://github.com/multiversx/mx-sdk-js-wallet), [mx-sdk-py-wallet](https://github.com/multiversx/mx-sdk-py-wallet), [sdk-go](https://github.com/multiversx/mx-sdk-go), [mxjava](https://github.com/multiversx/mx-sdk-java), [mx-sdk-js-wallet-cli](https://github.com/multiversx/mx-sdk-js-wallet-cli) etc.
MultiversX uses the [Ed25519](https://ed25519.cr.yp.to/) algorithm to sign transactions. In order to obtain the signature, one can use generic software libraries such as [PyNaCl](https://pynacl.readthedocs.io/en/stable/signing/), [tweetnacl-js](https://github.com/dchest/tweetnacl-js#signatures) or components of MultiversX SDK such as [mx-sdk-js-core](https://github.com/multiversx/mx-sdk-js-core), [mx-sdk-py](https://github.com/multiversx/mx-sdk-py), [sdk-go](https://github.com/multiversx/mx-sdk-go), [mxjava](https://github.com/multiversx/mx-sdk-java) etc.

The raw signature consisting of 64 bytes has to be **hex-encoded** afterwards and placed in the transaction object.

Expand Down
46 changes: 1 addition & 45 deletions docs/developers/signing-transactions/tools-for-signing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Tools for signing
---
[comment]: # (mx-abstract)

In order to sign a transaction without actually dispatching it, several tools can be used. Two of the most popular ones are: [mxpy](/sdk-and-tools/sdk-py) or [sdk-js-wallet-cli](/sdk-and-tools/sdk-js-wallet-cli).
In order to sign a transaction without actually dispatching it, several tools can be used. One of the most popular ones is [mxpy](/sdk-and-tools/sdk-py).

[comment]: # (mx-context-auto)

Expand Down Expand Up @@ -52,50 +52,6 @@ In either case, the output file looks like this:

[comment]: # (mx-context-auto)

## **Sign using [sdk-js-wallet-cli](/sdk-and-tools/sdk-js-wallet-cli)**

Given an unsigned transaction in a JSON file:

```
{
"nonce": 42,
"receiver": "erd1cux02zersde0l7hhklzhywcxk4u9n4py5tdxyx7vrvhnza2r4gmq4vw35r",
"value": "100000000000000000",
"gasPrice": 1000000000,
"gasLimit": 70000,
"data": "food for cats",
"chainID": "1",
"version": 1
}
```

You can sign it as follows:

```
$ mxjs-wallet sign -i ./aliceToBob.json -o ./aliceToBobSigned.json \
-k walletKeyOfAlice.json -p passwordOfAlice.txt
```

The signed transaction looks like this:

```
{
"nonce": 42,
"value": "100000000000000000",
"receiver": "erd1cux02zersde0l7hhklzhywcxk4u9n4py5tdxyx7vrvhnza2r4gmq4vw35r",
"sender": "erd1ylzm22ngxl2tspgvwm0yth2myr6dx9avtx83zpxpu7rhxw4qltzs9tmjm9",
"gasPrice": 1000000000,
"gasLimit": 70000,
"data": "Zm9vZCBmb3IgY2F0cw==",
"chainID": "1",
"version": 1,
"signature": "5845301de8ca3a8576166fb3b7dd25124868ce54b07eec7022ae3ffd8d4629540dbb7d0ceed9455a259695e2665db614828728d0f9b0fb1cc46c07dd669d2f0e"
}

```

[comment]: # (mx-context-auto)

## **Other signing tools**

Each SDK includes functions for signing and broadcasting transactions. Please refer to [SDKs & Tools](/sdk-and-tools/overview) for the full list.
6 changes: 0 additions & 6 deletions docs/sdk-and-tools/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ Note that Rust is also the recommended programming language for writing Smart Co
| [Writing and testing sdk-js interactions](/sdk-and-tools/sdk-js/writing-and-testing-sdk-js-interactions) | Write sdk-js interactions for Visual Studio Code |
| [sdk-js signing providers](/sdk-and-tools/sdk-js/sdk-js-signing-providers) | Integrate sdk-js signing providers. |

In addition to sdk-js, one could use the following Javascript library for performing wallet operations via CLI:

| Name | Description |
| ----------------------------------------------------- | ------------------------------------------------------------ |
| [sdk-js-wallet-cli](/sdk-and-tools/sdk-js-wallet-cli) | Lightweight CLI wrapper used to perform wallet interactions. |

You might also want to have a look over [**xSuite**](https://xsuite.dev), a toolkit to init, build, test, deploy contracts using JavaScript, made by the [Arda team](https://arda.run).

[comment]: # (mx-context-auto)
Expand Down
12 changes: 0 additions & 12 deletions docs/sdk-and-tools/sdk-js-wallet-cli.md

This file was deleted.

1 change: 0 additions & 1 deletion sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ const sidebars = {
},
"sdk-and-tools/erdcpp",
"sdk-and-tools/erdkotlin",
"sdk-and-tools/sdk-js-wallet-cli"
],
},
{
Expand Down
Loading