@bitgo/public-types 6.23.0 → 6.25.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.
Files changed (56) hide show
  1. package/dist/src/schema/transactionRequest/intents/hbarUpdateAccountIntent.d.ts +1 -0
  2. package/dist/src/schema/transactionRequest/intents/hbarUpdateAccountIntent.js +1 -0
  3. package/dist/src/schema/transactionRequest/intents/hbarUpdateAccountIntent.js.map +1 -1
  4. package/dist/src/schema/transactionRequest/intents/index.d.ts +0 -2
  5. package/dist/src/schema/transactionRequest/intents/index.js +0 -2
  6. package/dist/src/schema/transactionRequest/intents/index.js.map +1 -1
  7. package/dist/src/schema/transactionRequest/intents/intent.d.ts +2 -168
  8. package/dist/src/schema/transactionRequest/intents/intent.js +0 -4
  9. package/dist/src/schema/transactionRequest/intents/intent.js.map +1 -1
  10. package/dist/src/schema/transactionRequest/intents/trxClaimRewardsIntent.js.map +1 -1
  11. package/dist/src/schema/transactionRequest/intents/trxDelegateResourceIntent.js.map +1 -1
  12. package/dist/src/schema/transactionRequest/intents/trxFreezeIntent.js.map +1 -1
  13. package/dist/src/schema/transactionRequest/intents/trxUndelegateResourceIntent.js.map +1 -1
  14. package/dist/src/schema/transactionRequest/intents/trxUnfreezeIntent.js.map +1 -1
  15. package/dist/src/schema/transactionRequest/intents/trxVoteIntent.js.map +1 -1
  16. package/dist/src/schema/transactionRequest/intents/trxWithdrawExpireUnfreezeIntent.js.map +1 -1
  17. package/dist/src/schema/transactionRequest/intents/vetDecreaseStakeIntent.js.map +1 -1
  18. package/dist/src/schema/transactionRequest/intents/vetDelegateIntent.js.map +1 -1
  19. package/dist/src/schema/transactionRequest/intents/vetIncreaseStakeIntent.js.map +1 -1
  20. package/dist/src/schema/transactionRequest/intents/vetSignalExitIntent.js.map +1 -1
  21. package/dist/src/schema/transactionRequest/intents/vetStakeClaimRewardsIntent.js.map +1 -1
  22. package/dist/src/schema/transactionRequest/intents/vetStakingIntent.js.map +1 -1
  23. package/dist/src/schema/transactionRequest/intents/vetUnstakingIntent.js.map +1 -1
  24. package/dist/src/schema/transactionRequest/intents/vetValidatorRegistrationIntent.d.ts +1 -1
  25. package/dist/src/schema/transactionRequest/intents/vetValidatorRegistrationIntent.js +5 -1
  26. package/dist/src/schema/transactionRequest/intents/vetValidatorRegistrationIntent.js.map +1 -1
  27. package/dist/src/schema/transactionRequest/intents/vetWithdrawStakeIntent.js.map +1 -1
  28. package/dist/src/schema/transactionRequest/transactionRequest.d.ts +4 -336
  29. package/package.json +1 -1
  30. package/src/schema/transactionRequest/intents/hbarUpdateAccountIntent.ts +14 -3
  31. package/src/schema/transactionRequest/intents/index.ts +0 -2
  32. package/src/schema/transactionRequest/intents/intent.ts +0 -4
  33. package/src/schema/transactionRequest/intents/trxClaimRewardsIntent.ts +6 -0
  34. package/src/schema/transactionRequest/intents/trxDelegateResourceIntent.ts +9 -0
  35. package/src/schema/transactionRequest/intents/trxFreezeIntent.ts +9 -0
  36. package/src/schema/transactionRequest/intents/trxUndelegateResourceIntent.ts +9 -0
  37. package/src/schema/transactionRequest/intents/trxUnfreezeIntent.ts +8 -0
  38. package/src/schema/transactionRequest/intents/trxVoteIntent.ts +11 -0
  39. package/src/schema/transactionRequest/intents/trxWithdrawExpireUnfreezeIntent.ts +7 -0
  40. package/src/schema/transactionRequest/intents/vetDecreaseStakeIntent.ts +6 -6
  41. package/src/schema/transactionRequest/intents/vetDelegateIntent.ts +7 -5
  42. package/src/schema/transactionRequest/intents/vetIncreaseStakeIntent.ts +6 -6
  43. package/src/schema/transactionRequest/intents/vetSignalExitIntent.ts +7 -6
  44. package/src/schema/transactionRequest/intents/vetStakeClaimRewardsIntent.ts +6 -8
  45. package/src/schema/transactionRequest/intents/vetStakingIntent.ts +6 -7
  46. package/src/schema/transactionRequest/intents/vetUnstakingIntent.ts +10 -15
  47. package/src/schema/transactionRequest/intents/vetValidatorRegistrationIntent.ts +11 -8
  48. package/src/schema/transactionRequest/intents/vetWithdrawStakeIntent.ts +7 -6
  49. package/dist/src/schema/transactionRequest/intents/irysPledgeIntent.d.ts +0 -96
  50. package/dist/src/schema/transactionRequest/intents/irysPledgeIntent.js +0 -44
  51. package/dist/src/schema/transactionRequest/intents/irysPledgeIntent.js.map +0 -1
  52. package/dist/src/schema/transactionRequest/intents/irysStakeIntent.d.ts +0 -93
  53. package/dist/src/schema/transactionRequest/intents/irysStakeIntent.js +0 -41
  54. package/dist/src/schema/transactionRequest/intents/irysStakeIntent.js.map +0 -1
  55. package/src/schema/transactionRequest/intents/irysPledgeIntent.ts +0 -38
  56. package/src/schema/transactionRequest/intents/irysStakeIntent.ts +0 -35
