@oobe-protocol-labs/synapse-client-sdk 1.0.1 → 1.0.2
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/CHANGELOG.md +29 -0
- package/dist/cjs/ai/gateway/x402/facilitator.d.ts +4 -4
- package/dist/cjs/ai/gateway/x402/facilitator.js +4 -4
- package/dist/cjs/core/client.d.ts +72 -9
- package/dist/cjs/core/client.d.ts.map +1 -1
- package/dist/cjs/core/client.js +90 -5
- package/dist/cjs/core/client.js.map +1 -1
- package/dist/cjs/core/transport.d.ts +1 -1
- package/dist/cjs/core/transport.d.ts.map +1 -1
- package/dist/cjs/core/transport.js +5 -5
- package/dist/cjs/core/transport.js.map +1 -1
- package/dist/cjs/core/types.d.ts +23 -4
- package/dist/cjs/core/types.d.ts.map +1 -1
- package/dist/cjs/core/types.js +5 -1
- package/dist/cjs/core/types.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/kit/index.d.ts +94 -0
- package/dist/cjs/kit/index.d.ts.map +1 -0
- package/dist/cjs/kit/index.js +196 -0
- package/dist/cjs/kit/index.js.map +1 -0
- package/dist/docs/assets/highlight.css +7 -0
- package/dist/docs/assets/navigation.js +1 -1
- package/dist/docs/assets/search.js +1 -1
- package/dist/docs/classes/DasClient.html +13 -13
- package/dist/docs/classes/GeyserParser.html +17 -17
- package/dist/docs/classes/GrpcTransport.html +6 -6
- package/dist/docs/classes/HttpTransport.html +4 -4
- package/dist/docs/classes/NetworkError.html +5 -5
- package/dist/docs/classes/RpcMethodNotFoundError.html +4 -4
- package/dist/docs/classes/SolanaError.html +40 -0
- package/dist/docs/classes/SolanaRpc.html +55 -55
- package/dist/docs/classes/SynapseClient.html +37 -16
- package/dist/docs/classes/SynapseError.html +4 -4
- package/dist/docs/classes/TimeoutError.html +4 -4
- package/dist/docs/classes/UpstreamError.html +6 -6
- package/dist/docs/classes/WsClient.html +10 -10
- package/dist/docs/enums/AccountRole.html +40 -0
- package/dist/docs/enums/SynapseNetwork.html +2 -2
- package/dist/docs/enums/SynapseRegion.html +2 -2
- package/dist/docs/functions/Epoch-1.html +1 -1
- package/dist/docs/functions/{Lamports-1.html → Lamports-2.html} +2 -2
- package/dist/docs/functions/Pubkey-1.html +1 -1
- package/dist/docs/functions/Sig.html +1 -1
- package/dist/docs/functions/Slot-1.html +1 -1
- package/dist/docs/functions/UnixTs.html +1 -1
- package/dist/docs/functions/addSignersToTransactionMessage.html +14 -0
- package/dist/docs/functions/address-1.html +15 -0
- package/dist/docs/functions/airdropFactory.html +9 -0
- package/dist/docs/functions/appendTransactionMessageInstruction.html +8 -0
- package/dist/docs/functions/appendTransactionMessageInstructions.html +8 -0
- package/dist/docs/functions/assertAccountDecoded.html +13 -0
- package/dist/docs/functions/assertAccountExists.html +10 -0
- package/dist/docs/functions/assertIsAddress.html +7 -0
- package/dist/docs/functions/assertIsKeyPairSigner.html +6 -0
- package/dist/docs/functions/assertIsKitSignature.html +7 -0
- package/dist/docs/functions/assertIsTransactionSigner.html +7 -0
- package/dist/docs/functions/autoSelectRegion.html +1 -1
- package/dist/docs/functions/base58Encode.html +1 -1
- package/dist/docs/functions/blockhash.html +15 -0
- package/dist/docs/functions/chunk.html +1 -1
- package/dist/docs/functions/commitmentComparator.html +1 -0
- package/dist/docs/functions/compileTransaction.html +14 -0
- package/dist/docs/functions/compileTransactionMessage.html +8 -0
- package/dist/docs/functions/computeBalanceChanges.html +1 -1
- package/dist/docs/functions/computeTokenBalanceChanges.html +1 -1
- package/dist/docs/functions/createAddressWithSeed.html +6 -0
- package/dist/docs/functions/createDefaultRpcSubscriptionsTransport.html +7 -0
- package/dist/docs/functions/createDefaultRpcTransport.html +10 -0
- package/dist/docs/functions/createDefaultSolanaRpcSubscriptionsChannelCreator.html +5 -0
- package/dist/docs/functions/createKeyPairFromBytes.html +12 -0
- package/dist/docs/functions/createKeyPairFromPrivateKeyBytes.html +17 -0
- package/dist/docs/functions/createKeyPairSignerFromBytes.html +6 -0
- package/dist/docs/functions/createKeyPairSignerFromPrivateKeyBytes.html +6 -0
- package/dist/docs/functions/createNoopSigner.html +6 -0
- package/dist/docs/functions/createRpc.html +3 -0
- package/dist/docs/functions/createSignableMessage.html +6 -0
- package/dist/docs/functions/createSignerFromKeyPair.html +12 -0
- package/dist/docs/functions/createSolanaRpc.html +4 -0
- package/dist/docs/functions/createSolanaRpcApi.html +12 -0
- package/dist/docs/functions/createSolanaRpcFromTransport.html +3 -0
- package/dist/docs/functions/createSolanaRpcSubscriptions.html +4 -0
- package/dist/docs/functions/createSolanaRpcSubscriptionsApi.html +1 -0
- package/dist/docs/functions/createSolanaRpcSubscriptionsFromTransport.html +3 -0
- package/dist/docs/functions/createSolanaRpcSubscriptions_UNSTABLE.html +4 -0
- package/dist/docs/functions/createSynapse.html +1 -1
- package/dist/docs/functions/createTransactionMessage.html +6 -0
- package/dist/docs/functions/decodeAccount.html +9 -0
- package/dist/docs/functions/devnet.html +2 -0
- package/dist/docs/functions/fetchEncodedAccount.html +9 -0
- package/dist/docs/functions/fetchEncodedAccounts.html +11 -0
- package/dist/docs/functions/fetchJsonParsedAccount.html +12 -0
- package/dist/docs/functions/fetchJsonParsedAccounts.html +14 -0
- package/dist/docs/functions/fromKitAddress.html +5 -0
- package/dist/docs/functions/generateKeyPair.html +6 -0
- package/dist/docs/functions/generateKeyPairSigner.html +7 -0
- package/dist/docs/functions/getAccountInfo.html +1 -1
- package/dist/docs/functions/getAddressCodec.html +6 -0
- package/dist/docs/functions/getAddressComparator.html +1 -0
- package/dist/docs/functions/getAddressDecoder.html +6 -0
- package/dist/docs/functions/getAddressEncoder.html +5 -0
- package/dist/docs/functions/getAddressFromPublicKey.html +5 -0
- package/dist/docs/functions/getAsset.html +1 -1
- package/dist/docs/functions/getAssetBatch.html +1 -1
- package/dist/docs/functions/getAssetProof.html +1 -1
- package/dist/docs/functions/getAssetProofBatch.html +1 -1
- package/dist/docs/functions/getAssetsByAuthority.html +1 -1
- package/dist/docs/functions/getAssetsByCreator.html +1 -1
- package/dist/docs/functions/getAssetsByGroup.html +1 -1
- package/dist/docs/functions/getAssetsByOwner.html +1 -1
- package/dist/docs/functions/getBalance.html +1 -1
- package/dist/docs/functions/getBase58Codec.html +26 -0
- package/dist/docs/functions/getBase58Decoder.html +10 -0
- package/dist/docs/functions/getBase58Encoder.html +11 -0
- package/dist/docs/functions/getBase64Codec.html +26 -0
- package/dist/docs/functions/getBase64Decoder.html +10 -0
- package/dist/docs/functions/getBase64Encoder.html +11 -0
- package/dist/docs/functions/getBlock.html +1 -1
- package/dist/docs/functions/getBlockCommitment.html +1 -1
- package/dist/docs/functions/getBlockHeight.html +1 -1
- package/dist/docs/functions/getBlockProduction.html +1 -1
- package/dist/docs/functions/getBlockTime.html +1 -1
- package/dist/docs/functions/getBlocks.html +1 -1
- package/dist/docs/functions/getBlocksWithLimit.html +1 -1
- package/dist/docs/functions/getClusterNodes.html +1 -1
- package/dist/docs/functions/getEnvironment.html +1 -1
- package/dist/docs/functions/getEpochInfo.html +1 -1
- package/dist/docs/functions/getEpochSchedule.html +1 -1
- package/dist/docs/functions/getFeeForMessage.html +1 -1
- package/dist/docs/functions/getFirstAvailableBlock.html +1 -1
- package/dist/docs/functions/getGenesisHash.html +1 -1
- package/dist/docs/functions/getHealth.html +1 -1
- package/dist/docs/functions/getHighestSnapshotSlot.html +1 -1
- package/dist/docs/functions/getIdentity.html +1 -1
- package/dist/docs/functions/getInflationGovernor.html +1 -1
- package/dist/docs/functions/getInflationRate.html +1 -1
- package/dist/docs/functions/getInflationReward.html +1 -1
- package/dist/docs/functions/getLargestAccounts.html +1 -1
- package/dist/docs/functions/getLatestBlockhash.html +1 -1
- package/dist/docs/functions/getLeaderSchedule.html +1 -1
- package/dist/docs/functions/getMaxRetransmitSlot.html +1 -1
- package/dist/docs/functions/getMaxShredInsertSlot.html +1 -1
- package/dist/docs/functions/getMinimumBalanceForRentExemption.html +1 -1
- package/dist/docs/functions/getMultipleAccounts.html +1 -1
- package/dist/docs/functions/getProgramAccounts.html +1 -1
- package/dist/docs/functions/getProgramCategory.html +1 -1
- package/dist/docs/functions/getProgramDerivedAddress.html +6 -0
- package/dist/docs/functions/getRecentPerformanceSamples.html +1 -1
- package/dist/docs/functions/getRecentPrioritizationFees.html +1 -1
- package/dist/docs/functions/getSignatureStatuses.html +1 -1
- package/dist/docs/functions/getSignaturesForAddress.html +1 -1
- package/dist/docs/functions/getSignaturesForAsset.html +1 -1
- package/dist/docs/functions/getSlot.html +1 -1
- package/dist/docs/functions/getSlotLeader.html +1 -1
- package/dist/docs/functions/getSlotLeaders.html +1 -1
- package/dist/docs/functions/getStakeActivation.html +1 -1
- package/dist/docs/functions/getStakeMinimumDelegation.html +1 -1
- package/dist/docs/functions/getSupply.html +1 -1
- package/dist/docs/functions/getTokenAccountBalance.html +1 -1
- package/dist/docs/functions/getTokenAccounts.html +1 -1
- package/dist/docs/functions/getTokenAccountsByDelegate.html +1 -1
- package/dist/docs/functions/getTokenAccountsByOwner.html +1 -1
- package/dist/docs/functions/getTokenLargestAccounts.html +1 -1
- package/dist/docs/functions/getTokenSupply.html +1 -1
- package/dist/docs/functions/getTransaction.html +1 -1
- package/dist/docs/functions/getTransactionCount.html +1 -1
- package/dist/docs/functions/getVersion.html +1 -1
- package/dist/docs/functions/getVoteAccounts.html +1 -1
- package/dist/docs/functions/isAddress.html +6 -0
- package/dist/docs/functions/isBlockhashValid.html +1 -1
- package/dist/docs/functions/isBrowser.html +1 -1
- package/dist/docs/functions/isKeyPairSigner.html +6 -0
- package/dist/docs/functions/isKitSignature.html +6 -0
- package/dist/docs/functions/isProgramInCategory.html +1 -1
- package/dist/docs/functions/isServer.html +1 -1
- package/dist/docs/functions/isTransactionSigner.html +7 -0
- package/dist/docs/functions/isValidPubkey.html +1 -1
- package/dist/docs/functions/isValidSignature.html +1 -1
- package/dist/docs/functions/kitSignature.html +6 -0
- package/dist/docs/functions/kitUnixTimestamp.html +6 -0
- package/dist/docs/functions/lamports-1.html +6 -0
- package/dist/docs/functions/lamportsToSol.html +1 -1
- package/dist/docs/functions/listEndpoints.html +1 -1
- package/dist/docs/functions/listNetworks.html +1 -1
- package/dist/docs/functions/listRegions.html +1 -1
- package/dist/docs/functions/mainnet.html +2 -0
- package/dist/docs/functions/minimumLedgerSlot.html +1 -1
- package/dist/docs/functions/parseAccountUpdate.html +1 -1
- package/dist/docs/functions/parseBase58RpcAccount.html +7 -0
- package/dist/docs/functions/parseBase64RpcAccount.html +7 -0
- package/dist/docs/functions/parseBlockMeta.html +1 -1
- package/dist/docs/functions/parseEntry.html +1 -1
- package/dist/docs/functions/parseGeyserUpdate.html +1 -1
- package/dist/docs/functions/parseJsonRpcAccount.html +9 -0
- package/dist/docs/functions/parseSlotUpdate.html +1 -1
- package/dist/docs/functions/parseTimestamp.html +1 -1
- package/dist/docs/functions/parseTransaction.html +1 -1
- package/dist/docs/functions/partiallySignTransaction.html +12 -0
- package/dist/docs/functions/partiallySignTransactionMessageWithSigners.html +22 -0
- package/dist/docs/functions/pipe.html +95 -0
- package/dist/docs/functions/prependTransactionMessageInstruction.html +8 -0
- package/dist/docs/functions/prependTransactionMessageInstructions.html +8 -0
- package/dist/docs/functions/probeLatency.html +1 -1
- package/dist/docs/functions/rawBufferToBase58.html +1 -1
- package/dist/docs/functions/rawBufferToBase64.html +1 -1
- package/dist/docs/functions/rawBufferToBytes.html +1 -1
- package/dist/docs/functions/rawBufferToHex.html +1 -1
- package/dist/docs/functions/requestAirdrop.html +1 -1
- package/dist/docs/functions/resolveEndpoint.html +1 -1
- package/dist/docs/functions/resolveProgram.html +1 -1
- package/dist/docs/functions/resolveProgramBatch.html +1 -1
- package/dist/docs/functions/retry.html +1 -1
- package/dist/docs/functions/searchAssets.html +1 -1
- package/dist/docs/functions/sendAndConfirmDurableNonceTransactionFactory.html +6 -0
- package/dist/docs/functions/sendAndConfirmTransactionFactory.html +6 -0
- package/dist/docs/functions/sendTransaction.html +1 -1
- package/dist/docs/functions/sendTransactionWithoutConfirmingFactory.html +6 -0
- package/dist/docs/functions/setTransactionMessageFeePayer.html +7 -0
- package/dist/docs/functions/setTransactionMessageFeePayerSigner.html +8 -0
- package/dist/docs/functions/setTransactionMessageLifetimeUsingBlockhash.html +7 -0
- package/dist/docs/functions/setTransactionMessageLifetimeUsingDurableNonce.html +9 -0
- package/dist/docs/functions/signAndSendTransactionMessageWithSigners.html +32 -0
- package/dist/docs/functions/signBytes.html +7 -0
- package/dist/docs/functions/signTransaction.html +10 -0
- package/dist/docs/functions/signTransactionMessageWithSigners.html +13 -0
- package/dist/docs/functions/simulateTransaction.html +1 -1
- package/dist/docs/functions/sleep.html +1 -1
- package/dist/docs/functions/solToLamports.html +2 -2
- package/dist/docs/functions/testnet.html +2 -0
- package/dist/docs/functions/toClientConfig.html +1 -1
- package/dist/docs/functions/toKitAddress.html +8 -0
- package/dist/docs/functions/toKitLamports.html +6 -0
- package/dist/docs/functions/toKitSignatureString.html +5 -0
- package/dist/docs/functions/verifySignature.html +8 -0
- package/dist/docs/interfaces/AccountInfo.html +7 -7
- package/dist/docs/interfaces/AccountNotification.html +2 -2
- package/dist/docs/interfaces/AccountSubParams.html +2 -2
- package/dist/docs/interfaces/AssetSignatureInfo.html +2 -2
- package/dist/docs/interfaces/AssetSignaturesPage.html +2 -2
- package/dist/docs/interfaces/BalanceChange.html +6 -6
- package/dist/docs/interfaces/BlockProduction.html +3 -3
- package/dist/docs/interfaces/BlockResult.html +2 -2
- package/dist/docs/interfaces/BlockReward.html +2 -2
- package/dist/docs/interfaces/BlockhashResult.html +2 -2
- package/dist/docs/interfaces/CallOptions.html +6 -6
- package/dist/docs/interfaces/ConfirmedTransaction.html +6 -6
- package/dist/docs/interfaces/ContactInfo.html +2 -2
- package/dist/docs/interfaces/DasAsset.html +2 -2
- package/dist/docs/interfaces/DasAssetProof.html +2 -2
- package/dist/docs/interfaces/DasAuthority.html +2 -2
- package/dist/docs/interfaces/DasCompression.html +2 -2
- package/dist/docs/interfaces/DasContent.html +2 -2
- package/dist/docs/interfaces/DasCreator.html +2 -2
- package/dist/docs/interfaces/DasFile.html +2 -2
- package/dist/docs/interfaces/DasGrouping.html +2 -2
- package/dist/docs/interfaces/DasOpts.html +2 -2
- package/dist/docs/interfaces/DasOwnership.html +2 -2
- package/dist/docs/interfaces/DasPage.html +2 -2
- package/dist/docs/interfaces/DasRoyalty.html +2 -2
- package/dist/docs/interfaces/DasSearchParams.html +2 -2
- package/dist/docs/interfaces/DasSupply.html +2 -2
- package/dist/docs/interfaces/DataSlice.html +3 -3
- package/dist/docs/interfaces/EndpointConnectConfig.html +5 -5
- package/dist/docs/interfaces/EpochInfo.html +7 -7
- package/dist/docs/interfaces/EpochSchedule.html +2 -2
- package/dist/docs/interfaces/GetAccountInfoOpts.html +6 -6
- package/dist/docs/interfaces/GetAssetsByAuthorityParams.html +2 -2
- package/dist/docs/interfaces/GetAssetsByCreatorParams.html +2 -2
- package/dist/docs/interfaces/GetAssetsByGroupParams.html +2 -2
- package/dist/docs/interfaces/GetAssetsByOwnerParams.html +2 -2
- package/dist/docs/interfaces/GetBlockOpts.html +6 -6
- package/dist/docs/interfaces/GetBlockProductionOpts.html +6 -6
- package/dist/docs/interfaces/GetMultipleAccountsOpts.html +6 -6
- package/dist/docs/interfaces/GetProgramAccountsOpts.html +6 -6
- package/dist/docs/interfaces/GetSignatureStatusesOpts.html +6 -6
- package/dist/docs/interfaces/GetSignaturesOpts.html +7 -7
- package/dist/docs/interfaces/GetTokenAccountsParams.html +2 -2
- package/dist/docs/interfaces/GetTransactionOpts.html +6 -6
- package/dist/docs/interfaces/GeyserParserConfig.html +6 -6
- package/dist/docs/interfaces/GeyserParserEvents.html +9 -9
- package/dist/docs/interfaces/GeyserParserStats.html +2 -2
- package/dist/docs/interfaces/GrpcCallOptions.html +2 -2
- package/dist/docs/interfaces/GrpcTransportConfig.html +6 -6
- package/dist/docs/interfaces/InflationGovernor.html +2 -2
- package/dist/docs/interfaces/InflationRate.html +2 -2
- package/dist/docs/interfaces/InflationReward.html +2 -2
- package/dist/docs/interfaces/LatencyProbeResult.html +2 -2
- package/dist/docs/interfaces/LogsNotification.html +2 -2
- package/dist/docs/interfaces/LogsSubParams.html +2 -2
- package/dist/docs/interfaces/PaginationOpts.html +2 -2
- package/dist/docs/interfaces/ParsedAccountUpdate.html +16 -16
- package/dist/docs/interfaces/ParsedBlockMeta.html +2 -2
- package/dist/docs/interfaces/ParsedEntry.html +2 -2
- package/dist/docs/interfaces/ParsedInstruction.html +9 -9
- package/dist/docs/interfaces/ParsedSlotUpdate.html +3 -3
- package/dist/docs/interfaces/ParsedTransaction.html +19 -19
- package/dist/docs/interfaces/PerfSample.html +2 -2
- package/dist/docs/interfaces/ProgramAccount.html +2 -2
- package/dist/docs/interfaces/ProgramNotification.html +2 -2
- package/dist/docs/interfaces/ProgramSubParams.html +2 -2
- package/dist/docs/interfaces/RawAccountInfo.html +2 -2
- package/dist/docs/interfaces/RawBlockMeta.html +2 -2
- package/dist/docs/interfaces/RawBuffer.html +2 -2
- package/dist/docs/interfaces/RawCompiledInstruction.html +2 -2
- package/dist/docs/interfaces/RawEntry.html +2 -2
- package/dist/docs/interfaces/RawGeyserUpdate.html +2 -2
- package/dist/docs/interfaces/RawInnerInstruction.html +2 -2
- package/dist/docs/interfaces/RawSlotInfo.html +2 -2
- package/dist/docs/interfaces/RawTimestamp.html +2 -2
- package/dist/docs/interfaces/RawTokenBalance.html +2 -2
- package/dist/docs/interfaces/RawTransactionInfo.html +2 -2
- package/dist/docs/interfaces/RootNotification.html +2 -2
- package/dist/docs/interfaces/RootSubParams.html +1 -1
- package/dist/docs/interfaces/RpcContext.html +2 -2
- package/dist/docs/interfaces/RpcError.html +4 -4
- package/dist/docs/interfaces/RpcRequest.html +2 -2
- package/dist/docs/interfaces/RpcResponse.html +2 -2
- package/dist/docs/interfaces/SendTransactionOpts.html +6 -6
- package/dist/docs/interfaces/SignatureInfo.html +7 -7
- package/dist/docs/interfaces/SignatureNotification.html +2 -2
- package/dist/docs/interfaces/SignatureStatus.html +5 -5
- package/dist/docs/interfaces/SignatureSubParams.html +2 -2
- package/dist/docs/interfaces/SignaturesForAssetParams.html +2 -2
- package/dist/docs/interfaces/SimulateResult.html +2 -2
- package/dist/docs/interfaces/SimulateTransactionOpts.html +7 -7
- package/dist/docs/interfaces/SlotNotification.html +2 -2
- package/dist/docs/interfaces/SlotSubParams.html +1 -1
- package/dist/docs/interfaces/SortOpts.html +2 -2
- package/dist/docs/interfaces/Supply.html +5 -5
- package/dist/docs/interfaces/SynapseClientConfig.html +9 -9
- package/dist/docs/interfaces/SynapseEndpoint.html +7 -7
- package/dist/docs/interfaces/TokenAccount.html +3 -3
- package/dist/docs/interfaces/TokenAccountsByOwnerResult.html +2 -2
- package/dist/docs/interfaces/TokenAmount.html +5 -5
- package/dist/docs/interfaces/TokenBalanceChange.html +2 -2
- package/dist/docs/interfaces/TransactionMessageWithBlockhashLifetime.html +12 -0
- package/dist/docs/interfaces/TransactionMeta.html +11 -11
- package/dist/docs/interfaces/TransportConfig.html +7 -7
- package/dist/docs/interfaces/VoteAccount.html +9 -9
- package/dist/docs/interfaces/VoteAccountsResult.html +3 -3
- package/dist/docs/interfaces/WsConfig.html +6 -6
- package/dist/docs/media/CHANGELOG.md +29 -0
- package/dist/docs/modules.html +117 -4
- package/dist/docs/types/AccountFilter.html +1 -1
- package/dist/docs/types/Address.html +5 -0
- package/dist/docs/types/Base58.html +1 -1
- package/dist/docs/types/Brand.html +1 -1
- package/dist/docs/types/Commitment.html +1 -1
- package/dist/docs/types/DasSortBy.html +1 -1
- package/dist/docs/types/DasSortDirection.html +1 -1
- package/dist/docs/types/DataSizeFilter.html +1 -1
- package/dist/docs/types/Encoding.html +1 -1
- package/dist/docs/types/Epoch.html +1 -1
- package/dist/docs/types/KeyPairSigner.html +17 -0
- package/dist/docs/types/KitCommitment.html +4 -0
- package/dist/docs/types/Lamports.html +2 -1
- package/dist/docs/types/LogsFilter.html +1 -1
- package/dist/docs/types/MemcmpFilter.html +1 -1
- package/dist/docs/types/MessagePartialSigner.html +23 -0
- package/dist/docs/types/MessageSigner.html +8 -0
- package/dist/docs/types/NoopSigner.html +18 -0
- package/dist/docs/types/ParsedGeyserUpdate.html +1 -1
- package/dist/docs/types/Pubkey.html +3 -2
- package/dist/docs/types/Rpc.html +4 -0
- package/dist/docs/types/RpcSubscriptions.html +5 -0
- package/dist/docs/types/RpcTransport.html +3 -0
- package/dist/docs/types/RuntimeEnv.html +1 -1
- package/dist/docs/types/Signature.html +3 -2
- package/dist/docs/types/SignatureBytes.html +5 -0
- package/dist/docs/types/Slot.html +1 -1
- package/dist/docs/types/SolanaRpcApi.html +3 -0
- package/dist/docs/types/SolanaRpcApiDevnet.html +3 -0
- package/dist/docs/types/SolanaRpcApiMainnet.html +4 -0
- package/dist/docs/types/SolanaRpcApiTestnet.html +3 -0
- package/dist/docs/types/SolanaRpcSubscriptionsApi.html +1 -0
- package/dist/docs/types/SubscriptionId.html +1 -1
- package/dist/docs/types/TransactionDetail.html +1 -1
- package/dist/docs/types/TransactionMessage.html +1 -0
- package/dist/docs/types/TransactionModifyingSigner.html +30 -0
- package/dist/docs/types/TransactionPartialSigner.html +22 -0
- package/dist/docs/types/TransactionSendingSigner.html +33 -0
- package/dist/docs/types/TransactionSigner.html +9 -0
- package/dist/docs/types/UnaryMethod.html +1 -1
- package/dist/docs/types/UnixTimestamp.html +1 -1
- package/dist/docs/types/WsNotification.html +1 -1
- package/dist/docs/variables/DEFAULT_RPC_CONFIG.html +6 -0
- package/dist/docs/variables/DEFAULT_RPC_SUBSCRIPTIONS_CONFIG.html +1 -0
- package/dist/docs/variables/JUPITER_PROGRAMS.html +1 -1
- package/dist/docs/variables/KNOWN_PROGRAMS.html +1 -1
- package/dist/docs/variables/KNOWN_PROGRAMS_COUNT.html +1 -1
- package/dist/docs/variables/MARINADE_PROGRAMS.html +1 -1
- package/dist/docs/variables/METAPLEX_PROGRAMS.html +1 -1
- package/dist/docs/variables/METEORA_PROGRAMS.html +1 -1
- package/dist/docs/variables/ORCA_PROGRAMS.html +1 -1
- package/dist/docs/variables/OTHER_PROGRAMS.html +1 -1
- package/dist/docs/variables/RAYDIUM_PROGRAMS.html +1 -1
- package/dist/docs/variables/SDK_USER_AGENT.html +1 -1
- package/dist/docs/variables/SPL_PROGRAMS.html +1 -1
- package/dist/docs/variables/SYNAPSE_DEVNET_EU.html +1 -1
- package/dist/docs/variables/SYNAPSE_DEVNET_US.html +1 -1
- package/dist/docs/variables/SYNAPSE_ENDPOINTS.html +1 -1
- package/dist/docs/variables/SYNAPSE_MAINNET_EU.html +1 -1
- package/dist/docs/variables/SYNAPSE_MAINNET_US.html +1 -1
- package/dist/docs/variables/SYSTEM_PROGRAMS.html +1 -1
- package/dist/esm/ai/gateway/index.js +2 -2
- package/dist/esm/ai/gateway/x402/facilitator.d.ts +4 -4
- package/dist/esm/ai/gateway/x402/facilitator.js +4 -4
- package/dist/esm/ai/index.js +2 -2
- package/dist/esm/ai/tools/index.js +3 -3
- package/dist/esm/ai/tools/protocols/index.js +6 -6
- package/dist/esm/core/client.d.ts +72 -9
- package/dist/esm/core/client.d.ts.map +1 -1
- package/dist/esm/core/client.js +90 -5
- package/dist/esm/core/client.js.map +1 -1
- package/dist/esm/core/transport.d.ts +1 -1
- package/dist/esm/core/transport.d.ts.map +1 -1
- package/dist/esm/core/transport.js +5 -5
- package/dist/esm/core/transport.js.map +1 -1
- package/dist/esm/core/types.d.ts +23 -4
- package/dist/esm/core/types.d.ts.map +1 -1
- package/dist/esm/core/types.js +5 -1
- package/dist/esm/core/types.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/kit/index.d.ts +94 -0
- package/dist/esm/kit/index.d.ts.map +1 -0
- package/dist/esm/kit/index.js +100 -0
- package/dist/esm/kit/index.js.map +1 -0
- package/package.json +35 -48
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [1.0.2] — 2026-02-26
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- **@solana/kit bridge module** (`src/kit/index.ts`) — curated re-exports and bridge utilities
|
|
14
|
+
between Synapse branded types and `@solana/kit` v6 native types.
|
|
15
|
+
- `toKitAddress` / `fromKitAddress` for `Pubkey` ↔ `Address` conversion.
|
|
16
|
+
- `toKitSignatureString` / `toKitLamports` for `Signature` & `Lamports`.
|
|
17
|
+
- Re-exports: `Address`, `KeyPairSigner`, `createSolanaRpc`, `pipe`, codecs, account helpers.
|
|
18
|
+
- **`kitRpc` / `kitSubscriptions`** lazy accessors on `SynapseClient` — gives consumers direct
|
|
19
|
+
access to `@solana/kit`-native `Rpc<SolanaRpcApi>` and `RpcSubscriptions<SolanaRpcSubscriptionsApi>`
|
|
20
|
+
backed by the same endpoint.
|
|
21
|
+
- **`./kit` sub-path export** in `package.json` — `import { Address, toKitAddress } from '@oobe-protocol-labs/synapse-client-sdk/kit'`.
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
- **Critical: `@/` path aliases leaking into compiled output** — TypeScript `paths` aliases were
|
|
25
|
+
not rewritten by `tsc`, causing `@/core/types` imports in `dist/cjs` and `dist/esm` that
|
|
26
|
+
Webpack, Next.js, Vite, and other bundlers could not resolve. Converted all 9 `@/` imports to
|
|
27
|
+
relative paths and removed the `paths` block from `tsconfig.json` to prevent regression.
|
|
28
|
+
- **ESM directory imports broken** — the post-build `fix-esm-imports.mjs` script blindly appended
|
|
29
|
+
`.js` to all bare specifiers, producing `./tools.js` instead of `./tools/index.js` for directory
|
|
30
|
+
re-exports (`tools/`, `protocols/`, `zod/`, `jupiter/`, `raydium/`, `metaplex/`, `x402/`).
|
|
31
|
+
Rewrote the script with filesystem-aware resolution using `existsSync`.
|
|
32
|
+
- **`@langchain/core` peer dependency too permissive** — the open-ended `>=0.3.0` range could
|
|
33
|
+
resolve `@langchain/core@1.x`, which is incompatible with `@langchain/openai@0.5.x`. Tightened
|
|
34
|
+
to `>=0.3.0 <0.4.0`. Also updated `zod` peerDep to `>=3.23.0 || >=4.0.0`.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
10
38
|
## [1.0.1] — 2025-07-15
|
|
11
39
|
|
|
12
40
|
### Added
|
|
@@ -56,5 +84,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
56
84
|
|
|
57
85
|
---
|
|
58
86
|
|
|
87
|
+
[1.0.2]: https://github.com/oobe-protocol-labs/synapse-client-sdk/compare/v1.0.1...v1.0.2
|
|
59
88
|
[1.0.1]: https://github.com/oobe-protocol-labs/synapse-client-sdk/compare/v1.0.0-beta...v1.0.1
|
|
60
89
|
[1.0.0-beta]: https://github.com/oobe-protocol-labs/synapse-client-sdk/releases/tag/v1.0.0-beta
|
|
@@ -144,20 +144,20 @@ export declare class FacilitatorClient {
|
|
|
144
144
|
* ```ts
|
|
145
145
|
* import { createFacilitator, KnownFacilitator } from '@oobe-protocol-labs/synapse-client-sdk';
|
|
146
146
|
*
|
|
147
|
-
* //
|
|
147
|
+
* // One-liner with a known facilitator
|
|
148
148
|
* const facilitator = createFacilitator(KnownFacilitator.PayAI);
|
|
149
149
|
* const facilitator = createFacilitator(KnownFacilitator.RelAI);
|
|
150
150
|
* const facilitator = createFacilitator(KnownFacilitator.Dexter);
|
|
151
151
|
* const facilitator = createFacilitator(KnownFacilitator.CDP);
|
|
152
152
|
*
|
|
153
|
-
* //
|
|
153
|
+
* // Custom URL
|
|
154
154
|
* const facilitator = createFacilitator({ url: 'https://my-facilitator.com' });
|
|
155
155
|
*
|
|
156
|
-
* //
|
|
156
|
+
* // Known facilitator + auth override
|
|
157
157
|
* const facilitator = createFacilitator(KnownFacilitator.PayAI);
|
|
158
158
|
* // Then set PAYAI_API_KEY_ID / PAYAI_API_KEY_SECRET env vars for production.
|
|
159
159
|
*
|
|
160
|
-
* //
|
|
160
|
+
* // Default (PayAI free tier)
|
|
161
161
|
* const facilitator = createFacilitator();
|
|
162
162
|
* ```
|
|
163
163
|
*
|
|
@@ -265,20 +265,20 @@ exports.FacilitatorClient = FacilitatorClient;
|
|
|
265
265
|
* ```ts
|
|
266
266
|
* import { createFacilitator, KnownFacilitator } from '@oobe-protocol-labs/synapse-client-sdk';
|
|
267
267
|
*
|
|
268
|
-
* //
|
|
268
|
+
* // One-liner with a known facilitator
|
|
269
269
|
* const facilitator = createFacilitator(KnownFacilitator.PayAI);
|
|
270
270
|
* const facilitator = createFacilitator(KnownFacilitator.RelAI);
|
|
271
271
|
* const facilitator = createFacilitator(KnownFacilitator.Dexter);
|
|
272
272
|
* const facilitator = createFacilitator(KnownFacilitator.CDP);
|
|
273
273
|
*
|
|
274
|
-
* //
|
|
274
|
+
* // Custom URL
|
|
275
275
|
* const facilitator = createFacilitator({ url: 'https://my-facilitator.com' });
|
|
276
276
|
*
|
|
277
|
-
* //
|
|
277
|
+
* // Known facilitator + auth override
|
|
278
278
|
* const facilitator = createFacilitator(KnownFacilitator.PayAI);
|
|
279
279
|
* // Then set PAYAI_API_KEY_ID / PAYAI_API_KEY_SECRET env vars for production.
|
|
280
280
|
*
|
|
281
|
-
* //
|
|
281
|
+
* // Default (PayAI free tier)
|
|
282
282
|
* const facilitator = createFacilitator();
|
|
283
283
|
* ```
|
|
284
284
|
*
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* SynapseClient
|
|
2
|
+
* SynapseClient -- top-level orchestrator that binds transport to typed RPC modules.
|
|
3
3
|
*
|
|
4
4
|
* Lazy-initializes sub-clients (`.rpc`, `.das`, `.ws`, `.grpc`) on first
|
|
5
|
-
* access
|
|
5
|
+
* access -- zero cost if a module is never used. This is the main entry
|
|
6
6
|
* point for most consumers of the SDK.
|
|
7
7
|
*
|
|
8
|
+
* Since v1.1.0, exposes `@solana/kit` native RPC and subscription clients
|
|
9
|
+
* via `.kitRpc` and `.kitSubscriptions` for full Kit interop.
|
|
10
|
+
*
|
|
8
11
|
* @module core/client
|
|
9
12
|
* @since 1.0.0
|
|
10
13
|
*
|
|
@@ -12,18 +15,30 @@
|
|
|
12
15
|
* ```ts
|
|
13
16
|
* import { SynapseClient } from '@oobe-protocol-labs/synapse-client-sdk';
|
|
14
17
|
*
|
|
15
|
-
* const client = new SynapseClient({ endpoint: 'https://rpc.synapse.com', apiKey: 'sk
|
|
18
|
+
* const client = new SynapseClient({ endpoint: 'https://rpc.synapse.com', apiKey: 'sk-...' });
|
|
16
19
|
* const slot = await client.rpc.getSlot();
|
|
17
|
-
* const balance = await client.rpc.getBalance(Pubkey('
|
|
20
|
+
* const balance = await client.rpc.getBalance(Pubkey('...'));
|
|
18
21
|
* client.destroy();
|
|
19
22
|
* ```
|
|
23
|
+
*
|
|
24
|
+
* @example Kit-native RPC
|
|
25
|
+
* ```ts
|
|
26
|
+
* import { SynapseClient } from '@oobe-protocol-labs/synapse-client-sdk';
|
|
27
|
+
* import { address } from '@oobe-protocol-labs/synapse-client-sdk/kit';
|
|
28
|
+
*
|
|
29
|
+
* const client = new SynapseClient({ endpoint: 'https://rpc.synapse.com' });
|
|
30
|
+
* const { value: balance } = await client.kitRpc
|
|
31
|
+
* .getBalance(address('So11111111111111111111111111111111111111112'))
|
|
32
|
+
* .send();
|
|
33
|
+
* ```
|
|
20
34
|
*/
|
|
21
35
|
import { HttpTransport, type TransportConfig, type CallOptions } from './transport';
|
|
22
|
-
import type {
|
|
23
|
-
import type {
|
|
24
|
-
import type {
|
|
25
|
-
import type {
|
|
26
|
-
import type {
|
|
36
|
+
import type { Rpc, SolanaRpcApi, RpcSubscriptions, SolanaRpcSubscriptionsApi } from '@solana/kit';
|
|
37
|
+
import type { SolanaRpc } from '../rpc/solana-rpc';
|
|
38
|
+
import type { DasClient } from '../das/client';
|
|
39
|
+
import type { WsClient } from '../websocket/client';
|
|
40
|
+
import type { GrpcTransport } from '../grpc/transport';
|
|
41
|
+
import type { EndpointConnectConfig } from '../utils/synapse';
|
|
27
42
|
/**
|
|
28
43
|
* Configuration for {@link SynapseClient}.
|
|
29
44
|
*
|
|
@@ -43,6 +58,8 @@ export declare class SynapseClient {
|
|
|
43
58
|
private _das?;
|
|
44
59
|
private _ws?;
|
|
45
60
|
private _grpc?;
|
|
61
|
+
private _kitRpc?;
|
|
62
|
+
private _kitSubs?;
|
|
46
63
|
constructor(config: SynapseClientConfig);
|
|
47
64
|
/**
|
|
48
65
|
* Create a SynapseClient from a network + region specification.
|
|
@@ -119,5 +136,51 @@ export declare class SynapseClient {
|
|
|
119
136
|
* @since 1.0.0
|
|
120
137
|
*/
|
|
121
138
|
destroy(): void;
|
|
139
|
+
/**
|
|
140
|
+
* Kit-native fully-typed Solana RPC client.
|
|
141
|
+
*
|
|
142
|
+
* Uses the same endpoint as the Synapse transport but returns a
|
|
143
|
+
* `Rpc<SolanaRpcApi>` instance from `@solana/kit`, giving you
|
|
144
|
+
* access to Kit's type-safe `.send()` pattern with all 53+ methods.
|
|
145
|
+
*
|
|
146
|
+
* Lazy-loaded on first access.
|
|
147
|
+
*
|
|
148
|
+
* @since 1.1.0
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
* ```ts
|
|
152
|
+
* import { address } from '@oobe-protocol-labs/synapse-client-sdk/kit';
|
|
153
|
+
*
|
|
154
|
+
* const { value: balance } = await client.kitRpc
|
|
155
|
+
* .getBalance(address('So11111111111111111111111111111111111111112'))
|
|
156
|
+
* .send();
|
|
157
|
+
* ```
|
|
158
|
+
*/
|
|
159
|
+
get kitRpc(): Rpc<SolanaRpcApi>;
|
|
160
|
+
/**
|
|
161
|
+
* Kit-native fully-typed Solana RPC Subscriptions client.
|
|
162
|
+
*
|
|
163
|
+
* Returns a `RpcSubscriptions<SolanaRpcSubscriptionsApi>` from `@solana/kit`
|
|
164
|
+
* for real-time WebSocket subscriptions (account, slot, logs, signature, etc.)
|
|
165
|
+
* with the Kit `.subscribe()` pattern.
|
|
166
|
+
*
|
|
167
|
+
* Uses the WebSocket endpoint derived from the HTTP endpoint.
|
|
168
|
+
* Lazy-loaded on first access.
|
|
169
|
+
*
|
|
170
|
+
* @since 1.1.0
|
|
171
|
+
*
|
|
172
|
+
* @example
|
|
173
|
+
* ```ts
|
|
174
|
+
* const subs = client.kitSubscriptions;
|
|
175
|
+
* const notifications = await subs
|
|
176
|
+
* .slotNotifications()
|
|
177
|
+
* .subscribe({ abortSignal: AbortSignal.timeout(30_000) });
|
|
178
|
+
*
|
|
179
|
+
* for await (const slot of notifications) {
|
|
180
|
+
* console.log('New slot:', slot.slot);
|
|
181
|
+
* }
|
|
182
|
+
* ```
|
|
183
|
+
*/
|
|
184
|
+
get kitSubscriptions(): RpcSubscriptions<SolanaRpcSubscriptionsApi>;
|
|
122
185
|
}
|
|
123
186
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/core/client.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/core/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAE,aAAa,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAIpF,OAAO,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAGlG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ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AAI,SAAS,CAMnB;IAED;;;;OAIG;IACH,IAAI,EAAE,IAAI,QAAQ,CAMjB;IAED;;;;;;;;OAQG;IACH,IAAI,IAAI,IAAI,aAAa,CAaxB;IAID;;;OAGG;IACH,OAAO,IAAI,IAAI;IAMf;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,MAAM,IAAI,GAAG,CAAC,YAAY,CAAC,CAc9B;IAED;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,IAAI,gBAAgB,IAAI,gBAAgB,CAAC,yBAAyB,CAAC,CAkBlE;CACF"}
|
package/dist/cjs/core/client.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* SynapseClient
|
|
3
|
+
* SynapseClient -- top-level orchestrator that binds transport to typed RPC modules.
|
|
4
4
|
*
|
|
5
5
|
* Lazy-initializes sub-clients (`.rpc`, `.das`, `.ws`, `.grpc`) on first
|
|
6
|
-
* access
|
|
6
|
+
* access -- zero cost if a module is never used. This is the main entry
|
|
7
7
|
* point for most consumers of the SDK.
|
|
8
8
|
*
|
|
9
|
+
* Since v1.1.0, exposes `@solana/kit` native RPC and subscription clients
|
|
10
|
+
* via `.kitRpc` and `.kitSubscriptions` for full Kit interop.
|
|
11
|
+
*
|
|
9
12
|
* @module core/client
|
|
10
13
|
* @since 1.0.0
|
|
11
14
|
*
|
|
@@ -13,17 +16,28 @@
|
|
|
13
16
|
* ```ts
|
|
14
17
|
* import { SynapseClient } from '@oobe-protocol-labs/synapse-client-sdk';
|
|
15
18
|
*
|
|
16
|
-
* const client = new SynapseClient({ endpoint: 'https://rpc.synapse.com', apiKey: 'sk
|
|
19
|
+
* const client = new SynapseClient({ endpoint: 'https://rpc.synapse.com', apiKey: 'sk-...' });
|
|
17
20
|
* const slot = await client.rpc.getSlot();
|
|
18
|
-
* const balance = await client.rpc.getBalance(Pubkey('
|
|
21
|
+
* const balance = await client.rpc.getBalance(Pubkey('...'));
|
|
19
22
|
* client.destroy();
|
|
20
23
|
* ```
|
|
24
|
+
*
|
|
25
|
+
* @example Kit-native RPC
|
|
26
|
+
* ```ts
|
|
27
|
+
* import { SynapseClient } from '@oobe-protocol-labs/synapse-client-sdk';
|
|
28
|
+
* import { address } from '@oobe-protocol-labs/synapse-client-sdk/kit';
|
|
29
|
+
*
|
|
30
|
+
* const client = new SynapseClient({ endpoint: 'https://rpc.synapse.com' });
|
|
31
|
+
* const { value: balance } = await client.kitRpc
|
|
32
|
+
* .getBalance(address('So11111111111111111111111111111111111111112'))
|
|
33
|
+
* .send();
|
|
34
|
+
* ```
|
|
21
35
|
*/
|
|
22
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
37
|
exports.SynapseClient = void 0;
|
|
24
38
|
const transport_1 = require("./transport");
|
|
25
39
|
const env_1 = require("../utils/env");
|
|
26
|
-
const synapse_1 = require("
|
|
40
|
+
const synapse_1 = require("../utils/synapse");
|
|
27
41
|
class SynapseClient {
|
|
28
42
|
transport;
|
|
29
43
|
cfg;
|
|
@@ -32,6 +46,9 @@ class SynapseClient {
|
|
|
32
46
|
_das;
|
|
33
47
|
_ws;
|
|
34
48
|
_grpc;
|
|
49
|
+
// Kit-native lazy singletons
|
|
50
|
+
_kitRpc;
|
|
51
|
+
_kitSubs;
|
|
35
52
|
constructor(config) {
|
|
36
53
|
this.cfg = config;
|
|
37
54
|
this.transport = new transport_1.HttpTransport(config);
|
|
@@ -160,6 +177,74 @@ class SynapseClient {
|
|
|
160
177
|
destroy() {
|
|
161
178
|
this._ws?.close();
|
|
162
179
|
}
|
|
180
|
+
// ── @solana/kit native accessors ─────────────────────────────
|
|
181
|
+
/**
|
|
182
|
+
* Kit-native fully-typed Solana RPC client.
|
|
183
|
+
*
|
|
184
|
+
* Uses the same endpoint as the Synapse transport but returns a
|
|
185
|
+
* `Rpc<SolanaRpcApi>` instance from `@solana/kit`, giving you
|
|
186
|
+
* access to Kit's type-safe `.send()` pattern with all 53+ methods.
|
|
187
|
+
*
|
|
188
|
+
* Lazy-loaded on first access.
|
|
189
|
+
*
|
|
190
|
+
* @since 1.1.0
|
|
191
|
+
*
|
|
192
|
+
* @example
|
|
193
|
+
* ```ts
|
|
194
|
+
* import { address } from '@oobe-protocol-labs/synapse-client-sdk/kit';
|
|
195
|
+
*
|
|
196
|
+
* const { value: balance } = await client.kitRpc
|
|
197
|
+
* .getBalance(address('So11111111111111111111111111111111111111112'))
|
|
198
|
+
* .send();
|
|
199
|
+
* ```
|
|
200
|
+
*/
|
|
201
|
+
get kitRpc() {
|
|
202
|
+
if (!this._kitRpc) {
|
|
203
|
+
const { createRpc, createSolanaRpcApi, createDefaultRpcTransport, DEFAULT_RPC_CONFIG, } = require('@solana/kit');
|
|
204
|
+
this._kitRpc = createRpc({
|
|
205
|
+
api: createSolanaRpcApi(DEFAULT_RPC_CONFIG),
|
|
206
|
+
transport: createDefaultRpcTransport({ url: this.cfg.endpoint }),
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
return this._kitRpc;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Kit-native fully-typed Solana RPC Subscriptions client.
|
|
213
|
+
*
|
|
214
|
+
* Returns a `RpcSubscriptions<SolanaRpcSubscriptionsApi>` from `@solana/kit`
|
|
215
|
+
* for real-time WebSocket subscriptions (account, slot, logs, signature, etc.)
|
|
216
|
+
* with the Kit `.subscribe()` pattern.
|
|
217
|
+
*
|
|
218
|
+
* Uses the WebSocket endpoint derived from the HTTP endpoint.
|
|
219
|
+
* Lazy-loaded on first access.
|
|
220
|
+
*
|
|
221
|
+
* @since 1.1.0
|
|
222
|
+
*
|
|
223
|
+
* @example
|
|
224
|
+
* ```ts
|
|
225
|
+
* const subs = client.kitSubscriptions;
|
|
226
|
+
* const notifications = await subs
|
|
227
|
+
* .slotNotifications()
|
|
228
|
+
* .subscribe({ abortSignal: AbortSignal.timeout(30_000) });
|
|
229
|
+
*
|
|
230
|
+
* for await (const slot of notifications) {
|
|
231
|
+
* console.log('New slot:', slot.slot);
|
|
232
|
+
* }
|
|
233
|
+
* ```
|
|
234
|
+
*/
|
|
235
|
+
get kitSubscriptions() {
|
|
236
|
+
if (!this._kitSubs) {
|
|
237
|
+
const { createSubscriptionRpc, createSolanaRpcSubscriptionsApi, createDefaultRpcSubscriptionsTransport, createDefaultSolanaRpcSubscriptionsChannelCreator, DEFAULT_RPC_SUBSCRIPTIONS_CONFIG, } = require('@solana/kit');
|
|
238
|
+
const wsUrl = this.cfg.wsEndpoint ?? this.cfg.endpoint.replace('http', 'ws');
|
|
239
|
+
this._kitSubs = createSubscriptionRpc({
|
|
240
|
+
api: createSolanaRpcSubscriptionsApi(DEFAULT_RPC_SUBSCRIPTIONS_CONFIG),
|
|
241
|
+
transport: createDefaultRpcSubscriptionsTransport({
|
|
242
|
+
createChannel: createDefaultSolanaRpcSubscriptionsChannelCreator({ url: wsUrl }),
|
|
243
|
+
}),
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
return this._kitSubs;
|
|
247
|
+
}
|
|
163
248
|
}
|
|
164
249
|
exports.SynapseClient = SynapseClient;
|
|
165
250
|
//# sourceMappingURL=client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/core/client.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/core/client.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;;;AAEH,2CAAoF;AACpF,sCAAyC;AAWzC,8CAA0G;AAe1G,MAAa,aAAa;IACf,SAAS,CAAgB;IACjB,GAAG,CAAsB;IAE1C,kBAAkB;IACV,IAAI,CAAa;IACjB,IAAI,CAAa;IACjB,GAAG,CAAY;IACf,KAAK,CAAiB;IAE9B,6BAA6B;IACrB,OAAO,CAAqB;IAC5B,QAAQ,CAA+C;IAE/D,YAAY,MAA2B;QACrC,IAAI,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C,gCAAgC,CAAC;gBACtE,SAAS,EAAE,sCAAsC,CAAC;oBAChD,aAAa,EAAE,iDAAiD,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;iBACjF,CAAC;aACH,CAAgD,CAAC;QACpD,CAAC;QACD,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;CACF;AA7OD,sCA6OC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../../src/core/transport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAA2B,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../../src/core/transport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAA2B,UAAU,EAAE,MAAM,SAAS,CAAC;AAMnE;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,wBAAwB;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8DAA8D;IAC9D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6BAA6B;IAC7B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,mCAAmC;IACnC,SAAS,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAChC,+BAA+B;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAID;;;;;;;GAOG;AACH,qBAAa,aAAa;IAOZ,OAAO,CAAC,GAAG;IANvB,OAAO,CAAC,EAAE,CAAK;IACf,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAU;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;gBAE7B,GAAG,EAAE,eAAe;IAaxC;;;;;;;;;;;;;;;;OAgBG;IACG,OAAO,CAAC,CAAC,GAAG,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAE,OAAO,EAAO,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,CAAC,CAAC;IAgCtG;;;;;;;;;;OAUG;IACG,KAAK,CAAC,CAAC,GAAG,OAAO,EAAE,QAAQ,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAA;KAAE,EAAE,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;YAqCpG,IAAI;IAwBlB,OAAO,CAAC,aAAa;CAOtB"}
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
*/
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
exports.HttpTransport = void 0;
|
|
22
|
-
const errors_1 = require("
|
|
23
|
-
const env_1 = require("
|
|
22
|
+
const errors_1 = require("./errors");
|
|
23
|
+
const env_1 = require("../utils/env");
|
|
24
24
|
// ── Transport class ────────────────────────────────────────────
|
|
25
25
|
/**
|
|
26
26
|
* Low-level JSON-RPC 2.0 HTTP transport.
|
|
@@ -74,14 +74,14 @@ class HttpTransport {
|
|
|
74
74
|
const req = { jsonrpc: '2.0', id: ++this.id, method, params };
|
|
75
75
|
const t0 = this.debug ? performance.now() : 0;
|
|
76
76
|
if (this.debug)
|
|
77
|
-
console.log(
|
|
77
|
+
console.log(`> [${req.id}] ${method}`, params.length ? params : '');
|
|
78
78
|
const res = await this.send(req, opts.timeout);
|
|
79
79
|
if (!res.error) {
|
|
80
80
|
if (this.debug)
|
|
81
|
-
console.log(
|
|
81
|
+
console.log(`< [${req.id}] OK ${Math.round(performance.now() - t0)}ms`);
|
|
82
82
|
return res.result;
|
|
83
83
|
}
|
|
84
|
-
// Method-not-allowed
|
|
84
|
+
// Method-not-allowed -- try next upstream
|
|
85
85
|
const msg = (res.error.message ?? '').toLowerCase();
|
|
86
86
|
if (res.error.code === -32601 || msg.includes('method not allowed')) {
|
|
87
87
|
lastErr = res;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.js","sourceRoot":"","sources":["../../../src/core/transport.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAGH,
|
|
1
|
+
{"version":3,"file":"transport.js","sourceRoot":"","sources":["../../../src/core/transport.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAGH,qCAAmF;AACnF,sCAAyD;AAwCzD,kEAAkE;AAElE;;;;;;;GAOG;AACH,MAAa,aAAa;IAOJ;IANZ,EAAE,GAAG,CAAC,CAAC;IACE,OAAO,CAAS;IAChB,UAAU,CAAS;IACnB,KAAK,CAAU;IACf,OAAO,CAAyB;IAEjD,YAAoB,GAAoB;QAApB,QAAG,GAAH,GAAG,CAAiB;QACtC,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,IAAI,MAAM,CAAC;QACrC,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,UAAU,IAAI,CAAC,CAAC;QACtC,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,IAAI,KAAK,CAAC;QAChC,IAAI,CAAC,OAAO,GAAG;YACb,cAAc,EAAE,kBAAkB;YAClC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,aA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AE,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,YAAsB,EAAE,IAAI,CAAC,WAAqB,CAAC,CAAC;QAC1G,CAAC;QACD,MAAM,IAAI,qBAAY,CAAC,IAAI,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;IAC3E,CAAC;CACF;AApJD,sCAoJC"}
|
package/dist/cjs/core/types.d.ts
CHANGED
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
* Solana-branded primitive types.
|
|
3
3
|
*
|
|
4
4
|
* Phantom brands enforce **nominal typing** at zero runtime cost.
|
|
5
|
-
* Every Solana concept (pubkey, signature, slot, lamports
|
|
5
|
+
* Every Solana concept (pubkey, signature, slot, lamports...) gets its own
|
|
6
6
|
* opaque type so the compiler prevents accidental cross-use.
|
|
7
7
|
*
|
|
8
|
+
* These types are Synapse-specific. For interop with `@solana/kit` native
|
|
9
|
+
* types ({@link Address}, {@link Signature}, etc.) see the bridge utilities
|
|
10
|
+
* in `@oobe-protocol-labs/synapse-client-sdk/kit`.
|
|
11
|
+
*
|
|
8
12
|
* @module core/types
|
|
9
13
|
* @since 1.0.0
|
|
10
14
|
*
|
|
@@ -33,15 +37,30 @@ export type Brand<T, B extends string> = T & {
|
|
|
33
37
|
};
|
|
34
38
|
/** Base58-encoded string (Solana's default encoding). @since 1.0.0 */
|
|
35
39
|
export type Base58 = Brand<string, 'Base58'>;
|
|
36
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* Solana public key -- 32 bytes, base58-encoded.
|
|
42
|
+
*
|
|
43
|
+
* Use `toKitAddress()` from the `kit` module to convert to `@solana/kit`'s `Address` type.
|
|
44
|
+
* @since 1.0.0
|
|
45
|
+
*/
|
|
37
46
|
export type Pubkey = Brand<Base58, 'Pubkey'>;
|
|
38
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* Transaction signature -- 64 bytes, base58-encoded.
|
|
49
|
+
*
|
|
50
|
+
* For `@solana/kit` interop see `kitSignature()` in the `kit` module.
|
|
51
|
+
* @since 1.0.0
|
|
52
|
+
*/
|
|
39
53
|
export type Signature = Brand<Base58, 'Signature'>;
|
|
40
54
|
/** Slot number (absolute position in the ledger). @since 1.0.0 */
|
|
41
55
|
export type Slot = Brand<number, 'Slot'>;
|
|
42
56
|
/** Epoch number (Solana epoch counter). @since 1.0.0 */
|
|
43
57
|
export type Epoch = Brand<number, 'Epoch'>;
|
|
44
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* Lamport amount (1 SOL = 1 000 000 000 lamports).
|
|
60
|
+
*
|
|
61
|
+
* Use `toKitLamports()` from the `kit` module for `@solana/kit` interop.
|
|
62
|
+
* @since 1.0.0
|
|
63
|
+
*/
|
|
45
64
|
export type Lamports = Brand<bigint, 'Lamports'>;
|
|
46
65
|
/** Unix timestamp in seconds. @since 1.0.0 */
|
|
47
66
|
export type UnixTimestamp = Brand<number, 'UnixTimestamp'>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAIH,yDAAyD;AACzD,OAAO,CAAC,MAAM,OAAO,EAAE,OAAO,MAAM,CAAC;AAErC;;;;;;;;GAQG;AACH,MAAM,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,IAAI,CAAC,GAAG;IAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;CAAE,CAAC;AAIvE,sEAAsE;AACtE,MAAM,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,EAAE,QAAQ,CA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AAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CAChC;AAID,yFAAyF;AACzF,MAAM,MAAM,YAAY,GAAG;IAAE,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,QAAQ,CAAA;KAAE,CAAA;CAAE,CAAC;AAE9F,6EAA6E;AAC7E,MAAM,MAAM,cAAc,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAElD,wEAAwE;AACxE,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,CAAC"}
|
package/dist/cjs/core/types.js
CHANGED
|
@@ -3,9 +3,13 @@
|
|
|
3
3
|
* Solana-branded primitive types.
|
|
4
4
|
*
|
|
5
5
|
* Phantom brands enforce **nominal typing** at zero runtime cost.
|
|
6
|
-
* Every Solana concept (pubkey, signature, slot, lamports
|
|
6
|
+
* Every Solana concept (pubkey, signature, slot, lamports...) gets its own
|
|
7
7
|
* opaque type so the compiler prevents accidental cross-use.
|
|
8
8
|
*
|
|
9
|
+
* These types are Synapse-specific. For interop with `@solana/kit` native
|
|
10
|
+
* types ({@link Address}, {@link Signature}, etc.) see the bridge utilities
|
|
11
|
+
* in `@oobe-protocol-labs/synapse-client-sdk/kit`.
|
|
12
|
+
*
|
|
9
13
|
* @module core/types
|
|
10
14
|
* @since 1.0.0
|
|
11
15
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/core/types.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/core/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;;AAwDH,kEAAkE;AAClE,8CAA8C;AAE9C;;;;;GAKG;AACI,MAAM,MAAM,GAAG,CAAC,CAAS,EAAU,EAAE,CAAC,CAAsB,CAAC;AAAvD,QAAA,MAAM,UAAiD;AAEpE;;;;;GAKG;AACI,MAAM,GAAG,GAAG,CAAC,CAAS,EAAa,EAAE,CAAC,CAAyB,CAAC;AAA1D,QAAA,GAAG,OAAuD;AAEvE;;;;;GAKG;AACI,MAAM,IAAI,GAAG,CAAC,CAAS,EAAQ,EAAE,CAAC,CAAS,CAAC;AAAtC,QAAA,IAAI,QAAkC;AAEnD;;;;;GAKG;AACI,MAAM,KAAK,GAAG,CAAC,CAAS,EAAS,EAAE,CAAC,CAAU,CAAC;AAAzC,QAAA,KAAK,SAAoC;AAEtD;;;;;GAKG;AACI,MAAM,QAAQ,GAAG,CAAC,CAAkB,EAAY,EAAE,CAAC,MAAM,CAAC,CAAC,CAAa,CAAC;AAAnE,QAAA,QAAQ,YAA2D;AAEhF;;;;;GAKG;AACI,MAAM,MAAM,GAAG,CAAC,CAAS,EAAiB,EAAE,CAAC,CAAkB,CAAC;AAA1D,QAAA,MAAM,UAAoD"}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export * from './grpc/index';
|
|
|
28
28
|
export * from './das/index';
|
|
29
29
|
export * from './websocket/index';
|
|
30
30
|
export * from './utils/index';
|
|
31
|
+
export * from './kit/index';
|
|
31
32
|
import { SynapseClient, type SynapseClientConfig } from './core/client';
|
|
32
33
|
/**
|
|
33
34
|
* Convenience factory to create a {@link SynapseClient} instance.
|
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,cAAc,cAAc,CAAC;AAG7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAG9B,cAAc,aAAa,CAAC;AAG5B,cAAc,cAAc,CAAC;AAG7B,cAAc,aAAa,CAAC;AAG5B,cAAc,mBAAmB,CAAC;AAGlC,cAAc,eAAe,CAAC;AAG9B,OAAO,EAAE,aAAa,EAAE,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACxE;;;;;;;;;;;GAWG,CAAA,wBAAgB,aAAa,CAAC,MAAM,EAAE,mBAAmB,GAAG,aAAa,CAE3E;AAED,eAAe,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,cAAc,cAAc,CAAC;AAG7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAG9B,cAAc,aAAa,CAAC;AAG5B,cAAc,cAAc,CAAC;AAG7B,cAAc,aAAa,CAAC;AAG5B,cAAc,mBAAmB,CAAC;AAGlC,cAAc,eAAe,CAAC;AAG9B,cAAc,aAAa,CAAC;AAG5B,OAAO,EAAE,aAAa,EAAE,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACxE;;;;;;;;;;;GAWG,CAAA,wBAAgB,aAAa,CAAC,MAAM,EAAE,mBAAmB,GAAG,aAAa,CAE3E;AAED,eAAe,aAAa,CAAC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -52,6 +52,8 @@ __exportStar(require("./das/index"), exports);
|
|
|
52
52
|
__exportStar(require("./websocket/index"), exports);
|
|
53
53
|
// ── Utility helpers ────────────────────────────────────────────
|
|
54
54
|
__exportStar(require("./utils/index"), exports);
|
|
55
|
+
// ── @solana/kit bridge (native types, signers, RPC) ────────────
|
|
56
|
+
__exportStar(require("./kit/index"), exports);
|
|
55
57
|
// ── Convenience factory ────────────────────────────────────────
|
|
56
58
|
const client_1 = require("./core/client");
|
|
57
59
|
/**
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;AAyCA,sCAEF;AAzCD,mEAAmE;AACnE,+CAA6B;AAE7B,kEAAkE;AAClE,mDAAiC;AACjC,gDAA8B;AAC9B,gDAA8B;AAE9B,iEAAiE;AACjE,8CAA4B;AAE5B,kEAAkE;AAClE,+CAA6B;AAE7B,kEAAkE;AAClE,8CAA4B;AAE5B,kEAAkE;AAClE,oDAAkC;AAElC,kEAAkE;AAClE,gDAA8B;AAE9B,kEAAkE;AAClE,8CAA4B;AAE5B,kEAAkE;AAClE,0CAAwE;AACxE;;;;;;;;;;;GAWG,CAAA,SAAgB,aAAa,CAAC,MAA2B;IAC1D,OAAO,IAAI,sBAAa,CAAC,MAAM,CAAC,CAAC;AACnC,CAAC;AAED,kBAAe,sBAAa,CAAC"}
|