Skip to content

Commit c838992

Browse files
committed
chore: release version 1.1.0 with new NFT contract support, ESM resolution fix, and updated build tooling
1 parent 210fa9f commit c838992

15 files changed

Lines changed: 1681 additions & 58 deletions

CHANGELOG.md

Lines changed: 157 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,170 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [1.0.0] - 2024-XX-XX
8+
## [1.1.0] - 2026-05-09
9+
10+
### Fixed
11+
12+
- **ESM resolution under plain Node.js** — compiled `dist/*.js` files were missing
13+
`.js` file extensions on relative imports, causing `ERR_MODULE_NOT_FOUND` when the
14+
package was consumed via raw `node` (Node 20+ ESM resolver requires explicit
15+
extensions). Bundlers (Vite, webpack, esbuild, Metro) were not affected. The fix
16+
is fully transparent to consumers — no source changes required on your side. If
17+
you were stuck on `1.0.8` and could not upgrade, the documented workaround was to
18+
run via `tsx` or any bundler.
19+
20+
### Added
21+
22+
- **`sdk.contract.view({ contract, function, args?, pk? })`** — execute a contract
23+
function in read-only mode against the current chain tip. Returns
24+
`{ success, result, logs }`. Useful for querying state through a contract's own
25+
logic (e.g. computed balances, vault status) without building a transaction.
26+
- **`sdk.chain.getByFilter({ signer?, arg0?, contract?, contract_b58?, function?, limit?, sort?, cursor? })`**
27+
— generic transaction filtering with cursor pagination. Returns `{ cursor, txs }`.
28+
Replaces the need to call `getTransactionEventsByAccount` when filtering by
29+
contract or function across all signers.
30+
- **`sdk.chain.getKpi()`** — protocol-level KPIs:
31+
`{ ama_burned, fees_paid, active_validator_keys, active_peers, block_time, total_tx, uaw }`.
32+
- **`sdk.proof.getContractStateProof(key, value?)`** — merkle proof for a contract
33+
state entry. Pass `value` to additionally verify it against the proof
34+
(returns `result: boolean`). Foundation for light-client verification.
35+
- **`sdk.transaction.submitAndWait(txPacked, { finalized?: boolean })`** — second
36+
argument is new and optional. Pass `{ finalized: true }` to wait for finality
37+
(consensus reached) instead of just confirmation. Default behavior is unchanged
38+
and backwards-compatible.
39+
- **NFT contract support** — wrappers for the built-in `Nft` contract:
40+
- `NFT_ABI` — contract ABI definition
41+
- `buildNftTransfer`, `buildNftMint`, `buildNftCreateCollection` — standalone
42+
`ContractCall` builders
43+
- `TransactionBuilder` instance methods: `nftTransfer`, `nftMint`,
44+
`nftCreateCollection`
45+
- `TransactionBuilder` static methods: `buildSignedNftTransfer`,
46+
`buildSignedNftMint`, `buildSignedNftCreateCollection`
47+
48+
### Changed
49+
50+
- **Build tooling** — switched the package build from `tsc` to
51+
[`tsdown`](https://tsdown.dev/) (Rolldown-based, by the Vite team), with
52+
`unbundle: true` to preserve per-file output and tree-shaking. This is what
53+
fixes the ESM extension bug above. No effect on the public API or runtime
54+
behaviour for consumers.
55+
56+
## [1.0.8] - 2026-03-17
57+
58+
### Added
59+
60+
- **BIP39 mnemonic utilities** (`src/mnemonic.ts`) — generate and recover
61+
keypairs from human-readable seed phrases:
62+
- `generateMnemonic()`
63+
- `validateMnemonic(mnemonic)`
64+
- `mnemonicToSeedBase58(mnemonic, passphrase?)`
65+
- `encodeVaultSecret`, `decodeVaultSecret`, `detectInputType`
66+
- New `@scure/bip39` runtime dependency.
67+
68+
## [1.0.7] - 2026-02-19
69+
70+
### Added
71+
72+
- **Lockup contract** (`src/contracts/lockup/`) — full ABI, helpers, parsers, and
73+
storage-key builders for the `Lockup` (vesting) built-in contract.
74+
- **LockupPrime contract** (`src/contracts/lockup-prime/`) — full ABI, helpers,
75+
parsers, storage keys, and tier-aware types for `LockupPrime`.
76+
- **Contracts module** (`src/contracts/`) — generic ABI infrastructure:
77+
- `abi-types.ts` — shared ABI type extractors
78+
- `contract.ts` / `contract-call.ts``createContract()` and typed
79+
`ContractCall` representation
80+
- `coin.ts``buildCoinTransfer()` for the native `Coin` contract
81+
- **Signing pipeline** (`src/signing.ts`) — stateless `buildUnsigned`,
82+
`signUnsigned`, `signContractCall`, and `buildAndSignRaw` primitives. Both
83+
`TransactionBuilder` and ABI-driven `createContract().connect()` now delegate
84+
to these.
85+
- **Contract state helpers** (`src/contract-state.ts`) — `parseStateNumber`,
86+
`parseStateString`, `decodeContractStateToBase64`.
87+
- Comprehensive test suites for contracts, lockup, lockup-prime, transaction
88+
builder, contract state, and serialization (~1500 new test lines).
89+
90+
### Changed
91+
92+
- **`TransactionBuilder` rewritten** to consume the new signing primitives and
93+
add ABI-driven contract methods (`builder.contract(ABI).fn(...)`). All existing
94+
static and instance methods remain backwards-compatible.
95+
96+
## [1.0.6] - 2026-02-09
97+
98+
### Fixed
99+
100+
- `formatNumber` now uses `AMA_TOKEN_DECIMALS` for default fraction digits,
101+
matching the rest of the formatter pipeline.
102+
103+
## [1.0.5] - 2026-02-09
104+
105+
### Changed
106+
107+
- **Conversion precision**`toAtomicAma` / `fromAtomicAma` reworked to handle
108+
edge cases (negative zero, scientific notation, trailing zeros, very small
109+
amounts) without precision loss.
110+
111+
## [1.0.4] - 2026-02-04
112+
113+
### Changed
114+
115+
- Default API base URL updated from the previous host to
116+
`https://mainnet-rpc.ama.one/api` across `constants.ts`, `networks.ts`,
117+
`sdk.ts`, and the example scripts.
118+
119+
## [1.0.3] - 2026-01-21
120+
121+
### Added
122+
123+
- **Explorer utilities** (`src/explorer.ts`) — `makeExplorerUrl`,
124+
`makeAddressUrl`, `makeTransactionUrl`, `ExplorerType`.
125+
- **Network configs** (`src/networks.ts`) — `NETWORK_CONFIGS`, `NETWORK_URLS`,
126+
`NETWORK_EXPLORER_URLS`, `TESTNET_FAUCET_URL`, `NetworkType`.
127+
- **Formatter utilities** (`src/formatters.ts`) — `formatAMAAmount`,
128+
`formatBalance`, `formatBalanceWithPrivacy`, `formatNumber`,
129+
`formatShortAddress`.
130+
- **Transaction-error helpers** (`src/transaction-errors.ts`) — human-readable
131+
message lookups for validation and execution errors
132+
(`getTransactionErrorMessage`, `getValidationErrorMessage`,
133+
`getExecutionErrorMessage`).
134+
- New constants: explorer URL, transfer fee, minimum transferable amount.
135+
136+
## [1.0.2] - 2025-12-15
137+
138+
### Added
139+
140+
- **`TransactionExecutionError` enum** — full set of contract-execution error
141+
codes (exec budget, storage budget, KV ops, WASM execution, contract-specific
142+
errors for Coin/Lockup/Lockup Prime/NFT, etc.).
143+
- Expanded transaction interfaces (`Transaction`, `TransactionReceipt`,
144+
`TransactionMetadata`) to expose execution results, logs, and metadata.
145+
146+
## [1.0.1] - 2025-12-09
147+
148+
### Fixed
149+
150+
- Patch release shortly after `1.0.0` to address packaging/publish issues from
151+
the initial release.
152+
153+
## [1.0.0] - 2025-12-09
9154

10155
### Added
11156

12-
- Initial release of @amadeus-protocol/sdk
13-
- Canonical serialization (VecPack) for deterministic encoding
14-
- BLS12-381 cryptographic operations (key generation, signing, verification)
15-
- Transaction building and signing utilities
16-
- Password-based encryption (AES-GCM with PBKDF2) for wallet data
17-
- Base58 and Base64 encoding/decoding utilities
18-
- Token amount conversion utilities (atomic units ↔ human-readable)
19-
- Full-featured HTTP API client for Amadeus nodes
157+
- Initial release of `@amadeus-protocol/sdk`.
158+
- Canonical serialization (VecPack) for deterministic encoding.
159+
- BLS12-381 cryptographic operations (key generation, signing, verification).
160+
- Transaction building and signing utilities.
161+
- Password-based encryption (AES-GCM with PBKDF2) for wallet data.
162+
- Base58 and Base64 encoding/decoding utilities.
163+
- Token amount conversion utilities (atomic units ↔ human-readable).
164+
- Full-featured HTTP API client for Amadeus nodes:
20165
- Chain API (tip, stats, entries, transactions)
21166
- Wallet API (balances)
22167
- Transaction API (submit, query)
23168
- Contract API (bytecode validation, data queries, richlist)
24169
- Epoch API (validator scores, emissions)
25170
- Peer API (nodes, trainers, ANR)
26171
- Proof API (validator proofs)
27-
- Runtime validation using Effect Schema
28-
- Complete TypeScript type definitions
29-
- Comprehensive test suite and documentation
172+
- Runtime validation using Effect Schema.
173+
- Complete TypeScript type definitions.
174+
- Comprehensive test suite and documentation.

0 commit comments

Comments
 (0)