New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@cometh/checkout-sdk

Package Overview
Dependencies
Maintainers
0
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cometh/checkout-sdk - npm Package Compare versions

Comparing version 2.2.2 to 2.3.0

3

CheckoutAPI.ts

@@ -8,2 +8,3 @@ import type { BaseHttpRequest } from './core/BaseHttpRequest';

import { CheckoutSessionsService } from './services.gen';
import { LifiService } from './services.gen';
import { LydiaService } from './services.gen';

@@ -22,2 +23,3 @@ import { ProductsService } from './services.gen';

public readonly checkoutSessions: CheckoutSessionsService;
public readonly lifi: LifiService;
public readonly lydia: LydiaService;

@@ -51,2 +53,3 @@ public readonly products: ProductsService;

this.checkoutSessions = new CheckoutSessionsService(this.request);
this.lifi = new LifiService(this.request);
this.lydia = new LydiaService(this.request);

@@ -53,0 +56,0 @@ this.products = new ProductsService(this.request);

@@ -5,2 +5,3 @@ import type { BaseHttpRequest } from './core/BaseHttpRequest';

import { CheckoutSessionsService } from './services.gen';
import { LifiService } from './services.gen';
import { LydiaService } from './services.gen';

@@ -16,2 +17,3 @@ import { ProductsService } from './services.gen';

readonly checkoutSessions: CheckoutSessionsService;
readonly lifi: LifiService;
readonly lydia: LydiaService;

@@ -18,0 +20,0 @@ readonly products: ProductsService;

@@ -5,2 +5,3 @@ import { Interceptors } from './core/OpenAPI';

import { CheckoutSessionsService } from './services.gen';
import { LifiService } from './services.gen';
import { LydiaService } from './services.gen';

@@ -31,2 +32,3 @@ import { ProductsService } from './services.gen';

this.checkoutSessions = new CheckoutSessionsService(this.request);
this.lifi = new LifiService(this.request);
this.lydia = new LydiaService(this.request);

@@ -33,0 +35,0 @@ this.products = new ProductsService(this.request);

2

dist/core/request.d.ts

@@ -14,3 +14,3 @@ import type { ApiRequestOptions } from './ApiRequestOptions';

type Resolver<T> = (options: ApiRequestOptions<T>) => Promise<T>;
export declare const resolve: <T>(options: ApiRequestOptions<T>, resolver?: T | Resolver<T>) => Promise<T>;
export declare const resolve: <T>(options: ApiRequestOptions<T>, resolver?: T | Resolver<T>) => Promise<T | undefined>;
export declare const getHeaders: <T>(config: OpenAPIConfig, options: ApiRequestOptions<T>) => Promise<Headers>;

@@ -17,0 +17,0 @@ export declare const getRequestBody: (options: ApiRequestOptions) => unknown;

@@ -105,2 +105,8 @@ export declare const $LydiaSettings: {

readonly properties: {
readonly chainId: {
readonly type: "integer";
readonly format: "int64";
readonly readOnly: true;
readonly example: 137;
};
readonly name: {

@@ -308,2 +314,9 @@ readonly type: "string";

};
readonly salesWallet: {
readonly description: "Wallet (ideally a Safe) collecting sales for crypto purchases";
readonly type: "string";
readonly example: "0x3D9819210A31b4961b30EF54bE2aeD79B9c9Cd3B";
readonly pattern: "^0x[a-fA-F0-9]{40}$";
readonly nullable: true;
};
};

@@ -325,2 +338,11 @@ };

};
export declare const $CheckoutSessionMetadata: {
readonly additionalProperties: true;
readonly description: "Metadata";
readonly example: {
readonly orderRef: "something";
readonly nftName: "Something";
};
readonly default: {};
};
export declare const $CheckoutSessionRequest: {

@@ -356,2 +378,12 @@ readonly additionalProperties: false;

};
readonly firstName: {
readonly description: "First name of the buyer";
readonly type: "string";
readonly example: "John";
};
readonly lastName: {
readonly description: "Last name of the buyer";
readonly type: "string";
readonly example: "Doe";
};
readonly parameters: {

@@ -373,2 +405,6 @@ readonly description: "Parameters required for the smart-contract call";

};
readonly metadata: {
readonly description: "Extra parameters given back as-is";
readonly $ref: "#/components/schemas/CheckoutSessionMetadata";
};
};

@@ -398,43 +434,2 @@ };

};
export declare const $Permit2Request: {
readonly additionalProperties: false;
readonly description: "`Permit2` data with signature";
readonly type: "object";
readonly required: readonly ["transactionId", "nonce", "deadline", "signature"];
readonly properties: {
readonly transactionId: {
readonly type: "string";
readonly nullable: false;
};
readonly nonce: {
readonly type: "string";
readonly nullable: false;
};
readonly deadline: {
readonly type: "string";
readonly nullable: false;
};
readonly signature: {
readonly type: "string";
readonly nullable: false;
};
};
};
export declare const $CryptoPurchaseTransactionToSign: {
readonly additionalProperties: false;
readonly properties: {
readonly to: {
readonly type: "string";
readonly nullable: false;
};
readonly data: {
readonly type: "string";
readonly nullable: false;
};
readonly value: {
readonly type: "string";
readonly nullable: false;
};
};
};
export declare const $PageLimit: {

@@ -552,2 +547,21 @@ readonly type: "number";

};
readonly email: {
readonly description: "Email address of the user making the purchase";
readonly type: "string";
readonly format: "email";
readonly nullable: true;
readonly readOnly: true;
};
readonly firstName: {
readonly description: "First name of the buyer";
readonly type: "string";
readonly readOnly: true;
readonly example: "John";
};
readonly lastName: {
readonly description: "Last name of the buyer";
readonly type: "string";
readonly readOnly: true;
readonly example: "Doe";
};
readonly createdAt: {

@@ -560,2 +574,7 @@ readonly description: "Date of creation of the transaction";

};
readonly metadata: {
readonly description: "Extra parameters given back as-is";
readonly $ref: "#/components/schemas/CheckoutSessionMetadata";
readonly readOnly: true;
};
};

@@ -578,9 +597,2 @@ };

readonly properties: {
readonly email: {
readonly description: "Email address of the user making the purchase";
readonly type: "string";
readonly format: "email";
readonly nullable: true;
readonly readOnly: true;
};
readonly pspInfos: {

@@ -830,2 +842,8 @@ readonly description: "Any data specific to the checkout session for this PSP";

};
export declare const $TransactionHash: {
readonly type: "string";
readonly description: "The hash on an Ethereum transaction";
readonly example: "0xbd1286efb1d26626ea9277d0ea465b083131001c607f967eaa54777bf34ba240";
readonly pattern: "^0x[a-fA-F0-9]{64}$";
};
export declare const $AdminWhitelistRequest: {

@@ -832,0 +850,0 @@ readonly type: "object";

@@ -106,2 +106,8 @@ // This file is auto-generated by @hey-api/openapi-ts

properties: {
chainId: {
type: 'integer',
format: 'int64',
readOnly: true,
example: 137
},
name: {

@@ -314,2 +320,9 @@ type: 'string',

example: 'https://example.com/my-webhook'
},
salesWallet: {
description: 'Wallet (ideally a Safe) collecting sales for crypto purchases',
type: 'string',
example: '0x3D9819210A31b4961b30EF54bE2aeD79B9c9Cd3B',
pattern: '^0x[a-fA-F0-9]{40}$',
nullable: true
}

@@ -332,2 +345,11 @@ }

};
export const $CheckoutSessionMetadata = {
additionalProperties: true,
description: 'Metadata',
example: {
orderRef: 'something',
nftName: 'Something'
},
default: {}
};
export const $CheckoutSessionRequest = {

@@ -367,2 +389,12 @@ additionalProperties: false,

},
firstName: {
description: 'First name of the buyer',
type: 'string',
example: 'John'
},
lastName: {
description: 'Last name of the buyer',
type: 'string',
example: 'Doe'
},
parameters: {

@@ -383,2 +415,6 @@ description: 'Parameters required for the smart-contract call',

format: 'uri'
},
metadata: {
description: 'Extra parameters given back as-is',
'$ref': '#/components/schemas/CheckoutSessionMetadata'
}

@@ -409,43 +445,2 @@ }

};
export const $Permit2Request = {
additionalProperties: false,
description: `\`Permit2\` data with signature`,
type: 'object',
required: ['transactionId', 'nonce', 'deadline', 'signature'],
properties: {
transactionId: {
type: 'string',
nullable: false
},
nonce: {
type: 'string',
nullable: false
},
deadline: {
type: 'string',
nullable: false
},
signature: {
type: 'string',
nullable: false
}
}
};
export const $CryptoPurchaseTransactionToSign = {
additionalProperties: false,
properties: {
to: {
type: 'string',
nullable: false
},
data: {
type: 'string',
nullable: false
},
value: {
type: 'string',
nullable: false
}
}
};
export const $PageLimit = {

@@ -563,2 +558,21 @@ type: 'number',

},
email: {
description: 'Email address of the user making the purchase',
type: 'string',
format: 'email',
nullable: true,
readOnly: true
},
firstName: {
description: 'First name of the buyer',
type: 'string',
readOnly: true,
example: 'John'
},
lastName: {
description: 'Last name of the buyer',
type: 'string',
readOnly: true,
example: 'Doe'
},
createdAt: {

@@ -570,2 +584,7 @@ description: 'Date of creation of the transaction',

example: '2024-09-01T12:00:00Z'
},
metadata: {
description: 'Extra parameters given back as-is',
'$ref': '#/components/schemas/CheckoutSessionMetadata',
readOnly: true
}

