Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4b5b1ab
chore: update for new embedded app
krigga Jun 9, 2023
6774444
fix: address flags
krigga Jun 15, 2023
d6c9f61
chore: bump version, changelog
krigga Jun 16, 2023
4ddf69e
feat: signData
krigga Jun 16, 2023
93c8a57
fix: remove dubious jetton-transfer params
krigga Jun 29, 2023
b7fe7fb
chore: remove blind signing
krigga Jul 11, 2023
388d163
chore: switch to @ton packages
krigga Sep 15, 2023
f91080a
readme: updating adding lib guide
vzhovnitsky Oct 20, 2023
1e72536
fix: incorrect varuint encoding of 0
krigga Jan 17, 2024
6882ddd
Update README.md
vzhovnitsky Jan 17, 2024
ebe101e
Merge pull request #1 from vzhovnitsky/main
Jan 17, 2024
4005e7a
feat: 2.1.0 features
krigga Feb 23, 2024
f27bfb4
feat: parseMessage helper
krigga Mar 14, 2024
06ecd0d
feat: hardcoded jettons
krigga Jul 25, 2024
539bb93
feat: add STAKED jetton
krigga Jul 25, 2024
477bd20
fix: default wallet version
krigga Aug 8, 2024
78b02c5
chore: bump version, changelog
krigga Feb 6, 2025
4c21e0d
feat: new jettons and ec
krigga Feb 17, 2025
c939ec9
fix: order builder
krigga Feb 20, 2025
a6b9e08
fix index
krigga Feb 21, 2025
7c6eaf8
fix: include wallet op
krigga Feb 25, 2025
1171be3
Added Ton Whales pool & Vesting contract support
andrewslock May 29, 2025
9cc59a7
Change comment length to 1 byte
andrewslock Jun 4, 2025
5c3ed57
Merge pull request #2 from krigga/7.2.0-changelog
krigga Aug 21, 2025
b702c26
Merge pull request #3 from andrewslock/ton-whales-and-vesting
krigga Aug 21, 2025
b722aa7
Merge 'ec-and-new-jettons' into main
krigga Aug 21, 2025
1d57576
chore: bump version, changelog
krigga Aug 21, 2025
5e48cac
Merge pull request #4 from ton-community/ec-merge
krigga Aug 21, 2025
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
75 changes: 74 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,82 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [7.3.0] - 2025-08-21

- New jettons
- Fixed `includeWalletOp`

## [7.2.0] - 2025-02-07

- Added support for TON Ledger App 2.2.0 features, including:
- Hardcoded jettons
- Wallet specifiers support in more methods

## [7.1.0] - Not released

### Added

- Added `parseMessage` helper to parse messages into TON Ledger App format
- Added support for TON Ledger App 2.1.0 features, including:
- New message types
- Wallet specifiers (subwallet ID and wallet op inclusion for v4 support)
- `getSettings` method

## [7.0.1] - 2024-01-17

### Fixed

- Fixed incorrect VarUInt encoding of 0 (0 nanoTON, 0 jetton units, etc)

## [7.0.0] - 2023-09-15

### Changed

- Switched `ton-core` and `ton-crypto` to `@ton/core` and `@ton/crypto`

## [6.0.0] - 2023-07-11

### Removed

- Removed `unsafe` payload format

## [5.0.0] - 2023-06-29

### Removed

- Removed `decimals` and `ticker` from `jetton-transfer` request

## [4.1.0] - 2023-06-16

### Added

- Added `signData` method along with `SignDataRequest` type

## [4.0.1] - 2023-06-16

### Fixed

- Fixed the address flags communication

## [4.0.0] - 2023-06-09

### Added

- Added payload types for NFT and Jetton transfers
- Added TON Connect 2.0 address proof request

### Removed

- Removed old payload types except for comment and unsafe

### Changed

- Updated dependencies
- Changed APDU format to be the same as the latest embedded app version (breaking change)

## [3.0.0] - 2023-01-08

## Changed
### Changed

- Migration to `ton-core`

Expand Down
40 changes: 27 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This library allows you to connect to a ledger device and with with TON from bro
To add library to your project execute:

```bash
yarn add ton-ledger
yarn add @ton-community/ton-ledger
```

## Connecting to a Device
Expand All @@ -29,7 +29,7 @@ React Native:

