@bitgo/public-types 5.31.0 → 5.33.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 (128) hide show
  1. package/dist/src/schema/coin/coin.d.ts +3 -0
  2. package/dist/src/schema/coin/coin.js +29 -0
  3. package/dist/src/schema/coin/coin.js.map +1 -0
  4. package/dist/src/schema/transactionRequest/intents/accelerationIntent.d.ts +1 -0
  5. package/dist/src/schema/transactionRequest/intents/accountBaseCreateAccountIntent.d.ts +1 -0
  6. package/dist/src/schema/transactionRequest/intents/accountBaseUpdateAccountIntent.d.ts +1 -0
  7. package/dist/src/schema/transactionRequest/intents/adaPaymentIntent.d.ts +1 -0
  8. package/dist/src/schema/transactionRequest/intents/adaPledgeIntent.d.ts +1 -0
  9. package/dist/src/schema/transactionRequest/intents/adaStakeClaimRewardsIntent.d.ts +1 -0
  10. package/dist/src/schema/transactionRequest/intents/adaStakeIntent.d.ts +1 -0
  11. package/dist/src/schema/transactionRequest/intents/adaUnstakeIntent.d.ts +1 -0
  12. package/dist/src/schema/transactionRequest/intents/adaVoteDelegationIntent.d.ts +1 -0
  13. package/dist/src/schema/transactionRequest/intents/aptCustomTxIntent.d.ts +1 -0
  14. package/dist/src/schema/transactionRequest/intents/atomPaymentIntent.d.ts +1 -0
  15. package/dist/src/schema/transactionRequest/intents/atomStakeIntent.d.ts +1 -0
  16. package/dist/src/schema/transactionRequest/intents/atomUnstakeIntent.d.ts +1 -0
  17. package/dist/src/schema/transactionRequest/intents/atomWithdrawIntent.d.ts +1 -0
  18. package/dist/src/schema/transactionRequest/intents/babyCreateBtcDelegationIntent.d.ts +1 -0
  19. package/dist/src/schema/transactionRequest/intents/babyWithdrawRewardIntent.d.ts +1 -0
  20. package/dist/src/schema/transactionRequest/intents/baseGoStakeIntent.d.ts +1 -0
  21. package/dist/src/schema/transactionRequest/intents/baseIntent.d.ts +2 -0
  22. package/dist/src/schema/transactionRequest/intents/baseStakeIntent.d.ts +1 -0
  23. package/dist/src/schema/transactionRequest/intents/baseStakeIntentWithCalldata.d.ts +1 -0
  24. package/dist/src/schema/transactionRequest/intents/beraDelegateIntent.d.ts +1 -0
  25. package/dist/src/schema/transactionRequest/intents/bscDelegateIntent.d.ts +1 -0
  26. package/dist/src/schema/transactionRequest/intents/bscStakeClaimRewardsIntent.d.ts +1 -0
  27. package/dist/src/schema/transactionRequest/intents/bscUndelegateIntent.d.ts +1 -0
  28. package/dist/src/schema/transactionRequest/intents/bscWithdrawUndelegateIntent.d.ts +1 -0
  29. package/dist/src/schema/transactionRequest/intents/consolidateTokenIntent.d.ts +1 -0
  30. package/dist/src/schema/transactionRequest/intents/coredaoClaimIntent.d.ts +1 -0
  31. package/dist/src/schema/transactionRequest/intents/coredaoDelegateIntent.d.ts +1 -0
  32. package/dist/src/schema/transactionRequest/intents/coredaoUndelegateIntent.d.ts +1 -0
  33. package/dist/src/schema/transactionRequest/intents/cosmosPaymentIntent.d.ts +1 -0
  34. package/dist/src/schema/transactionRequest/intents/cosmosStakeIntent.d.ts +1 -0
  35. package/dist/src/schema/transactionRequest/intents/cosmosSwitchValidatorIntent.d.ts +1 -0
  36. package/dist/src/schema/transactionRequest/intents/cosmosUnstakeIntent.d.ts +1 -0
  37. package/dist/src/schema/transactionRequest/intents/cosmosWithdrawIntent.d.ts +1 -0
  38. package/dist/src/schema/transactionRequest/intents/dotBaseIntent.d.ts +1 -0
  39. package/dist/src/schema/transactionRequest/intents/dotCreateAccountIntent.d.ts +1 -0
  40. package/dist/src/schema/transactionRequest/intents/dotPaymentIntent.d.ts +1 -0
  41. package/dist/src/schema/transactionRequest/intents/dotStakingIntent.d.ts +1 -0
  42. package/dist/src/schema/transactionRequest/intents/dotUnstakingIntent.d.ts +1 -0
  43. package/dist/src/schema/transactionRequest/intents/dotWithdrawStakeIntent.d.ts +1 -0
  44. package/dist/src/schema/transactionRequest/intents/enableTokenIntent.d.ts +1 -0
  45. package/dist/src/schema/transactionRequest/intents/ethAccelerationIntent.d.ts +1 -0
  46. package/dist/src/schema/transactionRequest/intents/ethConsolidateTokenIntent.d.ts +1 -0
  47. package/dist/src/schema/transactionRequest/intents/ethFillNonceIntent.d.ts +1 -0
  48. package/dist/src/schema/transactionRequest/intents/ethLikeStakeIntent.d.ts +2 -0
  49. package/dist/src/schema/transactionRequest/intents/ethPaymentIntent.d.ts +1 -0
  50. package/dist/src/schema/transactionRequest/intents/ethStakingIntent.d.ts +1 -0
  51. package/dist/src/schema/transactionRequest/intents/ethTransferTokenIntent.d.ts +1 -0
  52. package/dist/src/schema/transactionRequest/intents/feeAddressTransferIntent.d.ts +1 -0
  53. package/dist/src/schema/transactionRequest/intents/fillNonceIntent.d.ts +1 -0
  54. package/dist/src/schema/transactionRequest/intents/goUnstakeIntent.d.ts +1 -0
  55. package/dist/src/schema/transactionRequest/intents/icpPaymentIntent.d.ts +1 -0
  56. package/dist/src/schema/transactionRequest/intents/intent.d.ts +92 -0
  57. package/dist/src/schema/transactionRequest/intents/intentType.d.ts +2 -0
  58. package/dist/src/schema/transactionRequest/intents/intentType.js +1 -0
  59. package/dist/src/schema/transactionRequest/intents/intentType.js.map +1 -1
  60. package/dist/src/schema/transactionRequest/intents/lightningPaymentIntent.d.ts +2 -0
  61. package/dist/src/schema/transactionRequest/intents/mmiSignMessageIntent.d.ts +1 -0
  62. package/dist/src/schema/transactionRequest/intents/mmiSignTransactionIntent.d.ts +1 -0
  63. package/dist/src/schema/transactionRequest/intents/nearStakeIntent.d.ts +1 -0
  64. package/dist/src/schema/transactionRequest/intents/nearUnstakeIntent.d.ts +1 -0
  65. package/dist/src/schema/transactionRequest/intents/nearWithdrawIntent.d.ts +1 -0
  66. package/dist/src/schema/transactionRequest/intents/paymentIntent.d.ts +1 -0
  67. package/dist/src/schema/transactionRequest/intents/polyxBaseIntent.d.ts +1 -0
  68. package/dist/src/schema/transactionRequest/intents/polyxCreateAccountIntent.d.ts +1 -0
  69. package/dist/src/schema/transactionRequest/intents/polyxPreApproveAssetIntent.d.ts +1 -0
  70. package/dist/src/schema/transactionRequest/intents/polyxStakeIntent.d.ts +1 -0
  71. package/dist/src/schema/transactionRequest/intents/polyxUnstakeIntent.d.ts +1 -0
  72. package/dist/src/schema/transactionRequest/intents/polyxWithdrawIntent.d.ts +1 -0
  73. package/dist/src/schema/transactionRequest/intents/signMessageIntent.d.ts +1 -0
  74. package/dist/src/schema/transactionRequest/intents/solAuthorizeIntent.d.ts +1 -0
  75. package/dist/src/schema/transactionRequest/intents/solClaimIntent.d.ts +1 -0
  76. package/dist/src/schema/transactionRequest/intents/solCloseAssociatedTokenAccountIntent.d.ts +1 -0
  77. package/dist/src/schema/transactionRequest/intents/solCreateAssociatedTokenAccountIntent.d.ts +1 -0
  78. package/dist/src/schema/transactionRequest/intents/solCustomTxIntent.d.ts +1 -0
  79. package/dist/src/schema/transactionRequest/intents/solDeactivateIntent.d.ts +1 -0
  80. package/dist/src/schema/transactionRequest/intents/solDelegateIntent.d.ts +1 -0
  81. package/dist/src/schema/transactionRequest/intents/solGoUnstakeIntent.d.ts +1 -0
  82. package/dist/src/schema/transactionRequest/intents/solPaymentIntent.d.ts +1 -0
  83. package/dist/src/schema/transactionRequest/intents/solStakeIntent.d.ts +2 -0
  84. package/dist/src/schema/transactionRequest/intents/solUnstakeIntent.d.ts +2 -0
  85. package/dist/src/schema/transactionRequest/intents/solVersionedCustomTxIntent.d.ts +1 -0
  86. package/dist/src/schema/transactionRequest/intents/stakeClaimRewardsIntent.d.ts +1 -0
  87. package/dist/src/schema/transactionRequest/intents/stakeIntent.d.ts +1 -0
  88. package/dist/src/schema/transactionRequest/intents/stakeSwitchValidatorIntent.d.ts +1 -0
  89. package/dist/src/schema/transactionRequest/intents/substrateBaseIntent.d.ts +1 -0
  90. package/dist/src/schema/transactionRequest/intents/substratePaymentIntent.d.ts +1 -0
  91. package/dist/src/schema/transactionRequest/intents/suiBuildOptions.d.ts +1 -0
  92. package/dist/src/schema/transactionRequest/intents/suiConsolidateIntent.d.ts +1 -0
  93. package/dist/src/schema/transactionRequest/intents/suiCustomTxIntent.d.ts +2 -0
  94. package/dist/src/schema/transactionRequest/intents/suiGoUnstakeIntent.d.ts +2 -0
  95. package/dist/src/schema/transactionRequest/intents/suiPaymentIntent.d.ts +2 -0
  96. package/dist/src/schema/transactionRequest/intents/suiStakingIntent.d.ts +1 -0
  97. package/dist/src/schema/transactionRequest/intents/suiUnstakingIntent.d.ts +1 -0
  98. package/dist/src/schema/transactionRequest/intents/taoStakeIntent.d.ts +2 -0
  99. package/dist/src/schema/transactionRequest/intents/taoStakingBaseIntent.d.ts +1 -0
  100. package/dist/src/schema/transactionRequest/intents/taoSwitchValidatorIntent.d.ts +1 -0
  101. package/dist/src/schema/transactionRequest/intents/taoUnstakeIntent.d.ts +2 -0
  102. package/dist/src/schema/transactionRequest/intents/tokenApprovalIntent.d.ts +1 -0
  103. package/dist/src/schema/transactionRequest/intents/tonDelegateIntent.d.ts +1 -0
  104. package/dist/src/schema/transactionRequest/intents/tonPaymentIntent.d.ts +1 -0
  105. package/dist/src/schema/transactionRequest/intents/tonUndelegateIntent.d.ts +1 -0
  106. package/dist/src/schema/transactionRequest/intents/transferTokenIntent.d.ts +1 -0
  107. package/dist/src/schema/transactionRequest/intents/unstakeIntent.d.ts +1 -0
  108. package/dist/src/schema/transactionRequest/intents/vetStakeClaimRewardsIntent.d.ts +1 -0
  109. package/dist/src/schema/transactionRequest/intents/vetStakingIntent.d.ts +1 -0
  110. package/dist/src/schema/transactionRequest/intents/vetUnstakingIntent.d.ts +2 -0
  111. package/dist/src/schema/transactionRequest/intents/voteDelegationIntent.d.ts +1 -0
  112. package/dist/src/schema/transactionRequest/intents/walletRecoveryIntent.d.ts +1 -0
  113. package/dist/src/schema/transactionRequest/intents/walrusStakingIntent.d.ts +1 -0
  114. package/dist/src/schema/transactionRequest/intents/walrusUndelegateIntent.d.ts +1 -0
  115. package/dist/src/schema/transactionRequest/intents/walrusWithdrawIntent.d.ts +1 -0
  116. package/dist/src/schema/transactionRequest/intents/withdrawIntent.d.ts +1 -0
  117. package/dist/src/schema/transactionRequest/transactionRequest.d.ts +184 -0
  118. package/dist/src/schema/wallet/address.d.ts +253 -0
  119. package/dist/src/schema/wallet/address.js +124 -0
  120. package/dist/src/schema/wallet/address.js.map +1 -0
  121. package/dist/src/schema/wallet/index.d.ts +1 -0
  122. package/dist/src/schema/wallet/index.js +1 -0
  123. package/dist/src/schema/wallet/index.js.map +1 -1
  124. package/package.json +1 -1
  125. package/src/schema/coin/coin.ts +7 -0
  126. package/src/schema/transactionRequest/intents/intentType.ts +1 -0
  127. package/src/schema/wallet/address.ts +190 -0
  128. package/src/schema/wallet/index.ts +1 -0
