"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SVM_TRANSACTION_PREFLIGHT_FAILURE = exports.SVM_LONG_TERM_STORAGE_SLOT_SKIPPED = exports.SVM_SLOT_SKIPPED = exports.SVM_BLOCK_NOT_AVAILABLE = void 0;
exports.isSolanaError = isSolanaError;
const kit_1 = require("@solana/kit");
const superstruct_1 = require("superstruct");
var kit_2 = require("@solana/kit");
Object.defineProperty(exports, "SVM_BLOCK_NOT_AVAILABLE", { enumerable: true, get: function () { return kit_2.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE; } });
Object.defineProperty(exports, "SVM_SLOT_SKIPPED", { enumerable: true, get: function () { return kit_2.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED; } });
Object.defineProperty(exports, "SVM_LONG_TERM_STORAGE_SLOT_SKIPPED", { enumerable: true, get: function () { return kit_2.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED; } });
Object.defineProperty(exports, "SVM_TRANSACTION_PREFLIGHT_FAILURE", { enumerable: true, get: function () { return kit_2.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE; } });
const SolanaErrorStruct = (0, superstruct_1.type)({
    name: (0, superstruct_1.string)(),
    context: (0, superstruct_1.type)({
        __code: (0, superstruct_1.number)(),
    }),
});
function isSolanaError(error) {
    return (0, kit_1.isSolanaError)(error) || (0, superstruct_1.is)(error, SolanaErrorStruct);
}
//# sourceMappingURL=provider.js.map