-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: from base64 * refactor: correct decoder
- Loading branch information
1 parent
7e1ce79
commit 3439498
Showing
6 changed files
with
39 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"gill": minor | ||
--- | ||
|
||
added `transactionFromBase64` function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { getBase64Encoder } from "@solana/codecs"; | ||
import { getTransactionDecoder, type Transaction } from "@solana/transactions"; | ||
import type { transactionToBase64, transactionToBase64WithSigners } from "./base64-to-transaction"; | ||
|
||
/** | ||
* Convert a base64 encoded transaction string into compiled transaction | ||
* | ||
* Use {@link transactionToBase64} or {@link transactionToBase64WithSigners} to create the base64 encoded transaction string | ||
*/ | ||
export function transactionFromBase64(base64EncodedTransaction: string): Transaction { | ||
return getTransactionDecoder().decode(getBase64Encoder().encode(base64EncodedTransaction)); | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters