@bitgo/public-types 5.11.0 → 5.12.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,60 @@
1
+ import * as t from "io-ts";
2
+ export declare const SolCustomInstructionIntent: 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
+ feeAddressTransfer: t.LiteralC<"feeAddressTransfer">;
36
+ tokenApproval: t.LiteralC<"tokenApproval">;
37
+ goUnstake: t.LiteralC<"goUnstake">;
38
+ createBtcDelegation: t.LiteralC<"createBtcDelegation">;
39
+ }>;
40
+ }>, t.PartialC<{
41
+ sequenceId: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
42
+ comment: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
43
+ nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
44
+ }>]>, t.IntersectionC<[t.PartialC<{
45
+ nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
46
+ }>, t.TypeC<{
47
+ memo: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
48
+ }>]>, t.TypeC<{
49
+ intentType: t.LiteralC<"customTx">;
50
+ solInstructions: t.ArrayC<t.TypeC<{
51
+ programId: t.StringC;
52
+ keys: t.ArrayC<t.TypeC<{
53
+ pubkey: t.StringC;
54
+ isSigner: t.BooleanC;
55
+ isWritable: t.BooleanC;
56
+ }>>;
57
+ data: t.StringC;
58
+ }>>;
59
+ }>]>;
60
+ export type SolCustomInstructionIntent = t.TypeOf<typeof SolCustomInstructionIntent>;
@@ -0,0 +1,47 @@
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.SolCustomInstructionIntent = void 0;
27
+ const t = __importStar(require("io-ts"));
28
+ const solBuildOptions_1 = require("./solBuildOptions");
29
+ const baseIntent_1 = require("./baseIntent");
30
+ const intentType_1 = require("./intentType");
31
+ exports.SolCustomInstructionIntent = t.intersection([
32
+ baseIntent_1.BaseIntent,
33
+ solBuildOptions_1.SolBuildOptions,
34
+ t.type({
35
+ intentType: intentType_1.intentTypes.customTx,
36
+ solInstructions: t.array(t.type({
37
+ programId: t.string,
38
+ keys: t.array(t.type({
39
+ pubkey: t.string,
40
+ isSigner: t.boolean,
41
+ isWritable: t.boolean,
42
+ })),
43
+ data: t.string,
44
+ })),
45
+ }),
46
+ ]);
47
+ //# sourceMappingURL=solCustomInstructionIntent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"solCustomInstructionIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/solCustomInstructionIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,uDAAoD;AACpD,6CAA0C;AAC1C,6CAA2C;AAK9B,QAAA,0BAA0B,GAAG,CAAC,CAAC,YAAY,CAAC;IACvD,uBAAU;IACV,iCAAe;IACf,CAAC,CAAC,IAAI,CAAC;QACL,UAAU,EAAE,wBAAW,CAAC,QAAQ;QAChC,eAAe,EAAE,CAAC,CAAC,KAAK,CACtB,CAAC,CAAC,IAAI,CAAC;YACL,SAAS,EAAE,CAAC,CAAC,MAAM;YACnB,IAAI,EAAE,CAAC,CAAC,KAAK,CACX,CAAC,CAAC,IAAI,CAAC;gBACL,MAAM,EAAE,CAAC,CAAC,MAAM;gBAChB,QAAQ,EAAE,CAAC,CAAC,OAAO;gBACnB,UAAU,EAAE,CAAC,CAAC,OAAO;aACtB,CAAC,CACH;YACD,IAAI,EAAE,CAAC,CAAC,MAAM;SACf,CAAC,CACH;KACF,CAAC;CACH,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo/public-types",
3
- "version": "5.11.0",
3
+ "version": "5.12.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,32 @@
1
+ import * as t from "io-ts";
2
+ import { SolBuildOptions } from "./solBuildOptions";
3
+ import { BaseIntent } from "./baseIntent";
4
+ import { intentTypes } from "./intentType";
5
+
6
+ /**
7
+ * @title SOL Custom Instruction Intent
8
+ */
9
+ export const SolCustomInstructionIntent = t.intersection([
10
+ BaseIntent,
11
+ SolBuildOptions,
12
+ t.type({
13
+ intentType: intentTypes.customTx,
14
+ solInstructions: t.array(
15
+ t.type({
16
+ programId: t.string,
17
+ keys: t.array(
18
+ t.type({
19
+ pubkey: t.string,
20
+ isSigner: t.boolean,
21
+ isWritable: t.boolean,
22
+ }),
23
+ ),
24
+ data: t.string,
25
+ }),
26
+ ),
27
+ }),
28
+ ]);
29
+
30
+ export type SolCustomInstructionIntent = t.TypeOf<
31
+ typeof SolCustomInstructionIntent
32
+ >;