@solana/web3.js 2.0.0-experimental.e8095b1 → 2.0.0-experimental.e9c1b10
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/README.md +1153 -43
- package/dist/index.browser.cjs +186 -44
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.js +148 -45
- package/dist/index.browser.js.map +1 -1
- package/dist/index.development.js +3579 -2192
- package/dist/index.development.js.map +1 -1
- package/dist/index.native.js +148 -45
- package/dist/index.native.js.map +1 -1
- package/dist/index.node.cjs +188 -44
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.js +148 -45
- package/dist/index.node.js.map +1 -1
- package/dist/index.production.min.js +270 -59
- package/dist/types/airdrop-confirmer.d.ts +6 -7
- package/dist/types/airdrop-confirmer.d.ts.map +1 -1
- package/dist/types/airdrop.d.ts +10 -12
- package/dist/types/airdrop.d.ts.map +1 -1
- package/dist/types/decode-transaction.d.ts +10 -0
- package/dist/types/decode-transaction.d.ts.map +1 -0
- package/dist/types/index.d.ts +17 -9
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/rpc-default-config.d.ts.map +1 -1
- package/dist/types/rpc-integer-overflow-error.d.ts +3 -2
- package/dist/types/rpc-integer-overflow-error.d.ts.map +1 -1
- package/dist/types/rpc-request-coalescer.d.ts +1 -1
- package/dist/types/rpc-request-coalescer.d.ts.map +1 -1
- package/dist/types/rpc-subscription-coalescer.d.ts +1 -1
- package/dist/types/rpc-subscription-coalescer.d.ts.map +1 -1
- package/dist/types/rpc-transport.d.ts +1 -2
- package/dist/types/rpc-transport.d.ts.map +1 -1
- package/dist/types/rpc-websocket-autopinger.d.ts +1 -1
- package/dist/types/rpc-websocket-autopinger.d.ts.map +1 -1
- package/dist/types/rpc-websocket-connection-sharding.d.ts +1 -1
- package/dist/types/rpc-websocket-connection-sharding.d.ts.map +1 -1
- package/dist/types/rpc-websocket-transport.d.ts +1 -2
- package/dist/types/rpc-websocket-transport.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/send-transaction.d.ts +31 -38
- package/dist/types/send-transaction.d.ts.map +1 -1
- package/dist/types/transaction-confirmation-strategy-blockheight.d.ts +9 -5
- package/dist/types/transaction-confirmation-strategy-blockheight.d.ts.map +1 -1
- package/dist/types/transaction-confirmation-strategy-nonce.d.ts +4 -6
- package/dist/types/transaction-confirmation-strategy-nonce.d.ts.map +1 -1
- package/dist/types/transaction-confirmation-strategy-racer.d.ts +9 -5
- package/dist/types/transaction-confirmation-strategy-racer.d.ts.map +1 -1
- package/dist/types/transaction-confirmation-strategy-recent-signature.d.ts +4 -6
- package/dist/types/transaction-confirmation-strategy-recent-signature.d.ts.map +1 -1
- package/dist/types/transaction-confirmation-strategy-timeout.d.ts +1 -1
- package/dist/types/transaction-confirmation-strategy-timeout.d.ts.map +1 -1
- package/dist/types/transaction-confirmation.d.ts +6 -11
- package/dist/types/transaction-confirmation.d.ts.map +1 -1
- package/package.json +24 -18
package/dist/index.browser.cjs
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var accounts = require('@solana/accounts');
|
|
3
4
|
var addresses = require('@solana/addresses');
|
|
5
|
+
var codecs = require('@solana/codecs');
|
|
6
|
+
var functional = require('@solana/functional');
|
|
4
7
|
var instructions = require('@solana/instructions');
|
|
5
8
|
var keys = require('@solana/keys');
|
|
9
|
+
var programs = require('@solana/programs');
|
|
10
|
+
var rpcParsedTypes = require('@solana/rpc-parsed-types');
|
|
11
|
+
var rpcTypes = require('@solana/rpc-types');
|
|
12
|
+
var signers = require('@solana/signers');
|
|
6
13
|
var transactions = require('@solana/transactions');
|
|
7
14
|
var rpcCore = require('@solana/rpc-core');
|
|
8
|
-
var functional = require('@solana/functional');
|
|
9
15
|
var rpcTransport = require('@solana/rpc-transport');
|
|
10
16
|
var fastStableStringify = require('fast-stable-stringify');
|
|
11
|
-
var umiSerializers = require('@metaplex-foundation/umi-serializers');
|
|
12
17
|
|
|
13
18
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
19
|
|
|
@@ -20,12 +25,14 @@ var __DEV__ = /* @__PURE__ */ (() => process["env"].NODE_ENV === "development")(
|
|
|
20
25
|
// src/transaction-confirmation-strategy-racer.ts
|
|
21
26
|
async function raceStrategies(signature, config, getSpecificStrategiesForRace) {
|
|
22
27
|
const { abortSignal: callerAbortSignal, commitment, getRecentSignatureConfirmationPromise } = config;
|
|
23
|
-
callerAbortSignal
|
|
28
|
+
callerAbortSignal?.throwIfAborted();
|
|
24
29
|
const abortController = new AbortController();
|
|
25
|
-
|
|
26
|
-
|
|
30
|
+
if (callerAbortSignal) {
|
|
31
|
+
const handleAbort = () => {
|
|
32
|
+
abortController.abort();
|
|
33
|
+
};
|
|
34
|
+
callerAbortSignal.addEventListener("abort", handleAbort, { signal: abortController.signal });
|
|
27
35
|
}
|
|
28
|
-
callerAbortSignal.addEventListener("abort", handleAbort, { signal: abortController.signal });
|
|
29
36
|
try {
|
|
30
37
|
const specificStrategies = getSpecificStrategiesForRace({
|
|
31
38
|
...config,
|
|
@@ -69,7 +76,7 @@ function createRecentSignatureConfirmationPromiseFactory(rpc, rpcSubscriptions)
|
|
|
69
76
|
const signatureStatusLookupPromise = (async () => {
|
|
70
77
|
const { value: signatureStatusResults } = await rpc.getSignatureStatuses([signature]).send({ abortSignal: abortController.signal });
|
|
71
78
|
const signatureStatus = signatureStatusResults[0];
|
|
72
|
-
if (signatureStatus && signatureStatus.confirmationStatus &&
|
|
79
|
+
if (signatureStatus && signatureStatus.confirmationStatus && rpcTypes.commitmentComparator(signatureStatus.confirmationStatus, commitment) >= 0) {
|
|
73
80
|
return;
|
|
74
81
|
} else {
|
|
75
82
|
await new Promise(() => {
|
|
@@ -169,26 +176,63 @@ async function requestAndConfirmAirdrop({
|
|
|
169
176
|
});
|
|
170
177
|
return airdropTransactionSignature;
|
|
171
178
|
}
|
|
179
|
+
var compiledTransactionDecoder = void 0;
|
|
180
|
+
async function fetchLookupTables(lookupTableAddresses, rpc, config) {
|
|
181
|
+
const fetchedLookupTables = await accounts.fetchJsonParsedAccounts(
|
|
182
|
+
rpc,
|
|
183
|
+
lookupTableAddresses,
|
|
184
|
+
config
|
|
185
|
+
);
|
|
186
|
+
accounts.assertAccountsDecoded(fetchedLookupTables);
|
|
187
|
+
accounts.assertAccountsExist(fetchedLookupTables);
|
|
188
|
+
return fetchedLookupTables.reduce((acc, lookup) => {
|
|
189
|
+
return {
|
|
190
|
+
...acc,
|
|
191
|
+
[lookup.address]: lookup.data.addresses
|
|
192
|
+
};
|
|
193
|
+
}, {});
|
|
194
|
+
}
|
|
195
|
+
async function decodeTransaction(encodedTransaction, rpc, config) {
|
|
196
|
+
const { lastValidBlockHeight, ...fetchAccountsConfig } = config ?? {};
|
|
197
|
+
if (!compiledTransactionDecoder)
|
|
198
|
+
compiledTransactionDecoder = transactions.getCompiledTransactionDecoder();
|
|
199
|
+
const compiledTransaction = compiledTransactionDecoder.decode(encodedTransaction);
|
|
200
|
+
const { compiledMessage } = compiledTransaction;
|
|
201
|
+
const lookupTables = "addressTableLookups" in compiledMessage && compiledMessage.addressTableLookups !== void 0 && compiledMessage.addressTableLookups.length > 0 ? compiledMessage.addressTableLookups : [];
|
|
202
|
+
const lookupTableAddresses = lookupTables.map((l) => l.lookupTableAddress);
|
|
203
|
+
const fetchedLookupTables = lookupTableAddresses.length > 0 ? await fetchLookupTables(lookupTableAddresses, rpc, fetchAccountsConfig) : {};
|
|
204
|
+
return transactions.decompileTransaction(compiledTransaction, {
|
|
205
|
+
addressesByLookupTableAddress: fetchedLookupTables,
|
|
206
|
+
lastValidBlockHeight
|
|
207
|
+
});
|
|
208
|
+
}
|
|
172
209
|
|
|
173
210
|
// src/rpc-integer-overflow-error.ts
|
|
174
211
|
var SolanaJsonRpcIntegerOverflowError = class extends Error {
|
|
212
|
+
methodName;
|
|
213
|
+
keyPath;
|
|
214
|
+
value;
|
|
175
215
|
constructor(methodName, keyPath, value) {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
216
|
+
let argumentLabel = "";
|
|
217
|
+
if (typeof keyPath[0] === "number") {
|
|
218
|
+
const argPosition = keyPath[0] + 1;
|
|
219
|
+
const lastDigit = argPosition % 10;
|
|
220
|
+
const lastTwoDigits = argPosition % 100;
|
|
221
|
+
if (lastDigit == 1 && lastTwoDigits != 11) {
|
|
222
|
+
argumentLabel = argPosition + "st";
|
|
223
|
+
} else if (lastDigit == 2 && lastTwoDigits != 12) {
|
|
224
|
+
argumentLabel = argPosition + "nd";
|
|
225
|
+
} else if (lastDigit == 3 && lastTwoDigits != 13) {
|
|
226
|
+
argumentLabel = argPosition + "rd";
|
|
227
|
+
} else {
|
|
228
|
+
argumentLabel = argPosition + "th";
|
|
229
|
+
}
|
|
186
230
|
} else {
|
|
187
|
-
|
|
231
|
+
argumentLabel = `\`${keyPath[0].toString()}\``;
|
|
188
232
|
}
|
|
189
233
|
const path = keyPath.length > 1 ? keyPath.slice(1).map((pathPart) => typeof pathPart === "number" ? `[${pathPart}]` : pathPart).join(".") : null;
|
|
190
234
|
super(
|
|
191
|
-
`The ${
|
|
235
|
+
`The ${argumentLabel} argument to the \`${methodName}\` RPC method${path ? ` at path \`${path}\`` : ""} was \`${value}\`. This number is unsafe for use with the Solana JSON-RPC because it exceeds \`Number.MAX_SAFE_INTEGER\`.`
|
|
192
236
|
);
|
|
193
237
|
this.keyPath = keyPath;
|
|
194
238
|
this.methodName = methodName;
|
|
@@ -201,6 +245,7 @@ var SolanaJsonRpcIntegerOverflowError = class extends Error {
|
|
|
201
245
|
|
|
202
246
|
// src/rpc-default-config.ts
|
|
203
247
|
var DEFAULT_RPC_CONFIG = {
|
|
248
|
+
defaultCommitment: "confirmed",
|
|
204
249
|
onIntegerOverflow(methodName, keyPath, value) {
|
|
205
250
|
throw new SolanaJsonRpcIntegerOverflowError(methodName, keyPath, value);
|
|
206
251
|
}
|
|
@@ -360,11 +405,11 @@ function getRpcSubscriptionsWithSubscriptionCoalescing({
|
|
|
360
405
|
return {
|
|
361
406
|
...iterable,
|
|
362
407
|
async *[Symbol.asyncIterator]() {
|
|
363
|
-
abortPromise
|
|
408
|
+
abortPromise ||= abortSignal.aborted ? Promise.reject(EXPLICIT_ABORT_TOKEN) : new Promise((_, reject) => {
|
|
364
409
|
abortSignal.addEventListener("abort", () => {
|
|
365
410
|
reject(EXPLICIT_ABORT_TOKEN);
|
|
366
411
|
});
|
|
367
|
-
})
|
|
412
|
+
});
|
|
368
413
|
try {
|
|
369
414
|
const iterator = iterable[Symbol.asyncIterator]();
|
|
370
415
|
while (true) {
|
|
@@ -436,13 +481,23 @@ function getRpcTransportWithRequestCoalescing(transport, getDeduplicationKey) {
|
|
|
436
481
|
}
|
|
437
482
|
if (coalescedRequestsByDeduplicationKey[deduplicationKey] == null) {
|
|
438
483
|
const abortController = new AbortController();
|
|
484
|
+
const responsePromise = (async () => {
|
|
485
|
+
try {
|
|
486
|
+
return await transport({
|
|
487
|
+
...config,
|
|
488
|
+
signal: abortController.signal
|
|
489
|
+
});
|
|
490
|
+
} catch (e) {
|
|
491
|
+
if (e && typeof e === "object" && "name" in e && e.name === "AbortError") {
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
494
|
+
throw e;
|
|
495
|
+
}
|
|
496
|
+
})();
|
|
439
497
|
coalescedRequestsByDeduplicationKey[deduplicationKey] = {
|
|
440
498
|
abortController,
|
|
441
499
|
numConsumers: 0,
|
|
442
|
-
responsePromise
|
|
443
|
-
...config,
|
|
444
|
-
signal: abortController.signal
|
|
445
|
-
})
|
|
500
|
+
responsePromise
|
|
446
501
|
};
|
|
447
502
|
}
|
|
448
503
|
const coalescedRequest = coalescedRequestsByDeduplicationKey[deduplicationKey];
|
|
@@ -607,22 +662,52 @@ function createDefaultRpcSubscriptionsTransport(config) {
|
|
|
607
662
|
}
|
|
608
663
|
|
|
609
664
|
// src/transaction-confirmation-strategy-blockheight.ts
|
|
610
|
-
function createBlockHeightExceedencePromiseFactory(
|
|
611
|
-
|
|
665
|
+
function createBlockHeightExceedencePromiseFactory({
|
|
666
|
+
rpc,
|
|
667
|
+
rpcSubscriptions
|
|
668
|
+
}) {
|
|
669
|
+
return async function getBlockHeightExceedencePromise({
|
|
670
|
+
abortSignal: callerAbortSignal,
|
|
671
|
+
commitment,
|
|
672
|
+
lastValidBlockHeight
|
|
673
|
+
}) {
|
|
612
674
|
const abortController = new AbortController();
|
|
613
|
-
|
|
675
|
+
const handleAbort = () => {
|
|
614
676
|
abortController.abort();
|
|
615
|
-
}
|
|
677
|
+
};
|
|
616
678
|
callerAbortSignal.addEventListener("abort", handleAbort, { signal: abortController.signal });
|
|
617
|
-
|
|
679
|
+
async function getBlockHeightAndDifferenceBetweenSlotHeightAndBlockHeight() {
|
|
680
|
+
const { absoluteSlot, blockHeight } = await rpc.getEpochInfo({ commitment }).send({ abortSignal: abortController.signal });
|
|
681
|
+
return {
|
|
682
|
+
blockHeight,
|
|
683
|
+
differenceBetweenSlotHeightAndBlockHeight: absoluteSlot - blockHeight
|
|
684
|
+
};
|
|
685
|
+
}
|
|
618
686
|
try {
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
687
|
+
const [slotNotifications, { blockHeight, differenceBetweenSlotHeightAndBlockHeight }] = await Promise.all([
|
|
688
|
+
rpcSubscriptions.slotNotifications().subscribe({ abortSignal: abortController.signal }),
|
|
689
|
+
getBlockHeightAndDifferenceBetweenSlotHeightAndBlockHeight()
|
|
690
|
+
]);
|
|
691
|
+
if (blockHeight <= lastValidBlockHeight) {
|
|
692
|
+
let lastKnownDifferenceBetweenSlotHeightAndBlockHeight = differenceBetweenSlotHeightAndBlockHeight;
|
|
693
|
+
for await (const slotNotification of slotNotifications) {
|
|
694
|
+
const { slot } = slotNotification;
|
|
695
|
+
if (slot - lastKnownDifferenceBetweenSlotHeightAndBlockHeight > lastValidBlockHeight) {
|
|
696
|
+
const {
|
|
697
|
+
blockHeight: currentBlockHeight,
|
|
698
|
+
differenceBetweenSlotHeightAndBlockHeight: currentDifferenceBetweenSlotHeightAndBlockHeight
|
|
699
|
+
} = await getBlockHeightAndDifferenceBetweenSlotHeightAndBlockHeight();
|
|
700
|
+
if (currentBlockHeight > lastValidBlockHeight) {
|
|
701
|
+
break;
|
|
702
|
+
} else {
|
|
703
|
+
lastKnownDifferenceBetweenSlotHeightAndBlockHeight = currentDifferenceBetweenSlotHeightAndBlockHeight;
|
|
704
|
+
}
|
|
705
|
+
}
|
|
624
706
|
}
|
|
625
707
|
}
|
|
708
|
+
throw new Error(
|
|
709
|
+
"The network has progressed past the last block for which this transaction could have been committed."
|
|
710
|
+
);
|
|
626
711
|
} finally {
|
|
627
712
|
abortController.abort();
|
|
628
713
|
}
|
|
@@ -644,10 +729,12 @@ function createNonceInvalidationPromiseFactory(rpc, rpcSubscriptions) {
|
|
|
644
729
|
}
|
|
645
730
|
callerAbortSignal.addEventListener("abort", handleAbort, { signal: abortController.signal });
|
|
646
731
|
const accountNotifications = await rpcSubscriptions.accountNotifications(nonceAccountAddress, { commitment, encoding: "base64" }).subscribe({ abortSignal: abortController.signal });
|
|
732
|
+
const base58Decoder = codecs.getBase58Decoder();
|
|
733
|
+
const base64Encoder = codecs.getBase64Encoder();
|
|
647
734
|
function getNonceFromAccountData([base64EncodedBytes]) {
|
|
648
|
-
const data =
|
|
735
|
+
const data = base64Encoder.encode(base64EncodedBytes);
|
|
649
736
|
const nonceValueBytes = data.slice(NONCE_VALUE_OFFSET, NONCE_VALUE_OFFSET + 32);
|
|
650
|
-
return
|
|
737
|
+
return base58Decoder.decode(nonceValueBytes);
|
|
651
738
|
}
|
|
652
739
|
const nonceAccountDidAdvancePromise = (async () => {
|
|
653
740
|
for await (const accountNotification of accountNotifications) {
|
|
@@ -712,7 +799,10 @@ function createDefaultRecentTransactionConfirmer({
|
|
|
712
799
|
rpc,
|
|
713
800
|
rpcSubscriptions
|
|
714
801
|
}) {
|
|
715
|
-
const getBlockHeightExceedencePromise = createBlockHeightExceedencePromiseFactory(
|
|
802
|
+
const getBlockHeightExceedencePromise = createBlockHeightExceedencePromiseFactory({
|
|
803
|
+
rpc,
|
|
804
|
+
rpcSubscriptions
|
|
805
|
+
});
|
|
716
806
|
const getRecentSignatureConfirmationPromise = createRecentSignatureConfirmationPromiseFactory(
|
|
717
807
|
rpc,
|
|
718
808
|
rpcSubscriptions
|
|
@@ -745,10 +835,16 @@ async function waitForRecentTransactionConfirmation(config) {
|
|
|
745
835
|
await raceStrategies(
|
|
746
836
|
transactions.getSignatureFromTransaction(config.transaction),
|
|
747
837
|
config,
|
|
748
|
-
function getSpecificStrategiesForRace({
|
|
838
|
+
function getSpecificStrategiesForRace({
|
|
839
|
+
abortSignal,
|
|
840
|
+
commitment,
|
|
841
|
+
getBlockHeightExceedencePromise,
|
|
842
|
+
transaction
|
|
843
|
+
}) {
|
|
749
844
|
return [
|
|
750
845
|
getBlockHeightExceedencePromise({
|
|
751
846
|
abortSignal,
|
|
847
|
+
commitment,
|
|
752
848
|
lastValidBlockHeight: transaction.lifetimeConstraint.lastValidBlockHeight
|
|
753
849
|
})
|
|
754
850
|
];
|
|
@@ -761,7 +857,7 @@ function getSendTransactionConfigWithAdjustedPreflightCommitment(commitment, con
|
|
|
761
857
|
if (
|
|
762
858
|
// The developer has supplied no value for `preflightCommitment`.
|
|
763
859
|
!config?.preflightCommitment && // The value of `commitment` is lower than the server default of `preflightCommitment`.
|
|
764
|
-
|
|
860
|
+
rpcTypes.commitmentComparator(
|
|
765
861
|
commitment,
|
|
766
862
|
"finalized"
|
|
767
863
|
/* default value of `preflightCommitment` */
|
|
@@ -783,7 +879,7 @@ async function sendTransaction_INTERNAL({
|
|
|
783
879
|
commitment,
|
|
784
880
|
rpc,
|
|
785
881
|
transaction,
|
|
786
|
-
sendTransactionConfig
|
|
882
|
+
...sendTransactionConfig
|
|
787
883
|
}) {
|
|
788
884
|
const base64EncodedWireTransaction = transactions.getBase64EncodedWireTransaction(transaction);
|
|
789
885
|
return await rpc.sendTransaction(base64EncodedWireTransaction, {
|
|
@@ -808,7 +904,10 @@ function createDefaultDurableNonceTransactionSender({
|
|
|
808
904
|
});
|
|
809
905
|
};
|
|
810
906
|
}
|
|
811
|
-
function createDefaultTransactionSender({
|
|
907
|
+
function createDefaultTransactionSender({
|
|
908
|
+
rpc,
|
|
909
|
+
rpcSubscriptions
|
|
910
|
+
}) {
|
|
812
911
|
const confirmRecentTransaction = createDefaultRecentTransactionConfirmer({
|
|
813
912
|
rpc,
|
|
814
913
|
rpcSubscriptions
|
|
@@ -831,10 +930,10 @@ async function sendAndConfirmDurableNonceTransaction({
|
|
|
831
930
|
...sendTransactionConfig
|
|
832
931
|
}) {
|
|
833
932
|
const transactionSignature = await sendTransaction_INTERNAL({
|
|
933
|
+
...sendTransactionConfig,
|
|
834
934
|
abortSignal,
|
|
835
935
|
commitment,
|
|
836
936
|
rpc,
|
|
837
|
-
sendTransactionConfig,
|
|
838
937
|
transaction
|
|
839
938
|
});
|
|
840
939
|
await confirmDurableNonceTransaction({
|
|
@@ -853,10 +952,10 @@ async function sendAndConfirmTransaction({
|
|
|
853
952
|
...sendTransactionConfig
|
|
854
953
|
}) {
|
|
855
954
|
const transactionSignature = await sendTransaction_INTERNAL({
|
|
955
|
+
...sendTransactionConfig,
|
|
856
956
|
abortSignal,
|
|
857
957
|
commitment,
|
|
858
958
|
rpc,
|
|
859
|
-
sendTransactionConfig,
|
|
860
959
|
transaction
|
|
861
960
|
});
|
|
862
961
|
await confirmRecentTransaction({
|
|
@@ -880,17 +979,36 @@ exports.createRecentSignatureConfirmationPromiseFactory = createRecentSignatureC
|
|
|
880
979
|
exports.createSolanaRpc = createSolanaRpc;
|
|
881
980
|
exports.createSolanaRpcSubscriptions = createSolanaRpcSubscriptions;
|
|
882
981
|
exports.createSolanaRpcSubscriptions_UNSTABLE = createSolanaRpcSubscriptions_UNSTABLE;
|
|
982
|
+
exports.decodeTransaction = decodeTransaction;
|
|
883
983
|
exports.requestAndConfirmAirdrop = requestAndConfirmAirdrop;
|
|
884
984
|
exports.sendAndConfirmDurableNonceTransaction = sendAndConfirmDurableNonceTransaction;
|
|
885
985
|
exports.sendAndConfirmTransaction = sendAndConfirmTransaction;
|
|
886
986
|
exports.waitForDurableNonceTransactionConfirmation = waitForDurableNonceTransactionConfirmation;
|
|
887
987
|
exports.waitForRecentTransactionConfirmation = waitForRecentTransactionConfirmation;
|
|
988
|
+
Object.keys(accounts).forEach(function (k) {
|
|
989
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
990
|
+
enumerable: true,
|
|
991
|
+
get: function () { return accounts[k]; }
|
|
992
|
+
});
|
|
993
|
+
});
|
|
888
994
|
Object.keys(addresses).forEach(function (k) {
|
|
889
995
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
890
996
|
enumerable: true,
|
|
891
997
|
get: function () { return addresses[k]; }
|
|
892
998
|
});
|
|
893
999
|
});
|
|
1000
|
+
Object.keys(codecs).forEach(function (k) {
|
|
1001
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
1002
|
+
enumerable: true,
|
|
1003
|
+
get: function () { return codecs[k]; }
|
|
1004
|
+
});
|
|
1005
|
+
});
|
|
1006
|
+
Object.keys(functional).forEach(function (k) {
|
|
1007
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
1008
|
+
enumerable: true,
|
|
1009
|
+
get: function () { return functional[k]; }
|
|
1010
|
+
});
|
|
1011
|
+
});
|
|
894
1012
|
Object.keys(instructions).forEach(function (k) {
|
|
895
1013
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
896
1014
|
enumerable: true,
|
|
@@ -903,6 +1021,30 @@ Object.keys(keys).forEach(function (k) {
|
|
|
903
1021
|
get: function () { return keys[k]; }
|
|
904
1022
|
});
|
|
905
1023
|
});
|
|
1024
|
+
Object.keys(programs).forEach(function (k) {
|
|
1025
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
1026
|
+
enumerable: true,
|
|
1027
|
+
get: function () { return programs[k]; }
|
|
1028
|
+
});
|
|
1029
|
+
});
|
|
1030
|
+
Object.keys(rpcParsedTypes).forEach(function (k) {
|
|
1031
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
1032
|
+
enumerable: true,
|
|
1033
|
+
get: function () { return rpcParsedTypes[k]; }
|
|
1034
|
+
});
|
|
1035
|
+
});
|
|
1036
|
+
Object.keys(rpcTypes).forEach(function (k) {
|
|
1037
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
1038
|
+
enumerable: true,
|
|
1039
|
+
get: function () { return rpcTypes[k]; }
|
|
1040
|
+
});
|
|
1041
|
+
});
|
|
1042
|
+
Object.keys(signers).forEach(function (k) {
|
|
1043
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
1044
|
+
enumerable: true,
|
|
1045
|
+
get: function () { return signers[k]; }
|
|
1046
|
+
});
|
|
1047
|
+
});
|
|
906
1048
|
Object.keys(transactions).forEach(function (k) {
|
|
907
1049
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
908
1050
|
enumerable: true,
|