@@ -0,0 +1,253 @@
1
+ import * as t from "io-ts";
2
+ export declare const AddressLabelString: t.StringC;
3
+ export type AddressLabelString = t.TypeOf<typeof AddressLabelString>;
4
+ export declare const AddressString: t.StringC;
5
+ export type AddressString = t.TypeOf<typeof AddressString>;
6
+ export declare const AddressChain: t.UnionC<[t.LiteralC<0>, t.LiteralC<1>, t.LiteralC<10>, t.LiteralC<11>, t.LiteralC<20>, t.LiteralC<21>, t.LiteralC<30>, t.LiteralC<31>, t.LiteralC<40>, t.LiteralC<41>]>;
7
+ export type AddressChain = t.TypeOf<typeof AddressChain>;
8
+ export declare const AddressChainString: t.UnionC<[t.LiteralC<"0">, t.LiteralC<"1">, t.LiteralC<"10">, t.LiteralC<"11">, t.LiteralC<"20">, t.LiteralC<"21">, t.LiteralC<"30">, t.LiteralC<"31">, t.LiteralC<"40">, t.LiteralC<"41">]>;
9
+ export type AddressChainString = t.TypeOf<typeof AddressChainString>;
10
+ export declare const TrimmedBalance: t.IntersectionC<[t.TypeC<{
11
+ balanceString: t.StringC;
12
+ confirmedBalanceString: t.StringC;
13
+ spendableBalanceString: t.StringC;
14
+ }>, t.PartialC<{
15
+ updated: t.UnionC<[import("io-ts-types").DateFromISOStringC, import("io-ts-types").DateC, t.UnknownC]>;
16
+ balance: t.NumberC;
17
+ lockedBalanceString: t.StringC;
18
+ reservedBalanceString: t.StringC;
19
+ totalReceived: t.NumberC;
20
+ totalSent: t.NumberC;
21
+ transferCount: t.NumberC;
22
+ tokens: t.UnknownRecordC;
23
+ nfts: t.UnknownRecordC;
24
+ unsupportedNfts: t.UnknownRecordC;
25
+ type: t.UnknownC;
26
+ metadata: t.UnknownC;
27
+ }>]>;
28
+ export type TrimmedBalance = t.TypeOf<typeof TrimmedBalance>;
29
+ export declare const BaseWalletAddress: t.PartialC<{
30
+ id: t.StringC;
31
+ address: t.StringC;
32
+ balance: t.UnionC<[t.IntersectionC<[t.TypeC<{
33
+ balanceString: t.StringC;
34
+ confirmedBalanceString: t.StringC;
35
+ spendableBalanceString: t.StringC;
36
+ }>, t.PartialC<{
37
+ updated: t.UnionC<[import("io-ts-types").DateFromISOStringC, import("io-ts-types").DateC, t.UnknownC]>;
38
+ balance: t.NumberC;
39
+ lockedBalanceString: t.StringC;
40
+ reservedBalanceString: t.StringC;
41
+ totalReceived: t.NumberC;
42
+ totalSent: t.NumberC;
43
+ transferCount: t.NumberC;
44
+ tokens: t.UnknownRecordC;
45
+ nfts: t.UnknownRecordC;
46
+ unsupportedNfts: t.UnknownRecordC;
47
+ type: t.UnknownC;
48
+ metadata: t.UnknownC;
49
+ }>]>, t.UnknownC]>;
50
+ coinSpecific: t.UnknownC;
51
+ label: t.StringC;
52
+ lastNonce: t.NumberC;
53
+ token: t.StringC;
54
+ proof: t.StringC;
55
+ signature: t.StringC;
56
+ lastConsolidatedTime: import("io-ts-types").DateC;
57
+ needsConsolidation: t.BooleanC;
58
+ tokenConsolidationState: t.UnknownC;
59
+ tokenAddress: t.UnknownC;
60
+ }>;
61
+ export type BaseWalletAddress = t.TypeOf<typeof BaseWalletAddress>;
62
+ export declare const LightningWalletAddress: t.IntersectionC<[t.PartialC<{
63
+ id: t.StringC;
64
+ address: t.StringC;
65
+ balance: t.UnionC<[t.IntersectionC<[t.TypeC<{
66
+ balanceString: t.StringC;
67
+ confirmedBalanceString: t.StringC;
68
+ spendableBalanceString: t.StringC;
69
+ }>, t.PartialC<{
70
+ updated: t.UnionC<[import("io-ts-types").DateFromISOStringC, import("io-ts-types").DateC, t.UnknownC]>;
71
+ balance: t.NumberC;
72
+ lockedBalanceString: t.StringC;
73
+ reservedBalanceString: t.StringC;
74
+ totalReceived: t.NumberC;
75
+ totalSent: t.NumberC;
76
+ transferCount: t.NumberC;
77
+ tokens: t.UnknownRecordC;
78
+ nfts: t.UnknownRecordC;
79
+ unsupportedNfts: t.UnknownRecordC;
80
+ type: t.UnknownC;
81
+ metadata: t.UnknownC;
82
+ }>]>, t.UnknownC]>;
83
+ coinSpecific: t.UnknownC;
84
+ label: t.StringC;
85
+ lastNonce: t.NumberC;
86
+ token: t.StringC;
87
+ proof: t.StringC;
88
+ signature: t.StringC;
89
+ lastConsolidatedTime: import("io-ts-types").DateC;
90
+ needsConsolidation: t.BooleanC;
91
+ tokenConsolidationState: t.UnknownC;
92
+ tokenAddress: t.UnknownC;
93
+ }>, t.TypeC<{
94
+ coin: t.StringC;
95
+ wallet: t.StringC;
96
+ }>]>;
97
+ export type LightningWalletAddress = t.TypeOf<typeof LightningWalletAddress>;
98
+ export declare const WalletAddress: t.IntersectionC<[t.PartialC<{
99
+ id: t.StringC;
100
+ address: t.StringC;
101
+ balance: t.UnionC<[t.IntersectionC<[t.TypeC<{
102
+ balanceString: t.StringC;
103
+ confirmedBalanceString: t.StringC;
104
+ spendableBalanceString: t.StringC;
105
+ }>, t.PartialC<{
106
+ updated: t.UnionC<[import("io-ts-types").DateFromISOStringC, import("io-ts-types").DateC, t.UnknownC]>;
107
+ balance: t.NumberC;
108
+ lockedBalanceString: t.StringC;
109
+ reservedBalanceString: t.StringC;
110
+ totalReceived: t.NumberC;
111
+ totalSent: t.NumberC;
112
+ transferCount: t.NumberC;
113
+ tokens: t.UnknownRecordC;
114
+ nfts: t.UnknownRecordC;
115
+ unsupportedNfts: t.UnknownRecordC;
116
+ type: t.UnknownC;
117
+ metadata: t.UnknownC;
118
+ }>]>, t.UnknownC]>;
119
+ coinSpecific: t.UnknownC;
120
+ label: t.StringC;
121
+ lastNonce: t.NumberC;
122
+ token: t.StringC;
123
+ proof: t.StringC;
124
+ signature: t.StringC;
125
+ lastConsolidatedTime: import("io-ts-types").DateC;
126
+ needsConsolidation: t.BooleanC;
127
+ tokenConsolidationState: t.UnknownC;
128
+ tokenAddress: t.UnknownC;
129
+ }>, t.TypeC<{
130
+ coin: t.StringC;
131
+ wallet: t.StringC;
132
+ chain: t.UnionC<[t.LiteralC<0>, t.LiteralC<1>, t.LiteralC<10>, t.LiteralC<11>, t.LiteralC<20>, t.LiteralC<21>, t.LiteralC<30>, t.LiteralC<31>, t.LiteralC<40>, t.LiteralC<41>]>;
133
+ index: t.NumberC;
134
+ }>]>;
135
+ export type WalletAddress = t.TypeOf<typeof WalletAddress>;
136
+ export declare const WalletAddressUnion: t.UnionC<[t.IntersectionC<[t.PartialC<{
137
+ id: t.StringC;
138
+ address: t.StringC;
139
+ balance: t.UnionC<[t.IntersectionC<[t.TypeC<{
140
+ balanceString: t.StringC;
141
+ confirmedBalanceString: t.StringC;
142
+ spendableBalanceString: t.StringC;
143
+ }>, t.PartialC<{
144
+ updated: t.UnionC<[import("io-ts-types").DateFromISOStringC, import("io-ts-types").DateC, t.UnknownC]>;
145
+ balance: t.NumberC;
146
+ lockedBalanceString: t.StringC;
147
+ reservedBalanceString: t.StringC;
148
+ totalReceived: t.NumberC;
149
+ totalSent: t.NumberC;
150
+ transferCount: t.NumberC;
151
+ tokens: t.UnknownRecordC;
152
+ nfts: t.UnknownRecordC;
153
+ unsupportedNfts: t.UnknownRecordC;
154
+ type: t.UnknownC;
155
+ metadata: t.UnknownC;
156
+ }>]>, t.UnknownC]>;
157
+ coinSpecific: t.UnknownC;
158
+ label: t.StringC;
159
+ lastNonce: t.NumberC;
160
+ token: t.StringC;
161
+ proof: t.StringC;
162
+ signature: t.StringC;
163
+ lastConsolidatedTime: import("io-ts-types").DateC;
164
+ needsConsolidation: t.BooleanC;
165
+ tokenConsolidationState: t.UnknownC;
166
+ tokenAddress: t.UnknownC;
167
+ }>, t.TypeC<{
168
+ coin: t.StringC;
169
+ wallet: t.StringC;
170
+ chain: t.UnionC<[t.LiteralC<0>, t.LiteralC<1>, t.LiteralC<10>, t.LiteralC<11>, t.LiteralC<20>, t.LiteralC<21>, t.LiteralC<30>, t.LiteralC<31>, t.LiteralC<40>, t.LiteralC<41>]>;
171
+ index: t.NumberC;
172
+ }>]>, t.IntersectionC<[t.PartialC<{
173
+ id: t.StringC;
174
+ address: t.StringC;
175
+ balance: t.UnionC<[t.IntersectionC<[t.TypeC<{
176
+ balanceString: t.StringC;
177
+ confirmedBalanceString: t.StringC;
178
+ spendableBalanceString: t.StringC;
179
+ }>, t.PartialC<{
180
+ updated: t.UnionC<[import("io-ts-types").DateFromISOStringC, import("io-ts-types").DateC, t.UnknownC]>;
181
+ balance: t.NumberC;
182
+ lockedBalanceString: t.StringC;
183
+ reservedBalanceString: t.StringC;
184
+ totalReceived: t.NumberC;
185
+ totalSent: t.NumberC;
186
+ transferCount: t.NumberC;
187
+ tokens: t.UnknownRecordC;
188
+ nfts: t.UnknownRecordC;
189
+ unsupportedNfts: t.UnknownRecordC;
190
+ type: t.UnknownC;
191
+ metadata: t.UnknownC;
192
+ }>]>, t.UnknownC]>;
193
+ coinSpecific: t.UnknownC;
194
+ label: t.StringC;
195
+ lastNonce: t.NumberC;
196
+ token: t.StringC;
197
+ proof: t.StringC;
198
+ signature: t.StringC;
199
+ lastConsolidatedTime: import("io-ts-types").DateC;
200
+ needsConsolidation: t.BooleanC;
201
+ tokenConsolidationState: t.UnknownC;
202
+ tokenAddress: t.UnknownC;
203
+ }>, t.TypeC<{
204
+ coin: t.StringC;
205
+ wallet: t.StringC;
206
+ }>]>]>;
207
+ export type WalletAddressUnion = t.TypeOf<typeof WalletAddressUnion>;
208
+ export declare const AddressQueryResult: t.IntersectionC<[t.TypeC<{
209
+ coin: t.StringC;
210
+ }>, t.PartialC<{
211
+ pendingAddressCount: t.NumberC;
212
+ totalAddressCount: t.NumberC;
213
+ addresses: t.UnionC<[t.ArrayC<t.IntersectionC<[t.PartialC<{
214
+ id: t.StringC;
215
+ address: t.StringC;
216
+ balance: t.UnionC<[t.IntersectionC<[t.TypeC<{
217
+ balanceString: t.StringC;
218
+ confirmedBalanceString: t.StringC;
219
+ spendableBalanceString: t.StringC;
220
+ }>, t.PartialC<{
221
+ updated: t.UnionC<[import("io-ts-types").DateFromISOStringC, import("io-ts-types").DateC, t.UnknownC]>;
222
+ balance: t.NumberC;
223
+ lockedBalanceString: t.StringC;
224
+ reservedBalanceString: t.StringC;
225
+ totalReceived: t.NumberC;
226
+ totalSent: t.NumberC;
227
+ transferCount: t.NumberC;
228
+ tokens: t.UnknownRecordC;
229
+ nfts: t.UnknownRecordC;
230
+ unsupportedNfts: t.UnknownRecordC;
231
+ type: t.UnknownC;
232
+ metadata: t.UnknownC;
233
+ }>]>, t.UnknownC]>;
234
+ coinSpecific: t.UnknownC;
235
+ label: t.StringC;
236
+ lastNonce: t.NumberC;
237
+ token: t.StringC;
238
+ proof: t.StringC;
239
+ signature: t.StringC;
240
+ lastConsolidatedTime: import("io-ts-types").DateC;
241
+ needsConsolidation: t.BooleanC;
242
+ tokenConsolidationState: t.UnknownC;
243
+ tokenAddress: t.UnknownC;
244
+ }>, t.TypeC<{
245
+ coin: t.StringC;
246
+ wallet: t.StringC;
247
+ chain: t.UnionC<[t.LiteralC<0>, t.LiteralC<1>, t.LiteralC<10>, t.LiteralC<11>, t.LiteralC<20>, t.LiteralC<21>, t.LiteralC<30>, t.LiteralC<31>, t.LiteralC<40>, t.LiteralC<41>]>;
248
+ index: t.NumberC;
249
+ }>]>>, t.UnknownC]>;
250
+ nextBatchPrevId: t.StringC;
251
+ count: t.NumberC;
252
+ }>]>;
253
+ export type AddressQueryResult = t.TypeOf<typeof AddressQueryResult>;
@@ -0,0 +1,124 @@
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.AddressQueryResult = exports.WalletAddressUnion = exports.WalletAddress = exports.LightningWalletAddress = exports.BaseWalletAddress = exports.TrimmedBalance = exports.AddressChainString = exports.AddressChain = exports.AddressString = exports.AddressLabelString = void 0;
27
+ const t = __importStar(require("io-ts"));
28
+ const io_ts_types_1 = require("io-ts-types");
29
+ const coin_1 = require("../coin/coin");
30
+ exports.AddressLabelString = t.string;
31
+ exports.AddressString = t.string;
32
+ exports.AddressChain = t.union([
33
+ t.literal(0),
34
+ t.literal(1),
35
+ t.literal(10),
36
+ t.literal(11),
37
+ t.literal(20),
38
+ t.literal(21),
39
+ t.literal(30),
40
+ t.literal(31),
41
+ t.literal(40),
42
+ t.literal(41),
43
+ ]);
44
+ exports.AddressChainString = t.union([
45
+ t.literal("0"),
46
+ t.literal("1"),
47
+ t.literal("10"),
48
+ t.literal("11"),
49
+ t.literal("20"),
50
+ t.literal("21"),
51
+ t.literal("30"),
52
+ t.literal("31"),
53
+ t.literal("40"),
54
+ t.literal("41"),
55
+ ]);
56
+ exports.TrimmedBalance = t.intersection([
57
+ t.type({
58
+ balanceString: t.string,
59
+ confirmedBalanceString: t.string,
60
+ spendableBalanceString: t.string,
61
+ }),
62
+ t.partial({
63
+ updated: t.union([io_ts_types_1.DateFromISOString, io_ts_types_1.date, t.unknown]),
64
+ balance: t.number,
65
+ lockedBalanceString: t.string,
66
+ reservedBalanceString: t.string,
67
+ totalReceived: t.number,
68
+ totalSent: t.number,
69
+ transferCount: t.number,
70
+ tokens: t.UnknownRecord,
71
+ nfts: t.UnknownRecord,
72
+ unsupportedNfts: t.UnknownRecord,
73
+ type: t.unknown,
74
+ metadata: t.unknown,
75
+ }),
76
+ ]);
77
+ exports.BaseWalletAddress = t.partial({
78
+ id: t.string,
79
+ address: exports.AddressString,
80
+ balance: t.union([exports.TrimmedBalance, t.unknown]),
81
+ coinSpecific: t.unknown,
82
+ label: exports.AddressLabelString,
83
+ lastNonce: t.number,
84
+ token: t.string,
85
+ proof: t.string,
86
+ signature: t.string,
87
+ lastConsolidatedTime: io_ts_types_1.date,
88
+ needsConsolidation: t.boolean,
89
+ tokenConsolidationState: t.unknown,
90
+ tokenAddress: t.unknown,
91
+ });
92
+ exports.LightningWalletAddress = t.intersection([
93
+ exports.BaseWalletAddress,
94
+ t.type({
95
+ coin: coin_1.CoinString,
96
+ wallet: t.string,
97
+ }),
98
+ ]);
99
+ exports.WalletAddress = t.intersection([
100
+ exports.BaseWalletAddress,
101
+ t.type({
102
+ coin: coin_1.CoinString,
103
+ wallet: t.string,
104
+ chain: exports.AddressChain,
105
+ index: t.number,
106
+ }),
107
+ ]);
108
+ exports.WalletAddressUnion = t.union([
109
+ exports.WalletAddress,
110
+ exports.LightningWalletAddress,
111
+ ]);
112
+ exports.AddressQueryResult = t.intersection([
113
+ t.type({
114
+ coin: t.string,
115
+ }),
116
+ t.partial({
117
+ pendingAddressCount: t.number,
118
+ totalAddressCount: t.number,
119
+ addresses: t.union([t.array(exports.WalletAddress), t.unknown]),
120
+ nextBatchPrevId: t.string,
121
+ count: t.number,
122
+ }),
123
+ ]);
124
+ //# sourceMappingURL=address.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"address.js","sourceRoot":"","sources":["../../../../src/schema/wallet/address.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAAsD;AACtD,uCAA0C;AAO7B,QAAA,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;AAO9B,QAAA,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;AAMzB,QAAA,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC;IAClC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACZ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACZ,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACb,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACb,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACb,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACb,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACb,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACb,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACb,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CACd,CAAC,CAAC;AAGU,QAAA,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC;IACxC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;IACd,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;IACd,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IACf,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IACf,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IACf,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IACf,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IACf,CAA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}
@@ -1,3 +1,4 @@
1
1
  export * from "./wallet";
