@arkiv-network/sdk 0.8.0-dev.2 → 0.8.0-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 +6 -6
- package/dist/chains/index.cjs +3 -3
- package/dist/chains/index.d.cts +21 -21
- package/dist/chains/index.d.cts.map +1 -1
- package/dist/chains/index.d.ts +21 -21
- package/dist/chains/index.d.ts.map +1 -1
- package/dist/chains/index.js +2 -2
- package/dist/{chains-Du8tql7I.js → chains-DmrgfF3p.js} +25 -25
- package/dist/chains-DmrgfF3p.js.map +1 -0
- package/dist/{chains-BfNQliHU.cjs → chains-Etgm64UM.cjs} +27 -27
- package/dist/index-BGp2plHs.d.cts.map +1 -1
- package/dist/index-Cd2aaWme.d.ts.map +1 -1
- package/dist/{index-BKB875Um.d.ts → index-CmEefH8_.d.ts} +3 -3
- package/dist/{index-BKB875Um.d.ts.map → index-CmEefH8_.d.ts.map} +1 -1
- package/dist/{index-rINthNuU.d.cts → index-DsM7EXu6.d.cts} +3 -3
- package/dist/{index-rINthNuU.d.cts.map → index-DsM7EXu6.d.cts.map} +1 -1
- package/dist/index-ezMZ2-JH.d.ts.map +1 -1
- package/dist/index.cjs +26 -16
- package/dist/index.d.cts +31 -29
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +31 -29
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -16
- package/dist/index.js.map +1 -1
- package/dist/query/index.cjs +1 -1
- package/dist/query/index.d.cts +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/query/index.js +1 -1
- package/dist/{queryBuilder-zHGhDmaG.cjs → queryBuilder-BmRTaoJ8.cjs} +5 -3
- package/dist/{queryBuilder-wvA8sn--.js → queryBuilder-MubNEvA4.js} +6 -4
- package/dist/queryBuilder-MubNEvA4.js.map +1 -0
- package/dist/selection-Bv8_o-7i.d.cts.map +1 -1
- package/dist/selection-ox7zdtVm.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/actions/public/watchEntityEvents.ts +2 -2
- package/src/actions/wallet/createEntity.ts +1 -0
- package/src/actions/wallet/extendEntity.ts +1 -0
- package/src/chains/index.ts +1 -1
- package/src/chains/tiramisu.ts +22 -0
- package/src/clients/createPublicClient.ts +2 -2
- package/src/clients/createWalletClient.ts +2 -2
- package/src/clients/decorators/arkivPublic.ts +14 -14
- package/src/clients/decorators/arkivWallet.ts +10 -10
- package/src/errors.ts +7 -2
- package/src/query/queryBuilder.ts +2 -2
- package/src/utils/arkivTransactions.ts +8 -3
- package/src/utils/chains.test.ts +14 -14
- package/dist/chains-Du8tql7I.js.map +0 -1
- package/dist/queryBuilder-wvA8sn--.js.map +0 -1
- package/src/chains/cheesecake.ts +0 -22
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_chains = require('./chains-
|
|
1
|
+
const require_chains = require('./chains-Etgm64UM.cjs');
|
|
2
2
|
const require_attr = require('./attr-BXTkpnoc.cjs');
|
|
3
|
-
const require_queryBuilder = require('./queryBuilder-
|
|
3
|
+
const require_queryBuilder = require('./queryBuilder-BmRTaoJ8.cjs');
|
|
4
4
|
const require_errors = require('./errors-DhV00966.cjs');
|
|
5
5
|
const require_flags = require('./flags-DCD26uhe.cjs');
|
|
6
6
|
const require_entity = require('./entity-B0t6sN7F.cjs');
|
|
@@ -274,10 +274,10 @@ const DEFAULT_POLLING_INTERVAL = require_expiry.BLOCK_TIME * 1e3 / 2;
|
|
|
274
274
|
*
|
|
275
275
|
* @example
|
|
276
276
|
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
277
|
-
* import {
|
|
277
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
278
278
|
* import { http } from "viem"
|
|
279
279
|
*
|
|
280
|
-
* const client = createPublicClient({ chain:
|
|
280
|
+
* const client = createPublicClient({ chain: tiramisu, transport: http() })
|
|
281
281
|
*
|
|
282
282
|
* const unwatch = client.watchEntityEvents({
|
|
283
283
|
* onEntityCreated: ({ entityKey, owner, expiresAt }) =>
|
|
@@ -431,11 +431,11 @@ function publicArkivActions(client) {
|
|
|
431
431
|
*
|
|
432
432
|
* @example
|
|
433
433
|
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
434
|
-
* import {
|
|
434
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
435
435
|
* import { http } from "viem"
|
|
436
436
|
*
|
|
437
437
|
* const client = createPublicClient({
|
|
438
|
-
* chain:
|
|
438
|
+
* chain: tiramisu,
|
|
439
439
|
* transport: http(),
|
|
440
440
|
* })
|
|
441
441
|
*/
|
|
@@ -599,8 +599,9 @@ async function sendArkivTransaction(client, ops, txParams) {
|
|
|
599
599
|
];
|
|
600
600
|
if (operations.length === 0) throw new Error("No operations to perform");
|
|
601
601
|
logger$6("Sending execute with %d operations %o", operations.length, operations);
|
|
602
|
+
let txHash;
|
|
602
603
|
try {
|
|
603
|
-
|
|
604
|
+
txHash = await walletClient.writeContract({
|
|
604
605
|
address: require_expiry.ARKIV_ADDRESS,
|
|
605
606
|
abi: EXECUTE_ABI$1,
|
|
606
607
|
functionName: "execute",
|
|
@@ -624,9 +625,12 @@ async function sendArkivTransaction(client, ops, txParams) {
|
|
|
624
625
|
} catch (err) {
|
|
625
626
|
const error = err;
|
|
626
627
|
const reason = describeEntityRevert(err) ?? error.shortMessage ?? error.cause?.details ?? "No reason provided by backend.";
|
|
627
|
-
throw new require_queryBuilder.EntityMutationError(`Transaction ${receipt.transactionHash} reverted. Reason: ${reason}
|
|
628
|
+
throw new require_queryBuilder.EntityMutationError(`Transaction ${receipt.transactionHash} reverted. Reason: ${reason}`, {
|
|
629
|
+
cause: err,
|
|
630
|
+
txHash: receipt.transactionHash
|
|
631
|
+
});
|
|
628
632
|
}
|
|
629
|
-
throw new require_queryBuilder.EntityMutationError(`Transaction ${receipt.transactionHash} reverted. No reason provided by backend
|
|
633
|
+
throw new require_queryBuilder.EntityMutationError(`Transaction ${receipt.transactionHash} reverted. No reason provided by backend.`, { txHash: receipt.transactionHash });
|
|
630
634
|
}
|
|
631
635
|
return {
|
|
632
636
|
receipt,
|
|
@@ -637,7 +641,10 @@ async function sendArkivTransaction(client, ops, txParams) {
|
|
|
637
641
|
};
|
|
638
642
|
} catch (error) {
|
|
639
643
|
const described = error instanceof require_queryBuilder.EntityMutationError ? void 0 : describeEntityRevert(error);
|
|
640
|
-
if (described !== void 0) throw new require_queryBuilder.EntityMutationError(`Transaction failed: ${described}`, {
|
|
644
|
+
if (described !== void 0) throw new require_queryBuilder.EntityMutationError(`Transaction failed: ${described}`, {
|
|
645
|
+
cause: error,
|
|
646
|
+
txHash
|
|
647
|
+
});
|
|
641
648
|
let message = "Transaction failed";
|
|
642
649
|
if (error instanceof viem.TransactionExecutionError) message += `: ${error.details}`;
|
|
643
650
|
else if (error instanceof viem.ContractFunctionExecutionError) {
|
|
@@ -646,7 +653,10 @@ async function sendArkivTransaction(client, ops, txParams) {
|
|
|
646
653
|
else message += ": Execution error without revert data";
|
|
647
654
|
} else if (error instanceof require_queryBuilder.EntityMutationError) throw error;
|
|
648
655
|
else if (error instanceof Error) message += `: ${error.message}`;
|
|
649
|
-
throw new require_queryBuilder.EntityMutationError(message, {
|
|
656
|
+
throw new require_queryBuilder.EntityMutationError(message, {
|
|
657
|
+
cause: error,
|
|
658
|
+
txHash
|
|
659
|
+
});
|
|
650
660
|
}
|
|
651
661
|
}
|
|
652
662
|
/**
|
|
@@ -687,7 +697,7 @@ function decodeEntityLog(log) {
|
|
|
687
697
|
}
|
|
688
698
|
function assertCount(receipt, what, got, want) {
|
|
689
699
|
if (got === want) return;
|
|
690
|
-
throw new require_queryBuilder.EntityMutationError(`Transaction ${receipt.transactionHash} succeeded — do not retry it — but emitted ${got} ${what} event(s) for ${want} ${what} operation(s). The batch was applied; the SDK cannot say which entity each operation produced, so read them back to find them
|
|
700
|
+
throw new require_queryBuilder.EntityMutationError(`Transaction ${receipt.transactionHash} succeeded — do not retry it — but emitted ${got} ${what} event(s) for ${want} ${what} operation(s). The batch was applied; the SDK cannot say which entity each operation produced, so read them back to find them.`, { txHash: receipt.transactionHash });
|
|
691
701
|
}
|
|
692
702
|
|
|
693
703
|
//#endregion
|
|
@@ -712,7 +722,7 @@ async function createEntity(client, data, txParams) {
|
|
|
712
722
|
logger$4("Receipt from createEntity %o", receipt);
|
|
713
723
|
const [entityKey] = createdEntityKeys;
|
|
714
724
|
const [expiresAt] = createdExpiries;
|
|
715
|
-
if (entityKey === void 0 || expiresAt === void 0) throw new require_queryBuilder.EntityMutationError(`Transaction ${receipt.transactionHash} succeeded, but the receipt did not carry the expected entity key or expiry
|
|
725
|
+
if (entityKey === void 0 || expiresAt === void 0) throw new require_queryBuilder.EntityMutationError(`Transaction ${receipt.transactionHash} succeeded, but the receipt did not carry the expected entity key or expiry.`, { txHash: receipt.transactionHash });
|
|
716
726
|
return {
|
|
717
727
|
txHash: receipt.transactionHash,
|
|
718
728
|
entityKey,
|
|
@@ -757,7 +767,7 @@ async function extendEntity(client, data, txParams) {
|
|
|
757
767
|
const { receipt, extendedExpiries } = await sendArkivTransaction(client, { extensions: [data] }, txParams);
|
|
758
768
|
logger$1("Receipt from extendEntity %o", receipt);
|
|
759
769
|
const [expiresAt] = extendedExpiries;
|
|
760
|
-
if (expiresAt === void 0) throw new require_queryBuilder.EntityMutationError(`Transaction ${receipt.transactionHash} succeeded, but the receipt did not carry the expected entity expiry
|
|
770
|
+
if (expiresAt === void 0) throw new require_queryBuilder.EntityMutationError(`Transaction ${receipt.transactionHash} succeeded, but the receipt did not carry the expected entity expiry.`, { txHash: receipt.transactionHash });
|
|
761
771
|
return {
|
|
762
772
|
txHash: receipt.transactionHash,
|
|
763
773
|
entityKey: data.entityKey,
|
|
@@ -806,12 +816,12 @@ function walletArkivActions(client) {
|
|
|
806
816
|
*
|
|
807
817
|
* @example
|
|
808
818
|
* import { createWalletClient } from "@arkiv-network/sdk"
|
|
809
|
-
* import {
|
|
819
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
810
820
|
* import { http } from "viem"
|
|
811
821
|
* import { privateKeyToAccount } from "viem/accounts"
|
|
812
822
|
*
|
|
813
823
|
* const client = createWalletClient({
|
|
814
|
-
* chain:
|
|
824
|
+
* chain: tiramisu,
|
|
815
825
|
* transport: http(),
|
|
816
826
|
* account: privateKeyToAccount("0x..."),
|
|
817
827
|
* })
|
package/dist/index.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ import { a as SaltInput, c as ENTITY_EVENTS_ABI, d as InvalidExpiryError, f as I
|
|
|
3
3
|
import { a as ResolvedExpiry, i as Lifetime, n as Expiry, o as resolveExpiry, r as ExpiryContext, s as toBlocks, t as EncodedExpiry } from "./expiry-DRV29F1r.cjs";
|
|
4
4
|
import { i as encodeCreationFlags, n as ResolvedCreationFlags, r as decodeCreationFlags, t as CreationFlags } from "./flags-0Vl5rrHq.cjs";
|
|
5
5
|
import { A as EntityFields, F as RpcCreationFlags, I as RpcEntity, L as RpcQueryOptions, M as ArkivRpcSchema, N as RpcAttribute, P as RpcAttributeSchemaEntry, R as RpcSelect, d as Expression, i as SelectArg, j as ArkivClient, k as Entity, n as FullEntity, r as ProjectedEntity, t as EntitySelection } from "./selection-Bv8_o-7i.cjs";
|
|
6
|
-
import { t as SelectQueryBuilder } from "./index-
|
|
6
|
+
import { t as SelectQueryBuilder } from "./index-DsM7EXu6.cjs";
|
|
7
7
|
import { C as QueryOptions, D as PredictedEntityKey, E as PredictEntityKeysReturnType, O as GetBlockTimingReturnType, S as OwnershipTransferredEvent, T as PredictEntityKeysParameters, _ as EntityDeletedEvent, a as ExecuteBatchParameters, b as EntityPatchedEvent, c as PatchEntityReturnType, d as DeleteEntityParameters, f as DeleteEntityReturnType, g as EntityCreatedEvent, h as WatchEntityEventsParameters, i as MimeType, l as ExtendEntityParameters, m as CreateEntityReturnType, n as ChangeOwnershipReturnType, o as ExecuteBatchReturnType, p as CreateEntityParameters, r as TxParams, s as PatchEntityParameters, t as ChangeOwnershipParameters, u as ExtendEntityReturnType, v as EntityEvent, w as QueryReturnType, x as ExpiryExtendedEvent, y as EntityEventContext } from "./changeOwnership-BofkLnXJ.cjs";
|
|
8
8
|
import { i as ExpirationTime, n as stringToPayload, r as DeadlineOptions, t as jsonToPayload } from "./payload-Dfu30njp.cjs";
|
|
9
9
|
import { Account, Address, Chain, Client, Hex, ParseAccount, Prettify, PublicActions, PublicClientConfig, RpcSchema, Transport, WalletActions, WalletClientConfig } from "viem";
|
|
@@ -24,11 +24,11 @@ type PublicArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
26
26
|
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
27
|
-
* import {
|
|
27
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
28
28
|
* import { http } from "viem"
|
|
29
29
|
*
|
|
30
30
|
* const client = createPublicClient({
|
|
31
|
-
* chain:
|
|
31
|
+
* chain: tiramisu,
|
|
32
32
|
* transport: http(),
|
|
33
33
|
* })
|
|
34
34
|
* const entity = await client.getEntity(entityKey)
|
|
@@ -57,12 +57,12 @@ type PublicArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
57
57
|
*
|
|
58
58
|
* @example
|
|
59
59
|
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
60
|
-
* import {
|
|
60
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
61
61
|
* import { eq } from "@arkiv-network/sdk/query"
|
|
62
62
|
* import { http } from "viem"
|
|
63
63
|
*
|
|
64
64
|
* const client = createPublicClient({
|
|
65
|
-
* chain:
|
|
65
|
+
* chain: tiramisu,
|
|
66
66
|
* transport: http(),
|
|
67
67
|
* })
|
|
68
68
|
* // select everything
|
|
@@ -118,13 +118,13 @@ type PublicArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
118
118
|
*
|
|
119
119
|
* @example
|
|
120
120
|
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
121
|
-
* import {
|
|
121
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
122
122
|
* import { and, eq, gte } from "@arkiv-network/sdk/query"
|
|
123
123
|
* import { i32 } from "@arkiv-network/sdk/attr"
|
|
124
124
|
* import { http } from "viem"
|
|
125
125
|
*
|
|
126
126
|
* const client = createPublicClient({
|
|
127
|
-
* chain:
|
|
127
|
+
* chain: tiramisu,
|
|
128
128
|
* transport: http(),
|
|
129
129
|
* })
|
|
130
130
|
* const page = await client.query(and(eq("category", "docs"), gte("level", i32(10))), {
|
|
@@ -143,11 +143,11 @@ type PublicArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
143
143
|
*
|
|
144
144
|
* @example
|
|
145
145
|
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
146
|
-
* import {
|
|
146
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
147
147
|
* import { http } from "viem"
|
|
148
148
|
*
|
|
149
149
|
* const client = createPublicClient({
|
|
150
|
-
* chain:
|
|
150
|
+
* chain: tiramisu,
|
|
151
151
|
* transport: http(),
|
|
152
152
|
* })
|
|
153
153
|
* const entityCount = await client.getEntityCount()
|
|
@@ -165,11 +165,11 @@ type PublicArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
165
165
|
*
|
|
166
166
|
* @example
|
|
167
167
|
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
168
|
-
* import {
|
|
168
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
169
169
|
* import { http } from "viem"
|
|
170
170
|
*
|
|
171
171
|
* const client = createPublicClient({
|
|
172
|
-
* chain:
|
|
172
|
+
* chain: tiramisu,
|
|
173
173
|
* transport: http(),
|
|
174
174
|
* })
|
|
175
175
|
* const nonce = await client.getEntityNonce("0xabc…")
|
|
@@ -218,11 +218,11 @@ type PublicArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
218
218
|
*
|
|
219
219
|
* @example
|
|
220
220
|
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
221
|
-
* import {
|
|
221
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
222
222
|
* import { http } from "viem"
|
|
223
223
|
*
|
|
224
224
|
* const client = createPublicClient({
|
|
225
|
-
* chain:
|
|
225
|
+
* chain: tiramisu,
|
|
226
226
|
* transport: http(),
|
|
227
227
|
* })
|
|
228
228
|
* const blockTiming = await client.getBlockTiming()
|
|
@@ -246,11 +246,11 @@ type PublicArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
246
246
|
*
|
|
247
247
|
* @example
|
|
248
248
|
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
249
|
-
* import {
|
|
249
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
250
250
|
* import { http } from "viem"
|
|
251
251
|
*
|
|
252
252
|
* const client = createPublicClient({
|
|
253
|
-
* chain:
|
|
253
|
+
* chain: tiramisu,
|
|
254
254
|
* transport: http(),
|
|
255
255
|
* })
|
|
256
256
|
* const unwatch = client.watchEntityEvents({
|
|
@@ -276,11 +276,11 @@ type PublicArkivClient<transport extends Transport = Transport, chain extends Ch
|
|
|
276
276
|
*
|
|
277
277
|
* @example
|
|
278
278
|
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
279
|
-
* import {
|
|
279
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
280
280
|
* import { http } from "viem"
|
|
281
281
|
*
|
|
282
282
|
* const client = createPublicClient({
|
|
283
|
-
* chain:
|
|
283
|
+
* chain: tiramisu,
|
|
284
284
|
* transport: http(),
|
|
285
285
|
* })
|
|
286
286
|
*/
|
|
@@ -306,13 +306,13 @@ type WalletArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
306
306
|
* @example
|
|
307
307
|
* import { createWalletClient, ExpirationTime, jsonToPayload } from "@arkiv-network/sdk"
|
|
308
308
|
* import { i32 } from "@arkiv-network/sdk/attr"
|
|
309
|
-
* import {
|
|
309
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
310
310
|
* import { http } from "viem"
|
|
311
311
|
* import { privateKeyToAccount } from "viem/accounts"
|
|
312
312
|
*
|
|
313
313
|
* const client = createWalletClient({
|
|
314
314
|
* account: privateKeyToAccount("0x..."),
|
|
315
|
-
* chain:
|
|
315
|
+
* chain: tiramisu,
|
|
316
316
|
* transport: http(),
|
|
317
317
|
* })
|
|
318
318
|
* const { entityKey, txHash, expiresAt } = await client.createEntity({
|
|
@@ -341,13 +341,13 @@ type WalletArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
341
341
|
* @example
|
|
342
342
|
* import { createWalletClient, jsonToPayload } from "@arkiv-network/sdk"
|
|
343
343
|
* import { i32 } from "@arkiv-network/sdk/attr"
|
|
344
|
-
* import {
|
|
344
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
345
345
|
* import { http } from "viem"
|
|
346
346
|
* import { privateKeyToAccount } from "viem/accounts"
|
|
347
347
|
*
|
|
348
348
|
* const client = createWalletClient({
|
|
349
349
|
* account: privateKeyToAccount("0x..."),
|
|
350
|
-
* chain:
|
|
350
|
+
* chain: tiramisu,
|
|
351
351
|
* transport: http(),
|
|
352
352
|
* })
|
|
353
353
|
* // Publish the entity: one attribute changes, one goes away, the payload is replaced.
|
|
@@ -370,13 +370,13 @@ type WalletArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
370
370
|
*
|
|
371
371
|
* @example
|
|
372
372
|
* import { createWalletClient } from "@arkiv-network/sdk"
|
|
373
|
-
* import {
|
|
373
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
374
374
|
* import { http } from "viem"
|
|
375
375
|
* import { privateKeyToAccount } from "viem/accounts"
|
|
376
376
|
*
|
|
377
377
|
* const client = createWalletClient({
|
|
378
378
|
* account: privateKeyToAccount("0x..."),
|
|
379
|
-
* chain:
|
|
379
|
+
* chain: tiramisu,
|
|
380
380
|
* transport: http(),
|
|
381
381
|
* })
|
|
382
382
|
* // entityKey is the bytes32 key returned by createEntity.
|
|
@@ -402,13 +402,13 @@ type WalletArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
402
402
|
*
|
|
403
403
|
* @example
|
|
404
404
|
* import { createWalletClient, ExpirationTime } from "@arkiv-network/sdk"
|
|
405
|
-
* import {
|
|
405
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
406
406
|
* import { http } from "viem"
|
|
407
407
|
* import { privateKeyToAccount } from "viem/accounts"
|
|
408
408
|
*
|
|
409
409
|
* const client = createWalletClient({
|
|
410
410
|
* account: privateKeyToAccount("0x..."),
|
|
411
|
-
* chain:
|
|
411
|
+
* chain: tiramisu,
|
|
412
412
|
* transport: http(),
|
|
413
413
|
* })
|
|
414
414
|
* const { txHash, expiresAt } = await client.extendEntity({
|
|
@@ -447,13 +447,13 @@ type WalletArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
447
447
|
*
|
|
448
448
|
* @example
|
|
449
449
|
* import { createWalletClient, ExpirationTime, jsonToPayload } from "@arkiv-network/sdk"
|
|
450
|
-
* import {
|
|
450
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
451
451
|
* import { http } from "viem"
|
|
452
452
|
* import { privateKeyToAccount } from "viem/accounts"
|
|
453
453
|
*
|
|
454
454
|
* const client = createWalletClient({
|
|
455
455
|
* account: privateKeyToAccount("0x..."),
|
|
456
|
-
* chain:
|
|
456
|
+
* chain: tiramisu,
|
|
457
457
|
* transport: http(),
|
|
458
458
|
* })
|
|
459
459
|
* const { txHash, createdEntities } = await client.executeBatch({
|
|
@@ -490,12 +490,12 @@ type WalletArkivClient<transport extends Transport = Transport, chain extends Ch
|
|
|
490
490
|
*
|
|
491
491
|
* @example
|
|
492
492
|
* import { createWalletClient } from "@arkiv-network/sdk"
|
|
493
|
-
* import {
|
|
493
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
494
494
|
* import { http } from "viem"
|
|
495
495
|
* import { privateKeyToAccount } from "viem/accounts"
|
|
496
496
|
*
|
|
497
497
|
* const client = createWalletClient({
|
|
498
|
-
* chain:
|
|
498
|
+
* chain: tiramisu,
|
|
499
499
|
* transport: http(),
|
|
500
500
|
* account: privateKeyToAccount("0x..."),
|
|
501
501
|
* })
|
|
@@ -504,8 +504,10 @@ declare function createWalletClient<transport extends Transport, chain extends C
|
|
|
504
504
|
//#endregion
|
|
505
505
|
//#region src/errors.d.ts
|
|
506
506
|
declare class EntityMutationError extends Error {
|
|
507
|
+
readonly txHash: Hex | undefined;
|
|
507
508
|
constructor(message: string, options?: {
|
|
508
509
|
cause?: unknown;
|
|
510
|
+
txHash?: Hex | undefined;
|
|
509
511
|
});
|
|
510
512
|
}
|
|
511
513
|
declare class NoMoreResultsError extends Error {
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/clients/decorators/arkivPublic.ts","../src/clients/createPublicClient.ts","../src/clients/decorators/arkivWallet.ts","../src/clients/createWalletClient.ts","../src/errors.ts","../src/utils/chains.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;KAqBY,qCACQ,YAAY,yBAChB,oBAAoB,mCAClB,sBAAsB,uBACpC,KACF,cAAc,WAAW,OAAO;EALtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0L0B,SAAA,EAAA,CAAA,GAAA,EA1InB,GA0ImB,EAAA,GA1IX,OA0IW,CA1IH,UA0IG,CAAA;EAuCJ;;;;;;;;;;;;;;;ACvOlC;;;;;;;;;;;;;;;;;;EA6BgB,MAAA,EAAA;IACI;IACJ,CAAA,SAAA,CAAA,EAAA,GAAA,CAAA,ED4DO,kBC5DP,CD4D0B,UC5D1B,CAAA;IACW;;;;;;;;;;;;;;;;;;;ICjBf,CAAA,gBFgGS,eEhGS,CAAA,CAAA,SAAA,EFgGmB,CEhGnB,CAAA,EFgGuB,kBEhGvB,CFgG0C,eEhG1C,CFgG0D,CEhG1D,CAAA,CAAA;IACV;;;;IAEF,CAAA,SAAA,EFkGF,SElGE,CAAA,EFkGU,kBElGV,CFkG6B,UElG7B,CAAA;EAAsB,CAAA;EAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6NP,KAAA,EAAA,CAAA,KAAA,EF1FQ,UE0FR,GAAA,MAAA,EAAA,YAAA,CAAA,EF1F4C,YE0F5C,EAAA,GF1F6D,OE0F7D,CF1FqE,eE0FrE,CAAA;EAAO;;;;ACjPhB;;;;;;;;;;;;EAMoC,cAAA,EAAA,GAAA,GHmKZ,OGnKY,CAAA,MAAA,CAAA;EAA8B;;;;;;;AA0BlE;;;;;;;;;;;;;;EAOoD,cAAA,EAAA,CAAA,KAAA,EHyJ1B,OGzJ0B,EAAA,GHyJd,OGzJc,CAAA,MAAA,CAAA;EAAb;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/clients/decorators/arkivPublic.ts","../src/clients/createPublicClient.ts","../src/clients/decorators/arkivWallet.ts","../src/clients/createWalletClient.ts","../src/errors.ts","../src/utils/chains.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;KAqBY,qCACQ,YAAY,yBAChB,oBAAoB,mCAClB,sBAAsB,uBACpC,KACF,cAAc,WAAW,OAAO;EALtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0L0B,SAAA,EAAA,CAAA,GAAA,EA1InB,GA0ImB,EAAA,GA1IX,OA0IW,CA1IH,UA0IG,CAAA;EAuCJ;;;;;;;;;;;;;;;ACvOlC;;;;;;;;;;;;;;;;;;EA6BgB,MAAA,EAAA;IACI;IACJ,CAAA,SAAA,CAAA,EAAA,GAAA,CAAA,ED4DO,kBC5DP,CD4D0B,UC5D1B,CAAA;IACW;;;;;;;;;;;;;;;;;;;ICjBf,CAAA,gBFgGS,eEhGS,CAAA,CAAA,SAAA,EFgGmB,CEhGnB,CAAA,EFgGuB,kBEhGvB,CFgG0C,eEhG1C,CFgG0D,CEhG1D,CAAA,CAAA;IACV;;;;IAEF,CAAA,SAAA,EFkGF,SElGE,CAAA,EFkGU,kBElGV,CFkG6B,UElG7B,C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kBH2DO,CAAA,kBG1DH,SH0DG,EAAA,cGzDP,KHyDO,GAAA,SAAA,GAAA,SAAA,EAAA,yBGxDI,OHwDJ,GGxDc,OHwDd,GAAA,SAAA,GAAA,SAAA,EAAA,kBGvDH,SHuDG,GAAA,SAAA,GGvDqB,cHuDrB,CAAA,CAAA,UAAA,EGrDT,kBHqDS,CGrDU,SHqDV,EGrDqB,KHqDrB,EGrD4B,gBHqD5B,EGrD8C,SHqD9C,CAAA,CAAA,EGpDpB,iBHoDoB,CGpDF,SHoDE,EGpDS,KHoDT,EGpDgB,YHoDhB,CGpD6B,gBHoD7B,CAAA,EGpDgD,SHoDhD,CAAA;;;cIxGV,mBAAA,SAA4B,KAAA;mBACtB;;;aAEkD;;;cAMxD,kBAAA,SAA2B,KAAA;;;AJU5B,cIHC,kBAAA,SAA2B,KAAA,CJGV;EACV;EAAY,SAAA,SAAA,EAAA,MAAA,GAAA,SAAA;EAChB,WAAA,CAAA,SAAA,CAAA,EAAA,MAAA;;AACE,cIUL,eAAA,SAAwB,KAAA,CJVnB;EAAsB,SAAA,SAAA,EAAA,MAAA;EAExB,WAAA,CAAA,SAAA,EAAA,MAAA;;AAAkB,cIqBrB,uBAAA,SAAgC,KAAA,CJrBX;EAAhC,WAAA,CAAA,WAAA,EAAA,MAAA;;;;;;;;;;iBKdc,aAAA,gBAA6B"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { a as SaltInput, c as ENTITY_EVENTS_ABI, d as InvalidExpiryError, f as I
|
|
|
3
3
|
import { a as ResolvedExpiry, i as Lifetime, n as Expiry, o as resolveExpiry, r as ExpiryContext, s as toBlocks, t as EncodedExpiry } from "./expiry-BxOlvVWC.js";
|
|
4
4
|
import { i as encodeCreationFlags, n as ResolvedCreationFlags, r as decodeCreationFlags, t as CreationFlags } from "./flags-wmcMoAnN.js";
|
|
5
5
|
import { A as EntityFields, F as RpcCreationFlags, I as RpcEntity, L as RpcQueryOptions, M as ArkivRpcSchema, N as RpcAttribute, P as RpcAttributeSchemaEntry, R as RpcSelect, d as Expression, i as SelectArg, j as ArkivClient, k as Entity, n as FullEntity, r as ProjectedEntity, t as EntitySelection } from "./selection-ox7zdtVm.js";
|
|
6
|
-
import { t as SelectQueryBuilder } from "./index-
|
|
6
|
+
import { t as SelectQueryBuilder } from "./index-CmEefH8_.js";
|
|
7
7
|
import { C as QueryOptions, D as PredictedEntityKey, E as PredictEntityKeysReturnType, O as GetBlockTimingReturnType, S as OwnershipTransferredEvent, T as PredictEntityKeysParameters, _ as EntityDeletedEvent, a as ExecuteBatchParameters, b as EntityPatchedEvent, c as PatchEntityReturnType, d as DeleteEntityParameters, f as DeleteEntityReturnType, g as EntityCreatedEvent, h as WatchEntityEventsParameters, i as MimeType, l as ExtendEntityParameters, m as CreateEntityReturnType, n as ChangeOwnershipReturnType, o as ExecuteBatchReturnType, p as CreateEntityParameters, r as TxParams, s as PatchEntityParameters, t as ChangeOwnershipParameters, u as ExtendEntityReturnType, v as EntityEvent, w as QueryReturnType, x as ExpiryExtendedEvent, y as EntityEventContext } from "./changeOwnership-B0ar96ub.js";
|
|
8
8
|
import { i as ExpirationTime, n as stringToPayload, r as DeadlineOptions, t as jsonToPayload } from "./payload-CGvVPZQX.js";
|
|
9
9
|
import { Account, Address, Chain, Client, Hex, ParseAccount, Prettify, PublicActions, PublicClientConfig, RpcSchema, Transport, WalletActions, WalletClientConfig } from "viem";
|
|
@@ -24,11 +24,11 @@ type PublicArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
26
26
|
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
27
|
-
* import {
|
|
27
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
28
28
|
* import { http } from "viem"
|
|
29
29
|
*
|
|
30
30
|
* const client = createPublicClient({
|
|
31
|
-
* chain:
|
|
31
|
+
* chain: tiramisu,
|
|
32
32
|
* transport: http(),
|
|
33
33
|
* })
|
|
34
34
|
* const entity = await client.getEntity(entityKey)
|
|
@@ -57,12 +57,12 @@ type PublicArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
57
57
|
*
|
|
58
58
|
* @example
|
|
59
59
|
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
60
|
-
* import {
|
|
60
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
61
61
|
* import { eq } from "@arkiv-network/sdk/query"
|
|
62
62
|
* import { http } from "viem"
|
|
63
63
|
*
|
|
64
64
|
* const client = createPublicClient({
|
|
65
|
-
* chain:
|
|
65
|
+
* chain: tiramisu,
|
|
66
66
|
* transport: http(),
|
|
67
67
|
* })
|
|
68
68
|
* // select everything
|
|
@@ -118,13 +118,13 @@ type PublicArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
118
118
|
*
|
|
119
119
|
* @example
|
|
120
120
|
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
121
|
-
* import {
|
|
121
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
122
122
|
* import { and, eq, gte } from "@arkiv-network/sdk/query"
|
|
123
123
|
* import { i32 } from "@arkiv-network/sdk/attr"
|
|
124
124
|
* import { http } from "viem"
|
|
125
125
|
*
|
|
126
126
|
* const client = createPublicClient({
|
|
127
|
-
* chain:
|
|
127
|
+
* chain: tiramisu,
|
|
128
128
|
* transport: http(),
|
|
129
129
|
* })
|
|
130
130
|
* const page = await client.query(and(eq("category", "docs"), gte("level", i32(10))), {
|
|
@@ -143,11 +143,11 @@ type PublicArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
143
143
|
*
|
|
144
144
|
* @example
|
|
145
145
|
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
146
|
-
* import {
|
|
146
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
147
147
|
* import { http } from "viem"
|
|
148
148
|
*
|
|
149
149
|
* const client = createPublicClient({
|
|
150
|
-
* chain:
|
|
150
|
+
* chain: tiramisu,
|
|
151
151
|
* transport: http(),
|
|
152
152
|
* })
|
|
153
153
|
* const entityCount = await client.getEntityCount()
|
|
@@ -165,11 +165,11 @@ type PublicArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
165
165
|
*
|
|
166
166
|
* @example
|
|
167
167
|
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
168
|
-
* import {
|
|
168
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
169
169
|
* import { http } from "viem"
|
|
170
170
|
*
|
|
171
171
|
* const client = createPublicClient({
|
|
172
|
-
* chain:
|
|
172
|
+
* chain: tiramisu,
|
|
173
173
|
* transport: http(),
|
|
174
174
|
* })
|
|
175
175
|
* const nonce = await client.getEntityNonce("0xabc…")
|
|
@@ -218,11 +218,11 @@ type PublicArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
218
218
|
*
|
|
219
219
|
* @example
|
|
220
220
|
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
221
|
-
* import {
|
|
221
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
222
222
|
* import { http } from "viem"
|
|
223
223
|
*
|
|
224
224
|
* const client = createPublicClient({
|
|
225
|
-
* chain:
|
|
225
|
+
* chain: tiramisu,
|
|
226
226
|
* transport: http(),
|
|
227
227
|
* })
|
|
228
228
|
* const blockTiming = await client.getBlockTiming()
|
|
@@ -246,11 +246,11 @@ type PublicArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
246
246
|
*
|
|
247
247
|
* @example
|
|
248
248
|
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
249
|
-
* import {
|
|
249
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
250
250
|
* import { http } from "viem"
|
|
251
251
|
*
|
|
252
252
|
* const client = createPublicClient({
|
|
253
|
-
* chain:
|
|
253
|
+
* chain: tiramisu,
|
|
254
254
|
* transport: http(),
|
|
255
255
|
* })
|
|
256
256
|
* const unwatch = client.watchEntityEvents({
|
|
@@ -276,11 +276,11 @@ type PublicArkivClient<transport extends Transport = Transport, chain extends Ch
|
|
|
276
276
|
*
|
|
277
277
|
* @example
|
|
278
278
|
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
279
|
-
* import {
|
|
279
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
280
280
|
* import { http } from "viem"
|
|
281
281
|
*
|
|
282
282
|
* const client = createPublicClient({
|
|
283
|
-
* chain:
|
|
283
|
+
* chain: tiramisu,
|
|
284
284
|
* transport: http(),
|
|
285
285
|
* })
|
|
286
286
|
*/
|
|
@@ -306,13 +306,13 @@ type WalletArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
306
306
|
* @example
|
|
307
307
|
* import { createWalletClient, ExpirationTime, jsonToPayload } from "@arkiv-network/sdk"
|
|
308
308
|
* import { i32 } from "@arkiv-network/sdk/attr"
|
|
309
|
-
* import {
|
|
309
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
310
310
|
* import { http } from "viem"
|
|
311
311
|
* import { privateKeyToAccount } from "viem/accounts"
|
|
312
312
|
*
|
|
313
313
|
* const client = createWalletClient({
|
|
314
314
|
* account: privateKeyToAccount("0x..."),
|
|
315
|
-
* chain:
|
|
315
|
+
* chain: tiramisu,
|
|
316
316
|
* transport: http(),
|
|
317
317
|
* })
|
|
318
318
|
* const { entityKey, txHash, expiresAt } = await client.createEntity({
|
|
@@ -341,13 +341,13 @@ type WalletArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
341
341
|
* @example
|
|
342
342
|
* import { createWalletClient, jsonToPayload } from "@arkiv-network/sdk"
|
|
343
343
|
* import { i32 } from "@arkiv-network/sdk/attr"
|
|
344
|
-
* import {
|
|
344
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
345
345
|
* import { http } from "viem"
|
|
346
346
|
* import { privateKeyToAccount } from "viem/accounts"
|
|
347
347
|
*
|
|
348
348
|
* const client = createWalletClient({
|
|
349
349
|
* account: privateKeyToAccount("0x..."),
|
|
350
|
-
* chain:
|
|
350
|
+
* chain: tiramisu,
|
|
351
351
|
* transport: http(),
|
|
352
352
|
* })
|
|
353
353
|
* // Publish the entity: one attribute changes, one goes away, the payload is replaced.
|
|
@@ -370,13 +370,13 @@ type WalletArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
370
370
|
*
|
|
371
371
|
* @example
|
|
372
372
|
* import { createWalletClient } from "@arkiv-network/sdk"
|
|
373
|
-
* import {
|
|
373
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
374
374
|
* import { http } from "viem"
|
|
375
375
|
* import { privateKeyToAccount } from "viem/accounts"
|
|
376
376
|
*
|
|
377
377
|
* const client = createWalletClient({
|
|
378
378
|
* account: privateKeyToAccount("0x..."),
|
|
379
|
-
* chain:
|
|
379
|
+
* chain: tiramisu,
|
|
380
380
|
* transport: http(),
|
|
381
381
|
* })
|
|
382
382
|
* // entityKey is the bytes32 key returned by createEntity.
|
|
@@ -402,13 +402,13 @@ type WalletArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
402
402
|
*
|
|
403
403
|
* @example
|
|
404
404
|
* import { createWalletClient, ExpirationTime } from "@arkiv-network/sdk"
|
|
405
|
-
* import {
|
|
405
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
406
406
|
* import { http } from "viem"
|
|
407
407
|
* import { privateKeyToAccount } from "viem/accounts"
|
|
408
408
|
*
|
|
409
409
|
* const client = createWalletClient({
|
|
410
410
|
* account: privateKeyToAccount("0x..."),
|
|
411
|
-
* chain:
|
|
411
|
+
* chain: tiramisu,
|
|
412
412
|
* transport: http(),
|
|
413
413
|
* })
|
|
414
414
|
* const { txHash, expiresAt } = await client.extendEntity({
|
|
@@ -447,13 +447,13 @@ type WalletArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
447
447
|
*
|
|
448
448
|
* @example
|
|
449
449
|
* import { createWalletClient, ExpirationTime, jsonToPayload } from "@arkiv-network/sdk"
|
|
450
|
-
* import {
|
|
450
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
451
451
|
* import { http } from "viem"
|
|
452
452
|
* import { privateKeyToAccount } from "viem/accounts"
|
|
453
453
|
*
|
|
454
454
|
* const client = createWalletClient({
|
|
455
455
|
* account: privateKeyToAccount("0x..."),
|
|
456
|
-
* chain:
|
|
456
|
+
* chain: tiramisu,
|
|
457
457
|
* transport: http(),
|
|
458
458
|
* })
|
|
459
459
|
* const { txHash, createdEntities } = await client.executeBatch({
|
|
@@ -490,12 +490,12 @@ type WalletArkivClient<transport extends Transport = Transport, chain extends Ch
|
|
|
490
490
|
*
|
|
491
491
|
* @example
|
|
492
492
|
* import { createWalletClient } from "@arkiv-network/sdk"
|
|
493
|
-
* import {
|
|
493
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
494
494
|
* import { http } from "viem"
|
|
495
495
|
* import { privateKeyToAccount } from "viem/accounts"
|
|
496
496
|
*
|
|
497
497
|
* const client = createWalletClient({
|
|
498
|
-
* chain:
|
|
498
|
+
* chain: tiramisu,
|
|
499
499
|
* transport: http(),
|
|
500
500
|
* account: privateKeyToAccount("0x..."),
|
|
501
501
|
* })
|
|
@@ -504,8 +504,10 @@ declare function createWalletClient<transport extends Transport, chain extends C
|
|
|
504
504
|
//#endregion
|
|
505
505
|
//#region src/errors.d.ts
|
|
506
506
|
declare class EntityMutationError extends Error {
|
|
507
|
+
readonly txHash: Hex | undefined;
|
|
507
508
|
constructor(message: string, options?: {
|
|
508
509
|
cause?: unknown;
|
|
510
|
+
txHash?: Hex | undefined;
|
|
509
511
|
});
|
|
510
512
|
}
|
|
511
513
|
declare class NoMoreResultsError extends Error {
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/clients/decorators/arkivPublic.ts","../src/clients/createPublicClient.ts","../src/clients/decorators/arkivWallet.ts","../src/clients/createWalletClient.ts","../src/errors.ts","../src/utils/chains.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;KAqBY,qCACQ,YAAY,yBAChB,oBAAoB,mCAClB,sBAAsB,uBACpC,KACF,cAAc,WAAW,OAAO;EALtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0L0B,SAAA,EAAA,CAAA,GAAA,EA1InB,GA0ImB,EAAA,GA1IX,OA0IW,CA1IH,UA0IG,CAAA;EAuCJ;;;;;;;;;;;;;;;ACvOlC;;;;;;;;;;;;;;;;;;EA6BgB,MAAA,EAAA;IACI;IACJ,CAAA,SAAA,CAAA,EAAA,GAAA,CAAA,ED4DO,kBC5DP,CD4D0B,UC5D1B,CAAA;IACW;;;;;;;;;;;;;;;;;;;ICjBf,CAAA,gBFgGS,eEhGS,CAAA,CAAA,SAAA,EFgGmB,CEhGnB,CAAA,EFgGuB,kBEhGvB,CFgG0C,eEhG1C,CFgG0D,CEhG1D,CAAA,CAAA;IACV;;;;IAEF,CAAA,SAAA,EFkGF,SElGE,CAAA,EFkGU,kBElGV,CFkG6B,UElG7B,CAAA;EAAsB,CAAA;EAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6NP,KAAA,EAAA,CAAA,KAAA,EF1FQ,UE0FR,GAAA,MAAA,EAAA,YAAA,CAAA,EF1F4C,YE0F5C,EAAA,GF1F6D,OE0F7D,CF1FqE,eE0FrE,CAAA;EAAO;;;;ACjPhB;;;;;;;;;;;;EAMoC,cAAA,EAAA,GAAA,GHmKZ,OGnKY,CAAA,MAAA,CAAA;EAA8B;;;;;;;AA0BlE;;;;;;;;;;;;;;EAOoD,cAAA,EAAA,CAAA,KAAA,EHyJ1B,OGzJ0B,EAAA,GHyJd,OGzJc,CAAA,MAAA,CAAA;EAAb;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/clients/decorators/arkivPublic.ts","../src/clients/createPublicClient.ts","../src/clients/decorators/arkivWallet.ts","../src/clients/createWalletClient.ts","../src/errors.ts","../src/utils/chains.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;KAqBY,qCACQ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