Skip to content

Commit 6494412

Browse files
committed
chore: remove convenience wrappers to match wasm-sol/wasm-dot patterns
Remove `transactionFromBytes()` and `parseTransactionBytes()` which are thin wrappers that don't exist in wasm-solana or wasm-dot. Consumers should use `Transaction.fromBytes()` and `parseTransaction(tx)` directly.
1 parent 44c7b70 commit 6494412

3 files changed

Lines changed: 1 addition & 18 deletions

File tree

packages/wasm-ton/js/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export * as builder from "./builder.js";
1111

1212
// Top-level function exports
1313
export { encodeAddress, encode, decode, validate } from "./address.js";
14-
export { Transaction, transactionFromBytes } from "./transaction.js";
14+
export { Transaction } from "./transaction.js";
1515
export { parseTransaction } from "./parser.js";
1616
export { buildTransaction } from "./builder.js";
1717

packages/wasm-ton/js/parser.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,3 @@ export interface ParsedTransaction {
4949
export function parseTransaction(tx: Transaction): ParsedTransaction {
5050
return ParserNamespace.parseFromTransaction(tx.wasm) as ParsedTransaction;
5151
}
52-
53-
/**
54-
* Parse raw BOC bytes into structured data.
55-
*
56-
* @param bytes - Raw BOC bytes
57-
* @returns A ParsedTransaction
58-
*/
59-
export function parseTransactionBytes(bytes: Uint8Array): ParsedTransaction {
60-
return ParserNamespace.parseTransaction(bytes) as ParsedTransaction;
61-
}

packages/wasm-ton/js/transaction.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,3 @@ export class Transaction {
7777
return this._wasm;
7878
}
7979
}
80-
81-
/**
82-
* Convenience function to create a Transaction from bytes.
83-
*/
84-
export function transactionFromBytes(bytes: Uint8Array): Transaction {
85-
return Transaction.fromBytes(bytes);
86-
}

0 commit comments

Comments
 (0)