@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.cjs
CHANGED
|
@@ -278,28 +278,22 @@ function normalizeArgs4({ commitment = "confirmed", encoding = "jsonParsed", sig
|
|
|
278
278
|
}
|
|
279
279
|
async function loadTransaction(rpc, { signature, ...config }) {
|
|
280
280
|
const { encoding } = config;
|
|
281
|
-
const transaction = await
|
|
282
|
-
|
|
283
|
-
// @ts-expect-error FIXME: https://github.com/solana-labs/solana-web3.js/issues/1984
|
|
284
|
-
config
|
|
285
|
-
).send().catch((e) => {
|
|
286
|
-
throw e;
|
|
287
|
-
});
|
|
288
|
-
if (transaction === null) {
|
|
289
|
-
return null;
|
|
290
|
-
}
|
|
291
|
-
if (encoding !== "jsonParsed") {
|
|
292
|
-
const jsonParsedConfig = { ...config, encoding: "jsonParsed" };
|
|
293
|
-
const transactionJsonParsed = await rpc.getTransaction(
|
|
281
|
+
const [transaction, transactionJsonParsed] = await Promise.all([
|
|
282
|
+
rpc.getTransaction(
|
|
294
283
|
signature,
|
|
295
284
|
// @ts-expect-error FIXME: https://github.com/solana-labs/solana-web3.js/issues/1984
|
|
296
|
-
|
|
297
|
-
).send()
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
}
|
|
285
|
+
config
|
|
286
|
+
).send(),
|
|
287
|
+
(async () => {
|
|
288
|
+
if (encoding !== "jsonParsed") {
|
|
289
|
+
return await rpc.getTransaction(signature, { ...config, encoding: "jsonParsed" }).send();
|
|
290
|
+
}
|
|
291
|
+
})()
|
|
292
|
+
]);
|
|
293
|
+
if (!transaction) {
|
|
294
|
+
return null;
|
|
295
|
+
}
|
|
296
|
+
if (transactionJsonParsed) {
|
|
303
297
|
transaction.meta = transactionJsonParsed.meta;
|
|
304
298
|
}
|
|
305
299
|
return transformLoadedTransaction({ encoding, transaction });
|
|
@@ -658,7 +652,7 @@ var blockTypeDefs = (
|
|
|
658
652
|
interface Block {
|
|
659
653
|
blockhash: String
|
|
660
654
|
blockHeight: BigInt
|
|
661
|
-
blockTime:
|
|
655
|
+
blockTime: BigInt
|
|
662
656
|
parentSlot: BigInt
|
|
663
657
|
previousBlockhash: String
|
|
664
658
|
rewards: [Reward]
|
|
@@ -671,7 +665,7 @@ var blockTypeDefs = (
|
|
|
671
665
|
type BlockWithAccounts implements Block {
|
|
672
666
|
blockhash: String
|
|
673
667
|
blockHeight: BigInt
|
|
674
|
-
blockTime:
|
|
668
|
+
blockTime: BigInt
|
|
675
669
|
parentSlot: BigInt
|
|
676
670
|
previousBlockhash: String
|
|
677
671
|
rewards: [Reward]
|
|
@@ -685,7 +679,7 @@ var blockTypeDefs = (
|
|
|
685
679
|
type BlockWithFull implements Block {
|
|
686
680
|
blockhash: String
|
|
687
681
|
blockHeight: BigInt
|
|
688
|
-
blockTime:
|
|
682
|
+
blockTime: BigInt
|
|
689
683
|
parentSlot: BigInt
|
|
690
684
|
previousBlockhash: String
|
|
691
685
|
rewards: [Reward]
|
|
@@ -699,7 +693,7 @@ var blockTypeDefs = (
|
|
|
699
693
|
type BlockWithNone implements Block {
|
|
700
694
|
blockhash: String
|
|
701
695
|
blockHeight: BigInt
|
|
702
|
-
blockTime:
|
|
696
|
+
blockTime: BigInt
|
|
703
697
|
parentSlot: BigInt
|
|
704
698
|
previousBlockhash: String
|
|
705
699
|
rewards: [Reward]
|
|
@@ -712,7 +706,7 @@ var blockTypeDefs = (
|
|
|
712
706
|
type BlockWithSignatures implements Block {
|
|
713
707
|
blockhash: String
|
|
714
708
|
blockHeight: BigInt
|
|
715
|
-
blockTime:
|
|
709
|
+
blockTime: BigInt
|
|
716
710
|
parentSlot: BigInt
|
|
717
711
|
previousBlockhash: String
|
|
718
712
|
rewards: [Reward]
|
|
@@ -2719,7 +2713,7 @@ var transactionTypeDefs = (
|
|
|
2719
2713
|
Transaction interface
|
|
2720
2714
|
"""
|
|
2721
2715
|
interface Transaction {
|
|
2722
|
-
blockTime:
|
|
2716
|
+
blockTime: BigInt
|
|
2723
2717
|
meta: TransactionMeta
|
|
2724
2718
|
slot: BigInt
|
|
2725
2719
|
version: String
|
|
@@ -2729,7 +2723,7 @@ var transactionTypeDefs = (
|
|
|
2729
2723
|
A transaction with base58 encoded data
|
|
2730
2724
|
"""
|
|
2731
2725
|
type TransactionBase58 implements Transaction {
|
|
2732
|
-
blockTime:
|
|
2726
|
+
blockTime: BigInt
|
|
2733
2727
|
data: Base58EncodedBytes
|
|
2734
2728
|
meta: TransactionMeta
|
|
2735
2729
|
slot: BigInt
|
|
@@ -2740,7 +2734,7 @@ var transactionTypeDefs = (
|
|
|
2740
2734
|
A transaction with base64 encoded data
|
|
2741
2735
|
"""
|
|
2742
2736
|
type TransactionBase64 implements Transaction {
|
|
2743
|
-
blockTime:
|
|
2737
|
+
blockTime: BigInt
|
|
2744
2738
|
data: Base64EncodedBytes
|
|
2745
2739
|
meta: TransactionMeta
|
|
2746
2740
|
slot: BigInt
|
|
@@ -2755,7 +2749,7 @@ var transactionTypeDefs = (
|
|
|
2755
2749
|
signatures: [String]
|
|
2756
2750
|
}
|
|
2757
2751
|
type TransactionParsed implements Transaction {
|
|
2758
|
-
blockTime:
|
|
2752
|
+
blockTime: BigInt
|
|
2759
2753
|
data: TransactionDataParsed
|
|
2760
2754
|
meta: TransactionMeta
|
|
2761
2755
|
slot: BigInt
|