@bitgo/public-types 5.39.0 → 5.41.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,53 @@
1
+ import * as t from "io-ts";
2
+ export declare const DelegateIntent: 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<"delegate">;
52
+ }>]>;
53
+ export type DelegateIntent = t.TypeOf<typeof DelegateIntent>;
@@ -0,0 +1,36 @@
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.DelegateIntent = void 0;
27
+ const t = __importStar(require("io-ts"));
28
+ const baseStakeIntent_1 = require("./baseStakeIntent");
29
+ const intentType_1 = require("./intentType");
30
+ exports.DelegateIntent = t.intersection([
31
+ baseStakeIntent_1.BaseStakeIntent,
32
+ t.type({
33
+ intentType: intentType_1.intentTypes.delegate,
34
+ }),
35
+ ]);
36
+ //# sourceMappingURL=delegateIntent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delegateIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/delegateIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,uDAAoD;AACpD,6CAA2C;AAE9B,QAAA,cAAc,GAAG,CAAC,CAAC,YAAY,CAAC;IAC3C,iCAAe;IACf,CAAC,CAAC,IAAI,CAAC;QACL,UAAU,EAAE,wBAAW,CAAC,QAAQ;KACjC,CAAC;CACH,CAAC,CAAC"}
@@ -0,0 +1,58 @@
1
+ import * as t from "io-ts";
2
+ export declare const VetDelegateIntent: 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<"delegate">;
52
+ }>]>, t.TypeC<{
53
+ tokenId: import("io-ts-types").NonEmptyStringC;
54
+ stakingContractAddress: import("io-ts-types").NonEmptyStringC;
55
+ }>, t.PartialC<{
56
+ delegateForever: t.BooleanC;
57
+ }>]>;
58
+ export type VetDelegateIntent = t.TypeOf<typeof VetDelegateIntent>;
@@ -0,0 +1,40 @@
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.VetDelegateIntent = void 0;
27
+ const t = __importStar(require("io-ts"));
28
+ const delegateIntent_1 = require("./delegateIntent");
29
+ const io_ts_types_1 = require("io-ts-types");
30
+ exports.VetDelegateIntent = t.intersection([
31
+ delegateIntent_1.DelegateIntent,
32
+ t.type({
33
+ tokenId: io_ts_types_1.NonEmptyString,
34
+ stakingContractAddress: io_ts_types_1.NonEmptyString,
35
+ }),
36
+ t.partial({
37
+ delegateForever: t.boolean,
38
+ }),
39
+ ]);
40
+ //# sourceMappingURL=vetDelegateIntent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vetDelegateIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/vetDelegateIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,qDAAkD;AAClD,6CAA6C;AAShC,QAAA,iBAAiB,GAAG,CAAC,CAAC,YAAY,CAAC;IAC9C,+BAAc;IACd,CAAC,CAAC,IAAI,CAAC;QACL,OAAO,EAAE,4BAAc;QACvB,sBAAsB,EAAE,4BAAc;KACvC,CAAC;IACF,CAAC,CAAC,OAAO,CAAC;QACR,eAAe,EAAE,CAAC,CAAC,OAAO;KAC3B,CAAC;CACH,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo/public-types",
3
- "version": "5.39.0",
3
+ "version": "5.41.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,12 @@
1
+ import * as t from "io-ts";
2
+ import { BaseStakeIntent } from "./baseStakeIntent";
3
+ import { intentTypes } from "./intentType";
4
+
5
+ export const DelegateIntent = t.intersection([
6
+ BaseStakeIntent,
7
+ t.type({
8
+ intentType: intentTypes.delegate,
9
+ }),
10
+ ]);
11
+
12
+ export type DelegateIntent = t.TypeOf<typeof DelegateIntent>;
@@ -0,0 +1,23 @@
1
+ import * as t from "io-ts";
2
+ import { DelegateIntent } from "./delegateIntent";
3
+ import { NonEmptyString } from "io-ts-types";
4
+
5
+ /**
6
+ * @title VET Delegate Intent
7
+ *
8
+ * @param {string} tokenId - The ID of the NFT token to delegate
9
+ * @param {string} stakingContractAddress - The address of the delegation contract
10
+ * @param {boolean} [delegateForever] - whether the delegation is forever or fixed
11
+ */
12
+ export const VetDelegateIntent = t.intersection([
13
+ DelegateIntent,
14
+ t.type({
15
+ tokenId: NonEmptyString,
16
+ stakingContractAddress: NonEmptyString,
17
+ }),
18
+ t.partial({
19
+ delegateForever: t.boolean,
20
+ }),
21
+ ]);
22
+
23
+ export type VetDelegateIntent = t.TypeOf<typeof VetDelegateIntent>;