@blocklet/payment-types 1.13.215 → 1.13.217
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-method.d.ts +2 -0
- package/lib/types.d.ts +7 -3
- package/package.json +2 -2
package/lib/payment-method.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import OcapClient from '@ocap/client';
|
|
2
|
+
import { JsonRpcProvider } from 'ethers';
|
|
2
3
|
import { CreationOptional, DataTypes, InferAttributes, InferCreationAttributes, Model } from 'sequelize';
|
|
3
4
|
import Stripe from 'stripe';
|
|
4
5
|
import type { LiteralUnion } from 'type-fest';
|
|
@@ -97,6 +98,7 @@ export declare class PaymentMethod extends Model<InferAttributes<PaymentMethod>,
|
|
|
97
98
|
static decryptSettings(settings: PaymentMethodSettings): PaymentMethodSettings;
|
|
98
99
|
getStripeClient(): Stripe;
|
|
99
100
|
getOcapClient(): OcapClient;
|
|
101
|
+
getEvmClient(): JsonRpcProvider;
|
|
100
102
|
static supportAutoCharge(id: string): Promise<boolean | null>;
|
|
101
103
|
}
|
|
102
104
|
export type TPaymentMethod = InferAttributes<PaymentMethod>;
|
package/lib/types.d.ts
CHANGED
|
@@ -202,9 +202,11 @@ export type PaymentMethodSettings = {
|
|
|
202
202
|
explorer_host: string;
|
|
203
203
|
};
|
|
204
204
|
ethereum?: {
|
|
205
|
-
chain_id:
|
|
205
|
+
chain_id: string;
|
|
206
206
|
api_host: string;
|
|
207
207
|
explorer_host: string;
|
|
208
|
+
native_symbol: string;
|
|
209
|
+
confirmation: number;
|
|
208
210
|
};
|
|
209
211
|
bitcoin?: {
|
|
210
212
|
chain_id: number;
|
|
@@ -235,8 +237,10 @@ export type PaymentDetails = {
|
|
|
235
237
|
ethereum?: {
|
|
236
238
|
tx_hash: string;
|
|
237
239
|
payer: string;
|
|
238
|
-
block_height:
|
|
239
|
-
|
|
240
|
+
block_height: string;
|
|
241
|
+
gas_used: string;
|
|
242
|
+
gas_price: string;
|
|
243
|
+
type?: LiteralUnion<'transfer' | 'approve', string>;
|
|
240
244
|
};
|
|
241
245
|
bitcoin?: {
|
|
242
246
|
tx_hash: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/payment-types",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.217",
|
|
4
4
|
"description": "Typings for Payment Kit SDK",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"types",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"sequelize": "^6.36.0",
|
|
49
49
|
"type-fest": "^4.10.2"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "3ce8954d7c26c881e0a7a46925447318954adca9"
|
|
52
52
|
}
|