@@ -595,9 +614,2 @@ }

properties: {
email: {
description: 'Email address of the user making the purchase',
type: 'string',
format: 'email',
nullable: true,
readOnly: true
},
pspInfos: {

@@ -850,2 +862,8 @@ description: 'Any data specific to the checkout session for this PSP',

};
export const $TransactionHash = {
type: 'string',
description: 'The hash on an Ethereum transaction',
example: '0xbd1286efb1d26626ea9277d0ea465b083131001c607f967eaa54777bf34ba240',
pattern: '^0x[a-fA-F0-9]{64}$'
};
export const $AdminWhitelistRequest = {

@@ -852,0 +870,0 @@ type: 'object',

import type { CancelablePromise } from './core/CancelablePromise';
import type { BaseHttpRequest } from './core/BaseHttpRequest';
import type { GetProjectSettingsResponse, SetProjectSettingsData, SetProjectSettingsResponse, UpdateProjectSettingsData, UpdateProjectSettingsResponse, GetPublicProjectSettingsResponse, GetProductsResponse, CreateProductData, CreateProductResponse, GetProductByIdData, GetProductByIdResponse, UpdateProductData, UpdateProductResponse, DeleteProductData, DeleteProductResponse, CreateCheckoutSessionData, CreateCheckoutSessionResponse, GetCrypto2CryptoTransactionToSignData, GetCrypto2CryptoTransactionToSignResponse, GetTransactionsData, GetTransactionsResponse, GetTransactionByIdData, GetTransactionByIdResponse, RetryTransactionByIdData, RetryTransactionByIdResponse, GetPublicTransactionByIdData, GetPublicTransactionByIdResponse, LydiaHandleEventData, LydiaHandleEventResponse, StripeCreateConnectAccountData, StripeCreateConnectAccountResponse, StripeLinkConnectAccountData, StripeLinkConnectAccountResponse, StripeHandleEventData, StripeHandleEventResponse, WhitelistClientContractData, WhitelistClientContractResponse, GetWhitelistedContractsOfProjectData, GetWhitelistedContractsOfProjectResponse, DeleteFromWhitelistOfProjectData, DeleteFromWhitelistOfProjectResponse, UpdateWhitelistContractData, UpdateWhitelistContractResponse, GetProjectFeePercentagesResponse, UpdateProjectFeePercentageData, UpdateProjectFeePercentageResponse, AddContractToReviewData, AddContractToReviewResponse, GetWhitelistedContractsResponse } from './types.gen';
import type { GetProjectSettingsResponse, SetProjectSettingsData, SetProjectSettingsResponse, UpdateProjectSettingsData, UpdateProjectSettingsResponse, GetPublicProjectSettingsResponse, GetProductsResponse, CreateProductData, CreateProductResponse, GetProductByIdData, GetProductByIdResponse, UpdateProductData, UpdateProductResponse, DeleteProductData, DeleteProductResponse, CreateCheckoutSessionData, CreateCheckoutSessionResponse, GetTransactionsData, GetTransactionsResponse, GetTransactionByIdData, GetTransactionByIdResponse, RetryTransactionByIdData, RetryTransactionByIdResponse, GetPublicTransactionByIdData, GetPublicTransactionByIdResponse, LydiaHandleEventData, LydiaHandleEventResponse, StripeCreateConnectAccountData, StripeCreateConnectAccountResponse, StripeLinkConnectAccountData, StripeLinkConnectAccountResponse, StripeHandleEventData, StripeHandleEventResponse, LifiTrackTransactionData, LifiTrackTransactionResponse, WhitelistClientContractData, WhitelistClientContractResponse, GetWhitelistedContractsOfProjectData, GetWhitelistedContractsOfProjectResponse, DeleteFromWhitelistOfProjectData, DeleteFromWhitelistOfProjectResponse, UpdateWhitelistContractData, UpdateWhitelistContractResponse, GetProjectFeePercentagesResponse, UpdateProjectFeePercentageData, UpdateProjectFeePercentageResponse, AddContractToReviewData, AddContractToReviewResponse, GetWhitelistedContractsResponse } from './types.gen';
export declare class SettingsService {

@@ -100,11 +100,2 @@ readonly httpRequest: BaseHttpRequest;

createCheckoutSession(data: CreateCheckoutSessionData): CancelablePromise<CreateCheckoutSessionResponse>;
/**
* Get transaction the user has to sign
* Only for crypto purchases.
* @param data The data for the request.
* @param data.requestBody
* @returns CryptoPurchaseTransactionToSign URL where to redirect user to begin the purchase funnel
* @throws ApiError
*/
getCrypto2CryptoTransactionToSign(data: GetCrypto2CryptoTransactionToSignData): CancelablePromise<GetCrypto2CryptoTransactionToSignResponse>;
}

@@ -199,2 +190,14 @@ export declare class TransactionsService {

}
export declare class LifiService {
readonly httpRequest: BaseHttpRequest;
constructor(httpRequest: BaseHttpRequest);
/**
* Submit a LI.FI bridge transaction to be tracked by Checkout.
* @param data The data for the request.
* @param data.requestBody
* @returns unknown LI.FI transaction will be tracked
* @throws ApiError
*/
lifiTrackTransaction(data: LifiTrackTransactionData): CancelablePromise<LifiTrackTransactionResponse>;
}
export declare class AdminService {

@@ -201,0 +204,0 @@ readonly httpRequest: BaseHttpRequest;

@@ -245,26 +245,2 @@ // This file is auto-generated by @hey-api/openapi-ts

}
/**
* Get transaction the user has to sign
* Only for crypto purchases.
* @param data The data for the request.
* @param data.requestBody
* @returns CryptoPurchaseTransactionToSign URL where to redirect user to begin the purchase funnel
* @throws ApiError
*/
getCrypto2CryptoTransactionToSign(data) {
return this.httpRequest.request({
method: 'POST',
url: '/checkout-sessions/crypto',
body: data.requestBody,
mediaType: 'application/json',
errors: {
400: 'Invalid input, object invalid.',
403: 'Resource is access restricted.',
404: 'Ressource not found.',
422: 'Unprocessable entity.',
500: 'Internal server error',
503: 'Service unavailable error'
}
});
}
}

@@ -464,2 +440,22 @@ export class TransactionsService {

}
export class LifiService {
constructor(httpRequest) {
this.httpRequest = httpRequest;
}
/**
* Submit a LI.FI bridge transaction to be tracked by Checkout.
* @param data The data for the request.
* @param data.requestBody
* @returns unknown LI.FI transaction will be tracked
* @throws ApiError
*/
lifiTrackTransaction(data) {
return this.httpRequest.request({
method: 'POST',
url: '/lifi/transactions',
body: data.requestBody,
mediaType: 'application/json'
});
}
}
export class AdminService {

@@ -466,0 +462,0 @@ constructor(httpRequest) {

@@ -73,2 +73,3 @@ export type LydiaSettings = {

export type Network = {
readonly chainId?: number;
readonly name?: string;

@@ -195,2 +196,6 @@ readonly type?: 'mainnet' | 'testnet';

webhookEndpoint?: string | null;
/**
* Wallet (ideally a Safe) collecting sales for crypto purchases
*/
salesWallet?: string | null;
};

@@ -205,2 +210,6 @@ /**

export type CheckoutSessionParameters = unknown;
/**
* Metadata
*/
export type CheckoutSessionMetadata = unknown;
export type CheckoutSessionRequest = {

@@ -232,2 +241,10 @@ /**

/**
* First name of the buyer
*/
firstName?: string;
/**
* Last name of the buyer
*/
lastName?: string;
/**
* Parameters required for the smart-contract call

@@ -244,2 +261,6 @@ */

failUrl?: string;
/**
* Extra parameters given back as-is
*/
metadata?: CheckoutSessionMetadata;
};

@@ -258,16 +279,2 @@ export type CheckoutSessionResponse = {

/**
* `Permit2` data with signature
*/
export type Permit2Request = {
transactionId: string;
nonce: string;
deadline: string;
signature: string;
};
export type CryptoPurchaseTransactionToSign = {
to?: string;
data?: string;
value?: string;
};
/**
* The number of items to return per request. If limit is 0, then no limit is applied.

@@ -330,5 +337,21 @@ */

/**
* Email address of the user making the purchase
*/
readonly email?: string | null;
/**
* First name of the buyer
*/
readonly firstName?: string;
/**
* Last name of the buyer
*/
readonly lastName?: string;
/**
* Date of creation of the transaction
*/
readonly createdAt: string;
/**
* Extra parameters given back as-is
*/
readonly metadata?: CheckoutSessionMetadata;
};

@@ -368,6 +391,2 @@ export type pspType = 'Lydia' | 'Stripe' | 'Crypto';

/**
* Email address of the user making the purchase
*/
readonly email: string | null;
/**
* Any data specific to the checkout session for this PSP

@@ -489,2 +508,6 @@ */

};
/**
* The hash on an Ethereum transaction
*/
export type TransactionHash = string;
export type AdminWhitelistRequest = {

@@ -608,6 +631,2 @@ /**

export type CreateCheckoutSessionResponse = CheckoutSessionResponse;
export type GetCrypto2CryptoTransactionToSignData = {
requestBody: Permit2Request;
};
export type GetCrypto2CryptoTransactionToSignResponse = CryptoPurchaseTransactionToSign;
export type GetTransactionsData = {

@@ -654,2 +673,10 @@ limit?: PageLimit;

};
export type LifiTrackTransactionData = {
requestBody: {
transactionId: string;
fromChainId: number;
fromTransactionHash: TransactionHash;
};
};
export type LifiTrackTransactionResponse = unknown;
export type WhitelistClientContractData = {

@@ -1129,51 +1156,2 @@ requestBody: AdminWhitelistRequest;

};
'/checkout-sessions/crypto': {
post: {
req: GetCrypto2CryptoTransactionToSignData;
res: {
/**
* URL where to redirect user to begin the purchase funnel
*/
200: CryptoPurchaseTransactionToSign;
/**
* Invalid input, object invalid.
*/
400: {
message?: string;
};
/**
* Resource is access restricted.
*/
403: {
message?: string;
};
/**
* Ressource not found.
*/
404: {
message?: string;
};
/**
* Unprocessable entity.
*/
422: {
message?: string;
};
/**
* Internal server error
*/
500: {
message?: string;
errors?: unknown[];
};
/**
* Service unavailable error
*/
503: {
message?: string;
errors?: unknown[];
};
};
};
};
'/transactions': {

@@ -1439,2 +1417,13 @@ get: {

};
'/lifi/transactions': {
post: {
req: LifiTrackTransactionData;
res: {
/**
* LI.FI transaction will be tracked
*/
200: unknown;
};
};
};
'/admin/whitelists': {

@@ -1441,0 +1430,0 @@ post: {

{
"name": "@cometh/checkout-sdk",
"version": "2.2.2",
"version": "2.3.0",
"description": "SDK to use Cometh Checkout API",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -115,2 +115,8 @@ // This file is auto-generated by @hey-api/openapi-ts

properties: {
chainId: {
type: 'integer',
format: 'int64',
readOnly: true,
example: 137
},
name: {

@@ -332,2 +338,9 @@ type: 'string',

example: 'https://example.com/my-webhook'
},
salesWallet: {
description: 'Wallet (ideally a Safe) collecting sales for crypto purchases',
type: 'string',
example: '0x3D9819210A31b4961b30EF54bE2aeD79B9c9Cd3B',
pattern: '^0x[a-fA-F0-9]{40}$',
nullable: true
}

@@ -353,2 +366,12 @@ }

export const $CheckoutSessionMetadata = {
additionalProperties: true,
description: 'Metadata',
example: {
orderRef: 'something',
nftName: 'Something'
},
default: {}
} as const;
export const $CheckoutSessionRequest = {

@@ -388,2 +411,12 @@ additionalProperties: false,

},
firstName: {
description: 'First name of the buyer',
type: 'string',
example: 'John'
},
lastName: {
description: 'Last name of the buyer',
type: 'string',
example: 'Doe'
},
parameters: {

@@ -404,2 +437,6 @@ description: 'Parameters required for the smart-contract call',

format: 'uri'
},
metadata: {
description: 'Extra parameters given back as-is',
'$ref': '#/components/schemas/CheckoutSessionMetadata'
}

@@ -432,45 +469,2 @@ }

export const $Permit2Request = {
additionalProperties: false,
description: `\`Permit2\` data with signature`,
type: 'object',
required: ['transactionId', 'nonce', 'deadline', 'signature'],
properties: {
transactionId: {
type: 'string',
nullable: false
},
nonce: {
type: 'string',
nullable: false
},
deadline: {
type: 'string',
nullable: false
},
signature: {
type: 'string',
nullable: false
}
}
} as const;
export const $CryptoPurchaseTransactionToSign = {
additionalProperties: false,
properties: {
to: {
type: 'string',
nullable: false
},
data: {
type: 'string',
nullable: false
},
value: {
type: 'string',
nullable: false
}
}
} as const;
export const $PageLimit = {

@@ -590,2 +584,21 @@ type: 'number',

},
email: {
description: 'Email address of the user making the purchase',
type: 'string',
format: 'email',
nullable: true,
readOnly: true
},
firstName: {
description: 'First name of the buyer',
type: 'string',
readOnly: true,
example: 'John'
},
lastName: {
description: 'Last name of the buyer',
type: 'string',
readOnly: true,
example: 'Doe'
},
createdAt: {

@@ -597,2 +610,7 @@ description: 'Date of creation of the transaction',

example: '2024-09-01T12:00:00Z'
},
metadata: {
description: 'Extra parameters given back as-is',
'$ref': '#/components/schemas/CheckoutSessionMetadata',
readOnly: true
}

@@ -624,9 +642,2 @@ }

properties: {
email: {
description: 'Email address of the user making the purchase',
type: 'string',
format: 'email',
nullable: true,
readOnly: true
},
pspInfos: {

@@ -888,2 +899,9 @@ description: 'Any data specific to the checkout session for this PSP',

export const $TransactionHash = {
type: 'string',
description: 'The hash on an Ethereum transaction',
example: '0xbd1286efb1d26626ea9277d0ea465b083131001c607f967eaa54777bf34ba240',
pattern: '^0x[a-fA-F0-9]{64}$'
} as const;
export const $AdminWhitelistRequest = {

@@ -890,0 +908,0 @@ type: 'object',

@@ -5,3 +5,3 @@ // This file is auto-generated by @hey-api/openapi-ts

import type { BaseHttpRequest } from './core/BaseHttpRequest';
import type { GetProjectSettingsResponse, SetProjectSettingsData, SetProjectSettingsResponse, UpdateProjectSettingsData, UpdateProjectSettingsResponse, GetPublicProjectSettingsResponse, GetProductsResponse, CreateProductData, CreateProductResponse, GetProductByIdData, GetProductByIdResponse, UpdateProductData, UpdateProductResponse, DeleteProductData, DeleteProductResponse, CreateCheckoutSessionData, CreateCheckoutSessionResponse, GetCrypto2CryptoTransactionToSignData, GetCrypto2CryptoTransactionToSignResponse, GetTransactionsData, GetTransactionsResponse, GetTransactionByIdData, GetTransactionByIdResponse, RetryTransactionByIdData, RetryTransactionByIdResponse, GetPublicTransactionByIdData, GetPublicTransactionByIdResponse, LydiaHandleEventData, LydiaHandleEventResponse, StripeCreateConnectAccountData, StripeCreateConnectAccountResponse, StripeLinkConnectAccountData, StripeLinkConnectAccountResponse, StripeHandleEventData, StripeHandleEventResponse, WhitelistClientContractData, WhitelistClientContractResponse, GetWhitelistedContractsOfProjectData, GetWhitelistedContractsOfProjectResponse, DeleteFromWhitelistOfProjectData, DeleteFromWhitelistOfProjectResponse, UpdateWhitelistContractData, UpdateWhitelistContractResponse, GetProjectFeePercentagesResponse, UpdateProjectFeePercentageData, UpdateProjectFeePercentageResponse, AddContractToReviewData, AddContractToReviewResponse, GetWhitelistedContractsResponse } from './types.gen';
import type { GetProjectSettingsResponse, SetProjectSettingsData, SetProjectSettingsResponse, UpdateProjectSettingsData, UpdateProjectSettingsResponse, GetPublicProjectSettingsResponse, GetProductsResponse, CreateProductData, CreateProductResponse, GetProductByIdData, GetProductByIdResponse, UpdateProductData, UpdateProductResponse, DeleteProductData, DeleteProductResponse, CreateCheckoutSessionData, CreateCheckoutSessionResponse, GetTransactionsData, GetTransactionsResponse, GetTransactionByIdData, GetTransactionByIdResponse, RetryTransactionByIdData, RetryTransactionByIdResponse, GetPublicTransactionByIdData, GetPublicTransactionByIdResponse, LydiaHandleEventData, LydiaHandleEventResponse, StripeCreateConnectAccountData, StripeCreateConnectAccountResponse, StripeLinkConnectAccountData, StripeLinkConnectAccountResponse, StripeHandleEventData, StripeHandleEventResponse, LifiTrackTransactionData, LifiTrackTransactionResponse, WhitelistClientContractData, WhitelistClientContractResponse, GetWhitelistedContractsOfProjectData, GetWhitelistedContractsOfProjectResponse, DeleteFromWhitelistOfProjectData, DeleteFromWhitelistOfProjectResponse, UpdateWhitelistContractData, UpdateWhitelistContractResponse, GetProjectFeePercentagesResponse, UpdateProjectFeePercentageData, UpdateProjectFeePercentageResponse, AddContractToReviewData, AddContractToReviewResponse, GetWhitelistedContractsResponse } from './types.gen';

@@ -260,27 +260,2 @@ export class SettingsService {

/**
* Get transaction the user has to sign
* Only for crypto purchases.
* @param data The data for the request.
* @param data.requestBody
* @returns CryptoPurchaseTransactionToSign URL where to redirect user to begin the purchase funnel
* @throws ApiError
*/
public getCrypto2CryptoTransactionToSign(data: GetCrypto2CryptoTransactionToSignData): CancelablePromise<GetCrypto2CryptoTransactionToSignResponse> {
return this.httpRequest.request({
method: 'POST',
url: '/checkout-sessions/crypto',
body: data.requestBody,
mediaType: 'application/json',
errors: {
400: 'Invalid input, object invalid.',
403: 'Resource is access restricted.',
404: 'Ressource not found.',
422: 'Unprocessable entity.',
500: 'Internal server error',
503: 'Service unavailable error'
}
});
}
}

@@ -489,2 +464,23 @@

export class LifiService {
constructor(public readonly httpRequest: BaseHttpRequest) { }
/**
* Submit a LI.FI bridge transaction to be tracked by Checkout.
* @param data The data for the request.
* @param data.requestBody
* @returns unknown LI.FI transaction will be tracked
* @throws ApiError
*/
public lifiTrackTransaction(data: LifiTrackTransactionData): CancelablePromise<LifiTrackTransactionResponse> {
return this.httpRequest.request({
method: 'POST',
url: '/lifi/transactions',
body: data.requestBody,
mediaType: 'application/json'
});
}
}
export class AdminService {

@@ -491,0 +487,0 @@ constructor(public readonly httpRequest: BaseHttpRequest) { }

@@ -87,2 +87,3 @@ // This file is auto-generated by @hey-api/openapi-ts

export type Network = {
readonly chainId?: number;
readonly name?: string;

@@ -221,2 +222,6 @@ readonly type?: 'mainnet' | 'testnet';

webhookEndpoint?: string | null;
/**
* Wallet (ideally a Safe) collecting sales for crypto purchases
*/
salesWallet?: string | null;
};

@@ -234,2 +239,7 @@

/**
* Metadata
*/
export type CheckoutSessionMetadata = unknown;
export type CheckoutSessionRequest = {

@@ -261,2 +271,10 @@ /**

/**
* First name of the buyer
*/
firstName?: string;
/**
* Last name of the buyer
*/
lastName?: string;
/**
* Parameters required for the smart-contract call

@@ -273,2 +291,6 @@ */

failUrl?: string;
/**
* Extra parameters given back as-is
*/
metadata?: CheckoutSessionMetadata;
};

@@ -289,18 +311,2 @@

/**
* `Permit2` data with signature
*/
export type Permit2Request = {
transactionId: string;
nonce: string;
deadline: string;
signature: string;
};
export type CryptoPurchaseTransactionToSign = {
to?: string;
data?: string;
value?: string;
};
/**
* The number of items to return per request. If limit is 0, then no limit is applied.

@@ -365,5 +371,21 @@ */

/**
* Email address of the user making the purchase
*/
readonly email?: string | null;
/**
* First name of the buyer
*/
readonly firstName?: string;
/**
* Last name of the buyer
*/
readonly lastName?: string;
/**
* Date of creation of the transaction
*/
readonly createdAt: string;
/**
* Extra parameters given back as-is
*/
readonly metadata?: CheckoutSessionMetadata;
};

@@ -409,6 +431,2 @@

/**
* Email address of the user making the purchase
*/
readonly email: string | null;
/**
* Any data specific to the checkout session for this PSP

@@ -541,2 +559,7 @@ */

/**
* The hash on an Ethereum transaction
*/
export type TransactionHash = string;
export type AdminWhitelistRequest = {

@@ -687,8 +710,2 @@ /**

export type GetCrypto2CryptoTransactionToSignData = {
requestBody: Permit2Request;
};
export type GetCrypto2CryptoTransactionToSignResponse = CryptoPurchaseTransactionToSign;
export type GetTransactionsData = {

@@ -751,2 +768,12 @@ limit?: PageLimit;

export type LifiTrackTransactionData = {
requestBody: {
transactionId: string;
fromChainId: number;
fromTransactionHash: TransactionHash;
};
};
export type LifiTrackTransactionResponse = unknown;
export type WhitelistClientContractData = {

@@ -1240,51 +1267,2 @@ requestBody: AdminWhitelistRequest;

};
'/checkout-sessions/crypto': {
post: {
req: GetCrypto2CryptoTransactionToSignData;
res: {
/**
* URL where to redirect user to begin the purchase funnel
*/
200: CryptoPurchaseTransactionToSign;
/**
* Invalid input, object invalid.
*/
400: {
message?: string;
};
/**
* Resource is access restricted.
*/
403: {
message?: string;
};
/**
* Ressource not found.
*/
404: {
message?: string;
};
/**
* Unprocessable entity.
*/
422: {
message?: string;
};
/**
* Internal server error
*/
500: {
message?: string;
errors?: unknown[];
};
/**
* Service unavailable error
*/
503: {
message?: string;
errors?: unknown[];
};
};
};
};
'/transactions': {

@@ -1550,2 +1528,13 @@ get: {

};
'/lifi/transactions': {
post: {
req: LifiTrackTransactionData;
res: {
/**
* LI.FI transaction will be tracked
*/
200: unknown;
};
};
};
'/admin/whitelists': {

@@ -1552,0 +1541,0 @@ post: {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc