Skip to content

Commit

Permalink
Merge pull request #40 from vechainfoundation/carpini/merge-2023-10-10
Browse files Browse the repository at this point in the history
fix: pnpm-lock
  • Loading branch information
davidecarpini authored Oct 11, 2023
2 parents a4b3a75 + dba2465 commit a3f26d6
Show file tree
Hide file tree
Showing 2 changed files with 37,795 additions and 19,905 deletions.
59 changes: 59 additions & 0 deletions libs/ledgerjs/packages/hw-app-vet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,62 @@ For a smooth and quick integration:
***

## API

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

#### Table of Contents

* [Vet](#vet)
* [Parameters](#parameters)
* [Examples](#examples)
* [getAddress](#getaddress)
* [Parameters](#parameters-1)
* [Examples](#examples-1)
* [signTransaction](#signtransaction)
* [Parameters](#parameters-2)

### Vet

VeChain API

#### Parameters

* `transport` **Transport**
* `scrambleKey` (optional, default `"V3T"`)

#### Examples

```javascript
import Vet from "@ledgerhq/hw-app-vet";
const vet = new Vet(transport)
```

#### getAddress

get VeChain address for a given BIP 32 path.

##### Parameters

* `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** a path in BIP 32 format
* `display` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?**
* `chainCode` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?**
* `statusCodes` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<StatusCodes>** (optional, default `[StatusCodes.OK]`)

##### Examples

```javascript
vet.getAddress("m/44'/818'/0'/0").then(o => o.address)
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{publicKey: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), address: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), chainCode: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?}>** an object with a publicKey and address

#### signTransaction

You can sign a transaction and retrieve v, r, s given the raw transaction and the BIP 32 path of the account to sign.

##### Parameters

* `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** : the BIP32 path to sign the transaction on
* `rawTxHex` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** : the raw vechain transaction in hexadecimal to sign

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Buffer](https://nodejs.org/api/buffer.html)>**
Loading

0 comments on commit a3f26d6

Please sign in to comment.