2
2
  export * from "./multisigTypeVersion";
3
3
  export * from "./walletTypes";
4
+ export * from "./address";
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./wallet"), exports);
18
18
  __exportStar(require("./multisigTypeVersion"), exports);
19
19
  __exportStar(require("./walletTypes"), exports);
20
+ __exportStar(require("./address"), exports);
20
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/wallet/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,wDAAsC;AACtC,gDAA8B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/wallet/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,wDAAsC;AACtC,gDAA8B;AAC9B,4CAA0B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo/public-types",
3
- "version": "5.31.0",
3
+ "version": "5.33.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,7 @@
1
+ import * as t from "io-ts";
2
+ /**
3
+ * A cryptocurrency symbol or token ticker symbol
4
+ * @example btc
5
+ */
6
+ export const CoinString = t.string;
7
+ export type CoinString = t.TypeOf<typeof CoinString>;
@@ -32,6 +32,7 @@ export const intentTypes = {
32
32
  customTx: t.literal("customTx"),
33
33
  closeAssociatedTokenAccount: t.literal("closeAssociatedTokenAccount"),
34
34
  stakeWithCallData: t.literal("stakeWithCallData"),
35
+ unstakeWithCallData: t.literal("unstakeWithCallData"),
35
36
  feeAddressTransfer: t.literal("feeAddressTransfer"),
36
37
  tokenApproval: t.literal("tokenApproval"),
37
38
  /**
@@ -0,0 +1,190 @@
1
+ import * as t from "io-ts";
2
+ import { date, DateFromISOString } from "io-ts-types";
3
+ import { CoinString } from "../coin/coin";
4
+
5
+ /**
6
+ * A human-readable label for the address
7
+ * @maxLength 250
8
+ * @example Bob's Hot Wallet Address
9
+ */
10
+ export const AddressLabelString = t.string;
11
+ export type AddressLabelString = t.TypeOf<typeof AddressLabelString>;
12
+
13
+ /**
14
+ * @maxLength 250
15
+ * @example 2MvrwRYBAuRtPTiZ5MyKg42Ke55W3fZJfZS
16
+ */
17
+ export const AddressString = t.string;
18
+ export type AddressString = t.TypeOf<typeof AddressString>;
19
+
20
+ /**
21
+ * Address chain identifier
22
+ */
23
+ export const AddressChain = t.union([
24
+ t.literal(0),
25
+ t.literal(1),
26
+ t.literal(10),
27
+ t.literal(11),
28
+ t.literal(20),
29
+ t.literal(21),
30
+ t.literal(30),
31
+ t.literal(31),
32
+ t.literal(40),
33
+ t.literal(41),
34
+ ]);
35
+ export type AddressChain = t.TypeOf<typeof AddressChain>;
36
+
37
+ export const AddressChainString = t.union([
38
+ t.literal("0"),
39
+ t.literal("1"),
40
+ t.literal("10"),
41
+ t.literal("11"),
42
+ t.literal("20"),
43
+ t.literal("21"),
44
+ t.literal("30"),
45
+ t.literal("31"),
46
+ t.literal("40"),
47
+ t.literal("41"),
48
+ ]);
49
+ export type AddressChainString = t.TypeOf<typeof AddressChainString>;
50
+
51
+ /**
52
+ * Balance information for an address
53
+ */
54
+ export const TrimmedBalance = t.intersection([
55
+ t.type({
56
+ /**
57
+ * String representation of the balance. Guaranteed to not lose precision.
58
+ * @example 500000
59
+ */
60
+ balanceString: t.string,
61
+ /**
62
+ * The total balance of confirmed transactions for the address (in the chain's base unit). Guaranteed to not lose precision.
63
+ * @example 400000
64
+ */
65
+ confirmedBalanceString: t.string,
66
+ /**
67
+ * The total balance of the address (in the chain's base unit) which may be used as inputs for creating new transactions in string representation. Guaranteed to not lose precision.
68
+ * @example 40000
69
+ */
70
+ spendableBalanceString: t.string,
71
+ }),
72
+ t.partial({
73
+ /**
74
+ * The last time a transaction affected the balance of this address
75
+ */
76
+ updated: t.union([DateFromISOString, date, t.unknown]),
77
+ /**
78
+ * @example 50000
79
+ */
80
+ balance: t.number,
81
+ lockedBalanceString: t.string,
82
+ reservedBalanceString: t.string,
83
+ /**
84
+ * The total amount received on this address (in the chain's base unit)
85
+ */
86
+ totalReceived: t.number,
87
+ /**
88
+ * The total amount sent from this address (in the chain's base unit)
89
+ */
90
+ totalSent: t.number,
91
+ transferCount: t.number,
92
+ tokens: t.UnknownRecord,
93
+ nfts: t.UnknownRecord,
94
+ unsupportedNfts: t.UnknownRecord,
95
+ type: t.unknown,
96
+ metadata: t.unknown,
97
+ }),
98
+ ]);
99
+ export type TrimmedBalance = t.TypeOf<typeof TrimmedBalance>;
100
+
101
+ /**
102
+ * Base wallet address with optional fields
103
+ */
104
+ export const BaseWalletAddress = t.partial({
105
+ /**
106
+ * Platform public ID for an address
107
+ * @example 59cd72485007a239fb00282ed480da1f
108
+ * @pattern ^[0-9a-f]{32}$
109
+ */
110
+ id: t.string,
111
+ address: AddressString,
112
+ balance: t.union([TrimmedBalance, t.unknown]),
113
+ /**
114
+ * Properties specific to certain coin types
115
+ */
116
+ // TODO: Add the coin specific schema
117
+ coinSpecific: t.unknown,
118
+ label: AddressLabelString,
119
+ /**
120
+ * @default -1
121
+ */
122
+ lastNonce: t.number,
123
+ token: t.string,
124
+ proof: t.string,
125
+ signature: t.string,
126
+ lastConsolidatedTime: date,
127
+ needsConsolidation: t.boolean,
128
+ tokenConsolidationState: t.unknown,
129
+ tokenAddress: t.unknown,
130
+ });
131
+ export type BaseWalletAddress = t.TypeOf<typeof BaseWalletAddress>;
132
+
133
+ /**
134
+ * Lightning wallet address
135
+ */
136
+ export const LightningWalletAddress = t.intersection([
137
+ BaseWalletAddress,
138
+ t.type({
139
+ coin: CoinString,
140
+ wallet: t.string,
141
+ }),
142
+ ]);
143
+ export type LightningWalletAddress = t.TypeOf<typeof LightningWalletAddress>;
144
+
145
+ /**
146
+ * Standard wallet address
147
+ */
148
+ export const WalletAddress = t.intersection([
149
+ BaseWalletAddress,
150
+ t.type({
151
+ coin: CoinString,
152
+ wallet: t.string,
153
+ chain: AddressChain,
154
+ index: t.number,
155
+ }),
156
+ ]);
157
+ export type WalletAddress = t.TypeOf<typeof WalletAddress>;
158
+
159
+ /**
160
+ * Union of wallet address types
161
+ */
162
+ export const WalletAddressUnion = t.union([
163
+ WalletAddress,
164
+ LightningWalletAddress,
165
+ ]);
166
+ export type WalletAddressUnion = t.TypeOf<typeof WalletAddressUnion>;
167
+
168
+ /**
169
+ * Response type for listing wallet addresses
170
+ */
171
+ export const AddressQueryResult = t.intersection([
172
+ t.type({
173
+ coin: t.string,
174
+ }),
175
+ t.partial({
176
+ /** Total number of addresses pending on-chain initialization on this wallet **Note:** for wallets with many addresses (100,000 or more), this property may be omitted for performance reasons. If the pending address count is needed for a large wallet, the `includeTotalAddressCount` query parameter can be used to force an address count to be returned with the initial page of addresses. */
177
+ pendingAddressCount: t.number,
178
+ /** Total number of addresses which match the provided query parameters. **Note:** for wallets with many addresses (100,000 or more), this property may be omitted for performance reasons. If the total address count is needed for a large wallet, the `includeTotalAddressCount` query parameter can be used to force an address count to be returned with the initial page of addresses. */
179
+ totalAddressCount: t.number,
180
+ addresses: t.union([t.array(WalletAddress), t.unknown]),
181
+ /** When a result set is truncated, this field returns the id of the last object in the previous batch. To get the next batch of results, pass this value via the `prevId` query parameter.
182
+ * @format uuid
183
+ * @example 585951a5df8380e0e3063e9f
184
+ */
185
+ nextBatchPrevId: t.string,
186
+ /** Total number of addresses returned in this response */
187
+ count: t.number,
188
+ }),
189
+ ]);
190
+ export type AddressQueryResult = t.TypeOf<typeof AddressQueryResult>;
@@ -1,3 +1,4 @@
1
1
  export * from "./wallet";
2
2
  export * from "./multisigTypeVersion";
3
3
  export * from "./walletTypes";
4
+ export * from "./address";