@solana/actions
Advanced tools
Comparing version 1.5.1 to 1.6.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.actionCorsMiddleware = exports.actionHeaders = void 0; | ||
exports.actionCorsMiddleware = exports.createActionHeaders = void 0; | ||
const constants_js_1 = require("./constants.js"); | ||
@@ -8,3 +8,3 @@ /** | ||
*/ | ||
function actionHeaders({ headers, chainId, actionVersion, } = {}) { | ||
function createActionHeaders({ headers, chainId, actionVersion, } = {}) { | ||
if (chainId) { | ||
@@ -27,3 +27,3 @@ headers = Object.assign({}, headers || {}, { | ||
} | ||
exports.actionHeaders = actionHeaders; | ||
exports.createActionHeaders = createActionHeaders; | ||
/** | ||
@@ -34,3 +34,3 @@ * Middleware to enable proper CORS headers for Action APIs | ||
return (_req, res, next) => { | ||
res.set(actionHeaders(args)); | ||
res.set(createActionHeaders(args)); | ||
next(); | ||
@@ -37,0 +37,0 @@ }; |
@@ -5,3 +5,3 @@ import { ACTIONS_CORS_HEADERS, BLOCKCHAIN_IDS } from "./constants.js"; | ||
*/ | ||
export function actionHeaders({ headers, chainId, actionVersion, } = {}) { | ||
export function createActionHeaders({ headers, chainId, actionVersion, } = {}) { | ||
if (chainId) { | ||
@@ -29,3 +29,3 @@ headers = Object.assign({}, headers || {}, { | ||
return (_req, res, next) => { | ||
res.set(actionHeaders(args)); | ||
res.set(createActionHeaders(args)); | ||
next(); | ||
@@ -32,0 +32,0 @@ }; |
@@ -10,3 +10,3 @@ import { ACTIONS_CORS_HEADERS, BLOCKCHAIN_IDS } from "./constants.js"; | ||
*/ | ||
export declare function actionHeaders({ headers, chainId, actionVersion, }?: HeaderHelperArgs): Record<string, string>; | ||
export declare function createActionHeaders({ headers, chainId, actionVersion, }?: HeaderHelperArgs): Record<string, string>; | ||
/** | ||
@@ -13,0 +13,0 @@ * Middleware to enable proper CORS headers for Action APIs |
{ | ||
"name": "@solana/actions", | ||
"version": "1.5.1", | ||
"version": "1.6.0", | ||
"author": "Solana Maintainers <maintainers@solana.foundation>", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/solana-developers/solana-actions", |
@@ -12,3 +12,3 @@ import { ACTIONS_CORS_HEADERS, BLOCKCHAIN_IDS } from "./constants.js"; | ||
*/ | ||
export function actionHeaders({ | ||
export function createActionHeaders({ | ||
headers, | ||
@@ -39,5 +39,5 @@ chainId, | ||
return (_req: any, res: any, next: Function) => { | ||
res.set(actionHeaders(args)); | ||
res.set(createActionHeaders(args)); | ||
next(); | ||
}; | ||
} |
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
153538