@bitgo/public-types 5.37.0 → 5.38.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.
@@ -0,0 +1,59 @@
1
+ import * as t from "io-ts";
2
+ export declare const AptStakeIntent: t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
3
+ intentType: t.KeyofC<{
4
+ payment: t.LiteralC<"payment">;
5
+ transferToken: t.LiteralC<"transferToken">;
6
+ consolidate: t.LiteralC<"consolidate">;
7
+ consolidateToken: t.LiteralC<"consolidateToken">;
8
+ fanout: t.LiteralC<"fanout">;
9
+ stake: t.LiteralC<"stake">;
10
+ unstake: t.LiteralC<"unstake">;
11
+ delegate: t.LiteralC<"delegate">;
12
+ undelegate: t.LiteralC<"undelegate">;
13
+ switchValidator: t.LiteralC<"switchValidator">;
14
+ claim: t.LiteralC<"claim">;
15
+ stakeClaimRewards: t.LiteralC<"stakeClaimRewards">;
16
+ pledge: t.LiteralC<"pledge">;
17
+ voteDelegation: t.LiteralC<"voteDelegation">;
18
+ vote: t.LiteralC<"vote">;
19
+ createAccount: t.LiteralC<"createAccount">;
20
+ updateAccount: t.LiteralC<"updateAccount">;
21
+ addTrustLine: t.LiteralC<"addTrustLine">;
22
+ removeTrustLine: t.LiteralC<"removeTrustLine">;
23
+ signMessage: t.LiteralC<"signMessage">;
24
+ signTypedStructuredData: t.LiteralC<"signTypedStructuredData">;
25
+ enableToken: t.LiteralC<"enableToken">;
26
+ authorize: t.LiteralC<"authorize">;
27
+ acceleration: t.LiteralC<"acceleration">;
28
+ fillNonce: t.LiteralC<"fillNonce">;
29
+ walletRecovery: t.LiteralC<"walletRecovery">;
30
+ contractCall: t.LiteralC<"contractCall">;
31
+ deactivate: t.LiteralC<"deactivate">;
32
+ customTx: t.LiteralC<"customTx">;
33
+ closeAssociatedTokenAccount: t.LiteralC<"closeAssociatedTokenAccount">;
34
+ stakeWithCallData: t.LiteralC<"stakeWithCallData">;
35
+ unstakeWithCallData: t.LiteralC<"unstakeWithCallData">;
36
+ feeAddressTransfer: t.LiteralC<"feeAddressTransfer">;
37
+ tokenApproval: t.LiteralC<"tokenApproval">;
38
+ goUnstake: t.LiteralC<"goUnstake">;
39
+ createBtcDelegation: t.LiteralC<"createBtcDelegation">;
40
+ transferAccept: t.LiteralC<"transferAccept">;
41
+ transferReject: t.LiteralC<"transferReject">;
42
+ transferAcknowledge: t.LiteralC<"transferAcknowledge">;
43
+ }>;
44
+ }>, t.PartialC<{
45
+ sequenceId: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
46
+ comment: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
47
+ nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
48
+ }>]>, t.TypeC<{
49
+ stakingRequestId: t.StringC;
50
+ }>]>, t.TypeC<{
51
+ intentType: t.LiteralC<"stake">;
52
+ }>]>, t.TypeC<{
53
+ validatorAddress: t.StringC;
54
+ amount: t.TypeC<{
55
+ value: t.StringC;
56
+ symbol: t.StringC;
57
+ }>;
58
+ }>]>;
59
+ export type AptStakeIntent = t.TypeOf<typeof AptStakeIntent>;
@@ -0,0 +1,37 @@
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.AptStakeIntent = void 0;
27
+ const t = __importStar(require("io-ts"));
28
+ const amount_1 = require("./amount");
29
+ const stakeIntent_1 = require("./stakeIntent");
30
+ exports.AptStakeIntent = t.intersection([
31
+ stakeIntent_1.StakeIntent,
32
+ t.type({
33
+ validatorAddress: t.string,
34
+ amount: amount_1.Amount,
35
+ }),
36
+ ]);
37
+ //# sourceMappingURL=aptStakeIntent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aptStakeIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/aptStakeIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,qCAAkC;AAClC,+CAA4C;AAK/B,QAAA,cAAc,GAAG,CAAC,CAAC,YAAY,CAAC;IAC3C,yBAAW;IACX,CAAC,CAAC,IAAI,CAAC;QACL,gBAAgB,EAAE,CAAC,CAAC,MAAM;QAC1B,MAAM,EAAE,eAAM;KACf,CAAC;CACH,CAAC,CAAC"}
@@ -0,0 +1,59 @@
1
+ import * as t from "io-ts";
2
+ export declare const AptUnstakeIntent: t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
3
+ intentType: t.KeyofC<{
4
+ payment: t.LiteralC<"payment">;
5
+ transferToken: t.LiteralC<"transferToken">;
6
+ consolidate: t.LiteralC<"consolidate">;
7
+ consolidateToken: t.LiteralC<"consolidateToken">;
8
+ fanout: t.LiteralC<"fanout">;
9
+ stake: t.LiteralC<"stake">;
10
+ unstake: t.LiteralC<"unstake">;
11
+ delegate: t.LiteralC<"delegate">;
12
+ undelegate: t.LiteralC<"undelegate">;
13
+ switchValidator: t.LiteralC<"switchValidator">;
14
+ claim: t.LiteralC<"claim">;
15
+ stakeClaimRewards: t.LiteralC<"stakeClaimRewards">;
16
+ pledge: t.LiteralC<"pledge">;
17
+ voteDelegation: t.LiteralC<"voteDelegation">;
18
+ vote: t.LiteralC<"vote">;
19
+ createAccount: t.LiteralC<"createAccount">;
20
+ updateAccount: t.LiteralC<"updateAccount">;
21
+ addTrustLine: t.LiteralC<"addTrustLine">;
22
+ removeTrustLine: t.LiteralC<"removeTrustLine">;
23
+ signMessage: t.LiteralC<"signMessage">;
24
+ signTypedStructuredData: t.LiteralC<"signTypedStructuredData">;
25
+ enableToken: t.LiteralC<"enableToken">;
26
+ authorize: t.LiteralC<"authorize">;
27
+ acceleration: t.LiteralC<"acceleration">;
28
+ fillNonce: t.LiteralC<"fillNonce">;
29
+ walletRecovery: t.LiteralC<"walletRecovery">;
30
+ contractCall: t.LiteralC<"contractCall">;
31
+ deactivate: t.LiteralC<"deactivate">;
32
+ customTx: t.LiteralC<"customTx">;
33
+ closeAssociatedTokenAccount: t.LiteralC<"closeAssociatedTokenAccount">;
34
+ stakeWithCallData: t.LiteralC<"stakeWithCallData">;
35
+ unstakeWithCallData: t.LiteralC<"unstakeWithCallData">;
36
+ feeAddressTransfer: t.LiteralC<"feeAddressTransfer">;
37
+ tokenApproval: t.LiteralC<"tokenApproval">;
38
+ goUnstake: t.LiteralC<"goUnstake">;
39
+ createBtcDelegation: t.LiteralC<"createBtcDelegation">;
40
+ transferAccept: t.LiteralC<"transferAccept">;
41
+ transferReject: t.LiteralC<"transferReject">;
42
+ transferAcknowledge: t.LiteralC<"transferAcknowledge">;
43
+ }>;
44
+ }>, t.PartialC<{
45
+ sequenceId: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
46
+ comment: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
47
+ nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
48
+ }>]>, t.TypeC<{
49
+ stakingRequestId: t.StringC;
50
+ }>]>, t.TypeC<{
51
+ intentType: t.LiteralC<"unstake">;
52
+ }>]>, t.TypeC<{
53
+ validatorAddress: t.StringC;
54
+ amount: t.TypeC<{
55
+ value: t.StringC;
56
+ symbol: t.StringC;
57
+ }>;
58
+ }>]>;
59
+ export type AptUnstakeIntent = t.TypeOf<typeof AptUnstakeIntent>;
@@ -0,0 +1,37 @@
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.AptUnstakeIntent = void 0;
27
+ const t = __importStar(require("io-ts"));
28
+ const amount_1 = require("./amount");
29
+ const unstakeIntent_1 = require("./unstakeIntent");
30
+ exports.AptUnstakeIntent = t.intersection([
31
+ unstakeIntent_1.UnstakeIntent,
32
+ t.type({
33
+ validatorAddress: t.string,
34
+ amount: amount_1.Amount,
35
+ }),
36
+ ]);
37
+ //# sourceMappingURL=aptUnstakeIntent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aptUnstakeIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/aptUnstakeIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,qCAAkC;AAClC,mDAAgD;AAKnC,QAAA,gBAAgB,GAAG,CAAC,CAAC,YAAY,CAAC;IAC7C,6BAAa;IACb,CAAC,CAAC,IAAI,CAAC;QACL,gBAAgB,EAAE,CAAC,CAAC,MAAM;QAC1B,MAAM,EAAE,eAAM;KACf,CAAC;CACH,CAAC,CAAC"}
@@ -0,0 +1,67 @@
1
+ import * as t from "io-ts";
2
+ export declare const AptWithdrawStakeIntent: t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
3
+ intentType: t.KeyofC<{
4
+ payment: t.LiteralC<"payment">;
5
+ transferToken: t.LiteralC<"transferToken">;
6
+ consolidate: t.LiteralC<"consolidate">;
7
+ consolidateToken: t.LiteralC<"consolidateToken">;
8
+ fanout: t.LiteralC<"fanout">;
9
+ stake: t.LiteralC<"stake">;
10
+ unstake: t.LiteralC<"unstake">;
11
+ delegate: t.LiteralC<"delegate">;
12
+ undelegate: t.LiteralC<"undelegate">;
13
+ switchValidator: t.LiteralC<"switchValidator">;
14
+ claim: t.LiteralC<"claim">;
15
+ stakeClaimRewards: t.LiteralC<"stakeClaimRewards">;
16
+ pledge: t.LiteralC<"pledge">;
17
+ voteDelegation: t.LiteralC<"voteDelegation">;
18
+ vote: t.LiteralC<"vote">;
19
+ createAccount: t.LiteralC<"createAccount">;
20
+ updateAccount: t.LiteralC<"updateAccount">;
21
+ addTrustLine: t.LiteralC<"addTrustLine">;
22
+ removeTrustLine: t.LiteralC<"removeTrustLine">;
23
+ signMessage: t.LiteralC<"signMessage">;
24
+ signTypedStructuredData: t.LiteralC<"signTypedStructuredData">;
25
+ enableToken: t.LiteralC<"enableToken">;
26
+ authorize: t.LiteralC<"authorize">;
27
+ acceleration: t.LiteralC<"acceleration">;
28
+ fillNonce: t.LiteralC<"fillNonce">;
29
+ walletRecovery: t.LiteralC<"walletRecovery">;
30
+ contractCall: t.LiteralC<"contractCall">;
31
+ deactivate: t.LiteralC<"deactivate">;
32
+ customTx: t.LiteralC<"customTx">;
33
+ closeAssociatedTokenAccount: t.LiteralC<"closeAssociatedTokenAccount">;
34
+ stakeWithCallData: t.LiteralC<"stakeWithCallData">;
35
+ unstakeWithCallData: t.LiteralC<"unstakeWithCallData">;
36
+ feeAddressTransfer: t.LiteralC<"feeAddressTransfer">;
37
+ tokenApproval: t.LiteralC<"tokenApproval">;
38
+ goUnstake: t.LiteralC<"goUnstake">;
39
+ createBtcDelegation: t.LiteralC<"createBtcDelegation">;
40
+ transferAccept: t.LiteralC<"transferAccept">;
41
+ transferReject: t.LiteralC<"transferReject">;
42
+ transferAcknowledge: t.LiteralC<"transferAcknowledge">;
43
+ }>;
44
+ }>, t.PartialC<{
45
+ sequenceId: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
46
+ comment: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
47
+ nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
48
+ }>]>, t.TypeC<{
49
+ stakingRequestId: t.StringC;
50
+ }>]>, t.TypeC<{
51
+ intentType: t.LiteralC<"claim">;
52
+ }>, t.PartialC<{
53
+ amount: t.UnionC<[t.Type<{
54
+ value: string;
55
+ symbol: string;
56
+ }, {
57
+ value: string;
58
+ symbol: string;
59
+ }, unknown>, t.UndefinedC]>;
60
+ }>]>, t.TypeC<{
61
+ validatorAddress: t.StringC;
62
+ amount: t.TypeC<{
63
+ value: t.StringC;
64
+ symbol: t.StringC;
65
+ }>;
66
+ }>]>;
67
+ export type AptWithdrawStakeIntent = t.TypeOf<typeof AptWithdrawStakeIntent>;
@@ -0,0 +1,37 @@
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.AptWithdrawStakeIntent = void 0;
27
+ const t = __importStar(require("io-ts"));
28
+ const amount_1 = require("./amount");
29
+ const withdrawIntent_1 = require("./withdrawIntent");
30
+ exports.AptWithdrawStakeIntent = t.intersection([
31
+ withdrawIntent_1.WithdrawIntent,
32
+ t.type({
33
+ validatorAddress: t.string,
34
+ amount: amount_1.Amount,
35
+ }),
36
+ ]);
37
+ //# sourceMappingURL=aptWithdrawStakeIntent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aptWithdrawStakeIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/aptWithdrawStakeIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,qCAAkC;AAClC,qDAAkD;AAKrC,QAAA,sBAAsB,GAAG,CAAC,CAAC,YAAY,CAAC;IACnD,+BAAc;IACd,CAAC,CAAC,IAAI,CAAC;QACL,gBAAgB,EAAE,CAAC,CAAC,MAAM;QAC1B,MAAM,EAAE,eAAM;KACf,CAAC;CACH,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo/public-types",
3
- "version": "5.37.0",
3
+ "version": "5.38.0",
4
4
  "description": "Collection of types exposed externally as part of the BitGo public API",
