@blocklet/payment-types 1.17.4 → 1.17.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/payment-currency.d.ts +2 -0
- package/lib/payment-method.d.ts +2 -2
- package/lib/types.d.ts +24 -1
- package/package.json +2 -2
|
@@ -100,5 +100,7 @@ export declare class PaymentCurrency extends Model<InferAttributes<PaymentCurren
|
|
|
100
100
|
static initialize(sequelize: any): void;
|
|
101
101
|
static associate(models: any): void;
|
|
102
102
|
static findByPkOrSymbol(id: string, options?: FindOptions<PaymentCurrency>): Promise<PaymentCurrency | null>;
|
|
103
|
+
isLocked(): Promise<boolean>;
|
|
104
|
+
isUsed(): Promise<boolean>;
|
|
103
105
|
}
|
|
104
106
|
export type TPaymentCurrency = InferAttributes<PaymentCurrency>;
|
package/lib/payment-method.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare class PaymentMethod extends Model<InferAttributes<PaymentMethod>,
|
|
|
9
9
|
active: boolean;
|
|
10
10
|
livemode: boolean;
|
|
11
11
|
locked: boolean;
|
|
12
|
-
type: LiteralUnion<'stripe' | 'arcblock' | 'ethereum' | 'bitcoin', string>;
|
|
12
|
+
type: LiteralUnion<'stripe' | 'arcblock' | 'ethereum' | 'bitcoin' | 'base', string>;
|
|
13
13
|
name: string;
|
|
14
14
|
description: string;
|
|
15
15
|
logo: string;
|
|
@@ -47,7 +47,7 @@ export declare class PaymentMethod extends Model<InferAttributes<PaymentMethod>,
|
|
|
47
47
|
defaultValue: boolean;
|
|
48
48
|
};
|
|
49
49
|
type: {
|
|
50
|
-
type: DataTypes.EnumDataType<"arcblock" | "ethereum" | "bitcoin" | "stripe">;
|
|
50
|
+
type: DataTypes.EnumDataType<"arcblock" | "ethereum" | "base" | "bitcoin" | "stripe">;
|
|
51
51
|
};
|
|
52
52
|
name: {
|
|
53
53
|
type: DataTypes.StringDataType;
|
package/lib/types.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import type { LiteralUnion } from 'type-fest';
|
|
2
|
+
export type EVMChainType = 'ethereum' | 'base';
|
|
3
|
+
export type NFTMintChainType = 'arcblock' | EVMChainType;
|
|
4
|
+
export type ChainType = 'arcblock' | 'bitcoin' | 'stripe' | EVMChainType;
|
|
2
5
|
export type GroupedBN = {
|
|
3
6
|
[currencyId: string]: string;
|
|
4
7
|
};
|
|
@@ -190,6 +193,10 @@ export type PaymentMethodOptions = {
|
|
|
190
193
|
payer: string;
|
|
191
194
|
hash?: string;
|
|
192
195
|
};
|
|
196
|
+
base?: {
|
|
197
|
+
payer: string;
|
|
198
|
+
hash?: string;
|
|
199
|
+
};
|
|
193
200
|
stripe?: {
|
|
194
201
|
payer: string;
|
|
195
202
|
};
|
|
@@ -218,6 +225,13 @@ export type PaymentMethodSettings = {
|
|
|
218
225
|
api_host: string;
|
|
219
226
|
explorer_host: string;
|
|
220
227
|
};
|
|
228
|
+
base?: {
|
|
229
|
+
chain_id: string;
|
|
230
|
+
api_host: string;
|
|
231
|
+
explorer_host: string;
|
|
232
|
+
native_symbol: string;
|
|
233
|
+
confirmation: number;
|
|
234
|
+
};
|
|
221
235
|
};
|
|
222
236
|
export type PaymentSettings = {
|
|
223
237
|
payment_method_options: PaymentMethodOptions;
|
|
@@ -249,6 +263,14 @@ export type PaymentDetails = {
|
|
|
249
263
|
gas_price: string;
|
|
250
264
|
type?: LiteralUnion<'transfer' | 'approve', string>;
|
|
251
265
|
};
|
|
266
|
+
base?: {
|
|
267
|
+
tx_hash: string;
|
|
268
|
+
payer: string;
|
|
269
|
+
block_height: string;
|
|
270
|
+
gas_used: string;
|
|
271
|
+
gas_price: string;
|
|
272
|
+
type?: LiteralUnion<'transfer' | 'approve', string>;
|
|
273
|
+
};
|
|
252
274
|
bitcoin?: {
|
|
253
275
|
tx_hash: string;
|
|
254
276
|
payer: string;
|
|
@@ -310,9 +332,10 @@ export interface NftMintItem {
|
|
|
310
332
|
error?: string;
|
|
311
333
|
}
|
|
312
334
|
export type NftMintDetails = {
|
|
313
|
-
type:
|
|
335
|
+
type: NFTMintChainType;
|
|
314
336
|
arcblock?: NftMintItem;
|
|
315
337
|
ethereum?: NftMintItem;
|
|
338
|
+
base?: NftMintItem;
|
|
316
339
|
};
|
|
317
340
|
export type SubscriptionData = {
|
|
318
341
|
description: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/payment-types",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.6",
|
|
4
4
|
"description": "Typings for Payment Kit SDK",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"types",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"sequelize": "^6.37.3",
|
|
49
49
|
"type-fest": "^4.23.0"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "50e93ab4340be53c9d9bd18718c6db26048578c5"
|
|
52
52
|
}
|