@nockbox/iris-wasm 0.2.0-alpha.3 → 0.2.0-alpha.5

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.
@@ -2,7 +2,7 @@
2
2
  * Generated type guards for "iris_wasm.d.ts".
3
3
  * WARNING: Do not manually change this file.
4
4
  */
5
- import type { ReadableStreamType, TxNotes, PbCom1Input, PbCom1BlockHeightDelta, PbCom1OutputSource, PbCom1Spend, PbCom1EightBelt, PbCom1TimeLockRangeRelative, PbCom1Lock, PbCom1WalletBalanceData, PbCom1Hash, PbCom1Base58Pubkey, PbCom1NoteVersion, PbCom1BalanceEntry, PbCom1Name, PbCom1ErrorCode, PbCom1TimeLockRangeNeither, PbCom1Note, PbCom1PageRequest, PbCom1CheetahPoint, PbCom1Belt, PbCom1WireTag, PbCom1Signature, PbCom1BlockHeight, PbCom1NamedInput, PbCom1SchnorrPubkey, PbCom1SixBelt, PbCom1Acknowledged, PbCom1Nicks, PbCom1RawTransaction, PbCom1Seed, PbCom1Wire, PbCom1Source, PbCom1SignatureEntry, PbCom1ErrorStatus, PbCom1Base58Hash, PbCom1PageResponse, PbCom1TimeLockIntent, PbCom1TimeLockRangeAbsoluteAndRelative, PbCom1SchnorrSignature, PbCom1TimeLockRangeAbsolute, PbCom2LockMerkleProof, PbCom2PkhLock, PbCom2BalanceEntry, PbCom2SpendCondition, PbCom2WitnessSpend, PbCom2LegacySpend, PbCom2PkhSignature, PbCom2PkhSignatureEntry, PbCom2Witness, PbCom2Spend, PbCom2Seed, PbCom2NoteDataEntry, PbCom2HaxPreimage, PbCom2LockTim, PbCom2NoteV1, PbCom2Note, PbCom2MerkleProof, PbCom2HaxLock, PbCom2BurnLock, PbCom2SpendEntry, PbCom2RawTransaction, PbCom2LockPrimitive, PbCom2Balance, PbCom2NoteData, PbPub2WalletSendTransactionResponse, PbPub2WalletSendTransactionRequest, PbPub2WalletGetBalanceRequest, PbPub2TransactionAcceptedResponse, PbPub2WalletGetBalanceResponse, PbPub2TransactionAcceptedRequest, PbPub2TransactionAcceptedResponseResult, PbCom2LockPrimitivePrimitive, PbPub2WalletGetBalanceRequestSelector, PbCom2NoteNoteVersion, PbPub2WalletSendTransactionResponseResult, PbPri1PeekResponseResult, PbCom2SpendSpendKind, PbPri1PokeResponseResult, PbPri1PokeResponse, PbPri1PeekResponse, PbPri1PokeRequest, PbPri1PeekRequest, PbCom1TimeLockIntentValue, PbCom1WireTagValue, PbPub2WalletGetBalanceResponseResult, MerkleProof, Witness, SpendsV1, InputDisplay, LockPrimitive, SpendV1, NoteData, Spend1V1, NoteV1, Pkh, PkhSignature, LockRoot, SpendCondition, LockMetadata, Spend0V1, LockMerkleProof, Hax, TransactionDisplay, NockchainTx, WitnessData, SeedsV1, RawTxV1, SeedV1, TxEngineSettings, RawTx, SeedV0, NoteV0, SpendV0, Inputs, SeedsV0, NoteInner, RawTxV0, Sig, Input, Timelock, LegacySignature, TimelockIntent, MissingUnlocks, BalanceUpdate, Note, Source, TimelockRange, Nicks, Balance, Name, Version, PublicKey, Signature, Noun, CheetahPoint, Digest, ZSet, ZSetEntry, ZMap, ZMapEntry, ZBase, InitInput, InitOutput, SyncInitInput, TxId, BlockHeight, LockTim } from "./iris_wasm.js";
5
+ import type { ReadableStreamType, TxNotes, PbCom1Note, PbCom1TimeLockRangeAbsoluteAndRelative, PbCom1Belt, PbCom1NoteVersion, PbCom1Lock, PbCom1BalanceEntry, PbCom1OutputSource, PbCom1Acknowledged, PbCom1RawTransaction, PbCom1Name, PbCom1WalletBalanceData, PbCom1TimeLockRangeRelative, PbCom1Spend, PbCom1NamedInput, PbCom1ErrorStatus, PbCom1SignatureEntry, PbCom1PageRequest, PbCom1TimeLockIntent, PbCom1SchnorrSignature, PbCom1TimeLockRangeAbsolute, PbCom1TimeLockRangeNeither, PbCom1SchnorrPubkey, PbCom1ErrorCode, PbCom1EightBelt, PbCom1Source, PbCom1SixBelt, PbCom1CheetahPoint, PbCom1Hash, PbCom1Nicks, PbCom1Input, PbCom1Wire, PbCom1Base58Hash, PbCom1Signature, PbCom1BlockHeightDelta, PbCom1PageResponse, PbCom1Seed, PbCom1Base58Pubkey, PbCom1WireTag, PbCom1BlockHeight, PbCom2SpendCondition, PbCom2Note, PbCom2RawTransaction, PbCom2Seed, PbCom2Balance, PbCom2WitnessSpend, PbCom2NoteData, PbCom2LockMerkleProof, PbCom2Spend, PbCom2MerkleProof, PbCom2BurnLock, PbCom2BalanceEntry, PbCom2LockPrimitive, PbCom2HaxPreimage, PbCom2PkhSignatureEntry, PbCom2LegacySpend, PbCom2NoteDataEntry, PbCom2SpendEntry, PbCom2PkhSignature, PbCom2HaxLock, PbCom2LockTim, PbCom2PkhLock, PbCom2Witness, PbCom2NoteV1, PbPub2WalletSendTransactionRequest, PbPub2WalletGetBalanceResponse, PbPub2TransactionAcceptedResponse, PbPub2WalletGetBalanceRequest, PbPub2TransactionAcceptedRequest, PbPub2WalletSendTransactionResponse, PbPub2TransactionAcceptedResponseResult, PbCom2LockPrimitivePrimitive, PbPub2WalletGetBalanceRequestSelector, PbCom2NoteNoteVersion, PbPub2WalletSendTransactionResponseResult, PbPri1PeekResponseResult, PbCom2SpendSpendKind, PbPri1PokeResponseResult, PbPri1PokeResponse, PbPri1PeekResponse, PbPri1PokeRequest, PbPri1PeekRequest, PbCom1TimeLockIntentValue, PbCom1WireTagValue, PbPub2WalletGetBalanceResponseResult, SpendV1, SeedV1, Witness, InputDisplay, SpendsV1, NoteV1, SeedsV1, TransactionDisplay, MerkleProof, Spend1V1, LockMerkleProof, RawTxV1, Hax, SpendCondition, Spend0V1, LockPrimitive, WitnessData, NockchainTx, LockRoot, LockMetadata, Pkh, PkhSignature, NoteData, Version, Name, Note, Balance, BalanceUpdate, TimelockRange, Source, Nicks, MissingUnlocks, TxEngineSettings, RawTx, Inputs, Timelock, TimelockIntent, NoteV0, NoteInner, RawTxV0, LegacySignature, SeedsV0, SpendV0, Input, SeedV0, Sig, Signature, PublicKey, Noun, CheetahPoint, Digest, ZMapEntry, ZMap, ZSetEntry, ZSet, ZBase, InitInput, InitOutput, SyncInitInput, TxId, BlockHeight, LockTim } from "./iris_wasm.js";
6
6
 
7
7
 
8
8
  export function isTxNotes(obj: unknown): obj is TxNotes {
@@ -22,92 +22,59 @@ export function isTxNotes(obj: unknown): obj is TxNotes {
22
22
  )
23
23
  }
24
24
 
