@bitgo/public-types 2.38.0 → 2.39.0
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/dist/src/schema/lightning/payment.d.ts +20 -0
- package/dist/src/schema/lightning/payment.js +43 -0
- package/dist/src/schema/lightning/payment.js.map +1 -0
- package/dist/src/schema/transactionRequest/intents/intent.d.ts +9 -2
- package/dist/src/schema/transactionRequest/intents/lightningPaymentIntent.d.ts +9 -2
- package/dist/src/schema/transactionRequest/intents/lightningPaymentIntent.js +2 -2
- package/dist/src/schema/transactionRequest/intents/lightningPaymentIntent.js.map +1 -1
- package/dist/src/schema/transactions/sendTransactions.d.ts +0 -56
- package/dist/src/schema/transactions/sendTransactions.js +0 -12
- package/dist/src/schema/transactions/sendTransactions.js.map +1 -1
- package/package.json +1 -1
- package/src/schema/lightning/payment.ts +23 -0
- package/src/schema/transactionRequest/intents/lightningPaymentIntent.ts +2 -2
- package/src/schema/transactions/sendTransactions.ts +0 -14
@@ -0,0 +1,20 @@
|
|
1
|
+
import * as t from "io-ts";
|
2
|
+
export declare const LightningPaymentRequest: t.IntersectionC<[t.TypeC<{
|
3
|
+
invoice: t.StringC;
|
4
|
+
}>, t.PartialC<{
|
5
|
+
amountMsat: import("io-ts-types").BigIntFromStringC;
|
6
|
+
feeLimitMsat: import("io-ts-types").BigIntFromStringC;
|
7
|
+
feeLimitRatio: t.NumberC;
|
8
|
+
}>]>;
|
9
|
+
export declare const LightningPaymentRequestWithSig: t.TypeC<{
|
10
|
+
request: t.IntersectionC<[t.TypeC<{
|
11
|
+
invoice: t.StringC;
|
12
|
+
}>, t.PartialC<{
|
13
|
+
amountMsat: import("io-ts-types").BigIntFromStringC;
|
14
|
+
feeLimitMsat: import("io-ts-types").BigIntFromStringC;
|
15
|
+
feeLimitRatio: t.NumberC;
|
16
|
+
}>]>;
|
17
|
+
signature: t.StringC;
|
18
|
+
}>;
|
19
|
+
export type LightningPaymentRequest = t.TypeOf<typeof LightningPaymentRequest>;
|
20
|
+
export type LightningPaymentRequestWithSig = t.TypeOf<typeof LightningPaymentRequestWithSig>;
|
@@ -0,0 +1,43 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
+
}) : function(o, v) {
|
16
|
+
o["default"] = v;
|
17
|
+
});
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
+
if (mod && mod.__esModule) return mod;
|
20
|
+
var result = {};
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
+
__setModuleDefault(result, mod);
|
23
|
+
return result;
|
24
|
+
};
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
+
exports.LightningPaymentRequestWithSig = exports.LightningPaymentRequest = void 0;
|
27
|
+
const t = __importStar(require("io-ts"));
|
28
|
+
const io_ts_types_1 = require("io-ts-types");
|
29
|
+
exports.LightningPaymentRequest = t.intersection([
|
30
|
+
t.type({
|
31
|
+
invoice: t.string,
|
32
|
+
}),
|
33
|
+
t.partial({
|
34
|
+
amountMsat: io_ts_types_1.BigIntFromString,
|
35
|
+
feeLimitMsat: io_ts_types_1.BigIntFromString,
|
36
|
+
feeLimitRatio: t.number,
|
37
|
+
}),
|
38
|
+
]);
|
39
|
+
exports.LightningPaymentRequestWithSig = t.type({
|
40
|
+
request: exports.LightningPaymentRequest,
|
41
|
+
signature: t.string,
|
42
|
+
});
|
43
|
+
//# sourceMappingURL=payment.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"payment.js","sourceRoot":"","sources":["../../../../src/schema/lightning/payment.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA+C;AAElC,QAAA,uBAAuB,GAAG,CAAC,CAAC,YAAY,CAAC;IACpD,CAAC,CAAC,IAAI,CAAC;QACL,OAAO,EAAE,CAAC,CAAC,MAAM;KAClB,CAAC;IACF,CAAC,CAAC,OAAO,CAAC;QACR,UAAU,EAAE,8BAAgB;QAC5B,YAAY,EAAE,8BAAgB;QAC9B,aAAa,EAAE,CAAC,CAAC,MAAM;KACxB,CAAC;CACH,CAAC,CAAC;AAEU,QAAA,8BAA8B,GAAG,CAAC,CAAC,IAAI,CAAC;IACnD,OAAO,EAAE,+BAAuB;IAChC,SAAS,EAAE,CAAC,CAAC,MAAM;CACpB,CAAC,CAAC"}
|
@@ -1593,10 +1593,17 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
|
|
1593
1593
|
sequenceId: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
1594
1594
|
comment: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
1595
1595
|
nonce: t.UnionC<[t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>, t.UnionC<[t.Type<number, number, unknown>, t.UndefinedC]>]>;
|
1596
|
+
}>, t.TypeC<{
|
1597
|
+
request: t.IntersectionC<[t.TypeC<{
|
1598
|
+
invoice: t.StringC;
|
1599
|
+
}>, t.PartialC<{
|
1600
|
+
amountMsat: import("io-ts-types").BigIntFromStringC;
|
1601
|
+
feeLimitMsat: import("io-ts-types").BigIntFromStringC;
|
1602
|
+
feeLimitRatio: t.NumberC;
|
1603
|
+
}>]>;
|
1604
|
+
signature: t.StringC;
|
1596
1605
|
}>, t.TypeC<{
|
1597
1606
|
intentType: t.LiteralC<"payment">;
|
1598
|
-
invoice: t.StringC;
|
1599
|
-
signedInvoice: t.StringC;
|
1600
1607
|
}>]>, t.IntersectionC<[t.IntersectionC<[t.TypeC<{
|
1601
1608
|
intentType: t.KeyofC<{
|
1602
1609
|
payment: t.LiteralC<"payment">;
|
@@ -33,9 +33,16 @@ export declare const LightningPaymentIntent: t.IntersectionC<[t.TypeC<{
|
|
33
33
|
sequenceId: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
34
34
|
comment: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
35
35
|
nonce: t.UnionC<[t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>, t.UnionC<[t.Type<number, number, unknown>, t.UndefinedC]>]>;
|
36
|
+
}>, t.TypeC<{
|
37
|
+
request: t.IntersectionC<[t.TypeC<{
|
38
|
+
invoice: t.StringC;
|
39
|
+
}>, t.PartialC<{
|
40
|
+
amountMsat: import("io-ts-types").BigIntFromStringC;
|
41
|
+
feeLimitMsat: import("io-ts-types").BigIntFromStringC;
|
42
|
+
feeLimitRatio: t.NumberC;
|
43
|
+
}>]>;
|
44
|
+
signature: t.StringC;
|
36
45
|
}>, t.TypeC<{
|
37
46
|
intentType: t.LiteralC<"payment">;
|
38
|
-
invoice: t.StringC;
|
39
|
-
signedInvoice: t.StringC;
|
40
47
|
}>]>;
|
41
48
|
export type LightningPaymentIntent = t.TypeOf<typeof LightningPaymentIntent>;
|
@@ -27,12 +27,12 @@ exports.LightningPaymentIntent = void 0;
|
|
27
27
|
const t = __importStar(require("io-ts"));
|
28
28
|
const baseIntent_1 = require("./baseIntent");
|
29
29
|
const intentType_1 = require("./intentType");
|
30
|
+
const payment_1 = require("../../lightning/payment");
|
30
31
|
exports.LightningPaymentIntent = t.intersection([
|
31
32
|
baseIntent_1.BaseIntent,
|
33
|
+
payment_1.LightningPaymentRequestWithSig,
|
32
34
|
t.type({
|
33
35
|
intentType: intentType_1.intentTypes.payment,
|
34
|
-
invoice: t.string,
|
35
|
-
signedInvoice: t.string,
|
36
36
|
}),
|
37
37
|
]);
|
38
38
|
//# sourceMappingURL=lightningPaymentIntent.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"lightningPaymentIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/lightningPaymentIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA0C;AAC1C,6CAA2C;
|
1
|
+
{"version":3,"file":"lightningPaymentIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/lightningPaymentIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA0C;AAC1C,6CAA2C;AAC3C,qDAAyE;AAE5D,QAAA,sBAAsB,GAAG,CAAC,CAAC,YAAY,CAAC;IACnD,uBAAU;IACV,wCAA8B;IAC9B,CAAC,CAAC,IAAI,CAAC;QACL,UAAU,EAAE,wBAAW,CAAC,OAAO;KAChC,CAAC;CACH,CAAC,CAAC"}
|
@@ -8,15 +8,6 @@ declare const recipient: t.PartialC<{
|
|
8
8
|
tokenName: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
9
9
|
}>;
|
10
10
|
export type TransactionRecipient = t.TypeOf<typeof recipient>;
|
11
|
-
declare const lightningPaymentRequest: t.IntersectionC<[t.TypeC<{
|
12
|
-
invoice: t.StringC;
|
13
|
-
}>, t.PartialC<{
|
14
|
-
amount: t.NumberC;
|
15
|
-
sequenceId: t.StringC;
|
16
|
-
feeLimit: t.NumberC;
|
17
|
-
feeLimitRatio: t.NumberC;
|
18
|
-
}>]>;
|
19
|
-
export type LightningPaymentRequest = t.TypeOf<typeof lightningPaymentRequest>;
|
20
11
|
declare const halfSigned: t.PartialC<{
|
21
12
|
txHex: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
22
13
|
recipients: t.UnionC<[t.Type<{
|
@@ -48,21 +39,6 @@ declare const halfSigned: t.PartialC<{
|
|
48
39
|
operationHash: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
49
40
|
signedChildPsbt: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
50
41
|
signature: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
51
|
-
lightningPaymentRequest: t.UnionC<[t.Type<{
|
52
|
-
invoice: string;
|
53
|
-
} & {
|
54
|
-
amount?: number | undefined;
|
55
|
-
sequenceId?: string | undefined;
|
56
|
-
feeLimit?: number | undefined;
|
57
|
-
feeLimitRatio?: number | undefined;
|
58
|
-
}, {
|
59
|
-
invoice: string;
|
60
|
-
} & {
|
61
|
-
amount?: number | undefined;
|
62
|
-
sequenceId?: string | undefined;
|
63
|
-
feeLimit?: number | undefined;
|
64
|
-
feeLimitRatio?: number | undefined;
|
65
|
-
}, unknown>, t.UndefinedC]>;
|
66
42
|
}>;
|
67
43
|
export type HalfSignedTransaction = t.TypeOf<typeof halfSigned>;
|
68
44
|
export declare const memo: t.PartialC<{
|
@@ -93,14 +69,6 @@ export declare const txSendBody: {
|
|
93
69
|
operationHash?: string | undefined;
|
94
70
|
signedChildPsbt?: string | undefined;
|
95
71
|
signature?: string | undefined;
|
96
|
-
lightningPaymentRequest?: ({
|
97
|
-
invoice: string;
|
98
|
-
} & {
|
99
|
-
amount?: number | undefined;
|
100
|
-
sequenceId?: string | undefined;
|
101
|
-
feeLimit?: number | undefined;
|
102
|
-
feeLimitRatio?: number | undefined;
|
103
|
-
}) | undefined;
|
104
72
|
}, {
|
105
73
|
txHex?: string | undefined;
|
106
74
|
recipients?: {
|
@@ -122,14 +90,6 @@ export declare const txSendBody: {
|
|
122
90
|
operationHash?: string | undefined;
|
123
91
|
signedChildPsbt?: string | undefined;
|
124
92
|
signature?: string | undefined;
|
125
|
-
lightningPaymentRequest?: ({
|
126
|
-
invoice: string;
|
127
|
-
} & {
|
128
|
-
amount?: number | undefined;
|
129
|
-
sequenceId?: string | undefined;
|
130
|
-
feeLimit?: number | undefined;
|
131
|
-
feeLimitRatio?: number | undefined;
|
132
|
-
}) | undefined;
|
133
93
|
}, unknown>, t.UndefinedC]>;
|
134
94
|
invoice: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
135
95
|
memo: t.UnionC<[t.Type<{
|
@@ -284,14 +244,6 @@ export declare const TxSendBody: t.ExactC<t.IntersectionC<[t.PartialC<{
|
|
284
244
|
operationHash?: string | undefined;
|
285
245
|
signedChildPsbt?: string | undefined;
|
286
246
|
signature?: string | undefined;
|
287
|
-
lightningPaymentRequest?: ({
|
288
|
-
invoice: string;
|
289
|
-
} & {
|
290
|
-
amount?: number | undefined;
|
291
|
-
sequenceId?: string | undefined;
|
292
|
-
feeLimit?: number | undefined;
|
293
|
-
feeLimitRatio?: number | undefined;
|
294
|
-
}) | undefined;
|
295
247
|
}, {
|
296
248
|
txHex?: string | undefined;
|
297
249
|
recipients?: {
|
@@ -313,14 +265,6 @@ export declare const TxSendBody: t.ExactC<t.IntersectionC<[t.PartialC<{
|
|
313
265
|
operationHash?: string | undefined;
|
314
266
|
signedChildPsbt?: string | undefined;
|
315
267
|
signature?: string | undefined;
|
316
|
-
lightningPaymentRequest?: ({
|
317
|
-
invoice: string;
|
318
|
-
} & {
|
319
|
-
amount?: number | undefined;
|
320
|
-
sequenceId?: string | undefined;
|
321
|
-
feeLimit?: number | undefined;
|
322
|
-
feeLimitRatio?: number | undefined;
|
323
|
-
}) | undefined;
|
324
268
|
}, unknown>, t.UndefinedC]>;
|
325
269
|
invoice: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
326
270
|
memo: t.UnionC<[t.Type<{
|
@@ -40,17 +40,6 @@ const eip1559 = t.partial({
|
|
40
40
|
maxPriorityFeePerGas: utils_1.optionalString,
|
41
41
|
maxFeePerGas: utils_1.optionalString,
|
42
42
|
});
|
43
|
-
const lightningPaymentRequest = t.intersection([
|
44
|
-
t.type({
|
45
|
-
invoice: t.string,
|
46
|
-
}),
|
47
|
-
t.partial({
|
48
|
-
amount: t.number,
|
49
|
-
sequenceId: t.string,
|
50
|
-
feeLimit: t.number,
|
51
|
-
feeLimitRatio: t.number,
|
52
|
-
}),
|
53
|
-
]);
|
54
43
|
const halfSigned = t.partial({
|
55
44
|
txHex: utils_1.optionalString,
|
56
45
|
recipients: (0, utils_1.Optional)(recipients),
|
@@ -62,7 +51,6 @@ const halfSigned = t.partial({
|
|
62
51
|
operationHash: utils_1.optionalString,
|
63
52
|
signedChildPsbt: utils_1.optionalString,
|
64
53
|
signature: utils_1.optionalString,
|
65
|
-
lightningPaymentRequest: (0, utils_1.Optional)(lightningPaymentRequest),
|
66
54
|
});
|
67
55
|
exports.memo = t.partial({
|
68
56
|
type: utils_1.optionalString,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sendTransactions.js","sourceRoot":"","sources":["../../../../src/schema/transactions/sendTransactions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,uCAOqB;AACrB,iDAAyD;AAEzD,MAAM,SAAS,GAAG,CAAC,CAAC,OAAO,CAAC;IAC1B,OAAO,EAAE,CAAC,CAAC,MAAM;IACjB,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;IACrC,QAAQ,EAAE,sBAAc;IACxB,IAAI,EAAE,sBAAc;IACpB,IAAI,EAAE,sBAAc;IACpB,SAAS,EAAE,sBAAc;CAC1B,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AAEtC,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC;IACxB,oBAA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-types";
|
3
|
+
|
4
|
+
export const LightningPaymentRequest = t.intersection([
|
5
|
+
t.type({
|
6
|
+
invoice: t.string,
|
7
|
+
}),
|
8
|
+
t.partial({
|
9
|
+
amountMsat: BigIntFromString,
|
10
|
+
feeLimitMsat: BigIntFromString,
|
11
|
+
feeLimitRatio: t.number,
|
12
|
+
}),
|
13
|
+
]);
|
14
|
+
|
15
|
+
export const LightningPaymentRequestWithSig = t.type({
|
16
|
+
request: LightningPaymentRequest,
|
17
|
+
signature: t.string,
|
18
|
+
});
|
19
|
+
|
20
|
+
export type LightningPaymentRequest = t.TypeOf<typeof LightningPaymentRequest>;
|
21
|
+
export type LightningPaymentRequestWithSig = t.TypeOf<
|
22
|
+
typeof LightningPaymentRequestWithSig
|
23
|
+
>;
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import * as t from "io-ts";
|
2
2
|
import { BaseIntent } from "./baseIntent";
|
3
3
|
import { intentTypes } from "./intentType";
|
4
|
+
import { LightningPaymentRequestWithSig } from "../../lightning/payment";
|
4
5
|
|
5
6
|
export const LightningPaymentIntent = t.intersection([
|
6
7
|
BaseIntent,
|
8
|
+
LightningPaymentRequestWithSig,
|
7
9
|
t.type({
|
8
10
|
intentType: intentTypes.payment,
|
9
|
-
invoice: t.string,
|
10
|
-
signedInvoice: t.string,
|
11
11
|
}),
|
12
12
|
]);
|
13
13
|
|
@@ -25,19 +25,6 @@ const eip1559 = t.partial({
|
|
25
25
|
maxFeePerGas: optionalString,
|
26
26
|
});
|
27
27
|
|
28
|
-
const lightningPaymentRequest = t.intersection([
|
29
|
-
t.type({
|
30
|
-
invoice: t.string,
|
31
|
-
}),
|
32
|
-
t.partial({
|
33
|
-
amount: t.number,
|
34
|
-
sequenceId: t.string,
|
35
|
-
feeLimit: t.number,
|
36
|
-
feeLimitRatio: t.number,
|
37
|
-
}),
|
38
|
-
]);
|
39
|
-
export type LightningPaymentRequest = t.TypeOf<typeof lightningPaymentRequest>;
|
40
|
-
|
41
28
|
const halfSigned = t.partial({
|
42
29
|
txHex: optionalString,
|
43
30
|
recipients: Optional(recipients),
|
@@ -49,7 +36,6 @@ const halfSigned = t.partial({
|
|
49
36
|
operationHash: optionalString,
|
50
37
|
signedChildPsbt: optionalString,
|
51
38
|
signature: optionalString,
|
52
|
-
lightningPaymentRequest: Optional(lightningPaymentRequest),
|
53
39
|
});
|
54
40
|
export type HalfSignedTransaction = t.TypeOf<typeof halfSigned>;
|
55
41
|
|