@novasamatech/host-api 0.6.3 → 0.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -356,7 +356,7 @@ export declare const hostApiProtocol: {
356
356
  };
357
357
  };
358
358
  decryptionKey: Uint8Array<ArrayBufferLike> | undefined;
359
- priority: number | undefined;
359
+ expiry: bigint | undefined;
360
360
  channel: Uint8Array<ArrayBufferLike> | undefined;
361
361
  topics: Uint8Array<ArrayBufferLike>[];
362
362
  data: Uint8Array<ArrayBufferLike> | undefined;
@@ -391,7 +391,7 @@ export declare const hostApiProtocol: {
391
391
  };
392
392
  } | undefined;
393
393
  decryptionKey: Uint8Array<ArrayBufferLike> | undefined;
394
- priority: number | undefined;
394
+ expiry: bigint | undefined;
395
395
  channel: Uint8Array<ArrayBufferLike> | undefined;
396
396
  topics: Uint8Array<ArrayBufferLike>[];
397
397
  data: Uint8Array<ArrayBufferLike> | undefined;
@@ -453,7 +453,7 @@ export declare const hostApiProtocol: {
453
453
  };
454
454
  };
455
455
  decryptionKey: Uint8Array<ArrayBufferLike> | undefined;
456
- priority: number | undefined;
456
+ expiry: bigint | undefined;
457
457
  channel: Uint8Array<ArrayBufferLike> | undefined;
458
458
  topics: Uint8Array<ArrayBufferLike>[];
459
459
  data: Uint8Array<ArrayBufferLike> | undefined;
@@ -375,7 +375,7 @@ export declare const MessagePayload: EnumCodec<Record<"host_handshake_request",
375
375
  };
376
376
  };
377
377
  decryptionKey: Uint8Array<ArrayBufferLike> | undefined;
378
- priority: number | undefined;
378
+ expiry: bigint | undefined;
379
379
  channel: Uint8Array<ArrayBufferLike> | undefined;
380
380
  topics: Uint8Array<ArrayBufferLike>[];
381
381
  data: Uint8Array<ArrayBufferLike> | undefined;
@@ -409,7 +409,7 @@ export declare const MessagePayload: EnumCodec<Record<"host_handshake_request",
409
409
  };
410
410
  } | undefined;
411
411
  decryptionKey: Uint8Array<ArrayBufferLike> | undefined;
412
- priority: number | undefined;
412
+ expiry: bigint | undefined;
413
413
  channel: Uint8Array<ArrayBufferLike> | undefined;
414
414
  topics: Uint8Array<ArrayBufferLike>[];
415
415
  data: Uint8Array<ArrayBufferLike> | undefined;
@@ -472,7 +472,7 @@ export declare const MessagePayload: EnumCodec<Record<"host_handshake_request",
472
472
  };
473
473
  };
474
474
  decryptionKey: Uint8Array<ArrayBufferLike> | undefined;
475
- priority: number | undefined;
475
+ expiry: bigint | undefined;
476
476
  channel: Uint8Array<ArrayBufferLike> | undefined;
477
477
  topics: Uint8Array<ArrayBufferLike>[];
478
478
  data: Uint8Array<ArrayBufferLike> | undefined;
@@ -1338,7 +1338,7 @@ export declare const Message: Codec<{
1338
1338
  };
1339
1339
  };
1340
1340
  decryptionKey: Uint8Array<ArrayBufferLike> | undefined;
1341
- priority: number | undefined;
1341
+ expiry: bigint | undefined;
1342
1342
  channel: Uint8Array<ArrayBufferLike> | undefined;
1343
1343
  topics: Uint8Array<ArrayBufferLike>[];
1344
1344
  data: Uint8Array<ArrayBufferLike> | undefined;
@@ -1382,7 +1382,7 @@ export declare const Message: Codec<{
1382
1382
  };
1383
1383
  } | undefined;
1384
1384
  decryptionKey: Uint8Array<ArrayBufferLike> | undefined;
1385
- priority: number | undefined;
1385
+ expiry: bigint | undefined;
1386
1386
  channel: Uint8Array<ArrayBufferLike> | undefined;
1387
1387
  topics: Uint8Array<ArrayBufferLike>[];
1388
1388
  data: Uint8Array<ArrayBufferLike> | undefined;
@@ -1453,7 +1453,7 @@ export declare const Message: Codec<{
1453
1453
  };
1454
1454
  };
1455
1455
  decryptionKey: Uint8Array<ArrayBufferLike> | undefined;
1456
- priority: number | undefined;
1456
+ expiry: bigint | undefined;
1457
1457
  channel: Uint8Array<ArrayBufferLike> | undefined;
1458
1458
  topics: Uint8Array<ArrayBufferLike>[];
1459
1459
  data: Uint8Array<ArrayBufferLike> | undefined;
@@ -156,15 +156,15 @@ export declare const TextProps: Codec<{
156
156
  export declare const ButtonProps: Codec<{
157
157
  text: string;
158
158
  variant: "primary" | "secondary" | "text" | undefined;
159
- enabled: boolean | undefined;
160
- loading: boolean | undefined;
159
+ enabled: boolean | void;
160
+ loading: boolean | void;
161
161
  clickAction: string | undefined;
162
162
  }>;
163
163
  export declare const TextFieldProps: Codec<{
164
164
  text: string;
165
165
  placeholder: string | undefined;
166
166
  label: string | undefined;
167
- enabled: boolean | undefined;
167
+ enabled: boolean | void;
168
168
  valueChangeAction: string | undefined;
169
169
  }>;
170
170
  export type CustomRendererNodeType = EnumVariants<{
@@ -1,4 +1,4 @@
1
- import { Enum, Status, lazy } from '@novasamatech/scale';
1
+ import { Enum, OptionBool, Status, lazy } from '@novasamatech/scale';
2
2
  import { Option, Struct, Tuple, Vector, _void, bool, compact, str } from 'scale-ts';
3
3
  export const Size = compact;
4
4
  export const Dimensions = Tuple(Size, Size, Option(Size), Option(Size));
@@ -59,15 +59,15 @@ export const TextProps = Struct({
59
59
  export const ButtonProps = Struct({
60
60
  text: str,
61
61
  variant: Option(ButtonVariant),
62
- enabled: Option(bool),
63
- loading: Option(bool),
62
+ enabled: OptionBool,
63
+ loading: OptionBool,
64
64
  clickAction: Option(str),
65
65
  });
66
66
  export const TextFieldProps = Struct({
67
67
  text: str,
68
68
  placeholder: Option(str),
69
69
  label: Option(str),
70
- enabled: Option(bool),
70
+ enabled: OptionBool,
71
71
  valueChangeAction: Option(str),
72
72
  });
73
73
  export const CustomRendererNode = Enum({
@@ -1,17 +1,49 @@
1
- export declare const PermissionErr: [import("scale-ts").Encoder<import("@novasamatech/scale").CodecError<undefined, "PermissionErr::Rejected"> | import("@novasamatech/scale").CodecError<{
2
- reason: string;
3
- }, "PermissionErr::Unknown">>, import("scale-ts").Decoder<import("@novasamatech/scale").CodecError<undefined, "PermissionErr::Rejected"> | import("@novasamatech/scale").CodecError<{
4
- reason: string;
5
- }, "PermissionErr::Unknown">>] & {
6
- enc: import("scale-ts").Encoder<import("@novasamatech/scale").CodecError<undefined, "PermissionErr::Rejected"> | import("@novasamatech/scale").CodecError<{
1
+ export declare const PermissionErr: [import("scale-ts").Encoder<(Error & {
2
+ name: "PermissionErr::Rejected";
3
+ className: string;
4
+ payload: undefined;
5
+ }) | (Error & {
6
+ name: "PermissionErr::Unknown";
7
+ className: string;
8
+ payload: {
7
9
  reason: string;
8
- }, "PermissionErr::Unknown">>;
9
- dec: import("scale-ts").Decoder<import("@novasamatech/scale").CodecError<undefined, "PermissionErr::Rejected"> | import("@novasamatech/scale").CodecError<{
10
+ };
11
+ })>, import("scale-ts").Decoder<(Error & {
12
+ name: "PermissionErr::Rejected";
13
+ className: string;
14
+ payload: undefined;
15
+ }) | (Error & {
16
+ name: "PermissionErr::Unknown";
17
+ className: string;
18
+ payload: {
10
19
  reason: string;
11
- }, "PermissionErr::Unknown">>;
20
+ };
21
+ })>] & {
22
+ enc: import("scale-ts").Encoder<(Error & {
23
+ name: "PermissionErr::Rejected";
24
+ className: string;
25
+ payload: undefined;
26
+ }) | (Error & {
27
+ name: "PermissionErr::Unknown";
28
+ className: string;
29
+ payload: {
30
+ reason: string;
31
+ };
32
+ })>;
33
+ dec: import("scale-ts").Decoder<(Error & {
34
+ name: "PermissionErr::Rejected";
35
+ className: string;
36
+ payload: undefined;
37
+ }) | (Error & {
38
+ name: "PermissionErr::Unknown";
39
+ className: string;
40
+ payload: {
41
+ reason: string;
42
+ };
43
+ })>;
12
44
  } & {
13
- readonly Rejected: import("@novasamatech/scale").ErrCodec<undefined, "PermissionErr::Rejected">;
14
- readonly Unknown: import("@novasamatech/scale").ErrCodec<{
45
+ readonly Rejected: import("../commonCodecs.js").ErrCodec<undefined, "PermissionErr::Rejected">;
46
+ readonly Unknown: import("../commonCodecs.js").ErrCodec<{
15
47
  reason: string;
16
48
  }, "PermissionErr::Unknown">;
17
49
  };
@@ -45,6 +77,14 @@ export declare const PermissionRequestV1_request: import("scale-ts").Codec<{
45
77
  tag: "NetworkRequest";
46
78
  value: string[];
47
79
  }>;
48
- export declare const PermissionRequestV1_response: import("scale-ts").Codec<import("scale-ts").ResultPayload<undefined, import("@novasamatech/scale").CodecError<undefined, "PermissionErr::Rejected"> | import("@novasamatech/scale").CodecError<{
49
- reason: string;
50
- }, "PermissionErr::Unknown">>>;
80
+ export declare const PermissionRequestV1_response: import("scale-ts").Codec<import("scale-ts").ResultPayload<undefined, (Error & {
81
+ name: "PermissionErr::Rejected";
82
+ className: string;
83
+ payload: undefined;
84
+ }) | (Error & {
85
+ name: "PermissionErr::Unknown";
86
+ className: string;
87
+ payload: {
88
+ reason: string;
89
+ };
90
+ })>>;
@@ -1,6 +1,5 @@
1
- import { Enum, ErrEnum } from '@novasamatech/scale';
2
1
  import { Result, Struct, Vector, _void, str } from 'scale-ts';
3
- import { GenericErr, GenesisHash } from '../commonCodecs.js';
2
+ import { Enum, ErrEnum, GenericErr, GenesisHash } from '../commonCodecs.js';
4
3
  export const PermissionErr = ErrEnum('PermissionErr', {
5
4
  Rejected: [_void, 'Permission: rejected'],
6
5
  Unknown: [GenericErr, 'Permission: unknown error'],
@@ -29,7 +29,7 @@ export declare const Statement: import("scale-ts").Codec<{
29
29
  };
30
30
  } | undefined;
31
31
  decryptionKey: Uint8Array<ArrayBufferLike> | undefined;
32
- priority: number | undefined;
32
+ expiry: bigint | undefined;
33
33
  channel: Uint8Array<ArrayBufferLike> | undefined;
34
34
  topics: Uint8Array<ArrayBufferLike>[];
35
35
  data: Uint8Array<ArrayBufferLike> | undefined;
@@ -62,7 +62,7 @@ export declare const SignedStatement: import("scale-ts").Codec<{
62
62
  };
63
63
  };
64
64
  decryptionKey: Uint8Array<ArrayBufferLike> | undefined;
65
- priority: number | undefined;
65
+ expiry: bigint | undefined;
66
66
  channel: Uint8Array<ArrayBufferLike> | undefined;
67
67
  topics: Uint8Array<ArrayBufferLike>[];
68
68
  data: Uint8Array<ArrayBufferLike> | undefined;
@@ -96,7 +96,7 @@ export declare const StatementStoreSubscribeV1_receive: import("scale-ts").Codec
96
96
  };
97
97
  };
98
98
  decryptionKey: Uint8Array<ArrayBufferLike> | undefined;
99
- priority: number | undefined;
99
+ expiry: bigint | undefined;
100
100
  channel: Uint8Array<ArrayBufferLike> | undefined;
101
101
  topics: Uint8Array<ArrayBufferLike>[];
102
102
  data: Uint8Array<ArrayBufferLike> | undefined;
@@ -147,7 +147,7 @@ export declare const StatementStoreCreateProofV1_request: import("scale-ts").Cod
147
147
  };
148
148
  } | undefined;
149
149
  decryptionKey: Uint8Array<ArrayBufferLike> | undefined;
150
- priority: number | undefined;
150
+ expiry: bigint | undefined;
151
151
  channel: Uint8Array<ArrayBufferLike> | undefined;
152
152
  topics: Uint8Array<ArrayBufferLike>[];
153
153
  data: Uint8Array<ArrayBufferLike> | undefined;
@@ -208,7 +208,7 @@ export declare const StatementStoreSubmitV1_request: import("scale-ts").Codec<{
208
208
  };
209
209
  };
210
210
  decryptionKey: Uint8Array<ArrayBufferLike> | undefined;
211
- priority: number | undefined;
211
+ expiry: bigint | undefined;
212
212
  channel: Uint8Array<ArrayBufferLike> | undefined;
213
213
  topics: Uint8Array<ArrayBufferLike>[];
214
214
  data: Uint8Array<ArrayBufferLike> | undefined;
@@ -1,5 +1,5 @@
1
1
  import { Enum, ErrEnum } from '@novasamatech/scale';
2
- import { Bytes, Option, Result, Struct, Tuple, Vector, _void, u32, u64 } from 'scale-ts';
2
+ import { Bytes, Option, Result, Struct, Tuple, Vector, _void, u64 } from 'scale-ts';
3
3
  import { GenericErr, GenericError } from '../commonCodecs.js';
4
4
  import { ProductAccountId } from './accounts.js';
5
5
  // structs definition
@@ -33,7 +33,7 @@ const StatementProof = Enum({
33
33
  export const Statement = Struct({
34
34
  proof: Option(StatementProof),
35
35
  decryptionKey: Option(DecryptionKey),
36
- priority: Option(u32),
36
+ expiry: Option(u64),
37
37
  channel: Option(Channel),
38
38
  topics: Vector(Topic),
39
39
  data: Option(Bytes()),
@@ -41,7 +41,7 @@ export const Statement = Struct({
41
41
  export const SignedStatement = Struct({
42
42
  proof: StatementProof,
43
43
  decryptionKey: Option(DecryptionKey),
44
- priority: Option(u32),
44
+ expiry: Option(u64),
45
45
  channel: Option(Channel),
46
46
  topics: Vector(Topic),
47
47
  data: Option(Bytes()),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@novasamatech/host-api",
3
3
  "type": "module",
4
- "version": "0.6.3",
4
+ "version": "0.6.5",
5
5
  "description": "Host API: transport implementation for host - product integration.",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
@@ -21,7 +21,7 @@
21
21
  "README.md"
22
22
  ],
23
23
  "dependencies": {
24
- "@novasamatech/scale": "0.6.3",
24
+ "@novasamatech/scale": "0.6.5",
25
25
  "@polkadot-api/utils": "^0.2.0",
26
26
  "nanoevents": "9.1.0",
27
27
  "nanoid": "5.1.6",