25
- export function isPbCom1Input(obj: unknown): obj is PbCom1Input {
26
- const typedObj = obj as any
27
- return (
28
- (typedObj !== null &&
29
- typeof typedObj === "object" ||
30
- typeof typedObj === "function") &&
31
- (typedObj["note"] === null ||
32
- isPbCom1Note(typedObj["note"]) as boolean) &&
33
- (typedObj["spend"] === null ||
34
- isPbCom1Spend(typedObj["spend"]) as boolean)
35
- )
36
- }
37
-
38
- export function isPbCom1BlockHeightDelta(obj: unknown): obj is PbCom1BlockHeightDelta {
39
- const typedObj = obj as any
40
- return (
41
- (typedObj !== null &&
42
- typeof typedObj === "object" ||
43
- typeof typedObj === "function") &&
44
- isNicks(typedObj["value"]) as boolean
45
- )
46
- }
47
-
48
- export function isPbCom1OutputSource(obj: unknown): obj is PbCom1OutputSource {
25
+ export function isPbCom1Note(obj: unknown): obj is PbCom1Note {
49
26
  const typedObj = obj as any
50
27
  return (
51
28
  (typedObj !== null &&
52
29
  typeof typedObj === "object" ||
53
30
  typeof typedObj === "function") &&
54
- (typedObj["source"] === null ||
55
- isPbCom1Source(typedObj["source"]) as boolean)
31
+ (typeof typedObj["origin_page"] === "undefined" ||
32
+ isPbCom1BlockHeight(typedObj["origin_page"]) as boolean) &&
33
+ (typeof typedObj["timelock"] === "undefined" ||
34
+ isPbCom1TimeLockIntent(typedObj["timelock"]) as boolean) &&
35
+ (typeof typedObj["name"] === "undefined" ||
36
+ isPbCom1Name(typedObj["name"]) as boolean) &&
37
+ (typeof typedObj["lock"] === "undefined" ||
38
+ isPbCom1Lock(typedObj["lock"]) as boolean) &&
39
+ (typeof typedObj["source"] === "undefined" ||
40
+ isPbCom1Source(typedObj["source"]) as boolean) &&
41
+ (typeof typedObj["assets"] === "undefined" ||
42
+ isPbCom1Nicks(typedObj["assets"]) as boolean) &&
43
+ (typeof typedObj["version"] === "undefined" ||
44
+ isPbCom1NoteVersion(typedObj["version"]) as boolean)
56
45
  )
57
46
  }
58
47
 
59
- export function isPbCom1Spend(obj: unknown): obj is PbCom1Spend {
48
+ export function isPbCom1TimeLockRangeAbsoluteAndRelative(obj: unknown): obj is PbCom1TimeLockRangeAbsoluteAndRelative {
60
49
  const typedObj = obj as any
61
50
  return (
62
51
  (typedObj !== null &&
63
52
  typeof typedObj === "object" ||
64
53
  typeof typedObj === "function") &&
65
- (typedObj["signature"] === null ||
66
- isPbCom1Signature(typedObj["signature"]) as boolean) &&
67
- Array.isArray(typedObj["seeds"]) &&
68
- typedObj["seeds"].every((e: any) =>
69
- isPbCom1Seed(e) as boolean
70
- ) &&
71
- (typedObj["miner_fee_nicks"] === null ||
72
- isPbCom1Nicks(typedObj["miner_fee_nicks"]) as boolean)
54
+ (typeof typedObj["absolute"] === "undefined" ||
55
+ isPbCom1TimeLockRangeAbsolute(typedObj["absolute"]) as boolean) &&
56
+ (typeof typedObj["relative"] === "undefined" ||
57
+ isPbCom1TimeLockRangeRelative(typedObj["relative"]) as boolean)
73
58
  )
74
59
  }
75
60
 
76
- export function isPbCom1EightBelt(obj: unknown): obj is PbCom1EightBelt {
61
+ export function isPbCom1Belt(obj: unknown): obj is PbCom1Belt {
77
62
  const typedObj = obj as any
78
63
  return (
79
64
  (typedObj !== null &&
80
65
  typeof typedObj === "object" ||
81
66
  typeof typedObj === "function") &&
82
- (typedObj["belt_1"] === null ||
83
- isPbCom1Belt(typedObj["belt_1"]) as boolean) &&
84
- (typedObj["belt_2"] === null ||
85
- isPbCom1Belt(typedObj["belt_2"]) as boolean) &&
86
- (typedObj["belt_3"] === null ||
87
- isPbCom1Belt(typedObj["belt_3"]) as boolean) &&
88
- (typedObj["belt_4"] === null ||
89
- isPbCom1Belt(typedObj["belt_4"]) as boolean) &&
90
- (typedObj["belt_5"] === null ||
91
- isPbCom1Belt(typedObj["belt_5"]) as boolean) &&
92
- (typedObj["belt_6"] === null ||
93
- isPbCom1Belt(typedObj["belt_6"]) as boolean) &&
94
- (typedObj["belt_7"] === null ||
95
- isPbCom1Belt(typedObj["belt_7"]) as boolean) &&
96
- (typedObj["belt_8"] === null ||
97
- isPbCom1Belt(typedObj["belt_8"]) as boolean)
67
+ typeof typedObj["value"] === "string"
98
68
  )
99
69
  }
100
70
 
101
- export function isPbCom1TimeLockRangeRelative(obj: unknown): obj is PbCom1TimeLockRangeRelative {
71
+ export function isPbCom1NoteVersion(obj: unknown): obj is PbCom1NoteVersion {
102
72
  const typedObj = obj as any
103
73
  return (
104
74
  (typedObj !== null &&
105
75
  typeof typedObj === "object" ||
106
76
  typeof typedObj === "function") &&
107
- (typedObj["min"] === null ||
108
- isPbCom1BlockHeightDelta(typedObj["min"]) as boolean) &&
109
- (typedObj["max"] === null ||
110
- isPbCom1BlockHeightDelta(typedObj["max"]) as boolean)
77
+ typeof typedObj["value"] === "string"
111
78
  )
112
79
  }
113
80
 
@@ -125,175 +92,169 @@ export function isPbCom1Lock(obj: unknown): obj is PbCom1Lock {
125
92
  )
126
93
  }
127
94
 
128
- export function isPbCom1WalletBalanceData(obj: unknown): obj is PbCom1WalletBalanceData {
95
+ export function isPbCom1BalanceEntry(obj: unknown): obj is PbCom1BalanceEntry {
129
96
  const typedObj = obj as any
130
97
  return (
131
98
  (typedObj !== null &&
132
99
  typeof typedObj === "object" ||
133
100
  typeof typedObj === "function") &&
134
- Array.isArray(typedObj["notes"]) &&
135
- typedObj["notes"].every((e: any) =>
136
- isPbCom1BalanceEntry(e) as boolean
137
- ) &&
138
- (typedObj["height"] === null ||
139
- isPbCom1BlockHeight(typedObj["height"]) as boolean) &&
140
- (typedObj["block_id"] === null ||
141
- isPbCom1Hash(typedObj["block_id"]) as boolean) &&
142
- (typedObj["page"] === null ||
143
- isPbCom1PageResponse(typedObj["page"]) as boolean)
101
+ (typeof typedObj["name"] === "undefined" ||
102
+ isPbCom1Name(typedObj["name"]) as boolean) &&
103
+ (typeof typedObj["note"] === "undefined" ||
104
+ isPbCom1Note(typedObj["note"]) as boolean)
144
105
  )
145
106
  }
146
107
 
147
- export function isPbCom1Hash(obj: unknown): obj is PbCom1Hash {
108
+ export function isPbCom1OutputSource(obj: unknown): obj is PbCom1OutputSource {
148
109
  const typedObj = obj as any
149
110
  return (
150
111
  (typedObj !== null &&
151
112
  typeof typedObj === "object" ||
152
113
  typeof typedObj === "function") &&
153
- (typedObj["belt_1"] === null ||
154
- isPbCom1Belt(typedObj["belt_1"]) as boolean) &&
155
- (typedObj["belt_2"] === null ||
156
- isPbCom1Belt(typedObj["belt_2"]) as boolean) &&
157
- (typedObj["belt_3"] === null ||
158
- isPbCom1Belt(typedObj["belt_3"]) as boolean) &&
159
- (typedObj["belt_4"] === null ||
160
- isPbCom1Belt(typedObj["belt_4"]) as boolean) &&
161
- (typedObj["belt_5"] === null ||
162
- isPbCom1Belt(typedObj["belt_5"]) as boolean)
114
+ (typeof typedObj["source"] === "undefined" ||
115
+ isPbCom1Source(typedObj["source"]) as boolean)
163
116
  )
164
117
  }
165
118
 
166
- export function isPbCom1Base58Pubkey(obj: unknown): obj is PbCom1Base58Pubkey {
119
+ export function isPbCom1Acknowledged(obj: unknown): obj is PbCom1Acknowledged {
167
120
  const typedObj = obj as any
168
121
  return (
169
122
  (typedObj !== null &&
170
123
  typeof typedObj === "object" ||
171
- typeof typedObj === "function") &&
172
- isNicks(typedObj["key"]) as boolean
124
+ typeof typedObj === "function")
173
125
  )
174
126
  }
175
127
 
176
- export function isPbCom1NoteVersion(obj: unknown): obj is PbCom1NoteVersion {
128
+ export function isPbCom1RawTransaction(obj: unknown): obj is PbCom1RawTransaction {
177
129
  const typedObj = obj as any
178
130
  return (
179
131
  (typedObj !== null &&
180
132
  typeof typedObj === "object" ||
181
133
  typeof typedObj === "function") &&
182
- isNicks(typedObj["value"]) as boolean
134
+ Array.isArray(typedObj["named_inputs"]) &&
135
+ typedObj["named_inputs"].every((e: any) =>
136
+ isPbCom1NamedInput(e) as boolean
137
+ ) &&
138
+ (typeof typedObj["timelock_range"] === "undefined" ||
139
+ isPbCom1TimeLockRangeAbsolute(typedObj["timelock_range"]) as boolean) &&
140
+ (typeof typedObj["total_fees"] === "undefined" ||
141
+ isPbCom1Nicks(typedObj["total_fees"]) as boolean) &&
142
+ typeof typedObj["id"] === "string"
183
143
  )
184
144
  }
185
145
 
186
- export function isPbCom1BalanceEntry(obj: unknown): obj is PbCom1BalanceEntry {
146
+ export function isPbCom1Name(obj: unknown): obj is PbCom1Name {
187
147
  const typedObj = obj as any
188
148
  return (
189
149
  (typedObj !== null &&
190
150
  typeof typedObj === "object" ||
191
151
  typeof typedObj === "function") &&
192
- (typedObj["name"] === null ||
193
- isPbCom1Name(typedObj["name"]) as boolean) &&
194
- (typedObj["note"] === null ||
195
- isPbCom1Note(typedObj["note"]) as boolean)
152
+ typeof typedObj["first"] === "string" &&
153
+ typeof typedObj["last"] === "string"
196
154
  )
197
155
  }
198
156
 
199
- export function isPbCom1Name(obj: unknown): obj is PbCom1Name {
157
+ export function isPbCom1WalletBalanceData(obj: unknown): obj is PbCom1WalletBalanceData {
200
158
  const typedObj = obj as any
201
159
  return (
202
160
  (typedObj !== null &&
203
161
  typeof typedObj === "object" ||
204
162
  typeof typedObj === "function") &&
205
- isNicks(typedObj["first"]) as boolean &&
206
- isNicks(typedObj["last"]) as boolean
163
+ Array.isArray(typedObj["notes"]) &&
164
+ typedObj["notes"].every((e: any) =>
165
+ isPbCom1BalanceEntry(e) as boolean
166
+ ) &&
167
+ (typeof typedObj["height"] === "undefined" ||
168
+ isPbCom1BlockHeight(typedObj["height"]) as boolean) &&
169
+ (typeof typedObj["block_id"] === "undefined" ||
170
+ isPbCom1Hash(typedObj["block_id"]) as boolean) &&
171
+ (typeof typedObj["page"] === "undefined" ||
172
+ isPbCom1PageResponse(typedObj["page"]) as boolean)
207
173
  )
208
174
  }
209
175
 
210
- export function isPbCom1ErrorCode(obj: unknown): obj is PbCom1ErrorCode {
176
+ export function isPbCom1TimeLockRangeRelative(obj: unknown): obj is PbCom1TimeLockRangeRelative {
211
177
  const typedObj = obj as any
212
178
  return (
213
- (typedObj === "Unspecified" ||
214
- typedObj === "InvalidRequest" ||
215
- typedObj === "PeekFailed" ||
216
- typedObj === "PeekReturnedNoData" ||
217
- typedObj === "PokeFailed" ||
218
- typedObj === "NackappError" ||
219
- typedObj === "Timeout" ||
220
- typedObj === "InternalError" ||
221
- typedObj === "NotFound" ||
222
- typedObj === "PermissionDenied" ||
223
- typedObj === "InvalidWire" ||
224
- typedObj === "KernelError")
179
+ (typedObj !== null &&
180
+ typeof typedObj === "object" ||
181
+ typeof typedObj === "function") &&
182
+ (typeof typedObj["min"] === "undefined" ||
183
+ isPbCom1BlockHeightDelta(typedObj["min"]) as boolean) &&
184
+ (typeof typedObj["max"] === "undefined" ||
185
+ isPbCom1BlockHeightDelta(typedObj["max"]) as boolean)
225
186
  )
226
187
  }
227
188
 
228
- export function isPbCom1TimeLockRangeNeither(obj: unknown): obj is PbCom1TimeLockRangeNeither {
189
+ export function isPbCom1Spend(obj: unknown): obj is PbCom1Spend {
229
190
  const typedObj = obj as any
230
191
  return (
231
192
  (typedObj !== null &&
232
193
  typeof typedObj === "object" ||
233
- typeof typedObj === "function")
194
+ typeof typedObj === "function") &&
195
+ (typeof typedObj["signature"] === "undefined" ||
196
+ isPbCom1Signature(typedObj["signature"]) as boolean) &&
197
+ Array.isArray(typedObj["seeds"]) &&
198
+ typedObj["seeds"].every((e: any) =>
199
+ isPbCom1Seed(e) as boolean
200
+ ) &&
201
+ (typeof typedObj["miner_fee_nicks"] === "undefined" ||
202
+ isPbCom1Nicks(typedObj["miner_fee_nicks"]) as boolean)
234
203
  )
235
204
  }
236
205
 
237
- export function isPbCom1Note(obj: unknown): obj is PbCom1Note {
206
+ export function isPbCom1NamedInput(obj: unknown): obj is PbCom1NamedInput {
238
207
  const typedObj = obj as any
239
208
  return (
240
209
  (typedObj !== null &&
241
210
  typeof typedObj === "object" ||
242
211
  typeof typedObj === "function") &&
243
- (typedObj["origin_page"] === null ||
244
- isPbCom1BlockHeight(typedObj["origin_page"]) as boolean) &&
245
- (typedObj["timelock"] === null ||
246
- isPbCom1TimeLockIntent(typedObj["timelock"]) as boolean) &&
247
- (typedObj["name"] === null ||
212
+ (typeof typedObj["name"] === "undefined" ||
248
213
  isPbCom1Name(typedObj["name"]) as boolean) &&
249
- (typedObj["lock"] === null ||
250
- isPbCom1Lock(typedObj["lock"]) as boolean) &&
251
- (typedObj["source"] === null ||
252
- isPbCom1Source(typedObj["source"]) as boolean) &&
253
- (typedObj["assets"] === null ||
254
- isPbCom1Nicks(typedObj["assets"]) as boolean) &&
255
- (typedObj["version"] === null ||
256
- isPbCom1NoteVersion(typedObj["version"]) as boolean)
214
+ (typeof typedObj["input"] === "undefined" ||
215
+ isPbCom1Input(typedObj["input"]) as boolean)
257
216
  )
258
217
  }
259
218
 
260
- export function isPbCom1PageRequest(obj: unknown): obj is PbCom1PageRequest {
219
+ export function isPbCom1ErrorStatus(obj: unknown): obj is PbCom1ErrorStatus {
261
220
  const typedObj = obj as any
262
221
  return (
263
222
  (typedObj !== null &&
264
223
  typeof typedObj === "object" ||
265
224
  typeof typedObj === "function") &&
266
- isBlockHeight(typedObj["client_page_items_limit"]) as boolean &&
267
- isNicks(typedObj["page_token"]) as boolean &&
268
- isBlockHeight(typedObj["max_bytes"]) as boolean
225
+ isBlockHeight(typedObj["code"]) as boolean &&
226
+ typeof typedObj["message"] === "string" &&
227
+ (typedObj["details"] === null ||
228
+ typeof typedObj["details"] === "string")
269
229
  )
270
230
  }
271
231
 
272
- export function isPbCom1CheetahPoint(obj: unknown): obj is PbCom1CheetahPoint {
232
+ export function isPbCom1SignatureEntry(obj: unknown): obj is PbCom1SignatureEntry {
273
233
  const typedObj = obj as any
274
234
  return (
275
235
  (typedObj !== null &&
276
236
  typeof typedObj === "object" ||
277
237
  typeof typedObj === "function") &&
278
- (typedObj["x"] === null ||
279
- isPbCom1SixBelt(typedObj["x"]) as boolean) &&
280
- (typedObj["y"] === null ||
281
- isPbCom1SixBelt(typedObj["y"]) as boolean) &&
282
- typeof typedObj["inf"] === "boolean"
238
+ (typeof typedObj["schnorr_pubkey"] === "undefined" ||
239
+ isPbCom1SchnorrPubkey(typedObj["schnorr_pubkey"]) as boolean) &&
240
+ (typeof typedObj["signature"] === "undefined" ||
241
+ isPbCom1SchnorrSignature(typedObj["signature"]) as boolean)
283
242
  )
284
243
  }
285
244
 
286
- export function isPbCom1Belt(obj: unknown): obj is PbCom1Belt {
245
+ export function isPbCom1PageRequest(obj: unknown): obj is PbCom1PageRequest {
287
246
  const typedObj = obj as any
288
247
  return (
289
248
  (typedObj !== null &&
290
249
  typeof typedObj === "object" ||
291
250
  typeof typedObj === "function") &&
292
- isNicks(typedObj["value"]) as boolean
251
+ isBlockHeight(typedObj["client_page_items_limit"]) as boolean &&
252
+ typeof typedObj["page_token"] === "string" &&
253
+ isBlockHeight(typedObj["max_bytes"]) as boolean
293
254
  )
294
255
  }
295
256
 
296
- export function isPbCom1WireTag(obj: unknown): obj is PbCom1WireTag {
257
+ export function isPbCom1TimeLockIntent(obj: unknown): obj is PbCom1TimeLockIntent {
297
258
  const typedObj = obj as any
298
259
  return (
299
260
  (typedObj !== null &&
@@ -303,47 +264,54 @@ export function isPbCom1WireTag(obj: unknown): obj is PbCom1WireTag {
303
264
  (typedObj["value"] !== null &&
304
265
  typeof typedObj["value"] === "object" ||
305
266
  typeof typedObj["value"] === "function") &&
306
- isNicks(typedObj["value"]["Text"]) as boolean ||
267
+ isPbCom1TimeLockRangeAbsolute(typedObj["value"]["Absolute"]) as boolean ||
307
268
  (typedObj["value"] !== null &&
308
269
  typeof typedObj["value"] === "object" ||
309
270
  typeof typedObj["value"] === "function") &&
310
- isBlockHeight(typedObj["value"]["Number"]) as boolean)
271
+ isPbCom1TimeLockRangeRelative(typedObj["value"]["Relative"]) as boolean ||
272
+ (typedObj["value"] !== null &&
273
+ typeof typedObj["value"] === "object" ||
274
+ typeof typedObj["value"] === "function") &&
275
+ isPbCom1TimeLockRangeAbsoluteAndRelative(typedObj["value"]["AbsoluteAndRelative"]) as boolean ||
276
+ (typedObj["value"] !== null &&
277
+ typeof typedObj["value"] === "object" ||
278
+ typeof typedObj["value"] === "function") &&
279
+ isPbCom1TimeLockRangeNeither(typedObj["value"]["Neither"]) as boolean)
311
280
  )
312
281
  }
313
282
 
314
- export function isPbCom1Signature(obj: unknown): obj is PbCom1Signature {
283
+ export function isPbCom1SchnorrSignature(obj: unknown): obj is PbCom1SchnorrSignature {
315
284
  const typedObj = obj as any
316
285
  return (
317
286
  (typedObj !== null &&
318
287
  typeof typedObj === "object" ||
319
288
  typeof typedObj === "function") &&
320
- Array.isArray(typedObj["entries"]) &&
321
- typedObj["entries"].every((e: any) =>
322
- isPbCom1SignatureEntry(e) as boolean
323
- )
289
+ (typeof typedObj["chal"] === "undefined" ||
290
+ isPbCom1EightBelt(typedObj["chal"]) as boolean) &&
291
+ (typeof typedObj["sig"] === "undefined" ||
292
+ isPbCom1EightBelt(typedObj["sig"]) as boolean)
324
293
  )
325
294
  }
326
295
 
327
- export function isPbCom1BlockHeight(obj: unknown): obj is PbCom1BlockHeight {
296
+ export function isPbCom1TimeLockRangeAbsolute(obj: unknown): obj is PbCom1TimeLockRangeAbsolute {
328
297
  const typedObj = obj as any
329
298
  return (
330
299
  (typedObj !== null &&
331
300
  typeof typedObj === "object" ||
332
301
  typeof typedObj === "function") &&
333
- isNicks(typedObj["value"]) as boolean
302
+ (typeof typedObj["min"] === "undefined" ||
303
+ isPbCom1BlockHeight(typedObj["min"]) as boolean) &&
304
+ (typeof typedObj["max"] === "undefined" ||
305
+ isPbCom1BlockHeight(typedObj["max"]) as boolean)
334
306
  )
335
307
  }
336
308
 
337
- export function isPbCom1NamedInput(obj: unknown): obj is PbCom1NamedInput {
309
+ export function isPbCom1TimeLockRangeNeither(obj: unknown): obj is PbCom1TimeLockRangeNeither {
338
310
  const typedObj = obj as any
339
311
  return (
340
312
  (typedObj !== null &&
341
313
  typeof typedObj === "object" ||
342
- typeof typedObj === "function") &&
343
- (typedObj["name"] === null ||
344
- isPbCom1Name(typedObj["name"]) as boolean) &&
345
- (typedObj["input"] === null ||
346
- isPbCom1Input(typedObj["input"]) as boolean)
314
+ typeof typedObj === "function")
347
315
  )
348
316
  }
349
317
 
@@ -353,94 +321,149 @@ export function isPbCom1SchnorrPubkey(obj: unknown): obj is PbCom1SchnorrPubkey
353
321
  (typedObj !== null &&
354
322
  typeof typedObj === "object" ||
355
323
  typeof typedObj === "function") &&
356
- (typedObj["value"] === null ||
324
+ (typeof typedObj["value"] === "undefined" ||
357
325
  isPbCom1CheetahPoint(typedObj["value"]) as boolean)
358
326
  )
359
327
  }
360
328
 
361
- export function isPbCom1SixBelt(obj: unknown): obj is PbCom1SixBelt {
329
+ export function isPbCom1ErrorCode(obj: unknown): obj is PbCom1ErrorCode {
330
+ const typedObj = obj as any
331
+ return (
332
+ (typedObj === "Unspecified" ||
333
+ typedObj === "InvalidRequest" ||
334
+ typedObj === "PeekFailed" ||
335
+ typedObj === "PeekReturnedNoData" ||
336
+ typedObj === "PokeFailed" ||
337
+ typedObj === "NackappError" ||
338
+ typedObj === "Timeout" ||
339
+ typedObj === "InternalError" ||
340
+ typedObj === "NotFound" ||
341
+ typedObj === "PermissionDenied" ||
342
+ typedObj === "InvalidWire" ||
343
+ typedObj === "KernelError")
344
+ )
345
+ }
346
+
347
+ export function isPbCom1EightBelt(obj: unknown): obj is PbCom1EightBelt {
362
348
  const typedObj = obj as any
363
349
  return (
364
350
  (typedObj !== null &&
365
351
  typeof typedObj === "object" ||
366
352
  typeof typedObj === "function") &&
367
- (typedObj["belt_1"] === null ||
353
+ (typeof typedObj["belt_1"] === "undefined" ||
368
354
  isPbCom1Belt(typedObj["belt_1"]) as boolean) &&
369
- (typedObj["belt_2"] === null ||
355
+ (typeof typedObj["belt_2"] === "undefined" ||
370
356
  isPbCom1Belt(typedObj["belt_2"]) as boolean) &&
371
- (typedObj["belt_3"] === null ||
357
+ (typeof typedObj["belt_3"] === "undefined" ||
372
358
  isPbCom1Belt(typedObj["belt_3"]) as boolean) &&
373
- (typedObj["belt_4"] === null ||
359
+ (typeof typedObj["belt_4"] === "undefined" ||
374
360
  isPbCom1Belt(typedObj["belt_4"]) as boolean) &&
375
- (typedObj["belt_5"] === null ||
361
+ (typeof typedObj["belt_5"] === "undefined" ||
376
362
  isPbCom1Belt(typedObj["belt_5"]) as boolean) &&
377
- (typedObj["belt_6"] === null ||
378
- isPbCom1Belt(typedObj["belt_6"]) as boolean)
363
+ (typeof typedObj["belt_6"] === "undefined" ||
364
+ isPbCom1Belt(typedObj["belt_6"]) as boolean) &&
365
+ (typeof typedObj["belt_7"] === "undefined" ||
366
+ isPbCom1Belt(typedObj["belt_7"]) as boolean) &&
367
+ (typeof typedObj["belt_8"] === "undefined" ||
368
+ isPbCom1Belt(typedObj["belt_8"]) as boolean)
379
369
  )
380
370
  }
381
371
 
382
- export function isPbCom1Acknowledged(obj: unknown): obj is PbCom1Acknowledged {
372
+ export function isPbCom1Source(obj: unknown): obj is PbCom1Source {
383
373
  const typedObj = obj as any
384
374
  return (
385
375
  (typedObj !== null &&
386
376
  typeof typedObj === "object" ||
387
- typeof typedObj === "function")
377
+ typeof typedObj === "function") &&
378
+ typeof typedObj["hash"] === "string" &&
379
+ typeof typedObj["coinbase"] === "boolean"
388
380
  )
389
381
  }
390
382
 
391
- export function isPbCom1Nicks(obj: unknown): obj is PbCom1Nicks {
383
+ export function isPbCom1SixBelt(obj: unknown): obj is PbCom1SixBelt {
392
384
  const typedObj = obj as any
393
385
  return (
394
386
  (typedObj !== null &&
395
387
  typeof typedObj === "object" ||
396
388
  typeof typedObj === "function") &&
397
- isNicks(typedObj["value"]) as boolean
389
+ (typeof typedObj["belt_1"] === "undefined" ||
390
+ isPbCom1Belt(typedObj["belt_1"]) as boolean) &&
391
+ (typeof typedObj["belt_2"] === "undefined" ||
392
+ isPbCom1Belt(typedObj["belt_2"]) as boolean) &&
393
+ (typeof typedObj["belt_3"] === "undefined" ||
394
+ isPbCom1Belt(typedObj["belt_3"]) as boolean) &&
395
+ (typeof typedObj["belt_4"] === "undefined" ||
396
+ isPbCom1Belt(typedObj["belt_4"]) as boolean) &&
397
+ (typeof typedObj["belt_5"] === "undefined" ||
398
+ isPbCom1Belt(typedObj["belt_5"]) as boolean) &&
399
+ (typeof typedObj["belt_6"] === "undefined" ||
400
+ isPbCom1Belt(typedObj["belt_6"]) as boolean)
398
401
  )
399
402
  }
400
403
 
401
- export function isPbCom1RawTransaction(obj: unknown): obj is PbCom1RawTransaction {
404
+ export function isPbCom1CheetahPoint(obj: unknown): obj is PbCom1CheetahPoint {
402
405
  const typedObj = obj as any
403
406
  return (
404
407
  (typedObj !== null &&
405
408
  typeof typedObj === "object" ||
406
409
  typeof typedObj === "function") &&
407
- Array.isArray(typedObj["named_inputs"]) &&
408
- typedObj["named_inputs"].every((e: any) =>
409
- isPbCom1NamedInput(e) as boolean
410
- ) &&
411
- (typedObj["timelock_range"] === null ||
412
- isPbCom1TimeLockRangeAbsolute(typedObj["timelock_range"]) as boolean) &&
413
- (typedObj["total_fees"] === null ||
414
- isPbCom1Nicks(typedObj["total_fees"]) as boolean) &&
415
- isNicks(typedObj["id"]) as boolean
410
+ (typeof typedObj["x"] === "undefined" ||
411
+ isPbCom1SixBelt(typedObj["x"]) as boolean) &&
412
+ (typeof typedObj["y"] === "undefined" ||
413
+ isPbCom1SixBelt(typedObj["y"]) as boolean) &&
414
+ typeof typedObj["inf"] === "boolean"
416
415
  )
417
416
  }
418
417
 
419
- export function isPbCom1Seed(obj: unknown): obj is PbCom1Seed {
418
+ export function isPbCom1Hash(obj: unknown): obj is PbCom1Hash {
420
419
  const typedObj = obj as any
421
420
  return (
422
421
  (typedObj !== null &&
423
422
  typeof typedObj === "object" ||
424
423
  typeof typedObj === "function") &&
425
- (typedObj["output_source"] === null ||
426
- isPbCom1OutputSource(typedObj["output_source"]) as boolean) &&
427
- (typedObj["recipient"] === null ||
428
- isPbCom1Lock(typedObj["recipient"]) as boolean) &&
429
- (typedObj["timelock_intent"] === null ||
430
- isPbCom1TimeLockIntent(typedObj["timelock_intent"]) as boolean) &&
431
- (typedObj["gift"] === null ||
432
- isPbCom1Nicks(typedObj["gift"]) as boolean) &&
433
- isNicks(typedObj["parent_hash"]) as boolean
434
- )
435
- }
436
-
424
+ (typeof typedObj["belt_1"] === "undefined" ||
425
+ isPbCom1Belt(typedObj["belt_1"]) as boolean) &&
426
+ (typeof typedObj["belt_2"] === "undefined" ||
427
+ isPbCom1Belt(typedObj["belt_2"]) as boolean) &&
428
+ (typeof typedObj["belt_3"] === "undefined" ||
429
+ isPbCom1Belt(typedObj["belt_3"]) as boolean) &&
430
+ (typeof typedObj["belt_4"] === "undefined" ||
431
+ isPbCom1Belt(typedObj["belt_4"]) as boolean) &&
432
+ (typeof typedObj["belt_5"] === "undefined" ||
433
+ isPbCom1Belt(typedObj["belt_5"]) as boolean)
434
+ )
435
+ }
436
+
437
+ export function isPbCom1Nicks(obj: unknown): obj is PbCom1Nicks {
438
+ const typedObj = obj as any
439
+ return (
440
+ (typedObj !== null &&
441
+ typeof typedObj === "object" ||
442
+ typeof typedObj === "function") &&
443
+ typeof typedObj["value"] === "string"
444
+ )
445
+ }
446
+
447
+ export function isPbCom1Input(obj: unknown): obj is PbCom1Input {
448
+ const typedObj = obj as any
449
+ return (
450
+ (typedObj !== null &&
451
+ typeof typedObj === "object" ||
452
+ typeof typedObj === "function") &&
453
+ (typeof typedObj["note"] === "undefined" ||
454
+ isPbCom1Note(typedObj["note"]) as boolean) &&
455
+ (typeof typedObj["spend"] === "undefined" ||
456
+ isPbCom1Spend(typedObj["spend"]) as boolean)
457
+ )
458
+ }
459
+
437
460
  export function isPbCom1Wire(obj: unknown): obj is PbCom1Wire {
438
461
  const typedObj = obj as any
439
462
  return (
440
463
  (typedObj !== null &&
441
464
  typeof typedObj === "object" ||
442
465
  typeof typedObj === "function") &&
443
- isNicks(typedObj["source"]) as boolean &&
466
+ typeof typedObj["source"] === "string" &&
444
467
  isBlockHeight(typedObj["version"]) as boolean &&
445
468
  Array.isArray(typedObj["tags"]) &&
446
469
  typedObj["tags"].every((e: any) =>
@@ -449,179 +472,184 @@ export function isPbCom1Wire(obj: unknown): obj is PbCom1Wire {
449
472
  )
450
473
  }
451
474
 
452
- export function isPbCom1Source(obj: unknown): obj is PbCom1Source {
475
+ export function isPbCom1Base58Hash(obj: unknown): obj is PbCom1Base58Hash {
453
476
  const typedObj = obj as any
454
477
  return (
455
478
  (typedObj !== null &&
456
479
  typeof typedObj === "object" ||
457
480
  typeof typedObj === "function") &&
458
- isNicks(typedObj["hash"]) as boolean &&
459
- typeof typedObj["coinbase"] === "boolean"
481
+ typeof typedObj["hash"] === "string"
460
482
  )
461
483
  }
462
484
 
463
- export function isPbCom1SignatureEntry(obj: unknown): obj is PbCom1SignatureEntry {
485
+ export function isPbCom1Signature(obj: unknown): obj is PbCom1Signature {
464
486
  const typedObj = obj as any
465
487
  return (
466
488
  (typedObj !== null &&
467
489
  typeof typedObj === "object" ||
468
490
  typeof typedObj === "function") &&
469
- (typedObj["schnorr_pubkey"] === null ||
470
- isPbCom1SchnorrPubkey(typedObj["schnorr_pubkey"]) as boolean) &&
471
- (typedObj["signature"] === null ||
472
- isPbCom1SchnorrSignature(typedObj["signature"]) as boolean)
491
+ Array.isArray(typedObj["entries"]) &&
492
+ typedObj["entries"].every((e: any) =>
493
+ isPbCom1SignatureEntry(e) as boolean
494
+ )
473
495
  )
474
496
  }
475
497
 
476
- export function isPbCom1ErrorStatus(obj: unknown): obj is PbCom1ErrorStatus {
498
+ export function isPbCom1BlockHeightDelta(obj: unknown): obj is PbCom1BlockHeightDelta {
477
499
  const typedObj = obj as any
478
500
  return (
479
501
  (typedObj !== null &&
480
502
  typeof typedObj === "object" ||
481
503
  typeof typedObj === "function") &&
482
- isBlockHeight(typedObj["code"]) as boolean &&
483
- isNicks(typedObj["message"]) as boolean &&
484
- (typedObj["details"] === null ||
485
- isNicks(typedObj["details"]) as boolean)
504
+ typeof typedObj["value"] === "string"
486
505
  )
487
506
  }
488
507
 
489
- export function isPbCom1Base58Hash(obj: unknown): obj is PbCom1Base58Hash {
508
+ export function isPbCom1PageResponse(obj: unknown): obj is PbCom1PageResponse {
490
509
  const typedObj = obj as any
491
510
  return (
492
511
  (typedObj !== null &&
493
512
  typeof typedObj === "object" ||
494
513
  typeof typedObj === "function") &&
495
- isNicks(typedObj["hash"]) as boolean
514
+ typeof typedObj["next_page_token"] === "string"
496
515
  )
497
516
  }
498
517
 
499
- export function isPbCom1PageResponse(obj: unknown): obj is PbCom1PageResponse {
518
+ export function isPbCom1Seed(obj: unknown): obj is PbCom1Seed {
500
519
  const typedObj = obj as any
501
520
  return (
502
521
  (typedObj !== null &&
503
522
  typeof typedObj === "object" ||
504
523
  typeof typedObj === "function") &&
505
- isNicks(typedObj["next_page_token"]) as boolean
524
+ (typeof typedObj["output_source"] === "undefined" ||
525
+ isPbCom1OutputSource(typedObj["output_source"]) as boolean) &&
526
+ (typeof typedObj["recipient"] === "undefined" ||
527
+ isPbCom1Lock(typedObj["recipient"]) as boolean) &&
528
+ (typeof typedObj["timelock_intent"] === "undefined" ||
529
+ isPbCom1TimeLockIntent(typedObj["timelock_intent"]) as boolean) &&
530
+ (typeof typedObj["gift"] === "undefined" ||
531
+ isPbCom1Nicks(typedObj["gift"]) as boolean) &&
532
+ typeof typedObj["parent_hash"] === "string"
506
533
  )
507
534
  }
508
535
 
509
- export function isPbCom1TimeLockIntent(obj: unknown): obj is PbCom1TimeLockIntent {
536
+ export function isPbCom1Base58Pubkey(obj: unknown): obj is PbCom1Base58Pubkey {
510
537
  const typedObj = obj as any
511
538
  return (
512
539
  (typedObj !== null &&
513
540
  typeof typedObj === "object" ||
514
541
  typeof typedObj === "function") &&
515
- (typeof typedObj["value"] === "undefined" ||
516
- (typedObj["value"] !== null &&
517
- typeof typedObj["value"] === "object" ||
518
- typeof typedObj["value"] === "function") &&
519
- isPbCom1TimeLockRangeAbsolute(typedObj["value"]["Absolute"]) as boolean ||
520
- (typedObj["value"] !== null &&
521
- typeof typedObj["value"] === "object" ||
522
- typeof typedObj["value"] === "function") &&
523
- isPbCom1TimeLockRangeRelative(typedObj["value"]["Relative"]) as boolean ||
524
- (typedObj["value"] !== null &&
525
- typeof typedObj["value"] === "object" ||
526
- typeof typedObj["value"] === "function") &&
527
- isPbCom1TimeLockRangeAbsoluteAndRelative(typedObj["value"]["AbsoluteAndRelative"]) as boolean ||
528
- (typedObj["value"] !== null &&
529
- typeof typedObj["value"] === "object" ||
530
- typeof typedObj["value"] === "function") &&
531
- isPbCom1TimeLockRangeNeither(typedObj["value"]["Neither"]) as boolean)
542
+ typeof typedObj["key"] === "string"
532
543
  )
533
544
  }
534
545
 
535
- export function isPbCom1TimeLockRangeAbsoluteAndRelative(obj: unknown): obj is PbCom1TimeLockRangeAbsoluteAndRelative {
546
+ export function isPbCom1WireTag(obj: unknown): obj is PbCom1WireTag {
536
547
  const typedObj = obj as any
537
548
  return (
538
549
  (typedObj !== null &&
539
550
  typeof typedObj === "object" ||
540
551
  typeof typedObj === "function") &&
541
- (typedObj["absolute"] === null ||
542
- isPbCom1TimeLockRangeAbsolute(typedObj["absolute"]) as boolean) &&
543
- (typedObj["relative"] === null ||
544
- isPbCom1TimeLockRangeRelative(typedObj["relative"]) as boolean)
552
+ (typeof typedObj["value"] === "undefined" ||
553
+ (typedObj["value"] !== null &&
554
+ typeof typedObj["value"] === "object" ||
555
+ typeof typedObj["value"] === "function") &&
556
+ typeof typedObj["value"]["Text"] === "string" ||
557
+ (typedObj["value"] !== null &&
558
+ typeof typedObj["value"] === "object" ||
559
+ typeof typedObj["value"] === "function") &&
560
+ isBlockHeight(typedObj["value"]["Number"]) as boolean)
545
561
  )
546
562
  }
547
563
 
548
- export function isPbCom1SchnorrSignature(obj: unknown): obj is PbCom1SchnorrSignature {
564
+ export function isPbCom1BlockHeight(obj: unknown): obj is PbCom1BlockHeight {
549
565
  const typedObj = obj as any
550
566
  return (
551
567
  (typedObj !== null &&
552
568
  typeof typedObj === "object" ||
553
569
  typeof typedObj === "function") &&
554
- (typedObj["chal"] === null ||
555
- isPbCom1EightBelt(typedObj["chal"]) as boolean) &&
556
- (typedObj["sig"] === null ||
557
- isPbCom1EightBelt(typedObj["sig"]) as boolean)
570
+ typeof typedObj["value"] === "string"
558
571
  )
559
572
  }
560
573
 
561
- export function isPbCom1TimeLockRangeAbsolute(obj: unknown): obj is PbCom1TimeLockRangeAbsolute {
574
+ export function isPbCom2SpendCondition(obj: unknown): obj is PbCom2SpendCondition {
562
575
  const typedObj = obj as any
563
576
  return (
564
577
  (typedObj !== null &&
565
578
  typeof typedObj === "object" ||
566
579
  typeof typedObj === "function") &&
567
- (typedObj["min"] === null ||
568
- isPbCom1BlockHeight(typedObj["min"]) as boolean) &&
569
- (typedObj["max"] === null ||
570
- isPbCom1BlockHeight(typedObj["max"]) as boolean)
580
+ Array.isArray(typedObj["primitives"]) &&
581
+ typedObj["primitives"].every((e: any) =>
582
+ isPbCom2LockPrimitive(e) as boolean
583
+ )
571
584
  )
572
585
  }
573
586
 
574
- export function isPbCom2LockMerkleProof(obj: unknown): obj is PbCom2LockMerkleProof {
587
+ export function isPbCom2Note(obj: unknown): obj is PbCom2Note {
575
588
  const typedObj = obj as any
576
589
  return (
577
590
  (typedObj !== null &&
578
591
  typeof typedObj === "object" ||
579
592
  typeof typedObj === "function") &&
580
- (typedObj["spend_condition"] === null ||
581
- isPbCom2SpendCondition(typedObj["spend_condition"]) as boolean) &&
582
- isBlockHeight(typedObj["axis"]) as boolean &&
583
- (typedObj["proof"] === null ||
584
- isPbCom2MerkleProof(typedObj["proof"]) as boolean)
593
+ (typeof typedObj["note_version"] === "undefined" ||
594
+ (typedObj["note_version"] !== null &&
595
+ typeof typedObj["note_version"] === "object" ||
596
+ typeof typedObj["note_version"] === "function") &&
597
+ isPbCom1Note(typedObj["note_version"]["Legacy"]) as boolean ||
598
+ (typedObj["note_version"] !== null &&
599
+ typeof typedObj["note_version"] === "object" ||
600
+ typeof typedObj["note_version"] === "function") &&
601
+ isPbCom2NoteV1(typedObj["note_version"]["V1"]) as boolean)
585
602
  )
586
603
  }
587
604
 
588
- export function isPbCom2PkhLock(obj: unknown): obj is PbCom2PkhLock {
605
+ export function isPbCom2RawTransaction(obj: unknown): obj is PbCom2RawTransaction {
589
606
  const typedObj = obj as any
590
607
  return (
591
608
  (typedObj !== null &&
592
609
  typeof typedObj === "object" ||
593
610
  typeof typedObj === "function") &&
594
- isBlockHeight(typedObj["m"]) as boolean &&
595
- Array.isArray(typedObj["hashes"]) &&
596
- typedObj["hashes"].every((e: any) =>
597
- isNicks(e) as boolean
611
+ (typeof typedObj["version"] === "undefined" ||
612
+ isPbCom1NoteVersion(typedObj["version"]) as boolean) &&
613
+ typeof typedObj["id"] === "string" &&
614
+ Array.isArray(typedObj["spends"]) &&
615
+ typedObj["spends"].every((e: any) =>
616
+ isPbCom2SpendEntry(e) as boolean
598
617
  )
599
618
  )
600
619
  }
601
620
 
602
- export function isPbCom2BalanceEntry(obj: unknown): obj is PbCom2BalanceEntry {
621
+ export function isPbCom2Seed(obj: unknown): obj is PbCom2Seed {
603
622
  const typedObj = obj as any
604
623
  return (
605
624
  (typedObj !== null &&
606
625
  typeof typedObj === "object" ||
607
626
  typeof typedObj === "function") &&
608
- (typeof typedObj["name"] === "undefined" ||
609
- isPbCom1Name(typedObj["name"]) as boolean) &&
610
- (typedObj["note"] === null ||
611
- isPbCom2Note(typedObj["note"]) as boolean)
627
+ (typeof typedObj["output_source"] === "undefined" ||
628
+ isPbCom1Source(typedObj["output_source"]) as boolean) &&
629
+ typeof typedObj["lock_root"] === "string" &&
630
+ (typeof typedObj["note_data"] === "undefined" ||
631
+ isPbCom2NoteData(typedObj["note_data"]) as boolean) &&
632
+ (typeof typedObj["gift"] === "undefined" ||
633
+ isPbCom1Nicks(typedObj["gift"]) as boolean) &&
634
+ typeof typedObj["parent_hash"] === "string"
612
635
  )
613
636
  }
614
637
 
615
- export function isPbCom2SpendCondition(obj: unknown): obj is PbCom2SpendCondition {
638
+ export function isPbCom2Balance(obj: unknown): obj is PbCom2Balance {
616
639
  const typedObj = obj as any
617
640
  return (
618
641
  (typedObj !== null &&
619
642
  typeof typedObj === "object" ||
620
643
  typeof typedObj === "function") &&
621
- Array.isArray(typedObj["primitives"]) &&
622
- typedObj["primitives"].every((e: any) =>
623
- isPbCom2LockPrimitive(e) as boolean
624
- )
644
+ Array.isArray(typedObj["notes"]) &&
645
+ typedObj["notes"].every((e: any) =>
646
+ isPbCom2BalanceEntry(e) as boolean
647
+ ) &&
648
+ (typeof typedObj["height"] === "undefined" ||
649
+ isPbCom1BlockHeight(typedObj["height"]) as boolean) &&
650
+ typeof typedObj["block_id"] === "string" &&
651
+ (typeof typedObj["page"] === "undefined" ||
652
+ isPbCom1PageResponse(typedObj["page"]) as boolean)
625
653
  )
626
654
  }
627
655
 
@@ -631,7 +659,7 @@ export function isPbCom2WitnessSpend(obj: unknown): obj is PbCom2WitnessSpend {
631
659
  (typedObj !== null &&
632
660
  typeof typedObj === "object" ||
633
661
  typeof typedObj === "function") &&
634
- (typedObj["witness"] === null ||
662
+ (typeof typedObj["witness"] === "undefined" ||
635
663
  isPbCom2Witness(typedObj["witness"]) as boolean) &&
636
664
  Array.isArray(typedObj["seeds"]) &&
637
665
  typedObj["seeds"].every((e: any) =>
@@ -642,113 +670,110 @@ export function isPbCom2WitnessSpend(obj: unknown): obj is PbCom2WitnessSpend {
642
670
  )
643
671
  }
644
672
 
645
- export function isPbCom2LegacySpend(obj: unknown): obj is PbCom2LegacySpend {
673
+ export function isPbCom2NoteData(obj: unknown): obj is PbCom2NoteData {
646
674
  const typedObj = obj as any
647
675
  return (
648
676
  (typedObj !== null &&
649
677
  typeof typedObj === "object" ||
650
678
  typeof typedObj === "function") &&
651
- (typeof typedObj["signature"] === "undefined" ||
652
- isPbCom1Signature(typedObj["signature"]) as boolean) &&
653
- Array.isArray(typedObj["seeds"]) &&
654
- typedObj["seeds"].every((e: any) =>
655
- isPbCom2Seed(e) as boolean
656
- ) &&
657
- (typeof typedObj["fee"] === "undefined" ||
658
- isPbCom1Nicks(typedObj["fee"]) as boolean)
679
+ Array.isArray(typedObj["entries"]) &&
680
+ typedObj["entries"].every((e: any) =>
681
+ isPbCom2NoteDataEntry(e) as boolean
682
+ )
659
683
  )
660
684
  }
661
685
 
662
- export function isPbCom2PkhSignature(obj: unknown): obj is PbCom2PkhSignature {
686
+ export function isPbCom2LockMerkleProof(obj: unknown): obj is PbCom2LockMerkleProof {
663
687
  const typedObj = obj as any
664
688
  return (
665
689
  (typedObj !== null &&
666
690
  typeof typedObj === "object" ||
667
691
  typeof typedObj === "function") &&
668
- Array.isArray(typedObj["entries"]) &&
669
- typedObj["entries"].every((e: any) =>
670
- isPbCom2PkhSignatureEntry(e) as boolean
671
- )
692
+ (typeof typedObj["spend_condition"] === "undefined" ||
693
+ isPbCom2SpendCondition(typedObj["spend_condition"]) as boolean) &&
694
+ isBlockHeight(typedObj["axis"]) as boolean &&
695
+ (typeof typedObj["proof"] === "undefined" ||
696
+ isPbCom2MerkleProof(typedObj["proof"]) as boolean)
672
697
  )
673
698
  }
674
699
 
675
- export function isPbCom2PkhSignatureEntry(obj: unknown): obj is PbCom2PkhSignatureEntry {
700
+ export function isPbCom2Spend(obj: unknown): obj is PbCom2Spend {
676
701
  const typedObj = obj as any
677
702
  return (
678
703
  (typedObj !== null &&
679
704
  typeof typedObj === "object" ||
680
705
  typeof typedObj === "function") &&
681
- isNicks(typedObj["hash"]) as boolean &&
682
- (typeof typedObj["pubkey"] === "undefined" ||
683
- isPbCom1SchnorrPubkey(typedObj["pubkey"]) as boolean) &&
684
- (typeof typedObj["signature"] === "undefined" ||
685
- isPbCom1SchnorrSignature(typedObj["signature"]) as boolean)
706
+ (typeof typedObj["spend_kind"] === "undefined" ||
707
+ (typedObj["spend_kind"] !== null &&
708
+ typeof typedObj["spend_kind"] === "object" ||
709
+ typeof typedObj["spend_kind"] === "function") &&
710
+ isPbCom2LegacySpend(typedObj["spend_kind"]["Legacy"]) as boolean ||
711
+ (typedObj["spend_kind"] !== null &&
712
+ typeof typedObj["spend_kind"] === "object" ||
713
+ typeof typedObj["spend_kind"] === "function") &&
714
+ isPbCom2WitnessSpend(typedObj["spend_kind"]["Witness"]) as boolean)
686
715
  )
687
716
  }
688
717
 
689
- export function isPbCom2Witness(obj: unknown): obj is PbCom2Witness {
718
+ export function isPbCom2MerkleProof(obj: unknown): obj is PbCom2MerkleProof {
690
719
  const typedObj = obj as any
691
720
  return (
692
721
  (typedObj !== null &&
693
722
  typeof typedObj === "object" ||
694
723
  typeof typedObj === "function") &&
695
- (typedObj["lock_merkle_proof"] === null ||
696
- isPbCom2LockMerkleProof(typedObj["lock_merkle_proof"]) as boolean) &&
697
- (typedObj["pkh_signature"] === null ||
698
- isPbCom2PkhSignature(typedObj["pkh_signature"]) as boolean) &&
699
- Array.isArray(typedObj["hax"]) &&
700
- typedObj["hax"].every((e: any) =>
701
- isPbCom2HaxPreimage(e) as boolean
724
+ typeof typedObj["root"] === "string" &&
725
+ Array.isArray(typedObj["path"]) &&
726
+ typedObj["path"].every((e: any) =>
727
+ typeof e === "string"
702
728
  )
703
729
  )
704
730
  }
705
731
 
706
- export function isPbCom2Spend(obj: unknown): obj is PbCom2Spend {
732
+ export function isPbCom2BurnLock(obj: unknown): obj is PbCom2BurnLock {
707
733
  const typedObj = obj as any
708
734
  return (
709
735
  (typedObj !== null &&
710
736
  typeof typedObj === "object" ||
711
- typeof typedObj === "function") &&
712
- (typeof typedObj["spend_kind"] === "undefined" ||
713
- (typedObj["spend_kind"] !== null &&
714
- typeof typedObj["spend_kind"] === "object" ||
715
- typeof typedObj["spend_kind"] === "function") &&
716
- isPbCom2LegacySpend(typedObj["spend_kind"]["Legacy"]) as boolean ||
717
- (typedObj["spend_kind"] !== null &&
718
- typeof typedObj["spend_kind"] === "object" ||
719
- typeof typedObj["spend_kind"] === "function") &&
720
- isPbCom2WitnessSpend(typedObj["spend_kind"]["Witness"]) as boolean)
737
+ typeof typedObj === "function")
721
738
  )
722
739
  }
723
740
 
724
- export function isPbCom2Seed(obj: unknown): obj is PbCom2Seed {
741
+ export function isPbCom2BalanceEntry(obj: unknown): obj is PbCom2BalanceEntry {
725
742
  const typedObj = obj as any
726
743
  return (
727
744
  (typedObj !== null &&
728
745
  typeof typedObj === "object" ||
729
746
  typeof typedObj === "function") &&
730
- (typeof typedObj["output_source"] === "undefined" ||
731
- isPbCom1Source(typedObj["output_source"]) as boolean) &&
732
- isNicks(typedObj["lock_root"]) as boolean &&
733
- (typedObj["note_data"] === null ||
734
- isPbCom2NoteData(typedObj["note_data"]) as boolean) &&
735
- (typeof typedObj["gift"] === "undefined" ||
736
- isPbCom1Nicks(typedObj["gift"]) as boolean) &&
737
- isNicks(typedObj["parent_hash"]) as boolean
747
+ (typeof typedObj["name"] === "undefined" ||
748
+ isPbCom1Name(typedObj["name"]) as boolean) &&
749
+ (typeof typedObj["note"] === "undefined" ||
750
+ isPbCom2Note(typedObj["note"]) as boolean)
738
751
  )
739
752
  }
740
753
 
741
- export function isPbCom2NoteDataEntry(obj: unknown): obj is PbCom2NoteDataEntry {
754
+ export function isPbCom2LockPrimitive(obj: unknown): obj is PbCom2LockPrimitive {
742
755
  const typedObj = obj as any
743
756
  return (
744
757
  (typedObj !== null &&
745
758
  typeof typedObj === "object" ||
746
759
  typeof typedObj === "function") &&
747
- isNicks(typedObj["key"]) as boolean &&
748
- Array.isArray(typedObj["blob"]) &&
749
- typedObj["blob"].every((e: any) =>
750
- isBlockHeight(e) as boolean
751
- )
760
+ (typeof typedObj["primitive"] === "undefined" ||
761
+ (typedObj["primitive"] !== null &&
762
+ typeof typedObj["primitive"] === "object" ||
763
+ typeof typedObj["primitive"] === "function") &&
764
+ isPbCom2PkhLock(typedObj["primitive"]["Pkh"]) as boolean ||
765
+ (typedObj["primitive"] !== null &&
766
+ typeof typedObj["primitive"] === "object" ||
767
+ typeof typedObj["primitive"] === "function") &&
768
+ isPbCom2LockTim(typedObj["primitive"]["Tim"]) as boolean ||
769
+ (typedObj["primitive"] !== null &&
770
+ typeof typedObj["primitive"] === "object" ||
771
+ typeof typedObj["primitive"] === "function") &&
772
+ isPbCom2HaxLock(typedObj["primitive"]["Hax"]) as boolean ||
773
+ (typedObj["primitive"] !== null &&
774
+ typeof typedObj["primitive"] === "object" ||
775
+ typeof typedObj["primitive"] === "function") &&
776
+ isPbCom2BurnLock(typedObj["primitive"]["Burn"]) as boolean)
752
777
  )
753
778
  }
754
779
 
@@ -767,179 +792,167 @@ export function isPbCom2HaxPreimage(obj: unknown): obj is PbCom2HaxPreimage {
767
792
  )
768
793
  }
769
794
 
770
- export function isPbCom2LockTim(obj: unknown): obj is PbCom2LockTim {
795
+ export function isPbCom2PkhSignatureEntry(obj: unknown): obj is PbCom2PkhSignatureEntry {
771
796
  const typedObj = obj as any
772
797
  return (
773
798
  (typedObj !== null &&
774
799
  typeof typedObj === "object" ||
775
800
  typeof typedObj === "function") &&
776
- (typeof typedObj["rel"] === "undefined" ||
777
- isPbCom1TimeLockRangeRelative(typedObj["rel"]) as boolean) &&
778
- (typeof typedObj["abs"] === "undefined" ||
779
- isPbCom1TimeLockRangeAbsolute(typedObj["abs"]) as boolean)
801
+ typeof typedObj["hash"] === "string" &&
802
+ (typeof typedObj["pubkey"] === "undefined" ||
803
+ isPbCom1SchnorrPubkey(typedObj["pubkey"]) as boolean) &&
804
+ (typeof typedObj["signature"] === "undefined" ||
805
+ isPbCom1SchnorrSignature(typedObj["signature"]) as boolean)
780
806
  )
781
807
  }
782
808
 
783
- export function isPbCom2NoteV1(obj: unknown): obj is PbCom2NoteV1 {
809
+ export function isPbCom2LegacySpend(obj: unknown): obj is PbCom2LegacySpend {
784
810
  const typedObj = obj as any
785
811
  return (
786
812
  (typedObj !== null &&
787
813
  typeof typedObj === "object" ||
788
814
  typeof typedObj === "function") &&
789
- (typeof typedObj["version"] === "undefined" ||
790
- isPbCom1NoteVersion(typedObj["version"]) as boolean) &&
791
- (typeof typedObj["origin_page"] === "undefined" ||
792
- isPbCom1BlockHeight(typedObj["origin_page"]) as boolean) &&
793
- (typeof typedObj["name"] === "undefined" ||
794
- isPbCom1Name(typedObj["name"]) as boolean) &&
795
- (typedObj["note_data"] === null ||
796
- isPbCom2NoteData(typedObj["note_data"]) as boolean) &&
797
- (typeof typedObj["assets"] === "undefined" ||
798
- isPbCom1Nicks(typedObj["assets"]) as boolean)
815
+ (typeof typedObj["signature"] === "undefined" ||
816
+ isPbCom1Signature(typedObj["signature"]) as boolean) &&
817
+ Array.isArray(typedObj["seeds"]) &&
818
+ typedObj["seeds"].every((e: any) =>
819
+ isPbCom2Seed(e) as boolean
820
+ ) &&
821
+ (typeof typedObj["fee"] === "undefined" ||
822
+ isPbCom1Nicks(typedObj["fee"]) as boolean)
799
823
  )
800
824
  }
801
825
 
802
- export function isPbCom2Note(obj: unknown): obj is PbCom2Note {
826
+ export function isPbCom2NoteDataEntry(obj: unknown): obj is PbCom2NoteDataEntry {
803
827
  const typedObj = obj as any
804
828
  return (
805
829
  (typedObj !== null &&
806
830
  typeof typedObj === "object" ||
807
831
  typeof typedObj === "function") &&
808
- (typeof typedObj["note_version"] === "undefined" ||
809
- (typedObj["note_version"] !== null &&
810
- typeof typedObj["note_version"] === "object" ||
811
- typeof typedObj["note_version"] === "function") &&
812
- isPbCom1Note(typedObj["note_version"]["Legacy"]) as boolean ||
813
- (typedObj["note_version"] !== null &&
814
- typeof typedObj["note_version"] === "object" ||
815
- typeof typedObj["note_version"] === "function") &&
816
- isPbCom2NoteV1(typedObj["note_version"]["V1"]) as boolean)
832
+ typeof typedObj["key"] === "string" &&
833
+ Array.isArray(typedObj["blob"]) &&
834
+ typedObj["blob"].every((e: any) =>
835
+ isBlockHeight(e) as boolean
836
+ )
817
837
  )
818
838
  }
819
839
 
820
- export function isPbCom2MerkleProof(obj: unknown): obj is PbCom2MerkleProof {
840
+ export function isPbCom2SpendEntry(obj: unknown): obj is PbCom2SpendEntry {
821
841
  const typedObj = obj as any
822
842
  return (
823
843
  (typedObj !== null &&
824
844
  typeof typedObj === "object" ||
825
845
  typeof typedObj === "function") &&
826
- isNicks(typedObj["root"]) as boolean &&
827
- Array.isArray(typedObj["path"]) &&
828
- typedObj["path"].every((e: any) =>
829
- isNicks(e) as boolean
830
- )
846
+ (typeof typedObj["name"] === "undefined" ||
847
+ isPbCom1Name(typedObj["name"]) as boolean) &&
848
+ (typeof typedObj["spend"] === "undefined" ||
849
+ isPbCom2Spend(typedObj["spend"]) as boolean)
831
850
  )
832
851
  }
833
852
 
834
- export function isPbCom2HaxLock(obj: unknown): obj is PbCom2HaxLock {
853
+ export function isPbCom2PkhSignature(obj: unknown): obj is PbCom2PkhSignature {
835
854
  const typedObj = obj as any
836
855
  return (
837
856
  (typedObj !== null &&
838
857
  typeof typedObj === "object" ||
839
858
  typeof typedObj === "function") &&
840
- Array.isArray(typedObj["hashes"]) &&
841
- typedObj["hashes"].every((e: any) =>
842
- isPbCom1Hash(e) as boolean
859
+ Array.isArray(typedObj["entries"]) &&
860
+ typedObj["entries"].every((e: any) =>
861
+ isPbCom2PkhSignatureEntry(e) as boolean
843
862
  )
844
863
  )
845
864
  }
846
865
 
847
- export function isPbCom2BurnLock(obj: unknown): obj is PbCom2BurnLock {
866
+ export function isPbCom2HaxLock(obj: unknown): obj is PbCom2HaxLock {
848
867
  const typedObj = obj as any
849
868
  return (
850
869
  (typedObj !== null &&
851
870
  typeof typedObj === "object" ||
852
- typeof typedObj === "function")
871
+ typeof typedObj === "function") &&
872
+ Array.isArray(typedObj["hashes"]) &&
873
+ typedObj["hashes"].every((e: any) =>
874
+ isPbCom1Hash(e) as boolean
875
+ )
853
876
  )
854
877
  }
855
878
 
856
- export function isPbCom2SpendEntry(obj: unknown): obj is PbCom2SpendEntry {
879
+ export function isPbCom2LockTim(obj: unknown): obj is PbCom2LockTim {
857
880
  const typedObj = obj as any
858
881
  return (
859
882
  (typedObj !== null &&
860
883
  typeof typedObj === "object" ||
861
884
  typeof typedObj === "function") &&
862
- (typeof typedObj["name"] === "undefined" ||
863
- isPbCom1Name(typedObj["name"]) as boolean) &&
864
- (typedObj["spend"] === null ||
865
- isPbCom2Spend(typedObj["spend"]) as boolean)
885
+ (typeof typedObj["rel"] === "undefined" ||
886
+ isPbCom1TimeLockRangeRelative(typedObj["rel"]) as boolean) &&
887
+ (typeof typedObj["abs"] === "undefined" ||
888
+ isPbCom1TimeLockRangeAbsolute(typedObj["abs"]) as boolean)
866
889
  )
867
890
  }
868
891
 
869
- export function isPbCom2RawTransaction(obj: unknown): obj is PbCom2RawTransaction {
892
+ export function isPbCom2PkhLock(obj: unknown): obj is PbCom2PkhLock {
870
893
  const typedObj = obj as any
871
894
  return (
872
895
  (typedObj !== null &&
873
896
  typeof typedObj === "object" ||
874
897
  typeof typedObj === "function") &&
875
- (typeof typedObj["version"] === "undefined" ||
876
- isPbCom1NoteVersion(typedObj["version"]) as boolean) &&
877
- isNicks(typedObj["id"]) as boolean &&
878
- Array.isArray(typedObj["spends"]) &&
879
- typedObj["spends"].every((e: any) =>
880
- isPbCom2SpendEntry(e) as boolean
898
+ isBlockHeight(typedObj["m"]) as boolean &&
899
+ Array.isArray(typedObj["hashes"]) &&
900
+ typedObj["hashes"].every((e: any) =>
901
+ typeof e === "string"
881
902
  )
882
903
  )
883
904
  }
884
905
 
885
- export function isPbCom2LockPrimitive(obj: unknown): obj is PbCom2LockPrimitive {
906
+ export function isPbCom2Witness(obj: unknown): obj is PbCom2Witness {
886
907
  const typedObj = obj as any
887
908
  return (
888
909
  (typedObj !== null &&
889
910
  typeof typedObj === "object" ||
890
911
  typeof typedObj === "function") &&
891
- (typeof typedObj["primitive"] === "undefined" ||
892
- (typedObj["primitive"] !== null &&
893
- typeof typedObj["primitive"] === "object" ||
894
- typeof typedObj["primitive"] === "function") &&
895
- isPbCom2PkhLock(typedObj["primitive"]["Pkh"]) as boolean ||
896
- (typedObj["primitive"] !== null &&
897
- typeof typedObj["primitive"] === "object" ||
898
- typeof typedObj["primitive"] === "function") &&
899
- isPbCom2LockTim(typedObj["primitive"]["Tim"]) as boolean ||
900
- (typedObj["primitive"] !== null &&
901
- typeof typedObj["primitive"] === "object" ||
902
- typeof typedObj["primitive"] === "function") &&
903
- isPbCom2HaxLock(typedObj["primitive"]["Hax"]) as boolean ||
904
- (typedObj["primitive"] !== null &&
905
- typeof typedObj["primitive"] === "object" ||
906
- typeof typedObj["primitive"] === "function") &&
907
- isPbCom2BurnLock(typedObj["primitive"]["Burn"]) as boolean)
912
+ (typeof typedObj["lock_merkle_proof"] === "undefined" ||
913
+ isPbCom2LockMerkleProof(typedObj["lock_merkle_proof"]) as boolean) &&
914
+ (typeof typedObj["pkh_signature"] === "undefined" ||
915
+ isPbCom2PkhSignature(typedObj["pkh_signature"]) as boolean) &&
916
+ Array.isArray(typedObj["hax"]) &&
917
+ typedObj["hax"].every((e: any) =>
918
+ isPbCom2HaxPreimage(e) as boolean
919
+ )
908
920
  )
909
921
  }
910
922
 
911
- export function isPbCom2Balance(obj: unknown): obj is PbCom2Balance {
923
+ export function isPbCom2NoteV1(obj: unknown): obj is PbCom2NoteV1 {
912
924
  const typedObj = obj as any
913
925
  return (
914
926
  (typedObj !== null &&
915
927
  typeof typedObj === "object" ||
916
928
  typeof typedObj === "function") &&
917
- Array.isArray(typedObj["notes"]) &&
918
- typedObj["notes"].every((e: any) =>
919
- isPbCom2BalanceEntry(e) as boolean
920
- ) &&
921
- (typeof typedObj["height"] === "undefined" ||
922
- isPbCom1BlockHeight(typedObj["height"]) as boolean) &&
923
- isNicks(typedObj["block_id"]) as boolean &&
924
- (typeof typedObj["page"] === "undefined" ||
925
- isPbCom1PageResponse(typedObj["page"]) as boolean)
929
+ (typeof typedObj["version"] === "undefined" ||
930
+ isPbCom1NoteVersion(typedObj["version"]) as boolean) &&
931
+ (typeof typedObj["origin_page"] === "undefined" ||
932
+ isPbCom1BlockHeight(typedObj["origin_page"]) as boolean) &&
933
+ (typeof typedObj["name"] === "undefined" ||
934
+ isPbCom1Name(typedObj["name"]) as boolean) &&
935
+ (typeof typedObj["note_data"] === "undefined" ||
936
+ isPbCom2NoteData(typedObj["note_data"]) as boolean) &&
937
+ (typeof typedObj["assets"] === "undefined" ||
938
+ isPbCom1Nicks(typedObj["assets"]) as boolean)
926
939
  )
927
940
  }
928
941
 
929
- export function isPbCom2NoteData(obj: unknown): obj is PbCom2NoteData {
942
+ export function isPbPub2WalletSendTransactionRequest(obj: unknown): obj is PbPub2WalletSendTransactionRequest {
930
943
  const typedObj = obj as any
931
944
  return (
932
945
  (typedObj !== null &&
933
946
  typeof typedObj === "object" ||
934
947
  typeof typedObj === "function") &&
935
- Array.isArray(typedObj["entries"]) &&
936
- typedObj["entries"].every((e: any) =>
937
- isPbCom2NoteDataEntry(e) as boolean
938
- )
948
+ (typeof typedObj["tx_id"] === "undefined" ||
949
+ isPbCom1Hash(typedObj["tx_id"]) as boolean) &&
950
+ (typeof typedObj["raw_tx"] === "undefined" ||
951
+ isPbCom2RawTransaction(typedObj["raw_tx"]) as boolean)
939
952
  )
940
953
  }
941
954
 
942
- export function isPbPub2WalletSendTransactionResponse(obj: unknown): obj is PbPub2WalletSendTransactionResponse {
955
+ export function isPbPub2WalletGetBalanceResponse(obj: unknown): obj is PbPub2WalletGetBalanceResponse {
943
956
  const typedObj = obj as any
944
957
  return (
945
958
  (typedObj !== null &&
@@ -949,7 +962,7 @@ export function isPbPub2WalletSendTransactionResponse(obj: unknown): obj is PbPu
949
962
  (typedObj["result"] !== null &&
950
963
  typeof typedObj["result"] === "object" ||
951
964
  typeof typedObj["result"] === "function") &&
952
- isPbCom1Acknowledged(typedObj["result"]["Ack"]) as boolean ||
965
+ isPbCom2Balance(typedObj["result"]["Balance"]) as boolean ||
953
966
  (typedObj["result"] !== null &&
954
967
  typeof typedObj["result"] === "object" ||
955
968
  typeof typedObj["result"] === "function") &&
@@ -957,16 +970,21 @@ export function isPbPub2WalletSendTransactionResponse(obj: unknown): obj is PbPu
957
970
  )
958
971
  }
959
972
 
960
- export function isPbPub2WalletSendTransactionRequest(obj: unknown): obj is PbPub2WalletSendTransactionRequest {
973
+ export function isPbPub2TransactionAcceptedResponse(obj: unknown): obj is PbPub2TransactionAcceptedResponse {
961
974
  const typedObj = obj as any
962
975
  return (
963
976
  (typedObj !== null &&
964
977
  typeof typedObj === "object" ||
965
978
  typeof typedObj === "function") &&
966
- (typeof typedObj["tx_id"] === "undefined" ||
967
- isPbCom1Hash(typedObj["tx_id"]) as boolean) &&
968
- (typeof typedObj["raw_tx"] === "undefined" ||
969
- isPbCom2RawTransaction(typedObj["raw_tx"]) as boolean)
979
+ (typeof typedObj["result"] === "undefined" ||
980
+ (typedObj["result"] !== null &&
981
+ typeof typedObj["result"] === "object" ||
982
+ typeof typedObj["result"] === "function") &&
983
+ typeof typedObj["result"]["Accepted"] === "boolean" ||
984
+ (typedObj["result"] !== null &&
985
+ typeof typedObj["result"] === "object" ||
986
+ typeof typedObj["result"] === "function") &&
987
+ isPbCom1ErrorStatus(typedObj["result"]["Error"]) as boolean)
970
988
  )
971
989
  }
972
990
 
@@ -990,25 +1008,18 @@ export function isPbPub2WalletGetBalanceRequest(obj: unknown): obj is PbPub2Wall
990
1008
  )
991
1009
  }
992
1010
 
993
- export function isPbPub2TransactionAcceptedResponse(obj: unknown): obj is PbPub2TransactionAcceptedResponse {
1011
+ export function isPbPub2TransactionAcceptedRequest(obj: unknown): obj is PbPub2TransactionAcceptedRequest {
994
1012
  const typedObj = obj as any
995
1013
  return (
996
1014
  (typedObj !== null &&
997
1015
  typeof typedObj === "object" ||
998
1016
  typeof typedObj === "function") &&
999
- (typeof typedObj["result"] === "undefined" ||
1000
- (typedObj["result"] !== null &&
1001
- typeof typedObj["result"] === "object" ||
1002
- typeof typedObj["result"] === "function") &&
1003
- typeof typedObj["result"]["Accepted"] === "boolean" ||
1004
- (typedObj["result"] !== null &&
1005
- typeof typedObj["result"] === "object" ||
1006
- typeof typedObj["result"] === "function") &&
1007
- isPbCom1ErrorStatus(typedObj["result"]["Error"]) as boolean)
1017
+ (typeof typedObj["tx_id"] === "undefined" ||
1018
+ isPbCom1Base58Hash(typedObj["tx_id"]) as boolean)
1008
1019
  )
1009
1020
  }
1010
1021
 
1011
- export function isPbPub2WalletGetBalanceResponse(obj: unknown): obj is PbPub2WalletGetBalanceResponse {
1022
+ export function isPbPub2WalletSendTransactionResponse(obj: unknown): obj is PbPub2WalletSendTransactionResponse {
1012
1023
  const typedObj = obj as any
1013
1024
  return (
1014
1025
  (typedObj !== null &&
@@ -1018,7 +1029,7 @@ export function isPbPub2WalletGetBalanceResponse(obj: unknown): obj is PbPub2Wal
1018
1029
  (typedObj["result"] !== null &&
1019
1030
  typeof typedObj["result"] === "object" ||
1020
1031
  typeof typedObj["result"] === "function") &&
1021
- isPbCom2Balance(typedObj["result"]["Balance"]) as boolean ||
1032
+ isPbCom1Acknowledged(typedObj["result"]["Ack"]) as boolean ||
1022
1033
  (typedObj["result"] !== null &&
1023
1034
  typeof typedObj["result"] === "object" ||
1024
1035
  typeof typedObj["result"] === "function") &&
@@ -1026,17 +1037,6 @@ export function isPbPub2WalletGetBalanceResponse(obj: unknown): obj is PbPub2Wal
1026
1037
  )
1027
1038
  }
1028
1039
 
1029
- export function isPbPub2TransactionAcceptedRequest(obj: unknown): obj is PbPub2TransactionAcceptedRequest {
1030
- const typedObj = obj as any
1031
- return (
1032
- (typedObj !== null &&
1033
- typeof typedObj === "object" ||
1034
- typeof typedObj === "function") &&
1035
- (typeof typedObj["tx_id"] === "undefined" ||
1036
- isPbCom1Base58Hash(typedObj["tx_id"]) as boolean)
1037
- )
1038
- }
1039
-
1040
1040
  export function isPbPub2TransactionAcceptedResponseResult(obj: unknown): obj is PbPub2TransactionAcceptedResponseResult {
1041
1041
  const typedObj = obj as any
1042
1042
  return (
@@ -1257,7 +1257,7 @@ export function isPbCom1WireTagValue(obj: unknown): obj is PbCom1WireTagValue {
1257
1257
  ((typedObj !== null &&
1258
1258
  typeof typedObj === "object" ||
1259
1259
  typeof typedObj === "function") &&
1260
- isNicks(typedObj["Text"]) as boolean ||
1260
+ typeof typedObj["Text"] === "string" ||
1261
1261
  (typedObj !== null &&
1262
1262
  typeof typedObj === "object" ||
1263
1263
  typeof typedObj === "function") &&
@@ -1279,17 +1279,34 @@ export function isPbPub2WalletGetBalanceResponseResult(obj: unknown): obj is PbP
1279
1279
  )
1280
1280
  }
1281
1281
 
1282
- export function isMerkleProof(obj: unknown): obj is MerkleProof {
1282
+ export function isSpendV1(obj: unknown): obj is SpendV1 {
1283
+ const typedObj = obj as any
1284
+ return (
1285
+ ((typedObj !== null &&
1286
+ typeof typedObj === "object" ||
1287
+ typeof typedObj === "function") &&
1288
+ typedObj["version"] === 0 &&
1289
+ isSpend0V1(typedObj["spend"]) as boolean ||
1290
+ (typedObj !== null &&
1291
+ typeof typedObj === "object" ||
1292
+ typeof typedObj === "function") &&
1293
+ typedObj["version"] === 1 &&
1294
+ isSpend1V1(typedObj["spend"]) as boolean)
1295
+ )
1296
+ }
1297
+
1298
+ export function isSeedV1(obj: unknown): obj is SeedV1 {
1283
1299
  const typedObj = obj as any
1284
1300
  return (
1285
1301
  (typedObj !== null &&
1286
1302
  typeof typedObj === "object" ||
1287
1303
  typeof typedObj === "function") &&
1288
- isNicks(typedObj["root"]) as boolean &&
1289
- Array.isArray(typedObj["path"]) &&
1290
- typedObj["path"].every((e: any) =>
1291
- isNicks(e) as boolean
1292
- )
1304
+ (typedObj["output_source"] === null ||
1305
+ isSource(typedObj["output_source"]) as boolean) &&
1306
+ isLockRoot(typedObj["lock_root"]) as boolean &&
1307
+ isNoteData(typedObj["note_data"]) as boolean &&
1308
+ isNicks(typedObj["gift"]) as boolean &&
1309
+ isDigest(typedObj["parent_hash"]) as boolean
1293
1310
  )
1294
1311
  }
1295
1312
 
@@ -1304,25 +1321,13 @@ export function isWitness(obj: unknown): obj is Witness {
1304
1321
  Array.isArray(typedObj["hax_map"]) &&
1305
1322
  typedObj["hax_map"].every((e: any) =>
1306
1323
  Array.isArray(e) &&
1307
- isNicks(e[0]) as boolean &&
1324
+ isDigest(e[0]) as boolean &&
1308
1325
  isNoun(e[1]) as boolean
1309
1326
  ) &&
1310
1327
  typedObj["tim"] === null
1311
1328
  )
1312
1329
  }
1313
1330
 
1314
- export function isSpendsV1(obj: unknown): obj is SpendsV1 {
1315
- const typedObj = obj as any
1316
- return (
1317
- Array.isArray(typedObj) &&
1318
- typedObj.every((e: any) =>
1319
- Array.isArray(e) &&
1320
- isName(e[0]) as boolean &&
1321
- isSpendV1(e[1]) as boolean
1322
- )
1323
- )
1324
- }
1325
-
1326
1331
  export function isInputDisplay(obj: unknown): obj is InputDisplay {
1327
1332
  const typedObj = obj as any
1328
1333
  return (
@@ -1349,139 +1354,125 @@ export function isInputDisplay(obj: unknown): obj is InputDisplay {
1349
1354
  )
1350
1355
  }
1351
1356
 
1352
- export function isLockPrimitive(obj: unknown): obj is LockPrimitive {
1357
+ export function isSpendsV1(obj: unknown): obj is SpendsV1 {
1353
1358
  const typedObj = obj as any
1354
1359
  return (
1355
- ((typedObj !== null &&
1356
- typeof typedObj === "object" ||
1357
- typeof typedObj === "function") &&
1358
- isPkh(typedObj["Pkh"]) as boolean ||
1359
- (typedObj !== null &&
1360
- typeof typedObj === "object" ||
1361
- typeof typedObj === "function") &&
1362
- isTimelock(typedObj["Tim"]) as boolean ||
1363
- (typedObj !== null &&
1364
- typeof typedObj === "object" ||
1365
- typeof typedObj === "function") &&
1366
- isHax(typedObj["Hax"]) as boolean ||
1367
- typedObj === "Brn")
1360
+ Array.isArray(typedObj) &&
1361
+ typedObj.every((e: any) =>
1362
+ Array.isArray(e) &&
1363
+ isName(e[0]) as boolean &&
1364
+ isSpendV1(e[1]) as boolean
1365
+ )
1368
1366
  )
1369
1367
  }
1370
1368
 
1371
- export function isSpendV1(obj: unknown): obj is SpendV1 {
1369
+ export function isNoteV1(obj: unknown): obj is NoteV1 {
1372
1370
  const typedObj = obj as any
1373
1371
  return (
1374
- ((typedObj !== null &&
1372
+ (typedObj !== null &&
1375
1373
  typeof typedObj === "object" ||
1376
1374
  typeof typedObj === "function") &&
1377
- typedObj["version"] === 0 &&
1378
- isSpend0V1(typedObj["spend"]) as boolean ||
1379
- (typedObj !== null &&
1380
- typeof typedObj === "object" ||
1381
- typeof typedObj === "function") &&
1382
- typedObj["version"] === 1 &&
1383
- isSpend1V1(typedObj["spend"]) as boolean)
1375
+ isVersion(typedObj["version"]) as boolean &&
1376
+ isBlockHeight(typedObj["origin_page"]) as boolean &&
1377
+ isName(typedObj["name"]) as boolean &&
1378
+ isNoteData(typedObj["note_data"]) as boolean &&
1379
+ isNicks(typedObj["assets"]) as boolean
1384
1380
  )
1385
1381
  }
1386
1382
 
1387
- export function isNoteData(obj: unknown): obj is NoteData {
1383
+ export function isSeedsV1(obj: unknown): obj is SeedsV1 {
1388
1384
  const typedObj = obj as any
1389
1385
  return (
1390
1386
  Array.isArray(typedObj) &&
1391
1387
  typedObj.every((e: any) =>
1392
- Array.isArray(e) &&
1393
- isNicks(e[0]) as boolean &&
1394
- isNoun(e[1]) as boolean
1388
+ isSeedV1(e) as boolean
1395
1389
  )
1396
1390
  )
1397
1391
  }
1398
1392
 
1399
- export function isSpend1V1(obj: unknown): obj is Spend1V1 {
1393
+ export function isTransactionDisplay(obj: unknown): obj is TransactionDisplay {
1400
1394
  const typedObj = obj as any
1401
1395
  return (
1402
1396
  (typedObj !== null &&
1403
1397
  typeof typedObj === "object" ||
1404
1398
  typeof typedObj === "function") &&
1405
- isWitness(typedObj["witness"]) as boolean &&
1406
- isSeedsV1(typedObj["seeds"]) as boolean &&
1407
- isNicks(typedObj["fee"]) as boolean
1399
+ isInputDisplay(typedObj["inputs"]) as boolean &&
1400
+ Array.isArray(typedObj["outputs"]) &&
1401
+ typedObj["outputs"].every((e: any) =>
1402
+ Array.isArray(e) &&
1403
+ isDigest(e[0]) as boolean &&
1404
+ isLockMetadata(e[1]) as boolean
1405
+ )
1408
1406
  )
1409
1407
  }
1410
1408
 
1411
- export function isNoteV1(obj: unknown): obj is NoteV1 {
1409
+ export function isMerkleProof(obj: unknown): obj is MerkleProof {
1412
1410
  const typedObj = obj as any
1413
1411
  return (
1414
1412
  (typedObj !== null &&
1415
1413
  typeof typedObj === "object" ||
1416
1414
  typeof typedObj === "function") &&
1417
- isVersion(typedObj["version"]) as boolean &&
1418
- isBlockHeight(typedObj["origin_page"]) as boolean &&
1419
- isName(typedObj["name"]) as boolean &&
1420
- isNoteData(typedObj["note_data"]) as boolean &&
1421
- isNicks(typedObj["assets"]) as boolean
1415
+ isDigest(typedObj["root"]) as boolean &&
1416
+ Array.isArray(typedObj["path"]) &&
1417
+ typedObj["path"].every((e: any) =>
1418
+ isDigest(e) as boolean
1419
+ )
1422
1420
  )
1423
1421
  }
1424
1422
 
1425
- export function isPkh(obj: unknown): obj is Pkh {
1423
+ export function isSpend1V1(obj: unknown): obj is Spend1V1 {
1426
1424
  const typedObj = obj as any
1427
1425
  return (
1428
1426
  (typedObj !== null &&
1429
1427
  typeof typedObj === "object" ||
1430
1428
  typeof typedObj === "function") &&
1431
- isBlockHeight(typedObj["m"]) as boolean &&
1432
- Array.isArray(typedObj["hashes"]) &&
1433
- typedObj["hashes"].every((e: any) =>
1434
- isNicks(e) as boolean
1435
- )
1429
+ isWitness(typedObj["witness"]) as boolean &&
1430
+ isSeedsV1(typedObj["seeds"]) as boolean &&
1431
+ isNicks(typedObj["fee"]) as boolean
1436
1432
  )
1437
1433
  }
1438
1434
 
1439
- export function isPkhSignature(obj: unknown): obj is PkhSignature {
1435
+ export function isLockMerkleProof(obj: unknown): obj is LockMerkleProof {
1440
1436
  const typedObj = obj as any
1441
1437
  return (
1442
- Array.isArray(typedObj) &&
1443
- typedObj.every((e: any) =>
1444
- Array.isArray(e) &&
1445
- isNicks(e[0]) as boolean &&
1446
- Array.isArray(e[1]) &&
1447
- isNicks(e[1][0]) as boolean &&
1448
- isSignature(e[1][1]) as boolean
1449
- )
1438
+ (typedObj !== null &&
1439
+ typeof typedObj === "object" ||
1440
+ typeof typedObj === "function") &&
1441
+ isSpendCondition(typedObj["spend_condition"]) as boolean &&
1442
+ isBlockHeight(typedObj["axis"]) as boolean &&
1443
+ isMerkleProof(typedObj["proof"]) as boolean
1450
1444
  )
1451
1445
  }
1452
1446
 
1453
- export function isLockRoot(obj: unknown): obj is LockRoot {
1447
+ export function isRawTxV1(obj: unknown): obj is RawTxV1 {
1454
1448
  const typedObj = obj as any
1455
1449
  return (
1456
- ((typedObj !== null &&
1450
+ (typedObj !== null &&
1457
1451
  typeof typedObj === "object" ||
1458
1452
  typeof typedObj === "function") &&
1459
- isNicks(typedObj["Hash"]) as boolean ||
1460
- (typedObj !== null &&
1461
- typeof typedObj === "object" ||
1462
- typeof typedObj === "function") &&
1463
- isSpendCondition(typedObj["Lock"]) as boolean)
1453
+ typedObj["version"] === 1 &&
1454
+ isDigest(typedObj["id"]) as boolean &&
1455
+ isSpendsV1(typedObj["spends"]) as boolean
1464
1456
  )
1465
1457
  }
1466
1458
 
1467
- export function isSpendCondition(obj: unknown): obj is SpendCondition {
1459
+ export function isHax(obj: unknown): obj is Hax {
1468
1460
  const typedObj = obj as any
1469
1461
  return (
1470
1462
  Array.isArray(typedObj) &&
1471
1463
  typedObj.every((e: any) =>
1472
- isLockPrimitive(e) as boolean
1464
+ isDigest(e) as boolean
1473
1465
  )
1474
1466
  )
1475
1467
  }
1476
1468
 
1477
- export function isLockMetadata(obj: unknown): obj is LockMetadata {
1469
+ export function isSpendCondition(obj: unknown): obj is SpendCondition {
1478
1470
  const typedObj = obj as any
1479
1471
  return (
1480
- (typedObj !== null &&
1481
- typeof typedObj === "object" ||
1482
- typeof typedObj === "function") &&
1483
- isSpendCondition(typedObj["lock"]) as boolean &&
1484
- typeof typedObj["include_data"] === "boolean"
1472
+ Array.isArray(typedObj) &&
1473
+ typedObj.every((e: any) =>
1474
+ isLockPrimitive(e) as boolean
1475
+ )
1485
1476
  )
1486
1477
  }
1487
1478
 
@@ -1497,40 +1488,36 @@ export function isSpend0V1(obj: unknown): obj is Spend0V1 {
1497
1488
  )
1498
1489
  }
1499
1490
 
1500
- export function isLockMerkleProof(obj: unknown): obj is LockMerkleProof {
1491
+ export function isLockPrimitive(obj: unknown): obj is LockPrimitive {
1501
1492
  const typedObj = obj as any
1502
1493
  return (
1503
- (typedObj !== null &&
1494
+ ((typedObj !== null &&
1504
1495
  typeof typedObj === "object" ||
1505
1496
  typeof typedObj === "function") &&
1506
- isSpendCondition(typedObj["spend_condition"]) as boolean &&
1507
- isBlockHeight(typedObj["axis"]) as boolean &&
1508
- isMerkleProof(typedObj["proof"]) as boolean
1509
- )
1510
- }
1511
-
1512
- export function isHax(obj: unknown): obj is Hax {
1513
- const typedObj = obj as any
1514
- return (
1515
- Array.isArray(typedObj) &&
1516
- typedObj.every((e: any) =>
1517
- isNicks(e) as boolean
1518
- )
1497
+ isPkh(typedObj["Pkh"]) as boolean ||
1498
+ (typedObj !== null &&
1499
+ typeof typedObj === "object" ||
1500
+ typeof typedObj === "function") &&
1501
+ isTimelock(typedObj["Tim"]) as boolean ||
1502
+ (typedObj !== null &&
1503
+ typeof typedObj === "object" ||
1504
+ typeof typedObj === "function") &&
1505
+ isHax(typedObj["Hax"]) as boolean ||
1506
+ typedObj === "Brn")
1519
1507
  )
1520
1508
  }
1521
1509
 
1522
- export function isTransactionDisplay(obj: unknown): obj is TransactionDisplay {
1510
+ export function isWitnessData(obj: unknown): obj is WitnessData {
1523
1511
  const typedObj = obj as any
1524
1512
  return (
1525
1513
  (typedObj !== null &&
1526
1514
  typeof typedObj === "object" ||
1527
1515
  typeof typedObj === "function") &&
1528
- isInputDisplay(typedObj["inputs"]) as boolean &&
1529
- Array.isArray(typedObj["outputs"]) &&
1530
- typedObj["outputs"].every((e: any) =>
1516
+ Array.isArray(typedObj["data"]) &&
1517
+ typedObj["data"].every((e: any) =>
1531
1518
  Array.isArray(e) &&
1532
- isNicks(e[0]) as boolean &&
1533
- isLockMetadata(e[1]) as boolean
1519
+ isName(e[0]) as boolean &&
1520
+ isWitness(e[1]) as boolean
1534
1521
  )
1535
1522
  )
1536
1523
  }
@@ -1542,233 +1529,158 @@ export function isNockchainTx(obj: unknown): obj is NockchainTx {
1542
1529
  typeof typedObj === "object" ||
1543
1530
  typeof typedObj === "function") &&
1544
1531
  isVersion(typedObj["version"]) as boolean &&
1545
- isNicks(typedObj["id"]) as boolean &&
1532
+ isDigest(typedObj["id"]) as boolean &&
1546
1533
  isSpendsV1(typedObj["spends"]) as boolean &&
1547
1534
  isTransactionDisplay(typedObj["display"]) as boolean &&
1548
1535
  isWitnessData(typedObj["witness_data"]) as boolean
1549
1536
  )
1550
1537
  }
1551
1538
 
1552
- export function isWitnessData(obj: unknown): obj is WitnessData {
1539
+ export function isLockRoot(obj: unknown): obj is LockRoot {
1553
1540
  const typedObj = obj as any
1554
1541
  return (
1555
- (typedObj !== null &&
1542
+ ((typedObj !== null &&
1556
1543
  typeof typedObj === "object" ||
1557
1544
  typeof typedObj === "function") &&
1558
- Array.isArray(typedObj["data"]) &&
1559
- typedObj["data"].every((e: any) =>
1560
- Array.isArray(e) &&
1561
- isName(e[0]) as boolean &&
1562
- isWitness(e[1]) as boolean
1563
- )
1564
- )
1565
- }
1566
-
1567
- export function isSeedsV1(obj: unknown): obj is SeedsV1 {
1568
- const typedObj = obj as any
1569
- return (
1570
- Array.isArray(typedObj) &&
1571
- typedObj.every((e: any) =>
1572
- isSeedV1(e) as boolean
1573
- )
1545
+ isDigest(typedObj["Hash"]) as boolean ||
1546
+ (typedObj !== null &&
1547
+ typeof typedObj === "object" ||
1548
+ typeof typedObj === "function") &&
1549
+ isSpendCondition(typedObj["Lock"]) as boolean)
1574
1550
  )
1575
1551
  }
1576
1552
 
1577
- export function isRawTxV1(obj: unknown): obj is RawTxV1 {
1553
+ export function isLockMetadata(obj: unknown): obj is LockMetadata {
1578
1554
  const typedObj = obj as any
1579
1555
  return (
1580
1556
  (typedObj !== null &&
1581
1557
  typeof typedObj === "object" ||
1582
1558
  typeof typedObj === "function") &&
1583
- typedObj["version"] === 1 &&
1584
- isNicks(typedObj["id"]) as boolean &&
1585
- isSpendsV1(typedObj["spends"]) as boolean
1559
+ isSpendCondition(typedObj["lock"]) as boolean &&
1560
+ typeof typedObj["include_data"] === "boolean"
1586
1561
  )
1587
1562
  }
1588
1563
 
1589
- export function isSeedV1(obj: unknown): obj is SeedV1 {
1564
+ export function isPkh(obj: unknown): obj is Pkh {
1590
1565
  const typedObj = obj as any
1591
1566
  return (
1592
1567
  (typedObj !== null &&
1593
1568
  typeof typedObj === "object" ||
1594
1569
  typeof typedObj === "function") &&
1595
- (typedObj["output_source"] === null ||
1596
- isSource(typedObj["output_source"]) as boolean) &&
1597
- isLockRoot(typedObj["lock_root"]) as boolean &&
1598
- isNoteData(typedObj["note_data"]) as boolean &&
1599
- isNicks(typedObj["gift"]) as boolean &&
1600
- isNicks(typedObj["parent_hash"]) as boolean
1570
+ isBlockHeight(typedObj["m"]) as boolean &&
1571
+ Array.isArray(typedObj["hashes"]) &&
1572
+ typedObj["hashes"].every((e: any) =>
1573
+ isDigest(e) as boolean
1574
+ )
1601
1575
  )
1602
1576
  }
1603
1577
 
1604
- export function isTxEngineSettings(obj: unknown): obj is TxEngineSettings {
1578
+ export function isPkhSignature(obj: unknown): obj is PkhSignature {
1605
1579
  const typedObj = obj as any
1606
1580
  return (
1607
- (typedObj !== null &&
1608
- typeof typedObj === "object" ||
1609
- typeof typedObj === "function") &&
1610
- isVersion(typedObj["tx_engine_version"]) as boolean &&
1611
- isBlockHeight(typedObj["tx_engine_patch"]) as boolean &&
1612
- isNicks(typedObj["min_fee"]) as boolean &&
1613
- isNicks(typedObj["cost_per_word"]) as boolean &&
1614
- isBlockHeight(typedObj["witness_word_div"]) as boolean
1581
+ Array.isArray(typedObj) &&
1582
+ typedObj.every((e: any) =>
1583
+ Array.isArray(e) &&
1584
+ isDigest(e[0]) as boolean &&
1585
+ Array.isArray(e[1]) &&
1586
+ isPublicKey(e[1][0]) as boolean &&
1587
+ isSignature(e[1][1]) as boolean
1588
+ )
1615
1589
  )
1616
1590
  }
1617
1591
 
1618
- export function isRawTx(obj: unknown): obj is RawTx {
1592
+ export function isNoteData(obj: unknown): obj is NoteData {
1619
1593
  const typedObj = obj as any
1620
1594
  return (
1621
- (isRawTxV1(typedObj) as boolean ||
1622
- isRawTxV0(typedObj) as boolean)
1595
+ Array.isArray(typedObj) &&
1596
+ typedObj.every((e: any) =>
1597
+ Array.isArray(e) &&
1598
+ typeof e[0] === "string" &&
1599
+ isNoun(e[1]) as boolean
1600
+ )
1623
1601
  )
1624
1602
  }
1625
1603
 
1626
- export function isSeedV0(obj: unknown): obj is SeedV0 {
1604
+ export function isVersion(obj: unknown): obj is Version {
1627
1605
  const typedObj = obj as any
1628
1606
  return (
1629
- (typedObj !== null &&
1630
- typeof typedObj === "object" ||
1631
- typeof typedObj === "function") &&
1632
- (typedObj["output_source"] === null ||
1633
- isSource(typedObj["output_source"]) as boolean) &&
1634
- isSig(typedObj["recipient"]) as boolean &&
1635
- isTimelockIntent(typedObj["timelock_intent"]) as boolean &&
1636
- isNicks(typedObj["gift"]) as boolean &&
1637
- isNicks(typedObj["parent_hash"]) as boolean
1607
+ (typedObj === 0 ||
1608
+ typedObj === 2 ||
1609
+ typedObj === 1)
1638
1610
  )
1639
1611
  }
1640
1612
 
1641
- export function isNoteV0(obj: unknown): obj is NoteV0 {
1613
+ export function isName(obj: unknown): obj is Name {
1642
1614
  const typedObj = obj as any
1643
1615
  return (
1644
1616
  (typedObj !== null &&
1645
1617
  typeof typedObj === "object" ||
1646
1618
  typeof typedObj === "function") &&
1647
- isNoteInner(typedObj["inner"]) as boolean &&
1648
- isName(typedObj["name"]) as boolean &&
1649
- isSig(typedObj["sig"]) as boolean &&
1650
- isSource(typedObj["source"]) as boolean &&
1651
- isNicks(typedObj["assets"]) as boolean
1619
+ isDigest(typedObj["first"]) as boolean &&
1620
+ isDigest(typedObj["last"]) as boolean &&
1621
+ isBlockHeight(typedObj["_sig"]) as boolean
1652
1622
  )
1653
1623
  }
1654
1624
 
1655
- export function isSpendV0(obj: unknown): obj is SpendV0 {
1625
+ export function isNote(obj: unknown): obj is Note {
1656
1626
  const typedObj = obj as any
1657
1627
  return (
1658
- (typedObj !== null &&
1659
- typeof typedObj === "object" ||
1660
- typeof typedObj === "function") &&
1661
- (typedObj["signature"] === null ||
1662
- isLegacySignature(typedObj["signature"]) as boolean) &&
1663
- isSeedsV0(typedObj["seeds"]) as boolean &&
1664
- isNicks(typedObj["fee"]) as boolean
1628
+ (isNoteV1(typedObj) as boolean ||
1629
+ isNoteV0(typedObj) as boolean)
1665
1630
  )
1666
1631
  }
1667
1632
 
1668
- export function isInputs(obj: unknown): obj is Inputs {
1633
+ export function isBalance(obj: unknown): obj is Balance {
1669
1634
  const typedObj = obj as any
1670
1635
  return (
1671
1636
  Array.isArray(typedObj) &&
1672
1637
  typedObj.every((e: any) =>
1673
1638
  Array.isArray(e) &&
1674
1639
  isName(e[0]) as boolean &&
1675
- isInput(e[1]) as boolean
1676
- )
1677
- )
1678
- }
1679
-
1680
- export function isSeedsV0(obj: unknown): obj is SeedsV0 {
1681
- const typedObj = obj as any
1682
- return (
1683
- Array.isArray(typedObj) &&
1684
- typedObj.every((e: any) =>
1685
- isSeedV0(e) as boolean
1640
+ isNote(e[1]) as boolean
1686
1641
  )
1687
1642
  )
1688
1643
  }
1689
1644
 
1690
- export function isNoteInner(obj: unknown): obj is NoteInner {
1691
- const typedObj = obj as any
1692
- return (
1693
- (typedObj !== null &&
1694
- typeof typedObj === "object" ||
1695
- typeof typedObj === "function") &&
1696
- isVersion(typedObj["version"]) as boolean &&
1697
- isBlockHeight(typedObj["origin_page"]) as boolean &&
1698
- isTimelockIntent(typedObj["timelock"]) as boolean
1699
- )
1700
- }
1701
-
1702
- export function isRawTxV0(obj: unknown): obj is RawTxV0 {
1703
- const typedObj = obj as any
1704
- return (
1705
- (typedObj !== null &&
1706
- typeof typedObj === "object" ||
1707
- typeof typedObj === "function") &&
1708
- isNicks(typedObj["id"]) as boolean &&
1709
- isInputs(typedObj["inputs"]) as boolean &&
1710
- isTimelockRange(typedObj["timelock_range"]) as boolean &&
1711
- isNicks(typedObj["total_fees"]) as boolean
1712
- )
1713
- }
1714
-
1715
- export function isSig(obj: unknown): obj is Sig {
1645
+ export function isBalanceUpdate(obj: unknown): obj is BalanceUpdate {
1716
1646
  const typedObj = obj as any
1717
1647
  return (
1718
1648
  (typedObj !== null &&
1719
1649
  typeof typedObj === "object" ||
1720
1650
  typeof typedObj === "function") &&
1721
- isBlockHeight(typedObj["m"]) as boolean &&
1722
- Array.isArray(typedObj["pubkeys"]) &&
1723
- typedObj["pubkeys"].every((e: any) =>
1724
- isNicks(e) as boolean
1725
- )
1651
+ isBlockHeight(typedObj["height"]) as boolean &&
1652
+ isDigest(typedObj["block_id"]) as boolean &&
1653
+ isBalance(typedObj["notes"]) as boolean
1726
1654
  )
1727
1655
  }
1728
1656
 
1729
- export function isInput(obj: unknown): obj is Input {
1657
+ export function isTimelockRange(obj: unknown): obj is TimelockRange {
1730
1658
  const typedObj = obj as any
1731
1659
  return (
1732
1660
  (typedObj !== null &&
1733
1661
  typeof typedObj === "object" ||
1734
1662
  typeof typedObj === "function") &&
1735
- isNoteV0(typedObj["note"]) as boolean &&
1736
- isSpendV0(typedObj["spend"]) as boolean
1663
+ (typedObj["min"] === null ||
1664
+ isBlockHeight(typedObj["min"]) as boolean) &&
1665
+ (typedObj["max"] === null ||
1666
+ isBlockHeight(typedObj["max"]) as boolean)
1737
1667
  )
1738
1668
  }
1739
1669
 
1740
- export function isTimelock(obj: unknown): obj is Timelock {
1670
+ export function isSource(obj: unknown): obj is Source {
1741
1671
  const typedObj = obj as any
1742
1672
  return (
1743
1673
  (typedObj !== null &&
1744
1674
  typeof typedObj === "object" ||
1745
1675
  typeof typedObj === "function") &&
1746
- isTimelockRange(typedObj["rel"]) as boolean &&
1747
- isTimelockRange(typedObj["abs"]) as boolean
1748
- )
1749
- }
1750
-
1751
- export function isLegacySignature(obj: unknown): obj is LegacySignature {
1752
- const typedObj = obj as any
1753
- return (
1754
- Array.isArray(typedObj) &&
1755
- typedObj.every((e: any) =>
1756
- Array.isArray(e) &&
1757
- isNicks(e[0]) as boolean &&
1758
- isSignature(e[1]) as boolean
1759
- )
1676
+ isDigest(typedObj["hash"]) as boolean &&
1677
+ typeof typedObj["is_coinbase"] === "boolean"
1760
1678
  )
1761
1679
  }
1762
1680
 
1763
- export function isTimelockIntent(obj: unknown): obj is TimelockIntent {
1764
- const typedObj = obj as any
1765
- return (
1766
- (typedObj !== null &&
1767
- typeof typedObj === "object" ||
1768
- typeof typedObj === "function") &&
1769
- (typedObj["tim"] === null ||
1770
- isTimelock(typedObj["tim"]) as boolean)
1771
- )
1681
+ export function isNicks(obj: unknown): obj is Nicks {
1682
+ const typedObj = obj as any;
1683
+ return (typeof typedObj === "string" && /^[0-9]*$/.test(typedObj));
1772
1684
  }
1773
1685
 
1774
1686
  export function isMissingUnlocks(obj: unknown): obj is MissingUnlocks {
@@ -1784,7 +1696,7 @@ export function isMissingUnlocks(obj: unknown): obj is MissingUnlocks {
1784
1696
  isBlockHeight(typedObj["Pkh"]["num_sigs"]) as boolean &&
1785
1697
  Array.isArray(typedObj["Pkh"]["sig_of"]) &&
1786
1698
  typedObj["Pkh"]["sig_of"].every((e: any) =>
1787
- isNicks(e) as boolean
1699
+ isDigest(e) as boolean
1788
1700
  ) ||
1789
1701
  (typedObj !== null &&
1790
1702
  typeof typedObj === "object" ||
@@ -1794,7 +1706,7 @@ export function isMissingUnlocks(obj: unknown): obj is MissingUnlocks {
1794
1706
  typeof typedObj["Hax"] === "function") &&
1795
1707
  Array.isArray(typedObj["Hax"]["preimages_for"]) &&
1796
1708
  typedObj["Hax"]["preimages_for"].every((e: any) =>
1797
- isNicks(e) as boolean
1709
+ isDigest(e) as boolean
1798
1710
  ) ||
1799
1711
  (typedObj !== null &&
1800
1712
  typeof typedObj === "object" ||
@@ -1805,99 +1717,178 @@ export function isMissingUnlocks(obj: unknown): obj is MissingUnlocks {
1805
1717
  isBlockHeight(typedObj["Sig"]["num_sigs"]) as boolean &&
1806
1718
  Array.isArray(typedObj["Sig"]["sig_of"]) &&
1807
1719
  typedObj["Sig"]["sig_of"].every((e: any) =>
1808
- isNicks(e) as boolean
1720
+ isPublicKey(e) as boolean
1809
1721
  ))
1810
1722
  )
1811
1723
  }
1812
1724
 
1813
- export function isBalanceUpdate(obj: unknown): obj is BalanceUpdate {
1725
+ export function isTxEngineSettings(obj: unknown): obj is TxEngineSettings {
1814
1726
  const typedObj = obj as any
1815
1727
  return (
1816
1728
  (typedObj !== null &&
1817
1729
  typeof typedObj === "object" ||
1818
1730
  typeof typedObj === "function") &&
1819
- isBlockHeight(typedObj["height"]) as boolean &&
1820
- isNicks(typedObj["block_id"]) as boolean &&
1821
- isBalance(typedObj["notes"]) as boolean
1731
+ isVersion(typedObj["tx_engine_version"]) as boolean &&
1732
+ isBlockHeight(typedObj["tx_engine_patch"]) as boolean &&
1733
+ isNicks(typedObj["min_fee"]) as boolean &&
1734
+ isNicks(typedObj["cost_per_word"]) as boolean &&
1735
+ isBlockHeight(typedObj["witness_word_div"]) as boolean
1822
1736
  )
1823
1737
  }
1824
1738
 
1825
- export function isNote(obj: unknown): obj is Note {
1739
+ export function isRawTx(obj: unknown): obj is RawTx {
1826
1740
  const typedObj = obj as any
1827
1741
  return (
1828
- (isNoteV1(typedObj) as boolean ||
1829
- isNoteV0(typedObj) as boolean)
1742
+ (isRawTxV1(typedObj) as boolean ||
1743
+ isRawTxV0(typedObj) as boolean)
1830
1744
  )
1831
1745
  }
1832
1746
 
1833
- export function isSource(obj: unknown): obj is Source {
1747
+ export function isInputs(obj: unknown): obj is Inputs {
1748
+ const typedObj = obj as any
1749
+ return (
1750
+ Array.isArray(typedObj) &&
1751
+ typedObj.every((e: any) =>
1752
+ Array.isArray(e) &&
1753
+ isName(e[0]) as boolean &&
1754
+ isInput(e[1]) as boolean
1755
+ )
1756
+ )
1757
+ }
1758
+
1759
+ export function isTimelock(obj: unknown): obj is Timelock {
1834
1760
  const typedObj = obj as any
1835
1761
  return (
1836
1762
  (typedObj !== null &&
1837
1763
  typeof typedObj === "object" ||
1838
1764
  typeof typedObj === "function") &&
1839
- isNicks(typedObj["hash"]) as boolean &&
1840
- typeof typedObj["is_coinbase"] === "boolean"
1765
+ isTimelockRange(typedObj["rel"]) as boolean &&
1766
+ isTimelockRange(typedObj["abs"]) as boolean
1841
1767
  )
1842
1768
  }
1843
1769
 
1844
- export function isTimelockRange(obj: unknown): obj is TimelockRange {
1770
+ export function isTimelockIntent(obj: unknown): obj is TimelockIntent {
1845
1771
  const typedObj = obj as any
1846
1772
  return (
1847
1773
  (typedObj !== null &&
1848
1774
  typeof typedObj === "object" ||
1849
1775
  typeof typedObj === "function") &&
1850
- (typedObj["min"] === null ||
1851
- isBlockHeight(typedObj["min"]) as boolean) &&
1852
- (typedObj["max"] === null ||
1853
- isBlockHeight(typedObj["max"]) as boolean)
1776
+ (typedObj["tim"] === null ||
1777
+ isTimelock(typedObj["tim"]) as boolean)
1854
1778
  )
1855
1779
  }
1856
1780
 
1857
- export function isNicks(obj: unknown): obj is Nicks {
1781
+ export function isNoteV0(obj: unknown): obj is NoteV0 {
1782
+ const typedObj = obj as any
1783
+ return (
1784
+ (typedObj !== null &&
1785
+ typeof typedObj === "object" ||
1786
+ typeof typedObj === "function") &&
1787
+ isNoteInner(typedObj["inner"]) as boolean &&
1788
+ isName(typedObj["name"]) as boolean &&
1789
+ isSig(typedObj["sig"]) as boolean &&
1790
+ isSource(typedObj["source"]) as boolean &&
1791
+ isNicks(typedObj["assets"]) as boolean
1792
+ )
1793
+ }
1794
+
1795
+ export function isNoteInner(obj: unknown): obj is NoteInner {
1858
1796
  const typedObj = obj as any
1859
1797
  return (
1860
- typeof typedObj === "string"
1798
+ (typedObj !== null &&
1799
+ typeof typedObj === "object" ||
1800
+ typeof typedObj === "function") &&
1801
+ isVersion(typedObj["version"]) as boolean &&
1802
+ isBlockHeight(typedObj["origin_page"]) as boolean &&
1803
+ isTimelockIntent(typedObj["timelock"]) as boolean
1861
1804
  )
1862
1805
  }
1863
1806
 
1864
- export function isBalance(obj: unknown): obj is Balance {
1807
+ export function isRawTxV0(obj: unknown): obj is RawTxV0 {
1808
+ const typedObj = obj as any
1809
+ return (
1810
+ (typedObj !== null &&
1811
+ typeof typedObj === "object" ||
1812
+ typeof typedObj === "function") &&
1813
+ isDigest(typedObj["id"]) as boolean &&
1814
+ isInputs(typedObj["inputs"]) as boolean &&
1815
+ isTimelockRange(typedObj["timelock_range"]) as boolean &&
1816
+ isNicks(typedObj["total_fees"]) as boolean
1817
+ )
1818
+ }
1819
+
1820
+ export function isLegacySignature(obj: unknown): obj is LegacySignature {
1865
1821
  const typedObj = obj as any
1866
1822
  return (
1867
1823
  Array.isArray(typedObj) &&
1868
1824
  typedObj.every((e: any) =>
1869
1825
  Array.isArray(e) &&
1870
- isName(e[0]) as boolean &&
1871
- isNote(e[1]) as boolean
1826
+ isPublicKey(e[0]) as boolean &&
1827
+ isSignature(e[1]) as boolean
1872
1828
  )
1873
1829
  )
1874
1830
  }
1875
1831
 
1876
- export function isName(obj: unknown): obj is Name {
1832
+ export function isSeedsV0(obj: unknown): obj is SeedsV0 {
1833
+ const typedObj = obj as any
1834
+ return (
1835
+ Array.isArray(typedObj) &&
1836
+ typedObj.every((e: any) =>
1837
+ isSeedV0(e) as boolean
1838
+ )
1839
+ )
1840
+ }
1841
+
1842
+ export function isSpendV0(obj: unknown): obj is SpendV0 {
1877
1843
  const typedObj = obj as any
1878
1844
  return (
1879
1845
  (typedObj !== null &&
1880
1846
  typeof typedObj === "object" ||
1881
1847
  typeof typedObj === "function") &&
1882
- isNicks(typedObj["first"]) as boolean &&
1883
- isNicks(typedObj["last"]) as boolean &&
1884
- isBlockHeight(typedObj["_sig"]) as boolean
1848
+ (typedObj["signature"] === null ||
1849
+ isLegacySignature(typedObj["signature"]) as boolean) &&
1850
+ isSeedsV0(typedObj["seeds"]) as boolean &&
1851
+ isNicks(typedObj["fee"]) as boolean
1885
1852
  )
1886
1853
  }
1887
1854
 
1888
- export function isVersion(obj: unknown): obj is Version {
1855
+ export function isInput(obj: unknown): obj is Input {
1889
1856
  const typedObj = obj as any
1890
1857
  return (
1891
- (typedObj === 0 ||
1892
- typedObj === 2 ||
1893
- typedObj === 1)
1858
+ (typedObj !== null &&
1859
+ typeof typedObj === "object" ||
1860
+ typeof typedObj === "function") &&
1861
+ isNoteV0(typedObj["note"]) as boolean &&
1862
+ isSpendV0(typedObj["spend"]) as boolean
1894
1863
  )
1895
1864
  }
1896
1865
 
1897
- export function isPublicKey(obj: unknown): obj is PublicKey {
1866
+ export function isSeedV0(obj: unknown): obj is SeedV0 {
1867
+ const typedObj = obj as any
1868
+ return (
1869
+ (typedObj !== null &&
1870
+ typeof typedObj === "object" ||
1871
+ typeof typedObj === "function") &&
1872
+ (typedObj["output_source"] === null ||
1873
+ isSource(typedObj["output_source"]) as boolean) &&
1874
+ isSig(typedObj["recipient"]) as boolean &&
1875
+ isTimelockIntent(typedObj["timelock_intent"]) as boolean &&
1876
+ isNicks(typedObj["gift"]) as boolean &&
1877
+ isDigest(typedObj["parent_hash"]) as boolean
1878
+ )
1879
+ }
1880
+
1881
+ export function isSig(obj: unknown): obj is Sig {
1898
1882
  const typedObj = obj as any
1899
1883
  return (
1900
- typeof typedObj === "string"
1884
+ (typedObj !== null &&
1885
+ typeof typedObj === "object" ||
1886
+ typeof typedObj === "function") &&
1887
+ isBlockHeight(typedObj["m"]) as boolean &&
1888
+ Array.isArray(typedObj["pubkeys"]) &&
1889
+ typedObj["pubkeys"].every((e: any) =>
1890
+ isPublicKey(e) as boolean
1891
+ )
1901
1892
  )
1902
1893
  }
1903
1894
 
@@ -1907,32 +1898,33 @@ export function isSignature(obj: unknown): obj is Signature {
1907
1898
  (typedObj !== null &&
1908
1899
  typeof typedObj === "object" ||
1909
1900
  typeof typedObj === "function") &&
1910
- isNicks(typedObj["c"]) as boolean &&
1911
- isNicks(typedObj["s"]) as boolean
1901
+ typeof typedObj["c"] === "string" &&
1902
+ typeof typedObj["s"] === "string"
1912
1903
  )
1913
1904
  }
1914
1905
 
1906
+ export function isPublicKey(obj: unknown): obj is PublicKey {
1907
+ const typedObj = obj as any;
1908
+ return (typeof typedObj === "string" && /^[A-HJ-NP-Za-km-z2-9][A-HJ-NP-Za-km-z1-9]*$/.test(typedObj));
1909
+ }
1910
+
1915
1911
  export function isNoun(obj: unknown): obj is Noun {
1916
1912
  const typedObj = obj as any
1917
1913
  return (
1918
- (isNicks(typedObj) as boolean ||
1914
+ (typeof typedObj === "string" ||
1919
1915
  Array.isArray(typedObj) &&
1920
1916
  isNoun(typedObj[0]) as boolean)
1921
1917
  )
1922
1918
  }
1923
1919
 
1924
1920
  export function isCheetahPoint(obj: unknown): obj is CheetahPoint {
1925
- const typedObj = obj as any
1926
- return (
1927
- typeof typedObj === "string"
1928
- )
1921
+ const typedObj = obj as any;
1922
+ return (typeof typedObj === "string" && /^[A-HJ-NP-Za-km-z2-9][A-HJ-NP-Za-km-z1-9]*$/.test(typedObj));
1929
1923
  }
1930
1924
 
1931
1925
  export function isDigest(obj: unknown): obj is Digest {
1932
- const typedObj = obj as any
1933
- return (
1934
- typeof typedObj === "string"
1935
- )
1926
+ const typedObj = obj as any;
1927
+ return (typeof typedObj === "string" && /^[A-HJ-NP-Za-km-z2-9][A-HJ-NP-Za-km-z1-9]*$/.test(typedObj));
1936
1928
  }
1937
1929
 
1938
1930
 
@@ -1944,10 +1936,8 @@ export function isDigest(obj: unknown): obj is Digest {
1944
1936
 
1945
1937
 
1946
1938
  export function isTxId(obj: unknown): obj is TxId {
1947
- const typedObj = obj as any
1948
- return (
1949
- typeof typedObj === "string"
1950
- )
1939
+ const typedObj = obj as any;
1940
+ return (typeof typedObj === "string" && /^[A-HJ-NP-Za-km-z2-9][A-HJ-NP-Za-km-z1-9]*$/.test(typedObj));
1951
1941
  }
1952
1942
 
1953
1943
  export function isBlockHeight(obj: unknown): obj is BlockHeight {