@interest-protocol/blast-admin-sdk 0.0.0-stage → 0.1.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.
package/README.md CHANGED
@@ -1,3 +1,9 @@
1
- # Temporary Holding Version
1
+ # @interest-protocol/blast-admin-sdk
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The admin package in the [Blast SDK monorepo](https://github.com/interest-protocol/blast-v2-sdk).
4
+
5
+ ```sh
6
+ npm install @interest-protocol/blast-admin-sdk
7
+ ```
8
+
9
+ See the repository README and docs for usage, development, and release guidance.
@@ -0,0 +1,67 @@
1
+ import type { SuiEventPosition } from "@interest-protocol/blast-core/events";
2
+ import type { SuiClientTypes } from "@mysten/sui/client";
3
+ /**
4
+ * The `blast_admin::blast_admin_events` the ACL emits, in Move field order.
5
+ * The generic upgrade-custody and operational-version events belong to
6
+ * package upgrades, which the SDK leaves to publish tooling.
7
+ */
8
+ export declare const aclEventBcs: {
9
+ AdminGranted: import("@mysten/sui/bcs").BcsStruct<{
10
+ admin_cap_id: import("@mysten/sui/bcs").BcsType<string, string, string>;
11
+ recipient: import("@mysten/sui/bcs").BcsType<string, string, "bytes[32]">;
12
+ }, string>;
13
+ AdminRevoked: import("@mysten/sui/bcs").BcsStruct<{
14
+ admin_cap_id: import("@mysten/sui/bcs").BcsType<string, string, string>;
15
+ roles: import("@mysten/sui/bcs").BcsType<string[], Iterable<string> & {
16
+ length: number;
17
+ }, `vector<${string}>`>;
18
+ }, string>;
19
+ AdminRoleGranted: import("@mysten/sui/bcs").BcsStruct<{
20
+ admin_cap_id: import("@mysten/sui/bcs").BcsType<string, string, string>;
21
+ role: import("@mysten/sui/bcs").BcsType<string, string, string>;
22
+ }, string>;
23
+ AdminRoleRevoked: import("@mysten/sui/bcs").BcsStruct<{
24
+ admin_cap_id: import("@mysten/sui/bcs").BcsType<string, string, string>;
25
+ role: import("@mysten/sui/bcs").BcsType<string, string, string>;
26
+ }, string>;
27
+ AdminDestroyed: import("@mysten/sui/bcs").BcsStruct<{
28
+ admin_cap_id: import("@mysten/sui/bcs").BcsType<string, string, string>;
29
+ roles: import("@mysten/sui/bcs").BcsType<string[], Iterable<string> & {
30
+ length: number;
31
+ }, `vector<${string}>`>;
32
+ was_active: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
33
+ }, string>;
34
+ SuperAdminTransferStarted: import("@mysten/sui/bcs").BcsStruct<{
35
+ recipient: import("@mysten/sui/bcs").BcsType<string, string, "bytes[32]">;
36
+ execute_after_ms: import("@mysten/sui/bcs").BcsType<bigint, bigint, "u64">;
37
+ }, string>;
38
+ SuperAdminTransferCancelled: import("@mysten/sui/bcs").BcsStruct<{
39
+ recipient: import("@mysten/sui/bcs").BcsType<string, string, "bytes[32]">;
40
+ execute_after_ms: import("@mysten/sui/bcs").BcsType<bigint, bigint, "u64">;
41
+ }, string>;
42
+ SuperAdminTransferred: import("@mysten/sui/bcs").BcsStruct<{
43
+ previous_super_admin_cap_id: import("@mysten/sui/bcs").BcsType<string, string, string>;
44
+ new_super_admin_cap_id: import("@mysten/sui/bcs").BcsType<string, string, string>;
45
+ recipient: import("@mysten/sui/bcs").BcsType<string, string, "bytes[32]">;
46
+ }, string>;
47
+ SuperAdminCapDestroyed: import("@mysten/sui/bcs").BcsStruct<{
48
+ super_admin_cap_id: import("@mysten/sui/bcs").BcsType<string, string, string>;
49
+ }, string>;
50
+ };
51
+ export type AclEventKind = keyof typeof aclEventBcs;
52
+ export type AclEventPayloads = {
53
+ [Kind in AclEventKind]: ReturnType<(typeof aclEventBcs)[Kind]["parse"]>;
54
+ };
55
+ export type DecodedAclEvent = {
56
+ [Kind in AclEventKind]: {
57
+ source: "admin";
58
+ kind: Kind;
59
+ payload: AclEventPayloads[Kind];
60
+ sender: string;
61
+ position: SuiEventPosition;
62
+ };
63
+ }[AclEventKind];
64
+ /** Decodes one `<adminPackageId>::blast_admin_events::<Kind>` ACL event. */
65
+ export declare function decodeAclEvent(event: SuiClientTypes.EventEntry, adminPackageId: string): DecodedAclEvent;
66
+ export declare function aclEventId(event: DecodedAclEvent): string;
67
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAM7E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAMzD;;;;GAIG;AACH,eAAO,MAAM,WAAW;IACtB,YAAY;;;;IAIZ,YAAY;;;;;;IAIZ,gBAAgB;;;;IAIhB,gBAAgB;;;;IAIhB,cAAc;;;;;;;IAKd,yBAAyB;;;;IACzB,2BAA2B;;;;IAI3B,qBAAqB;;;;;IAKrB,sBAAsB;;;CAGvB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,WAAW,CAAC;AAEpD,MAAM,MAAM,gBAAgB,GAAG;KAC5B,IAAI,IAAI,YAAY,GAAG,UAAU,CAAC,CAAC,OAAO,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;CACxE,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;KAC3B,IAAI,IAAI,YAAY,GAAG;QACtB,MAAM,EAAE,OAAO,CAAC;QAChB,IAAI,EAAE,IAAI,CAAC;QACX,OAAO,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAChC,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,gBAAgB,CAAC;KAC5B;CACF,CAAC,YAAY,CAAC,CAAC;AAEhB,4EAA4E;AAC5E,wBAAgB,cAAc,CAC5B,KAAK,EAAE,cAAc,CAAC,UAAU,EAChC,cAAc,EAAE,MAAM,GACrB,eAAe,CAkBjB;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CAEzD"}
package/dist/events.js ADDED
@@ -0,0 +1,66 @@
1
+ import { addressBcs, moveTypeNameBcs, suiObjectIdBcs, u64Bcs, } from "@interest-protocol/blast-core/bcs";
2
+ import { normalizeSuiEventPosition, suiEventId, } from "@interest-protocol/blast-core/events";
3
+ import { bcs } from "@mysten/sui/bcs";
4
+ import { normalizeSuiAddress, parseStructTag } from "@mysten/sui/utils";
5
+ const roles = bcs.vector(moveTypeNameBcs);
6
+ const transfer = { recipient: addressBcs, execute_after_ms: u64Bcs };
7
+ /**
8
+ * The `blast_admin::blast_admin_events` the ACL emits, in Move field order.
9
+ * The generic upgrade-custody and operational-version events belong to
10
+ * package upgrades, which the SDK leaves to publish tooling.
11
+ */
12
+ export const aclEventBcs = {
13
+ AdminGranted: bcs.struct("AdminGranted", {
14
+ admin_cap_id: suiObjectIdBcs,
15
+ recipient: addressBcs,
16
+ }),
17
+ AdminRevoked: bcs.struct("AdminRevoked", {
18
+ admin_cap_id: suiObjectIdBcs,
19
+ roles,
20
+ }),
21
+ AdminRoleGranted: bcs.struct("AdminRoleGranted", {
22
+ admin_cap_id: suiObjectIdBcs,
23
+ role: moveTypeNameBcs,
24
+ }),
25
+ AdminRoleRevoked: bcs.struct("AdminRoleRevoked", {
26
+ admin_cap_id: suiObjectIdBcs,
27
+ role: moveTypeNameBcs,
28
+ }),
29
+ AdminDestroyed: bcs.struct("AdminDestroyed", {
30
+ admin_cap_id: suiObjectIdBcs,
31
+ roles,
32
+ was_active: bcs.bool(),
33
+ }),
34
+ SuperAdminTransferStarted: bcs.struct("SuperAdminTransferStarted", transfer),
35
+ SuperAdminTransferCancelled: bcs.struct("SuperAdminTransferCancelled", transfer),
36
+ SuperAdminTransferred: bcs.struct("SuperAdminTransferred", {
37
+ previous_super_admin_cap_id: suiObjectIdBcs,
38
+ new_super_admin_cap_id: suiObjectIdBcs,
39
+ recipient: addressBcs,
40
+ }),
41
+ SuperAdminCapDestroyed: bcs.struct("SuperAdminCapDestroyed", {
42
+ super_admin_cap_id: suiObjectIdBcs,
43
+ }),
44
+ };
45
+ /** Decodes one `<adminPackageId>::blast_admin_events::<Kind>` ACL event. */
46
+ export function decodeAclEvent(event, adminPackageId) {
47
+ const tag = parseStructTag(event.eventType);
48
+ if (tag.address !== normalizeSuiAddress(adminPackageId) ||
49
+ tag.module !== "blast_admin_events" ||
50
+ tag.typeParams.length > 0 ||
51
+ !Object.hasOwn(aclEventBcs, tag.name)) {
52
+ throw new TypeError(`unexpected ACL event type ${event.eventType}`);
53
+ }
54
+ const kind = tag.name;
55
+ return {
56
+ source: "admin",
57
+ kind,
58
+ payload: aclEventBcs[kind].parse(event.bcs),
59
+ sender: normalizeSuiAddress(event.sender),
60
+ position: normalizeSuiEventPosition(event),
61
+ };
62
+ }
63
+ export function aclEventId(event) {
64
+ return suiEventId(event.position);
65
+ }
66
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,eAAe,EACf,cAAc,EACd,MAAM,GACP,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACL,yBAAyB,EACzB,UAAU,GACX,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExE,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;AAC1C,MAAM,QAAQ,GAAG,EAAE,SAAS,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,EAAE,CAAC;AAErE;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,cAAc,EAAE;QACvC,YAAY,EAAE,cAAc;QAC5B,SAAS,EAAE,UAAU;KACtB,CAAC;IACF,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,cAAc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AS,CAAC,6BAA6B,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;IACtE,CAAC;IACD,MAAM,IAAI,GAAG,GAAG,CAAC,IAAoB,CAAC;IACtC,OAAO;QACL,MAAM,EAAE,OAAO;QACf,IAAI;QACJ,OAAO,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;QAC3C,MAAM,EAAE,mBAAmB,CAAC,KAAK,CAAC,MAAM,CAAC;QACzC,QAAQ,EAAE,yBAAyB,CAAC,KAAK,CAAC;KACxB,CAAC;AACvB,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,KAAsB;IAC/C,OAAO,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AACpC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from "./events.ts";
2
+ export * from "./reducer.ts";
3
+ export * from "./state.ts";
4
+ export * from "./transactions.ts";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ export * from "./events.js";
2
+ export * from "./reducer.js";
3
+ export * from "./state.js";
4
+ export * from "./transactions.js";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { AclEventKind, DecodedAclEvent } from "./events.ts";
2
+ import type { PendingSuperAdmin } from "./state.ts";
3
+ /**
4
+ * The ACL rebuilt from its events. Its `init` emits nothing, so
5
+ * `superAdminCapId` stays null until the first accepted transfer; the publish
6
+ * effects name the first root. `admins` matches `AclState.admins` once every
7
+ * event is applied.
8
+ */
9
+ export type AclProjection = {
10
+ appliedEventIds: Readonly<Record<string, true>>;
11
+ eventCounts: Readonly<Record<AclEventKind, number>>;
12
+ superAdminCapId: string | null;
13
+ admins: Readonly<Record<string, readonly string[]>>;
14
+ pendingSuperAdmin: PendingSuperAdmin | null;
15
+ };
16
+ export declare function createAclProjection(): AclProjection;
17
+ /** Applies one event once; replaying an applied event returns `state` unchanged. */
18
+ export declare function reduceAclEvent(state: AclProjection, event: DecodedAclEvent): AclProjection;
19
+ //# sourceMappingURL=reducer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../src/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;IAChD,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;IACpD,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAAC;IACpD,iBAAiB,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAC7C,CAAC;AAEF,wBAAgB,mBAAmB,IAAI,aAAa,CAUnD;AAED,oFAAoF;AACpF,wBAAgB,cAAc,CAC5B,KAAK,EAAE,aAAa,EACpB,KAAK,EAAE,eAAe,GACrB,aAAa,CAkDf"}
@@ -0,0 +1,67 @@
1
+ import { aclEventBcs, aclEventId } from "./events.js";
2
+ export function createAclProjection() {
3
+ return {
4
+ appliedEventIds: {},
5
+ eventCounts: Object.fromEntries(Object.keys(aclEventBcs).map((kind) => [kind, 0])),
6
+ superAdminCapId: null,
7
+ admins: {},
8
+ pendingSuperAdmin: null,
9
+ };
10
+ }
11
+ /** Applies one event once; replaying an applied event returns `state` unchanged. */
12
+ export function reduceAclEvent(state, event) {
13
+ const eventId = aclEventId(event);
14
+ if (state.appliedEventIds[eventId])
15
+ return state;
16
+ const next = {
17
+ ...state,
18
+ appliedEventIds: { ...state.appliedEventIds, [eventId]: true },
19
+ eventCounts: {
20
+ ...state.eventCounts,
21
+ [event.kind]: state.eventCounts[event.kind] + 1,
22
+ },
23
+ };
24
+ switch (event.kind) {
25
+ case "AdminGranted":
26
+ return withRoles(next, event.payload.admin_cap_id, []);
27
+ case "AdminRevoked":
28
+ case "AdminDestroyed":
29
+ return withRoles(next, event.payload.admin_cap_id, null);
30
+ case "AdminRoleGranted": {
31
+ const { admin_cap_id, role } = event.payload;
32
+ const roles = next.admins[admin_cap_id] ?? [];
33
+ return withRoles(next, admin_cap_id, [...roles, role]);
34
+ }
35
+ case "AdminRoleRevoked": {
36
+ const { admin_cap_id, role } = event.payload;
37
+ const roles = next.admins[admin_cap_id] ?? [];
38
+ return withRoles(next, admin_cap_id, roles.filter((held) => held !== role));
39
+ }
40
+ case "SuperAdminTransferStarted":
41
+ return {
42
+ ...next,
43
+ pendingSuperAdmin: {
44
+ recipient: event.payload.recipient,
45
+ executeAfterMs: event.payload.execute_after_ms,
46
+ },
47
+ };
48
+ case "SuperAdminTransferCancelled":
49
+ return { ...next, pendingSuperAdmin: null };
50
+ case "SuperAdminTransferred":
51
+ return {
52
+ ...next,
53
+ superAdminCapId: event.payload.new_super_admin_cap_id,
54
+ pendingSuperAdmin: null,
55
+ };
56
+ case "SuperAdminCapDestroyed":
57
+ return next;
58
+ }
59
+ }
60
+ function withRoles(state, adminCapId, roles) {
61
+ const { [adminCapId]: _, ...admins } = state.admins;
62
+ return {
63
+ ...state,
64
+ admins: roles === null ? admins : { ...admins, [adminCapId]: roles },
65
+ };
66
+ }
67
+ //# sourceMappingURL=reducer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reducer.js","sourceRoot":"","sources":["../src/reducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAiBtD,MAAM,UAAU,mBAAmB;IACjC,OAAO;QACL,eAAe,EAAE,EAAE;QACnB,WAAW,EAAE,MAAM,CAAC,WAAW,CAC7B,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAClB;QACjC,eAAe,EAAE,IAAI;QACrB,MAAM,EAAE,EAAE;QACV,iBAAiB,EAAE,IAAI;KACxB,CAAC;AACJ,CAAC;AAED,oFAAoF;AACpF,MAAM,UAAU,cAAc,CAC5B,KAAoB,EACpB,KAAsB;IAEtB,MAAM,OAAO,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;IAClC,IAAI,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC;QAAE,OAAO,KAAK,CAAC;IACjD,MAAM,IAAI,GAAkB;QAC1B,GAAG,KAAK;QACR,eAAe,EAAE,EAAE,GAAG,KAAK,CAAC,eAAe,EAAE,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE;QAC9D,WAAW,EAAE;YACX,GAAG,KAAK,CAAC,WAAW;YACpB,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;SAChD;KACF,CAAC;IACF,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;QACnB,KAAK,cAAc;YACjB,OAAO,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;Q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AChB,CAAC;AACH,CAAC;AAED,SAAS,SAAS,CAChB,KAAoB,EACpB,UAAkB,EAClB,KAA+B;IAE/B,MAAM,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;IACpD,OAAO;QACL,GAAG,KAAK;QACR,MAAM,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE;KACrE,CAAC;AACJ,CAAC"}
@@ -0,0 +1,42 @@
1
+ import type { SharedObjectIdentity } from "@interest-protocol/blast-core/sui";
2
+ import type { ClientWithCoreApi } from "@mysten/sui/client";
3
+ /** BCS layout of `blast_admin::blast_acl::ACL`. */
4
+ export declare const aclBcs: import("@mysten/sui/bcs").BcsStruct<{
5
+ id: import("@mysten/sui/bcs").BcsStruct<{
6
+ id: import("@mysten/sui/bcs").BcsStruct<{
7
+ bytes: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
8
+ }, string>;
9
+ }, string>;
10
+ super_admin_cap_id: import("@mysten/sui/bcs").BcsType<string, string, string>;
11
+ admins: import("@mysten/sui/bcs").BcsType<{
12
+ key: string;
13
+ value: string[];
14
+ }[], Iterable<{
15
+ key: string;
16
+ value: Iterable<string> & {
17
+ length: number;
18
+ };
19
+ }> & {
20
+ length: number;
21
+ }, string>;
22
+ pending_super_admin: import("@mysten/sui/bcs").BcsType<import("@interest-protocol/blast-core/timelock").Timelocked<string | null | undefined>, import("@interest-protocol/blast-core/timelock").Timelocked<string | null | undefined>, string>;
23
+ }, string>;
24
+ /** A nominated super admin, who may accept from `executeAfterMs`. */
25
+ export type PendingSuperAdmin = {
26
+ recipient: string;
27
+ executeAfterMs: bigint;
28
+ };
29
+ export type AclState = SharedObjectIdentity & {
30
+ /** The one live `SuperAdminCap`. */
31
+ superAdminCapId: string;
32
+ /** Every live `AdminCap` and the role types it holds. */
33
+ admins: Readonly<Record<string, readonly string[]>>;
34
+ pendingSuperAdmin: PendingSuperAdmin | null;
35
+ };
36
+ export type AclObject = SharedObjectIdentity & {
37
+ type: string;
38
+ content: Uint8Array;
39
+ };
40
+ export declare function decodeAclObject(object: AclObject, adminPackageId: string): AclState;
41
+ export declare function getAcl(client: ClientWithCoreApi, objectId: string, adminPackageId: string): Promise<AclState>;
42
+ //# sourceMappingURL=state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAG9E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAG5D,mDAAmD;AACnD,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;UAUjB,CAAC;AAEH,qEAAqE;AACrE,MAAM,MAAM,iBAAiB,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9E,MAAM,MAAM,QAAQ,GAAG,oBAAoB,GAAG;IAC5C,oCAAoC;IACpC,eAAe,EAAE,MAAM,CAAC;IACxB,yDAAyD;IACzD,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAAC;IACpD,iBAAiB,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,oBAAoB,GAAG;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,UAAU,CAAC;CACrB,CAAC;AAEF,wBAAgB,eAAe,CAC7B,MAAM,EAAE,SAAS,EACjB,cAAc,EAAE,MAAM,GACrB,QAAQ,CAiCV;AAED,wBAAsB,MAAM,CAC1B,MAAM,EAAE,iBAAiB,EACzB,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,QAAQ,CAAC,CAiBnB"}
package/dist/state.js ADDED
@@ -0,0 +1,57 @@
1
+ import { addressBcs, moveTypeNameBcs, suiObjectIdBcs, suiUidBcs, } from "@interest-protocol/blast-core/bcs";
2
+ import { normalizePositiveU64 } from "@interest-protocol/blast-core/integers";
3
+ import { timelockedBcs } from "@interest-protocol/blast-core/timelock";
4
+ import { bcs } from "@mysten/sui/bcs";
5
+ import { normalizeSuiObjectId, parseStructTag } from "@mysten/sui/utils";
6
+ /** BCS layout of `blast_admin::blast_acl::ACL`. */
7
+ export const aclBcs = bcs.struct("ACL", {
8
+ id: suiUidBcs,
9
+ super_admin_cap_id: suiObjectIdBcs,
10
+ admins: bcs.vector(bcs.struct("Entry", {
11
+ key: suiObjectIdBcs,
12
+ value: bcs.vector(moveTypeNameBcs),
13
+ })),
14
+ pending_super_admin: timelockedBcs(bcs.option(addressBcs)),
15
+ });
16
+ export function decodeAclObject(object, adminPackageId) {
17
+ const tag = parseStructTag(object.type);
18
+ if (tag.address !== normalizeSuiObjectId(adminPackageId) ||
19
+ tag.module !== "blast_acl" ||
20
+ tag.name !== "ACL") {
21
+ throw new TypeError(`object ${object.objectId} is not the Blast ACL`);
22
+ }
23
+ const parsed = aclBcs.parse(object.content);
24
+ const objectId = normalizeSuiObjectId(object.objectId);
25
+ if (normalizeSuiObjectId(parsed.id.id.bytes) !== objectId) {
26
+ throw new TypeError(`ACL ${object.objectId} has a mismatched UID`);
27
+ }
28
+ const nominee = parsed.pending_super_admin.after;
29
+ return {
30
+ objectId,
31
+ initialSharedVersion: normalizePositiveU64("initialSharedVersion", object.initialSharedVersion),
32
+ superAdminCapId: parsed.super_admin_cap_id,
33
+ admins: Object.fromEntries(parsed.admins.map(({ key, value }) => [key, value])),
34
+ pendingSuperAdmin: nominee == null
35
+ ? null
36
+ : {
37
+ recipient: nominee,
38
+ executeAfterMs: parsed.pending_super_admin.atMs,
39
+ },
40
+ };
41
+ }
42
+ export async function getAcl(client, objectId, adminPackageId) {
43
+ const { object } = await client.core.getObject({
44
+ objectId,
45
+ include: { content: true },
46
+ });
47
+ if (object.owner.$kind !== "Shared") {
48
+ throw new TypeError(`ACL ${object.objectId} is not a shared object`);
49
+ }
50
+ return decodeAclObject({
51
+ objectId: object.objectId,
52
+ initialSharedVersion: object.owner.Shared.initialSharedVersion,
53
+ type: object.type,
54
+ content: object.content,
55
+ }, adminPackageId);
56
+ }
57
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,eAAe,EACf,cAAc,EACd,SAAS,GACV,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAE9E,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEzE,mDAAmD;AACnD,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE;IACtC,EAAE,EAAE,SAAS;IACb,kBAAkB,EAAE,cAAc;IAClC,MAAM,EAAE,GAAG,CAAC,MAAM,CAChB,GAAG,CAAC,MAAM,CAAC,OAAO,EAAE;QAClB,GAAG,EAAE,cAAc;QACnB,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,eAAe,CAAC;KACnC,CAAC,CACH;IACD,mBAAmB,EAAE,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;CAC3D,CAAC,CAAC;AAkBH,MAAM,UAAU,eAAe,CAC7B,MAAiB,EACjB,cAAsB;IAEtB,MAAM,GAAG,GAAG,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;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,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;QAC7C,QAAQ;QACR,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC3B,CAAC,CAAC;IACH,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;QACpC,MAAM,IAAI,SAAS,CAAC,OAAO,MAAM,CAAC,QAAQ,yBAAyB,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,eAAe,CACpB;QACE,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,oBAAoB,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,oBAAoB;QAC9D,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,OAAO,EAAE,MAAM,CAAC,OAAO;KACxB,EACD,cAAc,CACf,CAAC;AACJ,CAAC"}
@@ -0,0 +1,105 @@
1
+ import type { SharedObjectIdentity } from "@interest-protocol/blast-core/sui";
2
+ import type { TransactionObjectArgument, TransactionObjectInput } from "@mysten/sui/transactions";
3
+ import { Transaction } from "@mysten/sui/transactions";
4
+ /** The immutable `blast_admin` package and its shared singleton `blast_acl::ACL`. */
5
+ export type AdminDeployment = {
6
+ packageId: string;
7
+ acl: SharedObjectIdentity;
8
+ };
9
+ export declare function normalizeAdminDeployment(deployment: AdminDeployment): AdminDeployment;
10
+ /**
11
+ * `blast_admin::blast_acl` calls. A role is a Move type its consumer package
12
+ * declares (for example `<launchpad>::blast_fun_domain::FeeAdmin`); each
13
+ * product's `roleType` names its own.
14
+ */
15
+ export declare class AdminCalls {
16
+ #private;
17
+ readonly deployment: AdminDeployment;
18
+ constructor(deployment: AdminDeployment);
19
+ /** `sign_in<Role>`: this PTB's `AdminWitness<Role>`; the `AdminCap` must hold `role`. */
20
+ signIn(options: {
21
+ adminCap: TransactionObjectInput;
22
+ role: string;
23
+ }): (tx: Transaction) => TransactionObjectArgument;
24
+ /** `grant_admin`: delivers a new `AdminCap` with no role to `recipient`. */
25
+ grantAdmin(options: {
26
+ superAdminCap: TransactionObjectInput;
27
+ recipient: string;
28
+ }): (tx: Transaction) => void;
29
+ /** `revoke_admin`: retires a live `AdminCap` and every role it holds. */
30
+ revokeAdmin(options: {
31
+ superAdminCap: TransactionObjectInput;
32
+ adminCapId: string;
33
+ }): (tx: Transaction) => void;
34
+ /** `grant_role<Role>` to a live administrator. */
35
+ grantRole(options: {
36
+ superAdminCap: TransactionObjectInput;
37
+ adminCapId: string;
38
+ role: string;
39
+ }): (tx: Transaction) => void;
40
+ /** `revoke_role<Role>` from a live administrator. */
41
+ revokeRole(options: {
42
+ superAdminCap: TransactionObjectInput;
43
+ adminCapId: string;
44
+ role: string;
45
+ }): (tx: Transaction) => void;
46
+ /** `destroy_admin_cap`: deletes the holder's own live or revoked cap. */
47
+ destroyAdminCap(options: {
48
+ adminCap: TransactionObjectInput;
49
+ }): (tx: Transaction) => void;
50
+ /**
51
+ * `begin_super_admin_transfer`: nominates `recipient`, who may accept once
52
+ * the ACL's seven-day delay passes; it replaces a pending nomination.
53
+ */
54
+ beginSuperAdminTransfer(options: {
55
+ superAdminCap: TransactionObjectInput;
56
+ recipient: string;
57
+ }): (tx: Transaction) => void;
58
+ cancelSuperAdminTransfer(options: {
59
+ superAdminCap: TransactionObjectInput;
60
+ }): (tx: Transaction) => void;
61
+ /** `accept_super_admin_transfer`: the sender must be the ready nominee. */
62
+ acceptSuperAdminTransfer(): (tx: Transaction) => void;
63
+ /** `destroy_retired_super_admin_cap`: deletes a root an accepted transfer replaced. */
64
+ destroyRetiredSuperAdminCap(options: {
65
+ superAdminCap: TransactionObjectInput;
66
+ }): (tx: Transaction) => void;
67
+ }
68
+ /** One-call PTBs for the ACL's root and administrators. */
69
+ export declare class AdminTransactions {
70
+ readonly call: AdminCalls;
71
+ constructor(deployment: AdminDeployment);
72
+ grantAdmin(options: {
73
+ superAdminCapId: string;
74
+ recipient: string;
75
+ }): Transaction;
76
+ revokeAdmin(options: {
77
+ superAdminCapId: string;
78
+ adminCapId: string;
79
+ }): Transaction;
80
+ grantRole(options: {
81
+ superAdminCapId: string;
82
+ adminCapId: string;
83
+ role: string;
84
+ }): Transaction;
85
+ revokeRole(options: {
86
+ superAdminCapId: string;
87
+ adminCapId: string;
88
+ role: string;
89
+ }): Transaction;
90
+ destroyAdminCap(options: {
91
+ adminCapId: string;
92
+ }): Transaction;
93
+ beginSuperAdminTransfer(options: {
94
+ superAdminCapId: string;
95
+ recipient: string;
96
+ }): Transaction;
97
+ cancelSuperAdminTransfer(options: {
98
+ superAdminCapId: string;
99
+ }): Transaction;
100
+ acceptSuperAdminTransfer(): Transaction;
101
+ destroyRetiredSuperAdminCap(options: {
102
+ superAdminCapId: string;
103
+ }): Transaction;
104
+ }
105
+ //# sourceMappingURL=transactions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../src/transactions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAE9E,OAAO,KAAK,EACV,yBAAyB,EACzB,sBAAsB,EACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAOvD,qFAAqF;AACrF,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,oBAAoB,CAAC;CAC3B,CAAC;AAEF,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,eAAe,GAC1B,eAAe,CAKjB;AAED;;;;GAIG;AACH,qBAAa,UAAU;;IACrB,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAC;IAErC,YAAY,UAAU,EAAE,eAAe,EAEtC;IAED,yFAAyF;IACzF,MAAM,CAAC,OAAO,EAAE;QAAE,QAAQ,EAAE,sBAAsB,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,QAEpD,WAAW,KAAG,yBAAyB,CAMpD;IAED,4EAA4E;IAC5E,UAAU,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