@solana/actions
Advanced tools
Comparing version 1.3.0 to 1.4.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ACTIONS_CORS_HEADERS = exports.BLINKS_QUERY_PARAM = exports.MEMO_PROGRAM_ID = exports.HTTPS_PROTOCOL = void 0; | ||
exports.ACTIONS_CORS_HEADERS_MIDDLEWARE = exports.ACTIONS_CORS_HEADERS = exports.BLINKS_QUERY_PARAM = exports.MEMO_PROGRAM_ID = exports.HTTPS_PROTOCOL = void 0; | ||
/** @internal */ | ||
@@ -8,6 +8,15 @@ exports.HTTPS_PROTOCOL = "https:"; | ||
exports.MEMO_PROGRAM_ID = "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"; | ||
/** */ | ||
/** | ||
* Specification declared URL query parameter to detect blinks via interstitial website URLs. | ||
* | ||
* Note: The `action` query parameter should begin with the `solana-action:` protocol identifier | ||
* | ||
* Example: `https://dial.to/?action=solana-action:https://jupiter.dial.to/swap/SOL-Bonk` | ||
*/ | ||
exports.BLINKS_QUERY_PARAM = "action"; | ||
/** | ||
* Standard headers | ||
* Standard headers for use within frameworks that use the native `HeadersInit` (like NextJS) | ||
* | ||
* Note: `Access-Control-Allow-Origin=*` should ONLY be set on your Actions API routes and `actions.json`. | ||
* Setting "allow origin to any" on other routes on your server is bad practice and should be avoided. | ||
*/ | ||
@@ -20,2 +29,19 @@ exports.ACTIONS_CORS_HEADERS = { | ||
}; | ||
/** | ||
* Standard headers for use within frameworks that use middleware to handle CORS headers | ||
* (like Hono, Express, and Fastify) | ||
* | ||
* Note: `origin=*` should ONLY be set on your Actions API routes and `actions.json`. | ||
* Setting "allow origin to any" on other routes on your server is bad practice and should be avoided. | ||
*/ | ||
exports.ACTIONS_CORS_HEADERS_MIDDLEWARE = { | ||
origin: "*", | ||
methods: ["GET", "POST", "PUT", "OPTIONS"], | ||
allowedHeaders: [ | ||
"Content-Type", | ||
"Authorization", | ||
"Content-Encoding", | ||
"Accept-Encoding", | ||
], | ||
}; | ||
//# sourceMappingURL=constants.js.map |
@@ -5,6 +5,15 @@ /** @internal */ | ||
export const MEMO_PROGRAM_ID = "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"; | ||
/** */ | ||
/** | ||
* Specification declared URL query parameter to detect blinks via interstitial website URLs. | ||
* | ||
* Note: The `action` query parameter should begin with the `solana-action:` protocol identifier | ||
* | ||
* Example: `https://dial.to/?action=solana-action:https://jupiter.dial.to/swap/SOL-Bonk` | ||
*/ | ||
export const BLINKS_QUERY_PARAM = "action"; | ||
/** | ||
* Standard headers | ||
* Standard headers for use within frameworks that use the native `HeadersInit` (like NextJS) | ||
* | ||
* Note: `Access-Control-Allow-Origin=*` should ONLY be set on your Actions API routes and `actions.json`. | ||
* Setting "allow origin to any" on other routes on your server is bad practice and should be avoided. | ||
*/ | ||
@@ -17,2 +26,19 @@ export const ACTIONS_CORS_HEADERS = { | ||
}; | ||
/** | ||
* Standard headers for use within frameworks that use middleware to handle CORS headers | ||
* (like Hono, Express, and Fastify) | ||
* | ||
* Note: `origin=*` should ONLY be set on your Actions API routes and `actions.json`. | ||
* Setting "allow origin to any" on other routes on your server is bad practice and should be avoided. | ||
*/ | ||
export const ACTIONS_CORS_HEADERS_MIDDLEWARE = { | ||
origin: "*", | ||
methods: ["GET", "POST", "PUT", "OPTIONS"], | ||
allowedHeaders: [ | ||
"Content-Type", | ||
"Authorization", | ||
"Content-Encoding", | ||
"Accept-Encoding", | ||
], | ||
}; | ||
//# sourceMappingURL=constants.js.map |
/** Program Id for the SPL Memo program */ | ||
export declare const MEMO_PROGRAM_ID = "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"; | ||
/** */ | ||
/** | ||
* Specification declared URL query parameter to detect blinks via interstitial website URLs. | ||
* | ||
* Note: The `action` query parameter should begin with the `solana-action:` protocol identifier | ||
* | ||
* Example: `https://dial.to/?action=solana-action:https://jupiter.dial.to/swap/SOL-Bonk` | ||
*/ | ||
export declare const BLINKS_QUERY_PARAM = "action"; | ||
/** | ||
* Standard headers | ||
* Standard headers for use within frameworks that use the native `HeadersInit` (like NextJS) | ||
* | ||
* Note: `Access-Control-Allow-Origin=*` should ONLY be set on your Actions API routes and `actions.json`. | ||
* Setting "allow origin to any" on other routes on your server is bad practice and should be avoided. | ||
*/ | ||
export declare const ACTIONS_CORS_HEADERS: HeadersInit; | ||
/** | ||
* Standard headers for use within frameworks that use middleware to handle CORS headers | ||
* (like Hono, Express, and Fastify) | ||
* | ||
* Note: `origin=*` should ONLY be set on your Actions API routes and `actions.json`. | ||
* Setting "allow origin to any" on other routes on your server is bad practice and should be avoided. | ||
*/ | ||
export declare const ACTIONS_CORS_HEADERS_MIDDLEWARE: { | ||
origin: string; | ||
methods: string[]; | ||
allowedHeaders: string[]; | ||
}; | ||
//# sourceMappingURL=constants.d.ts.map |
{ | ||
"name": "@solana/actions", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"author": "Solana Maintainers <maintainers@solana.foundation>", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/solana-developers/solana-actions", |
@@ -7,7 +7,16 @@ /** @internal */ | ||
/** */ | ||
/** | ||
* Specification declared URL query parameter to detect blinks via interstitial website URLs. | ||
* | ||
* Note: The `action` query parameter should begin with the `solana-action:` protocol identifier | ||
* | ||
* Example: `https://dial.to/?action=solana-action:https://jupiter.dial.to/swap/SOL-Bonk` | ||
*/ | ||
export const BLINKS_QUERY_PARAM = "action"; | ||
/** | ||
* Standard headers | ||
* Standard headers for use within frameworks that use the native `HeadersInit` (like NextJS) | ||
* | ||
* Note: `Access-Control-Allow-Origin=*` should ONLY be set on your Actions API routes and `actions.json`. | ||
* Setting "allow origin to any" on other routes on your server is bad practice and should be avoided. | ||
*/ | ||
@@ -21,1 +30,19 @@ export const ACTIONS_CORS_HEADERS: HeadersInit = { | ||
}; | ||
/** | ||
* Standard headers for use within frameworks that use middleware to handle CORS headers | ||
* (like Hono, Express, and Fastify) | ||
* | ||
* Note: `origin=*` should ONLY be set on your Actions API routes and `actions.json`. | ||
* Setting "allow origin to any" on other routes on your server is bad practice and should be avoided. | ||
*/ | ||
export const ACTIONS_CORS_HEADERS_MIDDLEWARE = { | ||
origin: "*", | ||
methods: ["GET", "POST", "PUT", "OPTIONS"], | ||
allowedHeaders: [ | ||
"Content-Type", | ||
"Authorization", | ||
"Content-Encoding", | ||
"Accept-Encoding", | ||
], | ||
}; |
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
145211
2261