@solana/rpc-types
Advanced tools
Comparing version 2.0.0-experimental.dbe6a73 to 2.0.0-experimental.dd2096e
@@ -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 |
{ | ||
"name": "@solana/rpc-types", | ||
"version": "2.0.0-experimental.dbe6a73", | ||
"version": "2.0.0-experimental.dd2096e", | ||
"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.dbe6a73", | ||
"@solana/codecs-core": "2.0.0-experimental.dd2096e", | ||
"build-scripts": "0.0.0", | ||
@@ -81,2 +81,5 @@ "test-config": "0.0.0", | ||
}, | ||
"dependencies": { | ||
"@solana/codecs-strings": "2.0.0-experimental.dd2096e" | ||
}, | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
149939
40
1669
1
+ Added@solana/codecs-core@2.0.0-experimental.dd2096e(transitive)
+ Added@solana/codecs-numbers@2.0.0-experimental.dd2096e(transitive)
+ Added@solana/codecs-strings@2.0.0-experimental.dd2096e(transitive)
+ Addedfastestsmallesttextencoderdecoder@1.0.22(transitive)