Skip to content

Commit

Permalink
Export types needed for transaction plugins and improve bcs.option ty…
Browse files Browse the repository at this point in the history
…pes (#18015)

## Description 

Describe the changes or additions included in this PR.

## Test plan 

How did you test the new or updated feature?

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
  • Loading branch information
hayes-mysten authored May 31, 2024
1 parent 7ade075 commit f1e828f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/chatty-singers-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@mysten/sui': patch
---

Export types needed for defining Transaction plugins
5 changes: 5 additions & 0 deletions .changeset/thirty-forks-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@mysten/bcs': patch
---

Remove undefined from bcs.option output types
2 changes: 1 addition & 1 deletion sdk/bcs/src/bcs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ export const bcs = {
return { Some: value };
},
output: (value) => {
if ('Some' in value) {
if (value.$kind === 'Some') {
return value.Some;
}

Expand Down
6 changes: 6 additions & 0 deletions sdk/typescript/src/transactions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,9 @@ export { SerialTransactionExecutor } from './executor/serial.js';
export { ParallelTransactionExecutor } from './executor/parallel.js';
export type { ParallelTransactionExecutorOptions } from './executor/parallel.js';
export { coinWithBalance } from './intents/CoinWithBalance.js';

export type {
BuildTransactionOptions,
SerializeTransactionOptions,
TransactionPlugin,
} from './json-rpc-resolver.js';

0 comments on commit f1e828f

Please sign in to comment.