@solana/rpc-graphql 2.0.0-experimental.4c9a8b8 → 2.0.0-experimental.4f33613
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.browser.cjs +23 -29
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.js +23 -29
- package/dist/index.browser.js.map +1 -1
- package/dist/index.native.js +23 -29
- package/dist/index.native.js.map +1 -1
- package/dist/index.node.cjs +23 -29
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.js +23 -29
- package/dist/index.node.js.map +1 -1
- package/dist/types/loaders/transaction.d.ts.map +1 -1
- package/dist/types/rpc.d.ts +1 -1
- package/dist/types/rpc.d.ts.map +1 -1
- package/dist/types/schema/block.d.ts +1 -1
- package/dist/types/schema/block.d.ts.map +1 -1
- package/dist/types/schema/transaction.d.ts +1 -1
- package/package.json +8 -8
package/dist/index.browser.js
CHANGED
|
@@ -271,28 +271,22 @@ function normalizeArgs4({ commitment = "confirmed", encoding = "jsonParsed", sig
|
|
|
271
271
|
}
|
|
272
272
|
async function loadTransaction(rpc, { signature, ...config }) {
|
|
273
273
|
const { encoding } = config;
|
|
274
|
-
const transaction = await
|
|
275
|
-
|
|
276
|
-
// @ts-expect-error FIXME: https://github.com/solana-labs/solana-web3.js/issues/1984
|
|
277
|
-
config
|
|
278
|
-
).send().catch((e) => {
|
|
279
|
-
throw e;
|
|
280
|
-
});
|
|
281
|
-
if (transaction === null) {
|
|
282
|
-
return null;
|
|
283
|
-
}
|
|
284
|
-
if (encoding !== "jsonParsed") {
|
|
285
|
-
const jsonParsedConfig = { ...config, encoding: "jsonParsed" };
|
|
286
|
-
const transactionJsonParsed = await rpc.getTransaction(
|
|
274
|
+
const [transaction, transactionJsonParsed] = await Promise.all([
|
|
275
|
+
rpc.getTransaction(
|
|
287
276
|
signature,
|
|
288
277
|
// @ts-expect-error FIXME: https://github.com/solana-labs/solana-web3.js/issues/1984
|
|
289
|
-
|
|
290
|
-
).send()
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
}
|
|
278
|
+
config
|
|
279
|
+
).send(),
|
|
280
|
+
(async () => {
|
|
281
|
+
if (encoding !== "jsonParsed") {
|
|
282
|
+
return await rpc.getTransaction(signature, { ...config, encoding: "jsonParsed" }).send();
|
|
283
|
+
}
|
|
284
|
+
})()
|
|
285
|
+
]);
|
|
286
|
+
if (!transaction) {
|
|
287
|
+
return null;
|
|
288
|
+
}
|
|
289
|
+
if (transactionJsonParsed) {
|
|
296
290
|
transaction.meta = transactionJsonParsed.meta;
|
|
297
291
|
}
|
|
298
292
|
return transformLoadedTransaction({ encoding, transaction });
|
|
@@ -651,7 +645,7 @@ var blockTypeDefs = (
|
|
|
651
645
|
interface Block {
|
|
652
646
|
blockhash: String
|
|
653
647
|
blockHeight: BigInt
|
|
654
|
-
blockTime:
|
|
648
|
+
blockTime: BigInt
|
|
655
649
|
parentSlot: BigInt
|
|
656
650
|
previousBlockhash: String
|
|
657
651
|
rewards: [Reward]
|
|
@@ -664,7 +658,7 @@ var blockTypeDefs = (
|
|
|
664
658
|
type BlockWithAccounts implements Block {
|
|
665
659
|
blockhash: String
|
|
666
660
|
blockHeight: BigInt
|
|
667
|
-
blockTime:
|
|
661
|
+
blockTime: BigInt
|
|
668
662
|
parentSlot: BigInt
|
|
669
663
|
previousBlockhash: String
|
|
670
664
|
rewards: [Reward]
|
|
@@ -678,7 +672,7 @@ var blockTypeDefs = (
|
|
|
678
672
|
type BlockWithFull implements Block {
|
|
679
673
|
blockhash: String
|
|
680
674
|
blockHeight: BigInt
|
|
681
|
-
blockTime:
|
|
675
|
+
blockTime: BigInt
|
|
682
676
|
parentSlot: BigInt
|
|
683
677
|
previousBlockhash: String
|
|
684
678
|
rewards: [Reward]
|
|
@@ -692,7 +686,7 @@ var blockTypeDefs = (
|
|
|
692
686
|
type BlockWithNone implements Block {
|
|
693
687
|
blockhash: String
|
|
694
688
|
blockHeight: BigInt
|
|
695
|
-
blockTime:
|
|
689
|
+
blockTime: BigInt
|
|
696
690
|
parentSlot: BigInt
|
|
697
691
|
previousBlockhash: String
|
|
698
692
|
rewards: [Reward]
|
|
@@ -705,7 +699,7 @@ var blockTypeDefs = (
|
|
|
705
699
|
type BlockWithSignatures implements Block {
|
|
706
700
|
blockhash: String
|
|
707
701
|
blockHeight: BigInt
|
|
708
|
-
blockTime:
|
|
702
|
+
blockTime: BigInt
|
|
709
703
|
parentSlot: BigInt
|
|
710
704
|
previousBlockhash: String
|
|
711
705
|
rewards: [Reward]
|
|
@@ -2712,7 +2706,7 @@ var transactionTypeDefs = (
|
|
|
2712
2706
|
Transaction interface
|
|
2713
2707
|
"""
|
|
2714
2708
|
interface Transaction {
|
|
2715
|
-
blockTime:
|
|
2709
|
+
blockTime: BigInt
|
|
2716
2710
|
meta: TransactionMeta
|
|
2717
2711
|
slot: BigInt
|
|
2718
2712
|
version: String
|
|
@@ -2722,7 +2716,7 @@ var transactionTypeDefs = (
|
|
|
2722
2716
|
A transaction with base58 encoded data
|
|
2723
2717
|
"""
|
|
2724
2718
|
type TransactionBase58 implements Transaction {
|
|
2725
|
-
blockTime:
|
|
2719
|
+
blockTime: BigInt
|
|
2726
2720
|
data: Base58EncodedBytes
|
|
2727
2721
|
meta: TransactionMeta
|
|
2728
2722
|
slot: BigInt
|
|
@@ -2733,7 +2727,7 @@ var transactionTypeDefs = (
|
|
|
2733
2727
|
A transaction with base64 encoded data
|
|
2734
2728
|
"""
|
|
2735
2729
|
type TransactionBase64 implements Transaction {
|
|
2736
|
-
blockTime:
|
|
2730
|
+
blockTime: BigInt
|
|
2737
2731
|
data: Base64EncodedBytes
|
|
2738
2732
|
meta: TransactionMeta
|
|
2739
2733
|
slot: BigInt
|
|
@@ -2748,7 +2742,7 @@ var transactionTypeDefs = (
|
|
|
2748
2742
|
signatures: [String]
|
|
2749
2743
|
}
|
|
2750
2744
|
type TransactionParsed implements Transaction {
|
|
2751
|
-
blockTime:
|
|
2745
|
+
blockTime: BigInt
|
|
2752
2746
|
data: TransactionDataParsed
|
|
2753
2747
|
meta: TransactionMeta
|
|
2754
2748
|
slot: BigInt
|