@bitgo/public-types 3.5.0 → 3.6.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/transactionRequest/intents/intent.d.ts +3 -1
- package/dist/src/schema/transactionRequest/intents/tonDelegateIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/tonDelegateIntent.js +4 -0
- package/dist/src/schema/transactionRequest/intents/tonDelegateIntent.js.map +1 -1
- package/dist/src/schema/transactionRequest/intents/tonUndelegateIntent.d.ts +1 -1
- package/dist/src/schema/transactionRequest/intents/tonUndelegateIntent.js +1 -1
- package/dist/src/schema/transactionRequest/intents/tonUndelegateIntent.js.map +1 -1
- package/package.json +1 -1
- package/src/schema/transactionRequest/intents/tonDelegateIntent.ts +12 -0
- package/src/schema/transactionRequest/intents/tonUndelegateIntent.ts +7 -1
@@ -3134,6 +3134,8 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
|
|
3134
3134
|
symbol: t.StringC;
|
3135
3135
|
}>;
|
3136
3136
|
useSingleNominator: t.BooleanC;
|
3137
|
+
}>, t.PartialC<{
|
3138
|
+
ownerAddress: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
3137
3139
|
}>]>, t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
|
3138
3140
|
intentType: t.KeyofC<{
|
3139
3141
|
payment: t.LiteralC<"payment">;
|
@@ -3227,7 +3229,7 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
|
|
3227
3229
|
comment: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
3228
3230
|
nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
|
3229
3231
|
}>]>, t.TypeC<{
|
3230
|
-
intentType: t.LiteralC<"
|
3232
|
+
intentType: t.LiteralC<"undelegate">;
|
3231
3233
|
validatorAddress: t.StringC;
|
3232
3234
|
useSingleNominator: t.BooleanC;
|
3233
3235
|
singleNominatorAmount: t.TypeC<{
|
@@ -43,5 +43,7 @@ export declare const TonDelegateIntent: t.IntersectionC<[t.IntersectionC<[t.Type
|
|
43
43
|
symbol: t.StringC;
|
44
44
|
}>;
|
45
45
|
useSingleNominator: t.BooleanC;
|
46
|
+
}>, t.PartialC<{
|
47
|
+
ownerAddress: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
46
48
|
}>]>;
|
47
49
|
export type TonDelegateIntent = t.TypeOf<typeof TonDelegateIntent>;
|
@@ -28,6 +28,7 @@ const t = __importStar(require("io-ts"));
|
|
28
28
|
const baseIntent_1 = require("./baseIntent");
|
29
29
|
const amount_1 = require("./amount");
|
30
30
|
const intentType_1 = require("./intentType");
|
31
|
+
const utils_1 = require("../../../utils");
|
31
32
|
exports.TonDelegateIntent = t.intersection([
|
32
33
|
baseIntent_1.BaseIntent,
|
33
34
|
t.type({
|
@@ -36,5 +37,8 @@ exports.TonDelegateIntent = t.intersection([
|
|
36
37
|
amount: amount_1.Amount,
|
37
38
|
useSingleNominator: t.boolean,
|
38
39
|
}),
|
40
|
+
t.partial({
|
41
|
+
ownerAddress: utils_1.optionalString,
|
42
|
+
}),
|
39
43
|
]);
|
40
44
|
//# sourceMappingURL=tonDelegateIntent.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tonDelegateIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/tonDelegateIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA0C;AAC1C,qCAAkC;AAClC,6CAA2C;
|
1
|
+
{"version":3,"file":"tonDelegateIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/tonDelegateIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA0C;AAC1C,qCAAkC;AAClC,6CAA2C;AAC3C,0CAAgD;AAanC,QAAA,iBAAiB,GAAG,CAAC,CAAC,YAAY,CAAC;IAC9C,uBAAU;IACV,CAAC,CAAC,IAAI,CAAC;QACL,UAAU,EAAE,wBAAW,CAAC,QAAQ;QAChC,gBAAgB,EAAE,CAAC,CAAC,MAAM;QAC1B,MAAM,EAAE,eAAM;QACd,kBAAkB,EAAE,CAAC,CAAC,OAAO;KAC9B,CAAC;IACF,CAAC,CAAC,OAAO,CAAC;QACR,YAAY,EAAE,sBAAc;KAC7B,CAAC;CACH,CAAC,CAAC"}
|
@@ -36,7 +36,7 @@ export declare const TonUndelegateIntent: t.IntersectionC<[t.IntersectionC<[t.Ty
|
|
36
36
|
comment: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
37
37
|
nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
|
38
38
|
}>]>, t.TypeC<{
|
39
|
-
intentType: t.LiteralC<"
|
39
|
+
intentType: t.LiteralC<"undelegate">;
|
40
40
|
validatorAddress: t.StringC;
|
41
41
|
useSingleNominator: t.BooleanC;
|
42
42
|
singleNominatorAmount: t.TypeC<{
|
@@ -31,7 +31,7 @@ const amount_1 = require("./amount");
|
|
31
31
|
exports.TonUndelegateIntent = t.intersection([
|
32
32
|
baseIntent_1.BaseIntent,
|
33
33
|
t.type({
|
34
|
-
intentType: intentType_1.intentTypes.
|
34
|
+
intentType: intentType_1.intentTypes.undelegate,
|
35
35
|
validatorAddress: t.string,
|
36
36
|
useSingleNominator: t.boolean,
|
37
37
|
singleNominatorAmount: amount_1.Amount,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tonUndelegateIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/tonUndelegateIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA0C;AAC1C,6CAA2C;AAC3C,qCAAkC;
|
1
|
+
{"version":3,"file":"tonUndelegateIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/tonUndelegateIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA0C;AAC1C,6CAA2C;AAC3C,qCAAkC;AAWrB,QAAA,mBAAmB,GAAG,CAAC,CAAC,YAAY,CAAC;IAChD,uBAAU;IACV,CAAC,CAAC,IAAI,CAAC;QACL,UAAU,EAAE,wBAAW,CAAC,UAAU;QAClC,gBAAgB,EAAE,CAAC,CAAC,MAAM;QAC1B,kBAAkB,EAAE,CAAC,CAAC,OAAO;QAC7B,qBAAqB,EAAE,eAAM;KAC9B,CAAC;CACH,CAAC,CAAC"}
|
package/package.json
CHANGED
@@ -2,9 +2,18 @@ import * as t from "io-ts";
|
|
2
2
|
import { BaseIntent } from "./baseIntent";
|
3
3
|
import { Amount } from "./amount";
|
4
4
|
import { intentTypes } from "./intentType";
|
5
|
+
import { optionalString } from "../../../utils";
|
5
6
|
|
6
7
|
/**
|
7
8
|
* @title TON Delegate Intent
|
9
|
+
*
|
10
|
+
* @description The intent for delegate/stake requests and transactions for TON
|
11
|
+
*
|
12
|
+
* @param {string} intentType The type of intent (always set to delegate)
|
13
|
+
* @param {string} validatorAddress The address of the validator
|
14
|
+
* @param {boolean} useSingleNominator Whether to use a single nominator pool, if false then a multi nominator pool will be used
|
15
|
+
* @param {Amount} singleNominatorAmount The amount to delegate to the single nominator pool
|
16
|
+
* @param {string} ownerAddress The owner wallet address of the single nominator pool, if applicable (optional)
|
8
17
|
*/
|
9
18
|
export const TonDelegateIntent = t.intersection([
|
10
19
|
BaseIntent,
|
@@ -14,6 +23,9 @@ export const TonDelegateIntent = t.intersection([
|
|
14
23
|
amount: Amount,
|
15
24
|
useSingleNominator: t.boolean,
|
16
25
|
}),
|
26
|
+
t.partial({
|
27
|
+
ownerAddress: optionalString,
|
28
|
+
}),
|
17
29
|
]);
|
18
30
|
|
19
31
|
export type TonDelegateIntent = t.TypeOf<typeof TonDelegateIntent>;
|
@@ -5,11 +5,17 @@ import { Amount } from "./amount";
|
|
5
5
|
|
6
6
|
/**
|
7
7
|
* @title TON Undelegate Intent
|
8
|
+
* @description The intent for undelegate/unstake requests and transactions for TON
|
9
|
+
*
|
10
|
+
* @param {string} intentType The type of intent (always set to undelegate)
|
11
|
+
* @param {string} validatorAddress The address of the validator
|
12
|
+
* @param {boolean} useSingleNominator Whether to use a single nominator pool, if false then a multi nominator pool will be used
|
13
|
+
* @param {Amount} singleNominatorAmount The amount to delegate to the single nominator pool
|
8
14
|
*/
|
9
15
|
export const TonUndelegateIntent = t.intersection([
|
10
16
|
BaseIntent,
|
11
17
|
t.type({
|
12
|
-
intentType: intentTypes.
|
18
|
+
intentType: intentTypes.undelegate,
|
13
19
|
validatorAddress: t.string,
|
14
20
|
useSingleNominator: t.boolean,
|
15
21
|
singleNominatorAmount: Amount,
|