@@ -5,19 +5,19 @@ import { BaseIntentWithAmount } from "./baseIntent";
5
5
  import { intentTypes } from "./intentType";
6
6
 
7
7
  /**
8
- * @title VET Decrease Stake Intent
9
- *
10
- * Intent for decreasing (partially unstaking) the stake amount for an existing validator
11
- * @param {Amount} amount - The amount of VET to remove from the existing stake
12
- * @param {string} validatorAddress - The address of the validator
13
- * @param {string} stakingContractAddress - The address of the staking contract
8
+ * Withdraw a portion of VET staked with a VeChain validator, reducing the
9
+ * position size. The specified amount is returned to the sender's wallet. No
10
+ * VET is spent gas is paid by the enterprise gas tank (VTHO).
14
11
  */
15
12
  export const VetDecreaseStakeIntent = t.intersection([
16
13
  BaseStakeIntent,
17
14
  BaseIntentWithAmount,
18
15
  t.type({
16
+ /** Must be "decreaseStake". */
19
17
  intentType: intentTypes.decreaseStake,
18
+ /** Address of the validator whose staked position is being reduced. */
20
19
  validatorAddress: NonEmptyString,
20
+ /** Address of the VeChain staking contract holding the position. */
21
21
  stakingContractAddress: NonEmptyString,
22
22
  }),
23
23
  ]);
@@ -3,17 +3,19 @@ import { DelegateIntent } from "./delegateIntent";
3
3
  import { NonEmptyString } from "io-ts-types";
4
4
 
5
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 stargate contract
10
- * @param {string} validatorAddress - address of the validator to delegate to
6
+ * Delegate a VeChain staking NFT to a validator, granting the validator voting
7
+ * and reward rights for that position. No VET is spent — this is an NFT
8
+ * assignment operation, not a financial transfer. Gas is paid by the enterprise
9
+ * gas tank (VTHO).
11
10
  */
12
11
  export const VetDelegateIntent = t.intersection([
13
12
  DelegateIntent,
14
13
  t.type({
14
+ /** ID of the staking NFT to delegate to the validator. */
15
15
  tokenId: NonEmptyString,
16
+ /** Address of the VeChain staking (Stargate) contract that holds the NFT. */
16
17
  stakingContractAddress: NonEmptyString,
18
+ /** Address of the validator to delegate the staking NFT to. */
17
19
  validatorAddress: NonEmptyString,
18
20
  }),
19
21
  ]);
@@ -5,19 +5,19 @@ import { BaseIntentWithAmount } from "./baseIntent";
5
5
  import { intentTypes } from "./intentType";
6
6
 
7
7
  /**
8
- * @title VET Increase Stake Intent
9
- *
10
- * Intent for increasing the stake amount for an existing validator
11
- * @param {Amount} amount - The amount of VET to add to the existing stake
12
- * @param {string} validatorAddress - The address of the validator
13
- * @param {string} stakingContractAddress - The address of the staking contract
8
+ * Increase the VET staked with an existing VeChain validator by depositing
9
+ * additional VET into the staking contract. The sender must have sufficient VET
10
+ * balance. Gas is paid by the enterprise gas tank (VTHO).
14
11
  */
