@bitgo/public-types 7.6.1 → 7.6.2
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/baseIntent.d.ts +2 -12
- package/dist/src/schema/transactionRequest/intents/baseIntent.js +2 -1
- package/dist/src/schema/transactionRequest/intents/baseIntent.js.map +1 -1
- package/dist/src/schema/transactionRequest/intents/intent.d.ts +13 -93
- package/dist/src/schema/transactionRequest/intents/intentGroups.d.ts +13 -93
- package/package.json +1 -1
- package/src/schema/transactionRequest/intents/baseIntent.ts +18 -7
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as t from "io-ts";
|
|
2
|
-
import { intentTypes } from "./intentType";
|
|
3
2
|
export declare const BaseIntent: t.IntersectionC<[t.TypeC<{
|
|
4
3
|
intentType: t.KeyofC<{
|
|
5
4
|
payment: t.LiteralC<"payment">;
|
|
@@ -100,16 +99,8 @@ export declare const BaseIntent: t.IntersectionC<[t.TypeC<{
|
|
|
100
99
|
nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
|
|
101
100
|
}>]>;
|
|
102
101
|
export type BaseIntent = t.TypeOf<typeof BaseIntent>;
|
|
103
|
-
declare const
|
|
104
|
-
type
|
|
105
|
-
export declare const BaseIntentCatchAll: t.IntersectionC<[t.TypeC<{
|
|
106
|
-
intentType: t.KeyofC<CatchAllIntentTypesMap>;
|
|
107
|
-
}>, t.PartialC<{
|
|
108
|
-
sequenceId: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
|
109
|
-
comment: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
|
110
|
-
nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
|
|
111
|
-
}>]>;
|
|
112
|
-
export type BaseIntentCatchAll = t.TypeOf<typeof BaseIntentCatchAll>;
|
|
102
|
+
export declare const BaseIntentCatchAll: t.Type<BaseIntent>;
|
|
103
|
+
export type BaseIntentCatchAll = BaseIntent;
|
|
113
104
|
export declare const BaseIntentWithoutNonce: t.IntersectionC<[t.TypeC<{
|
|
114
105
|
intentType: t.KeyofC<{
|
|
115
106
|
payment: t.LiteralC<"payment">;
|
|
@@ -278,4 +269,3 @@ export declare const BaseIntentWithAmount: t.TypeC<{
|
|
|
278
269
|
}>;
|
|
279
270
|
}>;
|
|
280
271
|
export type BaseIntentWithAmount = t.TypeOf<typeof BaseIntentWithAmount>;
|
|
281
|
-
export {};
|
|
@@ -51,10 +51,11 @@ const CATCH_ALL_EXCLUDED_INTENT_TYPES = [
|
|
|
51
51
|
intentType_1.intentTypes.cantonGovernanceLockProposeTransfer.value,
|
|
52
52
|
];
|
|
53
53
|
const CatchAllIntentTypes = Object.fromEntries(Object.entries(intentType_1.intentTypes).filter(([key]) => !CATCH_ALL_EXCLUDED_INTENT_TYPES.includes(key)));
|
|
54
|
-
|
|
54
|
+
const BaseIntentCatchAllRuntime = t.intersection([
|
|
55
55
|
t.type({ intentType: t.keyof(CatchAllIntentTypes) }),
|
|
56
56
|
BaseIntentOptional,
|
|
57
57
|
]);
|
|
58
|
+
exports.BaseIntentCatchAll = BaseIntentCatchAllRuntime;
|
|
58
59
|
const _catchAllGuardsHold = [true, true];
|
|
59
60
|
void _catchAllGuardsHold;
|
|
60
61
|
exports.BaseIntentWithoutNonce = t.intersection([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/baseIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAAuD;AACvD,0CAA0D;AAC1D,qDAAkD;AAClD,+DAA4D;AAC5D,qCAAkC;AAMlC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC;IAChC,UAAU,EAAE,uBAAU;CACvB,CAAC,CAAC;AAEH,MAAM,kBAAkB,GAAG,CAAC,CAAC,OAAO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,sBAAc;KACxB,CAAC;CACH,CAAC,CAAC;AAiCU,QAAA,wBAAwB,GAAG,CAAC,CAAC,IAAI,CAAC;IAE7C,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,+BAAc,CAAC;CACpC,CAAC,CAAC;AAoBU,QAAA,6BAA6B,GAAG,CAAC,CAAC,IAAI,CAAC;IAElD,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,yCAAmB,CAAC;CACzC,CAAC,CAAC;AAUU,QAAA,uBAAuB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC5C,UAAU,EAAE,CAAC,CAAC,KAAK,CACjB,CAAC,CAAC,OAAO,CAAC;QACR,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC;YACnB,SAAS,EAAE,CAAC,CAAC,MAAM;SACpB,CAAC;KACH,CAAC,CACH;CACF,CAAC,CAAC;AAgBU,QAAA,uBAAuB,GAAG,CAAC,CAAC,IAAI,CAAC;IAE5C,SAAS,EAAE,CAAC,CAAC,MAAM;CACpB,CAAC,CAAC;AAmBU,QAAA,oBAAoB,GAAG,CAAC,CAAC,IAAI,CAAC;IAEzC,MAAM,EAAE,eAAM;CACf,CAAC,CAAC"}
|
|
@@ -20359,97 +20359,17 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
|
|
|
20359
20359
|
isTestTransaction: t.BooleanC;
|
|
20360
20360
|
}>]>]>, t.TypeC<{
|
|
20361
20361
|
unifiedRecipientPreference: t.UnionC<[t.Type<"shielded" | "transparent", "shielded" | "transparent", unknown>, t.UndefinedC]>;
|
|
20362
|
-
}>]>, t.
|
|
20363
|
-
intentType:
|
|
20364
|
-
|
|
20365
|
-
|
|
20366
|
-
|
|
20367
|
-
|
|
20368
|
-
|
|
20369
|
-
|
|
20370
|
-
|
|
20371
|
-
|
|
20372
|
-
|
|
20373
|
-
|
|
20374
|
-
|
|
20375
|
-
claim: t.LiteralC<"claim">;
|
|
20376
|
-
stakeClaimRewards: t.LiteralC<"stakeClaimRewards">;
|
|
20377
|
-
pledge: t.LiteralC<"pledge">;
|
|
20378
|
-
voteDelegation: t.LiteralC<"voteDelegation">;
|
|
20379
|
-
vote: t.LiteralC<"vote">;
|
|
20380
|
-
createAccount: t.LiteralC<"createAccount">;
|
|
20381
|
-
updateAccount: t.LiteralC<"updateAccount">;
|
|
20382
|
-
addTrustLine: t.LiteralC<"addTrustLine">;
|
|
20383
|
-
removeTrustLine: t.LiteralC<"removeTrustLine">;
|
|
20384
|
-
signMessage: t.LiteralC<"signMessage">;
|
|
20385
|
-
signTypedStructuredData: t.LiteralC<"signTypedStructuredData">;
|
|
20386
|
-
enableToken: t.LiteralC<"enableToken">;
|
|
20387
|
-
disableToken: t.LiteralC<"disableToken">;
|
|
20388
|
-
authorize: t.LiteralC<"authorize">;
|
|
20389
|
-
acceleration: t.LiteralC<"acceleration">;
|
|
20390
|
-
fillNonce: t.LiteralC<"fillNonce">;
|
|
20391
|
-
walletRecovery: t.LiteralC<"walletRecovery">;
|
|
20392
|
-
contractCall: t.LiteralC<"contractCall">;
|
|
20393
|
-
deactivate: t.LiteralC<"deactivate">;
|
|
20394
|
-
customTx: t.LiteralC<"customTx">;
|
|
20395
|
-
confidentialTransfer: t.LiteralC<"confidentialTransfer">;
|
|
20396
|
-
closeAssociatedTokenAccount: t.LiteralC<"closeAssociatedTokenAccount">;
|
|
20397
|
-
stakeWithCallData: t.LiteralC<"stakeWithCallData">;
|
|
20398
|
-
unstakeWithCallData: t.LiteralC<"unstakeWithCallData">;
|
|
20399
|
-
switchValidatorWithCallData: t.LiteralC<"switchValidatorWithCallData">;
|
|
20400
|
-
feeAddressTransfer: t.LiteralC<"feeAddressTransfer">;
|
|
20401
|
-
tokenApproval: t.LiteralC<"tokenApproval">;
|
|
20402
|
-
transferStake: t.LiteralC<"transferStake">;
|
|
20403
|
-
validatorRegistration: t.LiteralC<"validatorRegistration">;
|
|
20404
|
-
increaseStake: t.LiteralC<"increaseStake">;
|
|
20405
|
-
decreaseStake: t.LiteralC<"decreaseStake">;
|
|
20406
|
-
signalExit: t.LiteralC<"signalExit">;
|
|
20407
|
-
withdrawStake: t.LiteralC<"withdrawStake">;
|
|
20408
|
-
spotTransfer: t.LiteralC<"spotTransfer">;
|
|
20409
|
-
bridgeFunds: t.LiteralC<"bridgeFunds">;
|
|
20410
|
-
enableBridging: t.LiteralC<"enableBridging">;
|
|
20411
|
-
goUnstake: t.LiteralC<"goUnstake">;
|
|
20412
|
-
createBtcDelegation: t.LiteralC<"createBtcDelegation">;
|
|
20413
|
-
transferAccept: t.LiteralC<"transferAccept">;
|
|
20414
|
-
transferReject: t.LiteralC<"transferReject">;
|
|
20415
|
-
transferAcknowledge: t.LiteralC<"transferAcknowledge">;
|
|
20416
|
-
transferOfferWithdrawn: t.LiteralC<"transferOfferWithdrawn">;
|
|
20417
|
-
cosignDelegationProposal: t.LiteralC<"cosignDelegationProposal">;
|
|
20418
|
-
cosignDelegationAccept: t.LiteralC<"cosignDelegationAccept">;
|
|
20419
|
-
allocationRequest: t.LiteralC<"allocationRequest">;
|
|
20420
|
-
cantonCommand: t.LiteralC<"cantonCommand">;
|
|
20421
|
-
cantonBroadridgeStandingDelegation: t.LiteralC<"cantonBroadridgeStandingDelegation">;
|
|
20422
|
-
allocationAllocate: t.LiteralC<"allocationAllocate">;
|
|
20423
|
-
allocationOfferWithdrawn: t.LiteralC<"allocationOfferWithdrawn">;
|
|
20424
|
-
allocationReject: t.LiteralC<"allocationReject">;
|
|
20425
|
-
cantonEndInvestorOnboardingOffer: t.LiteralC<"cantonEndInvestorOnboardingOffer">;
|
|
20426
|
-
cantonEndInvestorOnboardingAccept: t.LiteralC<"cantonEndInvestorOnboardingAccept">;
|
|
20427
|
-
cantonEndInvestorOnboardingReject: t.LiteralC<"cantonEndInvestorOnboardingReject">;
|
|
20428
|
-
cantonEndInvestorOnboardingCancel: t.LiteralC<"cantonEndInvestorOnboardingCancel">;
|
|
20429
|
-
cantonEndInvestorOffboarding: t.LiteralC<"cantonEndInvestorOffboarding">;
|
|
20430
|
-
cantonParticipantOnboardingRequest: t.LiteralC<"cantonParticipantOnboardingRequest">;
|
|
20431
|
-
cantonParticipantAllowListAdd: t.LiteralC<"cantonParticipantAllowListAdd">;
|
|
20432
|
-
cantonParticipantAllowListRemove: t.LiteralC<"cantonParticipantAllowListRemove">;
|
|
20433
|
-
"defi-deposit": t.LiteralC<"defi-deposit">;
|
|
20434
|
-
"defi-redeem": t.LiteralC<"defi-redeem">;
|
|
20435
|
-
"defi-approve": t.LiteralC<"defi-approve">;
|
|
20436
|
-
"defi-withdraw": t.LiteralC<"defi-withdraw">;
|
|
20437
|
-
"wrap-native": t.LiteralC<"wrap-native">;
|
|
20438
|
-
"unwrap-native": t.LiteralC<"unwrap-native">;
|
|
20439
|
-
wrapApprove: t.LiteralC<"wrapApprove">;
|
|
20440
|
-
wrap: t.LiteralC<"wrap">;
|
|
20441
|
-
unwrap: t.LiteralC<"unwrap">;
|
|
20442
|
-
finalizeUnwrap: t.LiteralC<"finalizeUnwrap">;
|
|
20443
|
-
delegateResource: t.LiteralC<"delegateResource">;
|
|
20444
|
-
undelegateResource: t.LiteralC<"undelegateResource">;
|
|
20445
|
-
stacksRegisterForBond: t.LiteralC<"stacksRegisterForBond">;
|
|
20446
|
-
export: t.LiteralC<"export">;
|
|
20447
|
-
import: t.LiteralC<"import">;
|
|
20448
|
-
importtoc: t.LiteralC<"importtoc">;
|
|
20449
|
-
}>;
|
|
20450
|
-
}>, t.PartialC<{
|
|
20451
|
-
sequenceId: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
|
20452
|
-
comment: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
|
20453
|
-
nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
|
|
20454
|
-
}>]>]>;
|
|
20362
|
+
}>]>, t.Type<{
|
|
20363
|
+
intentType: "payment" | "transferToken" | "consolidate" | "consolidateToken" | "fanout" | "stake" | "unstake" | "cancel" | "delegate" | "undelegate" | "switchValidator" | "claim" | "stakeClaimRewards" | "pledge" | "voteDelegation" | "vote" | "createAccount" | "updateAccount" | "addTrustLine" | "removeTrustLine" | "signMessage" | "signTypedStructuredData" | "enableToken" | "disableToken" | "authorize" | "acceleration" | "fillNonce" | "walletRecovery" | "contractCall" | "deactivate" | "customTx" | "confidentialTransfer" | "closeAssociatedTokenAccount" | "stakeWithCallData" | "unstakeWithCallData" | "switchValidatorWithCallData" | "feeAddressTransfer" | "tokenApproval" | "transferStake" | "validatorRegistration" | "increaseStake" | "decreaseStake" | "signalExit" | "withdrawStake" | "spotTransfer" | "bridgeFunds" | "enableBridging" | "goUnstake" | "createBtcDelegation" | "transferAccept" | "transferReject" | "transferAcknowledge" | "transferOfferWithdrawn" | "cosignDelegationProposal" | "cosignDelegationAccept" | "allocationRequest" | "cantonCommand" | "cantonBroadridgeStandingDelegation" | "allocationAllocate" | "allocationOfferWithdrawn" | "allocationReject" | "cantonEndInvestorOnboardingOffer" | "cantonEndInvestorOnboardingAccept" | "cantonEndInvestorOnboardingReject" | "cantonEndInvestorOnboardingCancel" | "cantonEndInvestorOffboarding" | "cantonParticipantOnboardingRequest" | "cantonParticipantAllowListAdd" | "cantonParticipantAllowListRemove" | "cantonGovernanceLockCreate" | "cantonGovernanceLockUnlock" | "cantonGovernanceLockProvisionalUnlock" | "cantonGovernanceLockWithdraw" | "cantonGovernanceLockProposeSubstitution" | "cantonGovernanceLockProposeTransfer" | "defi-deposit" | "defi-redeem" | "defi-approve" | "defi-withdraw" | "wrap-native" | "unwrap-native" | "wrapApprove" | "wrap" | "unwrap" | "finalizeUnwrap" | "delegateResource" | "undelegateResource" | "stacksRegisterForBond" | "export" | "import" | "importtoc";
|
|
20364
|
+
} & {
|
|
20365
|
+
sequenceId?: string | undefined;
|
|
20366
|
+
comment?: string | undefined;
|
|
20367
|
+
nonce?: string | number | undefined;
|
|
20368
|
+
}, {
|
|
20369
|
+
intentType: "payment" | "transferToken" | "consolidate" | "consolidateToken" | "fanout" | "stake" | "unstake" | "cancel" | "delegate" | "undelegate" | "switchValidator" | "claim" | "stakeClaimRewards" | "pledge" | "voteDelegation" | "vote" | "createAccount" | "updateAccount" | "addTrustLine" | "removeTrustLine" | "signMessage" | "signTypedStructuredData" | "enableToken" | "disableToken" | "authorize" | "acceleration" | "fillNonce" | "walletRecovery" | "contractCall" | "deactivate" | "customTx" | "confidentialTransfer" | "closeAssociatedTokenAccount" | "stakeWithCallData" | "unstakeWithCallData" | "switchValidatorWithCallData" | "feeAddressTransfer" | "tokenApproval" | "transferStake" | "validatorRegistration" | "increaseStake" | "decreaseStake" | "signalExit" | "withdrawStake" | "spotTransfer" | "bridgeFunds" | "enableBridging" | "goUnstake" | "createBtcDelegation" | "transferAccept" | "transferReject" | "transferAcknowledge" | "transferOfferWithdrawn" | "cosignDelegationProposal" | "cosignDelegationAccept" | "allocationRequest" | "cantonCommand" | "cantonBroadridgeStandingDelegation" | "allocationAllocate" | "allocationOfferWithdrawn" | "allocationReject" | "cantonEndInvestorOnboardingOffer" | "cantonEndInvestorOnboardingAccept" | "cantonEndInvestorOnboardingReject" | "cantonEndInvestorOnboardingCancel" | "cantonEndInvestorOffboarding" | "cantonParticipantOnboardingRequest" | "cantonParticipantAllowListAdd" | "cantonParticipantAllowListRemove" | "cantonGovernanceLockCreate" | "cantonGovernanceLockUnlock" | "cantonGovernanceLockProvisionalUnlock" | "cantonGovernanceLockWithdraw" | "cantonGovernanceLockProposeSubstitution" | "cantonGovernanceLockProposeTransfer" | "defi-deposit" | "defi-redeem" | "defi-approve" | "defi-withdraw" | "wrap-native" | "unwrap-native" | "wrapApprove" | "wrap" | "unwrap" | "finalizeUnwrap" | "delegateResource" | "undelegateResource" | "stacksRegisterForBond" | "export" | "import" | "importtoc";
|
|
20370
|
+
} & {
|
|
20371
|
+
sequenceId?: string | undefined;
|
|
20372
|
+
comment?: string | undefined;
|
|
20373
|
+
nonce?: string | number | undefined;
|
|
20374
|
+
}, unknown>]>;
|
|
20455
20375
|
export type TransactionIntent = t.TypeOf<typeof TransactionIntent>;
|
|
@@ -20363,97 +20363,17 @@ export declare const TransactionIntentFullOnly: t.UnionC<[t.IntersectionC<[t.Int
|
|
|
20363
20363
|
unifiedRecipientPreference: t.UnionC<[t.Type<"shielded" | "transparent", "shielded" | "transparent", unknown>, t.UndefinedC]>;
|
|
20364
20364
|
}>]>]>;
|
|
20365
20365
|
export type TransactionIntentFullOnly = t.TypeOf<typeof TransactionIntentFullOnly>;
|
|
20366
|
-
export declare const TransactionIntentLiteOnly: t.
|
|
20367
|
-
intentType:
|
|
20368
|
-
|
|
20369
|
-
|
|
20370
|
-
|
|
20371
|
-
|
|
20372
|
-
|
|
20373
|
-
|
|
20374
|
-
|
|
20375
|
-
|
|
20376
|
-
|
|
20377
|
-
|
|
20378
|
-
|
|
20379
|
-
claim: t.LiteralC<"claim">;
|
|
20380
|
-
stakeClaimRewards: t.LiteralC<"stakeClaimRewards">;
|
|
20381
|
-
pledge: t.LiteralC<"pledge">;
|
|
20382
|
-
voteDelegation: t.LiteralC<"voteDelegation">;
|
|
20383
|
-
vote: t.LiteralC<"vote">;
|
|
20384
|
-
createAccount: t.LiteralC<"createAccount">;
|
|
20385
|
-
updateAccount: t.LiteralC<"updateAccount">;
|
|
20386
|
-
addTrustLine: t.LiteralC<"addTrustLine">;
|
|
20387
|
-
removeTrustLine: t.LiteralC<"removeTrustLine">;
|
|
20388
|
-
signMessage: t.LiteralC<"signMessage">;
|
|
20389
|
-
signTypedStructuredData: t.LiteralC<"signTypedStructuredData">;
|
|
20390
|
-
enableToken: t.LiteralC<"enableToken">;
|
|
20391
|
-
disableToken: t.LiteralC<"disableToken">;
|
|
20392
|
-
authorize: t.LiteralC<"authorize">;
|
|
20393
|
-
acceleration: t.LiteralC<"acceleration">;
|
|
20394
|
-
fillNonce: t.LiteralC<"fillNonce">;
|
|
20395
|
-
walletRecovery: t.LiteralC<"walletRecovery">;
|
|
20396
|
-
contractCall: t.LiteralC<"contractCall">;
|
|
20397
|
-
deactivate: t.LiteralC<"deactivate">;
|
|
20398
|
-
customTx: t.LiteralC<"customTx">;
|
|
20399
|
-
confidentialTransfer: t.LiteralC<"confidentialTransfer">;
|
|
20400
|
-
closeAssociatedTokenAccount: t.LiteralC<"closeAssociatedTokenAccount">;
|
|
20401
|
-
stakeWithCallData: t.LiteralC<"stakeWithCallData">;
|
|
20402
|
-
unstakeWithCallData: t.LiteralC<"unstakeWithCallData">;
|
|
20403
|
-
switchValidatorWithCallData: t.LiteralC<"switchValidatorWithCallData">;
|
|
20404
|
-
feeAddressTransfer: t.LiteralC<"feeAddressTransfer">;
|
|
20405
|
-
tokenApproval: t.LiteralC<"tokenApproval">;
|
|
20406
|
-
transferStake: t.LiteralC<"transferStake">;
|
|
20407
|
-
validatorRegistration: t.LiteralC<"validatorRegistration">;
|
|
20408
|
-
increaseStake: t.LiteralC<"increaseStake">;
|
|
20409
|
-
decreaseStake: t.LiteralC<"decreaseStake">;
|
|
20410
|
-
signalExit: t.LiteralC<"signalExit">;
|
|
20411
|
-
withdrawStake: t.LiteralC<"withdrawStake">;
|
|
20412
|
-
spotTransfer: t.LiteralC<"spotTransfer">;
|
|
20413
|
-
bridgeFunds: t.LiteralC<"bridgeFunds">;
|
|
20414
|
-
enableBridging: t.LiteralC<"enableBridging">;
|
|
20415
|
-
goUnstake: t.LiteralC<"goUnstake">;
|
|
20416
|
-
createBtcDelegation: t.LiteralC<"createBtcDelegation">;
|
|
20417
|
-
transferAccept: t.LiteralC<"transferAccept">;
|
|
20418
|
-
transferReject: t.LiteralC<"transferReject">;
|
|
20419
|
-
transferAcknowledge: t.LiteralC<"transferAcknowledge">;
|
|
20420
|
-
transferOfferWithdrawn: t.LiteralC<"transferOfferWithdrawn">;
|
|
20421
|
-
cosignDelegationProposal: t.LiteralC<"cosignDelegationProposal">;
|
|
20422
|
-
cosignDelegationAccept: t.LiteralC<"cosignDelegationAccept">;
|
|
20423
|
-
allocationRequest: t.LiteralC<"allocationRequest">;
|
|
20424
|
-
cantonCommand: t.LiteralC<"cantonCommand">;
|
|
20425
|
-
cantonBroadridgeStandingDelegation: t.LiteralC<"cantonBroadridgeStandingDelegation">;
|
|
20426
|
-
allocationAllocate: t.LiteralC<"allocationAllocate">;
|
|
20427
|
-
allocationOfferWithdrawn: t.LiteralC<"allocationOfferWithdrawn">;
|
|
20428
|
-
allocationReject: t.LiteralC<"allocationReject">;
|
|
20429
|
-
cantonEndInvestorOnboardingOffer: t.LiteralC<"cantonEndInvestorOnboardingOffer">;
|
|
20430
|
-
cantonEndInvestorOnboardingAccept: t.LiteralC<"cantonEndInvestorOnboardingAccept">;
|
|
20431
|
-
cantonEndInvestorOnboardingReject: t.LiteralC<"cantonEndInvestorOnboardingReject">;
|
|
20432
|
-
cantonEndInvestorOnboardingCancel: t.LiteralC<"cantonEndInvestorOnboardingCancel">;
|
|
20433
|
-
cantonEndInvestorOffboarding: t.LiteralC<"cantonEndInvestorOffboarding">;
|
|
20434
|
-
cantonParticipantOnboardingRequest: t.LiteralC<"cantonParticipantOnboardingRequest">;
|
|
20435
|
-
cantonParticipantAllowListAdd: t.LiteralC<"cantonParticipantAllowListAdd">;
|
|
20436
|
-
cantonParticipantAllowListRemove: t.LiteralC<"cantonParticipantAllowListRemove">;
|
|
20437
|
-
"defi-deposit": t.LiteralC<"defi-deposit">;
|
|
20438
|
-
"defi-redeem": t.LiteralC<"defi-redeem">;
|
|
20439
|
-
"defi-approve": t.LiteralC<"defi-approve">;
|
|
20440
|
-
"defi-withdraw": t.LiteralC<"defi-withdraw">;
|
|
20441
|
-
"wrap-native": t.LiteralC<"wrap-native">;
|
|
20442
|
-
"unwrap-native": t.LiteralC<"unwrap-native">;
|
|
20443
|
-
wrapApprove: t.LiteralC<"wrapApprove">;
|
|
20444
|
-
wrap: t.LiteralC<"wrap">;
|
|
20445
|
-
unwrap: t.LiteralC<"unwrap">;
|
|
20446
|
-
finalizeUnwrap: t.LiteralC<"finalizeUnwrap">;
|
|
20447
|
-
delegateResource: t.LiteralC<"delegateResource">;
|
|
20448
|
-
undelegateResource: t.LiteralC<"undelegateResource">;
|
|
20449
|
-
stacksRegisterForBond: t.LiteralC<"stacksRegisterForBond">;
|
|
20450
|
-
export: t.LiteralC<"export">;
|
|
20451
|
-
import: t.LiteralC<"import">;
|
|
20452
|
-
importtoc: t.LiteralC<"importtoc">;
|
|
20453
|
-
}>;
|
|
20454
|
-
}>, t.PartialC<{
|
|
20455
|
-
sequenceId: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
|
20456
|
-
comment: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
|
20457
|
-
nonce: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
|
|
20458
|
-
}>]>;
|
|
20366
|
+
export declare const TransactionIntentLiteOnly: t.Type<{
|
|
20367
|
+
intentType: "payment" | "transferToken" | "consolidate" | "consolidateToken" | "fanout" | "stake" | "unstake" | "cancel" | "delegate" | "undelegate" | "switchValidator" | "claim" | "stakeClaimRewards" | "pledge" | "voteDelegation" | "vote" | "createAccount" | "updateAccount" | "addTrustLine" | "removeTrustLine" | "signMessage" | "signTypedStructuredData" | "enableToken" | "disableToken" | "authorize" | "acceleration" | "fillNonce" | "walletRecovery" | "contractCall" | "deactivate" | "customTx" | "confidentialTransfer" | "closeAssociatedTokenAccount" | "stakeWithCallData" | "unstakeWithCallData" | "switchValidatorWithCallData" | "feeAddressTransfer" | "tokenApproval" | "transferStake" | "validatorRegistration" | "increaseStake" | "decreaseStake" | "signalExit" | "withdrawStake" | "spotTransfer" | "bridgeFunds" | "enableBridging" | "goUnstake" | "createBtcDelegation" | "transferAccept" | "transferReject" | "transferAcknowledge" | "transferOfferWithdrawn" | "cosignDelegationProposal" | "cosignDelegationAccept" | "allocationRequest" | "cantonCommand" | "cantonBroadridgeStandingDelegation" | "allocationAllocate" | "allocationOfferWithdrawn" | "allocationReject" | "cantonEndInvestorOnboardingOffer" | "cantonEndInvestorOnboardingAccept" | "cantonEndInvestorOnboardingReject" | "cantonEndInvestorOnboardingCancel" | "cantonEndInvestorOffboarding" | "cantonParticipantOnboardingRequest" | "cantonParticipantAllowListAdd" | "cantonParticipantAllowListRemove" | "cantonGovernanceLockCreate" | "cantonGovernanceLockUnlock" | "cantonGovernanceLockProvisionalUnlock" | "cantonGovernanceLockWithdraw" | "cantonGovernanceLockProposeSubstitution" | "cantonGovernanceLockProposeTransfer" | "defi-deposit" | "defi-redeem" | "defi-approve" | "defi-withdraw" | "wrap-native" | "unwrap-native" | "wrapApprove" | "wrap" | "unwrap" | "finalizeUnwrap" | "delegateResource" | "undelegateResource" | "stacksRegisterForBond" | "export" | "import" | "importtoc";
|
|
20368
|
+
} & {
|
|
20369
|
+
sequenceId?: string | undefined;
|
|
20370
|
+
comment?: string | undefined;
|
|
20371
|
+
nonce?: string | number | undefined;
|
|
20372
|
+
}, {
|
|
20373
|
+
intentType: "payment" | "transferToken" | "consolidate" | "consolidateToken" | "fanout" | "stake" | "unstake" | "cancel" | "delegate" | "undelegate" | "switchValidator" | "claim" | "stakeClaimRewards" | "pledge" | "voteDelegation" | "vote" | "createAccount" | "updateAccount" | "addTrustLine" | "removeTrustLine" | "signMessage" | "signTypedStructuredData" | "enableToken" | "disableToken" | "authorize" | "acceleration" | "fillNonce" | "walletRecovery" | "contractCall" | "deactivate" | "customTx" | "confidentialTransfer" | "closeAssociatedTokenAccount" | "stakeWithCallData" | "unstakeWithCallData" | "switchValidatorWithCallData" | "feeAddressTransfer" | "tokenApproval" | "transferStake" | "validatorRegistration" | "increaseStake" | "decreaseStake" | "signalExit" | "withdrawStake" | "spotTransfer" | "bridgeFunds" | "enableBridging" | "goUnstake" | "createBtcDelegation" | "transferAccept" | "transferReject" | "transferAcknowledge" | "transferOfferWithdrawn" | "cosignDelegationProposal" | "cosignDelegationAccept" | "allocationRequest" | "cantonCommand" | "cantonBroadridgeStandingDelegation" | "allocationAllocate" | "allocationOfferWithdrawn" | "allocationReject" | "cantonEndInvestorOnboardingOffer" | "cantonEndInvestorOnboardingAccept" | "cantonEndInvestorOnboardingReject" | "cantonEndInvestorOnboardingCancel" | "cantonEndInvestorOffboarding" | "cantonParticipantOnboardingRequest" | "cantonParticipantAllowListAdd" | "cantonParticipantAllowListRemove" | "cantonGovernanceLockCreate" | "cantonGovernanceLockUnlock" | "cantonGovernanceLockProvisionalUnlock" | "cantonGovernanceLockWithdraw" | "cantonGovernanceLockProposeSubstitution" | "cantonGovernanceLockProposeTransfer" | "defi-deposit" | "defi-redeem" | "defi-approve" | "defi-withdraw" | "wrap-native" | "unwrap-native" | "wrapApprove" | "wrap" | "unwrap" | "finalizeUnwrap" | "delegateResource" | "undelegateResource" | "stacksRegisterForBond" | "export" | "import" | "importtoc";
|
|
20374
|
+
} & {
|
|
20375
|
+
sequenceId?: string | undefined;
|
|
20376
|
+
comment?: string | undefined;
|
|
20377
|
+
nonce?: string | number | undefined;
|
|
20378
|
+
}, unknown>;
|
|
20459
20379
|
export type TransactionIntentLiteOnly = t.TypeOf<typeof TransactionIntentLiteOnly>;
|
package/package.json
CHANGED
|
@@ -66,22 +66,33 @@ const CatchAllIntentTypes = Object.fromEntries(
|
|
|
66
66
|
) as CatchAllIntentTypesMap;
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
|
-
* Catch-all for intents that have no codec yet:
|
|
70
|
-
*
|
|
69
|
+
* Catch-all for intents that have no codec yet: the open fallback of intent unions. At RUNTIME it
|
|
70
|
+
* rejects every `intentType` listed in {@link CATCH_ALL_EXCLUDED_INTENT_TYPES} (the keyof below
|
|
71
|
+
* omits them), so an invalid payload for one of those intents cannot decode as a plain
|
|
72
|
+
* `BaseIntent` — it must match its dedicated codec higher up in the union.
|
|
73
|
+
*
|
|
74
|
+
* The DECLARED type is deliberately the full-width `BaseIntent`, not `t.TypeOf` of the runtime
|
|
75
|
+
* codec: stored-intent unions in consumers (e.g. wallet-platform's `Intent`) are built over the
|
|
76
|
+
* FULL {@link IntentType} registry, so a narrowed static type would make those unions
|
|
77
|
+
* unassignable to `TransactionIntent` — every catch-all-shaped member would fail to match. The
|
|
78
|
+
* runtime codec stays a plain intersection with a narrower keyof (no `t.refinement`, no
|
|
79
|
+
* `t.brand`), so OpenAPI generation emits a plain enum and no unresolvable schema.
|
|
71
80
|
*/
|
|
72
|
-
|
|
81
|
+
const BaseIntentCatchAllRuntime = t.intersection([
|
|
73
82
|
t.type({ intentType: t.keyof(CatchAllIntentTypes) }),
|
|
74
83
|
BaseIntentOptional,
|
|
75
84
|
]);
|
|
76
85
|
|
|
77
|
-
export
|
|
86
|
+
export const BaseIntentCatchAll: t.Type<BaseIntent> =
|
|
87
|
+
BaseIntentCatchAllRuntime as unknown as t.Type<BaseIntent>;
|
|
88
|
+
|
|
89
|
+
export type BaseIntentCatchAll = BaseIntent;
|
|
78
90
|
|
|
79
91
|
/**
|
|
80
92
|
* Compile-time drift guards:
|
|
81
93
|
* 1. The exclusion list may only contain registry keys — an unknown name fails to compile.
|
|
82
|
-
* 2. The catch-all's
|
|
83
|
-
*
|
|
84
|
-
* intent name.
|
|
94
|
+
* 2. The catch-all's declared `intentType` remains a subset of {@link IntentType}, so a decoded
|
|
95
|
+
* catch-all intent's `intentType` still assigns to any API expecting a supported intent name.
|
|
85
96
|
*/
|
|
86
97
|
type ExcludedIntentType = (typeof CATCH_ALL_EXCLUDED_INTENT_TYPES)[number];
|
|
87
98
|
type _ExcludedKeysAreRegistryKeys =
|