@mysten/graphql-transport
Advanced tools
Comparing version 0.0.0-experimental-20241010194048 to 0.0.0-experimental-20241011191900
# @mysten/graphql-transport | ||
## 0.0.0-experimental-20241010194048 | ||
## 0.0.0-experimental-20241011191900 | ||
@@ -5,0 +5,0 @@ ### Patch Changes |
@@ -5,4 +5,4 @@ import { bcs } from '@mysten/sui/bcs'; | ||
export declare function mapGraphQLTransactionBlockToRpcTransactionBlock(transactionBlock: Rpc_Transaction_FieldsFragment, options?: SuiTransactionBlockResponseOptions | null, errors?: string[] | null): SuiTransactionBlockResponse; | ||
export declare function mapTransactionBlockToInput(data: typeof bcs.SenderSignedTransaction.$inferType): SuiTransactionBlock | null; | ||
export declare function mapTransactionBlockToInput(data: typeof bcs.TransactionData.$inferType, signatures: any[] | null | undefined): SuiTransactionBlock | null; | ||
export declare function mapProgramableTransaction(programableTransaction: typeof bcs.ProgrammableTransaction.$inferType): SuiTransactionBlockKind; | ||
export declare function mapEffects(data: string): SuiTransactionBlockResponse['effects']; |
@@ -69,3 +69,4 @@ "use strict"; | ||
transaction: transactionBlock.rawTransaction && mapTransactionBlockToInput( | ||
import_bcs2.bcs.SenderSignedData.parse((0, import_bcs.fromBase64)(transactionBlock.rawTransaction))[0] | ||
import_bcs2.bcs.TransactionData.parse((0, import_bcs.fromBase64)(transactionBlock.rawTransaction)), | ||
transactionBlock.signatures | ||
) | ||
@@ -151,4 +152,6 @@ } : {}, | ||
} | ||
function mapTransactionBlockToInput(data) { | ||
const txData = data.intentMessage.value.V1; | ||
function mapTransactionBlockToInput(data, signatures) { | ||
const txData = data.V1; | ||
console.log("Signatures:", signatures); | ||
const sigs = (signatures ?? []).filter((sig) => typeof sig === "string"); | ||
const programableTransaction = "ProgrammableTransaction" in txData.kind ? txData.kind.ProgrammableTransaction : null; | ||
@@ -159,3 +162,3 @@ if (!programableTransaction) { | ||
return { | ||
txSignatures: data.txSignatures, | ||
txSignatures: sigs, | ||
data: { | ||
@@ -162,0 +165,0 @@ gasData: { |
@@ -5,4 +5,4 @@ import { bcs } from '@mysten/sui/bcs'; | ||
export declare function mapGraphQLTransactionBlockToRpcTransactionBlock(transactionBlock: Rpc_Transaction_FieldsFragment, options?: SuiTransactionBlockResponseOptions | null, errors?: string[] | null): SuiTransactionBlockResponse; | ||
export declare function mapTransactionBlockToInput(data: typeof bcs.SenderSignedTransaction.$inferType): SuiTransactionBlock | null; | ||
export declare function mapTransactionBlockToInput(data: typeof bcs.TransactionData.$inferType, signatures: any[] | null | undefined): SuiTransactionBlock | null; | ||
export declare function mapProgramableTransaction(programableTransaction: typeof bcs.ProgrammableTransaction.$inferType): SuiTransactionBlockKind; | ||
export declare function mapEffects(data: string): SuiTransactionBlockResponse['effects']; |
@@ -43,3 +43,4 @@ import { fromBase64, toBase58 } from "@mysten/bcs"; | ||
transaction: transactionBlock.rawTransaction && mapTransactionBlockToInput( | ||
bcs.SenderSignedData.parse(fromBase64(transactionBlock.rawTransaction))[0] | ||
bcs.TransactionData.parse(fromBase64(transactionBlock.rawTransaction)), | ||
transactionBlock.signatures | ||
) | ||
@@ -125,4 +126,6 @@ } : {}, | ||
} | ||
function mapTransactionBlockToInput(data) { | ||
const txData = data.intentMessage.value.V1; | ||
function mapTransactionBlockToInput(data, signatures) { | ||
const txData = data.V1; | ||
console.log("Signatures:", signatures); | ||
const sigs = (signatures ?? []).filter((sig) => typeof sig === "string"); | ||
const programableTransaction = "ProgrammableTransaction" in txData.kind ? txData.kind.ProgrammableTransaction : null; | ||
@@ -133,3 +136,3 @@ if (!programableTransaction) { | ||
return { | ||
txSignatures: data.txSignatures, | ||
txSignatures: sigs, | ||
data: { | ||
@@ -136,0 +139,0 @@ gasData: { |
{ | ||
"name": "@mysten/graphql-transport", | ||
"version": "0.0.0-experimental-20241010194048", | ||
"version": "0.0.0-experimental-20241011191900", | ||
"description": "A GraphQL transport to allow SuiClient to work with RPC 2.0", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2219735
28127