@arkiv-network/sdk 0.3.1-dev.0 → 0.3.2-dev.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.
@@ -1,4 +1,4 @@
1
- import * as viem17 from "viem";
1
+ import * as viem8 from "viem";
2
2
 
3
3
  //#region src/chains/kaolin.d.ts
4
4
  declare const kaolin: {
@@ -11,13 +11,13 @@ declare const kaolin: {
11
11
  };
12
12
  blockTime?: number | undefined | undefined;
13
13
  contracts?: {
14
- [x: string]: viem17.ChainContract | {
15
- [sourceId: number]: viem17.ChainContract | undefined;
14
+ [x: string]: viem8.ChainContract | {
15
+ [sourceId: number]: viem8.ChainContract | undefined;
16
16
  } | undefined;
17
- ensRegistry?: viem17.ChainContract | undefined;
18
- ensUniversalResolver?: viem17.ChainContract | undefined;
19
- multicall3?: viem17.ChainContract | undefined;
20
- erc6492Verifier?: viem17.ChainContract | undefined;
17
+ ensRegistry?: viem8.ChainContract | undefined;
18
+ ensUniversalResolver?: viem8.ChainContract | undefined;
19
+ multicall3?: viem8.ChainContract | undefined;
20
+ erc6492Verifier?: viem8.ChainContract | undefined;
21
21
  } | undefined;
22
22
  ensTlds?: readonly string[] | undefined;
23
23
  id: 60138453025;
@@ -37,9 +37,9 @@ declare const kaolin: {
37
37
  sourceId?: number | undefined | undefined;
38
38
  testnet: true;
39
39
  custom?: Record<string, unknown> | undefined;
40
- fees?: viem17.ChainFees<undefined> | undefined;
40
+ fees?: viem8.ChainFees<undefined> | undefined;
41
41
  formatters?: undefined;
42
- serializers?: viem17.ChainSerializers<undefined, viem17.TransactionSerializable> | undefined;
42
+ serializers?: viem8.ChainSerializers<undefined, viem8.TransactionSerializable> | undefined;
43
43
  readonly network: "kaolin";
44
44
  };
45
45
  //#endregion
@@ -59,13 +59,13 @@ declare const localhost: {
59
59
  } | undefined | undefined;
60
60
  blockTime?: number | undefined | undefined;
61
61
  contracts?: {
62
- [x: string]: viem17.ChainContract | {
63
- [sourceId: number]: viem17.ChainContract | undefined;
62
+ [x: string]: viem8.ChainContract | {
63
+ [sourceId: number]: viem8.ChainContract | undefined;
64
64
  } | undefined;
65
- ensRegistry?: viem17.ChainContract | undefined;
66
- ensUniversalResolver?: viem17.ChainContract | undefined;
67
- multicall3?: viem17.ChainContract | undefined;
68
- erc6492Verifier?: viem17.ChainContract | undefined;
65
+ ensRegistry?: viem8.ChainContract | undefined;
66
+ ensUniversalResolver?: viem8.ChainContract | undefined;
67
+ multicall3?: viem8.ChainContract | undefined;
68
+ erc6492Verifier?: viem8.ChainContract | undefined;
69
69
  } | undefined;
70
70
  ensTlds?: readonly string[] | undefined;
71
71
  id: 1337;
@@ -84,9 +84,9 @@ declare const localhost: {
84
84
  sourceId?: number | undefined | undefined;
85
85
  testnet?: boolean | undefined | undefined;
86
86
  custom?: Record<string, unknown> | undefined;
87
- fees?: viem17.ChainFees<undefined> | undefined;
87
+ fees?: viem8.ChainFees<undefined> | undefined;
88
88
  formatters?: undefined;
89
- serializers?: viem17.ChainSerializers<undefined, viem17.TransactionSerializable> | undefined;
89
+ serializers?: viem8.ChainSerializers<undefined, viem8.TransactionSerializable> | undefined;
90
90
  };
91
91
  //#endregion
92
92
  //#region src/chains/marketplace.d.ts
@@ -100,13 +100,13 @@ declare const marketplace: {
100
100
  };
101
101
  blockTime?: number | undefined | undefined;
102
102
  contracts?: {
103
- [x: string]: viem17.ChainContract | {
104
- [sourceId: number]: viem17.ChainContract | undefined;
103
+ [x: string]: viem8.ChainContract | {
104
+ [sourceId: number]: viem8.ChainContract | undefined;
105
105
  } | undefined;
106
- ensRegistry?: viem17.ChainContract | undefined;
107
- ensUniversalResolver?: viem17.ChainContract | undefined;
108
- multicall3?: viem17.ChainContract | undefined;
109
- erc6492Verifier?: viem17.ChainContract | undefined;
106
+ ensRegistry?: viem8.ChainContract | undefined;
107
+ ensUniversalResolver?: viem8.ChainContract | undefined;
108
+ multicall3?: viem8.ChainContract | undefined;
109
+ erc6492Verifier?: viem8.ChainContract | undefined;
110
110
  } | undefined;
111
111
  ensTlds?: readonly string[] | undefined;
112
112
  id: 60138453027;
@@ -126,9 +126,9 @@ declare const marketplace: {
126
126
  sourceId?: number | undefined | undefined;
127
127
  testnet: true;
128
128
  custom?: Record<string, unknown> | undefined;
129
- fees?: viem17.ChainFees<undefined> | undefined;
129
+ fees?: viem8.ChainFees<undefined> | undefined;
130
130
  formatters?: undefined;
131
- serializers?: viem17.ChainSerializers<undefined, viem17.TransactionSerializable> | undefined;
131
+ serializers?: viem8.ChainSerializers<undefined, viem8.TransactionSerializable> | undefined;
132
132
  readonly network: "marketplace";
133
133
  };
134
134
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/chains/kaolin.ts","../../src/chains/localhost.ts","../../src/chains/marketplace.ts"],"sourcesContent":[],"mappings":";;;cAEa;;;MAAA,SAuBX,IAAA,EAAA,uBAAA;MAAA,SAAA,GAAA,EAAA,6CAAA;;;;;;iBAAA,MAAA,CAAA,aAAA;;;;;;;;ECvBW,OAAA,CAAA,EAAA,SAWX,MAAA,EAAA,GAAA,SAAA;EAAA,EAAA,EAAA,WAAA;;;;;;;;;;;;;;ECXW,QAAA,CAAA,EAAA,MAuBX,GAAA,SAAA,GAAA,SAAA;EAAA,OAAA,EAAA,IAAA;;;;;;;;;cDvBW;;;MDAA,IAuBX,EAAA,MAAA;MAAA,GAAA,EAAA,MAAA;;;;;;;;;;;iBCZA,MAAA,CAAA,aAAA;;;IAXW,WAWX,CAAA,yBAAA,SAAA;IAAA,oBAAA,CAAA,yBAAA,SAAA;;;;;;;;;;;;;;ICXW,SAAA,OAuBX,EAAA;MAAA,SAAA,IAAA,EAAA,SAAA,CAAA,uBAAA,CAAA;;;;;;;;;;;;cAvBW;;;MFAA,SAuBX,IAAA,EAAA,4BAAA;MAAA,SAAA,GAAA,EAAA,kDAAA;;;;;;iBEAA,MAAA,CAAA,aAAA;;;;;;;;EDvBW,OAAA,CAAA,EAAA,SAWX,MAAA,EAAA,GAAA,SAAA;EAAA,EAAA,EAAA,WAAA;;;;;;;;;;;;;;ECXW,QAAA,CAAA,EAAA,MAuBX,GAAA,SAAA,GAAA,SAAA;EAAA,OAAA,EAAA,IAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/chains/kaolin.ts","../../src/chains/localhost.ts","../../src/chains/marketplace.ts"],"sourcesContent":[],"mappings":";;;cAEa;;;MAAA,SAuBX,IAAA,EAAA,uBAAA;MAAA,SAAA,GAAA,EAAA,6CAAA;;;;;;iBAAA,KAAA,CAAA,aAAA;;;;;;;;ECvBW,OAAA,CAAA,EAAA,SAWX,MAAA,EAAA,GAAA,SAAA;EAAA,EAAA,EAAA,WAAA;;;;;;;;;;;;;;ECXW,QAAA,CAAA,EAAA,MAuBX,GAAA,SAAA,GAAA,SAAA;EAAA,OAAA,EAAA,IAAA;;;;;;;;;cDvBW;;;MDAA,IAuBX,EAAA,MAAA;MAAA,GAAA,EAAA,MAAA;;;;;;;;;;;iBCZA,KAAA,CAAA,aAAA;;;IAXW,WAWX,CAAA,wBAAA,SAAA;IAAA,oBAAA,CAAA,wBAAA,SAAA;;;;;;;;;;;;;;ICXW,SAAA,OAuBX,EAAA;MAAA,SAAA,IAAA,EAAA,SAAA,CAAA,uBAAA,CAAA;;;;;;;;;;;;cAvBW;;;MFAA,SAuBX,IAAA,EAAA,4BAAA;MAAA,SAAA,GAAA,EAAA,kDAAA;;;;;;iBEAA,KAAA,CAAA,aAAA;;;;;;;;EDvBW,OAAA,CAAA,EAAA,SAWX,MAAA,EAAA,GAAA,SAAA;EAAA,EAAA,EAAA,WAAA;;;;;;;;;;;;;;ECXW,QAAA,CAAA,EAAA,MAuBX,GAAA,SAAA,GAAA,SAAA;EAAA,OAAA,EAAA,IAAA"}
@@ -0,0 +1,240 @@
1
+ import { Account, Chain, Client, Hex, RpcSchema, Transport } from "viem";
2
+
3
+ //#region src/types/mimeTypes.d.ts
4
+ type MimeType = "text/plain" | "text/html" | "text/css" | "text/csv" | "text/xml" | "text/javascript" | "application/json" | "application/xml" | "application/pdf" | "application/zip" | "application/gzip" | "application/octet-stream" | "application/javascript" | "application/x-www-form-urlencoded" | "image/png" | "image/jpeg" | "image/webp" | "image/gif" | "image/svg+xml" | "audio/mpeg" | "audio/wav" | "audio/ogg" | "video/mp4" | "video/webm" | "video/ogg" | "multipart/form-data";
5
+ //#endregion
6
+ //#region src/types/rpcSchema.d.ts
7
+ type RpcEntity = {
8
+ key: Hex;
9
+ contentType: MimeType;
10
+ value: string;
11
+ expiresAt: bigint;
12
+ owner: Hex;
13
+ stringAttributes?: [{
14
+ key: string;
15
+ value: string;
16
+ }];
17
+ numericAttributes?: [{
18
+ key: string;
19
+ value: number;
20
+ }];
21
+ };
22
+ type RpcQueryOptions = {
23
+ atBlock?: number;
24
+ includeData?: RpcIncludeData;
25
+ resultsPerPage?: number;
26
+ cursor?: string;
27
+ };
28
+ type RpcIncludeData = {
29
+ key: boolean;
30
+ attributes: boolean;
31
+ payload: boolean;
32
+ contentType: boolean;
33
+ expiration: boolean;
34
+ owner: boolean;
35
+ };
36
+ type ArkivRpcSchema = [{
37
+ Method: "golembase_getStorageValue";
38
+ Parameters?: [entityId: Hex];
39
+ ReturnType: string;
40
+ }, {
41
+ Method: "arkiv_query";
42
+ Parameters?: [query: string, queryOptions?: RpcQueryOptions];
43
+ ReturnType: {
44
+ data: [RpcEntity];
45
+ blockNumber: bigint;
46
+ cursor: string;
47
+ };
48
+ }, {
49
+ Method: "arkiv_getBlockTiming";
50
+ Parameters?: [];
51
+ ReturnType: {
52
+ current_block: bigint;
53
+ current_block_time: number;
54
+ duration: number;
55
+ };
56
+ }, {
57
+ Method: "arkiv_getEntityCount";
58
+ Parameters?: [];
59
+ ReturnType: number;
60
+ }];
61
+ //#endregion
62
+ //#region src/clients/baseClient.d.ts
63
+ type ArkivClient<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, accountOrAddress extends Account | undefined = Account | undefined, rpcSchema extends RpcSchema | undefined = ArkivRpcSchema> = Client<transport, chain, accountOrAddress, rpcSchema>;
64
+ //#endregion
65
+ //#region src/actions/wallet/changeOwnership.d.ts
66
+ /**
67
+ * Parameters for the deleteEntity function.
68
+ * - entityKey: The key of the entity to delete.
69
+ */
70
+ type ChangeOwnershipParameters = {
71
+ entityKey: Hex;
72
+ newOwner: Hex;
73
+ };
74
+ /**
75
+ * Return type for the deleteEntity function.
76
+ * - entityKey: The key of the entity.
77
+ * - txHash: The transaction hash.
78
+ */
79
+ type ChangeOwnershipReturnType = {
80
+ entityKey: Hex;
81
+ txHash: string;
82
+ };
83
+ //#endregion
84
+ //#region src/actions/wallet/createEntity.d.ts
85
+ /**
86
+ * Parameters for the createEntity function.
87
+ * - payload: The payload of the entity.
88
+ * - attributes: The attributes of the entity.
89
+ * - contentType: The content type of the entity.
90
+ * - expiresIn: The expires in of the entity in seconds.
91
+ */
92
+ type CreateEntityParameters = {
93
+ payload: Uint8Array;
94
+ attributes: Attribute[];
95
+ contentType: MimeType;
96
+ expiresIn: number;
97
+ };
98
+ /**
99
+ * Return type for the createEntity function.
100
+ * - entityKey: The key of the entity.
101
+ * - txHash: The transaction hash.
102
+ */
103
+ type CreateEntityReturnType = {
104
+ entityKey: Hex;
105
+ txHash: string;
106
+ };
107
+ //#endregion
108
+ //#region src/actions/wallet/deleteEntity.d.ts
109
+ /**
110
+ * Parameters for the deleteEntity function.
111
+ * - entityKey: The key of the entity to delete.
112
+ */
113
+ type DeleteEntityParameters = {
114
+ entityKey: Hex;
115
+ };
116
+ /**
117
+ * Return type for the deleteEntity function.
118
+ * - entityKey: The key of the entity.
119
+ * - txHash: The transaction hash.
120
+ */
121
+ type DeleteEntityReturnType = {
122
+ entityKey: Hex;
123
+ txHash: string;
124
+ };
125
+ //#endregion
126
+ //#region src/actions/wallet/extendEntity.d.ts
127
+ /**
128
+ * Parameters for the extendEntity function.
129
+ * - entityKey: The key of the entity to extend.
130
+ * - expiresIn: The expires in of the entity in seconds.
131
+ */
132
+ type ExtendEntityParameters = {
133
+ entityKey: Hex;
134
+ expiresIn: number;
135
+ };
136
+ /**
137
+ * Return type for the extendEntity function.
138
+ * - entityKey: The key of the entity.
139
+ * - txHash: The transaction hash.
140
+ */
141
+ type ExtendEntityReturnType = {
142
+ entityKey: Hex;
143
+ txHash: string;
144
+ };
145
+ //#endregion
146
+ //#region src/actions/wallet/updateEntity.d.ts
147
+ /**
148
+ * Parameters for the updateEntity function.
149
+ * - entityKey: The key of the entity to update.
150
+ * - payload: The payload of the entity.
151
+ * - attributes: The attributes of the entity.
152
+ * - contentType: The content type of the entity.
153
+ * - expiresIn: The expires in of the entity in seconds.
154
+ */
155
+ type UpdateEntityParameters = {
156
+ entityKey: Hex;
157
+ payload: Uint8Array;
158
+ attributes: Attribute[];
159
+ contentType: MimeType;
160
+ expiresIn: number;
161
+ };
162
+ /**
163
+ * Return type for the updateEntity function.
164
+ * - entityKey: The key of the entity.
165
+ * - txHash: The transaction hash.
166
+ */
167
+ type UpdateEntityReturnType = {
168
+ entityKey: Hex;
169
+ txHash: string;
170
+ };
171
+ //#endregion
172
+ //#region src/actions/wallet/mutateEntities.d.ts
173
+ /**
174
+ * Parameters for the mutateEntities function.
175
+ * - creates: The creates to perform.
176
+ * - updates: The updates to perform.
177
+ * - deletes: The deletes to perform.
178
+ * - extensions: The extensions to perform.
179
+ */
180
+ type MutateEntitiesParameters = {
181
+ creates?: CreateEntityParameters[];
182
+ updates?: UpdateEntityParameters[];
183
+ deletes?: DeleteEntityParameters[];
184
+ extensions?: ExtendEntityParameters[];
185
+ ownershipChanges?: ChangeOwnershipParameters[];
186
+ };
187
+ /**
188
+ * Return type for the mutateEntities function.
189
+ * - txHash: The transaction hash.
190
+ * - createdEntities: The keys of the created entities.
191
+ * - updatedEntities: The keys of the updated entities.
192
+ * - deletedEntities: The keys of the deleted entities.
193
+ * - extendedEntities: The keys of the extended entities.
194
+ * - ownershipChanges: The keys of the ownership changes.
195
+ */
196
+ type MutateEntitiesReturnType = {
197
+ txHash: string;
198
+ createdEntities: Hex[];
199
+ updatedEntities: Hex[];
200
+ deletedEntities: Hex[];
201
+ extendedEntities: Hex[];
202
+ ownershipChanges: Hex[];
203
+ };
204
+ //#endregion
205
+ //#region src/types/attributes.d.ts
206
+ type Attribute = {
207
+ key: string;
208
+ value: string | number;
209
+ };
210
+ //#endregion
211
+ //#region src/types/txParams.d.ts
212
+ type TxParams = {
213
+ gas?: bigint;
214
+ nonce?: number;
215
+ gasPrice?: bigint;
216
+ maxFeePerGas?: never;
217
+ maxPriorityFeePerGas?: never;
218
+ } | {
219
+ gas?: bigint;
220
+ nonce?: number;
221
+ maxFeePerGas?: bigint;
222
+ maxPriorityFeePerGas?: bigint;
223
+ gasPrice?: never;
224
+ };
225
+ //#endregion
226
+ //#region src/types/entity.d.ts
227
+ declare class Entity {
228
+ key: Hex;
229
+ owner: Hex;
230
+ expiresAtBlock: bigint;
231
+ payload: Uint8Array;
232
+ attributes: Attribute[];
233
+ contentType: MimeType;
234
+ constructor(key: Hex, contentType: MimeType, owner: Hex, expiresAtBlock: bigint, payload: Uint8Array, attributes: Attribute[]);
235
+ toText(): string;
236
+ toJson(): any;
237
+ }
238
+ //#endregion
239
+ export { ArkivRpcSchema as _, MutateEntitiesReturnType as a, RpcQueryOptions as b, ExtendEntityParameters as c, DeleteEntityReturnType as d, CreateEntityParameters as f, ArkivClient as g, ChangeOwnershipReturnType as h, MutateEntitiesParameters as i, ExtendEntityReturnType as l, ChangeOwnershipParameters as m, TxParams as n, UpdateEntityParameters as o, CreateEntityReturnType as p, Attribute as r, UpdateEntityReturnType as s, Entity as t, DeleteEntityParameters as u, RpcEntity as v, MimeType as x, RpcIncludeData as y };
240
+ //# sourceMappingURL=entity-OY78HYxA.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-OY78HYxA.d.cts","names":[],"sources":["../src/types/mimeTypes.ts","../src/types/rpcSchema.ts","../src/clients/baseClient.ts","../src/actions/wallet/changeOwnership.ts","../src/actions/wallet/createEntity.ts","../src/actions/wallet/deleteEntity.ts","../src/actions/wallet/extendEntity.ts","../src/actions/wallet/updateEntity.ts","../src/actions/wallet/mutateEntities.ts","../src/types/attributes.ts","../src/types/txParams.ts","../src/types/entity.ts"],"sourcesContent":[],"mappings":";;;KAAY,QAAA;;;KCGA,SAAA;EDHA,GAAA,ECIL,GDJK;eCKG;;;EAFH,KAAA,EAKH,GALG;EACL,gBAAA,CAAA,EAAA,CAAA;IACQ,GAAA,EAAA,MAAA;IAGN,KAAA,EAAA,MAAA;EAAG,CAAA,CAAA;EAKA,iBAAA,CAAe,EAAA,CAAA;IAOf,GAAA,EAAA,MAAA;IASA,KAAA,EAAA,MAAc;EAGE,CAAA,CAAA;CAKoB;AAEnC,KA1BD,eAAA,GA0BC;EAAS,OAAA,CAAA,EAAA,MAAA;gBAxBN;;;ACZhB,CAAA;AACoB,KDgBR,cAAA,GChBQ;EAAY,GAAA,EAAA,OAAA;EAChB,UAAA,EAAA,OAAA;EAAoB,OAAA,EAAA,OAAA;EACT,WAAA,EAAA,OAAA;EAAsB,UAAA,EAAA,OAAA;EAC7B,KAAA,EAAA,OAAA;CAAwB;AACjC,KDqBC,cAAA,GCrBD,CAAW;EAAO,MAAA,EAAA,2BAAA;EAAkB,UAAA,CAAA,EAAA,CAAA,QAAA,EDwBnB,GCxBmB,CAAA;EAA3C,UAAA,EAAA,MAAA;AAAM,CAAA;;8CD6BsC;EE5BpC,UAAA,EAAA;IAUA,IAAA,EAAA,CFoBC,SEpBD,CAAA;;;;ACPA,CAAA,EACD;EACG,MAAA,EAAA,sBAAA;EACC,UAAA,CAAA,EAAA,EAAA;EAAQ,UAAA,EAAA;IASX,aAAA,EAAA,MAAsB;;;;ACftB,CAAA,EASA;;;;ACRA,CAAA,CAUZ;;;KJjBY,8BACQ,YAAY,yBAChB,oBAAoB,4CACT,sBAAsB,uCAC7B,wBAAwB,kBACxC,OAAO,WAAW,OAAO,kBAAkB;;;AFR/C;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BP;qBACM;;ANnBrB;;;;;;;;;AAKW,KM6DC,wBAAA,GN7DD;EAAW,MAAA,EAAA,MAAA;EAAO,eAAA,EM+DV,GN/DU,EAAA;EAAkB,eAAA,EMgE5B,GNhE4B,EAAA;EAA3C,eAAA,EMiEe,GNjEf,EAAA;EAAM,gBAAA,EMkEU,GNlEV,EAAA;oBMmEU;;;;KC3ER,SAAA;;;ATAZ,CAAA;;;KUAY,QAAA;;;EVAA,QAAA,CAAA,EAAQ,MAAA;;;;ECGR,GAAA,CAAA,EAAA,MAAS;EACd,KAAA,CAAA,EAAA,MAAA;EACQ,YAAA,CAAA,EAAA,MAAA;EAGN,oBAAA,CAAA,EAAA,MAAA;EAAG,QAAA,CAAA,EAAA,KAAA;AAKZ,CAAA;;;ADbY,cWIC,MAAA,CXJO;OWKb;SACE;;EVHG,OAAA,EUKD,UVLU;EACd,UAAA,EUKO,SVLP,EAAA;EACQ,WAAA,EUKA,QVLA;EAGN,WAAA,CAAA,GAAA,EUKA,GVLA,EAAA,WAAA,EUMQ,QVNR,EAAA,KAAA,EUOE,GVPF,EAAA,cAAA,EAAA,MAAA,EAAA,OAAA,EUSI,UVTJ,EAAA,UAAA,EUUO,SVVP,EAAA;EAAG,MAAA,CAAA,CAAA,EAAA,MAAA;EAKA,MAAA,CAAA,CAAA,EAAA,GAAA;AAOZ"}
@@ -0,0 +1,240 @@
1
+ import { Account, Chain, Client, Hex, RpcSchema, Transport } from "viem";
2
+
3
+ //#region src/types/mimeTypes.d.ts
4
+ type MimeType = "text/plain" | "text/html" | "text/css" | "text/csv" | "text/xml" | "text/javascript" | "application/json" | "application/xml" | "application/pdf" | "application/zip" | "application/gzip" | "application/octet-stream" | "application/javascript" | "application/x-www-form-urlencoded" | "image/png" | "image/jpeg" | "image/webp" | "image/gif" | "image/svg+xml" | "audio/mpeg" | "audio/wav" | "audio/ogg" | "video/mp4" | "video/webm" | "video/ogg" | "multipart/form-data";
5
+ //#endregion
6
+ //#region src/types/rpcSchema.d.ts
7
+ type RpcEntity = {
8
+ key: Hex;
9
+ contentType: MimeType;
10
+ value: string;
11
+ expiresAt: bigint;
12
+ owner: Hex;
13
+ stringAttributes?: [{
14
+ key: string;
15
+ value: string;
16
+ }];
17
+ numericAttributes?: [{
18
+ key: string;
19
+ value: number;
20
+ }];
21
+ };
22
+ type RpcQueryOptions = {
23
+ atBlock?: number;
24
+ includeData?: RpcIncludeData;
25
+ resultsPerPage?: number;
26
+ cursor?: string;
27
+ };
28
+ type RpcIncludeData = {
29
+ key: boolean;
30
+ attributes: boolean;
31
+ payload: boolean;
32
+ contentType: boolean;
33
+ expiration: boolean;
34
+ owner: boolean;
35
+ };
36
+ type ArkivRpcSchema = [{
37
+ Method: "golembase_getStorageValue";
38
+ Parameters?: [entityId: Hex];
39
+ ReturnType: string;
40
+ }, {
41
+ Method: "arkiv_query";
42
+ Parameters?: [query: string, queryOptions?: RpcQueryOptions];
43
+ ReturnType: {
44
+ data: [RpcEntity];
45
+ blockNumber: bigint;
46
+ cursor: string;
47
+ };
48
+ }, {
49
+ Method: "arkiv_getBlockTiming";
50
+ Parameters?: [];
51
+ ReturnType: {
52
+ current_block: bigint;
53
+ current_block_time: number;
54
+ duration: number;
55
+ };
56
+ }, {
57
+ Method: "arkiv_getEntityCount";
58
+ Parameters?: [];
59
+ ReturnType: number;
60
+ }];
61
+ //#endregion
62
+ //#region src/clients/baseClient.d.ts
63
+ type ArkivClient<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, accountOrAddress extends Account | undefined = Account | undefined, rpcSchema extends RpcSchema | undefined = ArkivRpcSchema> = Client<transport, chain, accountOrAddress, rpcSchema>;
64
+ //#endregion
65
+ //#region src/actions/wallet/changeOwnership.d.ts
66
+ /**
67
+ * Parameters for the deleteEntity function.
68
+ * - entityKey: The key of the entity to delete.
69
+ */
70
+ type ChangeOwnershipParameters = {
71
+ entityKey: Hex;
72
+ newOwner: Hex;
73
+ };
74
+ /**
75
+ * Return type for the deleteEntity function.
76
+ * - entityKey: The key of the entity.
77
+ * - txHash: The transaction hash.
78
+ */
79
+ type ChangeOwnershipReturnType = {
80
+ entityKey: Hex;
81
+ txHash: string;
82
+ };
83
+ //#endregion
84
+ //#region src/actions/wallet/createEntity.d.ts
85
+ /**
86
+ * Parameters for the createEntity function.
87
+ * - payload: The payload of the entity.
88
+ * - attributes: The attributes of the entity.
89
+ * - contentType: The content type of the entity.
90
+ * - expiresIn: The expires in of the entity in seconds.
91
+ */
92
+ type CreateEntityParameters = {
93
+ payload: Uint8Array;
94
+ attributes: Attribute[];
95
+ contentType: MimeType;
96
+ expiresIn: number;
97
+ };
98
+ /**
99
+ * Return type for the createEntity function.
100
+ * - entityKey: The key of the entity.
101
+ * - txHash: The transaction hash.
102
+ */
103
+ type CreateEntityReturnType = {
104
+ entityKey: Hex;
105
+ txHash: string;
106
+ };
107
+ //#endregion
108
+ //#region src/actions/wallet/deleteEntity.d.ts
109
+ /**
110
+ * Parameters for the deleteEntity function.
111
+ * - entityKey: The key of the entity to delete.
112
+ */
113
+ type DeleteEntityParameters = {
114
+ entityKey: Hex;
115
+ };
116
+ /**
117
+ * Return type for the deleteEntity function.
118
+ * - entityKey: The key of the entity.
119
+ * - txHash: The transaction hash.
120
+ */
121
+ type DeleteEntityReturnType = {
122
+ entityKey: Hex;
123
+ txHash: string;
124
+ };
125
+ //#endregion
126
+ //#region src/actions/wallet/extendEntity.d.ts
127
+ /**
128
+ * Parameters for the extendEntity function.
129
+ * - entityKey: The key of the entity to extend.
130
+ * - expiresIn: The expires in of the entity in seconds.
131
+ */
132
+ type ExtendEntityParameters = {
133
+ entityKey: Hex;
134
+ expiresIn: number;
135
+ };
136
+ /**
137
+ * Return type for the extendEntity function.
138
+ * - entityKey: The key of the entity.
139
+ * - txHash: The transaction hash.
140
+ */
141
+ type ExtendEntityReturnType = {
142
+ entityKey: Hex;
143
+ txHash: string;
144
+ };
145
+ //#endregion
146
+ //#region src/actions/wallet/updateEntity.d.ts
147
+ /**
148
+ * Parameters for the updateEntity function.
149
+ * - entityKey: The key of the entity to update.
150
+ * - payload: The payload of the entity.
151
+ * - attributes: The attributes of the entity.
152
+ * - contentType: The content type of the entity.
153
+ * - expiresIn: The expires in of the entity in seconds.
154
+ */
155
+ type UpdateEntityParameters = {
156
+ entityKey: Hex;
157
+ payload: Uint8Array;
158
+ attributes: Attribute[];
159
+ contentType: MimeType;
160
+ expiresIn: number;
161
+ };
162
+ /**
163
+ * Return type for the updateEntity function.
164
+ * - entityKey: The key of the entity.
165
+ * - txHash: The transaction hash.
166
+ */
167
+ type UpdateEntityReturnType = {
168
+ entityKey: Hex;
169
+ txHash: string;
170
+ };
171
+ //#endregion
172
+ //#region src/actions/wallet/mutateEntities.d.ts
173
+ /**
174
+ * Parameters for the mutateEntities function.
175
+ * - creates: The creates to perform.
176
+ * - updates: The updates to perform.
177
+ * - deletes: The deletes to perform.
178
+ * - extensions: The extensions to perform.
179
+ */
180
+ type MutateEntitiesParameters = {
181
+ creates?: CreateEntityParameters[];
182
+ updates?: UpdateEntityParameters[];
183
+ deletes?: DeleteEntityParameters[];
184
+ extensions?: ExtendEntityParameters[];
185
+ ownershipChanges?: ChangeOwnershipParameters[];
186
+ };
187
+ /**
188
+ * Return type for the mutateEntities function.
189
+ * - txHash: The transaction hash.
190
+ * - createdEntities: The keys of the created entities.
191
+ * - updatedEntities: The keys of the updated entities.
192
+ * - deletedEntities: The keys of the deleted entities.
193
+ * - extendedEntities: The keys of the extended entities.
194
+ * - ownershipChanges: The keys of the ownership changes.
195
+ */
196
+ type MutateEntitiesReturnType = {
197
+ txHash: string;
198
+ createdEntities: Hex[];
199
+ updatedEntities: Hex[];
200
+ deletedEntities: Hex[];
201
+ extendedEntities: Hex[];
202
+ ownershipChanges: Hex[];
203
+ };
204
+ //#endregion
205
+ //#region src/types/attributes.d.ts
206
+ type Attribute = {
207
+ key: string;
208
+ value: string | number;
209
+ };
210
+ //#endregion
211
+ //#region src/types/txParams.d.ts
212
+ type TxParams = {
213
+ gas?: bigint;
214
+ nonce?: number;
215
+ gasPrice?: bigint;
216
+ maxFeePerGas?: never;
217
+ maxPriorityFeePerGas?: never;
218
+ } | {
219
+ gas?: bigint;
220
+ nonce?: number;
221
+ maxFeePerGas?: bigint;
222
+ maxPriorityFeePerGas?: bigint;
223
+ gasPrice?: never;
224
+ };
225
+ //#endregion
226
+ //#region src/types/entity.d.ts
227
+ declare class Entity {
228
+ key: Hex;
229
+ owner: Hex;
230
+ expiresAtBlock: bigint;
231
+ payload: Uint8Array;
232
+ attributes: Attribute[];
233
+ contentType: MimeType;
234
+ constructor(key: Hex, contentType: MimeType, owner: Hex, expiresAtBlock: bigint, payload: Uint8Array, attributes: Attribute[]);
235
+ toText(): string;
236
+ toJson(): any;
237
+ }
238
+ //#endregion
239
+ export { ArkivRpcSchema as _, MutateEntitiesReturnType as a, RpcQueryOptions as b, ExtendEntityParameters as c, DeleteEntityReturnType as d, CreateEntityParameters as f, ArkivClient as g, ChangeOwnershipReturnType as h, MutateEntitiesParameters as i, ExtendEntityReturnType as l, ChangeOwnershipParameters as m, TxParams as n, UpdateEntityParameters as o, CreateEntityReturnType as p, Attribute as r, UpdateEntityReturnType as s, Entity as t, DeleteEntityParameters as u, RpcEntity as v, MimeType as x, RpcIncludeData as y };
240
+ //# sourceMappingURL=entity-o4fwHXKf.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-o4fwHXKf.d.ts","names":[],"sources":["../src/types/mimeTypes.ts","../src/types/rpcSchema.ts","../src/clients/baseClient.ts","../src/actions/wallet/changeOwnership.ts","../src/actions/wallet/createEntity.ts","../src/actions/wallet/deleteEntity.ts","../src/actions/wallet/extendEntity.ts","../src/actions/wallet/updateEntity.ts","../src/actions/wallet/mutateEntities.ts","../src/types/attributes.ts","../src/types/txParams.ts","../src/types/entity.ts"],"sourcesContent":[],"mappings":";;;KAAY,QAAA;;;KCGA,SAAA;EDHA,GAAA,ECIL,GDJK;eCKG;;;EAFH,KAAA,EAKH,GALG;EAC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