Skip to content
Open
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
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ All notable changes to the Aptos TypeScript SDK will be captured in this file. T

# Unreleased

## Added

- New `@aptos-labs/aptos-keystore` package: encrypted private key storage standard based on Ethereum's Web3 Secret Storage Definition
- Separate package in `keystore/` — install with `npm install @aptos-labs/aptos-keystore`
- Supports all Aptos key types: Ed25519, Secp256k1, Secp256r1
- AES-256-GCM authenticated encryption (no separate MAC needed)
- Argon2id KDF by default (when `hash-wasm` is installed), falls back to scrypt
- PBKDF2-HMAC-SHA256 also supported as an alternative KDF
- Password-based or key-file-based encryption
- Portable JSON format designed for cross-SDK compatibility (TypeScript, Rust, Python, Go, etc.)
- Exports: `encryptKeystore`, `decryptKeystore`, `AptosKeyStore`, `KeystorePrivateKey`, `KeystoreEncryptOptions`

## Fixed

- Fix simple function arguments for `Vector<Option<T>>` types: BCS-encoded values (e.g. `AccountAddress.ONE`) passed as elements of `vector<Option<address>>` are now automatically wrapped in `MoveOption` instead of throwing a type mismatch error
Expand Down
63 changes: 63 additions & 0 deletions keystore/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"name": "@aptos-labs/aptos-keystore",
"description": "Encrypted private key storage for Aptos — AES-256-GCM + Argon2id/scrypt/PBKDF2",
"packageManager": "pnpm@10.30.3",
"license": "Apache-2.0",
"engines": {
"node": ">=20.0.0"
},
"bugs": {
"url": "https://github.com/aptos-labs/aptos-ts-sdk/issues/new/choose"
},
"homepage": "https://github.com/aptos-labs/aptos-ts-sdk/tree/main/keystore",
"version": "0.1.0",
"sideEffects": false,
"main": "dist/common/index.js",
"module": "dist/esm/index.mjs",
"exports": {
".": {
"source": "./src/index.ts",
"require": {
"types": "./dist/common/index.d.ts",
"default": "./dist/common/index.js"
},
"import": {
"types": "./dist/esm/index.d.mts",
"default": "./dist/esm/index.mjs"
}
},
"./package.json": "./package.json"
},
"files": [
"dist",
"src"
],
"scripts": {
"build:clean": "rm -rf dist",
"build": "pnpm build:clean && tsup",
"test": "vitest run",
"fmt": "biome format --write 'src/' 'tests/'",
"check": "biome check 'src/' 'tests/'"
},
"peerDependencies": {
"@aptos-labs/ts-sdk": "^6.2.0",
"hash-wasm": "^4.12.0"
},
"peerDependenciesMeta": {
"hash-wasm": {
"optional": true
}
},
"dependencies": {
"@noble/hashes": "^1.5.0"
},
"devDependencies": {
"@aptos-labs/ts-sdk": "link:..",
"@biomejs/biome": "^2.4.6",
"@types/node": "^24.3.1",
"hash-wasm": "^4.12.0",
"tsup": "^8.5.1",
"typescript": "^5.9.3",
"vitest": "^4.0.18"
}
}
Loading
Loading