diff --git a/.changeset/neat-eels-count.md b/.changeset/neat-eels-count.md new file mode 100644 index 0000000..540dfad --- /dev/null +++ b/.changeset/neat-eels-count.md @@ -0,0 +1,5 @@ +--- +"@gelatocloud/gasless": patch +--- + +refactor: use authorization header for auth diff --git a/src/bundler/index.ts b/src/bundler/index.ts index 8518480..843fafc 100644 --- a/src/bundler/index.ts +++ b/src/bundler/index.ts @@ -77,7 +77,7 @@ export const createGelatoBundlerClient = async ( const transport = http(endpoint, { fetchOptions: { headers: { - 'X-API-Key': apiKey, + Authorization: `Bearer ${apiKey}`, ...parameters.httpTransportConfig?.fetchOptions?.headers }, ...parameters.httpTransportConfig?.fetchOptions diff --git a/src/relayer/evm/index.ts b/src/relayer/evm/index.ts index 5a8565e..2a208a2 100644 --- a/src/relayer/evm/index.ts +++ b/src/relayer/evm/index.ts @@ -78,7 +78,7 @@ export const createGelatoEvmRelayerClient = ( ...parameters.httpTransportConfig, fetchOptions: { headers: { - 'X-API-Key': apiKey, + Authorization: `Bearer ${apiKey}`, ...parameters.httpTransportConfig?.fetchOptions?.headers }, ...parameters.httpTransportConfig?.fetchOptions diff --git a/src/version.ts b/src/version.ts index 30ae1a5..7df34a4 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const version = '0.0.9'; +export const version = '0.0.11';