@parity/truapi 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/client.js +5 -2
  2. package/dist/explorer/codegen/types.d.ts +2 -0
  3. package/dist/explorer/codegen/types.js +3610 -0
  4. package/dist/explorer/codegen/versions/0.2.0/services.d.ts +2 -0
  5. package/dist/explorer/codegen/versions/0.2.0/services.js +644 -0
  6. package/dist/explorer/codegen/versions/0.2.0/types.d.ts +2 -0
  7. package/dist/explorer/codegen/versions/0.2.0/types.js +3960 -0
  8. package/dist/explorer/codegen/versions/0.3.0/services.d.ts +2 -0
  9. package/dist/explorer/codegen/versions/0.3.0/services.js +644 -0
  10. package/dist/explorer/codegen/versions/0.3.0/types.d.ts +2 -0
  11. package/dist/explorer/codegen/versions/0.3.0/types.js +3610 -0
  12. package/dist/explorer/data-types.d.ts +49 -0
  13. package/dist/explorer/data-types.js +1 -0
  14. package/dist/explorer/versions.d.ts +9 -0
  15. package/dist/explorer/versions.js +18 -0
  16. package/dist/generated/client.d.ts +86 -65
  17. package/dist/generated/client.js +166 -194
  18. package/dist/generated/types.d.ts +442 -232
  19. package/dist/generated/types.js +110 -94
  20. package/dist/generated/wire-table.d.ts +5 -11
  21. package/dist/generated/wire-table.js +5 -11
  22. package/dist/index.d.ts +2 -1
  23. package/dist/index.js +2 -1
  24. package/dist/playground/codegen/services.js +327 -84
  25. package/dist/playground/codegen/truapi-dts.d.ts +1 -0
  26. package/dist/playground/codegen/truapi-dts.js +4302 -0
  27. package/dist/playground/services-types.d.ts +11 -2
  28. package/dist/scale.d.ts +8 -1
  29. package/dist/scale.js +19 -1
  30. package/dist/transport.d.ts +33 -6
  31. package/dist/transport.js +150 -71
  32. package/dist/well-known-chains.d.ts +13 -0
  33. package/dist/well-known-chains.js +7 -0
  34. package/package.json +28 -6
