Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@solana/rpc-types

Package Overview
Dependencies
Maintainers
15
Versions
1057
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solana/rpc-types - npm Package Compare versions

Comparing version 2.0.0-experimental.6466d76 to 2.0.0-experimental.64d583b

dist/types/blockhash.d.ts

40

dist/index.browser.js

@@ -0,1 +1,39 @@

import { getBase58Encoder } from '@solana/codecs-strings';
// src/blockhash.ts
var base58Encoder;
function assertIsBlockhash(putativeBlockhash) {
if (!base58Encoder)
base58Encoder = getBase58Encoder();
try {
if (
// Lowest value (32 bytes of zeroes)
putativeBlockhash.length < 32 || // Highest value (32 bytes of 255)
putativeBlockhash.length > 44
) {
throw new Error("Expected input string to decode to a byte array of length 32.");
}
const bytes = base58Encoder.encode(putativeBlockhash);
const numBytes = bytes.byteLength;
if (numBytes !== 32) {
throw new Error(`Expected input string to decode to a byte array of length 32. Actual length: ${numBytes}`);
}
} catch (e) {
throw new Error(`\`${putativeBlockhash}\` is not a blockhash`, {
cause: e
});
}
}
// src/cluster-url.ts
function mainnet(putativeString) {
return putativeString;
}
function devnet(putativeString) {
return putativeString;
}
function testnet(putativeString) {
return putativeString;
}
// src/commitment.ts

@@ -101,4 +139,4 @@ function getCommitmentScore(commitment) {

export { assertIsLamports, assertIsStringifiedBigInt, assertIsStringifiedNumber, assertIsUnixTimestamp, commitmentComparator, isLamports, isStringifiedBigInt, isStringifiedNumber, isUnixTimestamp, lamports, stringifiedBigInt, stringifiedNumber, unixTimestamp };
export { assertIsBlockhash, assertIsLamports, assertIsStringifiedBigInt, assertIsStringifiedNumber, assertIsUnixTimestamp, commitmentComparator, devnet, isLamports, isStringifiedBigInt, isStringifiedNumber, isUnixTimestamp, lamports, mainnet, stringifiedBigInt, stringifiedNumber, testnet, unixTimestamp };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.browser.js.map

@@ -0,1 +1,39 @@

import { getBase58Encoder } from '@solana/codecs-strings';
// src/blockhash.ts
var base58Encoder;
function assertIsBlockhash(putativeBlockhash) {
if (!base58Encoder)
base58Encoder = getBase58Encoder();
try {
if (
// Lowest value (32 bytes of zeroes)
putativeBlockhash.length < 32 || // Highest value (32 bytes of 255)
putativeBlockhash.length > 44
) {
throw new Error("Expected input string to decode to a byte array of length 32.");
}
const bytes = base58Encoder.encode(putativeBlockhash);
const numBytes = bytes.byteLength;
if (numBytes !== 32) {
throw new Error(`Expected input string to decode to a byte array of length 32. Actual length: ${numBytes}`);
}
} catch (e) {
throw new Error(`\`${putativeBlockhash}\` is not a blockhash`, {
cause: e
});
}
}
// src/cluster-url.ts
function mainnet(putativeString) {
return putativeString;
}
function devnet(putativeString) {
return putativeString;
}
function testnet(putativeString) {
return putativeString;
}
// src/commitment.ts

@@ -101,4 +139,4 @@ function getCommitmentScore(commitment) {

export { assertIsLamports, assertIsStringifiedBigInt, assertIsStringifiedNumber, assertIsUnixTimestamp, commitmentComparator, isLamports, isStringifiedBigInt, isStringifiedNumber, isUnixTimestamp, lamports, stringifiedBigInt, stringifiedNumber, unixTimestamp };
export { assertIsBlockhash, assertIsLamports, assertIsStringifiedBigInt, assertIsStringifiedNumber, assertIsUnixTimestamp, commitmentComparator, devnet, isLamports, isStringifiedBigInt, isStringifiedNumber, isUnixTimestamp, lamports, mainnet, stringifiedBigInt, stringifiedNumber, testnet, unixTimestamp };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.native.js.map

@@ -0,1 +1,39 @@

import { getBase58Encoder } from '@solana/codecs-strings';
// src/blockhash.ts
var base58Encoder;
function assertIsBlockhash(putativeBlockhash) {
if (!base58Encoder)
base58Encoder = getBase58Encoder();
try {
if (
// Lowest value (32 bytes of zeroes)
putativeBlockhash.length < 32 || // Highest value (32 bytes of 255)
putativeBlockhash.length > 44
) {
throw new Error("Expected input string to decode to a byte array of length 32.");
}
const bytes = base58Encoder.encode(putativeBlockhash);
const numBytes = bytes.byteLength;
if (numBytes !== 32) {
throw new Error(`Expected input string to decode to a byte array of length 32. Actual length: ${numBytes}`);
}
} catch (e) {
throw new Error(`\`${putativeBlockhash}\` is not a blockhash`, {
cause: e
});
}
}
// src/cluster-url.ts
function mainnet(putativeString) {
return putativeString;
}
function devnet(putativeString) {
return putativeString;
}
function testnet(putativeString) {
return putativeString;
}
// src/commitment.ts

@@ -101,4 +139,4 @@ function getCommitmentScore(commitment) {

export { assertIsLamports, assertIsStringifiedBigInt, assertIsStringifiedNumber, assertIsUnixTimestamp, commitmentComparator, isLamports, isStringifiedBigInt, isStringifiedNumber, isUnixTimestamp, lamports, stringifiedBigInt, stringifiedNumber, unixTimestamp };
export { assertIsBlockhash, assertIsLamports, assertIsStringifiedBigInt, assertIsStringifiedNumber, assertIsUnixTimestamp, commitmentComparator, devnet, isLamports, isStringifiedBigInt, isStringifiedNumber, isUnixTimestamp, lamports, mainnet, stringifiedBigInt, stringifiedNumber, testnet, unixTimestamp };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.node.js.map

@@ -0,7 +1,12 @@

export * from './blockhash.js';
export * from './cluster-url.js';
export * from './commitment.js';
export * from './encoded-bytes.js';
export * from './lamports.js';
export * from './rpc-api.js';
export * from './stringified-bigint.js';
export * from './stringified-number.js';
export * from './token-amount.js';
export * from './typed-numbers.js';
export * from './unix-timestamp.js';
//# sourceMappingURL=index.d.ts.map

7

package.json
{
"name": "@solana/rpc-types",
"version": "2.0.0-experimental.6466d76",
"version": "2.0.0-experimental.64d583b",
"description": "Type definitions for values used in the Solana RPC, and helper functions for working with them",

@@ -67,3 +67,3 @@ "exports": {

"version-from-git": "^1.1.1",
"@solana/transactions": "2.0.0-experimental.6466d76",
"@solana/codecs-core": "2.0.0-experimental.64d583b",
"build-scripts": "0.0.0",

@@ -81,2 +81,5 @@ "test-config": "0.0.0",

},
"dependencies": {
"@solana/codecs-strings": "2.0.0-experimental.64d583b"
},
"scripts": {

@@ -83,0 +86,0 @@ "compile:js": "tsup --config build-scripts/tsup.config.package.ts",

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

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc