@novasamatech/host-api 0.5.0-17 → 0.5.0-18

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.
@@ -0,0 +1,41 @@
1
+ export declare const StorageErr: import("scale-ts").Codec<{
2
+ tag: "Unknown";
3
+ value: {
4
+ reason: string;
5
+ };
6
+ } | {
7
+ tag: "Full";
8
+ value: undefined;
9
+ }>;
10
+ export declare const StorageKey: import("scale-ts").Codec<`0x${string}`>;
11
+ export declare const StorageValue: import("scale-ts").Codec<Uint8Array<ArrayBufferLike>>;
12
+ export declare const StorageReadV1_request: import("scale-ts").Codec<`0x${string}`>;
13
+ export declare const StorageReadV1_response: import("scale-ts").Codec<import("scale-ts").ResultPayload<Uint8Array<ArrayBufferLike> | undefined, {
14
+ tag: "Unknown";
15
+ value: {
16
+ reason: string;
17
+ };
18
+ } | {
19
+ tag: "Full";
20
+ value: undefined;
21
+ }>>;
22
+ export declare const StorageWriteV1_request: import("scale-ts").Codec<[`0x${string}`, Uint8Array<ArrayBufferLike>]>;
23
+ export declare const StorageWriteV1_response: import("scale-ts").Codec<import("scale-ts").ResultPayload<undefined, {
24
+ tag: "Unknown";
25
+ value: {
26
+ reason: string;
27
+ };
28
+ } | {
29
+ tag: "Full";
30
+ value: undefined;
31
+ }>>;
32
+ export declare const StorageClearV1_request: import("scale-ts").Codec<`0x${string}`>;
33
+ export declare const StorageClearV1_response: import("scale-ts").Codec<import("scale-ts").ResultPayload<undefined, {
34
+ tag: "Unknown";
35
+ value: {
36
+ reason: string;
37
+ };
38
+ } | {
39
+ tag: "Full";
40
+ value: undefined;
41
+ }>>;
@@ -0,0 +1,16 @@
1
+ import { Bytes, Enum, Option, Result, Tuple, _void } from 'scale-ts';
2
+ import { GenericErr, Hex } from '../commonCodecs.js';
3
+ // common structures
4
+ export const StorageErr = Enum({
5
+ Full: _void,
6
+ Unknown: GenericErr,
7
+ });
8
+ export const StorageKey = Hex();
9
+ export const StorageValue = Bytes();
10
+ // actions
11
+ export const StorageReadV1_request = StorageKey;
12
+ export const StorageReadV1_response = Result(Option(StorageValue), StorageErr);
13
+ export const StorageWriteV1_request = Tuple(StorageKey, StorageValue);
14
+ export const StorageWriteV1_response = Result(_void, StorageErr);
15
+ export const StorageClearV1_request = StorageKey;
16
+ export const StorageClearV1_response = Result(_void, StorageErr);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@novasamatech/host-api",
3
3
  "type": "module",
4
- "version": "0.5.0-17",
4
+ "version": "0.5.0-18",
5
5
  "description": "Host API: transport implementation for host - product integration.",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {