@bitgo/public-types 4.24.0 → 4.26.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.
- package/dist/src/schema/lightning/payment.d.ts +14 -0
- package/dist/src/schema/lightning/payment.js +13 -1
- package/dist/src/schema/lightning/payment.js.map +1 -1
- package/dist/src/schema/transactionRequest/intents/accelerationIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/accountBaseCreateAccountIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/accountBaseUpdateAccountIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/adaPaymentIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/adaPledgeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/adaStakeClaimRewardsIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/adaStakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/adaUnstakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/adaVoteDelegationIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/atomPaymentIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/atomStakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/atomUnstakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/atomWithdrawIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/babyCreateBtcDelegationIntent.d.ts +48 -0
- package/dist/src/schema/transactionRequest/intents/babyCreateBtcDelegationIntent.js +37 -0
- package/dist/src/schema/transactionRequest/intents/babyCreateBtcDelegationIntent.js.map +1 -0
- package/dist/src/schema/transactionRequest/intents/baseIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/baseStakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/baseStakeIntentWithCalldata.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/beraDelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/bscDelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/bscStakeClaimRewardsIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/bscUndelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/bscWithdrawUndelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/consolidateTokenIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/coredaoClaimIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/coredaoDelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/coredaoUndelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cosmosPaymentIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cosmosStakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cosmosSwitchValidatorIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cosmosUnstakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cosmosWithdrawIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/dotBaseIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/dotCreateAccountIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/dotPaymentIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/dotStakingIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/dotUnstakingIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/dotWithdrawStakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/enableTokenIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/ethAccelerationIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/ethConsolidateTokenIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/ethFillNonceIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/ethLikeStakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/ethPaymentIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/ethStakingIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/ethTransferTokenIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/feeAddressTransferIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/fillNonceIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/icpPaymentIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/index.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/index.js +1 -0
- package/dist/src/schema/transactionRequest/intents/index.js.map +1 -1
- package/dist/src/schema/transactionRequest/intents/intent.d.ts +169 -2
- package/dist/src/schema/transactionRequest/intents/intent.js +2 -0
- package/dist/src/schema/transactionRequest/intents/intent.js.map +1 -1
- package/dist/src/schema/transactionRequest/intents/intentType.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/intentType.js +1 -0
- package/dist/src/schema/transactionRequest/intents/intentType.js.map +1 -1
- package/dist/src/schema/transactionRequest/intents/lightningPaymentIntent.d.ts +53 -2
- package/dist/src/schema/transactionRequest/intents/lightningPaymentIntent.js +15 -6
- package/dist/src/schema/transactionRequest/intents/lightningPaymentIntent.js.map +1 -1
- package/dist/src/schema/transactionRequest/intents/mmiSignMessageIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/mmiSignTransactionIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/nearStakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/nearUnstakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/nearWithdrawIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/paymentIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/signMessageIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/solAuthorizeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/solClaimIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/solCloseAssociatedTokenAccountIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/solCreateAssociatedTokenAccountIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/solDeactivateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/solDelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/solPaymentIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/solStakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/solUnstakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/stakeClaimRewardsIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/stakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/stakeSwitchValidatorIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/substrateBaseIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/substratePaymentIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/suiBuildOptions.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/suiConsolidateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/suiCustomTxIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/suiPaymentIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/suiStakingIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/suiUnstakingIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/taoStakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/taoStakingBaseIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/taoUnstakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/tonDelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/tonPaymentIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/tonUndelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/transferTokenIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/unstakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/voteDelegationIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/walletRecoveryIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/walrusStakingIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/walrusUndelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/walrusWithdrawIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/withdrawIntent.d.ts +1 -0
- package/package.json +1 -1
- package/src/schema/lightning/payment.ts +18 -0
- package/src/schema/transactionRequest/intents/babyCreateBtcDelegationIntent.ts +20 -0
- package/src/schema/transactionRequest/intents/index.ts +1 -0
- package/src/schema/transactionRequest/intents/intent.ts +2 -0
- package/src/schema/transactionRequest/intents/intentType.ts +1 -0
- package/src/schema/transactionRequest/intents/lightningPaymentIntent.ts +19 -7
@@ -1,6 +1,24 @@
|
|
1
1
|
import * as t from "io-ts";
|
2
2
|
import { BigIntFromString } from "io-ts-types";
|
3
3
|
|
4
|
+
export const LightningOnchainRecipient = t.type({
|
5
|
+
amountSat: BigIntFromString,
|
6
|
+
address: t.string,
|
7
|
+
});
|
8
|
+
export type LightningOnchainRecipient = t.TypeOf<
|
9
|
+
typeof LightningOnchainRecipient
|
10
|
+
>;
|
11
|
+
|
12
|
+
export const LightningOnchainRequest = t.intersection([
|
13
|
+
t.type({
|
14
|
+
recipients: t.array(LightningOnchainRecipient),
|
15
|
+
}),
|
16
|
+
t.partial({
|
17
|
+
satsPerVbyte: BigIntFromString,
|
18
|
+
}),
|
19
|
+
]);
|
20
|
+
export type LightningOnchainRequest = t.TypeOf<typeof LightningOnchainRequest>;
|
21
|
+
|
4
22
|
export const LightningPaymentRequest = t.intersection([
|
5
23
|
t.type({
|
6
24
|
invoice: t.string,
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import * as t from "io-ts";
|
2
|
+
import { intentTypes } from "./intentType";
|
3
|
+
import { BaseStakeIntent } from "./baseStakeIntent";
|
4
|
+
|
5
|
+
/**
|
6
|
+
* @title Baby CreateBtcDelegation Intent
|
7
|
+
*
|
8
|
+
* @param {string} createBtcDelegationBytes - MsgCreateBTCDelegation protobuf bytes encoded as hex
|
9
|
+
*/
|
10
|
+
export const BabyCreateBtcDelegationIntent = t.intersection([
|
11
|
+
BaseStakeIntent,
|
12
|
+
t.type({
|
13
|
+
intentType: intentTypes.createBtcDelegation,
|
14
|
+
createBtcDelegationBytes: t.string,
|
15
|
+
}),
|
16
|
+
]);
|
17
|
+
|
18
|
+
export type BabyCreateBtcDelegationIntent = t.TypeOf<
|
19
|
+
typeof BabyCreateBtcDelegationIntent
|
20
|
+
>;
|
@@ -16,6 +16,7 @@ export * from "./atomPaymentIntent";
|
|
16
16
|
export * from "./atomStakeIntent";
|
17
17
|
export * from "./atomUnstakeIntent";
|
18
18
|
export * from "./atomWithdrawIntent";
|
19
|
+
export * from "./babyCreateBtcDelegationIntent";
|
19
20
|
export * from "./baseIntent";
|
20
21
|
export * from "./baseStakeIntent";
|
21
22
|
export * from "./baseStakeIntentWithCalldata";
|
@@ -7,6 +7,7 @@ import { AtomPaymentIntent } from "./atomPaymentIntent";
|
|
7
7
|
import { AtomStakeIntent } from "./atomStakeIntent";
|
8
8
|
import { AtomUnstakeIntent } from "./atomUnstakeIntent";
|
9
9
|
import { AtomWithdrawIntent } from "./atomWithdrawIntent";
|
10
|
+
import { BabyCreateBtcDelegationIntent } from "./babyCreateBtcDelegationIntent";
|
10
11
|
import { BscDelegateIntent } from "./bscDelegateIntent";
|
11
12
|
import { BscUnDelegateIntent } from "./bscUndelegateIntent";
|
12
13
|
import { BscWithdrawUndelegateIntent } from "./bscWithdrawUndelegateIntent";
|
@@ -84,6 +85,7 @@ export const TransactionIntent = t.union([
|
|
84
85
|
AtomStakeIntent,
|
85
86
|
AtomUnstakeIntent,
|
86
87
|
AtomWithdrawIntent,
|
88
|
+
BabyCreateBtcDelegationIntent,
|
87
89
|
BscDelegateIntent,
|
88
90
|
BscUnDelegateIntent,
|
89
91
|
BscWithdrawUndelegateIntent,
|
@@ -33,6 +33,7 @@ export const intentTypes = {
|
|
33
33
|
closeAssociatedTokenAccount: t.literal("closeAssociatedTokenAccount"),
|
34
34
|
stakeWithCallData: t.literal("stakeWithCallData"),
|
35
35
|
feeAddressTransfer: t.literal("feeAddressTransfer"),
|
36
|
+
createBtcDelegation: t.literal("createBtcDelegation"),
|
36
37
|
};
|
37
38
|
|
38
39
|
export const IntentType = t.keyof(intentTypes);
|
@@ -1,17 +1,29 @@
|
|
1
1
|
import * as t from "io-ts";
|
2
2
|
import { BaseIntent } from "./baseIntent";
|
3
3
|
import { intentTypes } from "./intentType";
|
4
|
-
import {
|
4
|
+
import {
|
5
|
+
LightningOnchainRequest,
|
6
|
+
LightningPaymentRequestWithSig,
|
7
|
+
} from "../../lightning/payment";
|
5
8
|
|
6
9
|
/**
|
7
10
|
* @title Lightning Payment Intent
|
8
11
|
*/
|
9
|
-
export const LightningPaymentIntent = t.
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
export const LightningPaymentIntent = t.union([
|
13
|
+
t.intersection([
|
14
|
+
BaseIntent,
|
15
|
+
LightningPaymentRequestWithSig,
|
16
|
+
t.type({
|
17
|
+
intentType: intentTypes.payment,
|
18
|
+
}),
|
19
|
+
]),
|
20
|
+
t.intersection([
|
21
|
+
BaseIntent,
|
22
|
+
t.type({
|
23
|
+
intentType: intentTypes.payment,
|
24
|
+
onchainRequest: LightningOnchainRequest,
|
25
|
+
}),
|
26
|
+
]),
|
15
27
|
]);
|
16
28
|
|
17
29
|
export type LightningPaymentIntent = t.TypeOf<typeof LightningPaymentIntent>;
|