15
12
  export const VetIncreaseStakeIntent = t.intersection([
16
13
  BaseStakeIntent,
17
14
  BaseIntentWithAmount,
18
15
  t.type({
16
+ /** Must be "increaseStake". */
19
17
  intentType: intentTypes.increaseStake,
18
+ /** Address of the validator whose staked position is being increased. */
20
19
  validatorAddress: NonEmptyString,
20
+ /** Address of the VeChain staking contract holding the existing position. */
21
21
  stakingContractAddress: NonEmptyString,
22
22
  }),
23
23
  ]);
@@ -4,18 +4,19 @@ import { NonEmptyString } from "io-ts-types";
4
4
  import { intentTypes } from "./intentType";
5
5
 
6
6
  /**
7
- * @title VET Signal Exit Intent
8
- *
9
- * Intent for signaling the exit of a validator position at the end of the staking period.
10
- * This is the first step in a full unstake flow for validator registration.
11
- * @param {string} validatorAddress - The address of the validator to exit
12
- * @param {string} stakingContractAddress - The address of the staking contract
7
+ * Signal the intent to exit a VeChain validator staking position, initiating
8
+ * the cooldown period. This is the first step in the validator unstake flow —
9
+ * must be followed by `withdrawStake` after the cooldown expires. No VET is
10
+ * spent; gas is paid by the enterprise gas tank (VTHO).
13
11
  */
14
12
  export const VetSignalExitIntent = t.intersection([
15
13
  BaseStakeIntent,
16
14
  t.type({
15
+ /** Must be "signalExit". */
17
16
  intentType: intentTypes.signalExit,
17
+ /** Address of the validator node whose position is being exited. */
18
18
  validatorAddress: NonEmptyString,
19
+ /** Address of the VeChain staking contract where the validator position is held. */
19
20
  stakingContractAddress: NonEmptyString,
20
21
  }),
21
22
  ]);
@@ -3,19 +3,17 @@ import { NonEmptyString } from "io-ts-types";
3
3
  import { StakeClaimRewardsIntent } from "./stakeClaimRewardsIntent";
4
4
 
5
5
  /**
6
- * @title VET Stake Claim Rewards Intent
7
- *
8
- * Intent for claiming rewards from VeChain (VET) staking
9
- * VET staking rewards are accumulated by NFTs that represent stakes in the stargate contract.
10
- * This intent calls the claimRewards function on the stargate contract for a specific NFT token.
11
- *
12
- * @param {string} tokenId - The ID of the NFT token to claim rewards for
13
- * @param {string} stakingContractAddress - The address of the stargate contract
6
+ * Claim VTHO rewards accumulated by a VeChain staking NFT position. Rewards
7
+ * accrue in VTHO (VeChain's energy token) for each NFT held in the Stargate
8
+ * contract. Supply the NFT's token ID and the staking contract address. Gas is
9
+ * paid by the enterprise gas tank (VTHO).
14
10
  */
15
11
  export const VetStakeClaimRewardsIntent = t.intersection([
16
12
  StakeClaimRewardsIntent,
17
13
  t.type({
14
+ /** ID of the staking NFT whose accumulated VTHO rewards will be claimed. */
18
15
  tokenId: NonEmptyString,
16
+ /** Address of the VeChain staking (Stargate) contract that holds the NFT. */
19
17
  stakingContractAddress: NonEmptyString,
20
18
  }),
21
19
  ]);
@@ -4,19 +4,18 @@ import { BaseIntentWithAmount } from "./baseIntent";
4
4
  import { NonEmptyString } from "io-ts-types";
5
5
 
6
6
  /**
7
- * @title VET Staking Intent
8
- *
9
- * Intent for staking VeChain (VET) tokens
10
- *
11
- * @param {Amount} amount - The amount of VET to stake
12
- * @param {string} stakingContractAddress - The address of the staking contract
13
- * @param {string} levelId - The level of the NFT tier
7
+ * Activate a new VeChain staking position by depositing VET into the staking
8
+ * contract. Use `levelId` to select the staking tier. To add to an existing
9
+ * position, use `increaseStake` instead. All VeChain gas fees are paid by the
10
+ * enterprise gas tank (VTHO); the sender pays no gas.
14
11
  */
15
12
  export const VetStakingIntent = t.intersection([
16
13
  StakeIntent,
17
14
  BaseIntentWithAmount,
18
15
  t.type({
16
+ /** Address of the VeChain staking contract that will hold the staked VET. */
19
17
  stakingContractAddress: NonEmptyString,
18
+ /** Staking tier level in the VeChain contract. Determines reward rate and lock parameters. */
20
19
  levelId: NonEmptyString,
21
20
  }),
22
21
  ]);
@@ -3,23 +3,18 @@ import { UnstakeIntent } from "./unstakeIntent";
3
3
  import { NonEmptyString } from "io-ts-types";
4
4
  import { UndelegateIntent } from "./undelegateIntent";
