@dainprotocol/service-sdk 1.0.30 → 1.0.32
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.
|
@@ -14,7 +14,7 @@ export interface PaymentIntent {
|
|
|
14
14
|
amount: number;
|
|
15
15
|
description: string;
|
|
16
16
|
}
|
|
17
|
-
declare class DAINServicePayments {
|
|
17
|
+
export declare class DAINServicePayments {
|
|
18
18
|
private keypair;
|
|
19
19
|
private smartAccountAddress?;
|
|
20
20
|
constructor(keypairOrApiKey: Keypair | string, smartAccountAddress?: PublicKey);
|
|
@@ -25,4 +25,4 @@ declare class DAINServicePayments {
|
|
|
25
25
|
checkPaid({ paymentIntentAddress }: CheckPaidParams): boolean;
|
|
26
26
|
static pay({ paymentIntentAddress }: PayParams): boolean;
|
|
27
27
|
}
|
|
28
|
-
export
|
|
28
|
+
export declare const createDAINServicePayments: (keypairOrApiKey: Keypair | string, smartAccountAddress?: PublicKey) => DAINServicePayments;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createDAINServicePayments = exports.DAINServicePayments = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const service_1 = require("@/service/service");
|
|
5
6
|
const web3_js_1 = require("@solana/web3.js");
|
|
@@ -36,5 +37,9 @@ class DAINServicePayments {
|
|
|
36
37
|
return true;
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
|
-
exports.
|
|
40
|
+
exports.DAINServicePayments = DAINServicePayments;
|
|
41
|
+
const createDAINServicePayments = (keypairOrApiKey, smartAccountAddress) => {
|
|
42
|
+
return new DAINServicePayments(keypairOrApiKey, smartAccountAddress);
|
|
43
|
+
};
|
|
44
|
+
exports.createDAINServicePayments = createDAINServicePayments;
|
|
40
45
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/payments/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/payments/index.ts"],"names":[],"mappings":";;;;AAAA,+CAAgD;AAChD,6CAAqD;AACrD,wDAAwB;AAqBxB,MAAa,mBAAmB;IACtB,OAAO,CAAU;IACjB,mBAAmB,CAAa;IACxC,YACE,eAAiC,EACjC,mBAA+B;QAE/B,IAAI,OAAO,eAAe,KAAK,QAAQ,EAAE,CAAC;YACxC,MAAM,QAAQ,GAAG,IAAA,qBAAW,EAAC,eAAe,CAAC,CAAC;YAC9C,IAAI,CAAC,OAAO,GAAG,iBAAO,CAAC,aAAa,CAAC,cAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;YACvE,IAAI,CAAC,mBAAmB,GAAG,IAAI,mBAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC7D,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,OAAO,GAAG,eAAe,CAAC;YAC/B,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;QACjD,CAAC;IACH,CAAC;IAED,mBAAmB,CAAC,EAClB,MAAM,EACN,WAAW,GAIZ;QACC,uDAAuD;QAEvD,MAAM,oBAAoB,GAAG,iBAAO,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;QACrE,OAAO;YACL,oBAAoB,EAAE,oBAAoB;YAC1C,MAAM,EAAE,MAAM;YACd,WAAW,EAAE,WAAW;SACzB,CAAC;IACJ,CAAC;IAED,SAAS,CAAC,EAAE,oBAAoB,EAAmB;QACjD,gDAAgD;QAChD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,CAAC,GAAG,CAAC,EAAE,oBAAoB,EAAa;QAC5C,gCAAgC;QAEhC,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA5CD,kDA4CC;AAEM,MAAM,yBAAyB,GAAG,CACvC,eAAiC,EACjC,mBAA+B,EACV,EAAE;IACvB,OAAO,IAAI,mBAAmB,CAAC,eAAe,EAAE,mBAAmB,CAAC,CAAC;AACvE,CAAC,CAAC;AALW,QAAA,yBAAyB,6BAKpC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dainprotocol/service-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.32",
|
|
4
4
|
"description": "DAIN Service SDK",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,6 +21,10 @@
|
|
|
21
21
|
"default": {
|
|
22
22
|
"types": "./dist/index.d.ts",
|
|
23
23
|
"default": "./dist/index.js"
|
|
24
|
+
},
|
|
25
|
+
"payments": {
|
|
26
|
+
"types": "./dist/lib/payments/index.d.ts",
|
|
27
|
+
"default": "./dist/lib/payments/index.js"
|
|
24
28
|
}
|
|
25
29
|
},
|
|
26
30
|
"./client": {
|
|
@@ -43,6 +47,10 @@
|
|
|
43
47
|
"default": {
|
|
44
48
|
"types": "./dist/service/index.d.ts",
|
|
45
49
|
"default": "./dist/service/index.js"
|
|
50
|
+
},
|
|
51
|
+
"payments": {
|
|
52
|
+
"types": "./dist/lib/payments/index.d.ts",
|
|
53
|
+
"default": "./dist/lib/payments/index.js"
|
|
46
54
|
}
|
|
47
55
|
},
|
|
48
56
|
"./client/*": {
|
|
@@ -52,6 +60,10 @@
|
|
|
52
60
|
"./service/*": {
|
|
53
61
|
"types": "./dist/service/*.d.ts",
|
|
54
62
|
"default": "./dist/service/*.js"
|
|
63
|
+
},
|
|
64
|
+
"./lib/payments": {
|
|
65
|
+
"types": "./dist/lib/payments/index.d.ts",
|
|
66
|
+
"default": "./dist/lib/payments/index.js"
|
|
55
67
|
}
|
|
56
68
|
},
|
|
57
69
|
"typesVersions": {
|
|
@@ -70,6 +82,9 @@
|
|
|
70
82
|
],
|
|
71
83
|
"service/*": [
|
|
72
84
|
"./dist/service/*.d.ts"
|
|
85
|
+
],
|
|
86
|
+
"lib/payments": [
|
|
87
|
+
"./dist/lib/payments/index.d.ts"
|
|
73
88
|
]
|
|
74
89
|
}
|
|
75
90
|
},
|