Skip to content

Commit dd79592

Browse files
authored
Merge pull request #144 from BitGo/refactor/cleanup-builder-keep-versioned
refactor: remove instruction-level builder, keep buildFromVersionedData
2 parents e0cd599 + 5e2d4b8 commit dd79592

13 files changed

Lines changed: 580 additions & 3674 deletions

File tree

packages/wasm-solana/js/builder.ts

Lines changed: 14 additions & 497 deletions
Large diffs are not rendered by default.

packages/wasm-solana/js/index.ts

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ export type { AddressLookupTableData } from "./versioned.js";
2121

2222
// Top-level function exports
2323
export { parseTransaction } from "./parser.js";
24-
export { buildTransaction, buildFromVersionedData } from "./builder.js";
25-
export { buildFromIntent } from "./intentBuilder.js";
24+
export { buildFromVersionedData } from "./builder.js";
25+
export { buildFromIntent, buildFromIntent as buildTransactionFromIntent } from "./intentBuilder.js";
2626

2727
// Intent builder type exports
2828
export type {
@@ -94,43 +94,9 @@ export type {
9494
UnknownInstructionParams,
9595
} from "./parser.js";
9696

97-
// Builder type exports (prefixed to avoid conflict with parser/transaction types)
97+
// Versioned transaction builder type exports
9898
export type {
99-
TransactionIntent,
100-
NonceSource as BuilderNonceSource,
101-
BlockhashNonceSource,
102-
DurableNonceSource,
10399
AddressLookupTable as BuilderAddressLookupTable,
104-
Instruction as BuilderInstruction,
105-
TransferInstruction,
106-
CreateAccountInstruction,
107-
NonceAdvanceInstruction,
108-
NonceInitializeInstruction,
109-
AllocateInstruction,
110-
AssignInstruction,
111-
MemoInstruction,
112-
ComputeBudgetInstruction,
113-
// Stake Program
114-
StakeInitializeInstruction,
115-
StakeDelegateInstruction,
116-
StakeDeactivateInstruction,
117-
StakeWithdrawInstruction,
118-
StakeAuthorizeInstruction,
119-
StakeSplitInstruction,
120-
// SPL Token
121-
TokenTransferInstruction,
122-
CreateAssociatedTokenAccountInstruction,
123-
CloseAssociatedTokenAccountInstruction,
124-
MintToInstruction,
125-
BurnInstruction,
126-
ApproveInstruction,
127-
// Jito Stake Pool
128-
StakePoolDepositSolInstruction,
129-
StakePoolWithdrawStakeInstruction,
130-
// Custom Instruction
131-
CustomInstruction as BuilderCustomInstruction,
132-
CustomAccountMeta,
133-
// Raw Versioned Transaction Data (for fromVersionedTransactionData path)
134100
RawVersionedTransactionData,
135101
VersionedInstruction as BuilderVersionedInstruction,
136102
MessageHeader,

0 commit comments

Comments
 (0)