5
5
  "license": "UNLICENSED",
6
6
  "author": "",
@@ -0,0 +1,16 @@
1
+ import * as t from "io-ts";
2
+ import { Amount } from "./amount";
3
+ import { StakeIntent } from "./stakeIntent";
4
+
5
+ /**
6
+ * @title Apt Stake Intent
7
+ */
8
+ export const AptStakeIntent = t.intersection([
9
+ StakeIntent,
10
+ t.type({
11
+ validatorAddress: t.string,
12
+ amount: Amount,
13
+ }),
14
+ ]);
15
+
16
+ export type AptStakeIntent = t.TypeOf<typeof AptStakeIntent>;
@@ -0,0 +1,16 @@
1
+ import * as t from "io-ts";
2
+ import { Amount } from "./amount";
3
+ import { UnstakeIntent } from "./unstakeIntent";
4
+
5
+ /**
6
+ * @title Apt Unstake Intent
7
+ */
8
+ export const AptUnstakeIntent = t.intersection([
9
+ UnstakeIntent,
10
+ t.type({
11
+ validatorAddress: t.string,
12
+ amount: Amount,
13
+ }),
14
+ ]);
15
+
16
+ export type AptUnstakeIntent = t.TypeOf<typeof AptUnstakeIntent>;
@@ -0,0 +1,16 @@
1
+ import * as t from "io-ts";
2
+ import { Amount } from "./amount";
3
+ import { WithdrawIntent } from "./withdrawIntent";
4
+
5
+ /**
6
+ * @title Apt Withdraw Stake Intent
7
+ */
8
+ export const AptWithdrawStakeIntent = t.intersection([
9
+ WithdrawIntent,
10
+ t.type({
11
+ validatorAddress: t.string,
12
+ amount: Amount,
13
+ }),
14
+ ]);
15
+
16
+ export type AptWithdrawStakeIntent = t.TypeOf<typeof AptWithdrawStakeIntent>;