@@ -0,0 +1,4302 @@
1
+ // Auto-generated by scripts/bundle-truapi-dts.mjs. Do not edit.
2
+ export const truapiDts = `// neverthrow (inlined)
3
+
4
+ interface ErrorConfig {
5
+ withStackTrace: boolean;
6
+ }
7
+
8
+ declare class ResultAsync<T, E> implements PromiseLike<Result<T, E>> {
9
+ private _promise;
10
+ constructor(res: Promise<Result<T, E>>);
11
+ static fromSafePromise<T, E = never>(promise: PromiseLike<T>): ResultAsync<T, E>;
12
+ static fromPromise<T, E>(promise: PromiseLike<T>, errorFn: (e: unknown) => E): ResultAsync<T, E>;
13
+ static fromThrowable<A extends readonly any[], R, E>(fn: (...args: A) => Promise<R>, errorFn?: (err: unknown) => E): (...args: A) => ResultAsync<R, E>;
14
+ static combine<T extends readonly [ResultAsync<unknown, unknown>, ...ResultAsync<unknown, unknown>[]]>(asyncResultList: T): CombineResultAsyncs<T>;
15
+ static combine<T extends readonly ResultAsync<unknown, unknown>[]>(asyncResultList: T): CombineResultAsyncs<T>;
16
+ static combineWithAllErrors<T extends readonly [ResultAsync<unknown, unknown>, ...ResultAsync<unknown, unknown>[]]>(asyncResultList: T): CombineResultsWithAllErrorsArrayAsync<T>;
17
+ static combineWithAllErrors<T extends readonly ResultAsync<unknown, unknown>[]>(asyncResultList: T): CombineResultsWithAllErrorsArrayAsync<T>;
18
+ map<A>(f: (t: T) => A | Promise<A>): ResultAsync<A, E>;
19
+ andThrough<F>(f: (t: T) => Result<unknown, F> | ResultAsync<unknown, F>): ResultAsync<T, E | F>;
20
+ andTee(f: (t: T) => unknown): ResultAsync<T, E>;
21
+ orTee(f: (t: E) => unknown): ResultAsync<T, E>;
22
+ mapErr<U>(f: (e: E) => U | Promise<U>): ResultAsync<T, U>;
23
+ andThen<R extends Result<unknown, unknown>>(f: (t: T) => R): ResultAsync<InferOkTypes<R>, InferErrTypes<R> | E>;
24
+ andThen<R extends ResultAsync<unknown, unknown>>(f: (t: T) => R): ResultAsync<InferAsyncOkTypes<R>, InferAsyncErrTypes<R> | E>;
25
+ andThen<U, F>(f: (t: T) => Result<U, F> | ResultAsync<U, F>): ResultAsync<U, E | F>;
26
+ orElse<R extends Result<unknown, unknown>>(f: (e: E) => R): ResultAsync<InferOkTypes<R> | T, InferErrTypes<R>>;
27
+ orElse<R extends ResultAsync<unknown, unknown>>(f: (e: E) => R): ResultAsync<InferAsyncOkTypes<R> | T, InferAsyncErrTypes<R>>;
28
+ orElse<U, A>(f: (e: E) => Result<U, A> | ResultAsync<U, A>): ResultAsync<U | T, A>;
29
+ match<A, B = A>(ok: (t: T) => A, _err: (e: E) => B): Promise<A | B>;
30
+ unwrapOr<A>(t: A): Promise<T | A>;
31
+ /**
32
+ * @deprecated will be removed in 9.0.0.
33
+ *
34
+ * You can use \`safeTry\` without this method.
35
+ * @example
36
+ * \`\`\`typescript
37
+ * safeTry(async function* () {
38
+ * const okValue = yield* yourResult
39
+ * })
40
+ * \`\`\`
41
+ * Emulates Rust's \`?\` operator in \`safeTry\`'s body. See also \`safeTry\`.
42
+ */
43
+ safeUnwrap(): AsyncGenerator<Err<never, E>, T>;
44
+ then<A, B>(successCallback?: (res: Result<T, E>) => A | PromiseLike<A>, failureCallback?: (reason: unknown) => B | PromiseLike<B>): PromiseLike<A | B>;
45
+ [Symbol.asyncIterator](): AsyncGenerator<Err<never, E>, T>;
46
+ }
47
+ declare function okAsync<T, E = never>(value: T): ResultAsync<T, E>;
48
+ declare function okAsync<T extends void = void, E = never>(value: void): ResultAsync<void, E>;
49
+ declare function errAsync<T = never, E = unknown>(err: E): ResultAsync<T, E>;
50
+ declare function errAsync<T = never, E extends void = void>(err: void): ResultAsync<T, void>;
51
+ declare const fromPromise: typeof ResultAsync.fromPromise;
52
+ declare const fromSafePromise: typeof ResultAsync.fromSafePromise;
53
+ declare const fromAsyncThrowable: typeof ResultAsync.fromThrowable;
54
+ declare type CombineResultAsyncs<T extends readonly ResultAsync<unknown, unknown>[]> = IsLiteralArray<T> extends 1 ? TraverseAsync<UnwrapAsync<T>> : ResultAsync<ExtractOkAsyncTypes<T>, ExtractErrAsyncTypes<T>[number]>;
55
+ declare type CombineResultsWithAllErrorsArrayAsync<T extends readonly ResultAsync<unknown, unknown>[]> = IsLiteralArray<T> extends 1 ? TraverseWithAllErrorsAsync<UnwrapAsync<T>> : ResultAsync<ExtractOkAsyncTypes<T>, ExtractErrAsyncTypes<T>[number][]>;
56
+ declare type UnwrapAsync<T> = IsLiteralArray<T> extends 1 ? Writable<T> extends [infer H, ...infer Rest] ? H extends PromiseLike<infer HI> ? HI extends Result<unknown, unknown> ? [Dedup<HI>, ...UnwrapAsync<Rest>] : never : never : [] : T extends Array<infer A> ? A extends PromiseLike<infer HI> ? HI extends Result<infer L, infer R> ? Ok<L, R>[] : never : never : never;
57
+ declare type TraverseAsync<T, Depth extends number = 5> = IsLiteralArray<T> extends 1 ? Combine<T, Depth> extends [infer Oks, infer Errs] ? ResultAsync<EmptyArrayToNever<Oks>, MembersToUnion<Errs>> : never : T extends Array<infer I> ? Combine<MemberListOf<I>, Depth> extends [infer Oks, infer Errs] ? Oks extends unknown[] ? Errs extends unknown[] ? ResultAsync<EmptyArrayToNever<Oks[number][]>, MembersToUnion<Errs[number][]>> : ResultAsync<EmptyArrayToNever<Oks[number][]>, Errs> : Errs extends unknown[] ? ResultAsync<Oks, MembersToUnion<Errs[number][]>> : ResultAsync<Oks, Errs> : never : never;
58
+ declare type TraverseWithAllErrorsAsync<T, Depth extends number = 5> = TraverseAsync<T, Depth> extends ResultAsync<infer Oks, infer Errs> ? ResultAsync<Oks, Errs[]> : never;
59
+ declare type Writable<T> = T extends ReadonlyArray<unknown> ? [...T] : T;
60
+
61
+ declare type ExtractOkTypes<T extends readonly Result<unknown, unknown>[]> = {
62
+ [idx in keyof T]: T[idx] extends Result<infer U, unknown> ? U : never;
63
+ };
64
+ declare type ExtractOkAsyncTypes<T extends readonly ResultAsync<unknown, unknown>[]> = {
65
+ [idx in keyof T]: T[idx] extends ResultAsync<infer U, unknown> ? U : never;
66
+ };
67
+ declare type ExtractErrTypes<T extends readonly Result<unknown, unknown>[]> = {
68
+ [idx in keyof T]: T[idx] extends Result<unknown, infer E> ? E : never;
69
+ };
70
+ declare type ExtractErrAsyncTypes<T extends readonly ResultAsync<unknown, unknown>[]> = {
71
+ [idx in keyof T]: T[idx] extends ResultAsync<unknown, infer E> ? E : never;
72
+ };
73
+ declare type InferOkTypes<R> = R extends Result<infer T, unknown> ? T : never;
74
+ declare type InferErrTypes<R> = R extends Result<unknown, infer E> ? E : never;
75
+ declare type InferAsyncOkTypes<R> = R extends ResultAsync<infer T, unknown> ? T : never;
76
+ declare type InferAsyncErrTypes<R> = R extends ResultAsync<unknown, infer E> ? E : never;
77
+
78
+ declare namespace Result {
79
+ /**
80
+ * Wraps a function with a try catch, creating a new function with the same
81
+ * arguments but returning \`Ok\` if successful, \`Err\` if the function throws
82
+ *
83
+ * @param fn function to wrap with ok on success or err on failure
84
+ * @param errorFn when an error is thrown, this will wrap the error result if provided
85
+ */
86
+ function fromThrowable<Fn extends (...args: readonly any[]) => any, E>(fn: Fn, errorFn?: (e: unknown) => E): (...args: Parameters<Fn>) => Result<ReturnType<Fn>, E>;
87
+ function combine<T extends readonly [Result<unknown, unknown>, ...Result<unknown, unknown>[]]>(resultList: T): CombineResults<T>;
88
+ function combine<T extends readonly Result<unknown, unknown>[]>(resultList: T): CombineResults<T>;
89
+ function combineWithAllErrors<T extends readonly [Result<unknown, unknown>, ...Result<unknown, unknown>[]]>(resultList: T): CombineResultsWithAllErrorsArray<T>;
90
+ function combineWithAllErrors<T extends readonly Result<unknown, unknown>[]>(resultList: T): CombineResultsWithAllErrorsArray<T>;
91
+ }
92
+ declare type Result<T, E> = Ok<T, E> | Err<T, E>;
93
+ declare function ok<T, E = never>(value: T): Ok<T, E>;
94
+ declare function ok<T extends void = void, E = never>(value: void): Ok<void, E>;
95
+ declare function err<T = never, E extends string = string>(err: E): Err<T, E>;
96
+ declare function err<T = never, E = unknown>(err: E): Err<T, E>;
97
+ declare function err<T = never, E extends void = void>(err: void): Err<T, void>;
98
+ /**
99
+ * Evaluates the given generator to a Result returned or an Err yielded from it,
100
+ * whichever comes first.
101
+ *
102
+ * This function is intended to emulate Rust's ? operator.
103
+ * See \`/tests/safeTry.test.ts\` for examples.
104
+ *
105
+ * @param body - What is evaluated. In body, \`yield* result\` works as
106
+ * Rust's \`result?\` expression.
107
+ * @returns The first occurrence of either an yielded Err or a returned Result.
108
+ */
109
+ declare function safeTry<T, E>(body: () => Generator<Err<never, E>, Result<T, E>>): Result<T, E>;
110
+ declare function safeTry<YieldErr extends Err<never, unknown>, GeneratorReturnResult extends Result<unknown, unknown>>(body: () => Generator<YieldErr, GeneratorReturnResult>): Result<InferOkTypes<GeneratorReturnResult>, InferErrTypes<YieldErr> | InferErrTypes<GeneratorReturnResult>>;
111
+ /**
112
+ * Evaluates the given generator to a Result returned or an Err yielded from it,
113
+ * whichever comes first.
114
+ *
115
+ * This function is intended to emulate Rust's ? operator.
116
+ * See \`/tests/safeTry.test.ts\` for examples.
117
+ *
118
+ * @param body - What is evaluated. In body, \`yield* result\` and
119
+ * \`yield* resultAsync\` work as Rust's \`result?\` expression.
120
+ * @returns The first occurrence of either an yielded Err or a returned Result.
121
+ */
122
+ declare function safeTry<T, E>(body: () => AsyncGenerator<Err<never, E>, Result<T, E>>): ResultAsync<T, E>;
123
+ declare function safeTry<YieldErr extends Err<never, unknown>, GeneratorReturnResult extends Result<unknown, unknown>>(body: () => AsyncGenerator<YieldErr, GeneratorReturnResult>): ResultAsync<InferOkTypes<GeneratorReturnResult>, InferErrTypes<YieldErr> | InferErrTypes<GeneratorReturnResult>>;
124
+ interface IResult<T, E> {
125
+ /**
126
+ * Used to check if a \`Result\` is an \`OK\`
127
+ *
128
+ * @returns \`true\` if the result is an \`OK\` variant of Result
129
+ */
130
+ isOk(): this is Ok<T, E>;
131
+ /**
132
+ * Used to check if a \`Result\` is an \`Err\`
133
+ *
134
+ * @returns \`true\` if the result is an \`Err\` variant of Result
135
+ */
136
+ isErr(): this is Err<T, E>;
137
+ /**
138
+ * Maps a \`Result<T, E>\` to \`Result<U, E>\`
139
+ * by applying a function to a contained \`Ok\` value, leaving an \`Err\` value
140
+ * untouched.
141
+ *
142
+ * @param f The function to apply an \`OK\` value
143
+ * @returns the result of applying \`f\` or an \`Err\` untouched
144
+ */
145
+ map<A>(f: (t: T) => A): Result<A, E>;
146
+ /**
147
+ * Maps a \`Result<T, E>\` to \`Result<T, F>\` by applying a function to a
148
+ * contained \`Err\` value, leaving an \`Ok\` value untouched.
149
+ *
150
+ * This function can be used to pass through a successful result while
151
+ * handling an error.
152
+ *
153
+ * @param f a function to apply to the error \`Err\` value
154
+ */
155
+ mapErr<U>(f: (e: E) => U): Result<T, U>;
156
+ /**
157
+ * Similar to \`map\` Except you must return a new \`Result\`.
158
+ *
159
+ * This is useful for when you need to do a subsequent computation using the
160
+ * inner \`T\` value, but that computation might fail.
161
+ * Additionally, \`andThen\` is really useful as a tool to flatten a
162
+ * \`Result<Result<A, E2>, E1>\` into a \`Result<A, E2>\` (see example below).
163
+ *
164
+ * @param f The function to apply to the current value
165
+ */
166
+ andThen<R extends Result<unknown, unknown>>(f: (t: T) => R): Result<InferOkTypes<R>, InferErrTypes<R> | E>;
167
+ andThen<U, F>(f: (t: T) => Result<U, F>): Result<U, E | F>;
168
+ /**
169
+ * This "tee"s the current value to an passed-in computation such as side
170
+ * effect functions but still returns the same current value as the result.
171
+ *
172
+ * This is useful when you want to pass the current result to your side-track
173
+ * work such as logging but want to continue main-track work after that.
174
+ * This method does not care about the result of the passed in computation.
175
+ *
176
+ * @param f The function to apply to the current value
177
+ */
178
+ andTee(f: (t: T) => unknown): Result<T, E>;
179
+ /**
180
+ * This "tee"s the current \`Err\` value to an passed-in computation such as side
181
+ * effect functions but still returns the same \`Err\` value as the result.
182
+ *
183
+ * This is useful when you want to pass the current \`Err\` value to your side-track
184
+ * work such as logging but want to continue error-track work after that.
185
+ * This method does not care about the result of the passed in computation.
186
+ *
187
+ * @param f The function to apply to the current \`Err\` value
188
+ */
189
+ orTee(f: (t: E) => unknown): Result<T, E>;
190
+ /**
191
+ * Similar to \`andTee\` except error result of the computation will be passed
192
+ * to the downstream in case of an error.
193
+ *
194
+ * This version is useful when you want to make side-effects but in case of an
195
+ * error, you want to pass the error to the downstream.
196
+ *
197
+ * @param f The function to apply to the current value
198
+ */
199
+ andThrough<R extends Result<unknown, unknown>>(f: (t: T) => R): Result<T, InferErrTypes<R> | E>;
200
+ andThrough<F>(f: (t: T) => Result<unknown, F>): Result<T, E | F>;
201
+ /**
202
+ * Takes an \`Err\` value and maps it to a \`Result<T, SomeNewType>\`.
203
+ *
204
+ * This is useful for error recovery.
205
+ *
206
+ *
207
+ * @param f A function to apply to an \`Err\` value, leaving \`Ok\` values
208
+ * untouched.
209
+ */
210
+ orElse<R extends Result<unknown, unknown>>(f: (e: E) => R): Result<InferOkTypes<R> | T, InferErrTypes<R>>;
211
+ orElse<U, A>(f: (e: E) => Result<U, A>): Result<U | T, A>;
212
+ /**
213
+ * Similar to \`map\` Except you must return a new \`Result\`.
214
+ *
215
+ * This is useful for when you need to do a subsequent async computation using
216
+ * the inner \`T\` value, but that computation might fail. Must return a ResultAsync
217
+ *
218
+ * @param f The function that returns a \`ResultAsync\` to apply to the current
219
+ * value
220
+ */
221
+ asyncAndThen<U, F>(f: (t: T) => ResultAsync<U, F>): ResultAsync<U, E | F>;
222
+ /**
223
+ * Maps a \`Result<T, E>\` to \`ResultAsync<U, E>\`
224
+ * by applying an async function to a contained \`Ok\` value, leaving an \`Err\`
225
+ * value untouched.
226
+ *
227
+ * @param f An async function to apply an \`OK\` value
228
+ */
229
+ asyncMap<U>(f: (t: T) => Promise<U>): ResultAsync<U, E>;
230
+ /**
231
+ * Unwrap the \`Ok\` value, or return the default if there is an \`Err\`
232
+ *
233
+ * @param v the default value to return if there is an \`Err\`
234
+ */
235
+ unwrapOr<A>(v: A): T | A;
236
+ /**
237
+ *
238
+ * Given 2 functions (one for the \`Ok\` variant and one for the \`Err\` variant)
239
+ * execute the function that matches the \`Result\` variant.
240
+ *
241
+ * Match callbacks do not necessitate to return a \`Result\`, however you can
242
+ * return a \`Result\` if you want to.
243
+ *
244
+ * \`match\` is like chaining \`map\` and \`mapErr\`, with the distinction that
245
+ * with \`match\` both functions must have the same return type.
246
+ *
247
+ * @param ok
248
+ * @param err
249
+ */
250
+ match<A, B = A>(ok: (t: T) => A, err: (e: E) => B): A | B;
251
+ /**
252
+ * @deprecated will be removed in 9.0.0.
253
+ *
254
+ * You can use \`safeTry\` without this method.
255
+ * @example
256
+ * \`\`\`typescript
257
+ * safeTry(function* () {
258
+ * const okValue = yield* yourResult
259
+ * })
260
+ * \`\`\`
261
+ * Emulates Rust's \`?\` operator in \`safeTry\`'s body. See also \`safeTry\`.
262
+ */
263
+ safeUnwrap(): Generator<Err<never, E>, T>;
264
+ /**
265
+ * **This method is unsafe, and should only be used in a test environments**
266
+ *
267
+ * Takes a \`Result<T, E>\` and returns a \`T\` when the result is an \`Ok\`, otherwise it throws a custom object.
268
+ *
269
+ * @param config
270
+ */
271
+ _unsafeUnwrap(config?: ErrorConfig): T;
272
+ /**
273
+ * **This method is unsafe, and should only be used in a test environments**
274
+ *
275
+ * takes a \`Result<T, E>\` and returns a \`E\` when the result is an \`Err\`,
276
+ * otherwise it throws a custom object.
277
+ *
278
+ * @param config
279
+ */
280
+ _unsafeUnwrapErr(config?: ErrorConfig): E;
281
+ }
282
+ declare class Ok<T, E> implements IResult<T, E> {
283
+ readonly value: T;
284
+ constructor(value: T);
285
+ isOk(): this is Ok<T, E>;
286
+ isErr(): this is Err<T, E>;
287
+ map<A>(f: (t: T) => A): Result<A, E>;
288
+ mapErr<U>(_f: (e: E) => U): Result<T, U>;
289
+ andThen<R extends Result<unknown, unknown>>(f: (t: T) => R): Result<InferOkTypes<R>, InferErrTypes<R> | E>;
290
+ andThen<U, F>(f: (t: T) => Result<U, F>): Result<U, E | F>;
291
+ andThrough<R extends Result<unknown, unknown>>(f: (t: T) => R): Result<T, InferErrTypes<R> | E>;
292
+ andThrough<F>(f: (t: T) => Result<unknown, F>): Result<T, E | F>;
293
+ andTee(f: (t: T) => unknown): Result<T, E>;
294
+ orTee(_f: (t: E) => unknown): Result<T, E>;
295
+ orElse<R extends Result<unknown, unknown>>(_f: (e: E) => R): Result<InferOkTypes<R> | T, InferErrTypes<R>>;
296
+ orElse<U, A>(_f: (e: E) => Result<U, A>): Result<U | T, A>;
297
+ asyncAndThen<U, F>(f: (t: T) => ResultAsync<U, F>): ResultAsync<U, E | F>;
298
+ asyncAndThrough<R extends ResultAsync<unknown, unknown>>(f: (t: T) => R): ResultAsync<T, InferAsyncErrTypes<R> | E>;
299
+ asyncAndThrough<F>(f: (t: T) => ResultAsync<unknown, F>): ResultAsync<T, E | F>;
300
+ asyncMap<U>(f: (t: T) => Promise<U>): ResultAsync<U, E>;
301
+ unwrapOr<A>(_v: A): T | A;
302
+ match<A, B = A>(ok: (t: T) => A, _err: (e: E) => B): A | B;
303
+ safeUnwrap(): Generator<Err<never, E>, T>;
304
+ _unsafeUnwrap(_?: ErrorConfig): T;
305
+ _unsafeUnwrapErr(config?: ErrorConfig): E;
306
+ [Symbol.iterator](): Generator<Err<never, E>, T>;
307
+ }
308
+ declare class Err<T, E> implements IResult<T, E> {
309
+ readonly error: E;
310
+ constructor(error: E);
311
+ isOk(): this is Ok<T, E>;
312
+ isErr(): this is Err<T, E>;
313
+ map<A>(_f: (t: T) => A): Result<A, E>;
314
+ mapErr<U>(f: (e: E) => U): Result<T, U>;
315
+ andThrough<F>(_f: (t: T) => Result<unknown, F>): Result<T, E | F>;
316
+ andTee(_f: (t: T) => unknown): Result<T, E>;
317
+ orTee(f: (t: E) => unknown): Result<T, E>;
318
+ andThen<R extends Result<unknown, unknown>>(_f: (t: T) => R): Result<InferOkTypes<R>, InferErrTypes<R> | E>;
319
+ andThen<U, F>(_f: (t: T) => Result<U, F>): Result<U, E | F>;
320
+ orElse<R extends Result<unknown, unknown>>(f: (e: E) => R): Result<InferOkTypes<R> | T, InferErrTypes<R>>;
321
+ orElse<U, A>(f: (e: E) => Result<U, A>): Result<U | T, A>;
322
+ asyncAndThen<U, F>(_f: (t: T) => ResultAsync<U, F>): ResultAsync<U, E | F>;
323
+ asyncAndThrough<F>(_f: (t: T) => ResultAsync<unknown, F>): ResultAsync<T, E | F>;
324
+ asyncMap<U>(_f: (t: T) => Promise<U>): ResultAsync<U, E>;
325
+ unwrapOr<A>(v: A): T | A;
326
+ match<A, B = A>(_ok: (t: T) => A, err: (e: E) => B): A | B;
327
+ safeUnwrap(): Generator<Err<never, E>, T>;
328
+ _unsafeUnwrap(config?: ErrorConfig): T;
329
+ _unsafeUnwrapErr(_?: ErrorConfig): E;
330
+ [Symbol.iterator](): Generator<Err<never, E>, T>;
331
+ }
332
+ declare const fromThrowable: typeof Result.fromThrowable;
333
+ declare type Prev = [
334
+ never,
335
+ 0,
336
+ 1,
337
+ 2,
338
+ 3,
339
+ 4,
340
+ 5,
341
+ 6,
342
+ 7,
343
+ 8,
344
+ 9,
345
+ 10,
346
+ 11,
347
+ 12,
348
+ 13,
349
+ 14,
350
+ 15,
351
+ 16,
352
+ 17,
353
+ 18,
354
+ 19,
355
+ 20,
356
+ 21,
357
+ 22,
358
+ 23,
359
+ 24,
360
+ 25,
361
+ 26,
362
+ 27,
363
+ 28,
364
+ 29,
365
+ 30,
366
+ 31,
367
+ 32,
368
+ 33,
369
+ 34,
370
+ 35,
371
+ 36,
372
+ 37,
373
+ 38,
374
+ 39,
375
+ 40,
376
+ 41,
377
+ 42,
378
+ 43,
379
+ 44,
380
+ 45,
381
+ 46,
382
+ 47,
383
+ 48,
384
+ 49,
385
+ ...0[]
386
+ ];
387
+ declare type CollectResults<T, Collected extends unknown[] = [], Depth extends number = 50> = [
388
+ Depth
389
+ ] extends [never] ? [] : T extends [infer H, ...infer Rest] ? H extends Result<infer L, infer R> ? CollectResults<Rest, [
390
+ ...Collected,
391
+ [L, R]
392
+ ], Prev[Depth]> : never : Collected;
393
+ declare type Transpose<A, Transposed extends unknown[][] = [], Depth extends number = 10> = A extends [infer T, ...infer Rest] ? T extends [infer L, infer R] ? Transposed extends [infer PL, infer PR] ? PL extends unknown[] ? PR extends unknown[] ? Transpose<Rest, [[...PL, L], [...PR, R]], Prev[Depth]> : never : never : Transpose<Rest, [[L], [R]], Prev[Depth]> : Transposed : Transposed;
394
+ declare type Combine<T, Depth extends number = 5> = Transpose<CollectResults<T>, [], Depth> extends [
395
+ infer L,
396
+ infer R
397
+ ] ? [UnknownMembersToNever<L>, UnknownMembersToNever<R>] : Transpose<CollectResults<T>, [], Depth> extends [] ? [[], []] : never;
398
+ declare type Dedup<T> = T extends Result<infer RL, infer RR> ? [unknown] extends [RL] ? Err<RL, RR> : Ok<RL, RR> : T;
399
+ declare type MemberListOf<T> = ((T extends unknown ? (t: T) => T : never) extends infer U ? (U extends unknown ? (u: U) => unknown : never) extends (v: infer V) => unknown ? V : never : never) extends (_: unknown) => infer W ? [...MemberListOf<Exclude<T, W>>, W] : [];
400
+ declare type EmptyArrayToNever<T, NeverArrayToNever extends number = 0> = T extends [] ? never : NeverArrayToNever extends 1 ? T extends [never, ...infer Rest] ? [EmptyArrayToNever<Rest>] extends [never] ? never : T : T : T;
401
+ declare type UnknownMembersToNever<T> = T extends [infer H, ...infer R] ? [[unknown] extends [H] ? never : H, ...UnknownMembersToNever<R>] : T;
402
+ declare type MembersToUnion<T> = T extends unknown[] ? T[number] : never;
403
+ declare type IsLiteralArray<T> = T extends {
404
+ length: infer L;
405
+ } ? L extends number ? number extends L ? 0 : 1 : 0 : 0;
406
+ declare type Traverse<T, Depth extends number = 5> = Combine<T, Depth> extends [infer Oks, infer Errs] ? Result<EmptyArrayToNever<Oks, 1>, MembersToUnion<Errs>> : never;
407
+ declare type TraverseWithAllErrors<T, Depth extends number = 5> = Traverse<T, Depth> extends Result<infer Oks, infer Errs> ? Result<Oks, Errs[]> : never;
408
+ declare type CombineResults<T extends readonly Result<unknown, unknown>[]> = IsLiteralArray<T> extends 1 ? Traverse<T> : Result<ExtractOkTypes<T>, ExtractErrTypes<T>[number]>;
409
+ declare type CombineResultsWithAllErrorsArray<T extends readonly Result<unknown, unknown>[]> = IsLiteralArray<T> extends 1 ? TraverseWithAllErrors<T> : Result<ExtractOkTypes<T>, ExtractErrTypes<T>[number][]>;
410
+
411
+
412
+
413
+ // scale.d.ts (module-scope)
414
+
415
+ /** SCALE codec primitives used by the generated client.
416
+ *
417
+ * Thin wrapper over \`scale-ts\`: re-exports its primitives and combinators,
418
+ * plus the Polkadot-flavour helpers it does not ship (hex-encoded bytes,
419
+ * lazy recursive codecs, and \`V<N>\`-indexed tagged unions).
420
+ */
421
+ import { type Codec } from "scale-ts";
422
+ export type { Codec };
423
+ export type { ResultPayload } from "scale-ts";
424
+ export { Enum, Option, Result, Struct, Tuple, Vector, _void, bool, compact, i8, i16, i32, i64, i128, str, u8, u16, u32, u64, u128, } from "scale-ts";
425
+ /**
426
+ * Substrate \`OptionBool\`: a one-byte \`Option<bool>\`.
427
+ *
428
+ * Canonical SCALE encoding (matches \`parity_scale_codec::OptionBool\`):
429
+ * \`undefined\` → \`0\`, \`true\` → \`1\`, \`false\` → \`2\`.
430
+ */
431
+ export declare const OptionBool: Codec<boolean | undefined>;
432
+ /** Hex-encoded byte string, e.g. \`"0xdeadbeef"\`. */
433
+ export type HexString = \`0x\${string}\`;
434
+ /** Assert that a string is a valid hex string (\`0x...\`). */
435
+ export declare function toHexString(value: string): HexString;
436
+ /** Encode a byte array as a lower-case hex string with a \`0x\` prefix. */
437
+ export declare function bytesToHex(bytes: Uint8Array): HexString;
438
+ /** Decode a hex string into a byte array. Tolerates a missing \`0x\` prefix. */
439
+ export declare function hexToBytes(hex: string): Uint8Array;
440
+ /**
441
+ * SCALE codec for hex-encoded byte strings.
442
+ *
443
+ * Encode accepts a \`0x\`-prefixed hex string and emits SCALE bytes; decode
444
+ * returns the bytes as a hex string. Pass \`length\` for fixed-size byte arrays
445
+ * (\`[u8; N]\`); omit it for variable-length byte vectors (\`Vec<u8>\`).
446
+ */
447
+ export declare function Hex(length?: number): Codec<HexString>;
448
+ /**
449
+ * Same wire format as \`scale-ts\`'s \`Enum\`, but exposes \`value\` as optional in
450
+ * the public TS type when the variant codec is \`Codec<undefined>\`. Lets unit
451
+ * variants of mixed enums round-trip as \`{ tag: "X" }\` (no \`value\` key).
452
+ */
453
+ export declare function TaggedUnion<O extends TaggedUnionCodecs>(inner: O): Codec<TaggedUnionValue<O>>;
454
+ type TaggedUnionCodecs = {
455
+ [Sym: symbol]: never;
456
+ [Num: number]: never;
457
+ [Str: string]: Codec<any>;
458
+ };
459
+ type TaggedUnionValue<O extends TaggedUnionCodecs> = {
460
+ [K in keyof O & string]: O[K] extends Codec<infer T> ? [T] extends [undefined] ? {
461
+ tag: K;
462
+ value?: undefined;
463
+ } : {
464
+ tag: K;
465
+ value: T;
466
+ } : never;
467
+ }[keyof O & string];
468
+ /**
469
+ * Enum without payloads — maps string labels to SCALE discriminant bytes.
470
+ *
471
+ * \`scale-ts\` models \`Enum({ Foo: _void, Bar: _void })\` as tagged objects. For
472
+ * user-facing TrUAPI enums with only unit variants, we keep the public TS shape
473
+ * as a plain string union instead.
474
+ */
475
+ export declare function Status<const T extends string>(...variants: readonly T[]): Codec<T>;
476
+ /**
477
+ * Defers codec construction until first use so recursive generated codecs can
478
+ * reference each other safely.
479
+ */
480
+ export declare function lazy<T>(factory: () => Codec<T>): Codec<T>;
481
+ type IndexedVariantCodec<T> = readonly [index: number, codec: Codec<T>];
482
+ type IndexedVariantValue<Variants extends Record<string, IndexedVariantCodec<any>>, K extends keyof Variants & string> = Variants[K] extends IndexedVariantCodec<infer T> ? [T] extends [undefined] ? {
483
+ tag: K;
484
+ value?: undefined;
485
+ } : {
486
+ tag: K;
487
+ value: T;
488
+ } : never;
489
+ /**
490
+ * Builds a tagged union codec with explicit SCALE discriminants.
491
+ *
492
+ * \`scale-ts\` assigns enum indexes by object key order. TrUAPI versioned enums pin
493
+ * \`V<N>\` to index \`N - 1\`, including V2-only enums, so generated codecs use this
494
+ * helper for versioned wire wrappers.
495
+ */
496
+ export declare function indexedTaggedUnion<Variants extends Record<string, IndexedVariantCodec<any>>>(variants: Variants): Codec<{
497
+ [K in keyof Variants & string]: IndexedVariantValue<Variants, K>;
498
+ }[keyof Variants & string]>;
499
+
500
+
501
+ // generated/types.d.ts (namespace T)
502
+
503
+ declare namespace T {
504
+ /** A 32-byte raw account identifier used for legacy (non-product) accounts. */
505
+ export type AccountId = HexString;
506
+ export const AccountId: Codec<AccountId>;
507
+ /** Payload when a user clicks an action button. */
508
+ export interface ActionTrigger {
509
+ /** Message containing the action. */
510
+ messageId: string;
511
+ /** Which action was triggered. */
512
+ actionId: string;
513
+ /** Optional additional data. */
514
+ payload?: HexString;
515
+ }
516
+ export const ActionTrigger: Codec<ActionTrigger>;
517
+ /**
518
+ * A resource the host can pre-allocate on behalf of the product (RFC 0010).
519
+ *
520
+ * For the slot-table allowances (\`StatementStoreAllowance\`,
521
+ * \`BulletinAllowance\`, \`SmartContractAllowance\`), pre-allocation is
522
+ * opportunistic and the host may also fulfil the allowance implicitly on the
523
+ * first submission. \`AutoSigning\` must be requested explicitly through this
524
+ * call.
525
+ */
526
+ export type AllocatableResource =
527
+ /** Statement Store slot allowance for the product's own allowance account. */
528
+ {
529
+ tag: "StatementStoreAllowance";
530
+ value?: undefined;
531
+ }
532
+ /** Bulletin chain slot allowance for the product's own allowance account. */
533
+ | {
534
+ tag: "BulletinAllowance";
535
+ value?: undefined;
536
+ }
537
+ /**
538
+ * Pre-warmed PGAS balance for the smart-contract account at the given
539
+ * derivation index.
540
+ */
541
+ | {
542
+ tag: "SmartContractAllowance";
543
+ value: number;
544
+ }
545
+ /** Permission to sign on the product's behalf without per-call user prompts. */
546
+ | {
547
+ tag: "AutoSigning";
548
+ value?: undefined;
549
+ };
550
+ export const AllocatableResource: Codec<AllocatableResource>;
551
+ /** Outcome of allocating a single resource (RFC 0010). */
552
+ export type AllocationOutcome = "Allocated" | "Rejected" | "NotAvailable";
553
+ export const AllocationOutcome: Codec<AllocationOutcome>;
554
+ /** Layout arrangement (like CSS flexbox \`justify-content\`). */
555
+ export type Arrangement = "Start" | "End" | "Center" | "SpaceBetween" | "SpaceAround" | "SpaceEvenly";
556
+ export const Arrangement: Codec<Arrangement>;
557
+ /** Background styling. */
558
+ export interface Background {
559
+ /** Background color. */
560
+ color: ColorToken;
561
+ /** Background shape. */
562
+ shape?: Shape;
563
+ }
564
+ export const Background: Codec<Background>;
565
+ /**
566
+ * Balance amount for payment operations. Interpreted according to the host's
567
+ * single fixed payment asset (e.g. pUSD).
568
+ */
569
+ export type Balance = bigint;
570
+ export const Balance: Codec<Balance>;
571
+ /** Border styling. */
572
+ export interface BorderStyle {
573
+ /** Border width. */
574
+ width: Size;
575
+ /** Border color. */
576
+ color: ColorToken;
577
+ /** Border shape. */
578
+ shape?: Shape;
579
+ }
580
+ export const BorderStyle: Codec<BorderStyle>;
581
+ /** Properties for a [\`CustomRendererNode::Box\`] container. */
582
+ export interface BoxProps {
583
+ /** Content alignment within the box. */
584
+ contentAlignment?: ContentAlignment;
585
+ }
586
+ export const BoxProps: Codec<BoxProps>;
587
+ /** Properties for a [\`CustomRendererNode::Button\`]. */
588
+ export interface ButtonProps {
589
+ /** Button label text. */
590
+ text: string;
591
+ /** Button style variant. */
592
+ variant?: ButtonVariant;
593
+ /** Whether the button is enabled. Absent leaves the default to the host. */
594
+ enabled: boolean | undefined;
595
+ /** Whether the button shows a loading state. Absent leaves the default to the host. */
596
+ loading: boolean | undefined;
597
+ /** Action identifier triggered on click. */
598
+ clickAction?: string;
599
+ }
600
+ export const ButtonProps: Codec<ButtonProps>;
601
+ /** Button style variants. */
602
+ export type ButtonVariant = "Primary" | "Secondary" | "Text";
603
+ export const ButtonVariant: Codec<ButtonVariant>;
604
+ /** A clickable action button in a chat message. */
605
+ export interface ChatAction {
606
+ /** Action identifier. */
607
+ actionId: string;
608
+ /** Button label. */
609
+ title: string;
610
+ }
611
+ export const ChatAction: Codec<ChatAction>;
612
+ /** Layout for action buttons. */
613
+ export type ChatActionLayout = "Column" | "Grid";
614
+ export const ChatActionLayout: Codec<ChatActionLayout>;
615
+ /** Payload of a received chat action. */
616
+ export type ChatActionPayload =
617
+ /** A peer posted a message. */
618
+ {
619
+ tag: "MessagePosted";
620
+ value: ChatMessageContent;
621
+ }
622
+ /** A user triggered an action button. */
623
+ | {
624
+ tag: "ActionTriggered";
625
+ value: ActionTrigger;
626
+ }
627
+ /** A user issued a command. */
628
+ | {
629
+ tag: "Command";
630
+ value: ChatCommand;
631
+ };
632
+ export const ChatActionPayload: Codec<ChatActionPayload>;
633
+ /** A set of action buttons with optional text. */
634
+ export interface ChatActions {
635
+ /** Optional message text. */
636
+ text?: string;
637
+ /** List of action buttons. */
638
+ actions: Array<ChatAction>;
639
+ /** \`Column\` or \`Grid\` layout. */
640
+ layout: ChatActionLayout;
641
+ }
642
+ export const ChatActions: Codec<ChatActions>;
643
+ /** Whether the bot was newly registered or already existed. */
644
+ export type ChatBotRegistrationStatus = "New" | "Exists";
645
+ export const ChatBotRegistrationStatus: Codec<ChatBotRegistrationStatus>;
646
+ /** A slash command from a chat user. */
647
+ export interface ChatCommand {
648
+ /** Command name. */
649
+ command: string;
650
+ /** Command arguments. */
651
+ payload: string;
652
+ }
653
+ export const ChatCommand: Codec<ChatCommand>;
654
+ /** A custom message with application-defined type and binary payload. */
655
+ export interface ChatCustomMessage {
656
+ /** Application-defined type key. */
657
+ messageType: string;
658
+ /** Binary payload. */
659
+ payload: HexString;
660
+ }
661
+ export const ChatCustomMessage: Codec<ChatCustomMessage>;
662
+ /** A file attachment in a chat message. */
663
+ export interface ChatFile {
664
+ /** File download URL. */
665
+ url: string;
666
+ /** File name. */
667
+ fileName: string;
668
+ /** MIME type. */
669
+ mimeType: string;
670
+ /** File size in bytes. */
671
+ sizeBytes: bigint;
672
+ /** Optional caption text. */
673
+ text?: string;
674
+ }
675
+ export const ChatFile: Codec<ChatFile>;
676
+ /** A media attachment. */
677
+ export interface ChatMedia {
678
+ /** Media URL. */
679
+ url: string;
680
+ }
681
+ export const ChatMedia: Codec<ChatMedia>;
682
+ /** Content of a chat message -- one of several types. */
683
+ export type ChatMessageContent =
684
+ /** Plain text message. */
685
+ {
686
+ tag: "Text";
687
+ value: {
688
+ text: string;
689
+ };
690
+ }
691
+ /** Rich text with media. */
692
+ | {
693
+ tag: "RichText";
694
+ value: ChatRichText;
695
+ }
696
+ /** Action button set. */
697
+ | {
698
+ tag: "Actions";
699
+ value: ChatActions;
700
+ }
701
+ /** File attachment. */
702
+ | {
703
+ tag: "File";
704
+ value: ChatFile;
705
+ }
706
+ /** Emoji reaction. */
707
+ | {
708
+ tag: "Reaction";
709
+ value: ChatReaction;
710
+ }
711
+ /** Reaction removal. */
712
+ | {
713
+ tag: "ReactionRemoved";
714
+ value: ChatReaction;
715
+ }
716
+ /** Custom message. */
717
+ | {
718
+ tag: "Custom";
719
+ value: ChatCustomMessage;
720
+ };
721
+ export const ChatMessageContent: Codec<ChatMessageContent>;
722
+ /** A reaction to a chat message. */
723
+ export interface ChatReaction {
724
+ /** Message being reacted to. */
725
+ messageId: string;
726
+ /** Emoji reaction. */
727
+ emoji: string;
728
+ }
729
+ export const ChatReaction: Codec<ChatReaction>;
730
+ /** Rich text message with optional media. */
731
+ export interface ChatRichText {
732
+ /** Optional text content. */
733
+ text?: string;
734
+ /** Attached media items. */
735
+ media: Array<ChatMedia>;
736
+ }
737
+ export const ChatRichText: Codec<ChatRichText>;
738
+ /** A chat room the product participates in. */
739
+ export interface ChatRoom {
740
+ /** Room identifier. */
741
+ roomId: string;
742
+ /** \`RoomHost\` or \`Bot\`. */
743
+ participatingAs: ChatRoomParticipation;
744
+ }
745
+ export const ChatRoom: Codec<ChatRoom>;
746
+ /** How the product participates in a chat room. */
747
+ export type ChatRoomParticipation = "RoomHost" | "Bot";
748
+ export const ChatRoomParticipation: Codec<ChatRoomParticipation>;
749
+ /** Whether the room was newly created or already existed. */
750
+ export type ChatRoomRegistrationStatus = "New" | "Exists";
751
+ export const ChatRoomRegistrationStatus: Codec<ChatRoomRegistrationStatus>;
752
+ /** Semantic color tokens for theming. */
753
+ export type ColorToken = "FgPrimary" | "FgSecondary" | "FgTertiary" | "BgSurfaceMain" | "BgSurfaceContainer" | "BgSurfaceNested" | "FgSuccess" | "FgError" | "FgWarning";
754
+ export const ColorToken: Codec<ColorToken>;
755
+ /** Properties for a [\`CustomRendererNode::Column\`] layout. */
756
+ export interface ColumnProps {
757
+ /** Horizontal alignment of children. */
758
+ horizontalAlignment?: HorizontalAlignment;
759
+ /** Vertical arrangement of children. */
760
+ verticalArrangement?: Arrangement;
761
+ }
762
+ export const ColumnProps: Codec<ColumnProps>;
763
+ /**
764
+ * A component in the custom renderer UI tree, combining modifiers, typed props,
765
+ * and recursive children.
766
+ */
767
+ export interface Component<P> {
768
+ /** Layout and styling modifiers. */
769
+ modifiers: Array<Modifier>;
770
+ /** Component-specific properties. */
771
+ props: P;
772
+ /** Child nodes. */
773
+ children: Array<CustomRendererNode>;
774
+ }
775
+ /** Builds a codec for renderer components parameterized by the codec of their
776
+ * \`props\` payload. */
777
+ export function Component<P>(pCodec: Codec<P>): Codec<Component<P>>;
778
+ /** 2D content alignment. */
779
+ export type ContentAlignment = "TopStart" | "TopCenter" | "TopEnd" | "CenterStart" | "Center" | "CenterEnd" | "BottomStart" | "BottomCenter" | "BottomEnd";
780
+ export const ContentAlignment: Codec<ContentAlignment>;
781
+ /**
782
+ * A node in the custom renderer UI tree. Can be nested recursively via the
783
+ * \`children\` field of each [\`Component\`].
784
+ */
785
+ export type CustomRendererNode =
786
+ /** Empty node. */
787
+ {
788
+ tag: "Nil";
789
+ value?: undefined;
790
+ }
791
+ /** Raw text string. */
792
+ | {
793
+ tag: "String";
794
+ value: {
795
+ text: string;
796
+ };
797
+ }
798
+ /** Generic container. */
799
+ | {
800
+ tag: "Box";
801
+ value: Component<BoxProps>;
802
+ }
803
+ /** Vertical layout. */
804
+ | {
805
+ tag: "Column";
806
+ value: Component<ColumnProps>;
807
+ }
808
+ /** Horizontal layout. */
809
+ | {
810
+ tag: "Row";
811
+ value: Component<RowProps>;
812
+ }
813
+ /** Flexible space. */
814
+ | {
815
+ tag: "Spacer";
816
+ value: Component<undefined>;
817
+ }
818
+ /** Text display. */
819
+ | {
820
+ tag: "Text";
821
+ value: Component<TextProps>;
822
+ }
823
+ /** Interactive button. */
824
+ | {
825
+ tag: "Button";
826
+ value: Component<ButtonProps>;
827
+ }
828
+ /** Text input. */
829
+ | {
830
+ tag: "TextField";
831
+ value: Component<TextFieldProps>;
832
+ };
833
+ export const CustomRendererNode: Codec<CustomRendererNode>;
834
+ /**
835
+ * CSS-like dimensions: (top, end, bottom, start).
836
+ * Bottom defaults to top, start defaults to end when \`None\`.
837
+ */
838
+ export interface Dimensions {
839
+ /** Top dimension. */
840
+ top: Size;
841
+ /** End dimension. */
842
+ end: Size;
843
+ /** Bottom dimension. Defaults to top when absent. */
844
+ bottom?: Size;
845
+ /** Start dimension. Defaults to end when absent. */
846
+ start?: Size;
847
+ }
848
+ export const Dimensions: Codec<Dimensions>;
849
+ /**
850
+ * Generic error payload carrying a human-readable reason string. Used by many
851
+ * methods as a catch-all error type.
852
+ */
853
+ export interface GenericError {
854
+ reason: string;
855
+ }
856
+ export const GenericError: Codec<GenericError>;
857
+ /** A 32-byte chain genesis hash used to identify the target chain. */
858
+ export type GenesisHash = HexString;
859
+ export const GenesisHash: Codec<GenesisHash>;
860
+ /** Horizontal alignment options. */
861
+ export type HorizontalAlignment = "Start" | "Center" | "End";
862
+ export const HorizontalAlignment: Codec<HorizontalAlignment>;
863
+ /** Versioned envelope for [\`HostAccountConnectionStatusSubscribeItem\`]. */
864
+ export type VersionedHostAccountConnectionStatusSubscribeItem = {
865
+ tag: "V1";
866
+ value: HostAccountConnectionStatusSubscribeItem;
867
+ };
868
+ export const VersionedHostAccountConnectionStatusSubscribeItem: Codec<VersionedHostAccountConnectionStatusSubscribeItem>;
869
+ /** Versioned envelope for [\`HostAccountCreateProofError\`]. */
870
+ export type VersionedHostAccountCreateProofError = {
871
+ tag: "V1";
872
+ value: HostAccountCreateProofError;
873
+ };
874
+ export const VersionedHostAccountCreateProofError: Codec<VersionedHostAccountCreateProofError>;
875
+ /** Versioned envelope for [\`HostAccountCreateProofRequest\`]. */
876
+ export type VersionedHostAccountCreateProofRequest = {
877
+ tag: "V1";
878
+ value: HostAccountCreateProofRequest;
879
+ };
880
+ export const VersionedHostAccountCreateProofRequest: Codec<VersionedHostAccountCreateProofRequest>;
881
+ /** Versioned envelope for [\`HostAccountCreateProofResponse\`]. */
882
+ export type VersionedHostAccountCreateProofResponse = {
883
+ tag: "V1";
884
+ value: HostAccountCreateProofResponse;
885
+ };
886
+ export const VersionedHostAccountCreateProofResponse: Codec<VersionedHostAccountCreateProofResponse>;
887
+ /** Versioned envelope for [\`HostAccountGetAliasError\`]. */
888
+ export type VersionedHostAccountGetAliasError = {
889
+ tag: "V1";
890
+ value: HostAccountGetError;
891
+ };
892
+ export const VersionedHostAccountGetAliasError: Codec<VersionedHostAccountGetAliasError>;
893
+ /** Versioned envelope for [\`HostAccountGetAliasRequest\`]. */
894
+ export type VersionedHostAccountGetAliasRequest = {
895
+ tag: "V1";
896
+ value: HostAccountGetAliasRequest;
897
+ };
898
+ export const VersionedHostAccountGetAliasRequest: Codec<VersionedHostAccountGetAliasRequest>;
899
+ /** Versioned envelope for [\`HostAccountGetAliasResponse\`]. */
900
+ export type VersionedHostAccountGetAliasResponse = {
901
+ tag: "V1";
902
+ value: HostAccountGetAliasResponse;
903
+ };
904
+ export const VersionedHostAccountGetAliasResponse: Codec<VersionedHostAccountGetAliasResponse>;
905
+ /** Versioned envelope for [\`HostAccountGetError\`]. */
906
+ export type VersionedHostAccountGetError = {
907
+ tag: "V1";
908
+ value: HostAccountGetError;
909
+ };
910
+ export const VersionedHostAccountGetError: Codec<VersionedHostAccountGetError>;
911
+ /** Versioned envelope for [\`HostAccountGetRequest\`]. */
912
+ export type VersionedHostAccountGetRequest = {
913
+ tag: "V1";
914
+ value: HostAccountGetRequest;
915
+ };
916
+ export const VersionedHostAccountGetRequest: Codec<VersionedHostAccountGetRequest>;
917
+ /** Versioned envelope for [\`HostAccountGetResponse\`]. */
918
+ export type VersionedHostAccountGetResponse = {
919
+ tag: "V1";
920
+ value: HostAccountGetResponse;
921
+ };
922
+ export const VersionedHostAccountGetResponse: Codec<VersionedHostAccountGetResponse>;
923
+ /** Versioned envelope for [\`HostChatActionSubscribeItem\`]. */
924
+ export type VersionedHostChatActionSubscribeItem = {
925
+ tag: "V1";
926
+ value: HostChatActionSubscribeItem;
927
+ };
928
+ export const VersionedHostChatActionSubscribeItem: Codec<VersionedHostChatActionSubscribeItem>;
929
+ /** Versioned envelope for [\`HostChatCreateRoomError\`]. */
930
+ export type VersionedHostChatCreateRoomError = {
931
+ tag: "V1";
932
+ value: HostChatCreateRoomError;
933
+ };
934
+ export const VersionedHostChatCreateRoomError: Codec<VersionedHostChatCreateRoomError>;
935
+ /** Versioned envelope for [\`HostChatCreateRoomRequest\`]. */
936
+ export type VersionedHostChatCreateRoomRequest = {
937
+ tag: "V1";
938
+ value: HostChatCreateRoomRequest;
939
+ };
940
+ export const VersionedHostChatCreateRoomRequest: Codec<VersionedHostChatCreateRoomRequest>;
941
+ /** Versioned envelope for [\`HostChatCreateRoomResponse\`]. */
942
+ export type VersionedHostChatCreateRoomResponse = {
943
+ tag: "V1";
944
+ value: HostChatCreateRoomResponse;
945
+ };
946
+ export const VersionedHostChatCreateRoomResponse: Codec<VersionedHostChatCreateRoomResponse>;
947
+ /** Versioned envelope for [\`HostChatListSubscribeItem\`]. */
948
+ export type VersionedHostChatListSubscribeItem = {
949
+ tag: "V1";
950
+ value: HostChatListSubscribeItem;
951
+ };
952
+ export const VersionedHostChatListSubscribeItem: Codec<VersionedHostChatListSubscribeItem>;
953
+ /** Versioned envelope for [\`HostChatPostMessageError\`]. */
954
+ export type VersionedHostChatPostMessageError = {
955
+ tag: "V1";
956
+ value: HostChatPostMessageError;
957
+ };
958
+ export const VersionedHostChatPostMessageError: Codec<VersionedHostChatPostMessageError>;
959
+ /** Versioned envelope for [\`HostChatPostMessageRequest\`]. */
960
+ export type VersionedHostChatPostMessageRequest = {
961
+ tag: "V1";
962
+ value: HostChatPostMessageRequest;
963
+ };
964
+ export const VersionedHostChatPostMessageRequest: Codec<VersionedHostChatPostMessageRequest>;
965
+ /** Versioned envelope for [\`HostChatPostMessageResponse\`]. */
966
+ export type VersionedHostChatPostMessageResponse = {
967
+ tag: "V1";
968
+ value: HostChatPostMessageResponse;
969
+ };
970
+ export const VersionedHostChatPostMessageResponse: Codec<VersionedHostChatPostMessageResponse>;
971
+ /** Versioned envelope for [\`HostChatRegisterBotError\`]. */
972
+ export type VersionedHostChatRegisterBotError = {
973
+ tag: "V1";
974
+ value: HostChatRegisterBotError;
975
+ };
976
+ export const VersionedHostChatRegisterBotError: Codec<VersionedHostChatRegisterBotError>;
977
+ /** Versioned envelope for [\`HostChatRegisterBotRequest\`]. */
978
+ export type VersionedHostChatRegisterBotRequest = {
979
+ tag: "V1";
980
+ value: HostChatRegisterBotRequest;
981
+ };
982
+ export const VersionedHostChatRegisterBotRequest: Codec<VersionedHostChatRegisterBotRequest>;
983
+ /** Versioned envelope for [\`HostChatRegisterBotResponse\`]. */
984
+ export type VersionedHostChatRegisterBotResponse = {
985
+ tag: "V1";
986
+ value: HostChatRegisterBotResponse;
987
+ };
988
+ export const VersionedHostChatRegisterBotResponse: Codec<VersionedHostChatRegisterBotResponse>;
989
+ /** Versioned envelope for [\`HostCreateTransactionError\`]. */
990
+ export type VersionedHostCreateTransactionError = {
991
+ tag: "V1";
992
+ value: HostCreateTransactionError;
993
+ };
994
+ export const VersionedHostCreateTransactionError: Codec<VersionedHostCreateTransactionError>;
995
+ /** Versioned envelope for [\`HostCreateTransactionRequest\`]. */
996
+ export type VersionedHostCreateTransactionRequest = {
997
+ tag: "V1";
998
+ value: ProductAccountTxPayload;
999
+ };
1000
+ export const VersionedHostCreateTransactionRequest: Codec<VersionedHostCreateTransactionRequest>;
1001
+ /** Versioned envelope for [\`HostCreateTransactionResponse\`]. */
1002
+ export type VersionedHostCreateTransactionResponse = {
1003
+ tag: "V1";
1004
+ value: HostCreateTransactionResponse;
1005
+ };
1006
+ export const VersionedHostCreateTransactionResponse: Codec<VersionedHostCreateTransactionResponse>;
1007
+ /** Versioned envelope for [\`HostCreateTransactionWithLegacyAccountError\`]. */
1008
+ export type VersionedHostCreateTransactionWithLegacyAccountError = {
1009
+ tag: "V1";
1010
+ value: HostCreateTransactionError;
1011
+ };
1012
+ export const VersionedHostCreateTransactionWithLegacyAccountError: Codec<VersionedHostCreateTransactionWithLegacyAccountError>;
1013
+ /** Versioned envelope for [\`HostCreateTransactionWithLegacyAccountRequest\`]. */
1014
+ export type VersionedHostCreateTransactionWithLegacyAccountRequest = {
1015
+ tag: "V1";
1016
+ value: LegacyAccountTxPayload;
1017
+ };
1018
+ export const VersionedHostCreateTransactionWithLegacyAccountRequest: Codec<VersionedHostCreateTransactionWithLegacyAccountRequest>;
1019
+ /** Versioned envelope for [\`HostCreateTransactionWithLegacyAccountResponse\`]. */
1020
+ export type VersionedHostCreateTransactionWithLegacyAccountResponse = {
1021
+ tag: "V1";
1022
+ value: HostCreateTransactionWithLegacyAccountResponse;
1023
+ };
1024
+ export const VersionedHostCreateTransactionWithLegacyAccountResponse: Codec<VersionedHostCreateTransactionWithLegacyAccountResponse>;
1025
+ /** Versioned envelope for [\`HostDeriveEntropyError\`]. */
1026
+ export type VersionedHostDeriveEntropyError = {
1027
+ tag: "V1";
1028
+ value: HostDeriveEntropyError;
1029
+ };
1030
+ export const VersionedHostDeriveEntropyError: Codec<VersionedHostDeriveEntropyError>;
1031
+ /** Versioned envelope for [\`HostDeriveEntropyRequest\`]. */
1032
+ export type VersionedHostDeriveEntropyRequest = {
1033
+ tag: "V1";
1034
+ value: HostDeriveEntropyRequest;
1035
+ };
1036
+ export const VersionedHostDeriveEntropyRequest: Codec<VersionedHostDeriveEntropyRequest>;
1037
+ /** Versioned envelope for [\`HostDeriveEntropyResponse\`]. */
1038
+ export type VersionedHostDeriveEntropyResponse = {
1039
+ tag: "V1";
1040
+ value: HostDeriveEntropyResponse;
1041
+ };
1042
+ export const VersionedHostDeriveEntropyResponse: Codec<VersionedHostDeriveEntropyResponse>;
1043
+ /** Versioned envelope for [\`HostDevicePermissionError\`]. */
1044
+ export type VersionedHostDevicePermissionError = {
1045
+ tag: "V1";
1046
+ value: GenericError;
1047
+ };
1048
+ export const VersionedHostDevicePermissionError: Codec<VersionedHostDevicePermissionError>;
1049
+ /** Versioned envelope for [\`HostDevicePermissionRequest\`]. */
1050
+ export type VersionedHostDevicePermissionRequest = {
1051
+ tag: "V1";
1052
+ value: HostDevicePermissionRequest;
1053
+ };
1054
+ export const VersionedHostDevicePermissionRequest: Codec<VersionedHostDevicePermissionRequest>;
1055
+ /** Versioned envelope for [\`HostDevicePermissionResponse\`]. */
1056
+ export type VersionedHostDevicePermissionResponse = {
1057
+ tag: "V1";
1058
+ value: HostDevicePermissionResponse;
1059
+ };
1060
+ export const VersionedHostDevicePermissionResponse: Codec<VersionedHostDevicePermissionResponse>;
1061
+ /** Versioned envelope for [\`HostFeatureSupportedError\`]. */
1062
+ export type VersionedHostFeatureSupportedError = {
1063
+ tag: "V1";
1064
+ value: GenericError;
1065
+ };
1066
+ export const VersionedHostFeatureSupportedError: Codec<VersionedHostFeatureSupportedError>;
1067
+ /** Versioned envelope for [\`HostFeatureSupportedRequest\`]. */
1068
+ export type VersionedHostFeatureSupportedRequest = {
1069
+ tag: "V1";
1070
+ value: HostFeatureSupportedRequest;
1071
+ };
1072
+ export const VersionedHostFeatureSupportedRequest: Codec<VersionedHostFeatureSupportedRequest>;
1073
+ /** Versioned envelope for [\`HostFeatureSupportedResponse\`]. */
1074
+ export type VersionedHostFeatureSupportedResponse = {
1075
+ tag: "V1";
1076
+ value: HostFeatureSupportedResponse;
1077
+ };
1078
+ export const VersionedHostFeatureSupportedResponse: Codec<VersionedHostFeatureSupportedResponse>;
1079
+ /** Versioned envelope for [\`HostGetLegacyAccountsError\`]. */
1080
+ export type VersionedHostGetLegacyAccountsError = {
1081
+ tag: "V1";
1082
+ value: HostAccountGetError;
1083
+ };
1084
+ export const VersionedHostGetLegacyAccountsError: Codec<VersionedHostGetLegacyAccountsError>;
1085
+ /** Versioned envelope for [\`HostGetLegacyAccountsRequest\`]. */
1086
+ export type VersionedHostGetLegacyAccountsRequest = {
1087
+ tag: "V1";
1088
+ value?: undefined;
1089
+ };
1090
+ export const VersionedHostGetLegacyAccountsRequest: Codec<VersionedHostGetLegacyAccountsRequest>;
1091
+ /** Versioned envelope for [\`HostGetLegacyAccountsResponse\`]. */
1092
+ export type VersionedHostGetLegacyAccountsResponse = {
1093
+ tag: "V1";
1094
+ value: HostGetLegacyAccountsResponse;
1095
+ };
1096
+ export const VersionedHostGetLegacyAccountsResponse: Codec<VersionedHostGetLegacyAccountsResponse>;
1097
+ /** Versioned envelope for [\`HostGetUserIdError\`]. */
1098
+ export type VersionedHostGetUserIdError = {
1099
+ tag: "V1";
1100
+ value: HostGetUserIdError;
1101
+ };
1102
+ export const VersionedHostGetUserIdError: Codec<VersionedHostGetUserIdError>;
1103
+ /** Versioned envelope for [\`HostGetUserIdRequest\`]. */
1104
+ export type VersionedHostGetUserIdRequest = {
1105
+ tag: "V1";
1106
+ value?: undefined;
1107
+ };
1108
+ export const VersionedHostGetUserIdRequest: Codec<VersionedHostGetUserIdRequest>;
1109
+ /** Versioned envelope for [\`HostGetUserIdResponse\`]. */
1110
+ export type VersionedHostGetUserIdResponse = {
1111
+ tag: "V1";
1112
+ value: HostGetUserIdResponse;
1113
+ };
1114
+ export const VersionedHostGetUserIdResponse: Codec<VersionedHostGetUserIdResponse>;
1115
+ /** Versioned envelope for [\`HostHandshakeError\`]. */
1116
+ export type VersionedHostHandshakeError = {
1117
+ tag: "V1";
1118
+ value: HostHandshakeError;
1119
+ };
1120
+ export const VersionedHostHandshakeError: Codec<VersionedHostHandshakeError>;
1121
+ /** Versioned envelope for [\`HostHandshakeRequest\`]. */
1122
+ export type VersionedHostHandshakeRequest = {
1123
+ tag: "V1";
1124
+ value: HostHandshakeRequest;
1125
+ };
1126
+ export const VersionedHostHandshakeRequest: Codec<VersionedHostHandshakeRequest>;
1127
+ /** Versioned envelope for [\`HostHandshakeResponse\`]. */
1128
+ export type VersionedHostHandshakeResponse = {
1129
+ tag: "V1";
1130
+ value?: undefined;
1131
+ };
1132
+ export const VersionedHostHandshakeResponse: Codec<VersionedHostHandshakeResponse>;
1133
+ /** Versioned envelope for [\`HostLocalStorageClearError\`]. */
1134
+ export type VersionedHostLocalStorageClearError = {
1135
+ tag: "V1";
1136
+ value: HostLocalStorageReadError;
1137
+ };
1138
+ export const VersionedHostLocalStorageClearError: Codec<VersionedHostLocalStorageClearError>;
1139
+ /** Versioned envelope for [\`HostLocalStorageClearRequest\`]. */
1140
+ export type VersionedHostLocalStorageClearRequest = {
1141
+ tag: "V1";
1142
+ value: HostLocalStorageClearRequest;
1143
+ };
1144
+ export const VersionedHostLocalStorageClearRequest: Codec<VersionedHostLocalStorageClearRequest>;
1145
+ /** Versioned envelope for [\`HostLocalStorageClearResponse\`]. */
1146
+ export type VersionedHostLocalStorageClearResponse = {
1147
+ tag: "V1";
1148
+ value?: undefined;
1149
+ };
1150
+ export const VersionedHostLocalStorageClearResponse: Codec<VersionedHostLocalStorageClearResponse>;
1151
+ /** Versioned envelope for [\`HostLocalStorageReadError\`]. */
1152
+ export type VersionedHostLocalStorageReadError = {
1153
+ tag: "V1";
1154
+ value: HostLocalStorageReadError;
1155
+ };
1156
+ export const VersionedHostLocalStorageReadError: Codec<VersionedHostLocalStorageReadError>;
1157
+ /** Versioned envelope for [\`HostLocalStorageReadRequest\`]. */
1158
+ export type VersionedHostLocalStorageReadRequest = {
1159
+ tag: "V1";
1160
+ value: HostLocalStorageReadRequest;
1161
+ };
1162
+ export const VersionedHostLocalStorageReadRequest: Codec<VersionedHostLocalStorageReadRequest>;
1163
+ /** Versioned envelope for [\`HostLocalStorageReadResponse\`]. */
1164
+ export type VersionedHostLocalStorageReadResponse = {
1165
+ tag: "V1";
1166
+ value: HostLocalStorageReadResponse;
1167
+ };
1168
+ export const VersionedHostLocalStorageReadResponse: Codec<VersionedHostLocalStorageReadResponse>;
1169
+ /** Versioned envelope for [\`HostLocalStorageWriteError\`]. */
1170
+ export type VersionedHostLocalStorageWriteError = {
1171
+ tag: "V1";
1172
+ value: HostLocalStorageReadError;
1173
+ };
1174
+ export const VersionedHostLocalStorageWriteError: Codec<VersionedHostLocalStorageWriteError>;
1175
+ /** Versioned envelope for [\`HostLocalStorageWriteRequest\`]. */
1176
+ export type VersionedHostLocalStorageWriteRequest = {
1177
+ tag: "V1";
1178
+ value: HostLocalStorageWriteRequest;
1179
+ };
1180
+ export const VersionedHostLocalStorageWriteRequest: Codec<VersionedHostLocalStorageWriteRequest>;
1181
+ /** Versioned envelope for [\`HostLocalStorageWriteResponse\`]. */
1182
+ export type VersionedHostLocalStorageWriteResponse = {
1183
+ tag: "V1";
1184
+ value?: undefined;
1185
+ };
1186
+ export const VersionedHostLocalStorageWriteResponse: Codec<VersionedHostLocalStorageWriteResponse>;
1187
+ /** Versioned envelope for [\`HostNavigateToError\`]. */
1188
+ export type VersionedHostNavigateToError = {
1189
+ tag: "V1";
1190
+ value: HostNavigateToError;
1191
+ };
1192
+ export const VersionedHostNavigateToError: Codec<VersionedHostNavigateToError>;
1193
+ /** Versioned envelope for [\`HostNavigateToRequest\`]. */
1194
+ export type VersionedHostNavigateToRequest = {
1195
+ tag: "V1";
1196
+ value: HostNavigateToRequest;
1197
+ };
1198
+ export const VersionedHostNavigateToRequest: Codec<VersionedHostNavigateToRequest>;
1199
+ /** Versioned envelope for [\`HostNavigateToResponse\`]. */
1200
+ export type VersionedHostNavigateToResponse = {
1201
+ tag: "V1";
1202
+ value?: undefined;
1203
+ };
1204
+ export const VersionedHostNavigateToResponse: Codec<VersionedHostNavigateToResponse>;
1205
+ /** Versioned envelope for [\`HostPaymentBalanceSubscribeError\`]. */
1206
+ export type VersionedHostPaymentBalanceSubscribeError = {
1207
+ tag: "V1";
1208
+ value: HostPaymentBalanceSubscribeError;
1209
+ };
1210
+ export const VersionedHostPaymentBalanceSubscribeError: Codec<VersionedHostPaymentBalanceSubscribeError>;
1211
+ /** Versioned envelope for [\`HostPaymentBalanceSubscribeItem\`]. */
1212
+ export type VersionedHostPaymentBalanceSubscribeItem = {
1213
+ tag: "V1";
1214
+ value: HostPaymentBalanceSubscribeItem;
1215
+ };
1216
+ export const VersionedHostPaymentBalanceSubscribeItem: Codec<VersionedHostPaymentBalanceSubscribeItem>;
1217
+ /** Versioned envelope for [\`HostPaymentBalanceSubscribeRequest\`]. */
1218
+ export type VersionedHostPaymentBalanceSubscribeRequest = {
1219
+ tag: "V1";
1220
+ value: HostPaymentBalanceSubscribeRequest;
1221
+ };
1222
+ export const VersionedHostPaymentBalanceSubscribeRequest: Codec<VersionedHostPaymentBalanceSubscribeRequest>;
1223
+ /** Versioned envelope for [\`HostPaymentError\`]. */
1224
+ export type VersionedHostPaymentError = {
1225
+ tag: "V1";
1226
+ value: HostPaymentError;
1227
+ };
1228
+ export const VersionedHostPaymentError: Codec<VersionedHostPaymentError>;
1229
+ /** Versioned envelope for [\`HostPaymentRequest\`]. */
1230
+ export type VersionedHostPaymentRequest = {
1231
+ tag: "V1";
1232
+ value: HostPaymentRequest;
1233
+ };
1234
+ export const VersionedHostPaymentRequest: Codec<VersionedHostPaymentRequest>;
1235
+ /** Versioned envelope for [\`HostPaymentResponse\`]. */
1236
+ export type VersionedHostPaymentResponse = {
1237
+ tag: "V1";
1238
+ value: HostPaymentResponse;
1239
+ };
1240
+ export const VersionedHostPaymentResponse: Codec<VersionedHostPaymentResponse>;
1241
+ /** Versioned envelope for [\`HostPaymentStatusSubscribeError\`]. */
1242
+ export type VersionedHostPaymentStatusSubscribeError = {
1243
+ tag: "V1";
1244
+ value: HostPaymentStatusSubscribeError;
1245
+ };
1246
+ export const VersionedHostPaymentStatusSubscribeError: Codec<VersionedHostPaymentStatusSubscribeError>;
1247
+ /** Versioned envelope for [\`HostPaymentStatusSubscribeItem\`]. */
1248
+ export type VersionedHostPaymentStatusSubscribeItem = {
1249
+ tag: "V1";
1250
+ value: HostPaymentStatusSubscribeItem;
1251
+ };
1252
+ export const VersionedHostPaymentStatusSubscribeItem: Codec<VersionedHostPaymentStatusSubscribeItem>;
1253
+ /** Versioned envelope for [\`HostPaymentStatusSubscribeRequest\`]. */
1254
+ export type VersionedHostPaymentStatusSubscribeRequest = {
1255
+ tag: "V1";
1256
+ value: HostPaymentStatusSubscribeRequest;
1257
+ };
1258
+ export const VersionedHostPaymentStatusSubscribeRequest: Codec<VersionedHostPaymentStatusSubscribeRequest>;
1259
+ /** Versioned envelope for [\`HostPaymentTopUpError\`]. */
1260
+ export type VersionedHostPaymentTopUpError = {
1261
+ tag: "V1";
1262
+ value: HostPaymentTopUpError;
1263
+ };
1264
+ export const VersionedHostPaymentTopUpError: Codec<VersionedHostPaymentTopUpError>;
1265
+ /** Versioned envelope for [\`HostPaymentTopUpRequest\`]. */
1266
+ export type VersionedHostPaymentTopUpRequest = {
1267
+ tag: "V1";
1268
+ value: HostPaymentTopUpRequest;
1269
+ };
1270
+ export const VersionedHostPaymentTopUpRequest: Codec<VersionedHostPaymentTopUpRequest>;
1271
+ /** Versioned envelope for [\`HostPaymentTopUpResponse\`]. */
1272
+ export type VersionedHostPaymentTopUpResponse = {
1273
+ tag: "V1";
1274
+ value?: undefined;
1275
+ };
1276
+ export const VersionedHostPaymentTopUpResponse: Codec<VersionedHostPaymentTopUpResponse>;
1277
+ /** Versioned envelope for [\`HostPushNotificationCancelError\`]. */
1278
+ export type VersionedHostPushNotificationCancelError = {
1279
+ tag: "V1";
1280
+ value: GenericError;
1281
+ };
1282
+ export const VersionedHostPushNotificationCancelError: Codec<VersionedHostPushNotificationCancelError>;
1283
+ /** Versioned envelope for [\`HostPushNotificationCancelRequest\`]. */
1284
+ export type VersionedHostPushNotificationCancelRequest = {
1285
+ tag: "V1";
1286
+ value: HostPushNotificationCancelRequest;
1287
+ };
1288
+ export const VersionedHostPushNotificationCancelRequest: Codec<VersionedHostPushNotificationCancelRequest>;
1289
+ /** Versioned envelope for [\`HostPushNotificationCancelResponse\`]. */
1290
+ export type VersionedHostPushNotificationCancelResponse = {
1291
+ tag: "V1";
1292
+ value?: undefined;
1293
+ };
1294
+ export const VersionedHostPushNotificationCancelResponse: Codec<VersionedHostPushNotificationCancelResponse>;
1295
+ /** Versioned envelope for [\`HostPushNotificationError\`]. */
1296
+ export type VersionedHostPushNotificationError = {
1297
+ tag: "V1";
1298
+ value: HostPushNotificationError;
1299
+ };
1300
+ export const VersionedHostPushNotificationError: Codec<VersionedHostPushNotificationError>;
1301
+ /** Versioned envelope for [\`HostPushNotificationRequest\`]. */
1302
+ export type VersionedHostPushNotificationRequest = {
1303
+ tag: "V1";
1304
+ value: HostPushNotificationRequest;
1305
+ };
1306
+ export const VersionedHostPushNotificationRequest: Codec<VersionedHostPushNotificationRequest>;
1307
+ /** Versioned envelope for [\`HostPushNotificationResponse\`]. */
1308
+ export type VersionedHostPushNotificationResponse = {
1309
+ tag: "V1";
1310
+ value: HostPushNotificationResponse;
1311
+ };
1312
+ export const VersionedHostPushNotificationResponse: Codec<VersionedHostPushNotificationResponse>;
1313
+ /** Versioned envelope for [\`HostRequestLoginError\`]. */
1314
+ export type VersionedHostRequestLoginError = {
1315
+ tag: "V1";
1316
+ value: HostRequestLoginError;
1317
+ };
1318
+ export const VersionedHostRequestLoginError: Codec<VersionedHostRequestLoginError>;
1319
+ /** Versioned envelope for [\`HostRequestLoginRequest\`]. */
1320
+ export type VersionedHostRequestLoginRequest = {
1321
+ tag: "V1";
1322
+ value: HostRequestLoginRequest;
1323
+ };
1324
+ export const VersionedHostRequestLoginRequest: Codec<VersionedHostRequestLoginRequest>;
1325
+ /** Versioned envelope for [\`HostRequestLoginResponse\`]. */
1326
+ export type VersionedHostRequestLoginResponse = {
1327
+ tag: "V1";
1328
+ value: HostRequestLoginResponse;
1329
+ };
1330
+ export const VersionedHostRequestLoginResponse: Codec<VersionedHostRequestLoginResponse>;
1331
+ /** Versioned envelope for [\`HostRequestResourceAllocationError\`]. */
1332
+ export type VersionedHostRequestResourceAllocationError = {
1333
+ tag: "V1";
1334
+ value: ResourceAllocationError;
1335
+ };
1336
+ export const VersionedHostRequestResourceAllocationError: Codec<VersionedHostRequestResourceAllocationError>;
1337
+ /** Versioned envelope for [\`HostRequestResourceAllocationRequest\`]. */
1338
+ export type VersionedHostRequestResourceAllocationRequest = {
1339
+ tag: "V1";
1340
+ value: HostRequestResourceAllocationRequest;
1341
+ };
1342
+ export const VersionedHostRequestResourceAllocationRequest: Codec<VersionedHostRequestResourceAllocationRequest>;
1343
+ /** Versioned envelope for [\`HostRequestResourceAllocationResponse\`]. */
1344
+ export type VersionedHostRequestResourceAllocationResponse = {
1345
+ tag: "V1";
1346
+ value: HostRequestResourceAllocationResponse;
1347
+ };
1348
+ export const VersionedHostRequestResourceAllocationResponse: Codec<VersionedHostRequestResourceAllocationResponse>;
1349
+ /**
1350
+ * Full Substrate extrinsic signing payload with all fields needed for signature
1351
+ * generation.
1352
+ */
1353
+ export interface HostSignPayloadData {
1354
+ /** Reference block hash. */
1355
+ blockHash: HexString;
1356
+ /** Reference block number. */
1357
+ blockNumber: HexString;
1358
+ /** Mortality era encoding. */
1359
+ era: HexString;
1360
+ /** Chain genesis hash. */
1361
+ genesisHash: HexString;
1362
+ /** SCALE-encoded call data. */
1363
+ method: HexString;
1364
+ /** Account nonce. */
1365
+ nonce: HexString;
1366
+ /** Runtime spec version. */
1367
+ specVersion: HexString;
1368
+ /** Transaction tip. */
1369
+ tip: HexString;
1370
+ /** Transaction format version. */
1371
+ transactionVersion: HexString;
1372
+ /** Extension identifiers. */
1373
+ signedExtensions: Array<string>;
1374
+ /** Extrinsic version. */
1375
+ version: number;
1376
+ /** For multi-asset tips. */
1377
+ assetId?: HexString;
1378
+ /** CheckMetadataHash extension. */
1379
+ metadataHash?: HexString;
1380
+ /** Metadata mode. */
1381
+ mode?: number;
1382
+ /** Request signed transaction back. */
1383
+ withSignedTransaction?: boolean;
1384
+ }
1385
+ export const HostSignPayloadData: Codec<HostSignPayloadData>;
1386
+ /** Versioned envelope for [\`HostSignPayloadError\`]. */
1387
+ export type VersionedHostSignPayloadError = {
1388
+ tag: "V1";
1389
+ value: HostSignPayloadError;
1390
+ };
1391
+ export const VersionedHostSignPayloadError: Codec<VersionedHostSignPayloadError>;
1392
+ /** Versioned envelope for [\`HostSignPayloadRequest\`]. */
1393
+ export type VersionedHostSignPayloadRequest = {
1394
+ tag: "V1";
1395
+ value: HostSignPayloadRequest;
1396
+ };
1397
+ export const VersionedHostSignPayloadRequest: Codec<VersionedHostSignPayloadRequest>;
1398
+ /** Versioned envelope for [\`HostSignPayloadResponse\`]. */
1399
+ export type VersionedHostSignPayloadResponse = {
1400
+ tag: "V1";
1401
+ value: HostSignPayloadResponse;
1402
+ };
1403
+ export const VersionedHostSignPayloadResponse: Codec<VersionedHostSignPayloadResponse>;
1404
+ /** Versioned envelope for [\`HostSignPayloadWithLegacyAccountError\`]. */
1405
+ export type VersionedHostSignPayloadWithLegacyAccountError = {
1406
+ tag: "V1";
1407
+ value: HostSignPayloadError;
1408
+ };
1409
+ export const VersionedHostSignPayloadWithLegacyAccountError: Codec<VersionedHostSignPayloadWithLegacyAccountError>;
1410
+ /** Versioned envelope for [\`HostSignPayloadWithLegacyAccountRequest\`]. */
1411
+ export type VersionedHostSignPayloadWithLegacyAccountRequest = {
1412
+ tag: "V1";
1413
+ value: HostSignPayloadWithLegacyAccountRequest;
1414
+ };
1415
+ export const VersionedHostSignPayloadWithLegacyAccountRequest: Codec<VersionedHostSignPayloadWithLegacyAccountRequest>;
1416
+ /** Versioned envelope for [\`HostSignPayloadWithLegacyAccountResponse\`]. */
1417
+ export type VersionedHostSignPayloadWithLegacyAccountResponse = {
1418
+ tag: "V1";
1419
+ value: HostSignPayloadResponse;
1420
+ };
1421
+ export const VersionedHostSignPayloadWithLegacyAccountResponse: Codec<VersionedHostSignPayloadWithLegacyAccountResponse>;
1422
+ /** Versioned envelope for [\`HostSignRawError\`]. */
1423
+ export type VersionedHostSignRawError = {
1424
+ tag: "V1";
1425
+ value: HostSignPayloadError;
1426
+ };
1427
+ export const VersionedHostSignRawError: Codec<VersionedHostSignRawError>;
1428
+ /** Versioned envelope for [\`HostSignRawRequest\`]. */
1429
+ export type VersionedHostSignRawRequest = {
1430
+ tag: "V1";
1431
+ value: HostSignRawRequest;
1432
+ };
1433
+ export const VersionedHostSignRawRequest: Codec<VersionedHostSignRawRequest>;
1434
+ /** Versioned envelope for [\`HostSignRawResponse\`]. */
1435
+ export type VersionedHostSignRawResponse = {
1436
+ tag: "V1";
1437
+ value: HostSignPayloadResponse;
1438
+ };
1439
+ export const VersionedHostSignRawResponse: Codec<VersionedHostSignRawResponse>;
1440
+ /** Versioned envelope for [\`HostSignRawWithLegacyAccountError\`]. */
1441
+ export type VersionedHostSignRawWithLegacyAccountError = {
1442
+ tag: "V1";
1443
+ value: HostSignPayloadError;
1444
+ };
1445
+ export const VersionedHostSignRawWithLegacyAccountError: Codec<VersionedHostSignRawWithLegacyAccountError>;
1446
+ /** Versioned envelope for [\`HostSignRawWithLegacyAccountRequest\`]. */
1447
+ export type VersionedHostSignRawWithLegacyAccountRequest = {
1448
+ tag: "V1";
1449
+ value: HostSignRawWithLegacyAccountRequest;
1450
+ };
1451
+ export const VersionedHostSignRawWithLegacyAccountRequest: Codec<VersionedHostSignRawWithLegacyAccountRequest>;
1452
+ /** Versioned envelope for [\`HostSignRawWithLegacyAccountResponse\`]. */
1453
+ export type VersionedHostSignRawWithLegacyAccountResponse = {
1454
+ tag: "V1";
1455
+ value: HostSignPayloadResponse;
1456
+ };
1457
+ export const VersionedHostSignRawWithLegacyAccountResponse: Codec<VersionedHostSignRawWithLegacyAccountResponse>;
1458
+ /** Versioned envelope for [\`HostThemeSubscribeItem\`]. */
1459
+ export type VersionedHostThemeSubscribeItem = {
1460
+ tag: "V1";
1461
+ value: HostThemeSubscribeItem;
1462
+ };
1463
+ export const VersionedHostThemeSubscribeItem: Codec<VersionedHostThemeSubscribeItem>;
1464
+ /**
1465
+ * A user-imported (legacy) account: public key plus an optional user-chosen
1466
+ * display name.
1467
+ *
1468
+ * Returned by [\`HostGetLegacyAccountsResponse\`]. Distinct from
1469
+ * [\`ProductAccount\`], which is protocol-derived and never carries a label.
1470
+ */
1471
+ export interface LegacyAccount {
1472
+ /** The account public key (variable-length bytes). */
1473
+ publicKey: HexString;
1474
+ /** Optional user-chosen display name. */
1475
+ name?: string;
1476
+ }
1477
+ export const LegacyAccount: Codec<LegacyAccount>;
1478
+ /**
1479
+ * Transaction payload for a legacy (non-product) account.
1480
+ *
1481
+ * Identical to [\`ProductAccountTxPayload\`] except the signer is a raw
1482
+ * 32-byte [\`AccountId\`].
1483
+ */
1484
+ export interface LegacyAccountTxPayload {
1485
+ /** Raw 32-byte public key of the legacy account. */
1486
+ signer: AccountId;
1487
+ /** Chain where the transaction will execute. */
1488
+ genesisHash: GenesisHash;
1489
+ /** SCALE-encoded Call data. */
1490
+ callData: HexString;
1491
+ /** Transaction extensions supplied by the caller. */
1492
+ extensions: Array<TxPayloadExtension>;
1493
+ /** 0 for Extrinsic V4, runtime-supported value for V5. */
1494
+ txExtVersion: number;
1495
+ }
1496
+ export const LegacyAccountTxPayload: Codec<LegacyAccountTxPayload>;
1497
+ /** Layout and styling modifiers applied to custom renderer components. */
1498
+ export type Modifier =
1499
+ /** Outer spacing. */
1500
+ {
1501
+ tag: "Margin";
1502
+ value: Dimensions;
1503
+ }
1504
+ /** Inner spacing. */
1505
+ | {
1506
+ tag: "Padding";
1507
+ value: Dimensions;
1508
+ }
1509
+ /** Background fill. */
1510
+ | {
1511
+ tag: "Background";
1512
+ value: Background;
1513
+ }
1514
+ /** Border style. */
1515
+ | {
1516
+ tag: "Border";
1517
+ value: BorderStyle;
1518
+ }
1519
+ /** Fixed height. */
1520
+ | {
1521
+ tag: "Height";
1522
+ value: {
1523
+ height: Size;
1524
+ };
1525
+ }
1526
+ /** Fixed width. */
1527
+ | {
1528
+ tag: "Width";
1529
+ value: {
1530
+ width: Size;
1531
+ };
1532
+ }
1533
+ /** Minimum width. */
1534
+ | {
1535
+ tag: "MinWidth";
1536
+ value: {
1537
+ width: Size;
1538
+ };
1539
+ }
1540
+ /** Minimum height. */
1541
+ | {
1542
+ tag: "MinHeight";
1543
+ value: {
1544
+ height: Size;
1545
+ };
1546
+ }
1547
+ /** Fill available width. */
1548
+ | {
1549
+ tag: "FillWidth";
1550
+ value: {
1551
+ enabled: boolean;
1552
+ };
1553
+ }
1554
+ /** Fill available height. */
1555
+ | {
1556
+ tag: "FillHeight";
1557
+ value: {
1558
+ enabled: boolean;
1559
+ };
1560
+ };
1561
+ export const Modifier: Codec<Modifier>;
1562
+ /** Opaque identifier for a push notification, unique per product. */
1563
+ export type NotificationId = number;
1564
+ export const NotificationId: Codec<NotificationId>;
1565
+ export type OperationStartedResult = {
1566
+ tag: "Started";
1567
+ value: {
1568
+ operationId: string;
1569
+ };
1570
+ } | {
1571
+ tag: "LimitReached";
1572
+ value?: undefined;
1573
+ };
1574
+ export const OperationStartedResult: Codec<OperationStartedResult>;
1575
+ /** Identifier selecting a product payment purse. */
1576
+ export type PaymentPurseId = number;
1577
+ export const PaymentPurseId: Codec<PaymentPurseId>;
1578
+ /**
1579
+ * Source for a payment top-up operation.
1580
+ *
1581
+ * See [RFC 0006].
1582
+ *
1583
+ * [RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94
1584
+ */
1585
+ export type PaymentTopUpSource =
1586
+ /** Fund from one of the calling product's scoped accounts. */
1587
+ {
1588
+ tag: "ProductAccount";
1589
+ value: {
1590
+ derivationIndex: number;
1591
+ };
1592
+ }
1593
+ /**
1594
+ * Fund from a one-time account represented by its private key. This is a
1595
+ * standard account holding public funds, not a coin key.
1596
+ */
1597
+ | {
1598
+ tag: "PrivateKey";
1599
+ value: {
1600
+ sr25519SecretKey: HexString;
1601
+ };
1602
+ }
1603
+ /**
1604
+ * Fund directly from coin secret keys. Each key is an sr25519 secret
1605
+ * controlling a single coin.
1606
+ */
1607
+ | {
1608
+ tag: "Coins";
1609
+ value: {
1610
+ sr25519SecretKeys: Array<HexString>;
1611
+ };
1612
+ };
1613
+ export const PaymentTopUpSource: Codec<PaymentTopUpSource>;
1614
+ /** Preimage submission error. */
1615
+ export type PreimageSubmitError =
1616
+ /** Catch-all. */
1617
+ {
1618
+ tag: "Unknown";
1619
+ value: {
1620
+ reason: string;
1621
+ };
1622
+ };
1623
+ export const PreimageSubmitError: Codec<PreimageSubmitError>;
1624
+ /** A product account: public key only, no display name. */
1625
+ export interface ProductAccount {
1626
+ /** The account public key (variable-length bytes). */
1627
+ publicKey: HexString;
1628
+ }
1629
+ export const ProductAccount: Codec<ProductAccount>;
1630
+ /**
1631
+ * Identifies a product-specific account by combining a dotNS domain name with a
1632
+ * derivation index.
1633
+ */
1634
+ export interface ProductAccountId {
1635
+ /** A dotNS domain name identifier (e.g., \`"my-product.dot"\`). */
1636
+ dotNsIdentifier: string;
1637
+ /** Key derivation index for generating product-specific accounts. */
1638
+ derivationIndex: number;
1639
+ }
1640
+ export const ProductAccountId: Codec<ProductAccountId>;
1641
+ /**
1642
+ * Transaction payload for a product account.
1643
+ *
1644
+ * Contains everything the host needs to construct a signed extrinsic.
1645
+ * The signer is a [\`ProductAccountId\`]; the host resolves the
1646
+ * corresponding key pair through its account management layer.
1647
+ */
1648
+ export interface ProductAccountTxPayload {
1649
+ /** Product account that will sign the transaction. */
1650
+ signer: ProductAccountId;
1651
+ /** Chain where the transaction will execute. */
1652
+ genesisHash: GenesisHash;
1653
+ /** SCALE-encoded Call data. */
1654
+ callData: HexString;
1655
+ /** Transaction extensions supplied by the caller. */
1656
+ extensions: Array<TxPayloadExtension>;
1657
+ /** 0 for Extrinsic V4, runtime-supported value for V5. */
1658
+ txExtVersion: number;
1659
+ }
1660
+ export const ProductAccountTxPayload: Codec<ProductAccountTxPayload>;
1661
+ /** Versioned envelope for [\`ProductChatCustomMessageRenderSubscribeItem\`]. */
1662
+ export type VersionedProductChatCustomMessageRenderSubscribeItem = {
1663
+ tag: "V1";
1664
+ value: CustomRendererNode;
1665
+ };
1666
+ export const VersionedProductChatCustomMessageRenderSubscribeItem: Codec<VersionedProductChatCustomMessageRenderSubscribeItem>;
1667
+ /** Versioned envelope for [\`ProductChatCustomMessageRenderSubscribeRequest\`]. */
1668
+ export type VersionedProductChatCustomMessageRenderSubscribeRequest = {
1669
+ tag: "V1";
1670
+ value: ProductChatCustomMessageRenderSubscribeRequest;
1671
+ };
1672
+ export const VersionedProductChatCustomMessageRenderSubscribeRequest: Codec<VersionedProductChatCustomMessageRenderSubscribeRequest>;
1673
+ /** Raw data to sign -- either binary bytes or a string message. */
1674
+ export type RawPayload =
1675
+ /** Raw binary data to sign. */
1676
+ {
1677
+ tag: "Bytes";
1678
+ value: {
1679
+ bytes: HexString;
1680
+ };
1681
+ }
1682
+ /** String message to sign. */
1683
+ | {
1684
+ tag: "Payload";
1685
+ value: {
1686
+ payload: string;
1687
+ };
1688
+ };
1689
+ export const RawPayload: Codec<RawPayload>;
1690
+ /** Versioned envelope for [\`RemoteChainHeadBodyError\`]. */
1691
+ export type VersionedRemoteChainHeadBodyError = {
1692
+ tag: "V1";
1693
+ value: GenericError;
1694
+ };
1695
+ export const VersionedRemoteChainHeadBodyError: Codec<VersionedRemoteChainHeadBodyError>;
1696
+ /** Versioned envelope for [\`RemoteChainHeadBodyRequest\`]. */
1697
+ export type VersionedRemoteChainHeadBodyRequest = {
1698
+ tag: "V1";
1699
+ value: RemoteChainHeadBodyRequest;
1700
+ };
1701
+ export const VersionedRemoteChainHeadBodyRequest: Codec<VersionedRemoteChainHeadBodyRequest>;
1702
+ /** Versioned envelope for [\`RemoteChainHeadBodyResponse\`]. */
1703
+ export type VersionedRemoteChainHeadBodyResponse = {
1704
+ tag: "V1";
1705
+ value: RemoteChainHeadBodyResponse;
1706
+ };
1707
+ export const VersionedRemoteChainHeadBodyResponse: Codec<VersionedRemoteChainHeadBodyResponse>;
1708
+ /** Versioned envelope for [\`RemoteChainHeadCallError\`]. */
1709
+ export type VersionedRemoteChainHeadCallError = {
1710
+ tag: "V1";
1711
+ value: GenericError;
1712
+ };
1713
+ export const VersionedRemoteChainHeadCallError: Codec<VersionedRemoteChainHeadCallError>;
1714
+ /** Versioned envelope for [\`RemoteChainHeadCallRequest\`]. */
1715
+ export type VersionedRemoteChainHeadCallRequest = {
1716
+ tag: "V1";
1717
+ value: RemoteChainHeadCallRequest;
1718
+ };
1719
+ export const VersionedRemoteChainHeadCallRequest: Codec<VersionedRemoteChainHeadCallRequest>;
1720
+ /** Versioned envelope for [\`RemoteChainHeadCallResponse\`]. */
1721
+ export type VersionedRemoteChainHeadCallResponse = {
1722
+ tag: "V1";
1723
+ value: RemoteChainHeadCallResponse;
1724
+ };
1725
+ export const VersionedRemoteChainHeadCallResponse: Codec<VersionedRemoteChainHeadCallResponse>;
1726
+ /** Versioned envelope for [\`RemoteChainHeadContinueError\`]. */
1727
+ export type VersionedRemoteChainHeadContinueError = {
1728
+ tag: "V1";
1729
+ value: GenericError;
1730
+ };
1731
+ export const VersionedRemoteChainHeadContinueError: Codec<VersionedRemoteChainHeadContinueError>;
1732
+ /** Versioned envelope for [\`RemoteChainHeadContinueRequest\`]. */
1733
+ export type VersionedRemoteChainHeadContinueRequest = {
1734
+ tag: "V1";
1735
+ value: RemoteChainHeadContinueRequest;
1736
+ };
1737
+ export const VersionedRemoteChainHeadContinueRequest: Codec<VersionedRemoteChainHeadContinueRequest>;
1738
+ /** Versioned envelope for [\`RemoteChainHeadContinueResponse\`]. */
1739
+ export type VersionedRemoteChainHeadContinueResponse = {
1740
+ tag: "V1";
1741
+ value?: undefined;
1742
+ };
1743
+ export const VersionedRemoteChainHeadContinueResponse: Codec<VersionedRemoteChainHeadContinueResponse>;
1744
+ /** Versioned envelope for [\`RemoteChainHeadFollowItem\`]. */
1745
+ export type VersionedRemoteChainHeadFollowItem = {
1746
+ tag: "V1";
1747
+ value: RemoteChainHeadFollowItem;
1748
+ };
1749
+ export const VersionedRemoteChainHeadFollowItem: Codec<VersionedRemoteChainHeadFollowItem>;
1750
+ /** Versioned envelope for [\`RemoteChainHeadFollowRequest\`]. */
1751
+ export type VersionedRemoteChainHeadFollowRequest = {
1752
+ tag: "V1";
1753
+ value: RemoteChainHeadFollowRequest;
1754
+ };
1755
+ export const VersionedRemoteChainHeadFollowRequest: Codec<VersionedRemoteChainHeadFollowRequest>;
1756
+ /** Versioned envelope for [\`RemoteChainHeadHeaderError\`]. */
1757
+ export type VersionedRemoteChainHeadHeaderError = {
1758
+ tag: "V1";
1759
+ value: GenericError;
1760
+ };
1761
+ export const VersionedRemoteChainHeadHeaderError: Codec<VersionedRemoteChainHeadHeaderError>;
1762
+ /** Versioned envelope for [\`RemoteChainHeadHeaderRequest\`]. */
1763
+ export type VersionedRemoteChainHeadHeaderRequest = {
1764
+ tag: "V1";
1765
+ value: RemoteChainHeadHeaderRequest;
1766
+ };
1767
+ export const VersionedRemoteChainHeadHeaderRequest: Codec<VersionedRemoteChainHeadHeaderRequest>;
1768
+ /** Versioned envelope for [\`RemoteChainHeadHeaderResponse\`]. */
1769
+ export type VersionedRemoteChainHeadHeaderResponse = {
1770
+ tag: "V1";
1771
+ value: RemoteChainHeadHeaderResponse;
1772
+ };
1773
+ export const VersionedRemoteChainHeadHeaderResponse: Codec<VersionedRemoteChainHeadHeaderResponse>;
1774
+ /** Versioned envelope for [\`RemoteChainHeadStopOperationError\`]. */
1775
+ export type VersionedRemoteChainHeadStopOperationError = {
1776
+ tag: "V1";
1777
+ value: GenericError;
1778
+ };
1779
+ export const VersionedRemoteChainHeadStopOperationError: Codec<VersionedRemoteChainHeadStopOperationError>;
1780
+ /** Versioned envelope for [\`RemoteChainHeadStopOperationRequest\`]. */
1781
+ export type VersionedRemoteChainHeadStopOperationRequest = {
1782
+ tag: "V1";
1783
+ value: RemoteChainHeadStopOperationRequest;
1784
+ };
1785
+ export const VersionedRemoteChainHeadStopOperationRequest: Codec<VersionedRemoteChainHeadStopOperationRequest>;
1786
+ /** Versioned envelope for [\`RemoteChainHeadStopOperationResponse\`]. */
1787
+ export type VersionedRemoteChainHeadStopOperationResponse = {
1788
+ tag: "V1";
1789
+ value?: undefined;
1790
+ };
1791
+ export const VersionedRemoteChainHeadStopOperationResponse: Codec<VersionedRemoteChainHeadStopOperationResponse>;
1792
+ /** Versioned envelope for [\`RemoteChainHeadStorageError\`]. */
1793
+ export type VersionedRemoteChainHeadStorageError = {
1794
+ tag: "V1";
1795
+ value: GenericError;
1796
+ };
1797
+ export const VersionedRemoteChainHeadStorageError: Codec<VersionedRemoteChainHeadStorageError>;
1798
+ /** Versioned envelope for [\`RemoteChainHeadStorageRequest\`]. */
1799
+ export type VersionedRemoteChainHeadStorageRequest = {
1800
+ tag: "V1";
1801
+ value: RemoteChainHeadStorageRequest;
1802
+ };
1803
+ export const VersionedRemoteChainHeadStorageRequest: Codec<VersionedRemoteChainHeadStorageRequest>;
1804
+ /** Versioned envelope for [\`RemoteChainHeadStorageResponse\`]. */
1805
+ export type VersionedRemoteChainHeadStorageResponse = {
1806
+ tag: "V1";
1807
+ value: RemoteChainHeadStorageResponse;
1808
+ };
1809
+ export const VersionedRemoteChainHeadStorageResponse: Codec<VersionedRemoteChainHeadStorageResponse>;
1810
+ /** Versioned envelope for [\`RemoteChainHeadUnpinError\`]. */
1811
+ export type VersionedRemoteChainHeadUnpinError = {
1812
+ tag: "V1";
1813
+ value: GenericError;
1814
+ };
1815
+ export const VersionedRemoteChainHeadUnpinError: Codec<VersionedRemoteChainHeadUnpinError>;
1816
+ /** Versioned envelope for [\`RemoteChainHeadUnpinRequest\`]. */
1817
+ export type VersionedRemoteChainHeadUnpinRequest = {
1818
+ tag: "V1";
1819
+ value: RemoteChainHeadUnpinRequest;
1820
+ };
1821
+ export const VersionedRemoteChainHeadUnpinRequest: Codec<VersionedRemoteChainHeadUnpinRequest>;
1822
+ /** Versioned envelope for [\`RemoteChainHeadUnpinResponse\`]. */
1823
+ export type VersionedRemoteChainHeadUnpinResponse = {
1824
+ tag: "V1";
1825
+ value?: undefined;
1826
+ };
1827
+ export const VersionedRemoteChainHeadUnpinResponse: Codec<VersionedRemoteChainHeadUnpinResponse>;
1828
+ /** Versioned envelope for [\`RemoteChainSpecChainNameError\`]. */
1829
+ export type VersionedRemoteChainSpecChainNameError = {
1830
+ tag: "V1";
1831
+ value: GenericError;
1832
+ };
1833
+ export const VersionedRemoteChainSpecChainNameError: Codec<VersionedRemoteChainSpecChainNameError>;
1834
+ /** Versioned envelope for [\`RemoteChainSpecChainNameRequest\`]. */
1835
+ export type VersionedRemoteChainSpecChainNameRequest = {
1836
+ tag: "V1";
1837
+ value: RemoteChainSpecChainNameRequest;
1838
+ };
1839
+ export const VersionedRemoteChainSpecChainNameRequest: Codec<VersionedRemoteChainSpecChainNameRequest>;
1840
+ /** Versioned envelope for [\`RemoteChainSpecChainNameResponse\`]. */
1841
+ export type VersionedRemoteChainSpecChainNameResponse = {
1842
+ tag: "V1";
1843
+ value: RemoteChainSpecChainNameResponse;
1844
+ };
1845
+ export const VersionedRemoteChainSpecChainNameResponse: Codec<VersionedRemoteChainSpecChainNameResponse>;
1846
+ /** Versioned envelope for [\`RemoteChainSpecGenesisHashError\`]. */
1847
+ export type VersionedRemoteChainSpecGenesisHashError = {
1848
+ tag: "V1";
1849
+ value: GenericError;
1850
+ };
1851
+ export const VersionedRemoteChainSpecGenesisHashError: Codec<VersionedRemoteChainSpecGenesisHashError>;
1852
+ /** Versioned envelope for [\`RemoteChainSpecGenesisHashRequest\`]. */
1853
+ export type VersionedRemoteChainSpecGenesisHashRequest = {
1854
+ tag: "V1";
1855
+ value: RemoteChainSpecGenesisHashRequest;
1856
+ };
1857
+ export const VersionedRemoteChainSpecGenesisHashRequest: Codec<VersionedRemoteChainSpecGenesisHashRequest>;
1858
+ /** Versioned envelope for [\`RemoteChainSpecGenesisHashResponse\`]. */
1859
+ export type VersionedRemoteChainSpecGenesisHashResponse = {
1860
+ tag: "V1";
1861
+ value: RemoteChainSpecGenesisHashResponse;
1862
+ };
1863
+ export const VersionedRemoteChainSpecGenesisHashResponse: Codec<VersionedRemoteChainSpecGenesisHashResponse>;
1864
+ /** Versioned envelope for [\`RemoteChainSpecPropertiesError\`]. */
1865
+ export type VersionedRemoteChainSpecPropertiesError = {
1866
+ tag: "V1";
1867
+ value: GenericError;
1868
+ };
1869
+ export const VersionedRemoteChainSpecPropertiesError: Codec<VersionedRemoteChainSpecPropertiesError>;
1870
+ /** Versioned envelope for [\`RemoteChainSpecPropertiesRequest\`]. */
1871
+ export type VersionedRemoteChainSpecPropertiesRequest = {
1872
+ tag: "V1";
1873
+ value: RemoteChainSpecPropertiesRequest;
1874
+ };
1875
+ export const VersionedRemoteChainSpecPropertiesRequest: Codec<VersionedRemoteChainSpecPropertiesRequest>;
1876
+ /** Versioned envelope for [\`RemoteChainSpecPropertiesResponse\`]. */
1877
+ export type VersionedRemoteChainSpecPropertiesResponse = {
1878
+ tag: "V1";
1879
+ value: RemoteChainSpecPropertiesResponse;
1880
+ };
1881
+ export const VersionedRemoteChainSpecPropertiesResponse: Codec<VersionedRemoteChainSpecPropertiesResponse>;
1882
+ /** Versioned envelope for [\`RemoteChainTransactionBroadcastError\`]. */
1883
+ export type VersionedRemoteChainTransactionBroadcastError = {
1884
+ tag: "V1";
1885
+ value: GenericError;
1886
+ };
1887
+ export const VersionedRemoteChainTransactionBroadcastError: Codec<VersionedRemoteChainTransactionBroadcastError>;
1888
+ /** Versioned envelope for [\`RemoteChainTransactionBroadcastRequest\`]. */
1889
+ export type VersionedRemoteChainTransactionBroadcastRequest = {
1890
+ tag: "V1";
1891
+ value: RemoteChainTransactionBroadcastRequest;
1892
+ };
1893
+ export const VersionedRemoteChainTransactionBroadcastRequest: Codec<VersionedRemoteChainTransactionBroadcastRequest>;
1894
+ /** Versioned envelope for [\`RemoteChainTransactionBroadcastResponse\`]. */
1895
+ export type VersionedRemoteChainTransactionBroadcastResponse = {
1896
+ tag: "V1";
1897
+ value: RemoteChainTransactionBroadcastResponse;
1898
+ };
1899
+ export const VersionedRemoteChainTransactionBroadcastResponse: Codec<VersionedRemoteChainTransactionBroadcastResponse>;
1900
+ /** Versioned envelope for [\`RemoteChainTransactionStopError\`]. */
1901
+ export type VersionedRemoteChainTransactionStopError = {
1902
+ tag: "V1";
1903
+ value: GenericError;
1904
+ };
1905
+ export const VersionedRemoteChainTransactionStopError: Codec<VersionedRemoteChainTransactionStopError>;
1906
+ /** Versioned envelope for [\`RemoteChainTransactionStopRequest\`]. */
1907
+ export type VersionedRemoteChainTransactionStopRequest = {
1908
+ tag: "V1";
1909
+ value: RemoteChainTransactionStopRequest;
1910
+ };
1911
+ export const VersionedRemoteChainTransactionStopRequest: Codec<VersionedRemoteChainTransactionStopRequest>;
1912
+ /** Versioned envelope for [\`RemoteChainTransactionStopResponse\`]. */
1913
+ export type VersionedRemoteChainTransactionStopResponse = {
1914
+ tag: "V1";
1915
+ value?: undefined;
1916
+ };
1917
+ export const VersionedRemoteChainTransactionStopResponse: Codec<VersionedRemoteChainTransactionStopResponse>;
1918
+ /**
1919
+ * One remote-operation permission requested by the product (RFC 0002).
1920
+ *
1921
+ * \`ChainSubmit\`, \`PreimageSubmit\`, and \`StatementSubmit\` are also triggered
1922
+ * implicitly by the corresponding business calls when not yet granted.
1923
+ */
1924
+ export type RemotePermission =
1925
+ /** Outbound HTTP/WebSocket access to a set of domains. */
1926
+ {
1927
+ tag: "Remote";
1928
+ value: {
1929
+ domains: Array<string>;
1930
+ };
1931
+ }
1932
+ /** WebRTC media access. */
1933
+ | {
1934
+ tag: "WebRtc";
1935
+ value?: undefined;
1936
+ }
1937
+ /** Submitting transactions on behalf of the user via \`remote_chain_transaction_broadcast\`. */
1938
+ | {
1939
+ tag: "ChainSubmit";
1940
+ value?: undefined;
1941
+ }
1942
+ /** Submitting preimages on behalf of the user via \`remote_preimage_submit\`. */
1943
+ | {
1944
+ tag: "PreimageSubmit";
1945
+ value?: undefined;
1946
+ }
1947
+ /** Submitting statements on behalf of the user via \`remote_statement_store_submit\`. */
1948
+ | {
1949
+ tag: "StatementSubmit";
1950
+ value?: undefined;
1951
+ };
1952
+ export const RemotePermission: Codec<RemotePermission>;
1953
+ /** Versioned envelope for [\`RemotePermissionError\`]. */
1954
+ export type VersionedRemotePermissionError = {
1955
+ tag: "V1";
1956
+ value: GenericError;
1957
+ };
1958
+ export const VersionedRemotePermissionError: Codec<VersionedRemotePermissionError>;
1959
+ /** Versioned envelope for [\`RemotePermissionRequest\`]. */
1960
+ export type VersionedRemotePermissionRequest = {
1961
+ tag: "V1";
1962
+ value: RemotePermissionRequest;
1963
+ };
1964
+ export const VersionedRemotePermissionRequest: Codec<VersionedRemotePermissionRequest>;
1965
+ /** Versioned envelope for [\`RemotePermissionResponse\`]. */
1966
+ export type VersionedRemotePermissionResponse = {
1967
+ tag: "V1";
1968
+ value: RemotePermissionResponse;
1969
+ };
1970
+ export const VersionedRemotePermissionResponse: Codec<VersionedRemotePermissionResponse>;
1971
+ /** Versioned envelope for [\`RemotePreimageLookupSubscribeItem\`]. */
1972
+ export type VersionedRemotePreimageLookupSubscribeItem = {
1973
+ tag: "V1";
1974
+ value: RemotePreimageLookupSubscribeItem;
1975
+ };
1976
+ export const VersionedRemotePreimageLookupSubscribeItem: Codec<VersionedRemotePreimageLookupSubscribeItem>;
1977
+ /** Versioned envelope for [\`RemotePreimageLookupSubscribeRequest\`]. */
1978
+ export type VersionedRemotePreimageLookupSubscribeRequest = {
1979
+ tag: "V1";
1980
+ value: RemotePreimageLookupSubscribeRequest;
1981
+ };
1982
+ export const VersionedRemotePreimageLookupSubscribeRequest: Codec<VersionedRemotePreimageLookupSubscribeRequest>;
1983
+ /** Versioned envelope for [\`RemotePreimageSubmitError\`]. */
1984
+ export type VersionedRemotePreimageSubmitError = {
1985
+ tag: "V1";
1986
+ value: PreimageSubmitError;
1987
+ };
1988
+ export const VersionedRemotePreimageSubmitError: Codec<VersionedRemotePreimageSubmitError>;
1989
+ /** Versioned envelope for [\`RemotePreimageSubmitRequest\`]. */
1990
+ export type VersionedRemotePreimageSubmitRequest = {
1991
+ tag: "V1";
1992
+ value: HexString;
1993
+ };
1994
+ export const VersionedRemotePreimageSubmitRequest: Codec<VersionedRemotePreimageSubmitRequest>;
1995
+ /** Versioned envelope for [\`RemotePreimageSubmitResponse\`]. */
1996
+ export type VersionedRemotePreimageSubmitResponse = {
1997
+ tag: "V1";
1998
+ value: HexString;
1999
+ };
2000
+ export const VersionedRemotePreimageSubmitResponse: Codec<VersionedRemotePreimageSubmitResponse>;
2001
+ /** Versioned envelope for [\`RemoteStatementStoreCreateProofAuthorizedError\`]. */
2002
+ export type VersionedRemoteStatementStoreCreateProofAuthorizedError = {
2003
+ tag: "V1";
2004
+ value: RemoteStatementStoreCreateProofError;
2005
+ };
2006
+ export const VersionedRemoteStatementStoreCreateProofAuthorizedError: Codec<VersionedRemoteStatementStoreCreateProofAuthorizedError>;
2007
+ /** Versioned envelope for [\`RemoteStatementStoreCreateProofAuthorizedRequest\`]. */
2008
+ export type VersionedRemoteStatementStoreCreateProofAuthorizedRequest = {
2009
+ tag: "V1";
2010
+ value: Statement;
2011
+ };
2012
+ export const VersionedRemoteStatementStoreCreateProofAuthorizedRequest: Codec<VersionedRemoteStatementStoreCreateProofAuthorizedRequest>;
2013
+ /** Versioned envelope for [\`RemoteStatementStoreCreateProofAuthorizedResponse\`]. */
2014
+ export type VersionedRemoteStatementStoreCreateProofAuthorizedResponse = {
2015
+ tag: "V1";
2016
+ value: RemoteStatementStoreCreateProofResponse;
2017
+ };
2018
+ export const VersionedRemoteStatementStoreCreateProofAuthorizedResponse: Codec<VersionedRemoteStatementStoreCreateProofAuthorizedResponse>;
2019
+ /** Versioned envelope for [\`RemoteStatementStoreCreateProofError\`]. */
2020
+ export type VersionedRemoteStatementStoreCreateProofError = {
2021
+ tag: "V1";
2022
+ value: RemoteStatementStoreCreateProofError;
2023
+ };
2024
+ export const VersionedRemoteStatementStoreCreateProofError: Codec<VersionedRemoteStatementStoreCreateProofError>;
2025
+ /** Versioned envelope for [\`RemoteStatementStoreCreateProofRequest\`]. */
2026
+ export type VersionedRemoteStatementStoreCreateProofRequest = {
2027
+ tag: "V1";
2028
+ value: RemoteStatementStoreCreateProofRequest;
2029
+ };
2030
+ export const VersionedRemoteStatementStoreCreateProofRequest: Codec<VersionedRemoteStatementStoreCreateProofRequest>;
2031
+ /** Versioned envelope for [\`RemoteStatementStoreCreateProofResponse\`]. */
2032
+ export type VersionedRemoteStatementStoreCreateProofResponse = {
2033
+ tag: "V1";
2034
+ value: RemoteStatementStoreCreateProofResponse;
2035
+ };
2036
+ export const VersionedRemoteStatementStoreCreateProofResponse: Codec<VersionedRemoteStatementStoreCreateProofResponse>;
2037
+ /** Versioned envelope for [\`RemoteStatementStoreSubmitError\`]. */
2038
+ export type VersionedRemoteStatementStoreSubmitError = {
2039
+ tag: "V1";
2040
+ value: GenericError;
2041
+ };
2042
+ export const VersionedRemoteStatementStoreSubmitError: Codec<VersionedRemoteStatementStoreSubmitError>;
2043
+ /** Versioned envelope for [\`RemoteStatementStoreSubmitRequest\`]. */
2044
+ export type VersionedRemoteStatementStoreSubmitRequest = {
2045
+ tag: "V1";
2046
+ value: SignedStatement;
2047
+ };
2048
+ export const VersionedRemoteStatementStoreSubmitRequest: Codec<VersionedRemoteStatementStoreSubmitRequest>;
2049
+ /** Versioned envelope for [\`RemoteStatementStoreSubscribeItem\`]. */
2050
+ export type VersionedRemoteStatementStoreSubscribeItem = {
2051
+ tag: "V1";
2052
+ value: RemoteStatementStoreSubscribeItem;
2053
+ };
2054
+ export const VersionedRemoteStatementStoreSubscribeItem: Codec<VersionedRemoteStatementStoreSubscribeItem>;
2055
+ /** Versioned envelope for [\`RemoteStatementStoreSubscribeRequest\`]. */
2056
+ export type VersionedRemoteStatementStoreSubscribeRequest = {
2057
+ tag: "V1";
2058
+ value: RemoteStatementStoreSubscribeRequest;
2059
+ };
2060
+ export const VersionedRemoteStatementStoreSubscribeRequest: Codec<VersionedRemoteStatementStoreSubscribeRequest>;
2061
+ /** Error from [\`crate::api::ResourceAllocation::request\`]. */
2062
+ export type ResourceAllocationError =
2063
+ /** Catch-all. */
2064
+ {
2065
+ tag: "Unknown";
2066
+ value: {
2067
+ reason: string;
2068
+ };
2069
+ };
2070
+ export const ResourceAllocationError: Codec<ResourceAllocationError>;
2071
+ /** Locates a specific ring on a specific chain for ring VRF operations. */
2072
+ export interface RingLocation {
2073
+ /** Chain genesis hash. */
2074
+ genesisHash: HexString;
2075
+ /** Root hash of the ring. */
2076
+ ringRootHash: HexString;
2077
+ /** Optional location hints. */
2078
+ hints?: RingLocationHint;
2079
+ }
2080
+ export const RingLocation: Codec<RingLocation>;
2081
+ /** Hints for locating a ring on-chain. */
2082
+ export interface RingLocationHint {
2083
+ /** Optional pallet instance index. */
2084
+ palletInstance?: number;
2085
+ }
2086
+ export const RingLocationHint: Codec<RingLocationHint>;
2087
+ /** Properties for a [\`CustomRendererNode::Row\`] layout. */
2088
+ export interface RowProps {
2089
+ /** Vertical alignment of children. */
2090
+ verticalAlignment?: VerticalAlignment;
2091
+ /** Horizontal arrangement of children. */
2092
+ horizontalArrangement?: Arrangement;
2093
+ }
2094
+ export const RowProps: Codec<RowProps>;
2095
+ export interface RuntimeApi {
2096
+ /** Runtime API name. */
2097
+ name: string;
2098
+ /** Runtime API version. */
2099
+ version: number;
2100
+ }
2101
+ export const RuntimeApi: Codec<RuntimeApi>;
2102
+ export interface RuntimeSpec {
2103
+ /** Specification name. */
2104
+ specName: string;
2105
+ /** Implementation name. */
2106
+ implName: string;
2107
+ /** Spec version number. */
2108
+ specVersion: number;
2109
+ /** Implementation version. */
2110
+ implVersion: number;
2111
+ /** Transaction format version. */
2112
+ transactionVersion?: number;
2113
+ /** Supported runtime APIs. */
2114
+ apis: Array<RuntimeApi>;
2115
+ }
2116
+ export const RuntimeSpec: Codec<RuntimeSpec>;
2117
+ export type RuntimeType = {
2118
+ tag: "Valid";
2119
+ value: RuntimeSpec;
2120
+ } | {
2121
+ tag: "Invalid";
2122
+ value: {
2123
+ error: string;
2124
+ };
2125
+ };
2126
+ export const RuntimeType: Codec<RuntimeType>;
2127
+ /** Shape for borders and backgrounds. */
2128
+ export type Shape =
2129
+ /** Border radius value. */
2130
+ {
2131
+ tag: "Rounded";
2132
+ value: {
2133
+ radius: Size;
2134
+ };
2135
+ }
2136
+ /** Circular shape. */
2137
+ | {
2138
+ tag: "Circle";
2139
+ value?: undefined;
2140
+ };
2141
+ export const Shape: Codec<Shape>;
2142
+ /** A statement with a required (not optional) proof. */
2143
+ export interface SignedStatement {
2144
+ /** Required cryptographic proof. */
2145
+ proof: StatementProof;
2146
+ /** Optional decryption key. */
2147
+ decryptionKey?: HexString;
2148
+ /** Optional Unix timestamp expiry. */
2149
+ expiry?: bigint;
2150
+ /** Optional channel. */
2151
+ channel?: HexString;
2152
+ /** [u8; 32] tags. */
2153
+ topics: Array<HexString>;
2154
+ /** Optional data payload. */
2155
+ data?: HexString;
2156
+ }
2157
+ export const SignedStatement: Codec<SignedStatement>;
2158
+ /**
2159
+ * A size/dimension value (logical pixels) used across the custom renderer.
2160
+ *
2161
+ * Encoded as a SCALE \`Compact<u64>\`: the common small values cost a single
2162
+ * byte on the wire instead of eight.
2163
+ */
2164
+ export type Size = number | bigint;
2165
+ export const Size: Codec<Size>;
2166
+ /** A statement with optional proof and metadata. */
2167
+ export interface Statement {
2168
+ /** Optional cryptographic proof. */
2169
+ proof?: StatementProof;
2170
+ /** Optional decryption key. */
2171
+ decryptionKey?: HexString;
2172
+ /** Optional Unix timestamp expiry. */
2173
+ expiry?: bigint;
2174
+ /** Optional channel. */
2175
+ channel?: HexString;
2176
+ /** [u8; 32] tags. */
2177
+ topics: Array<HexString>;
2178
+ /** Optional data payload. */
2179
+ data?: HexString;
2180
+ }
2181
+ export const Statement: Codec<Statement>;
2182
+ /** Cryptographic proof for a statement. */
2183
+ export type StatementProof =
2184
+ /** Sr25519 signature proof. */
2185
+ {
2186
+ tag: "Sr25519";
2187
+ value: {
2188
+ signature: HexString;
2189
+ signer: HexString;
2190
+ };
2191
+ }
2192
+ /** Ed25519 signature proof. */
2193
+ | {
2194
+ tag: "Ed25519";
2195
+ value: {
2196
+ signature: HexString;
2197
+ signer: HexString;
2198
+ };
2199
+ }
2200
+ /** ECDSA signature proof. */
2201
+ | {
2202
+ tag: "Ecdsa";
2203
+ value: {
2204
+ signature: HexString;
2205
+ signer: HexString;
2206
+ };
2207
+ }
2208
+ /** On-chain event proof. */
2209
+ | {
2210
+ tag: "OnChain";
2211
+ value: {
2212
+ who: HexString;
2213
+ blockHash: HexString;
2214
+ event: bigint;
2215
+ };
2216
+ };
2217
+ export const StatementProof: Codec<StatementProof>;
2218
+ export interface StorageQueryItem {
2219
+ /** Storage key to query. */
2220
+ key: HexString;
2221
+ /** What to return. */
2222
+ queryType: StorageQueryType;
2223
+ }
2224
+ export const StorageQueryItem: Codec<StorageQueryItem>;
2225
+ export type StorageQueryType = "Value" | "Hash" | "ClosestDescendantMerkleValue" | "DescendantsValues" | "DescendantsHashes";
2226
+ export const StorageQueryType: Codec<StorageQueryType>;
2227
+ export interface StorageResultItem {
2228
+ /** The queried key. */
2229
+ key: HexString;
2230
+ /** Value, if requested. */
2231
+ value?: HexString;
2232
+ /** Hash, if requested. */
2233
+ hash?: HexString;
2234
+ /** Merkle value, if requested. */
2235
+ closestDescendantMerkleValue?: HexString;
2236
+ }
2237
+ export const StorageResultItem: Codec<StorageResultItem>;
2238
+ /** Properties for a [\`CustomRendererNode::TextField\`]. */
2239
+ export interface TextFieldProps {
2240
+ /** Current text value. */
2241
+ text: string;
2242
+ /** Placeholder text. */
2243
+ placeholder?: string;
2244
+ /** Field label. */
2245
+ label?: string;
2246
+ /** Whether the field is enabled. Absent leaves the default to the host. */
2247
+ enabled: boolean | undefined;
2248
+ /** Action identifier triggered when the value changes. */
2249
+ valueChangeAction?: string;
2250
+ }
2251
+ export const TextFieldProps: Codec<TextFieldProps>;
2252
+ /** Properties for a [\`CustomRendererNode::Text\`] display. */
2253
+ export interface TextProps {
2254
+ /** Typography preset. */
2255
+ style?: TypographyStyle;
2256
+ /** Text color. */
2257
+ color?: ColorToken;
2258
+ }
2259
+ export const TextProps: Codec<TextProps>;
2260
+ /** Identifies a named theme. */
2261
+ export type ThemeName =
2262
+ /** A custom named theme. */
2263
+ {
2264
+ tag: "Custom";
2265
+ value: string;
2266
+ }
2267
+ /** The host's default theme. */
2268
+ | {
2269
+ tag: "Default";
2270
+ value?: undefined;
2271
+ };
2272
+ export const ThemeName: Codec<ThemeName>;
2273
+ /** Light or dark variant. */
2274
+ export type ThemeVariant = "Light" | "Dark";
2275
+ export const ThemeVariant: Codec<ThemeVariant>;
2276
+ /** 32-byte statement topic. */
2277
+ export type Topic = HexString;
2278
+ export const Topic: Codec<Topic>;
2279
+ /** A signed extension for a transaction payload. */
2280
+ export interface TxPayloadExtension {
2281
+ /** Extension name (e.g., \`"CheckSpecVersion"\`). */
2282
+ id: string;
2283
+ /** SCALE-encoded extra data (in extrinsic body). */
2284
+ extra: HexString;
2285
+ /** SCALE-encoded implicit data (signed, not in body). */
2286
+ additionalSigned: HexString;
2287
+ }
2288
+ export const TxPayloadExtension: Codec<TxPayloadExtension>;
2289
+ /** Text typography presets. */
2290
+ export type TypographyStyle = "HeadlineLarge" | "TitleMediumRegular" | "BodyLargeRegular" | "BodyMediumRegular" | "BodySmallRegular";
2291
+ export const TypographyStyle: Codec<TypographyStyle>;
2292
+ /** User's authentication state. */
2293
+ export type HostAccountConnectionStatusSubscribeItem = "Disconnected" | "Connected";
2294
+ export const HostAccountConnectionStatusSubscribeItem: Codec<HostAccountConnectionStatusSubscribeItem>;
2295
+ /** Error returned when ring VRF proof creation fails. */
2296
+ export type HostAccountCreateProofError =
2297
+ /** Ring not available at the specified location. */
2298
+ {
2299
+ tag: "RingNotFound";
2300
+ value?: undefined;
2301
+ }
2302
+ /** User or host rejected. */
2303
+ | {
2304
+ tag: "Rejected";
2305
+ value?: undefined;
2306
+ }
2307
+ /** Catch-all. */
2308
+ | {
2309
+ tag: "Unknown";
2310
+ value: {
2311
+ reason: string;
2312
+ };
2313
+ };
2314
+ export const HostAccountCreateProofError: Codec<HostAccountCreateProofError>;
2315
+ /** Request to create a ring VRF proof for a product account. */
2316
+ export interface HostAccountCreateProofRequest {
2317
+ /** Product account that should create the proof. */
2318
+ productAccountId: ProductAccountId;
2319
+ /** Ring location to use for proof generation. */
2320
+ ringLocation: RingLocation;
2321
+ /** Context bytes bound to the proof. */
2322
+ context: HexString;
2323
+ }
2324
+ export const HostAccountCreateProofRequest: Codec<HostAccountCreateProofRequest>;
2325
+ /** Response containing a ring VRF proof. */
2326
+ export interface HostAccountCreateProofResponse {
2327
+ /** Variable-length ring VRF proof bytes. */
2328
+ proof: HexString;
2329
+ }
2330
+ export const HostAccountCreateProofResponse: Codec<HostAccountCreateProofResponse>;
2331
+ /** Request to retrieve a contextual alias for a product account. */
2332
+ export interface HostAccountGetAliasRequest {
2333
+ /** Product account to derive the alias for. */
2334
+ productAccountId: ProductAccountId;
2335
+ }
2336
+ export const HostAccountGetAliasRequest: Codec<HostAccountGetAliasRequest>;
2337
+ /** A privacy-preserving alias derived via ring VRF, bound to a specific context. */
2338
+ export interface HostAccountGetAliasResponse {
2339
+ /** 32-byte context identifier. */
2340
+ context: HexString;
2341
+ /** Ring VRF alias (variable length). */
2342
+ alias: HexString;
2343
+ }
2344
+ export const HostAccountGetAliasResponse: Codec<HostAccountGetAliasResponse>;
2345
+ /** Error returned when credential/account requests fail. */
2346
+ export type HostAccountGetError =
2347
+ /** User is not logged in. */
2348
+ {
2349
+ tag: "NotConnected";
2350
+ value?: undefined;
2351
+ }
2352
+ /** User or host rejected the request. */
2353
+ | {
2354
+ tag: "Rejected";
2355
+ value?: undefined;
2356
+ }
2357
+ /** Domain identifier is invalid. */
2358
+ | {
2359
+ tag: "DomainNotValid";
2360
+ value?: undefined;
2361
+ }
2362
+ /** Catch-all error with reason. */
2363
+ | {
2364
+ tag: "Unknown";
2365
+ value: {
2366
+ reason: string;
2367
+ };
2368
+ };
2369
+ export const HostAccountGetError: Codec<HostAccountGetError>;
2370
+ /** Request to retrieve a product-scoped account. */
2371
+ export interface HostAccountGetRequest {
2372
+ /** Product account to retrieve. */
2373
+ productAccountId: ProductAccountId;
2374
+ }
2375
+ export const HostAccountGetRequest: Codec<HostAccountGetRequest>;
2376
+ /** Response containing a product-scoped account. */
2377
+ export interface HostAccountGetResponse {
2378
+ /** Retrieved product account. */
2379
+ account: ProductAccount;
2380
+ }
2381
+ export const HostAccountGetResponse: Codec<HostAccountGetResponse>;
2382
+ /** A chat action received from the host. */
2383
+ export interface HostChatActionSubscribeItem {
2384
+ /** Room where the action occurred. */
2385
+ roomId: string;
2386
+ /** Peer who initiated the action. */
2387
+ peer: string;
2388
+ /** The action payload. */
2389
+ payload: ChatActionPayload;
2390
+ }
2391
+ export const HostChatActionSubscribeItem: Codec<HostChatActionSubscribeItem>;
2392
+ /** Chat room registration error. */
2393
+ export type HostChatCreateRoomError =
2394
+ /** Not allowed. */
2395
+ {
2396
+ tag: "PermissionDenied";
2397
+ value?: undefined;
2398
+ }
2399
+ /** Catch-all. */
2400
+ | {
2401
+ tag: "Unknown";
2402
+ value: {
2403
+ reason: string;
2404
+ };
2405
+ };
2406
+ export const HostChatCreateRoomError: Codec<HostChatCreateRoomError>;
2407
+ /** Request to create a chat room. */
2408
+ export interface HostChatCreateRoomRequest {
2409
+ /** Unique room identifier. */
2410
+ roomId: string;
2411
+ /** Room display name. */
2412
+ name: string;
2413
+ /** URL or base64 image. */
2414
+ icon: string;
2415
+ }
2416
+ export const HostChatCreateRoomRequest: Codec<HostChatCreateRoomRequest>;
2417
+ /** Result of a room registration. */
2418
+ export interface HostChatCreateRoomResponse {
2419
+ /** \`New\` or \`Exists\`. */
2420
+ status: ChatRoomRegistrationStatus;
2421
+ }
2422
+ export const HostChatCreateRoomResponse: Codec<HostChatCreateRoomResponse>;
2423
+ /** Item containing the current chat rooms. */
2424
+ export interface HostChatListSubscribeItem {
2425
+ /** Chat rooms the product participates in. */
2426
+ rooms: Array<ChatRoom>;
2427
+ }
2428
+ export const HostChatListSubscribeItem: Codec<HostChatListSubscribeItem>;
2429
+ /** Chat message posting error. */
2430
+ export type HostChatPostMessageError =
2431
+ /** Message exceeded size limit. */
2432
+ {
2433
+ tag: "MessageTooLarge";
2434
+ value?: undefined;
2435
+ }
2436
+ /** Catch-all. */
2437
+ | {
2438
+ tag: "Unknown";
2439
+ value: {
2440
+ reason: string;
2441
+ };
2442
+ };
2443
+ export const HostChatPostMessageError: Codec<HostChatPostMessageError>;
2444
+ /** Request to post a message to a chat room. */
2445
+ export interface HostChatPostMessageRequest {
2446
+ /** Room to post to. */
2447
+ roomId: string;
2448
+ /** Message content. */
2449
+ payload: ChatMessageContent;
2450
+ }
2451
+ export const HostChatPostMessageRequest: Codec<HostChatPostMessageRequest>;
2452
+ /** Result of posting a message. */
2453
+ export interface HostChatPostMessageResponse {
2454
+ /** Assigned message ID. */
2455
+ messageId: string;
2456
+ }
2457
+ export const HostChatPostMessageResponse: Codec<HostChatPostMessageResponse>;
2458
+ /** Chat bot registration error. */
2459
+ export type HostChatRegisterBotError =
2460
+ /** Not allowed. */
2461
+ {
2462
+ tag: "PermissionDenied";
2463
+ value?: undefined;
2464
+ }
2465
+ /** Catch-all. */
2466
+ | {
2467
+ tag: "Unknown";
2468
+ value: {
2469
+ reason: string;
2470
+ };
2471
+ };
2472
+ export const HostChatRegisterBotError: Codec<HostChatRegisterBotError>;
2473
+ /** Request to register a chat bot. */
2474
+ export interface HostChatRegisterBotRequest {
2475
+ /** Unique bot identifier. */
2476
+ botId: string;
2477
+ /** Bot display name. */
2478
+ name: string;
2479
+ /** URL or base64 image. */
2480
+ icon: string;
2481
+ }
2482
+ export const HostChatRegisterBotRequest: Codec<HostChatRegisterBotRequest>;
2483
+ /** Result of a bot registration. */
2484
+ export interface HostChatRegisterBotResponse {
2485
+ /** \`New\` or \`Exists\`. */
2486
+ status: ChatBotRegistrationStatus;
2487
+ }
2488
+ export const HostChatRegisterBotResponse: Codec<HostChatRegisterBotResponse>;
2489
+ /** Transaction creation error. */
2490
+ export type HostCreateTransactionError =
2491
+ /** Payload could not be deserialized. */
2492
+ {
2493
+ tag: "FailedToDecode";
2494
+ value?: undefined;
2495
+ }
2496
+ /** User rejected. */
2497
+ | {
2498
+ tag: "Rejected";
2499
+ value?: undefined;
2500
+ }
2501
+ /** Unsupported payload version or extension. */
2502
+ | {
2503
+ tag: "NotSupported";
2504
+ value: {
2505
+ reason: string;
2506
+ };
2507
+ }
2508
+ /** Not authenticated. */
2509
+ | {
2510
+ tag: "PermissionDenied";
2511
+ value?: undefined;
2512
+ }
2513
+ /** Catch-all. */
2514
+ | {
2515
+ tag: "Unknown";
2516
+ value: {
2517
+ reason: string;
2518
+ };
2519
+ };
2520
+ export const HostCreateTransactionError: Codec<HostCreateTransactionError>;
2521
+ /** Response containing a created transaction. */
2522
+ export interface HostCreateTransactionResponse {
2523
+ /** SCALE-encoded signed transaction. */
2524
+ transaction: HexString;
2525
+ }
2526
+ export const HostCreateTransactionResponse: Codec<HostCreateTransactionResponse>;
2527
+ /** Response containing a transaction created with a non-product account. */
2528
+ export interface HostCreateTransactionWithLegacyAccountResponse {
2529
+ /** SCALE-encoded signed transaction. */
2530
+ transaction: HexString;
2531
+ }
2532
+ export const HostCreateTransactionWithLegacyAccountResponse: Codec<HostCreateTransactionWithLegacyAccountResponse>;
2533
+ /** Error from [\`crate::api::Entropy::derive\`] (RFC 0007). */
2534
+ export type HostDeriveEntropyError =
2535
+ /** Catch-all. */
2536
+ {
2537
+ tag: "Unknown";
2538
+ value: {
2539
+ reason: string;
2540
+ };
2541
+ };
2542
+ export const HostDeriveEntropyError: Codec<HostDeriveEntropyError>;
2543
+ /**
2544
+ * Request to derive deterministic per-product entropy (RFC 0007).
2545
+ *
2546
+ * The host derives 32 bytes from product-scoped seed material and \`context\`.
2547
+ * Repeated calls with the same \`context\` for the same product yield the same
2548
+ * entropy.
2549
+ */
2550
+ export interface HostDeriveEntropyRequest {
2551
+ /** Domain-separated derivation context. */
2552
+ context: HexString;
2553
+ }
2554
+ export const HostDeriveEntropyRequest: Codec<HostDeriveEntropyRequest>;
2555
+ /** Response carrying 32 bytes of deterministically derived entropy. */
2556
+ export interface HostDeriveEntropyResponse {
2557
+ /** 32 bytes of derived entropy. */
2558
+ entropy: HexString;
2559
+ }
2560
+ export const HostDeriveEntropyResponse: Codec<HostDeriveEntropyResponse>;
2561
+ /**
2562
+ * Device-capability permission requested from the host (RFC 0002).
2563
+ *
2564
+ * The user's decision is persisted indefinitely after the first prompt and
2565
+ * survives app restarts, whether the decision was grant or deny; the host
2566
+ * does not re-prompt on subsequent requests for the same capability.
2567
+ */
2568
+ export type HostDevicePermissionRequest = "Notifications" | "Camera" | "Microphone" | "Bluetooth" | "NFC" | "Location" | "Clipboard" | "OpenUrl" | "Biometrics";
2569
+ export const HostDevicePermissionRequest: Codec<HostDevicePermissionRequest>;
2570
+ /** Outcome of a device-permission request. */
2571
+ export interface HostDevicePermissionResponse {
2572
+ /** Whether the permission was granted. */
2573
+ granted: boolean;
2574
+ }
2575
+ export const HostDevicePermissionResponse: Codec<HostDevicePermissionResponse>;
2576
+ /** Request to query whether a feature is supported by the host. */
2577
+ export type HostFeatureSupportedRequest =
2578
+ /** Ask whether the host can interact with the chain identified by genesis hash. */
2579
+ {
2580
+ tag: "Chain";
2581
+ value: {
2582
+ genesisHash: HexString;
2583
+ };
2584
+ };
2585
+ export const HostFeatureSupportedRequest: Codec<HostFeatureSupportedRequest>;
2586
+ /** Response to a feature-support query. */
2587
+ export interface HostFeatureSupportedResponse {
2588
+ /** Whether the feature is supported. */
2589
+ supported: boolean;
2590
+ }
2591
+ export const HostFeatureSupportedResponse: Codec<HostFeatureSupportedResponse>;
2592
+ /** Response containing all legacy (user-imported) accounts owned by the user. */
2593
+ export interface HostGetLegacyAccountsResponse {
2594
+ /** Legacy accounts. */
2595
+ accounts: Array<LegacyAccount>;
2596
+ }
2597
+ export const HostGetLegacyAccountsResponse: Codec<HostGetLegacyAccountsResponse>;
2598
+ /** Error from [\`crate::api::Account::get_user_id\`]. */
2599
+ export type HostGetUserIdError =
2600
+ /** User denied the identity disclosure request. */
2601
+ {
2602
+ tag: "PermissionDenied";
2603
+ value?: undefined;
2604
+ }
2605
+ /** User is not logged in. */
2606
+ | {
2607
+ tag: "NotConnected";
2608
+ value?: undefined;
2609
+ }
2610
+ /** Catch-all. */
2611
+ | {
2612
+ tag: "Unknown";
2613
+ value: {
2614
+ reason: string;
2615
+ };
2616
+ };
2617
+ export const HostGetUserIdError: Codec<HostGetUserIdError>;
2618
+ /** The user's primary DotNS account identity. */
2619
+ export interface HostGetUserIdResponse {
2620
+ /** The user's primary DotNS username. */
2621
+ primaryUsername: string;
2622
+ }
2623
+ export const HostGetUserIdResponse: Codec<HostGetUserIdResponse>;
2624
+ /**
2625
+ * Error from [\`crate::api::System::handshake\`] (RFC 0009).
2626
+ *
2627
+ * The handshake is the first call on a fresh connection; it does not require
2628
+ * user authentication and is used to negotiate the wire codec version.
2629
+ */
2630
+ export type HostHandshakeError =
2631
+ /** Host did not complete the handshake in time. */
2632
+ {
2633
+ tag: "Timeout";
2634
+ value?: undefined;
2635
+ }
2636
+ /** Host does not speak the codec version requested by the product. */
2637
+ | {
2638
+ tag: "UnsupportedProtocolVersion";
2639
+ value?: undefined;
2640
+ }
2641
+ /** Catch-all. */
2642
+ | {
2643
+ tag: "Unknown";
2644
+ value: GenericError;
2645
+ };
2646
+ export const HostHandshakeError: Codec<HostHandshakeError>;
2647
+ /** Wire-codec negotiation payload sent by the product (RFC 0009). */
2648
+ export interface HostHandshakeRequest {
2649
+ /** Wire codec version requested by the product. */
2650
+ codecVersion: number;
2651
+ }
2652
+ export const HostHandshakeRequest: Codec<HostHandshakeRequest>;
2653
+ /** Request to clear a local storage key. */
2654
+ export interface HostLocalStorageClearRequest {
2655
+ /** Storage key to clear. */
2656
+ key: string;
2657
+ }
2658
+ export const HostLocalStorageClearRequest: Codec<HostLocalStorageClearRequest>;
2659
+ /** Local storage operation error. */
2660
+ export type HostLocalStorageReadError =
2661
+ /** Storage quota exceeded. */
2662
+ {
2663
+ tag: "Full";
2664
+ value?: undefined;
2665
+ }
2666
+ /** Catch-all. */
2667
+ | {
2668
+ tag: "Unknown";
2669
+ value: {
2670
+ reason: string;
2671
+ };
2672
+ };
2673
+ export const HostLocalStorageReadError: Codec<HostLocalStorageReadError>;
2674
+ /** Request to read a local storage value. */
2675
+ export interface HostLocalStorageReadRequest {
2676
+ /** Storage key to read. */
2677
+ key: string;
2678
+ }
2679
+ export const HostLocalStorageReadRequest: Codec<HostLocalStorageReadRequest>;
2680
+ /** Response containing an optional local storage value. */
2681
+ export interface HostLocalStorageReadResponse {
2682
+ /** Stored value, if present. */
2683
+ value?: HexString;
2684
+ }
2685
+ export const HostLocalStorageReadResponse: Codec<HostLocalStorageReadResponse>;
2686
+ /** Request to write a value into local storage. */
2687
+ export interface HostLocalStorageWriteRequest {
2688
+ /** Storage key to write. */
2689
+ key: string;
2690
+ /** Value to store at the key. */
2691
+ value: HexString;
2692
+ }
2693
+ export const HostLocalStorageWriteRequest: Codec<HostLocalStorageWriteRequest>;
2694
+ /** Error from [\`crate::api::System::navigate_to\`]. */
2695
+ export type HostNavigateToError =
2696
+ /** User denied the navigation prompt. */
2697
+ {
2698
+ tag: "PermissionDenied";
2699
+ value?: undefined;
2700
+ }
2701
+ /** Catch-all. */
2702
+ | {
2703
+ tag: "Unknown";
2704
+ value: {
2705
+ reason: string;
2706
+ };
2707
+ };
2708
+ export const HostNavigateToError: Codec<HostNavigateToError>;
2709
+ /** Request to navigate the host to an external URL. */
2710
+ export interface HostNavigateToRequest {
2711
+ /** URL to open. */
2712
+ url: string;
2713
+ }
2714
+ export const HostNavigateToRequest: Codec<HostNavigateToRequest>;
2715
+ /**
2716
+ * Error from [\`crate::api::Payment::balance_subscribe\`].
2717
+ *
2718
+ * See [RFC 0006].
2719
+ *
2720
+ * [RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94
2721
+ */
2722
+ export type HostPaymentBalanceSubscribeError =
2723
+ /** User denied the balance disclosure request. */
2724
+ {
2725
+ tag: "PermissionDenied";
2726
+ value?: undefined;
2727
+ }
2728
+ /** Catch-all. */
2729
+ | {
2730
+ tag: "Unknown";
2731
+ value: {
2732
+ reason: string;
2733
+ };
2734
+ };
2735
+ export const HostPaymentBalanceSubscribeError: Codec<HostPaymentBalanceSubscribeError>;
2736
+ /**
2737
+ * Current payment balance state pushed to subscribers.
2738
+ *
2739
+ * See [RFC 0006].
2740
+ *
2741
+ * [RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94
2742
+ */
2743
+ export interface HostPaymentBalanceSubscribeItem {
2744
+ /** Balance that can be spent right now. */
2745
+ available: Balance;
2746
+ }
2747
+ export const HostPaymentBalanceSubscribeItem: Codec<HostPaymentBalanceSubscribeItem>;
2748
+ /** Request to subscribe to payment balance updates. */
2749
+ export interface HostPaymentBalanceSubscribeRequest {
2750
+ /** Optional purse selector. \`None\` means MAIN_PURSE. */
2751
+ purse?: PaymentPurseId;
2752
+ }
2753
+ export const HostPaymentBalanceSubscribeRequest: Codec<HostPaymentBalanceSubscribeRequest>;
2754
+ /**
2755
+ * Error from [\`crate::api::Payment::request\`].
2756
+ *
2757
+ * See [RFC 0006].
2758
+ *
2759
+ * [RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94
2760
+ */
2761
+ export type HostPaymentError =
2762
+ /** User rejected the payment request. */
2763
+ {
2764
+ tag: "Rejected";
2765
+ value?: undefined;
2766
+ }
2767
+ /** User's available balance is not sufficient for the requested amount. */
2768
+ | {
2769
+ tag: "InsufficientBalance";
2770
+ value?: undefined;
2771
+ }
2772
+ /** Catch-all. */
2773
+ | {
2774
+ tag: "Unknown";
2775
+ value: {
2776
+ reason: string;
2777
+ };
2778
+ };
2779
+ export const HostPaymentError: Codec<HostPaymentError>;
2780
+ /** Request to initiate a payment to another account. */
2781
+ export interface HostPaymentRequest {
2782
+ /** Optional purse selector. \`None\` means MAIN_PURSE. */
2783
+ from?: PaymentPurseId;
2784
+ /** Amount to pay. */
2785
+ amount: Balance;
2786
+ /** Destination account. */
2787
+ destination: HexString;
2788
+ }
2789
+ export const HostPaymentRequest: Codec<HostPaymentRequest>;
2790
+ /**
2791
+ * Receipt returned after a successful payment request.
2792
+ *
2793
+ * See [RFC 0006].
2794
+ *
2795
+ * [RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94
2796
+ */
2797
+ export interface HostPaymentResponse {
2798
+ /** The assigned payment identifier. */
2799
+ id: string;
2800
+ }
2801
+ export const HostPaymentResponse: Codec<HostPaymentResponse>;
2802
+ /**
2803
+ * Error from [\`crate::api::Payment::status_subscribe\`].
2804
+ *
2805
+ * See [RFC 0006].
2806
+ *
2807
+ * [RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94
2808
+ */
2809
+ export type HostPaymentStatusSubscribeError =
2810
+ /** Payment ID was not found or does not belong to the current product. */
2811
+ {
2812
+ tag: "PaymentNotFound";
2813
+ value?: undefined;
2814
+ }
2815
+ /** Catch-all. */
2816
+ | {
2817
+ tag: "Unknown";
2818
+ value: {
2819
+ reason: string;
2820
+ };
2821
+ };
2822
+ export const HostPaymentStatusSubscribeError: Codec<HostPaymentStatusSubscribeError>;
2823
+ /**
2824
+ * Payment lifecycle status pushed to subscribers.
2825
+ *
2826
+ * Once a terminal state (\`Completed\` or \`Failed\`) is reached, the host
2827
+ * delivers it and may close the subscription.
2828
+ *
2829
+ * See [RFC 0006].
2830
+ *
2831
+ * [RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94
2832
+ */
2833
+ export type HostPaymentStatusSubscribeItem =
2834
+ /** Payment is being processed. */
2835
+ {
2836
+ tag: "Processing";
2837
+ value?: undefined;
2838
+ }
2839
+ /** Payment has been settled successfully. */
2840
+ | {
2841
+ tag: "Completed";
2842
+ value?: undefined;
2843
+ }
2844
+ /** Payment has failed. */
2845
+ | {
2846
+ tag: "Failed";
2847
+ value: {
2848
+ reason: string;
2849
+ };
2850
+ };
2851
+ export const HostPaymentStatusSubscribeItem: Codec<HostPaymentStatusSubscribeItem>;
2852
+ /** Request to subscribe to a payment status. */
2853
+ export interface HostPaymentStatusSubscribeRequest {
2854
+ /** Payment identifier to watch. */
2855
+ paymentId: string;
2856
+ }
2857
+ export const HostPaymentStatusSubscribeRequest: Codec<HostPaymentStatusSubscribeRequest>;
2858
+ /**
2859
+ * Error from [\`crate::api::Payment::top_up\`].
2860
+ *
2861
+ * See [RFC 0006].
2862
+ *
2863
+ * [RFC 0006]: https://github.com/paritytech/triangle-js-sdks/pull/94
2864
+ */
2865
+ export type HostPaymentTopUpError =
2866
+ /** The source account does not hold sufficient funds. */
2867
+ {
2868
+ tag: "InsufficientFunds";
2869
+ value?: undefined;
2870
+ }
2871
+ /** The source account was not found or is invalid. */
2872
+ | {
2873
+ tag: "InvalidSource";
2874
+ value?: undefined;
2875
+ }
2876
+ /** Catch-all. */
2877
+ | {
2878
+ tag: "Unknown";
2879
+ value: {
2880
+ reason: string;
2881
+ };
2882
+ }
2883
+ /** Some coins were claimed but the total fell short of the requested amount. */
2884
+ | {
2885
+ tag: "PartialPayment";
2886
+ value: {
2887
+ credited: Balance;
2888
+ };
2889
+ };
2890
+ export const HostPaymentTopUpError: Codec<HostPaymentTopUpError>;
2891
+ /** Request to top up the product payment balance. */
2892
+ export interface HostPaymentTopUpRequest {
2893
+ /** Optional purse selector. \`None\` means MAIN_PURSE. */
2894
+ into?: PaymentPurseId;
2895
+ /** Amount to top up. */
2896
+ amount: Balance;
2897
+ /** Funding source for the top-up. */
2898
+ source: PaymentTopUpSource;
2899
+ }
2900
+ export const HostPaymentTopUpRequest: Codec<HostPaymentTopUpRequest>;
2901
+ /** Request to cancel a previously scheduled notification. */
2902
+ export interface HostPushNotificationCancelRequest {
2903
+ /** The notification identifier returned by [\`HostPushNotificationResponse\`]. */
2904
+ id: NotificationId;
2905
+ }
2906
+ export const HostPushNotificationCancelRequest: Codec<HostPushNotificationCancelRequest>;
2907
+ /** Push notification error. */
2908
+ export type HostPushNotificationError =
2909
+ /** The host-wide queue of pending scheduled notifications is full. */
2910
+ {
2911
+ tag: "ScheduleLimitReached";
2912
+ value?: undefined;
2913
+ }
2914
+ /** Catch-all. */
2915
+ | {
2916
+ tag: "Unknown";
2917
+ value: {
2918
+ reason: string;
2919
+ };
2920
+ };
2921
+ export const HostPushNotificationError: Codec<HostPushNotificationError>;
2922
+ /**
2923
+ * Push notification payload.
2924
+ *
2925
+ * When \`scheduled_at\` is \`Some\`, the notification is deferred to the given
2926
+ * wall-clock instant (Unix milliseconds UTC). \`None\` fires immediately,
2927
+ * preserving prior behaviour. See [RFC 0019].
2928
+ *
2929
+ * [RFC 0019]: https://github.com/paritytech/truapi/blob/main/docs/rfcs/0019-scheduled-notifications.md
2930
+ */
2931
+ export interface HostPushNotificationRequest {
2932
+ /** Notification text. */
2933
+ text: string;
2934
+ /** Optional URL to open on tap. */
2935
+ deeplink?: string;
2936
+ /**
2937
+ * Optional Unix timestamp in milliseconds (UTC) at which the notification
2938
+ * should fire. \`None\` fires immediately.
2939
+ */
2940
+ scheduledAt?: bigint;
2941
+ }
2942
+ export const HostPushNotificationRequest: Codec<HostPushNotificationRequest>;
2943
+ /** Successful push notification response carrying the assigned id. */
2944
+ export interface HostPushNotificationResponse {
2945
+ /** Host-assigned notification identifier. */
2946
+ id: NotificationId;
2947
+ }
2948
+ export const HostPushNotificationResponse: Codec<HostPushNotificationResponse>;
2949
+ /** Login request error. */
2950
+ export type HostRequestLoginError =
2951
+ /** Catch-all. */
2952
+ {
2953
+ tag: "Unknown";
2954
+ value: {
2955
+ reason: string;
2956
+ };
2957
+ };
2958
+ export const HostRequestLoginError: Codec<HostRequestLoginError>;
2959
+ /** Request to present the host login flow. */
2960
+ export interface HostRequestLoginRequest {
2961
+ /** Optional human-readable reason shown in the login UI. */
2962
+ reason?: string;
2963
+ }
2964
+ export const HostRequestLoginRequest: Codec<HostRequestLoginRequest>;
2965
+ /** Result of a login request. */
2966
+ export type HostRequestLoginResponse = "Success" | "AlreadyConnected" | "Rejected";
2967
+ export const HostRequestLoginResponse: Codec<HostRequestLoginResponse>;
2968
+ /** Batched resource pre-allocation request (RFC 0010). */
2969
+ export interface HostRequestResourceAllocationRequest {
2970
+ /** Resources to allocate. */
2971
+ resources: Array<AllocatableResource>;
2972
+ }
2973
+ export const HostRequestResourceAllocationRequest: Codec<HostRequestResourceAllocationRequest>;
2974
+ /** Per-resource outcomes for a batched allocation request (RFC 0010). */
2975
+ export interface HostRequestResourceAllocationResponse {
2976
+ /** Per-resource allocation outcomes, in the same order as the request. */
2977
+ outcomes: Array<AllocationOutcome>;
2978
+ }
2979
+ export const HostRequestResourceAllocationResponse: Codec<HostRequestResourceAllocationResponse>;
2980
+ /** Signing operation error. */
2981
+ export type HostSignPayloadError =
2982
+ /** Payload could not be deserialized. */
2983
+ {
2984
+ tag: "FailedToDecode";
2985
+ value?: undefined;
2986
+ }
2987
+ /** User rejected signing. */
2988
+ | {
2989
+ tag: "Rejected";
2990
+ value?: undefined;
2991
+ }
2992
+ /** Not authenticated. */
2993
+ | {
2994
+ tag: "PermissionDenied";
2995
+ value?: undefined;
2996
+ }
2997
+ /** Catch-all. */
2998
+ | {
2999
+ tag: "Unknown";
3000
+ value: {
3001
+ reason: string;
3002
+ };
3003
+ };
3004
+ export const HostSignPayloadError: Codec<HostSignPayloadError>;
3005
+ /** Request to sign an extrinsic payload with a product account. */
3006
+ export interface HostSignPayloadRequest {
3007
+ /** Product account that will sign this payload. */
3008
+ account: ProductAccountId;
3009
+ /** The extrinsic payload to sign. */
3010
+ payload: HostSignPayloadData;
3011
+ }
3012
+ export const HostSignPayloadRequest: Codec<HostSignPayloadRequest>;
3013
+ /** Result of a signing operation. */
3014
+ export interface HostSignPayloadResponse {
3015
+ /** The cryptographic signature. */
3016
+ signature: HexString;
3017
+ /** Full signed transaction, if requested. */
3018
+ signedTransaction?: HexString;
3019
+ }
3020
+ export const HostSignPayloadResponse: Codec<HostSignPayloadResponse>;
3021
+ /**
3022
+ * Sign a Substrate extrinsic payload with a non-product (legacy) account.
3023
+ * Contains the same fields as [\`HostSignPayloadRequest\`] minus \`address\`
3024
+ * (replaced by \`signer\`).
3025
+ */
3026
+ export interface HostSignPayloadWithLegacyAccountRequest {
3027
+ /** Signer address (SS58 or hex) of the legacy account. */
3028
+ signer: string;
3029
+ /** The extrinsic payload to sign. */
3030
+ payload: HostSignPayloadData;
3031
+ }
3032
+ export const HostSignPayloadWithLegacyAccountRequest: Codec<HostSignPayloadWithLegacyAccountRequest>;
3033
+ /** A raw signing request pairing an account with the payload to sign. */
3034
+ export interface HostSignRawRequest {
3035
+ /** Product account that will sign this payload. */
3036
+ account: ProductAccountId;
3037
+ /** The payload to sign. */
3038
+ payload: RawPayload;
3039
+ }
3040
+ export const HostSignRawRequest: Codec<HostSignRawRequest>;
3041
+ /**
3042
+ * Sign raw bytes with a non-product (legacy) account. The signer field
3043
+ * identifies which legacy account to use.
3044
+ */
3045
+ export interface HostSignRawWithLegacyAccountRequest {
3046
+ /** Signer address (SS58 or hex) of the legacy account. */
3047
+ signer: string;
3048
+ /** The data to sign. */
3049
+ payload: RawPayload;
3050
+ }
3051
+ export const HostSignRawWithLegacyAccountRequest: Codec<HostSignRawWithLegacyAccountRequest>;
3052
+ /** Current theme state pushed to subscribers. */
3053
+ export interface HostThemeSubscribeItem {
3054
+ /** Theme name. */
3055
+ name: ThemeName;
3056
+ /** Light or dark variant. */
3057
+ variant: ThemeVariant;
3058
+ }
3059
+ export const HostThemeSubscribeItem: Codec<HostThemeSubscribeItem>;
3060
+ /**
3061
+ * Subscribe payload identifying the chat message to render. The host responds
3062
+ * with a stream of [\`CustomRendererNode\`] trees describing the rendered UI.
3063
+ */
3064
+ export interface ProductChatCustomMessageRenderSubscribeRequest {
3065
+ /** Message identifier. */
3066
+ messageId: string;
3067
+ /** Application-defined message type. */
3068
+ messageType: string;
3069
+ /** Binary payload. */
3070
+ payload: HexString;
3071
+ }
3072
+ export const ProductChatCustomMessageRenderSubscribeRequest: Codec<ProductChatCustomMessageRenderSubscribeRequest>;
3073
+ export interface RemoteChainHeadBodyRequest {
3074
+ /** Chain genesis hash. */
3075
+ genesisHash: HexString;
3076
+ /** Follow subscription identifier. */
3077
+ followSubscriptionId: string;
3078
+ /** Block hash. */
3079
+ hash: HexString;
3080
+ }
3081
+ export const RemoteChainHeadBodyRequest: Codec<RemoteChainHeadBodyRequest>;
3082
+ export interface RemoteChainHeadBodyResponse {
3083
+ /** Started operation result. */
3084
+ operation: OperationStartedResult;
3085
+ }
3086
+ export const RemoteChainHeadBodyResponse: Codec<RemoteChainHeadBodyResponse>;
3087
+ export interface RemoteChainHeadCallRequest {
3088
+ /** Chain genesis hash. */
3089
+ genesisHash: HexString;
3090
+ /** Follow subscription identifier. */
3091
+ followSubscriptionId: string;
3092
+ /** Block hash. */
3093
+ hash: HexString;
3094
+ /** Runtime API function name. */
3095
+ function: string;
3096
+ /** SCALE-encoded call parameters. */
3097
+ callParameters: HexString;
3098
+ }
3099
+ export const RemoteChainHeadCallRequest: Codec<RemoteChainHeadCallRequest>;
3100
+ export interface RemoteChainHeadCallResponse {
3101
+ /** Started operation result. */
3102
+ operation: OperationStartedResult;
3103
+ }
3104
+ export const RemoteChainHeadCallResponse: Codec<RemoteChainHeadCallResponse>;
3105
+ export interface RemoteChainHeadContinueRequest {
3106
+ /** Chain genesis hash. */
3107
+ genesisHash: HexString;
3108
+ /** Follow subscription identifier. */
3109
+ followSubscriptionId: string;
3110
+ /** Operation identifier. */
3111
+ operationId: string;
3112
+ }
3113
+ export const RemoteChainHeadContinueRequest: Codec<RemoteChainHeadContinueRequest>;
3114
+ export type RemoteChainHeadFollowItem = {
3115
+ tag: "Initialized";
3116
+ value: {
3117
+ finalizedBlockHashes: Array<HexString>;
3118
+ finalizedBlockRuntime?: RuntimeType;
3119
+ };
3120
+ } | {
3121
+ tag: "NewBlock";
3122
+ value: {
3123
+ blockHash: HexString;
3124
+ parentBlockHash: HexString;
3125
+ newRuntime?: RuntimeType;
3126
+ };
3127
+ } | {
3128
+ tag: "BestBlockChanged";
3129
+ value: {
3130
+ bestBlockHash: HexString;
3131
+ };
3132
+ } | {
3133
+ tag: "Finalized";
3134
+ value: {
3135
+ finalizedBlockHashes: Array<HexString>;
3136
+ prunedBlockHashes: Array<HexString>;
3137
+ };
3138
+ } | {
3139
+ tag: "OperationBodyDone";
3140
+ value: {
3141
+ operationId: string;
3142
+ value: Array<HexString>;
3143
+ };
3144
+ } | {
3145
+ tag: "OperationCallDone";
3146
+ value: {
3147
+ operationId: string;
3148
+ output: HexString;
3149
+ };
3150
+ } | {
3151
+ tag: "OperationStorageItems";
3152
+ value: {
3153
+ operationId: string;
3154
+ items: Array<StorageResultItem>;
3155
+ };
3156
+ } | {
3157
+ tag: "OperationStorageDone";
3158
+ value: {
3159
+ operationId: string;
3160
+ };
3161
+ } | {
3162
+ tag: "OperationWaitingForContinue";
3163
+ value: {
3164
+ operationId: string;
3165
+ };
3166
+ } | {
3167
+ tag: "OperationInaccessible";
3168
+ value: {
3169
+ operationId: string;
3170
+ };
3171
+ } | {
3172
+ tag: "OperationError";
3173
+ value: {
3174
+ operationId: string;
3175
+ error: string;
3176
+ };
3177
+ } | {
3178
+ tag: "Stop";
3179
+ value?: undefined;
3180
+ };
3181
+ export const RemoteChainHeadFollowItem: Codec<RemoteChainHeadFollowItem>;
3182
+ export interface RemoteChainHeadFollowRequest {
3183
+ /** Chain genesis hash. */
3184
+ genesisHash: HexString;
3185
+ /** Whether to include runtime information in events. */
3186
+ withRuntime: boolean;
3187
+ }
3188
+ export const RemoteChainHeadFollowRequest: Codec<RemoteChainHeadFollowRequest>;
3189
+ export interface RemoteChainHeadHeaderRequest {
3190
+ /** Chain genesis hash. */
3191
+ genesisHash: HexString;
3192
+ /** Follow subscription identifier. */
3193
+ followSubscriptionId: string;
3194
+ /** Block hash. */
3195
+ hash: HexString;
3196
+ }
3197
+ export const RemoteChainHeadHeaderRequest: Codec<RemoteChainHeadHeaderRequest>;
3198
+ export interface RemoteChainHeadHeaderResponse {
3199
+ /** SCALE-encoded block header. */
3200
+ header?: HexString;
3201
+ }
3202
+ export const RemoteChainHeadHeaderResponse: Codec<RemoteChainHeadHeaderResponse>;
3203
+ export interface RemoteChainHeadStopOperationRequest {
3204
+ /** Chain genesis hash. */
3205
+ genesisHash: HexString;
3206
+ /** Follow subscription identifier. */
3207
+ followSubscriptionId: string;
3208
+ /** Operation identifier. */
3209
+ operationId: string;
3210
+ }
3211
+ export const RemoteChainHeadStopOperationRequest: Codec<RemoteChainHeadStopOperationRequest>;
3212
+ export interface RemoteChainHeadStorageRequest {
3213
+ /** Chain genesis hash. */
3214
+ genesisHash: HexString;
3215
+ /** Follow subscription identifier. */
3216
+ followSubscriptionId: string;
3217
+ /** Block hash. */
3218
+ hash: HexString;
3219
+ /** Storage items to query. */
3220
+ items: Array<StorageQueryItem>;
3221
+ /** Optional child trie. */
3222
+ childTrie?: HexString;
3223
+ }
3224
+ export const RemoteChainHeadStorageRequest: Codec<RemoteChainHeadStorageRequest>;
3225
+ export interface RemoteChainHeadStorageResponse {
3226
+ /** Started operation result. */
3227
+ operation: OperationStartedResult;
3228
+ }
3229
+ export const RemoteChainHeadStorageResponse: Codec<RemoteChainHeadStorageResponse>;
3230
+ export interface RemoteChainHeadUnpinRequest {
3231
+ /** Chain genesis hash. */
3232
+ genesisHash: HexString;
3233
+ /** Follow subscription identifier. */
3234
+ followSubscriptionId: string;
3235
+ /** Block hashes to unpin. */
3236
+ hashes: Array<HexString>;
3237
+ }
3238
+ export const RemoteChainHeadUnpinRequest: Codec<RemoteChainHeadUnpinRequest>;
3239
+ export interface RemoteChainSpecChainNameRequest {
3240
+ /** Chain genesis hash. */
3241
+ genesisHash: HexString;
3242
+ }
3243
+ export const RemoteChainSpecChainNameRequest: Codec<RemoteChainSpecChainNameRequest>;
3244
+ export interface RemoteChainSpecChainNameResponse {
3245
+ /** Chain display name. */
3246
+ chainName: string;
3247
+ }
3248
+ export const RemoteChainSpecChainNameResponse: Codec<RemoteChainSpecChainNameResponse>;
3249
+ export interface RemoteChainSpecGenesisHashRequest {
3250
+ /** Chain genesis hash requested by the product. */
3251
+ genesisHash: HexString;
3252
+ }
3253
+ export const RemoteChainSpecGenesisHashRequest: Codec<RemoteChainSpecGenesisHashRequest>;
3254
+ export interface RemoteChainSpecGenesisHashResponse {
3255
+ /** Chain genesis hash. */
3256
+ genesisHash: HexString;
3257
+ }
3258
+ export const RemoteChainSpecGenesisHashResponse: Codec<RemoteChainSpecGenesisHashResponse>;
3259
+ export interface RemoteChainSpecPropertiesRequest {
3260
+ /** Chain genesis hash. */
3261
+ genesisHash: HexString;
3262
+ }
3263
+ export const RemoteChainSpecPropertiesRequest: Codec<RemoteChainSpecPropertiesRequest>;
3264
+ export interface RemoteChainSpecPropertiesResponse {
3265
+ /** JSON-encoded properties. */
3266
+ properties: string;
3267
+ }
3268
+ export const RemoteChainSpecPropertiesResponse: Codec<RemoteChainSpecPropertiesResponse>;
3269
+ export interface RemoteChainTransactionBroadcastRequest {
3270
+ /** Chain genesis hash. */
3271
+ genesisHash: HexString;
3272
+ /** Signed transaction bytes. */
3273
+ transaction: HexString;
3274
+ }
3275
+ export const RemoteChainTransactionBroadcastRequest: Codec<RemoteChainTransactionBroadcastRequest>;
3276
+ export interface RemoteChainTransactionBroadcastResponse {
3277
+ /** Broadcast operation identifier, if available. */
3278
+ operationId?: string;
3279
+ }
3280
+ export const RemoteChainTransactionBroadcastResponse: Codec<RemoteChainTransactionBroadcastResponse>;
3281
+ export interface RemoteChainTransactionStopRequest {
3282
+ /** Chain genesis hash. */
3283
+ genesisHash: HexString;
3284
+ /** Operation identifier of the broadcast to stop. */
3285
+ operationId: string;
3286
+ }
3287
+ export const RemoteChainTransactionStopRequest: Codec<RemoteChainTransactionStopRequest>;
3288
+ /** remote-permission request (RFC 0002). */
3289
+ export interface RemotePermissionRequest {
3290
+ /** Permission requested by the product. */
3291
+ permission: RemotePermission;
3292
+ }
3293
+ export const RemotePermissionRequest: Codec<RemotePermissionRequest>;
3294
+ /** Outcome of a remote-permission request. */
3295
+ export interface RemotePermissionResponse {
3296
+ /** Whether the permission was granted. */
3297
+ granted: boolean;
3298
+ }
3299
+ export const RemotePermissionResponse: Codec<RemotePermissionResponse>;
3300
+ /** Item containing an optional preimage lookup result. */
3301
+ export interface RemotePreimageLookupSubscribeItem {
3302
+ /** Preimage data, if found. */
3303
+ value?: HexString;
3304
+ }
3305
+ export const RemotePreimageLookupSubscribeItem: Codec<RemotePreimageLookupSubscribeItem>;
3306
+ /** Request to subscribe to preimage lookup results. */
3307
+ export interface RemotePreimageLookupSubscribeRequest {
3308
+ /** Hash of the preimage. */
3309
+ key: HexString;
3310
+ }
3311
+ export const RemotePreimageLookupSubscribeRequest: Codec<RemotePreimageLookupSubscribeRequest>;
3312
+ /** Statement proof creation error. */
3313
+ export type RemoteStatementStoreCreateProofError =
3314
+ /** Signing operation failed. */
3315
+ {
3316
+ tag: "UnableToSign";
3317
+ value?: undefined;
3318
+ }
3319
+ /** Account not recognized. */
3320
+ | {
3321
+ tag: "UnknownAccount";
3322
+ value?: undefined;
3323
+ }
3324
+ /** Catch-all. */
3325
+ | {
3326
+ tag: "Unknown";
3327
+ value: {
3328
+ reason: string;
3329
+ };
3330
+ };
3331
+ export const RemoteStatementStoreCreateProofError: Codec<RemoteStatementStoreCreateProofError>;
3332
+ /** Request to create a cryptographic proof for a statement. */
3333
+ export interface RemoteStatementStoreCreateProofRequest {
3334
+ /** Product account that should create the proof. */
3335
+ productAccountId: ProductAccountId;
3336
+ /** Statement to prove. */
3337
+ statement: Statement;
3338
+ }
3339
+ export const RemoteStatementStoreCreateProofRequest: Codec<RemoteStatementStoreCreateProofRequest>;
3340
+ /** Response containing a statement proof. */
3341
+ export interface RemoteStatementStoreCreateProofResponse {
3342
+ /** Created statement proof. */
3343
+ proof: StatementProof;
3344
+ }
3345
+ export const RemoteStatementStoreCreateProofResponse: Codec<RemoteStatementStoreCreateProofResponse>;
3346
+ /**
3347
+ * Page of signed statements delivered by the statement store subscription
3348
+ * (RFC 0008). The \`is_complete\` flag distinguishes the historical-dump phase
3349
+ * (\`false\`) from the live-update phase (\`true\`).
3350
+ */
3351
+ export interface RemoteStatementStoreSubscribeItem {
3352
+ /** Signed statements matching the subscription. */
3353
+ statements: Array<SignedStatement>;
3354
+ /**
3355
+ * \`false\` while the host is still streaming the historical dump (more
3356
+ * pages to follow). \`true\` once the dump is complete; all subsequent
3357
+ * pages are also \`true\` and carry only newly-arrived statements.
3358
+ */
3359
+ isComplete: boolean;
3360
+ }
3361
+ export const RemoteStatementStoreSubscribeItem: Codec<RemoteStatementStoreSubscribeItem>;
3362
+ /** Request to subscribe to statements via a topic filter (RFC 0008). */
3363
+ export type RemoteStatementStoreSubscribeRequest =
3364
+ /** AND: statement must contain every listed topic. */
3365
+ {
3366
+ tag: "MatchAll";
3367
+ value: Array<Topic>;
3368
+ }
3369
+ /** OR: statement must contain at least one listed topic. */
3370
+ | {
3371
+ tag: "MatchAny";
3372
+ value: Array<Topic>;
3373
+ };
3374
+ export const RemoteStatementStoreSubscribeRequest: Codec<RemoteStatementStoreSubscribeRequest>;
3375
+ /** Vertical alignment options. */
3376
+ export type VerticalAlignment = "Top" | "Center" | "Bottom";
3377
+ export const VerticalAlignment: Codec<VerticalAlignment>;
3378
+
3379
+ }
3380
+
3381
+
3382
+ // client.d.ts
3383
+ export type { Subscription, TrUApiTransport };
3384
+ /**
3385
+ * Version overrides used when constructing a transport.
3386
+ */
3387
+ export interface CreateTransportOptions {
3388
+ /**
3389
+ * Highest TrUAPI protocol version exposed by the transport.
3390
+ */
3391
+ truapiVersion?: number;
3392
+ /**
3393
+ * SCALE codec version advertised during host handshake negotiation.
3394
+ */
3395
+ codecVersion?: number;
3396
+ }
3397
+ /**
3398
+ * Build a \`TrUApiTransport\` on top of a \`Provider\`, adding request/response
3399
+ * correlation and subscription start/receive/stop lifecycle handling.
3400
+ */
3401
+ export declare function createTransport(provider: Provider, options?: CreateTransportOptions): TrUApiTransport;
3402
+
3403
+
3404
+ // explorer/codegen/types.d.ts
3405
+ export declare const types: DataType[];
3406
+
3407
+
3408
+ // explorer/codegen/versions/0.2.0/services.d.ts
3409
+ export declare const services: ServiceInfo[];
3410
+
3411
+
3412
+ // explorer/codegen/versions/0.2.0/types.d.ts
3413
+ export declare const types: DataType[];
3414
+
3415
+
3416
+ // explorer/codegen/versions/0.3.0/services.d.ts
3417
+ export declare const services: ServiceInfo[];
3418
+
3419
+
3420
+ // explorer/codegen/versions/0.3.0/types.d.ts
3421
+ export declare const types: DataType[];
3422
+
3423
+
3424
+ // explorer/data-types.d.ts
3425
+ /** One named field or enum variant rendered on a \`DataType\`. */
3426
+ export interface DataTypeField {
3427
+ /** Field or variant name as it appears in the generated TS source. */
3428
+ name: string;
3429
+ /** Rendered TypeScript type expression. */
3430
+ type: string;
3431
+ /** First paragraph of the field/variant doc comment, when present. */
3432
+ description?: string;
3433
+ }
3434
+ /**
3435
+ * A type surfaced by the TrUAPI explorer. One entry per public type in the
3436
+ * generated client surface (versioned wrapper enums are not surfaced, the
3437
+ * explorer routes around them via \`MethodInfo.requestType\`/\`responseType\`).
3438
+ */
3439
+ export interface DataType {
3440
+ /**
3441
+ * Kebab-case identifier (e.g. \`host-account-get-request\`). Matches the
3442
+ * \`requestType\`/\`responseType\`/\`errorType\` ids emitted on \`MethodInfo\`.
3443
+ */
3444
+ id: string;
3445
+ /** Public TS type name (e.g. \`HostAccountGetRequest\`). */
3446
+ name: string;
3447
+ /**
3448
+ * Rustdoc module bucket (\`account\`, \`chat\`, ...) or \`shared\` when the type
3449
+ * lives outside \`api::<service>\`.
3450
+ */
3451
+ category: string;
3452
+ /** TypeScript source for the type, ready to render in a code block. */
3453
+ definition: string;
3454
+ /**
3455
+ * Free-form doc comment, with the optional \`\`\`ts ... \`\`\` example block
3456
+ * stripped.
3457
+ */
3458
+ description?: string;
3459
+ /** Named fields, populated for \`struct\`-shaped types. */
3460
+ fields?: DataTypeField[];
3461
+ /** Variants, populated for \`enum\`-shaped types. */
3462
+ variants?: DataTypeField[];
3463
+ }
3464
+ /**
3465
+ * One snapshot of the API surface. \`id\` is \`"main"\` for the live codegen
3466
+ * output, or a semver string (e.g. \`"0.1.0"\`) for an archived snapshot.
3467
+ */
3468
+ export interface VersionEntry {
3469
+ id: string;
3470
+ services: ServiceInfo[];
3471
+ types: DataType[];
3472
+ }
3473
+
3474
+
3475
+ // explorer/versions.d.ts
3476
+ /**
3477
+ * Version string declared in \`js/packages/truapi/package.json\` at codegen
3478
+ * time. Mirrors the \`truapi\` crate version. Used by the explorer to render
3479
+ * the \`main\` selector label as \`main (x.y.z)\`.
3480
+ */
3481
+ export declare const packageVersion = "0.3.0";
3482
+ export declare const versions: VersionEntry[];
3483
+
3484
+
3485
+ // generated/client.d.ts
3486
+ export { ResultAsync, SubscriptionError };
3487
+ export type { ObservableLike, Observer, Result, Subscription, TrUApiTransport };
3488
+ export declare const TRUAPI_VERSION: 1;
3489
+ export declare const TRUAPI_CODEC_VERSION: 1;
3490
+ /** Account lookup, aliasing, and proof generation. */
3491
+ export declare class AccountClient {
3492
+ private readonly transport;
3493
+ constructor(transport: TrUApiTransport);
3494
+ /** Subscribe to account connection status changes. */
3495
+ connectionStatusSubscribe(): ObservableLike<T.HostAccountConnectionStatusSubscribeItem>;
3496
+ /** Retrieve a product-scoped account. */
3497
+ getAccount(request: T.HostAccountGetRequest): ResultAsync<T.HostAccountGetResponse, T.HostAccountGetError>;
3498
+ /** Retrieve a contextual alias for a product account. */
3499
+ getAccountAlias(request: T.HostAccountGetAliasRequest): ResultAsync<T.HostAccountGetAliasResponse, T.HostAccountGetError>;
3500
+ /** Generate a ring VRF proof for a product account. */
3501
+ createAccountProof(request: T.HostAccountCreateProofRequest): ResultAsync<T.HostAccountCreateProofResponse, T.HostAccountCreateProofError>;
3502
+ /** List non-product accounts the user owns. */
3503
+ getLegacyAccounts(): ResultAsync<T.HostGetLegacyAccountsResponse, T.HostAccountGetError>;
3504
+ /** Fetch the user's primary identity. */
3505
+ getUserId(): ResultAsync<T.HostGetUserIdResponse, T.HostGetUserIdError>;
3506
+ /**
3507
+ * Request the host to present the login flow to the user.
3508
+ *
3509
+ * Products should call this in response to a user action (e.g. tapping a
3510
+ * "Sign in" button), not automatically on load.
3511
+ */
3512
+ requestLogin(request: T.HostRequestLoginRequest): ResultAsync<T.HostRequestLoginResponse, T.HostRequestLoginError>;
3513
+ }
3514
+ /** Chain interaction methods. */
3515
+ export declare class ChainClient {
3516
+ private readonly transport;
3517
+ constructor(transport: TrUApiTransport);
3518
+ /** Follow the chain head and receive block events. */
3519
+ followHeadSubscribe({ request, }: {
3520
+ request: T.RemoteChainHeadFollowRequest;
3521
+ }): ObservableLike<T.RemoteChainHeadFollowItem>;
3522
+ /** Fetch a block header. */
3523
+ getHeadHeader(request: T.RemoteChainHeadHeaderRequest): ResultAsync<T.RemoteChainHeadHeaderResponse, T.GenericError>;
3524
+ /** Fetch a block body. */
3525
+ getHeadBody(request: T.RemoteChainHeadBodyRequest): ResultAsync<T.RemoteChainHeadBodyResponse, T.GenericError>;
3526
+ /** Query runtime storage at a specific block. */
3527
+ getHeadStorage(request: T.RemoteChainHeadStorageRequest): ResultAsync<T.RemoteChainHeadStorageResponse, T.GenericError>;
3528
+ /** Invoke a runtime call at a specific block. */
3529
+ callHead(request: T.RemoteChainHeadCallRequest): ResultAsync<T.RemoteChainHeadCallResponse, T.GenericError>;
3530
+ /** Release pinned blocks. */
3531
+ unpinHead(request: T.RemoteChainHeadUnpinRequest): ResultAsync<undefined, T.GenericError>;
3532
+ /** Continue a paused chain-head operation. */
3533
+ continueHead(request: T.RemoteChainHeadContinueRequest): ResultAsync<undefined, T.GenericError>;
3534
+ /** Stop a chain-head operation. */
3535
+ stopHeadOperation(request: T.RemoteChainHeadStopOperationRequest): ResultAsync<undefined, T.GenericError>;
3536
+ /** Fetch the canonical genesis hash for a chain. */
3537
+ getSpecGenesisHash(request: T.RemoteChainSpecGenesisHashRequest): ResultAsync<T.RemoteChainSpecGenesisHashResponse, T.GenericError>;
3538
+ /** Fetch the display name of a chain. */
3539
+ getSpecChainName(request: T.RemoteChainSpecChainNameRequest): ResultAsync<T.RemoteChainSpecChainNameResponse, T.GenericError>;
3540
+ /** Fetch the JSON-encoded properties of a chain. */
3541
+ getSpecProperties(request: T.RemoteChainSpecPropertiesRequest): ResultAsync<T.RemoteChainSpecPropertiesResponse, T.GenericError>;
3542
+ /** Broadcast a signed transaction. */
3543
+ broadcastTransaction(request: T.RemoteChainTransactionBroadcastRequest): ResultAsync<T.RemoteChainTransactionBroadcastResponse, T.GenericError>;
3544
+ /** Stop a transaction broadcast. */
3545
+ stopTransaction(request: T.RemoteChainTransactionStopRequest): ResultAsync<undefined, T.GenericError>;
3546
+ }
3547
+ /** Chat room, bot, and message APIs. */
3548
+ export declare class ChatClient {
3549
+ private readonly transport;
3550
+ constructor(transport: TrUApiTransport);
3551
+ /** Create a chat room. */
3552
+ createRoom(request: T.HostChatCreateRoomRequest): ResultAsync<T.HostChatCreateRoomResponse, T.HostChatCreateRoomError>;
3553
+ /** Register a chat bot. */
3554
+ registerBot(request: T.HostChatRegisterBotRequest): ResultAsync<T.HostChatRegisterBotResponse, T.HostChatRegisterBotError>;
3555
+ /** Subscribe to the list of chat rooms. */
3556
+ listSubscribe(): ObservableLike<T.HostChatListSubscribeItem>;
3557
+ /** Post a message to a chat room. */
3558
+ postMessage(request: T.HostChatPostMessageRequest): ResultAsync<T.HostChatPostMessageResponse, T.HostChatPostMessageError>;
3559
+ /** Subscribe to received chat actions. */
3560
+ actionSubscribe(): ObservableLike<T.HostChatActionSubscribeItem>;
3561
+ /**
3562
+ * Subscribe to custom message render requests from the host. Each
3563
+ * emitted item is a [\`CustomRendererNode\`](crate::v01::CustomRendererNode)
3564
+ * tree describing the rendered UI.
3565
+ */
3566
+ customMessageRenderSubscribe({ request, }: {
3567
+ request: T.ProductChatCustomMessageRenderSubscribeRequest;
3568
+ }): ObservableLike<T.CustomRendererNode>;
3569
+ }
3570
+ /** Deterministic entropy derivation. */
3571
+ export declare class EntropyClient {
3572
+ private readonly transport;
3573
+ constructor(transport: TrUApiTransport);
3574
+ /** Derive deterministic entropy. */
3575
+ derive(request: T.HostDeriveEntropyRequest): ResultAsync<T.HostDeriveEntropyResponse, T.HostDeriveEntropyError>;
3576
+ }
3577
+ /** Local key/value storage scoped to the calling product. */
3578
+ export declare class LocalStorageClient {
3579
+ private readonly transport;
3580
+ constructor(transport: TrUApiTransport);
3581
+ /** Read a value by key. */
3582
+ read(request: T.HostLocalStorageReadRequest): ResultAsync<T.HostLocalStorageReadResponse, T.HostLocalStorageReadError>;
3583
+ /** Write a value to a key. */
3584
+ write(request: T.HostLocalStorageWriteRequest): ResultAsync<undefined, T.HostLocalStorageReadError>;
3585
+ /** Clear a value by key. */
3586
+ clear(request: T.HostLocalStorageClearRequest): ResultAsync<undefined, T.HostLocalStorageReadError>;
3587
+ }
3588
+ /** Notification methods for locally-rendered push notifications. */
3589
+ export declare class NotificationsClient {
3590
+ private readonly transport;
3591
+ constructor(transport: TrUApiTransport);
3592
+ /**
3593
+ * Send a push notification to the user.
3594
+ *
3595
+ * Returns a [\`NotificationId\`](crate::v01::NotificationId) that can be
3596
+ * passed to [\`cancel_push_notification\`](Self::cancel_push_notification)
3597
+ * to retract a scheduled notification. When \`scheduled_at\` is set the host
3598
+ * persists the notification across restarts and fires it through the
3599
+ * platform-native scheduler. See [RFC 0019].
3600
+ *
3601
+ * [RFC 0019]: https://github.com/paritytech/truapi/blob/main/docs/rfcs/0019-scheduled-notifications.md
3602
+ */
3603
+ sendPushNotification(request: T.HostPushNotificationRequest): ResultAsync<T.HostPushNotificationResponse, T.HostPushNotificationError>;
3604
+ /**
3605
+ * Cancels a previously issued push notification.
3606
+ *
3607
+ * Cancellation is idempotent: returns \`Ok(())\` whether the notification is
3608
+ * still pending, already fired, or was never issued. See [RFC 0019].
3609
+ *
3610
+ * [RFC 0019]: https://github.com/paritytech/truapi/blob/main/docs/rfcs/0019-scheduled-notifications.md
3611
+ */
3612
+ cancelPushNotification(request: T.HostPushNotificationCancelRequest): ResultAsync<undefined, T.GenericError>;
3613
+ }
3614
+ /** Payment request and balance/status subscription methods. */
3615
+ export declare class PaymentClient {
3616
+ private readonly transport;
3617
+ constructor(transport: TrUApiTransport);
3618
+ /** Subscribe to payment balance updates. */
3619
+ balanceSubscribe({ request, }: {
3620
+ request: T.HostPaymentBalanceSubscribeRequest;
3621
+ }): ObservableLike<T.HostPaymentBalanceSubscribeItem, T.HostPaymentBalanceSubscribeError>;
3622
+ /** Request a payment from the user. */
3623
+ request(request: T.HostPaymentRequest): ResultAsync<T.HostPaymentResponse, T.HostPaymentError>;
3624
+ /** Subscribe to payment lifecycle updates for a specific payment. */
3625
+ statusSubscribe({ request, }: {
3626
+ request: T.HostPaymentStatusSubscribeRequest;
3627
+ }): ObservableLike<T.HostPaymentStatusSubscribeItem, T.HostPaymentStatusSubscribeError>;
3628
+ /** Top up the user's payment balance. */
3629
+ topUp(request: T.HostPaymentTopUpRequest): ResultAsync<undefined, T.HostPaymentTopUpError>;
3630
+ }
3631
+ /** Permission request methods. */
3632
+ export declare class PermissionsClient {
3633
+ private readonly transport;
3634
+ constructor(transport: TrUApiTransport);
3635
+ /** Request a device-capability permission from the user. */
3636
+ requestDevicePermission(request: T.HostDevicePermissionRequest): ResultAsync<T.HostDevicePermissionResponse, T.GenericError>;
3637
+ /** Request a remote-operation permission. */
3638
+ requestRemotePermission(request: T.RemotePermissionRequest): ResultAsync<T.RemotePermissionResponse, T.GenericError>;
3639
+ }
3640
+ /** Preimage lookup and submission methods. */
3641
+ export declare class PreimageClient {
3642
+ private readonly transport;
3643
+ constructor(transport: TrUApiTransport);
3644
+ /** Subscribe to preimage lookups for a given key. */
3645
+ lookupSubscribe({ request, }: {
3646
+ request: T.RemotePreimageLookupSubscribeRequest;
3647
+ }): ObservableLike<T.RemotePreimageLookupSubscribeItem>;
3648
+ /** Submit a preimage. Returns the preimage key (hash) on success. */
3649
+ submit(request: HexString): ResultAsync<HexString, T.PreimageSubmitError>;
3650
+ }
3651
+ /** Resource pre-allocation (allowance management). */
3652
+ export declare class ResourceAllocationClient {
3653
+ private readonly transport;
3654
+ constructor(transport: TrUApiTransport);
3655
+ /** Request the host to pre-allocate one or more resources. */
3656
+ request(request: T.HostRequestResourceAllocationRequest): ResultAsync<T.HostRequestResourceAllocationResponse, T.ResourceAllocationError>;
3657
+ }
3658
+ /** Signing operations. */
3659
+ export declare class SigningClient {
3660
+ private readonly transport;
3661
+ constructor(transport: TrUApiTransport);
3662
+ /** Construct a signed transaction for a product account. */
3663
+ createTransaction(request: T.ProductAccountTxPayload): ResultAsync<T.HostCreateTransactionResponse, T.HostCreateTransactionError>;
3664
+ /** Construct a signed transaction for a non-product (legacy) account. */
3665
+ createTransactionWithLegacyAccount(request: T.LegacyAccountTxPayload): ResultAsync<T.HostCreateTransactionWithLegacyAccountResponse, T.HostCreateTransactionError>;
3666
+ /** Sign raw bytes with a non-product account. */
3667
+ signRawWithLegacyAccount(request: T.HostSignRawWithLegacyAccountRequest): ResultAsync<T.HostSignPayloadResponse, T.HostSignPayloadError>;
3668
+ /** Sign an extrinsic payload with a non-product account. */
3669
+ signPayloadWithLegacyAccount(request: T.HostSignPayloadWithLegacyAccountRequest): ResultAsync<T.HostSignPayloadResponse, T.HostSignPayloadError>;
3670
+ /** Sign raw bytes or a message. */
3671
+ signRaw(request: T.HostSignRawRequest): ResultAsync<T.HostSignPayloadResponse, T.HostSignPayloadError>;
3672
+ /** Sign an extrinsic payload. */
3673
+ signPayload(request: T.HostSignPayloadRequest): ResultAsync<T.HostSignPayloadResponse, T.HostSignPayloadError>;
3674
+ }
3675
+ /** Statement store methods. */
3676
+ export declare class StatementStoreClient {
3677
+ private readonly transport;
3678
+ constructor(transport: TrUApiTransport);
3679
+ /** Subscribe to statements matching a topic filter. */
3680
+ subscribe({ request, }: {
3681
+ request: T.RemoteStatementStoreSubscribeRequest;
3682
+ }): ObservableLike<T.RemoteStatementStoreSubscribeItem>;
3683
+ /**
3684
+ * Create a proof for a statement.
3685
+ *
3686
+ * **Deprecated:** use [\`create_proof_authorized\`](Self::create_proof_authorized)
3687
+ * instead, which uses a pre-allocated allowance account and does not
3688
+ * require a per-call signing prompt.
3689
+ */
3690
+ createProof(request: T.RemoteStatementStoreCreateProofRequest): ResultAsync<T.RemoteStatementStoreCreateProofResponse, T.RemoteStatementStoreCreateProofError>;
3691
+ /**
3692
+ * Create a proof for a statement using a pre-allocated allowance account,
3693
+ * bypassing the per-call signing prompt.
3694
+ */
3695
+ createProofAuthorized(request: T.Statement): ResultAsync<T.RemoteStatementStoreCreateProofResponse, T.RemoteStatementStoreCreateProofError>;
3696
+ /**
3697
+ * Submit a signed statement to the network. The request body is the
3698
+ * [\`SignedStatement\`](crate::v01::SignedStatement) directly (no wrapping
3699
+ * struct), matching upstream \`triangle-js-sdks\`.
3700
+ */
3701
+ submit(request: T.SignedStatement): ResultAsync<undefined, T.GenericError>;
3702
+ }
3703
+ /**
3704
+ * General-purpose TrUAPI methods for handshake, feature detection,
3705
+ * and navigation.
3706
+ */
3707
+ export declare class SystemClient {
3708
+ private readonly transport;
3709
+ constructor(transport: TrUApiTransport);
3710
+ /** Negotiate the wire codec version with the product. */
3711
+ handshake(): ResultAsync<undefined, T.HostHandshakeError>;
3712
+ /** Query whether the host supports a specific feature. */
3713
+ featureSupported(request: T.HostFeatureSupportedRequest): ResultAsync<T.HostFeatureSupportedResponse, T.GenericError>;
3714
+ /** Request the host to open a URL. */
3715
+ navigateTo(request: T.HostNavigateToRequest): ResultAsync<undefined, T.HostNavigateToError>;
3716
+ }
3717
+ /** Host theme subscription. */
3718
+ export declare class ThemeClient {
3719
+ private readonly transport;
3720
+ constructor(transport: TrUApiTransport);
3721
+ /** Subscribe to host theme changes. */
3722
+ subscribe(): ObservableLike<T.HostThemeSubscribeItem>;
3723
+ }
3724
+ export interface TrUApiClient {
3725
+ readonly account: AccountClient;
3726
+ readonly chain: ChainClient;
3727
+ readonly chat: ChatClient;
3728
+ readonly entropy: EntropyClient;
3729
+ readonly localStorage: LocalStorageClient;
3730
+ readonly notifications: NotificationsClient;
3731
+ readonly payment: PaymentClient;
3732
+ readonly permissions: PermissionsClient;
3733
+ readonly preimage: PreimageClient;
3734
+ readonly resourceAllocation: ResourceAllocationClient;
3735
+ readonly signing: SigningClient;
3736
+ readonly statementStore: StatementStoreClient;
3737
+ readonly system: SystemClient;
3738
+ readonly theme: ThemeClient;
3739
+ }
3740
+ export type Client = TrUApiClient;
3741
+ export type GeneratedClientTransport = Omit<TrUApiTransport, "truapiVersion" | "codecVersion"> & Partial<Pick<TrUApiTransport, "truapiVersion" | "codecVersion">>;
3742
+ /** Creates the generated client facade by binding each service namespace to the
3743
+ * shared transport instance. */
3744
+ export declare function createClient(transport: GeneratedClientTransport): TrUApiClient;
3745
+
3746
+
3747
+ // generated/index.d.ts
3748
+
3749
+
3750
+ // generated/wire-table.d.ts
3751
+ export declare const SYSTEM_HANDSHAKE: {
3752
+ readonly request: 0;
3753
+ readonly response: 1;
3754
+ };
3755
+ export declare const SYSTEM_FEATURE_SUPPORTED: {
3756
+ readonly request: 2;
3757
+ readonly response: 3;
3758
+ };
3759
+ export declare const NOTIFICATIONS_SEND_PUSH_NOTIFICATION: {
3760
+ readonly request: 4;
3761
+ readonly response: 5;
3762
+ };
3763
+ export declare const SYSTEM_NAVIGATE_TO: {
3764
+ readonly request: 6;
3765
+ readonly response: 7;
3766
+ };
3767
+ export declare const PERMISSIONS_REQUEST_DEVICE_PERMISSION: {
3768
+ readonly request: 8;
3769
+ readonly response: 9;
3770
+ };
3771
+ export declare const PERMISSIONS_REQUEST_REMOTE_PERMISSION: {
3772
+ readonly request: 10;
3773
+ readonly response: 11;
3774
+ };
3775
+ export declare const LOCAL_STORAGE_READ: {
3776
+ readonly request: 12;
3777
+ readonly response: 13;
3778
+ };
3779
+ export declare const LOCAL_STORAGE_WRITE: {
3780
+ readonly request: 14;
3781
+ readonly response: 15;
3782
+ };
3783
+ export declare const LOCAL_STORAGE_CLEAR: {
3784
+ readonly request: 16;
3785
+ readonly response: 17;
3786
+ };
3787
+ export declare const ACCOUNT_CONNECTION_STATUS_SUBSCRIBE: {
3788
+ readonly start: 18;
3789
+ readonly stop: 19;
3790
+ readonly interrupt: 20;
3791
+ readonly receive: 21;
3792
+ };
3793
+ export declare const ACCOUNT_GET_ACCOUNT: {
3794
+ readonly request: 22;
3795
+ readonly response: 23;
3796
+ };
3797
+ export declare const ACCOUNT_GET_ACCOUNT_ALIAS: {
3798
+ readonly request: 24;
3799
+ readonly response: 25;
3800
+ };
3801
+ export declare const ACCOUNT_CREATE_ACCOUNT_PROOF: {
3802
+ readonly request: 26;
3803
+ readonly response: 27;
3804
+ };
3805
+ export declare const ACCOUNT_GET_LEGACY_ACCOUNTS: {
3806
+ readonly request: 28;
3807
+ readonly response: 29;
3808
+ };
3809
+ export declare const SIGNING_CREATE_TRANSACTION: {
3810
+ readonly request: 30;
3811
+ readonly response: 31;
3812
+ };
3813
+ export declare const SIGNING_CREATE_TRANSACTION_WITH_LEGACY_ACCOUNT: {
3814
+ readonly request: 32;
3815
+ readonly response: 33;
3816
+ };
3817
+ export declare const SIGNING_SIGN_RAW_WITH_LEGACY_ACCOUNT: {
3818
+ readonly request: 34;
3819
+ readonly response: 35;
3820
+ };
3821
+ export declare const SIGNING_SIGN_PAYLOAD_WITH_LEGACY_ACCOUNT: {
3822
+ readonly request: 36;
3823
+ readonly response: 37;
3824
+ };
3825
+ export declare const CHAT_CREATE_ROOM: {
3826
+ readonly request: 38;
3827
+ readonly response: 39;
3828
+ };
3829
+ export declare const CHAT_REGISTER_BOT: {
3830
+ readonly request: 40;
3831
+ readonly response: 41;
3832
+ };
3833
+ export declare const CHAT_LIST_SUBSCRIBE: {
3834
+ readonly start: 42;
3835
+ readonly stop: 43;
3836
+ readonly interrupt: 44;
3837
+ readonly receive: 45;
3838
+ };
3839
+ export declare const CHAT_POST_MESSAGE: {
3840
+ readonly request: 46;
3841
+ readonly response: 47;
3842
+ };
3843
+ export declare const CHAT_ACTION_SUBSCRIBE: {
3844
+ readonly start: 48;
3845
+ readonly stop: 49;
3846
+ readonly interrupt: 50;
3847
+ readonly receive: 51;
3848
+ };
3849
+ export declare const CHAT_CUSTOM_MESSAGE_RENDER_SUBSCRIBE: {
3850
+ readonly start: 52;
3851
+ readonly stop: 53;
3852
+ readonly interrupt: 54;
3853
+ readonly receive: 55;
3854
+ };
3855
+ export declare const STATEMENT_STORE_SUBSCRIBE: {
3856
+ readonly start: 56;
3857
+ readonly stop: 57;
3858
+ readonly interrupt: 58;
3859
+ readonly receive: 59;
3860
+ };
3861
+ export declare const STATEMENT_STORE_CREATE_PROOF: {
3862
+ readonly request: 60;
3863
+ readonly response: 61;
3864
+ };
3865
+ export declare const STATEMENT_STORE_SUBMIT: {
3866
+ readonly request: 62;
3867
+ readonly response: 63;
3868
+ };
3869
+ export declare const PREIMAGE_LOOKUP_SUBSCRIBE: {
3870
+ readonly start: 64;
3871
+ readonly stop: 65;
3872
+ readonly interrupt: 66;
3873
+ readonly receive: 67;
3874
+ };
3875
+ export declare const PREIMAGE_SUBMIT: {
3876
+ readonly request: 68;
3877
+ readonly response: 69;
3878
+ };
3879
+ export declare const CHAIN_FOLLOW_HEAD_SUBSCRIBE: {
3880
+ readonly start: 76;
3881
+ readonly stop: 77;
3882
+ readonly interrupt: 78;
3883
+ readonly receive: 79;
3884
+ };
3885
+ export declare const CHAIN_GET_HEAD_HEADER: {
3886
+ readonly request: 80;
3887
+ readonly response: 81;
3888
+ };
3889
+ export declare const CHAIN_GET_HEAD_BODY: {
3890
+ readonly request: 82;
3891
+ readonly response: 83;
3892
+ };
3893
+ export declare const CHAIN_GET_HEAD_STORAGE: {
3894
+ readonly request: 84;
3895
+ readonly response: 85;
3896
+ };
3897
+ export declare const CHAIN_CALL_HEAD: {
3898
+ readonly request: 86;
3899
+ readonly response: 87;
3900
+ };
3901
+ export declare const CHAIN_UNPIN_HEAD: {
3902
+ readonly request: 88;
3903
+ readonly response: 89;
3904
+ };
3905
+ export declare const CHAIN_CONTINUE_HEAD: {
3906
+ readonly request: 90;
3907
+ readonly response: 91;
3908
+ };
3909
+ export declare const CHAIN_STOP_HEAD_OPERATION: {
3910
+ readonly request: 92;
3911
+ readonly response: 93;
3912
+ };
3913
+ export declare const CHAIN_GET_SPEC_GENESIS_HASH: {
3914
+ readonly request: 94;
3915
+ readonly response: 95;
3916
+ };
3917
+ export declare const CHAIN_GET_SPEC_CHAIN_NAME: {
3918
+ readonly request: 96;
3919
+ readonly response: 97;
3920
+ };
3921
+ export declare const CHAIN_GET_SPEC_PROPERTIES: {
3922
+ readonly request: 98;
3923
+ readonly response: 99;
3924
+ };
3925
+ export declare const CHAIN_BROADCAST_TRANSACTION: {
3926
+ readonly request: 100;
3927
+ readonly response: 101;
3928
+ };
3929
+ export declare const CHAIN_STOP_TRANSACTION: {
3930
+ readonly request: 102;
3931
+ readonly response: 103;
3932
+ };
3933
+ export declare const THEME_SUBSCRIBE: {
3934
+ readonly start: 104;
3935
+ readonly stop: 105;
3936
+ readonly interrupt: 106;
3937
+ readonly receive: 107;
3938
+ };
3939
+ export declare const ENTROPY_DERIVE: {
3940
+ readonly request: 108;
3941
+ readonly response: 109;
3942
+ };
3943
+ export declare const ACCOUNT_GET_USER_ID: {
3944
+ readonly request: 110;
3945
+ readonly response: 111;
3946
+ };
3947
+ export declare const ACCOUNT_REQUEST_LOGIN: {
3948
+ readonly request: 112;
3949
+ readonly response: 113;
3950
+ };
3951
+ export declare const SIGNING_SIGN_RAW: {
3952
+ readonly request: 114;
3953
+ readonly response: 115;
3954
+ };
3955
+ export declare const SIGNING_SIGN_PAYLOAD: {
3956
+ readonly request: 116;
3957
+ readonly response: 117;
3958
+ };
3959
+ export declare const PAYMENT_BALANCE_SUBSCRIBE: {
3960
+ readonly start: 118;
3961
+ readonly stop: 119;
3962
+ readonly interrupt: 120;
3963
+ readonly receive: 121;
3964
+ };
3965
+ export declare const PAYMENT_TOP_UP: {
3966
+ readonly request: 122;
3967
+ readonly response: 123;
3968
+ };
3969
+ export declare const PAYMENT_REQUEST: {
3970
+ readonly request: 124;
3971
+ readonly response: 125;
3972
+ };
3973
+ export declare const PAYMENT_STATUS_SUBSCRIBE: {
3974
+ readonly start: 126;
3975
+ readonly stop: 127;
3976
+ readonly interrupt: 128;
3977
+ readonly receive: 129;
3978
+ };
3979
+ export declare const RESOURCE_ALLOCATION_REQUEST: {
3980
+ readonly request: 130;
3981
+ readonly response: 131;
3982
+ };
3983
+ export declare const STATEMENT_STORE_CREATE_PROOF_AUTHORIZED: {
3984
+ readonly request: 132;
3985
+ readonly response: 133;
3986
+ };
3987
+ export declare const NOTIFICATIONS_CANCEL_PUSH_NOTIFICATION: {
3988
+ readonly request: 134;
3989
+ readonly response: 135;
3990
+ };
3991
+
3992
+
3993
+ // index.d.ts
3994
+
3995
+
3996
+ // playground/codegen/services.d.ts
3997
+ export declare const services: ServiceInfo[];
3998
+
3999
+
4000
+ // playground/services-types.d.ts
4001
+ export interface MethodInfo {
4002
+ name: string;
4003
+ type: "unary" | "subscription";
4004
+ /** TS-shaped signature for the method (e.g. \`getAccount(request: HostAccountGetRequest): Promise<…>\`). */
4005
+ signature?: string;
4006
+ /** Cargo-doc URL fragment for this method (relative to the rustdoc root for the truapi crate). */
4007
+ docUrl?: string;
4008
+ description?: string;
4009
+ requestDescription?: string;
4010
+ exampleSource?: string;
4011
+ /** DataType id (kebab-case) of the method's request payload, when applicable. */
4012
+ requestType?: string;
4013
+ /** DataType id of the method's response. */
4014
+ responseType?: string;
4015
+ /** DataType id of the method's error. */
4016
+ errorType?: string;
4017
+ }
4018
+ export interface ServiceInfo {
4019
+ name: string;
4020
+ methods: MethodInfo[];
4021
+ }
4022
+
4023
+
4024
+ // transport.d.ts
4025
+ /**
4026
+ * Handle returned by TrUAPI subscription APIs.
4027
+ **/
4028
+ export interface Subscription {
4029
+ /**
4030
+ * Stop the subscription. Calling this more than once has no additional effect.
4031
+ **/
4032
+ unsubscribe: () => void;
4033
+ /**
4034
+ * Transport-assigned request id for the subscription start frame.
4035
+ *
4036
+ * Methods that accept a \`followSubscriptionId\` use this value to scope
4037
+ * follow-up requests to a specific active subscription.
4038
+ **/
4039
+ subscriptionId: string;
4040
+ }
4041
+ /**
4042
+ * Terminal error delivered through \`Observer.error\` for every non-normal
4043
+ * subscription end. When the peer interrupted the stream with a typed payload,
4044
+ * \`reason\` carries the decoded \`Reason\`; otherwise \`reason\` is \`undefined\` and
4045
+ * the underlying transport/decode error is preserved on \`cause\`.
4046
+ *
4047
+ * Discriminate with \`error.reason !== undefined\` (or \`'reason' in error\`).
4048
+ **/
4049
+ export declare class SubscriptionError<Reason = never> extends Error {
4050
+ /**
4051
+ * Typed payload supplied by the peer when it interrupted the subscription.
4052
+ * \`undefined\` when the stream ended for any other reason (transport close,
4053
+ * decode failure, malformed interrupt payload).
4054
+ **/
4055
+ readonly reason?: Reason;
4056
+ constructor(message: string, options?: {
4057
+ reason?: Reason;
4058
+ cause?: unknown;
4059
+ });
4060
+ }
4061
+ /**
4062
+ * Minimal Observable-compatible observer shape used by generated subscription
4063
+ * APIs without depending on RxJS.
4064
+ *
4065
+ * \`Reason\` is the typed interrupt payload for the originating subscription.
4066
+ * Methods without a typed interrupt resolve \`Reason\` to \`never\`, leaving
4067
+ * \`error.reason\` typed as \`undefined\`.
4068
+ **/
4069
+ export interface Observer<Item, Reason = never> {
4070
+ /**
4071
+ * Called with each successfully decoded subscription item.
4072
+ **/
4073
+ next(value: Item): void;
4074
+ /**
4075
+ * Called once when the stream terminates with an error. Inspect
4076
+ * \`error.reason\` to distinguish a typed peer interrupt from a transport or
4077
+ * decode failure (\`error.cause\` carries the underlying failure in the
4078
+ * latter case).
4079
+ **/
4080
+ error(error: SubscriptionError<Reason>): void;
4081
+ /**
4082
+ * Called once when the peer normally completes the stream.
4083
+ **/
4084
+ complete(): void;
4085
+ }
4086
+ declare global {
4087
+ interface SymbolConstructor {
4088
+ readonly observable: unique symbol;
4089
+ }
4090
+ }
4091
+ /**
4092
+ * Minimal Observable-compatible object returned by generated subscription APIs.
4093
+ *
4094
+ * Implements the ES Observable interop protocol so that consumers can pass
4095
+ * an instance straight to \`rxjs.from(...)\`.
4096
+ **/
4097
+ export interface ObservableLike<Item, Reason = never> {
4098
+ /**
4099
+ * Start the stream and receive \`next\`, \`error\`, and \`complete\` callbacks.
4100
+ **/
4101
+ subscribe(observer?: Partial<Observer<Item, Reason>>): Subscription;
4102
+ /**
4103
+ * Observable interop hook. Returns \`this\`.
4104
+ **/
4105
+ [Symbol.observable](): ObservableLike<Item, Reason>;
4106
+ }
4107
+ /**
4108
+ * Numeric frame ids for a one-shot request method.
4109
+ **/
4110
+ export interface RequestFrameIds {
4111
+ /**
4112
+ * Wire discriminant for the outbound request frame.
4113
+ **/
4114
+ request: number;
4115
+ /**
4116
+ * Wire discriminant for the inbound response frame.
4117
+ **/
4118
+ response: number;
4119
+ }
4120
+ /**
4121
+ * Numeric frame ids for a subscription method.
4122
+ **/
4123
+ export interface SubscriptionFrameIds {
4124
+ /**
4125
+ * Wire discriminant for the outbound start frame.
4126
+ **/
4127
+ start: number;
4128
+ /**
4129
+ * Wire discriminant for the outbound stop frame.
4130
+ **/
4131
+ stop: number;
4132
+ /**
4133
+ * Wire discriminant for the inbound interrupt frame.
4134
+ **/
4135
+ interrupt: number;
4136
+ /**
4137
+ * Wire discriminant for the inbound receive frame.
4138
+ **/
4139
+ receive: number;
4140
+ }
4141
+ /**
4142
+ * Options accepted by \`TrUApiTransport.request\`.
4143
+ **/
4144
+ export interface RequestParams<Ok, Err> {
4145
+ /**
4146
+ * Wire discriminants for this request method.
4147
+ **/
4148
+ ids: RequestFrameIds;
4149
+ /**
4150
+ * SCALE-encoded request payload bytes.
4151
+ **/
4152
+ payload: Uint8Array;
4153
+ /**
4154
+ * Decode SCALE response payload bytes into the wire \`ResultPayload\`
4155
+ * envelope. The transport unwraps the envelope into \`ResultAsync<Ok, Err>\`.
4156
+ **/
4157
+ decodeResponse: (payload: Uint8Array) => ResultPayload<Ok, Err>;
4158
+ }
4159
+ /**
4160
+ * Options accepted by \`TrUApiTransport.subscribeRaw\`.
4161
+ **/
4162
+ export interface SubscribeRawParams {
4163
+ /**
4164
+ * Wire discriminants for this subscription method.
4165
+ **/
4166
+ ids: SubscriptionFrameIds;
4167
+ /**
4168
+ * SCALE-encoded subscription start payload bytes.
4169
+ **/
4170
+ payload: Uint8Array;
4171
+ /**
4172
+ * Called with raw SCALE receive payload bytes.
4173
+ **/
4174
+ onReceive: (payload: Uint8Array) => void;
4175
+ /**
4176
+ * Called with raw SCALE interrupt payload bytes when the peer interrupts the subscription.
4177
+ **/
4178
+ onInterrupt?: (payload: Uint8Array) => void;
4179
+ /**
4180
+ * Called when the underlying provider closes while the subscription is active.
4181
+ **/
4182
+ onClose?: (error: Error) => void;
4183
+ }
4184
+ /**
4185
+ * Byte-level transport used by generated client stubs.
4186
+ **/
4187
+ export interface TrUApiTransport {
4188
+ /**
4189
+ * Highest TrUAPI protocol version supported by this generated client.
4190
+ **/
4191
+ readonly truapiVersion: number;
4192
+ /**
4193
+ * SCALE codec version negotiated through the handshake.
4194
+ **/
4195
+ readonly codecVersion: number;
4196
+ /**
4197
+ * Send a one-shot request and resolve with the typed Ok/Err outcome.
4198
+ **/
4199
+ request<Ok, Err>(params: RequestParams<Ok, Err>): ResultAsync<Ok, Err>;
4200
+ /**
4201
+ * Start a subscription and return a handle that can stop it.
4202
+ **/
4203
+ subscribeRaw(params: SubscribeRawParams): Subscription;
4204
+ /**
4205
+ * Tear down the transport and release the listeners it registered on the
4206
+ * underlying \`Provider\`. Pending requests reject and live subscriptions
4207
+ * receive \`onClose\`. Idempotent.
4208
+ *
4209
+ * The provider itself is left alone; the caller decides whether to also
4210
+ * call \`provider.dispose()\` (long-lived hosts that swap providers will
4211
+ * typically dispose the transport but keep the provider).
4212
+ **/
4213
+ dispose(): void;
4214
+ }
4215
+ /**
4216
+ * Tagged payload inside a TrUAPI wire frame.
4217
+ **/
4218
+ export interface Payload {
4219
+ /**
4220
+ * Wire-table numeric discriminant.
4221
+ **/
4222
+ id: number;
4223
+ /**
4224
+ * SCALE-encoded payload body.
4225
+ **/
4226
+ value: Uint8Array;
4227
+ }
4228
+ /**
4229
+ * Top-level TrUAPI wire message.
4230
+ **/
4231
+ export interface ProtocolMessage {
4232
+ /**
4233
+ * Request id used to correlate request/response and subscription frames.
4234
+ **/
4235
+ requestId: string;
4236
+ /**
4237
+ * Tagged SCALE payload carried by this frame.
4238
+ **/
4239
+ payload: Payload;
4240
+ }
4241
+ /**
4242
+ * Raw message pipe abstraction used by the transport.
4243
+ **/
4244
+ export interface Provider {
4245
+ /**
4246
+ * Send a complete SCALE-encoded wire frame to the peer.
4247
+ **/
4248
+ postMessage(message: Uint8Array): void;
4249
+ /**
4250
+ * Register a callback for inbound SCALE-encoded wire frames.
4251
+ **/
4252
+ subscribe(callback: (message: Uint8Array) => void): () => void;
4253
+ /**
4254
+ * Register a callback for provider-level close or failure events.
4255
+ **/
4256
+ subscribeClose?(callback: (error: Error) => void): () => void;
4257
+ /**
4258
+ * Release provider resources and close the underlying pipe.
4259
+ **/
4260
+ dispose(): void;
4261
+ }
4262
+ /**
4263
+ * Encode a \`ProtocolMessage\` into a SCALE wire frame.
4264
+ **/
4265
+ export declare function encodeWireMessage(message: ProtocolMessage): Result<Uint8Array, Error>;
4266
+ /**
4267
+ * Decode a SCALE wire frame into a \`ProtocolMessage\`.
4268
+ **/
4269
+ export declare function decodeWireMessage(message: Uint8Array): Result<ProtocolMessage, Error>;
4270
+ /**
4271
+ * Create a provider for the child side of an iframe \`postMessage\` channel.
4272
+ *
4273
+ * \`target\` is the \`Window\` the provider posts to (typically \`window.parent\`);
4274
+ * \`hostOrigin\` is the pinned \`targetOrigin\` for outbound frames and the
4275
+ * required \`event.origin\` of inbound frames. The provider only delivers
4276
+ * frames whose \`event.source === target\` and \`event.origin === hostOrigin\`,
4277
+ * so it cannot be coerced by an unrelated frame parent.
4278
+ **/
4279
+ export declare function createIframeProvider(options: {
4280
+ target: Window;
4281
+ hostOrigin: string;
4282
+ }): Provider;
4283
+ /**
4284
+ * Create a provider from a web or Electron \`MessagePort\`.
4285
+ **/
4286
+ export declare function createMessagePortProvider(port: MessagePort | Promise<MessagePort>): Provider;
4287
+
4288
+
4289
+ // well-known-chains.d.ts
4290
+ /** Well-known chain descriptors. Each chain is its own \`export const\` so that
4291
+ * bundlers can tree-shake the ones a consumer does not import. */
4292
+ export interface WellKnownChain {
4293
+ readonly name: string;
4294
+ readonly network: "Mainnet" | "Testnet";
4295
+ readonly genesis: HexString;
4296
+ }
4297
+ export declare const PASEO_NEXT_V2_ASSET_HUB: {
4298
+ readonly name: "Paseo Next v2 Hub";
4299
+ readonly network: "Testnet";
4300
+ readonly genesis: "0xbf0488dbe9daa1de1c08c5f743e26fdc2a4ecd74cf87dd1b4b1eeb99ae4ef19f";
4301
+ };
4302
+ `;