@arkiv-network/sdk 0.8.1-dev.1 → 0.9.0-next.2
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 +180 -61
- package/dist/chains/index.d.ts +17 -17
- package/dist/changeOwnership-Cy9gfyjN.d.cts +1160 -0
- package/dist/changeOwnership-Cy9gfyjN.d.cts.map +1 -0
- package/dist/changeOwnership-gXf-lBqI.d.ts +1160 -0
- package/dist/changeOwnership-gXf-lBqI.d.ts.map +1 -0
- package/dist/entity/index.cjs +4 -10
- package/dist/entity/index.d.cts +3 -3
- package/dist/entity/index.d.ts +3 -3
- package/dist/entity/index.js +3 -4
- package/dist/entity-BM1unrQf.cjs +41 -0
- package/dist/{entity-DJ0Gml9c.cjs → entity-BgaFJSaV.cjs} +4 -4
- package/dist/entity-CFAI1KyG.js +36 -0
- package/dist/entity-CFAI1KyG.js.map +1 -0
- package/dist/{entity-CniBgBSd.js → entity-CGqx_AU0.js} +4 -4
- package/dist/entity-CGqx_AU0.js.map +1 -0
- package/dist/{payload-AfUfSctb.d.ts → expirationTime-C7PZK49K.d.ts} +8 -37
- package/dist/expirationTime-C7PZK49K.d.ts.map +1 -0
- package/dist/expirationTime-CkIGNAg8.cjs +140 -0
- package/dist/{payload-D167BlJR.d.cts → expirationTime-DOB8V4B8.d.cts} +8 -37
- package/dist/expirationTime-DOB8V4B8.d.cts.map +1 -0
- package/dist/{expiry-Cgdb_dbq.js → expirationTime-UKPuA-LM.js} +62 -27
- package/dist/expirationTime-UKPuA-LM.js.map +1 -0
- package/dist/expiry-B48I-yTA.d.cts +40 -0
- package/dist/expiry-B48I-yTA.d.cts.map +1 -0
- package/dist/expiry-S2PUL8Hg.d.ts +40 -0
- package/dist/expiry-S2PUL8Hg.d.ts.map +1 -0
- package/dist/index-C-mMF5WZ.d.cts +735 -0
- package/dist/index-C-mMF5WZ.d.cts.map +1 -0
- package/dist/{index-BkqSnGJH.d.ts → index-C4zZqJ9S.d.ts} +5 -27
- package/dist/index-C4zZqJ9S.d.ts.map +1 -0
- package/dist/{index-CLhsFyVH.d.cts → index-CcVWYB6v.d.cts} +5 -27
- package/dist/index-CcVWYB6v.d.cts.map +1 -0
- package/dist/index-DCx2XC6S.d.ts +489 -0
- package/dist/index-DCx2XC6S.d.ts.map +1 -0
- package/dist/index-DLb7BfIw.d.ts +735 -0
- package/dist/index-DLb7BfIw.d.ts.map +1 -0
- package/dist/index-DzriOUm8.d.cts +489 -0
- package/dist/index-DzriOUm8.d.cts.map +1 -0
- package/dist/index.cjs +162 -146
- package/dist/index.d.cts +180 -133
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +180 -133
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +93 -83
- package/dist/index.js.map +1 -1
- package/dist/params-BuIrJA9a.cjs +45 -0
- package/dist/params-DDJOnsNi.js +22 -0
- package/dist/params-DDJOnsNi.js.map +1 -0
- package/dist/query/index.cjs +9 -4
- package/dist/query/index.d.cts +6 -6
- package/dist/query/index.d.ts +6 -6
- package/dist/query/index.js +4 -5
- package/dist/query-D0KtuFh2.cjs +1625 -0
- package/dist/query-DpRDozmj.js +1417 -0
- package/dist/query-DpRDozmj.js.map +1 -0
- package/dist/schema/index.cjs +46 -0
- package/dist/schema/index.d.cts +2 -0
- package/dist/schema/index.d.ts +2 -0
- package/dist/schema/index.js +3 -0
- package/dist/{attr-BXTkpnoc.cjs → schema-B9AyXcgU.cjs} +513 -246
- package/dist/{attr-tmyREHtw.js → schema-DY4sqehl.js} +427 -244
- package/dist/schema-DY4sqehl.js.map +1 -0
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.d.cts +5 -5
- package/dist/types/index.d.ts +5 -5
- package/dist/types/index.js +1 -1
- package/dist/utils/index.cjs +3 -5
- package/dist/utils/index.d.cts +3 -3
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.js +3 -3
- package/package.json +9 -12
- package/src/actions/public/getEntity.test.ts +69 -0
- package/src/actions/public/getEntity.ts +34 -20
- package/src/actions/public/predictEntityKeys.ts +8 -7
- package/src/actions/public/query.test.ts +58 -0
- package/src/actions/public/query.ts +41 -13
- package/src/actions/wallet/createEntity.ts +34 -63
- package/src/actions/wallet/executeBatch.test.ts +38 -0
- package/src/actions/wallet/executeBatch.ts +26 -9
- package/src/actions/wallet/extendEntity.ts +9 -8
- package/src/actions/wallet/patchEntity.ts +43 -52
- package/src/clients/createPublicClient.test.ts +10 -2
- package/src/clients/createWalletClient.ts +4 -1
- package/src/clients/decorators/arkivPublic.ts +123 -80
- package/src/clients/decorators/arkivWallet.ts +113 -65
- package/src/entity/create.test.ts +25 -21
- package/src/entity/expiry.ts +8 -6
- package/src/entity/flags.ts +1 -1
- package/src/entity/index.ts +2 -4
- package/src/entity/key.ts +3 -3
- package/src/entity/operations.ts +1 -1
- package/src/errors.ts +2 -11
- package/src/index.ts +18 -6
- package/src/query/builderBase.ts +166 -0
- package/src/query/countBuilder.test.ts +91 -0
- package/src/query/countBuilder.ts +67 -0
- package/src/query/engine.ts +9 -3
- package/src/query/errors.ts +24 -14
- package/src/query/expression.test.ts +129 -21
- package/src/query/expression.ts +323 -94
- package/src/query/index.ts +26 -4
- package/src/query/injection.test.ts +5 -11
- package/src/query/queryBuilder.test.ts +467 -58
- package/src/query/queryBuilder.ts +191 -98
- package/src/query/queryResult.ts +35 -9
- package/src/query/selection.test.ts +278 -24
- package/src/query/selection.ts +427 -86
- package/src/schema/attributes.test.ts +266 -0
- package/src/schema/attributes.ts +212 -0
- package/src/{attr → schema}/codec.test.ts +37 -5
- package/src/{attr → schema}/codec.ts +40 -11
- package/src/schema/column.ts +193 -0
- package/src/{attr → schema}/errors.ts +67 -10
- package/src/schema/index.ts +76 -0
- package/src/{attr → schema}/names.ts +4 -2
- package/src/schema/schema.test.ts +171 -0
- package/src/schema/schema.ts +250 -0
- package/src/{attr → schema}/types.ts +36 -30
- package/src/{attr → schema}/values.test.ts +62 -3
- package/src/{attr → schema}/values.ts +246 -65
- package/src/types/entity.test.ts +1 -44
- package/src/types/entity.ts +9 -55
- package/src/types/events.ts +1 -1
- package/src/types/index.ts +11 -4
- package/src/types/rpcSchema.ts +22 -16
- package/src/utils/arkivTransactions.test.ts +356 -116
- package/src/utils/arkivTransactions.ts +30 -38
- package/src/utils/entities.ts +10 -9
- package/src/utils/expirationTime.ts +5 -5
- package/src/utils/index.ts +0 -1
- package/src/utils/logger.test.ts +45 -0
- package/src/utils/logger.ts +5 -39
- package/src/utils/revert.test.ts +25 -0
- package/src/utils/revert.ts +28 -3
- package/dist/attr/index.cjs +0 -34
- package/dist/attr/index.d.cts +0 -2
- package/dist/attr/index.d.ts +0 -2
- package/dist/attr/index.js +0 -3
- package/dist/attr-tmyREHtw.js.map +0 -1
- package/dist/entity-B0t6sN7F.cjs +0 -71
- package/dist/entity-BIp_df9u.js +0 -67
- package/dist/entity-BIp_df9u.js.map +0 -1
- package/dist/entity-CniBgBSd.js.map +0 -1
- package/dist/expiry-BxOlvVWC.d.ts +0 -79
- package/dist/expiry-BxOlvVWC.d.ts.map +0 -1
- package/dist/expiry-CG9GhVXv.cjs +0 -135
- package/dist/expiry-Cgdb_dbq.js.map +0 -1
- package/dist/expiry-DRV29F1r.d.cts +0 -79
- package/dist/expiry-DRV29F1r.d.cts.map +0 -1
- package/dist/flags-DCD26uhe.cjs +0 -43
- package/dist/flags-DUT2gHEU.js +0 -33
- package/dist/flags-DUT2gHEU.js.map +0 -1
- package/dist/index-BkqSnGJH.d.ts.map +0 -1
- package/dist/index-C7fbakoI.d.cts +0 -278
- package/dist/index-C7fbakoI.d.cts.map +0 -1
- package/dist/index-CIcHPx2j.d.cts +0 -424
- package/dist/index-CIcHPx2j.d.cts.map +0 -1
- package/dist/index-CLhsFyVH.d.cts.map +0 -1
- package/dist/index-Cd2aaWme.d.ts +0 -424
- package/dist/index-Cd2aaWme.d.ts.map +0 -1
- package/dist/index-Cq6fa8AI.d.ts +0 -278
- package/dist/index-Cq6fa8AI.d.ts.map +0 -1
- package/dist/index-DaNeJUw8.d.ts +0 -955
- package/dist/index-DaNeJUw8.d.ts.map +0 -1
- package/dist/index-Dv16LO2s.d.cts +0 -955
- package/dist/index-Dv16LO2s.d.cts.map +0 -1
- package/dist/payload-AfUfSctb.d.ts.map +0 -1
- package/dist/payload-D167BlJR.d.cts.map +0 -1
- package/dist/payload-DE7wMztL.js +0 -92
- package/dist/payload-DE7wMztL.js.map +0 -1
- package/dist/payload-DqFweqiO.cjs +0 -108
- package/dist/query-9oojUdM7.cjs +0 -1128
- package/dist/query-Ber-lOJQ.js +0 -968
- package/dist/query-Ber-lOJQ.js.map +0 -1
- package/src/actions/public/getEntityCount.ts +0 -10
- package/src/attr/attributes.test.ts +0 -120
- package/src/attr/attributes.ts +0 -196
- package/src/attr/index.ts +0 -50
- package/src/types/mimeTypes.ts +0 -27
- package/src/utils/compression.test.ts +0 -32
- package/src/utils/compression.ts +0 -102
- package/src/utils/payload.ts +0 -36
- /package/src/{attr → schema}/decimal.ts +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region src/consts.ts
|
|
2
|
+
const ARKIV_ADDRESS = "0x4400000000000000000000000000000000000044";
|
|
3
|
+
const BLOCK_TIME = 2;
|
|
4
|
+
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region src/entity/params.ts
|
|
7
|
+
/**
|
|
8
|
+
* Max uint64 value
|
|
9
|
+
*/
|
|
10
|
+
const MAX_EXPIRES_AT = 2n ** 64n - 1n;
|
|
11
|
+
/** The operation tags of the `execute` ABI's tagged union. */
|
|
12
|
+
const OperationType = {
|
|
13
|
+
Create: 1,
|
|
14
|
+
Patch: 2,
|
|
15
|
+
ExtendExpiry: 3,
|
|
16
|
+
TransferOwnership: 4,
|
|
17
|
+
Delete: 5
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
export { BLOCK_TIME as i, OperationType as n, ARKIV_ADDRESS as r, MAX_EXPIRES_AT as t };
|
|
22
|
+
//# sourceMappingURL=params-DDJOnsNi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"params-DDJOnsNi.js","names":[],"sources":["../src/consts.ts","../src/entity/params.ts"],"sourcesContent":["//export const ARKIV_ADDRESS = \"0x00000000000000000000000000000061726b6976\" as `0x${string}`\nexport const ARKIV_ADDRESS = \"0x4400000000000000000000000000000000000044\" as `0x${string}`\nexport const BLOCK_TIME = 2 // 2 seconds\n","/**\n * Max uint64 value\n */\nexport const MAX_EXPIRES_AT = 2n ** 64n - 1n\n\n/** The operation tags of the `execute` ABI's tagged union. */\nexport const OperationType = {\n Create: 1,\n Patch: 2,\n ExtendExpiry: 3,\n TransferOwnership: 4,\n Delete: 5,\n} as const\n\nexport type OperationType = (typeof OperationType)[keyof typeof OperationType]\n"],"mappings":";AACA,MAAa,gBAAgB;AAC7B,MAAa,aAAa;;;;;;;ACC1B,MAAa,iBAAiB,MAAM,MAAM;;AAG1C,MAAa,gBAAgB;CAC3B,QAAQ;CACR,OAAO;CACP,cAAc;CACd,mBAAmB;CACnB,QAAQ;CACT"}
|
package/dist/query/index.cjs
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
require('../
|
|
2
|
-
|
|
1
|
+
const require_query = require('../query-D0KtuFh2.cjs');
|
|
2
|
+
require('../schema-B9AyXcgU.cjs');
|
|
3
3
|
require('../errors-DhV00966.cjs');
|
|
4
|
-
require('../
|
|
5
|
-
require('../entity-B0t6sN7F.cjs');
|
|
4
|
+
require('../entity-BM1unrQf.cjs');
|
|
6
5
|
|
|
6
|
+
exports.CountQueryBuilder = require_query.CountQueryBuilder;
|
|
7
7
|
exports.InvalidPredicateError = require_query.InvalidPredicateError;
|
|
8
8
|
exports.MAX_LIMIT = require_query.MAX_LIMIT;
|
|
9
9
|
exports.QueryError = require_query.QueryError;
|
|
10
10
|
exports.QueryResult = require_query.QueryResult;
|
|
11
|
+
exports.SYSTEM_FIELDS = require_query.SYSTEM_FIELDS;
|
|
11
12
|
exports.SelectQueryBuilder = require_query.SelectQueryBuilder;
|
|
12
13
|
exports.UnsupportedOperatorError = require_query.UnsupportedOperatorError;
|
|
13
14
|
exports.and = require_query.and;
|
|
15
|
+
exports.between = require_query.between;
|
|
16
|
+
exports.checkAgainstSchema = require_query.checkAgainstSchema;
|
|
14
17
|
exports.eq = require_query.eq;
|
|
15
18
|
exports.exists = require_query.exists;
|
|
16
19
|
exports.gt = require_query.gt;
|
|
@@ -21,7 +24,9 @@ exports.lte = require_query.lte;
|
|
|
21
24
|
exports.ne = require_query.ne;
|
|
22
25
|
exports.not = require_query.not;
|
|
23
26
|
exports.or = require_query.or;
|
|
27
|
+
exports.projectSelection = require_query.projectSelection;
|
|
24
28
|
exports.render = require_query.render;
|
|
25
29
|
exports.runQuery = require_query.runQuery;
|
|
26
30
|
exports.startsWith = require_query.startsWith;
|
|
31
|
+
exports.toRow = require_query.toRow;
|
|
27
32
|
exports.toRpcSelect = require_query.toRpcSelect;
|
package/dist/query/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "../
|
|
3
|
-
import "../
|
|
4
|
-
import {
|
|
5
|
-
import { a as
|
|
6
|
-
export { AndNode, ComparisonNode, ComparisonOperator,
|
|
1
|
+
import "../index-CcVWYB6v.cjs";
|
|
2
|
+
import "../expiry-B48I-yTA.cjs";
|
|
3
|
+
import { $ as ComparisonNode, A as FullRow, B as Selection, Ct as or, D as ColumnValue, F as ResultOf, G as projectSelection, H as SelectionOf, I as Row, J as Entity, K as toRow, L as SYSTEM_FIELDS, Lt as RpcSelect, M as NonEmptySelection, N as PartialRow, O as DynamicSelection, P as Projection, Q as BetweenNode, R as SelectArg, St as not, Tt as startsWith, U as SystemField, V as SelectionFields, X as AndNode, Z as AttributeRef, _t as gte, at as PredicateValue, bt as lte, ct as StartsWithNode, dt as and, et as ComparisonOperator, ft as between, gt, ht as exists, it as OrNode, j as KnownSystemFields, k as FullEntity, lt as SystemAttributeRef, mt as eq, nt as Expression, ot as RefsOf, pt as checkAgainstSchema, q as toRpcSelect, rt as NotNode, st as SchemaRef, tt as ExistsNode, ut as TypeOfNode, vt as hasType, wt as render, xt as ne, yt as lt, z as Selected } from "../changeOwnership-Cy9gfyjN.cjs";
|
|
4
|
+
import { gt as StrValue } from "../index-C-mMF5WZ.cjs";
|
|
5
|
+
import { a as MAX_LIMIT, c as runQuery, d as QueryResult, f as CountQueryBuilder, i as UnsupportedOperatorError, l as FromOptions, n as QueryError, o as QueryRequest, p as QueryBuilderBase, r as QueryErrorKind, s as QueryResponse, t as InvalidPredicateError, u as SelectQueryBuilder } from "../index-DzriOUm8.cjs";
|
|
6
|
+
export { AndNode, AttributeRef, BetweenNode, ColumnValue, ComparisonNode, ComparisonOperator, CountQueryBuilder, DynamicSelection, Entity, ExistsNode, Expression, FromOptions, FullEntity, FullRow, InvalidPredicateError, KnownSystemFields, MAX_LIMIT, NonEmptySelection, NotNode, OrNode, PartialRow, PredicateValue, Projection, QueryBuilderBase, QueryError, QueryErrorKind, QueryRequest, QueryResponse, QueryResult, RefsOf, ResultOf, Row, RpcSelect, SYSTEM_FIELDS, SchemaRef, SelectArg, SelectQueryBuilder, Selected, Selection, SelectionFields, SelectionOf, StartsWithNode, StrValue, SystemAttributeRef, SystemField, TypeOfNode, UnsupportedOperatorError, and, between, checkAgainstSchema, eq, exists, gt, gte, hasType, lt, lte, ne, not, or, projectSelection, render, runQuery, startsWith, toRow, toRpcSelect };
|
package/dist/query/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "../
|
|
3
|
-
import "../
|
|
4
|
-
import {
|
|
5
|
-
import { a as
|
|
6
|
-
export { AndNode, ComparisonNode, ComparisonOperator,
|
|
1
|
+
import "../index-C4zZqJ9S.js";
|
|
2
|
+
import "../expiry-S2PUL8Hg.js";
|
|
3
|
+
import { $ as ComparisonNode, A as FullRow, B as Selection, Ct as or, D as ColumnValue, F as ResultOf, G as projectSelection, H as SelectionOf, I as Row, J as Entity, K as toRow, L as SYSTEM_FIELDS, Lt as RpcSelect, M as NonEmptySelection, N as PartialRow, O as DynamicSelection, P as Projection, Q as BetweenNode, R as SelectArg, St as not, Tt as startsWith, U as SystemField, V as SelectionFields, X as AndNode, Z as AttributeRef, _t as gte, at as PredicateValue, bt as lte, ct as StartsWithNode, dt as and, et as ComparisonOperator, ft as between, gt, ht as exists, it as OrNode, j as KnownSystemFields, k as FullEntity, lt as SystemAttributeRef, mt as eq, nt as Expression, ot as RefsOf, pt as checkAgainstSchema, q as toRpcSelect, rt as NotNode, st as SchemaRef, tt as ExistsNode, ut as TypeOfNode, vt as hasType, wt as render, xt as ne, yt as lt, z as Selected } from "../changeOwnership-gXf-lBqI.js";
|
|
4
|
+
import { gt as StrValue } from "../index-DLb7BfIw.js";
|
|
5
|
+
import { a as MAX_LIMIT, c as runQuery, d as QueryResult, f as CountQueryBuilder, i as UnsupportedOperatorError, l as FromOptions, n as QueryError, o as QueryRequest, p as QueryBuilderBase, r as QueryErrorKind, s as QueryResponse, t as InvalidPredicateError, u as SelectQueryBuilder } from "../index-DCx2XC6S.js";
|
|
6
|
+
export { AndNode, AttributeRef, BetweenNode, ColumnValue, ComparisonNode, ComparisonOperator, CountQueryBuilder, DynamicSelection, Entity, ExistsNode, Expression, FromOptions, FullEntity, FullRow, InvalidPredicateError, KnownSystemFields, MAX_LIMIT, NonEmptySelection, NotNode, OrNode, PartialRow, PredicateValue, Projection, QueryBuilderBase, QueryError, QueryErrorKind, QueryRequest, QueryResponse, QueryResult, RefsOf, ResultOf, Row, RpcSelect, SYSTEM_FIELDS, SchemaRef, SelectArg, SelectQueryBuilder, Selected, Selection, SelectionFields, SelectionOf, StartsWithNode, StrValue, SystemAttributeRef, SystemField, TypeOfNode, UnsupportedOperatorError, and, between, checkAgainstSchema, eq, exists, gt, gte, hasType, lt, lte, ne, not, or, projectSelection, render, runQuery, startsWith, toRow, toRpcSelect };
|
package/dist/query/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import
|
|
1
|
+
import { A as toRpcSelect, C as UnsupportedOperatorError, D as SYSTEM_FIELDS, O as projectSelection, S as QueryError, _ as render, a as between, b as runQuery, c as exists, d as hasType, f as lt, g as or, h as not, i as and, k as toRow, l as gt, m as ne, n as QueryResult, o as checkAgainstSchema, p as lte, r as CountQueryBuilder, s as eq, t as SelectQueryBuilder, u as gte, v as startsWith, x as InvalidPredicateError, y as MAX_LIMIT } from "../query-DpRDozmj.js";
|
|
2
|
+
import "../schema-DY4sqehl.js";
|
|
3
3
|
import "../errors-D2E1GRjw.js";
|
|
4
|
-
import "../
|
|
5
|
-
import "../entity-BIp_df9u.js";
|
|
4
|
+
import "../entity-CFAI1KyG.js";
|
|
6
5
|
|
|
7
|
-
export { InvalidPredicateError, MAX_LIMIT, QueryError, QueryResult, SelectQueryBuilder, UnsupportedOperatorError, and, eq, exists, gt, gte, hasType, lt, lte, ne, not, or, render, runQuery, startsWith, toRpcSelect };
|
|
6
|
+
export { CountQueryBuilder, InvalidPredicateError, MAX_LIMIT, QueryError, QueryResult, SYSTEM_FIELDS, SelectQueryBuilder, UnsupportedOperatorError, and, between, checkAgainstSchema, eq, exists, gt, gte, hasType, lt, lte, ne, not, or, projectSelection, render, runQuery, startsWith, toRow, toRpcSelect };
|