@arkiv-network/sdk 0.3.2-dev.3 → 0.3.2-dev.4
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.
- package/README.md +12 -8
- package/dist/chains/index.cjs +1 -0
- package/dist/{entity-BG8YycYJ.d.ts → entity-Bsvmepwv.d.cts} +25 -13
- package/dist/entity-Bsvmepwv.d.cts.map +1 -0
- package/dist/{entity-0JJeFAgO.d.cts → entity-ChTOBhd6.d.ts} +25 -13
- package/dist/entity-ChTOBhd6.d.ts.map +1 -0
- package/dist/index.cjs +31 -21
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +31 -21
- package/dist/index.js.map +1 -1
- package/dist/query/index.cjs +1 -1
- package/dist/query/index.d.cts +2 -2
- package/dist/query/index.d.ts +2 -2
- package/dist/query/index.js +1 -1
- package/dist/{queryBuilder-Dc_ii8LH.d.cts → queryBuilder-CNRqyot6.d.cts} +2 -2
- package/dist/{queryBuilder-Dc_ii8LH.d.cts.map → queryBuilder-CNRqyot6.d.cts.map} +1 -1
- package/dist/{queryBuilder-DEkfSiCF.cjs → queryBuilder-Cn5JJRMM.cjs} +79 -11
- package/dist/{queryBuilder-BNhnpewa.d.ts → queryBuilder-DI251Jjp.d.ts} +2 -2
- package/dist/{queryBuilder-BNhnpewa.d.ts.map → queryBuilder-DI251Jjp.d.ts.map} +1 -1
- package/dist/{queryBuilder-CAQ7TDMZ.js → queryBuilder-DVs4ZIyZ.js} +45 -13
- package/dist/queryBuilder-DVs4ZIyZ.js.map +1 -0
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/index.cjs +1 -0
- package/dist/utils/index.d.cts.map +1 -1
- package/package.json +4 -2
- package/src/actions/public/getBlockTiming.ts +4 -1
- package/src/actions/public/subscribeEntityEvents.ts +6 -3
- package/src/actions/wallet/changeOwnership.ts +5 -2
- package/src/actions/wallet/createEntity.ts +8 -5
- package/src/actions/wallet/deleteEntity.ts +8 -5
- package/src/actions/wallet/extendEntity.ts +8 -5
- package/src/actions/wallet/mutateEntities.ts +8 -4
- package/src/actions/wallet/updateEntity.ts +8 -5
- package/src/clients/decorators/arkivWallet.ts +1 -1
- package/src/query/engine.test.ts +75 -0
- package/src/query/engine.ts +28 -9
- package/src/query/queryBuilder.test.ts +8 -0
- package/src/query/queryResult.ts +4 -1
- package/src/types/entity.ts +22 -10
- package/src/types/rpcSchema.ts +9 -1
- package/src/utils/arkivTransactions.ts +6 -3
- package/src/utils/compression.ts +7 -4
- package/src/utils/entities.ts +15 -2
- package/src/utils/logger.ts +13 -0
- package/dist/entity-0JJeFAgO.d.cts.map +0 -1
- package/dist/entity-BG8YycYJ.d.ts.map +0 -1
- package/dist/queryBuilder-CAQ7TDMZ.js.map +0 -1
package/README.md
CHANGED
|
@@ -32,13 +32,13 @@ const client = createPublicClient({
|
|
|
32
32
|
const chainId = await client.getChainId();
|
|
33
33
|
|
|
34
34
|
// Get entity by key
|
|
35
|
-
const entity = await client.getEntity('
|
|
35
|
+
const entity = await client.getEntity('0x89f9469ee5dcf34a08dfd89a1768c34eefc588f299a07663d2b236b3d6b83df9');
|
|
36
36
|
|
|
37
37
|
// Build and execute a query using QueryBuilder
|
|
38
38
|
const query = client.buildQuery();
|
|
39
39
|
const result = await query
|
|
40
40
|
.where(eq('testKey', 'testValue'))
|
|
41
|
-
.ownedBy('
|
|
41
|
+
.ownedBy('0x6186B0DbA9652262942d5A465d49686eb560834C')
|
|
42
42
|
.withAttributes(true)
|
|
43
43
|
.withPayload(true)
|
|
44
44
|
.limit(10)
|
|
@@ -47,19 +47,19 @@ const result = await query
|
|
|
47
47
|
console.log('Found entities:', result.entities);
|
|
48
48
|
|
|
49
49
|
// Pagination - fetch next page
|
|
50
|
-
if (result.
|
|
50
|
+
if (result.hasNextPage()) {
|
|
51
51
|
await result.next();
|
|
52
52
|
console.log('Next page:', result.entities);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
// Or use raw query string
|
|
56
|
-
const rawQueryResult = await client.query('testKey = testValue && $owner =
|
|
56
|
+
const rawQueryResult = await client.query('testKey = "testValue" && $owner = "0x6186B0DbA9652262942d5A465d49686eb560834C"');
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
### Wallet Client with Create Entity
|
|
60
60
|
|
|
61
61
|
```typescript
|
|
62
|
-
import { createWalletClient, http
|
|
62
|
+
import { createPublicClient, createWalletClient, http } from '@arkiv-network/sdk';
|
|
63
63
|
import { kaolin } from '@arkiv-network/sdk/chains';
|
|
64
64
|
import { privateKeyToAccount } from '@arkiv-network/sdk/accounts';
|
|
65
65
|
import { ExpirationTime, jsonToPayload } from '@arkiv-network/sdk/utils';
|
|
@@ -73,12 +73,12 @@ const client = createWalletClient({
|
|
|
73
73
|
|
|
74
74
|
// Create an entity
|
|
75
75
|
const { entityKey, txHash } = await client.createEntity({
|
|
76
|
-
payload: jsonToPayload{
|
|
76
|
+
payload: jsonToPayload({
|
|
77
77
|
entity: {
|
|
78
78
|
entityType: 'document',
|
|
79
79
|
entityId: 'doc-123',
|
|
80
80
|
},
|
|
81
|
-
},
|
|
81
|
+
}),
|
|
82
82
|
contentType: 'application/json',
|
|
83
83
|
attributes: [
|
|
84
84
|
{ key: 'category', value: 'documentation' },
|
|
@@ -91,7 +91,11 @@ console.log('Created entity:', entityKey);
|
|
|
91
91
|
console.log('Transaction hash:', txHash);
|
|
92
92
|
|
|
93
93
|
// Get the created entity
|
|
94
|
-
const
|
|
94
|
+
const publicClient = createPublicClient({
|
|
95
|
+
chain: kaolin,
|
|
96
|
+
transport: http()
|
|
97
|
+
});
|
|
98
|
+
const entity = await publicClient.getEntity(entityKey);
|
|
95
99
|
console.log('Entity:', entity);
|
|
96
100
|
```
|
|
97
101
|
|
package/dist/chains/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Account, Chain, Client, Hex, RpcSchema, Transport } from "viem";
|
|
1
|
+
import { Account, Chain, Client, Hash, Hex, RpcSchema, Transport } from "viem";
|
|
2
2
|
|
|
3
3
|
//#region src/types/mimeTypes.d.ts
|
|
4
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";
|
|
@@ -8,7 +8,11 @@ type RpcEntity = {
|
|
|
8
8
|
key: Hex;
|
|
9
9
|
contentType: MimeType;
|
|
10
10
|
value: string;
|
|
11
|
-
expiresAt:
|
|
11
|
+
expiresAt: string;
|
|
12
|
+
createdAtBlock: string;
|
|
13
|
+
lastModifiedAtBlock: string;
|
|
14
|
+
transactionIndexInBlock: string;
|
|
15
|
+
operationIndexInTransaction: string;
|
|
12
16
|
owner: Hex;
|
|
13
17
|
stringAttributes?: [{
|
|
14
18
|
key: string;
|
|
@@ -38,6 +42,10 @@ type RpcIncludeData = {
|
|
|
38
42
|
contentType: boolean;
|
|
39
43
|
expiration: boolean;
|
|
40
44
|
owner: boolean;
|
|
45
|
+
createdAtBlock: boolean;
|
|
46
|
+
lastModifiedAtBlock: boolean;
|
|
47
|
+
transactionIndexInBlock: boolean;
|
|
48
|
+
operationIndexInTransaction: boolean;
|
|
41
49
|
};
|
|
42
50
|
type ArkivRpcSchema = [{
|
|
43
51
|
Method: "arkiv_query";
|
|
@@ -104,7 +112,7 @@ type CreateEntityParameters = {
|
|
|
104
112
|
*/
|
|
105
113
|
type CreateEntityReturnType = {
|
|
106
114
|
entityKey: Hex;
|
|
107
|
-
txHash:
|
|
115
|
+
txHash: Hash;
|
|
108
116
|
};
|
|
109
117
|
//#endregion
|
|
110
118
|
//#region src/actions/wallet/deleteEntity.d.ts
|
|
@@ -122,7 +130,7 @@ type DeleteEntityParameters = {
|
|
|
122
130
|
*/
|
|
123
131
|
type DeleteEntityReturnType = {
|
|
124
132
|
entityKey: Hex;
|
|
125
|
-
txHash:
|
|
133
|
+
txHash: Hash;
|
|
126
134
|
};
|
|
127
135
|
//#endregion
|
|
128
136
|
//#region src/actions/wallet/extendEntity.d.ts
|
|
@@ -142,7 +150,7 @@ type ExtendEntityParameters = {
|
|
|
142
150
|
*/
|
|
143
151
|
type ExtendEntityReturnType = {
|
|
144
152
|
entityKey: Hex;
|
|
145
|
-
txHash:
|
|
153
|
+
txHash: Hash;
|
|
146
154
|
};
|
|
147
155
|
//#endregion
|
|
148
156
|
//#region src/actions/wallet/updateEntity.d.ts
|
|
@@ -168,7 +176,7 @@ type UpdateEntityParameters = {
|
|
|
168
176
|
*/
|
|
169
177
|
type UpdateEntityReturnType = {
|
|
170
178
|
entityKey: Hex;
|
|
171
|
-
txHash:
|
|
179
|
+
txHash: Hash;
|
|
172
180
|
};
|
|
173
181
|
//#endregion
|
|
174
182
|
//#region src/actions/wallet/mutateEntities.d.ts
|
|
@@ -196,7 +204,7 @@ type MutateEntitiesParameters = {
|
|
|
196
204
|
* - ownershipChanges: The keys of the ownership changes.
|
|
197
205
|
*/
|
|
198
206
|
type MutateEntitiesReturnType = {
|
|
199
|
-
txHash:
|
|
207
|
+
txHash: Hash;
|
|
200
208
|
createdEntities: Hex[];
|
|
201
209
|
updatedEntities: Hex[];
|
|
202
210
|
deletedEntities: Hex[];
|
|
@@ -228,15 +236,19 @@ type TxParams = {
|
|
|
228
236
|
//#region src/types/entity.d.ts
|
|
229
237
|
declare class Entity {
|
|
230
238
|
key: Hex;
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
239
|
+
contentType: MimeType | undefined;
|
|
240
|
+
owner: Hex | undefined;
|
|
241
|
+
expiresAtBlock: bigint | undefined;
|
|
242
|
+
createdAtBlock: bigint | undefined;
|
|
243
|
+
lastModifiedAtBlock: bigint | undefined;
|
|
244
|
+
transactionIndexInBlock: bigint | undefined;
|
|
245
|
+
operationIndexInTransaction: bigint | undefined;
|
|
246
|
+
payload: Uint8Array | undefined;
|
|
234
247
|
attributes: Attribute[];
|
|
235
|
-
contentType: MimeType;
|
|
236
|
-
constructor(key: Hex, contentType: MimeType, owner: Hex, expiresAtBlock: bigint, payload: Uint8Array, attributes: Attribute[]);
|
|
248
|
+
constructor(key: Hex, contentType: MimeType | undefined, owner: Hex | undefined, expiresAtBlock: bigint | undefined, createdAtBlock: bigint | undefined, lastModifiedAtBlock: bigint | undefined, transactionIndexInBlock: bigint | undefined, operationIndexInTransaction: bigint | undefined, payload: Uint8Array | undefined, attributes: Attribute[]);
|
|
237
249
|
toText(): string;
|
|
238
250
|
toJson(): any;
|
|
239
251
|
}
|
|
240
252
|
//#endregion
|
|
241
253
|
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 };
|
|
242
|
-
//# sourceMappingURL=entity-
|
|
254
|
+
//# sourceMappingURL=entity-Bsvmepwv.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-Bsvmepwv.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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;KMtBY,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;EAON,oBAAA,CAAA,EAAA,MAAA;EAAG,QAAA,CAAA,EAAA,KAAA;AAKZ,CAAA;;;ADjBY,cWIC,MAAA,CXJO;OWKb;eACQ;SACN;EVJG,cAAS,EAAA,MAAA,GAAA,SAAA;EACd,cAAA,EAAA,MAAA,GAAA,SAAA;EACQ,mBAAA,EAAA,MAAA,GAAA,SAAA;EAON,uBAAA,EAAA,MAAA,GAAA,SAAA;EAAG,2BAAA,EAAA,MAAA,GAAA,SAAA;EAKA,OAAA,EUJD,UVIC,GAAmB,SAAA;EAMnB,UAAA,EUTE,SVSa,EAAA;EAQf,WAAA,CAAA,GAAA,EUdH,GVciB,EAAA,WAAA,EUbT,QVaS,GAAA,SAAA,EAAA,KAAA,EUZf,GVYe,GAAA,SAAA,EAAA,cAAA,EAAA,MAAA,GAAA,SAAA,EAAA,cAAA,EAAA,MAAA,GAAA,SAAA,EAAA,mBAAA,EAAA,MAAA,GAAA,SAAA,EAAA,uBAAA,EAAA,MAAA,GAAA,SAAA,EAAA,2BAAA,EAAA,MAAA,GAAA,SAAA,EAAA,OAAA,EUNb,UVMa,GAAA,SAAA,EAAA,UAAA,EULV,SVKU,EAAA;EAad,MAAA,CAAA,CAAA,EAAA,MAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Account, Chain, Client, Hex, RpcSchema, Transport } from "viem";
|
|
1
|
+
import { Account, Chain, Client, Hash, Hex, RpcSchema, Transport } from "viem";
|
|
2
2
|
|
|
3
3
|
//#region src/types/mimeTypes.d.ts
|
|
4
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";
|
|
@@ -8,7 +8,11 @@ type RpcEntity = {
|
|
|
8
8
|
key: Hex;
|
|
9
9
|
contentType: MimeType;
|
|
10
10
|
value: string;
|
|
11
|
-
expiresAt:
|
|
11
|
+
expiresAt: string;
|
|
12
|
+
createdAtBlock: string;
|
|
13
|
+
lastModifiedAtBlock: string;
|
|
14
|
+
transactionIndexInBlock: string;
|
|
15
|
+
operationIndexInTransaction: string;
|
|
12
16
|
owner: Hex;
|
|
13
17
|
stringAttributes?: [{
|
|
14
18
|
key: string;
|
|
@@ -38,6 +42,10 @@ type RpcIncludeData = {
|
|
|
38
42
|
contentType: boolean;
|
|
39
43
|
expiration: boolean;
|
|
40
44
|
owner: boolean;
|
|
45
|
+
createdAtBlock: boolean;
|
|
46
|
+
lastModifiedAtBlock: boolean;
|
|
47
|
+
transactionIndexInBlock: boolean;
|
|
48
|
+
operationIndexInTransaction: boolean;
|
|
41
49
|
};
|
|
42
50
|
type ArkivRpcSchema = [{
|
|
43
51
|
Method: "arkiv_query";
|
|
@@ -104,7 +112,7 @@ type CreateEntityParameters = {
|
|
|
104
112
|
*/
|
|
105
113
|
type CreateEntityReturnType = {
|
|
106
114
|
entityKey: Hex;
|
|
107
|
-
txHash:
|
|
115
|
+
txHash: Hash;
|
|
108
116
|
};
|
|
109
117
|
//#endregion
|
|
110
118
|
//#region src/actions/wallet/deleteEntity.d.ts
|
|
@@ -122,7 +130,7 @@ type DeleteEntityParameters = {
|
|
|
122
130
|
*/
|
|
123
131
|
type DeleteEntityReturnType = {
|
|
124
132
|
entityKey: Hex;
|
|
125
|
-
txHash:
|
|
133
|
+
txHash: Hash;
|
|
126
134
|
};
|
|
127
135
|
//#endregion
|
|
128
136
|
//#region src/actions/wallet/extendEntity.d.ts
|
|
@@ -142,7 +150,7 @@ type ExtendEntityParameters = {
|
|
|
142
150
|
*/
|
|
143
151
|
type ExtendEntityReturnType = {
|
|
144
152
|
entityKey: Hex;
|
|
145
|
-
txHash:
|
|
153
|
+
txHash: Hash;
|
|
146
154
|
};
|
|
147
155
|
//#endregion
|
|
148
156
|
//#region src/actions/wallet/updateEntity.d.ts
|
|
@@ -168,7 +176,7 @@ type UpdateEntityParameters = {
|
|
|
168
176
|
*/
|
|
169
177
|
type UpdateEntityReturnType = {
|
|
170
178
|
entityKey: Hex;
|
|
171
|
-
txHash:
|
|
179
|
+
txHash: Hash;
|
|
172
180
|
};
|
|
173
181
|
//#endregion
|
|
174
182
|
//#region src/actions/wallet/mutateEntities.d.ts
|
|
@@ -196,7 +204,7 @@ type MutateEntitiesParameters = {
|
|
|
196
204
|
* - ownershipChanges: The keys of the ownership changes.
|
|
197
205
|
*/
|
|
198
206
|
type MutateEntitiesReturnType = {
|
|
199
|
-
txHash:
|
|
207
|
+
txHash: Hash;
|
|
200
208
|
createdEntities: Hex[];
|
|
201
209
|
updatedEntities: Hex[];
|
|
202
210
|
deletedEntities: Hex[];
|
|
@@ -228,15 +236,19 @@ type TxParams = {
|
|
|
228
236
|
//#region src/types/entity.d.ts
|
|
229
237
|
declare class Entity {
|
|
230
238
|
key: Hex;
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
239
|
+
contentType: MimeType | undefined;
|
|
240
|
+
owner: Hex | undefined;
|
|
241
|
+
expiresAtBlock: bigint | undefined;
|
|
242
|
+
createdAtBlock: bigint | undefined;
|
|
243
|
+
lastModifiedAtBlock: bigint | undefined;
|
|
244
|
+
transactionIndexInBlock: bigint | undefined;
|
|
245
|
+
operationIndexInTransaction: bigint | undefined;
|
|
246
|
+
payload: Uint8Array | undefined;
|
|
234
247
|
attributes: Attribute[];
|
|
235
|
-
contentType: MimeType;
|
|
236
|
-
constructor(key: Hex, contentType: MimeType, owner: Hex, expiresAtBlock: bigint, payload: Uint8Array, attributes: Attribute[]);
|
|
248
|
+
constructor(key: Hex, contentType: MimeType | undefined, owner: Hex | undefined, expiresAtBlock: bigint | undefined, createdAtBlock: bigint | undefined, lastModifiedAtBlock: bigint | undefined, transactionIndexInBlock: bigint | undefined, operationIndexInTransaction: bigint | undefined, payload: Uint8Array | undefined, attributes: Attribute[]);
|
|
237
249
|
toText(): string;
|
|
238
250
|
toJson(): any;
|
|
239
251
|
}
|
|
240
252
|
//#endregion
|
|
241
253
|
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 };
|
|
242
|
-
//# sourceMappingURL=entity-
|
|
254
|
+
//# sourceMappingURL=entity-ChTOBhd6.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-ChTOBhd6.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,cAAS,EAAA,MAAA;EACd,mBAAA,EAAA,MAAA;EACQ,uBAAA,EAAA,MAAA;EAON,2BAAA,EAAA,MAAA;EAAG,KAAA,EAAH,GAAG;EAKA,gBAAA,CAAA,EAAA,CAAA;IAMA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AA;EAAG,QAAA,CAAA,EAAA,KAAA;AAKZ,CAAA;;;ADjBY,cWIC,MAAA,CXJO;OWKb;eACQ;SACN;EVJG,cAAS,EAAA,MAAA,GAAA,SAAA;EACd,cAAA,EAAA,MAAA,GAAA,SAAA;EACQ,mBAAA,EAAA,MAAA,GAAA,SAAA;EAON,uBAAA,EAAA,MAAA,GAAA,SAAA;EAAG,2BAAA,EAAA,MAAA,GAAA,SAAA;EAKA,OAAA,EUJD,UVIC,GAAmB,SAAA;EAMnB,UAAA,EUTE,SVSa,EAAA;EAQf,WAAA,CAAA,GAAA,EUdH,GVciB,EAAA,WAAA,EUbT,QVaS,GAAA,SAAA,EAAA,KAAA,EUZf,GVYe,GAAA,SAAA,EAAA,cAAA,EAAA,MAAA,GAAA,SAAA,EAAA,cAAA,EAAA,MAAA,GAAA,SAAA,EAAA,mBAAA,EAAA,MAAA,GAAA,SAAA,EAAA,uBAAA,EAAA,MAAA,GAAA,SAAA,EAAA,2BAAA,EAAA,MAAA,GAAA,SAAA,EAAA,OAAA,EUNb,UVMa,GAAA,SAAA,EAAA,UAAA,EULV,SVKU,EAAA;EAad,MAAA,CAAA,CAAA,EAAA,MAAA"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
const require_queryBuilder = require('./queryBuilder-
|
|
1
|
+
const require_queryBuilder = require('./queryBuilder-Cn5JJRMM.cjs');
|
|
2
2
|
const require_consts = require('./consts-BV9DVKgE.cjs');
|
|
3
3
|
require('./types-CBTc19th.cjs');
|
|
4
4
|
let viem = require("viem");
|
|
5
5
|
|
|
6
6
|
//#region src/actions/public/getBlockTiming.ts
|
|
7
|
+
const logger$9 = require_queryBuilder.getLogger("actions:public:get-block-timing");
|
|
7
8
|
async function getBlockTiming(client) {
|
|
8
9
|
const blockTiming = await client.request({
|
|
9
10
|
method: "arkiv_getBlockTiming",
|
|
10
11
|
params: []
|
|
11
12
|
});
|
|
12
|
-
|
|
13
|
+
logger$9("Block timing %o", blockTiming);
|
|
13
14
|
return {
|
|
14
15
|
currentBlock: blockTiming.current_block,
|
|
15
16
|
currentBlockTime: blockTiming.current_block_time,
|
|
@@ -57,6 +58,7 @@ async function query(client, query$1) {
|
|
|
57
58
|
|
|
58
59
|
//#endregion
|
|
59
60
|
//#region src/actions/public/subscribeEntityEvents.ts
|
|
61
|
+
const logger$8 = require_queryBuilder.getLogger("actions:public:subscribe-entity-events");
|
|
60
62
|
const arkivABI = (0, viem.parseAbi)([
|
|
61
63
|
"event ArkivEntityCreated(uint256 indexed entityKey, address indexed ownerAddress, uint256 expirationBlock, uint256 cost)",
|
|
62
64
|
"event ArkivEntityUpdated(uint256 indexed entityKey, address indexed ownerAddress, uint256 oldExpirationBlock, uint256 newExpirationBlock, uint256 cost)",
|
|
@@ -71,14 +73,14 @@ async function subscribeEntityEvents(client, { onError, onEntityCreated, onEntit
|
|
|
71
73
|
fromBlock: fromBlock ?? 0n,
|
|
72
74
|
events: arkivABI,
|
|
73
75
|
onLogs: (logs) => {
|
|
74
|
-
|
|
76
|
+
logger$8("logs from subscribeEntityEvents %o", logs);
|
|
75
77
|
for (const log of logs) {
|
|
76
78
|
const event = (0, viem.decodeEventLog)({
|
|
77
79
|
abi: arkivABI,
|
|
78
80
|
topics: log.topics,
|
|
79
81
|
data: log.data
|
|
80
82
|
});
|
|
81
|
-
|
|
83
|
+
logger$8("event from subscribeEntityEvents %o", event);
|
|
82
84
|
switch (event.eventName) {
|
|
83
85
|
case "ArkivEntityCreated":
|
|
84
86
|
onEntityCreated?.({
|
|
@@ -190,6 +192,7 @@ function createPublicClient(parameters) {
|
|
|
190
192
|
|
|
191
193
|
//#endregion
|
|
192
194
|
//#region src/utils/compression.ts
|
|
195
|
+
const logger$7 = require_queryBuilder.getLogger("utils:compression");
|
|
193
196
|
const isNode = typeof process !== "undefined" && process.versions?.node != null;
|
|
194
197
|
let zlib = null;
|
|
195
198
|
let brotli = null;
|
|
@@ -215,14 +218,14 @@ async function getBrotli() {
|
|
|
215
218
|
return brotli;
|
|
216
219
|
}
|
|
217
220
|
async function compress(data) {
|
|
218
|
-
|
|
221
|
+
logger$7("Compressing data size %d", data.length);
|
|
219
222
|
if (isNode) {
|
|
220
223
|
const zlibModule = await getZlib();
|
|
221
224
|
if (zlibModule) try {
|
|
222
225
|
const buffer = Buffer.from(data);
|
|
223
226
|
const compressed = zlibModule.brotliCompressSync(buffer);
|
|
224
227
|
const result = new Uint8Array(compressed);
|
|
225
|
-
|
|
228
|
+
logger$7("Brotli compressed with zlib size %d", result.length);
|
|
226
229
|
return result;
|
|
227
230
|
} catch (error) {
|
|
228
231
|
console.warn("zlib compression failed, falling back to brotli-wasm", error);
|
|
@@ -234,12 +237,13 @@ async function compress(data) {
|
|
|
234
237
|
return data;
|
|
235
238
|
}
|
|
236
239
|
const brotliCompressed = brotliInstance.compress(data);
|
|
237
|
-
|
|
240
|
+
logger$7("Brotli compressed with wasm size %d", brotliCompressed.length);
|
|
238
241
|
return brotliCompressed;
|
|
239
242
|
}
|
|
240
243
|
|
|
241
244
|
//#endregion
|
|
242
245
|
//#region src/utils/arkivTransactions.ts
|
|
246
|
+
const logger$6 = require_queryBuilder.getLogger("utils:arkiv-transactions");
|
|
243
247
|
function opsToTxData({ creates, updates, deletes, extensions, ownershipChanges }) {
|
|
244
248
|
function formatAttributes(attribute) {
|
|
245
249
|
return [(0, viem.toHex)(attribute.key), (0, viem.toHex)(attribute.value)];
|
|
@@ -264,13 +268,13 @@ function opsToTxData({ creates, updates, deletes, extensions, ownershipChanges }
|
|
|
264
268
|
(extensions ?? []).map((item) => [item.entityKey, (0, viem.toHex)(item.expiresIn / require_consts.BLOCK_TIME)]),
|
|
265
269
|
(ownershipChanges ?? []).map((item) => [item.entityKey, item.newOwner])
|
|
266
270
|
];
|
|
267
|
-
|
|
271
|
+
logger$6("txData to send as RLP %o length %d", payload, payload.length);
|
|
268
272
|
return (0, viem.toRlp)(payload);
|
|
269
273
|
}
|
|
270
274
|
async function sendArkivTransaction(client, data, txParams) {
|
|
271
275
|
if (!client.account) throw new Error("Account required");
|
|
272
276
|
const walletClient = client;
|
|
273
|
-
|
|
277
|
+
logger$6("Sending transaction %o", {
|
|
274
278
|
account: client.account,
|
|
275
279
|
chain: client.chain,
|
|
276
280
|
to: require_consts.ARKIV_ADDRESS,
|
|
@@ -288,16 +292,17 @@ async function sendArkivTransaction(client, data, txParams) {
|
|
|
288
292
|
...txParams
|
|
289
293
|
});
|
|
290
294
|
const receipt = await walletClient.waitForTransactionReceipt({ hash: txHash });
|
|
291
|
-
|
|
295
|
+
logger$6("Tx receipt %o", receipt);
|
|
292
296
|
return receipt;
|
|
293
297
|
}
|
|
294
298
|
|
|
295
299
|
//#endregion
|
|
296
300
|
//#region src/actions/wallet/changeOwnership.ts
|
|
301
|
+
const logger$5 = require_queryBuilder.getLogger("actions:wallet:change-ownership");
|
|
297
302
|
async function changeOwnership(client, data, txParams) {
|
|
298
|
-
|
|
303
|
+
logger$5("changeOwnership %o", data);
|
|
299
304
|
const receipt = await sendArkivTransaction(client, opsToTxData({ ownershipChanges: [data] }), txParams);
|
|
300
|
-
|
|
305
|
+
logger$5("Receipt from changeOwnership %o", receipt);
|
|
301
306
|
return {
|
|
302
307
|
txHash: receipt.transactionHash,
|
|
303
308
|
entityKey: data.entityKey
|
|
@@ -306,10 +311,11 @@ async function changeOwnership(client, data, txParams) {
|
|
|
306
311
|
|
|
307
312
|
//#endregion
|
|
308
313
|
//#region src/actions/wallet/createEntity.ts
|
|
314
|
+
const logger$4 = require_queryBuilder.getLogger("actions:wallet:create-entity");
|
|
309
315
|
async function createEntity(client, data, txParams) {
|
|
310
|
-
|
|
316
|
+
logger$4("createEntity %o", data);
|
|
311
317
|
const receipt = await sendArkivTransaction(client, opsToTxData({ creates: [data] }), txParams);
|
|
312
|
-
|
|
318
|
+
logger$4("Receipt from createEntity %o", receipt);
|
|
313
319
|
return {
|
|
314
320
|
txHash: receipt.transactionHash,
|
|
315
321
|
entityKey: receipt.logs[0].topics[1]
|
|
@@ -318,10 +324,11 @@ async function createEntity(client, data, txParams) {
|
|
|
318
324
|
|
|
319
325
|
//#endregion
|
|
320
326
|
//#region src/actions/wallet/deleteEntity.ts
|
|
327
|
+
const logger$3 = require_queryBuilder.getLogger("actions:wallet:delete-entity");
|
|
321
328
|
async function deleteEntity(client, data, txParams) {
|
|
322
|
-
|
|
329
|
+
logger$3("deleteEntity %o", data);
|
|
323
330
|
const receipt = await sendArkivTransaction(client, opsToTxData({ deletes: [data] }), txParams);
|
|
324
|
-
|
|
331
|
+
logger$3("Receipt from deleteEntity %o", receipt);
|
|
325
332
|
return {
|
|
326
333
|
txHash: receipt.transactionHash,
|
|
327
334
|
entityKey: data.entityKey
|
|
@@ -330,10 +337,11 @@ async function deleteEntity(client, data, txParams) {
|
|
|
330
337
|
|
|
331
338
|
//#endregion
|
|
332
339
|
//#region src/actions/wallet/extendEntity.ts
|
|
340
|
+
const logger$2 = require_queryBuilder.getLogger("actions:wallet:extend-entity");
|
|
333
341
|
async function extendEntity(client, data, txParams) {
|
|
334
|
-
|
|
342
|
+
logger$2("extendEntity %o", data);
|
|
335
343
|
const receipt = await sendArkivTransaction(client, opsToTxData({ extensions: [data] }), txParams);
|
|
336
|
-
|
|
344
|
+
logger$2("Receipt from extendEntity %o", receipt);
|
|
337
345
|
return {
|
|
338
346
|
txHash: receipt.transactionHash,
|
|
339
347
|
entityKey: receipt.logs[0].topics[1]
|
|
@@ -342,6 +350,7 @@ async function extendEntity(client, data, txParams) {
|
|
|
342
350
|
|
|
343
351
|
//#endregion
|
|
344
352
|
//#region src/actions/wallet/mutateEntities.ts
|
|
353
|
+
const logger$1 = require_queryBuilder.getLogger("actions:wallet:mutate-entities");
|
|
345
354
|
function parseReceipt(receipt, params) {
|
|
346
355
|
const createdEntities = [];
|
|
347
356
|
const updatedEntities = [];
|
|
@@ -379,7 +388,7 @@ async function mutateEntities(client, data, txParams) {
|
|
|
379
388
|
extensions: data.extensions ?? [],
|
|
380
389
|
ownershipChanges: data.ownershipChanges ?? []
|
|
381
390
|
}), txParams);
|
|
382
|
-
|
|
391
|
+
logger$1("Receipt from mutateEntities %o", receipt);
|
|
383
392
|
const { createdEntities, updatedEntities, deletedEntities, extendedEntities, ownershipChanges } = parseReceipt(receipt, data);
|
|
384
393
|
return {
|
|
385
394
|
txHash: receipt.transactionHash,
|
|
@@ -393,10 +402,11 @@ async function mutateEntities(client, data, txParams) {
|
|
|
393
402
|
|
|
394
403
|
//#endregion
|
|
395
404
|
//#region src/actions/wallet/updateEntity.ts
|
|
405
|
+
const logger = require_queryBuilder.getLogger("actions:wallet:update-entity");
|
|
396
406
|
async function updateEntity(client, data, txParams) {
|
|
397
|
-
|
|
407
|
+
logger("updateEntity %o", data);
|
|
398
408
|
const receipt = await sendArkivTransaction(client, opsToTxData({ updates: [data] }), txParams);
|
|
399
|
-
|
|
409
|
+
logger("Receipt from updateEntity %o", receipt);
|
|
400
410
|
return {
|
|
401
411
|
txHash: receipt.transactionHash,
|
|
402
412
|
entityKey: receipt.logs[0].topics[1]
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as ArkivRpcSchema, a as MutateEntitiesReturnType, b as RpcQueryOptions, c as ExtendEntityParameters, d as DeleteEntityReturnType, f as CreateEntityParameters, g as ArkivClient, h as ChangeOwnershipReturnType, i as MutateEntitiesParameters, l as ExtendEntityReturnType, m as ChangeOwnershipParameters, n as TxParams, o as UpdateEntityParameters, p as CreateEntityReturnType, r as Attribute, s as UpdateEntityReturnType, t as Entity, u as DeleteEntityParameters, v as RpcEntity, x as MimeType, y as RpcIncludeData } from "./entity-
|
|
2
|
-
import { t as QueryBuilder } from "./queryBuilder-
|
|
1
|
+
import { _ as ArkivRpcSchema, a as MutateEntitiesReturnType, b as RpcQueryOptions, c as ExtendEntityParameters, d as DeleteEntityReturnType, f as CreateEntityParameters, g as ArkivClient, h as ChangeOwnershipReturnType, i as MutateEntitiesParameters, l as ExtendEntityReturnType, m as ChangeOwnershipParameters, n as TxParams, o as UpdateEntityParameters, p as CreateEntityReturnType, r as Attribute, s as UpdateEntityReturnType, t as Entity, u as DeleteEntityParameters, v as RpcEntity, x as MimeType, y as RpcIncludeData } from "./entity-Bsvmepwv.cjs";
|
|
2
|
+
import { t as QueryBuilder } from "./queryBuilder-CNRqyot6.cjs";
|
|
3
3
|
import { Account, Address, Chain, Client, Hex, ParseAccount, Prettify, PublicActions, PublicClientConfig, RpcSchema, Transport, WalletActions, WalletClientConfig } from "viem";
|
|
4
4
|
export * from "viem";
|
|
5
5
|
|
|
@@ -293,7 +293,7 @@ type WalletArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
293
293
|
* Mutates the entities with the given keys.
|
|
294
294
|
*
|
|
295
295
|
* - Docs: https://docs.arkiv.network/ts-sdk/actions/wallet/mutateEntities
|
|
296
|
-
* - JSON-RPC Methods: [`
|
|
296
|
+
* - JSON-RPC Methods: [`eth_sendRawTransaction`](https://docs.arkiv.network/dev/json-rpc-api/#mutateEntities)
|
|
297
297
|
*
|
|
298
298
|
* @param args - {data}
|
|
299
299
|
* @returns The entity with the given key. {@link Entity}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as ArkivRpcSchema, a as MutateEntitiesReturnType, b as RpcQueryOptions, c as ExtendEntityParameters, d as DeleteEntityReturnType, f as CreateEntityParameters, g as ArkivClient, h as ChangeOwnershipReturnType, i as MutateEntitiesParameters, l as ExtendEntityReturnType, m as ChangeOwnershipParameters, n as TxParams, o as UpdateEntityParameters, p as CreateEntityReturnType, r as Attribute, s as UpdateEntityReturnType, t as Entity, u as DeleteEntityParameters, v as RpcEntity, x as MimeType, y as RpcIncludeData } from "./entity-
|
|
2
|
-
import { t as QueryBuilder } from "./queryBuilder-
|
|
1
|
+
import { _ as ArkivRpcSchema, a as MutateEntitiesReturnType, b as RpcQueryOptions, c as ExtendEntityParameters, d as DeleteEntityReturnType, f as CreateEntityParameters, g as ArkivClient, h as ChangeOwnershipReturnType, i as MutateEntitiesParameters, l as ExtendEntityReturnType, m as ChangeOwnershipParameters, n as TxParams, o as UpdateEntityParameters, p as CreateEntityReturnType, r as Attribute, s as UpdateEntityReturnType, t as Entity, u as DeleteEntityParameters, v as RpcEntity, x as MimeType, y as RpcIncludeData } from "./entity-ChTOBhd6.js";
|
|
2
|
+
import { t as QueryBuilder } from "./queryBuilder-DI251Jjp.js";
|
|
3
3
|
import { Account, Address, Chain, Client, Hex, ParseAccount, Prettify, PublicActions, PublicClientConfig, RpcSchema, Transport, WalletActions, WalletClientConfig } from "viem";
|
|
4
4
|
export * from "viem";
|
|
5
5
|
|
|
@@ -293,7 +293,7 @@ type WalletArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
293
293
|
* Mutates the entities with the given keys.
|
|
294
294
|
*
|
|
295
295
|
* - Docs: https://docs.arkiv.network/ts-sdk/actions/wallet/mutateEntities
|
|
296
|
-
* - JSON-RPC Methods: [`
|
|
296
|
+
* - JSON-RPC Methods: [`eth_sendRawTransaction`](https://docs.arkiv.network/dev/json-rpc-api/#mutateEntities)
|
|
297
297
|
*
|
|
298
298
|
* @param args - {data}
|
|
299
299
|
* @returns The entity with the given key. {@link Entity}
|