@solana/accounts
Advanced tools
Comparing version 2.0.0-experimental.803b2d8 to 2.0.0-experimental.833e4f9
@@ -1,2 +0,2 @@ | ||
import { SolanaError, SOLANA_ERROR__FAILED_TO_DECODE_ACCOUNT, SOLANA_ERROR__EXPECTED_DECODED_ACCOUNT, SOLANA_ERROR__NOT_ALL_ACCOUNTS_DECODED, SOLANA_ERROR__ACCOUNT_NOT_FOUND, SOLANA_ERROR__MULTIPLE_ACCOUNTS_NOT_FOUND } from '@solana/errors'; | ||
import { SolanaError, SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT, SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT, SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED, SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND, SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND } from '@solana/errors'; | ||
import { getBase64Encoder, getBase58Encoder } from '@solana/codecs-strings'; | ||
@@ -13,3 +13,3 @@ | ||
} catch (e) { | ||
throw new SolanaError(SOLANA_ERROR__FAILED_TO_DECODE_ACCOUNT, { | ||
throw new SolanaError(SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT, { | ||
address: encodedAccount.address | ||
@@ -24,3 +24,3 @@ }); | ||
if (accountExists(account) && account.data instanceof Uint8Array) { | ||
throw new SolanaError(SOLANA_ERROR__EXPECTED_DECODED_ACCOUNT, { | ||
throw new SolanaError(SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT, { | ||
address: account.address | ||
@@ -34,3 +34,3 @@ }); | ||
const encodedAddresses = encoded.map((a) => a.address); | ||
throw new SolanaError(SOLANA_ERROR__NOT_ALL_ACCOUNTS_DECODED, { | ||
throw new SolanaError(SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED, { | ||
addresses: encodedAddresses | ||
@@ -91,3 +91,3 @@ }); | ||
if (!account.exists) { | ||
throw new SolanaError(SOLANA_ERROR__ACCOUNT_NOT_FOUND, { address: account.address }); | ||
throw new SolanaError(SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND, { address: account.address }); | ||
} | ||
@@ -99,3 +99,3 @@ } | ||
const missingAddresses = missingAccounts.map((a) => a.address); | ||
throw new SolanaError(SOLANA_ERROR__MULTIPLE_ACCOUNTS_NOT_FOUND, { addresses: missingAddresses }); | ||
throw new SolanaError(SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND, { addresses: missingAddresses }); | ||
} | ||
@@ -102,0 +102,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import { SolanaError, SOLANA_ERROR__FAILED_TO_DECODE_ACCOUNT, SOLANA_ERROR__EXPECTED_DECODED_ACCOUNT, SOLANA_ERROR__NOT_ALL_ACCOUNTS_DECODED, SOLANA_ERROR__ACCOUNT_NOT_FOUND, SOLANA_ERROR__MULTIPLE_ACCOUNTS_NOT_FOUND } from '@solana/errors'; | ||
import { SolanaError, SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT, SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT, SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED, SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND, SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND } from '@solana/errors'; | ||
import { getBase64Encoder, getBase58Encoder } from '@solana/codecs-strings'; | ||
@@ -13,3 +13,3 @@ | ||
} catch (e) { | ||
throw new SolanaError(SOLANA_ERROR__FAILED_TO_DECODE_ACCOUNT, { | ||
throw new SolanaError(SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT, { | ||
address: encodedAccount.address | ||
@@ -24,3 +24,3 @@ }); | ||
if (accountExists(account) && account.data instanceof Uint8Array) { | ||
throw new SolanaError(SOLANA_ERROR__EXPECTED_DECODED_ACCOUNT, { | ||
throw new SolanaError(SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT, { | ||
address: account.address | ||
@@ -34,3 +34,3 @@ }); | ||
const encodedAddresses = encoded.map((a) => a.address); | ||
throw new SolanaError(SOLANA_ERROR__NOT_ALL_ACCOUNTS_DECODED, { | ||
throw new SolanaError(SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED, { | ||
addresses: encodedAddresses | ||
@@ -91,3 +91,3 @@ }); | ||
if (!account.exists) { | ||
throw new SolanaError(SOLANA_ERROR__ACCOUNT_NOT_FOUND, { address: account.address }); | ||
throw new SolanaError(SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND, { address: account.address }); | ||
} | ||
@@ -99,3 +99,3 @@ } | ||
const missingAddresses = missingAccounts.map((a) => a.address); | ||
throw new SolanaError(SOLANA_ERROR__MULTIPLE_ACCOUNTS_NOT_FOUND, { addresses: missingAddresses }); | ||
throw new SolanaError(SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND, { addresses: missingAddresses }); | ||
} | ||
@@ -102,0 +102,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import { SolanaError, SOLANA_ERROR__FAILED_TO_DECODE_ACCOUNT, SOLANA_ERROR__EXPECTED_DECODED_ACCOUNT, SOLANA_ERROR__NOT_ALL_ACCOUNTS_DECODED, SOLANA_ERROR__ACCOUNT_NOT_FOUND, SOLANA_ERROR__MULTIPLE_ACCOUNTS_NOT_FOUND } from '@solana/errors'; | ||
import { SolanaError, SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT, SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT, SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED, SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND, SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND } from '@solana/errors'; | ||
import { getBase64Encoder, getBase58Encoder } from '@solana/codecs-strings'; | ||
@@ -13,3 +13,3 @@ | ||
} catch (e) { | ||
throw new SolanaError(SOLANA_ERROR__FAILED_TO_DECODE_ACCOUNT, { | ||
throw new SolanaError(SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT, { | ||
address: encodedAccount.address | ||
@@ -24,3 +24,3 @@ }); | ||
if (accountExists(account) && account.data instanceof Uint8Array) { | ||
throw new SolanaError(SOLANA_ERROR__EXPECTED_DECODED_ACCOUNT, { | ||
throw new SolanaError(SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT, { | ||
address: account.address | ||
@@ -34,3 +34,3 @@ }); | ||
const encodedAddresses = encoded.map((a) => a.address); | ||
throw new SolanaError(SOLANA_ERROR__NOT_ALL_ACCOUNTS_DECODED, { | ||
throw new SolanaError(SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED, { | ||
addresses: encodedAddresses | ||
@@ -91,3 +91,3 @@ }); | ||
if (!account.exists) { | ||
throw new SolanaError(SOLANA_ERROR__ACCOUNT_NOT_FOUND, { address: account.address }); | ||
throw new SolanaError(SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND, { address: account.address }); | ||
} | ||
@@ -99,3 +99,3 @@ } | ||
const missingAddresses = missingAccounts.map((a) => a.address); | ||
throw new SolanaError(SOLANA_ERROR__MULTIPLE_ACCOUNTS_NOT_FOUND, { addresses: missingAddresses }); | ||
throw new SolanaError(SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND, { addresses: missingAddresses }); | ||
} | ||
@@ -102,0 +102,0 @@ } |
{ | ||
"name": "@solana/accounts", | ||
"version": "2.0.0-experimental.803b2d8", | ||
"version": "2.0.0-experimental.833e4f9", | ||
"description": "Helpers for representing, fetching and decoding Solana accounts", | ||
@@ -49,8 +49,8 @@ "exports": { | ||
"dependencies": { | ||
"@solana/addresses": "2.0.0-experimental.803b2d8", | ||
"@solana/codecs-core": "2.0.0-experimental.803b2d8", | ||
"@solana/codecs-strings": "2.0.0-experimental.803b2d8", | ||
"@solana/errors": "2.0.0-experimental.803b2d8", | ||
"@solana/rpc-spec": "2.0.0-experimental.803b2d8", | ||
"@solana/rpc-types": "2.0.0-experimental.803b2d8" | ||
"@solana/addresses": "2.0.0-experimental.833e4f9", | ||
"@solana/codecs-core": "2.0.0-experimental.833e4f9", | ||
"@solana/codecs-strings": "2.0.0-experimental.833e4f9", | ||
"@solana/errors": "2.0.0-experimental.833e4f9", | ||
"@solana/rpc-spec": "2.0.0-experimental.833e4f9", | ||
"@solana/rpc-types": "2.0.0-experimental.833e4f9" | ||
}, | ||
@@ -57,0 +57,0 @@ "bundlewatch": { |
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
164193
848
+ Added@solana/addresses@2.0.0-experimental.833e4f9(transitive)
+ Added@solana/assertions@2.0.0-experimental.833e4f9(transitive)
+ Added@solana/codecs-core@2.0.0-experimental.833e4f9(transitive)
+ Added@solana/codecs-numbers@2.0.0-experimental.833e4f9(transitive)
+ Added@solana/codecs-strings@2.0.0-experimental.833e4f9(transitive)
+ Added@solana/errors@2.0.0-experimental.833e4f9(transitive)
+ Added@solana/rpc-spec@2.0.0-experimental.833e4f9(transitive)
+ Added@solana/rpc-spec-types@2.0.0-experimental.833e4f9(transitive)
+ Added@solana/rpc-types@2.0.0-experimental.833e4f9(transitive)
- Removed@solana/addresses@2.0.0-experimental.803b2d8(transitive)
- Removed@solana/assertions@2.0.0-experimental.803b2d8(transitive)
- Removed@solana/codecs-core@2.0.0-experimental.803b2d8(transitive)
- Removed@solana/codecs-numbers@2.0.0-experimental.803b2d8(transitive)
- Removed@solana/codecs-strings@2.0.0-experimental.803b2d8(transitive)
- Removed@solana/errors@2.0.0-experimental.803b2d8(transitive)
- Removed@solana/rpc-spec@2.0.0-experimental.803b2d8(transitive)
- Removed@solana/rpc-spec-types@2.0.0-experimental.803b2d8(transitive)
- Removed@solana/rpc-types@2.0.0-experimental.803b2d8(transitive)