After connecting to a device create a TonTransport instance:
```typescript
import { TonTransport } from 'ton-ledger';
import { TonTransport } from '@ton-community/ton-ledger';
let transport = new TonTransport(device);
```

Expand Down Expand Up @@ -83,7 +83,7 @@ Ledger Nanoapp works with Wallet v4 for now, we recommend you to continue to use

```typescript
import { WalletV4Contract, WalletV4Source } from 'ton';
import { TonPayloadFormat } from 'ton-ledger';
import { TonPayloadFormat } from '@ton-community/ton-ledger';
import { TonClient, Address, SendMode, toNano } from 'ton-core';

let client = new TonClient({ endpoint: 'https://toncenter.com/api/v2/jsonRPC' });
Expand Down Expand Up @@ -118,28 +118,42 @@ await c.sendExternalMessage(contract, signed);

## Payload formats

Usually you want to perform transactions with some payload. Ledger's NanoApp currently supports 2 stable commands, all other are outdated or unstable:

### Transaction with a comment
Comments are limited to ASCII-only symbols and 127 letters. Anything above would be automatically downgraded to Blind Signing Mode that you want to avoid at all cost.

```typescript
let payload: TonPayloadFormat = {
const payload: TonPayloadFormat = {
type: 'comment',
text: 'Deposit'
};
```

### Unsafe with custom payload
### Jetton transfer

```typescript
const payload: TonPayloadFormat = {
type: 'jetton-transfer',
queryId: null, // null will be replaced with 0; you can pass any value of the BigInt type
amount: 1n,
destination: Address.parse('EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9c'),
responseDestination: Address.parse('EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9c'),
customPayload: null, // you can pass any value of the Cell type
forwardAmount: 0n,
forwardPayload: null // you can pass any value of the Cell type
};
```

This payload allows you to send arbitrary message, this is considered as Blind Signing Mode and only hash of your transaction would be shown to a user.
### NFT transfer

```typescript
let cell: Cell = ...
let message = new CellMessage(cell);
let payload: TonPayloadFormat = {
type: 'unsafe',
message
const payload: TonPayloadFormat = {
type: 'nft-transfer',
queryId: null, // null will be replaced with 0; you can pass any value of the BigInt type
newOwner: Address.parse('EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9c'),
responseDestination: Address.parse('EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9c'),
customPayload: null, // you can pass any value of the Cell type
forwardAmount: 0n,
forwardPayload: null // you can pass any value of the Cell type
};
```

Expand Down
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ton-ledger",
"version": "3.0.0",
"repository": "https://github.com/ton-foundation/ton-ledger-ts.git",
"name": "@ton-community/ton-ledger",
"version": "7.3.0",
"repository": "https://github.com/ton-community/ton-ledger-ts",
"author": "Steve Korshakov <[email protected]>",
"license": "MIT",
"main": "dist/index.js",
Expand All @@ -15,24 +15,23 @@
"dev": "ts-node ./test/index.ts"
},
"peerDependencies": {
"ton-core": ">=0.44.0"
"@ton/core": ">=0.52.2"
},
"devDependencies": {
"@release-it/keep-a-changelog": "^3.1.0",
"@ledgerhq/hw-transport-node-hid": "^6.27.1",
"@types/jest": "^29.2.4",
"@types/node": "^17.0.36",
"jest": "^29.3.1",
"release-it": "^15.5.1",
"ton-core": "^0.44.0",
"ts-jest": "^29.0.3",
"ts-node": "^10.8.0",
"typescript": "^4.7.2"
"@ton/core": "^0.52.2",
"@types/jest": "^29.5.2",
"@types/node": "^20.2.5",
"jest": "^29.5.0",
"release-it": "^15.11.0",
"ts-jest": "^29.1.0",
"ts-node": "^10.9.1",
"typescript": "^4.9.5"
},
"dependencies": {
"@ledgerhq/hw-transport": "^6.27.1",
"teslabot": "^1.5.0",
"ton-crypto": "^3.2.0"
"@ledgerhq/hw-transport": "^6.31.4",
"@ton/crypto": "^3.2.0",
"teslabot": "^1.5.0"
},
"publishConfig": {
"access": "public",
Expand All @@ -47,5 +46,6 @@
"filename": "CHANGELOG.md"
}
}
}
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
Loading