5
5
 
6
- /**
7
- * @title Common VET unstake intent fields
8
- *
9
- *
10
- * @param {string} tokenId - The ID of the NFT token
11
- * @param {string} stakingContractAddress - The address of the stargate contract
12
- */
13
6
  const VetUnstakeCommonFields = t.type({
7
+ /** ID of the staking NFT to operate on. */
14
8
  tokenId: NonEmptyString,
9
+ /** Address of the VeChain staking (Stargate) contract that holds the NFT. */
15
10
  stakingContractAddress: NonEmptyString,
16
11
  });
17
12
 
18
13
  /**
19
- * @title VET Exit Delegation Intent
20
- *
21
- * Intent for the first step of VET unstaking process - exiting delegation
22
- * This calls the exitDelegation function on the stargate contract
14
+ * Remove validator delegation for a VeChain staking NFT, returning it to an
15
+ * undelegated state. This is the first step in the full unstaking flow — must
16
+ * precede `unstake` (burn NFT). No VET is spent; gas is paid by the enterprise
17
+ * gas tank (VTHO).
23
18
  */
24
19
  export const VetExitDelegationIntent = t.intersection([
25
20
  UndelegateIntent,
@@ -29,10 +24,10 @@ export const VetExitDelegationIntent = t.intersection([
29
24
  export type VetExitDelegationIntent = t.TypeOf<typeof VetExitDelegationIntent>;
30
25
 
31
26
  /**
32
- * @title VET Burn NFT Intent
33
- *
34
- * Intent for the second step of VET unstaking process - burning the NFT
35
- * This calls the burn function on the stargate contract after the cooldown period
27
+ * Burn a VeChain staking NFT to complete the unstaking withdrawal and reclaim
28
+ * staked VET. This is the second (final) step in the basic unstaking flow —
29
+ * must be preceded by `undelegate`. No VET is spent by the sender; gas is paid
30
+ * by the enterprise gas tank (VTHO).
36
31
  */
37
32
  export const VetBurnNFTIntent = t.intersection([
38
33
  UnstakeIntent,
@@ -4,20 +4,23 @@ import { NonEmptyString } from "io-ts-types";
4
4
  import { BaseIntentWithAmount } from "./baseIntent";
5
5
 
6
6
  /**
7
- * @title VET Validator Registration Intent
8
- *
9
- * Intent for adding validator with stake amount from endorser
10
- * @param {Amount} amount - The amount of VET to stake
11
- * @param {string} validatorAddress - The address of the validator
12
- * @param {number} stakingPeriod - The staking period which can be one of the three -- 60480 (7 days), 129600 (15 days) or 259200 (30 days).
13
- * @param {string} stakingContractAddress - The address of the staking contract
7
+ * Register a new validator node in VeChain's staking contract by depositing a
8
+ * VET bond. The staking period determines the lock duration (60480, 129600, or
9
+ * 259200 blocks). Gas is paid by the enterprise gas tank (VTHO).
14
10
  */
15
11
  export const VetValidatorRegistrationIntent = t.intersection([
16
12
  ValidatorRegistrationIntent,
17
13
  BaseIntentWithAmount,
18
14
  t.type({
15
+ /** Address of the validator node being registered. Must be a valid VeChain address. */
19
16
  validatorAddress: NonEmptyString,
20
- stakingPeriod: t.number,
17
+ /** Duration of the staking lock period in blocks. Valid values: 60480 (~7 days), 129600 (~15 days), 259200 (~30 days). */
18
+ stakingPeriod: t.union([
19
+ t.literal(60480),
20
+ t.literal(129600),
21
+ t.literal(259200),
22
+ ]),
23
+ /** Address of the VeChain staking contract to register the validator with. */
21
24
  stakingContractAddress: NonEmptyString,
22
25
  }),
23
26
  ]);
@@ -4,18 +4,19 @@ import { NonEmptyString } from "io-ts-types";
4
4
  import { intentTypes } from "./intentType";
5
5
 
6
6
  /**
7
- * @title VET Withdraw Stake Intent
8
- *
9
- * Intent for withdrawing a validator's stake after the validator has exited.
10
- * This is the second step in a full unstake flow, after signalExit and the cooldown period.
11
- * @param {string} validatorAddress - The address of the validator to withdraw from
12
- * @param {string} stakingContractAddress - The address of the staking contract
7
+ * Withdraw a VeChain validator's staked VET after the cooldown period from a
8
+ * `signalExit` has completed. This is the second (final) step in the validator
9
+ * unstake flow. No VET is spent staked VET is returned to the sender; gas is
10
+ * paid by the enterprise gas tank (VTHO).
13
11
  */
14
12
  export const VetWithdrawStakeIntent = t.intersection([
15
13
  BaseStakeIntent,
16
14
  t.type({
15
+ /** Must be "withdrawStake". */
17
16
  intentType: intentTypes.withdrawStake,
17
+ /** Address of the validator node whose staked VET is being withdrawn. */
18
18
  validatorAddress: NonEmptyString,
19
+ /** Address of the VeChain staking contract holding the exited position. */
19
20
  stakingContractAddress: NonEmptyString,
20
21
  }),
21
22
  ]);
@@ -1,96 +0,0 @@
1
- import * as t from "io-ts";
2
- export declare const IrysPledgeCommitmentParams: t.IntersectionC<[t.TypeC<{
3
- commitmentFee: t.StringC;
4
- commitmentValue: t.StringC;
5
- signerAddress: t.StringC;
6
- chainId: t.NumberC;
7
- }>, t.TypeC<{
8
- pledgeCount: t.NumberC;
9
- }>]>;
10
- export type IrysPledgeCommitmentParams = t.TypeOf<typeof IrysPledgeCommitmentParams>;
11
- export declare const IrysPledgeIntent: t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
12
- intentType: t.KeyofC<{
13
- payment: t.LiteralC<"payment">;
14
- transferToken: t.LiteralC<"transferToken">;
15
- consolidate: t.LiteralC<"consolidate">;
16
- consolidateToken: t.LiteralC<"consolidateToken">;
17
- fanout: t.LiteralC<"fanout">;
18
- stake: t.LiteralC<"stake">;
19
- unstake: t.LiteralC<"unstake">;
20
- delegate: t.LiteralC<"delegate">;
21
- undelegate: t.LiteralC<"undelegate">;
22
- switchValidator: t.LiteralC<"switchValidator">;
23
- claim: t.LiteralC<"claim">;
24
- stakeClaimRewards: t.LiteralC<"stakeClaimRewards">;
25
- pledge: t.LiteralC<"pledge">;
26
- voteDelegation: t.LiteralC<"voteDelegation">;
27
- vote: t.LiteralC<"vote">;
28
- createAccount: t.LiteralC<"createAccount">;
29
- updateAccount: t.LiteralC<"updateAccount">;
30
- addTrustLine: t.LiteralC<"addTrustLine">;
31
- removeTrustLine: t.LiteralC<"removeTrustLine">;
32
- signMessage: t.LiteralC<"signMessage">;
33
- signTypedStructuredData: t.LiteralC<"signTypedStructuredData">;
34
- enableToken: t.LiteralC<"enableToken">;
35
- authorize: t.LiteralC<"authorize">;
36
- acceleration: t.LiteralC<"acceleration">;
37
- fillNonce: t.LiteralC<"fillNonce">;
38
- walletRecovery: t.LiteralC<"walletRecovery">;
39
- contractCall: t.LiteralC<"contractCall">;
40
- deactivate: t.LiteralC<"deactivate">;
41
- customTx: t.LiteralC<"customTx">;
42
- closeAssociatedTokenAccount: t.LiteralC<"closeAssociatedTokenAccount">;
43
- stakeWithCallData: t.LiteralC<"stakeWithCallData">;
44
- unstakeWithCallData: t.LiteralC<"unstakeWithCallData">;
45
- switchValidatorWithCallData: t.LiteralC<"switchValidatorWithCallData">;
46
- feeAddressTransfer: t.LiteralC<"feeAddressTransfer">;
47
- tokenApproval: t.LiteralC<"tokenApproval">;
48
- transferStake: t.LiteralC<"transferStake">;
49
- validatorRegistration: t.LiteralC<"validatorRegistration">;
50
- increaseStake: t.LiteralC<"increaseStake">;
51
- decreaseStake: t.LiteralC<"decreaseStake">;
52
- signalExit: t.LiteralC<"signalExit">;
53
- withdrawStake: t.LiteralC<"withdrawStake">;
54
- spotTransfer: t.LiteralC<"spotTransfer">;
55
- bridgeFunds: t.LiteralC<"bridgeFunds">;
56
- enableBridging: t.LiteralC<"enableBridging">;
57
- goUnstake: t.LiteralC<"goUnstake">;
58
- createBtcDelegation: t.LiteralC<"createBtcDelegation">;
59
- transferAccept: t.LiteralC<"transferAccept">;
60
- transferReject: t.LiteralC<"transferReject">;
61
- transferAcknowledge: t.LiteralC<"transferAcknowledge">;
62
- transferOfferWithdrawn: t.LiteralC<"transferOfferWithdrawn">;
63
- cosignDelegationProposal: t.LiteralC<"cosignDelegationProposal">;
64
- cosignDelegationAccept: t.LiteralC<"cosignDelegationAccept">;
65
- allocationRequest: t.LiteralC<"allocationRequest">;
66
- cantonCommand: t.LiteralC<"cantonCommand">;
67
- allocationAllocate: t.LiteralC<"allocationAllocate">;
68
- "defi-deposit": t.LiteralC<"defi-deposit">;
69
- "defi-redeem": t.LiteralC<"defi-redeem">;
70
- "defi-approve": t.LiteralC<"defi-approve">;
71
- delegateResource: t.LiteralC<"delegateResource">;
72
- undelegateResource: t.LiteralC<"undelegateResource">;
73
- export: t.LiteralC<"export">;
74
- import: t.LiteralC<"import">;
75
- importtoc: t.LiteralC<"importtoc">;
76
- }>;
77
- }>, t.PartialC<{
78
- sequenceId: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
79
- comment: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
80
- nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
81
- }>]>, t.TypeC<{
82
- stakingRequestId: t.StringC;
83
- }>, t.PartialC<{
84
- source: t.KeyofC<typeof import("./stakingRequestSource").StakingRequestSourceEnum>;
85
- }>]>, t.TypeC<{
86
- intentType: t.LiteralC<"pledge">;
87
- commitmentParams: t.IntersectionC<[t.TypeC<{
88
- commitmentFee: t.StringC;
89
- commitmentValue: t.StringC;
90
- signerAddress: t.StringC;
91
- chainId: t.NumberC;
92
- }>, t.TypeC<{
93
- pledgeCount: t.NumberC;
94
- }>]>;
95
- }>]>;
96
- export type IrysPledgeIntent = t.TypeOf<typeof IrysPledgeIntent>;
@@ -1,44 +0,0 @@
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.IrysPledgeIntent = exports.IrysPledgeCommitmentParams = void 0;
27
- const t = __importStar(require("io-ts"));
28
- const baseStakeIntent_1 = require("./baseStakeIntent");
29
- const intentType_1 = require("./intentType");
30
- const irysStakeIntent_1 = require("./irysStakeIntent");
31
- exports.IrysPledgeCommitmentParams = t.intersection([
32
- irysStakeIntent_1.IrysCommitmentParams,
33
- t.type({
34
- pledgeCount: t.number,
35
- }),
36
- ]);
37
- exports.IrysPledgeIntent = t.intersection([
38
- baseStakeIntent_1.BaseStakeIntent,
39
- t.type({
40
- intentType: intentType_1.intentTypes.pledge,
41
- commitmentParams: exports.IrysPledgeCommitmentParams,
42
- }),
43
- ]);
44
- //# sourceMappingURL=irysPledgeIntent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"irysPledgeIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/irysPledgeIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,uDAAoD;AACpD,6CAA2C;AAC3C,uDAAyD;AAM5C,QAAA,0BAA0B,GAAG,CAAC,CAAC,YAAY,CAAC;IACvD,sCAAoB;IACpB,CAAC,CAAC,IAAI,CAAC;QAEL,WAAW,EAAE,CAAC,CAAC,MAAM;KACtB,CAAC;CACH,CAAC,CAAC;AAcU,QAAA,gBAAgB,GAAG,CAAC,CAAC,YAAY,CAAC;IAC7C,iCAAe;IACf,CAAC,CAAC,IAAI,CAAC;QACL,UAAU,EAAE,wBAAW,CAAC,MAAM;QAC9B,gBAAgB,EAAE,kCAA0B;KAC7C,CAAC;CACH,CAAC,CAAC"}
@@ -1,93 +0,0 @@
1
- import * as t from "io-ts";
2
- export declare const IrysCommitmentParams: t.TypeC<{
3
- commitmentFee: t.StringC;
4
- commitmentValue: t.StringC;
5
- signerAddress: t.StringC;
6
- chainId: t.NumberC;
7
- }>;
8
- export type IrysCommitmentParams = t.TypeOf<typeof IrysCommitmentParams>;
9
- export declare const IrysStakeIntent: t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
10
- intentType: t.KeyofC<{
11
- payment: t.LiteralC<"payment">;
12
- transferToken: t.LiteralC<"transferToken">;
13
- consolidate: t.LiteralC<"consolidate">;
14
- consolidateToken: t.LiteralC<"consolidateToken">;
15
- fanout: t.LiteralC<"fanout">;
16
- stake: t.LiteralC<"stake">;
17
- unstake: t.LiteralC<"unstake">;
18
- delegate: t.LiteralC<"delegate">;
19
- undelegate: t.LiteralC<"undelegate">;
20
- switchValidator: t.LiteralC<"switchValidator">;
21
- claim: t.LiteralC<"claim">;
22
- stakeClaimRewards: t.LiteralC<"stakeClaimRewards">;
23
- pledge: t.LiteralC<"pledge">;
24
- voteDelegation: t.LiteralC<"voteDelegation">;
25
- vote: t.LiteralC<"vote">;
26
- createAccount: t.LiteralC<"createAccount">;
27
- updateAccount: t.LiteralC<"updateAccount">;
28
- addTrustLine: t.LiteralC<"addTrustLine">;
29
- removeTrustLine: t.LiteralC<"removeTrustLine">;
30
- signMessage: t.LiteralC<"signMessage">;
31
- signTypedStructuredData: t.LiteralC<"signTypedStructuredData">;
32
- enableToken: t.LiteralC<"enableToken">;
33
- authorize: t.LiteralC<"authorize">;
34
- acceleration: t.LiteralC<"acceleration">;
35
- fillNonce: t.LiteralC<"fillNonce">;
36
- walletRecovery: t.LiteralC<"walletRecovery">;
37
- contractCall: t.LiteralC<"contractCall">;
38
- deactivate: t.LiteralC<"deactivate">;
39
- customTx: t.LiteralC<"customTx">;
40
- closeAssociatedTokenAccount: t.LiteralC<"closeAssociatedTokenAccount">;
41
- stakeWithCallData: t.LiteralC<"stakeWithCallData">;
42
- unstakeWithCallData: t.LiteralC<"unstakeWithCallData">;
43
- switchValidatorWithCallData: t.LiteralC<"switchValidatorWithCallData">;
44
- feeAddressTransfer: t.LiteralC<"feeAddressTransfer">;
45
- tokenApproval: t.LiteralC<"tokenApproval">;
46
- transferStake: t.LiteralC<"transferStake">;
47
- validatorRegistration: t.LiteralC<"validatorRegistration">;
48
- increaseStake: t.LiteralC<"increaseStake">;
49
- decreaseStake: t.LiteralC<"decreaseStake">;
50
- signalExit: t.LiteralC<"signalExit">;
51
- withdrawStake: t.LiteralC<"withdrawStake">;
52
- spotTransfer: t.LiteralC<"spotTransfer">;
53
- bridgeFunds: t.LiteralC<"bridgeFunds">;
54
- enableBridging: t.LiteralC<"enableBridging">;
55
- goUnstake: t.LiteralC<"goUnstake">;
56
- createBtcDelegation: t.LiteralC<"createBtcDelegation">;
57
- transferAccept: t.LiteralC<"transferAccept">;
58
- transferReject: t.LiteralC<"transferReject">;
59
- transferAcknowledge: t.LiteralC<"transferAcknowledge">;
60
- transferOfferWithdrawn: t.LiteralC<"transferOfferWithdrawn">;
61
- cosignDelegationProposal: t.LiteralC<"cosignDelegationProposal">;
62
- cosignDelegationAccept: t.LiteralC<"cosignDelegationAccept">;
63
- allocationRequest: t.LiteralC<"allocationRequest">;
64
- cantonCommand: t.LiteralC<"cantonCommand">;
65
- allocationAllocate: t.LiteralC<"allocationAllocate">;
66
- "defi-deposit": t.LiteralC<"defi-deposit">;
67
- "defi-redeem": t.LiteralC<"defi-redeem">;
68
- "defi-approve": t.LiteralC<"defi-approve">;
69
- delegateResource: t.LiteralC<"delegateResource">;
70
- undelegateResource: t.LiteralC<"undelegateResource">;
71
- export: t.LiteralC<"export">;
72
- import: t.LiteralC<"import">;
73
- importtoc: t.LiteralC<"importtoc">;
74
- }>;
75
- }>, t.PartialC<{
76
- sequenceId: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
77
- comment: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
78
- nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
79
- }>]>, t.TypeC<{
80
- stakingRequestId: t.StringC;
81
- }>, t.PartialC<{
82
- source: t.KeyofC<typeof import("./stakingRequestSource").StakingRequestSourceEnum>;
83
- }>]>, t.TypeC<{
84
- intentType: t.LiteralC<"stake">;
85
- }>]>, t.TypeC<{
86
- commitmentParams: t.TypeC<{
87
- commitmentFee: t.StringC;
88
- commitmentValue: t.StringC;
89
- signerAddress: t.StringC;
90
- chainId: t.NumberC;
91
- }>;
92
- }>]>;
93
- export type IrysStakeIntent = t.TypeOf<typeof IrysStakeIntent>;
@@ -1,41 +0,0 @@
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.IrysStakeIntent = exports.IrysCommitmentParams = void 0;
27
- const t = __importStar(require("io-ts"));
28
- const stakeIntent_1 = require("./stakeIntent");
29
- exports.IrysCommitmentParams = t.type({
30
- commitmentFee: t.string,
31
- commitmentValue: t.string,
32
- signerAddress: t.string,
33
- chainId: t.number,
34
- });
35
- exports.IrysStakeIntent = t.intersection([
36
- stakeIntent_1.StakeIntent,
37
- t.type({
38
- commitmentParams: exports.IrysCommitmentParams,
39
- }),
40
- ]);
41
- //# sourceMappingURL=irysStakeIntent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"irysStakeIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/irysStakeIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,+CAA4C;AAM/B,QAAA,oBAAoB,GAAG,CAAC,CAAC,IAAI,CAAC;IAEzC,aAAa,EAAE,CAAC,CAAC,MAAM;IAEvB,eAAe,EAAE,CAAC,CAAC,MAAM;IAEzB,aAAa,EAAE,CAAC,CAAC,MAAM;IAEvB,OAAO,EAAE,CAAC,CAAC,MAAM;CAClB,CAAC,CAAC;AAWU,QAAA,eAAe,GAAG,CAAC,CAAC,YAAY,CAAC;IAC5C,yBAAW;IACX,CAAC,CAAC,IAAI,CAAC;QACL,gBAAgB,EAAE,4BAAoB;KACvC,CAAC;CACH,CAAC,CAAC"}
@@ -1,38 +0,0 @@
1
- import * as t from "io-ts";
2
- import { BaseStakeIntent } from "./baseStakeIntent";
3
- import { intentTypes } from "./intentType";
4
- import { IrysCommitmentParams } from "./irysStakeIntent";
5
-
6
- /**
7
- * Extended commitment parameters for Irys PLEDGE transactions.
8
- * Includes pledgeCount (number of partitions to pledge).
9
- */
10
- export const IrysPledgeCommitmentParams = t.intersection([
11
- IrysCommitmentParams,
12
- t.type({
13
- /** Number of partitions to pledge (each is 16TB). */
14
- pledgeCount: t.number,
15
- }),
16
- ]);
17
-
18
- export type IrysPledgeCommitmentParams = t.TypeOf<
19
- typeof IrysPledgeCommitmentParams
20
- >;
21
-
22
- /**
23
- * @title Irys Pledge Intent
24
- *
25
- * Intent for Irys PLEDGE commitment transactions.
26
- * PLEDGE commits to store a 16TB partition (repeatable, each adds a partition).
27
- * Requires an active STAKE delegation first.
28
- * Routes to BGM_IRYS (mechanism 86) via irys/signtx keyserver path.
29
- */
30
- export const IrysPledgeIntent = t.intersection([
31
- BaseStakeIntent,
32
- t.type({
33
- intentType: intentTypes.pledge,
34
- commitmentParams: IrysPledgeCommitmentParams,
35
- }),
36
- ]);
37
-
38
- export type IrysPledgeIntent = t.TypeOf<typeof IrysPledgeIntent>;
@@ -1,35 +0,0 @@
1
- import * as t from "io-ts";
2
- import { StakeIntent } from "./stakeIntent";
3
-
4
- /**
5
- * Parameters for Irys commitment transactions.
6
- * These values originate from the Irys pricing APIs called by staking-service.
7
- */
8
- export const IrysCommitmentParams = t.type({
9
- /** Commitment fee as a bigint string (wei), from Irys price API. */
10
- commitmentFee: t.string,
11
- /** Commitment value as a bigint string (wei), from Irys price API. */
12
- commitmentValue: t.string,
13
- /** 0x-prefixed hex Ethereum address of the signer. */
14
- signerAddress: t.string,
15
- /** Irys chain ID: 1270 (testnet) or 3282 (mainnet). */
16
- chainId: t.number,
17
- });
18
-
19
- export type IrysCommitmentParams = t.TypeOf<typeof IrysCommitmentParams>;
20
-
21
- /**
22
- * @title Irys Stake Intent
23
- *
24
- * Intent for Irys STAKE commitment transactions.
25
- * STAKE locks tokens as collateral (done once per wallet).
26
- * Routes to BGM_IRYS (mechanism 86) via irys/signtx keyserver path.
27
- */
28
- export const IrysStakeIntent = t.intersection([
29
- StakeIntent,
30
- t.type({
31
- commitmentParams: IrysCommitmentParams,
32
- }),
33
- ]);
34
-
35
- export type IrysStakeIntent = t.TypeOf<typeof IrysStakeIntent>;