@t2000/id 5.29.0 → 5.30.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/dist/index.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
  var transactions = require('@mysten/sui/transactions');
4
4
 
5
5
  // src/index.ts
6
- var AGENT_ID_PACKAGE_ID = process.env.AGENT_ID_PACKAGE_ID ?? "0x7669be207f9ac28a34d2cbd45dcfdade11e6fd503ad24e687c180931be9a45e9";
6
+ var AGENT_ID_PACKAGE_ID = process.env.AGENT_ID_PACKAGE_ID ?? "0x78d365066fb0e6468a9dcb49595e559434a53d7a12d845f776bcda76b4d15451";
7
7
  var AGENT_ID_REGISTRY_ID = process.env.AGENT_ID_REGISTRY_ID ?? "0xf41683aa9f4c121f34e4082c35180b0efdbd6d5293e3c88b1bcfa45ddf5c4119";
8
8
  var CLOCK_ID = "0x6";
9
9
  var MODULE = "registry";
@@ -57,6 +57,18 @@ function buildConfirmOwnershipTx(agent) {
57
57
  });
58
58
  return tx;
59
59
  }
60
+ function buildRenounceOwnershipTx(agent) {
61
+ const tx = new transactions.Transaction();
62
+ tx.moveCall({
63
+ target: `${AGENT_ID_PACKAGE_ID}::${MODULE}::renounce_ownership`,
64
+ arguments: [
65
+ tx.object(AGENT_ID_REGISTRY_ID),
66
+ tx.pure.address(agent),
67
+ tx.object(CLOCK_ID)
68
+ ]
69
+ });
70
+ return tx;
71
+ }
60
72
  function buildSetActiveTx(agent, active) {
61
73
  const tx = new transactions.Transaction();
62
74
  tx.moveCall({
@@ -75,6 +87,7 @@ exports.AGENT_ID_PACKAGE_ID = AGENT_ID_PACKAGE_ID;
75
87
  exports.AGENT_ID_REGISTRY_ID = AGENT_ID_REGISTRY_ID;
76
88
  exports.buildConfirmOwnershipTx = buildConfirmOwnershipTx;
77
89
  exports.buildRegisterTx = buildRegisterTx;
90
+ exports.buildRenounceOwnershipTx = buildRenounceOwnershipTx;
78
91
  exports.buildSetActiveTx = buildSetActiveTx;
79
92
  exports.buildSetPendingOwnerTx = buildSetPendingOwnerTx;
80
93
  exports.buildUpdateTx = buildUpdateTx;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":["Transaction"],"mappings":";;;;;AAaO,IAAM,mBAAA,GACX,OAAA,CAAQ,GAAA,CAAI,mBAAA,IACZ;AAGK,IAAM,oBAAA,GACX,OAAA,CAAQ,GAAA,CAAI,oBAAA,IACZ;AAEF,IAAM,QAAA,GAAW,KAAA;AACjB,IAAM,MAAA,GAAS,UAAA;AAWf,SAAS,gBAAA,CAAiB,IAAiB,GAAA,EAAwB;AACjE,EAAA,OAAO;AAAA,IACL,EAAA,CAAG,OAAO,oBAAoB,CAAA;AAAA,IAC9B,GAAG,IAAA,CAAK,MAAA,CAAO,QAAA,EAAU,GAAA,CAAI,eAAe,IAAI,CAAA;AAAA,IAChD,GAAG,IAAA,CAAK,MAAA,CAAO,UAAU,GAAA,CAAI,cAAA,IAAkB,EAAE,CAAA;AAAA,IACjD,GAAG,IAAA,CAAK,MAAA,CAAO,QAAA,EAAU,GAAA,CAAI,OAAO,IAAI,CAAA;AAAA,IACxC,GAAG,IAAA,CAAK,MAAA,CAAO,QAAA,EAAU,GAAA,CAAI,eAAe,IAAI,CAAA;AAAA,IAChD,EAAA,CAAG,OAAO,QAAQ;AAAA,GACpB;AACF;AAGO,SAAS,eAAA,CAAgB,GAAA,GAAyB,EAAC,EAAgB;AACxE,EAAA,MAAM,EAAA,GAAK,IAAIA,wBAAA,EAAY;AAC3B,EAAA,EAAA,CAAG,QAAA,CAAS;AAAA,IACV,MAAA,EAAQ,CAAA,EAAG,mBAAmB,CAAA,EAAA,EAAK,MAAM,CAAA,UAAA,CAAA;AAAA,IACzC,SAAA,EAAW,gBAAA,CAAiB,EAAA,EAAI,GAAG;AAAA,GACpC,CAAA;AACD,EAAA,OAAO,EAAA;AACT;AAGO,SAAS,aAAA,CAAc,GAAA,GAAyB,EAAC,EAAgB;AACtE,EAAA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AAA,CAAG,QAAA,CAAS;AAAA,IACV,MAAA,EAAQ,CAAA,EAAG,mBAAmB,CAAA,EAAA,EAAK,MAAM,CAAA,YAAA,CAAA;AAAA,IACzC,SAAA,EAAW;AAAA,MACT,EAAA,CAAG,OAAO,oBAAoB,CAAA;AAAA,MAC9B,EAAA,CAAG,IAAA,CAAK,OAAA,CAAQ,KAAK,CAAA;AAAA,MACrB,EAAA,CAAG,IAAA,CAAK,IAAA,CAAK,MAAM,CAAA;AAAA,MACnB,EAAA,CAAG,OAAO,QAAQ;AAAA;AACpB,GACD,CAAA;AACD,EAAA,OAAO,EAAA;AACT","file":"index.cjs","sourcesContent":["import { Transaction } from '@mysten/sui/transactions';\n\n/**\n * @t2000/id — client for the `agent_id::registry` Move package (Agent ID\n * Phase B). These builders construct UNSIGNED transactions calling the on-chain\n * registry; the caller signs (the agent's keypair for register/update/active;\n * the proposed owner for confirm) and may sponsor gas (the agent is the sender,\n * so `sender == agent` auth holds; a SUI-funded t2000 account co-signs gas).\n *\n * Deployed on Sui mainnet 2026-06-29. Override via env for testnet/dev.\n */\n\n/** The published `agent_id` package id. */\nexport const AGENT_ID_PACKAGE_ID =\n process.env.AGENT_ID_PACKAGE_ID ??\n '0x7669be207f9ac28a34d2cbd45dcfdade11e6fd503ad24e687c180931be9a45e9';\n\n/** The shared `Registry` object id. */\nexport const AGENT_ID_REGISTRY_ID =\n process.env.AGENT_ID_REGISTRY_ID ??\n '0xf41683aa9f4c121f34e4082c35180b0efdbd6d5293e3c88b1bcfa45ddf5c4119';\n\nconst CLOCK_ID = '0x6';\nconst MODULE = 'registry';\n\n/** The mutable registration payload. `update` is full-replace — supply the\n * complete desired state (omitted fields clear on-chain). */\nexport interface AgentRegistration {\n mcpEndpoint?: string | null;\n paymentMethods?: string[];\n did?: string | null;\n metadataUri?: string | null;\n}\n\nfunction registrationArgs(tx: Transaction, reg: AgentRegistration) {\n return [\n tx.object(AGENT_ID_REGISTRY_ID),\n tx.pure.option('string', reg.mcpEndpoint ?? null),\n tx.pure.vector('string', reg.paymentMethods ?? []),\n tx.pure.option('string', reg.did ?? null),\n tx.pure.option('string', reg.metadataUri ?? null),\n tx.object(CLOCK_ID),\n ];\n}\n\n/** Register the SIGNER as an agent (self-sovereign: `sender == agent`). */\nexport function buildRegisterTx(reg: AgentRegistration = {}): Transaction {\n const tx = new Transaction();\n tx.moveCall({\n target: `${AGENT_ID_PACKAGE_ID}::${MODULE}::register`,\n arguments: registrationArgs(tx, reg),\n });\n return tx;\n}\n\n/** Update the signer's record (full-replace). */\nexport function buildUpdateTx(reg: AgentRegistration = {}): Transaction {\n const tx = new Transaction();\n tx.moveCall({\n target: `${AGENT_ID_PACKAGE_ID}::${MODULE}::update`,\n arguments: registrationArgs(tx, reg),\n });\n return tx;\n}\n\n/** The agent (signer) proposes an owner; nothing binds until the owner confirms. */\nexport function buildSetPendingOwnerTx(owner: string): Transaction {\n const tx = new Transaction();\n tx.moveCall({\n target: `${AGENT_ID_PACKAGE_ID}::${MODULE}::set_pending_owner`,\n arguments: [\n tx.object(AGENT_ID_REGISTRY_ID),\n tx.pure.address(owner),\n tx.object(CLOCK_ID),\n ],\n });\n return tx;\n}\n\n/** The proposed owner (signer) confirms ownership of `agent`. */\nexport function buildConfirmOwnershipTx(agent: string): Transaction {\n const tx = new Transaction();\n tx.moveCall({\n target: `${AGENT_ID_PACKAGE_ID}::${MODULE}::confirm_ownership`,\n arguments: [\n tx.object(AGENT_ID_REGISTRY_ID),\n tx.pure.address(agent),\n tx.object(CLOCK_ID),\n ],\n });\n return tx;\n}\n\n/** Toggle an agent's active flag (signer must be the agent or its owner). */\nexport function buildSetActiveTx(agent: string, active: boolean): Transaction {\n const tx = new Transaction();\n tx.moveCall({\n target: `${AGENT_ID_PACKAGE_ID}::${MODULE}::set_active`,\n arguments: [\n tx.object(AGENT_ID_REGISTRY_ID),\n tx.pure.address(agent),\n tx.pure.bool(active),\n tx.object(CLOCK_ID),\n ],\n });\n return tx;\n}\n"]}
1
+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ACzC,SAAA,EAAW;AAAA,MACT,EAAA,CAAG,OAAO,oBAAoB,CAAA;AAAA,MAC9B,EAAA,CAAG,IAAA,CAAK,OAAA,CAAQ,KAAK,CAAA;AAAA,MACrB,EAAA,CAAG,OAAO,QAAQ;AAAA;AACpB,GACD,CAAA;AACD,EAAA,OAAO,EAAA;AACT;AAGO,SAAS,gBAAA,CAAiB,OAAe,MAAA,EAA8B;AAC5E,EAAA,MAAM,EAAA,GAAK,IAAIA,wBAAA,EAAY;AAC3B,EAAA,EAAA,CAAG,QAAA,CAAS;AAAA,IACV,MAAA,EAAQ,CAAA,EAAG,mBAAmB,CAAA,EAAA,EAAK,MAAM,CAAA,YAAA,CAAA;AAAA,IACzC,SAAA,EAAW;AAAA,MACT,EAAA,CAAG,OAAO,oBAAoB,CAAA;AAAA,MAC9B,EAAA,CAAG,IAAA,CAAK,OAAA,CAAQ,KAAK,CAAA;AAAA,MACrB,EAAA,CAAG,IAAA,CAAK,IAAA,CAAK,MAAM,CAAA;AAAA,MACnB,EAAA,CAAG,OAAO,QAAQ;AAAA;AACpB,GACD,CAAA;AACD,EAAA,OAAO,EAAA;AACT","file":"index.cjs","sourcesContent":["import { Transaction } from '@mysten/sui/transactions';\n\n/**\n * @t2000/id — client for the `agent_id::registry` Move package (Agent ID\n * Phase B). These builders construct UNSIGNED transactions calling the on-chain\n * registry; the caller signs (the agent's keypair for register/update/active;\n * the proposed owner for confirm) and may sponsor gas (the agent is the sender,\n * so `sender == agent` auth holds; a SUI-funded t2000 account co-signs gas).\n *\n * Deployed on Sui mainnet 2026-06-29. Override via env for testnet/dev.\n */\n\n/** The published `agent_id` package id — the LATEST version (v2, the\n * 2026-07-09 additive upgrade that added `renounce_ownership`; the shared\n * Registry object is unchanged). The original v1 package\n * (`0x7669be20…be9a45e9`) remains callable for its own functions. */\nexport const AGENT_ID_PACKAGE_ID =\n process.env.AGENT_ID_PACKAGE_ID ??\n '0x78d365066fb0e6468a9dcb49595e559434a53d7a12d845f776bcda76b4d15451';\n\n/** The shared `Registry` object id. */\nexport const AGENT_ID_REGISTRY_ID =\n process.env.AGENT_ID_REGISTRY_ID ??\n '0xf41683aa9f4c121f34e4082c35180b0efdbd6d5293e3c88b1bcfa45ddf5c4119';\n\nconst CLOCK_ID = '0x6';\nconst MODULE = 'registry';\n\n/** The mutable registration payload. `update` is full-replace — supply the\n * complete desired state (omitted fields clear on-chain). */\nexport interface AgentRegistration {\n mcpEndpoint?: string | null;\n paymentMethods?: string[];\n did?: string | null;\n metadataUri?: string | null;\n}\n\nfunction registrationArgs(tx: Transaction, reg: AgentRegistration) {\n return [\n tx.object(AGENT_ID_REGISTRY_ID),\n tx.pure.option('string', reg.mcpEndpoint ?? null),\n tx.pure.vector('string', reg.paymentMethods ?? []),\n tx.pure.option('string', reg.did ?? null),\n tx.pure.option('string', reg.metadataUri ?? null),\n tx.object(CLOCK_ID),\n ];\n}\n\n/** Register the SIGNER as an agent (self-sovereign: `sender == agent`). */\nexport function buildRegisterTx(reg: AgentRegistration = {}): Transaction {\n const tx = new Transaction();\n tx.moveCall({\n target: `${AGENT_ID_PACKAGE_ID}::${MODULE}::register`,\n arguments: registrationArgs(tx, reg),\n });\n return tx;\n}\n\n/** Update the signer's record (full-replace). */\nexport function buildUpdateTx(reg: AgentRegistration = {}): Transaction {\n const tx = new Transaction();\n tx.moveCall({\n target: `${AGENT_ID_PACKAGE_ID}::${MODULE}::update`,\n arguments: registrationArgs(tx, reg),\n });\n return tx;\n}\n\n/** The agent (signer) proposes an owner; nothing binds until the owner confirms. */\nexport function buildSetPendingOwnerTx(owner: string): Transaction {\n const tx = new Transaction();\n tx.moveCall({\n target: `${AGENT_ID_PACKAGE_ID}::${MODULE}::set_pending_owner`,\n arguments: [\n tx.object(AGENT_ID_REGISTRY_ID),\n tx.pure.address(owner),\n tx.object(CLOCK_ID),\n ],\n });\n return tx;\n}\n\n/** The proposed owner (signer) confirms ownership of `agent`. */\nexport function buildConfirmOwnershipTx(agent: string): Transaction {\n const tx = new Transaction();\n tx.moveCall({\n target: `${AGENT_ID_PACKAGE_ID}::${MODULE}::confirm_ownership`,\n arguments: [\n tx.object(AGENT_ID_REGISTRY_ID),\n tx.pure.address(agent),\n tx.object(CLOCK_ID),\n ],\n });\n return tx;\n}\n\n/** The confirmed owner (signer) renounces ownership of `agent` — the record\n * returns to autonomous (`owner = none`). Re-linking is the normal two-sided\n * flow (the agent proposes, the owner confirms). Requires package v2+. */\nexport function buildRenounceOwnershipTx(agent: string): Transaction {\n const tx = new Transaction();\n tx.moveCall({\n target: `${AGENT_ID_PACKAGE_ID}::${MODULE}::renounce_ownership`,\n arguments: [\n tx.object(AGENT_ID_REGISTRY_ID),\n tx.pure.address(agent),\n tx.object(CLOCK_ID),\n ],\n });\n return tx;\n}\n\n/** Toggle an agent's active flag (signer must be the agent or its owner). */\nexport function buildSetActiveTx(agent: string, active: boolean): Transaction {\n const tx = new Transaction();\n tx.moveCall({\n target: `${AGENT_ID_PACKAGE_ID}::${MODULE}::set_active`,\n arguments: [\n tx.object(AGENT_ID_REGISTRY_ID),\n tx.pure.address(agent),\n tx.pure.bool(active),\n tx.object(CLOCK_ID),\n ],\n });\n return tx;\n}\n"]}
package/dist/index.d.cts CHANGED
@@ -9,7 +9,10 @@ import { Transaction } from '@mysten/sui/transactions';
9
9
  *
10
10
  * Deployed on Sui mainnet 2026-06-29. Override via env for testnet/dev.
11
11
  */
12
- /** The published `agent_id` package id. */
12
+ /** The published `agent_id` package id — the LATEST version (v2, the
13
+ * 2026-07-09 additive upgrade that added `renounce_ownership`; the shared
14
+ * Registry object is unchanged). The original v1 package
15
+ * (`0x7669be20…be9a45e9`) remains callable for its own functions. */
13
16
  declare const AGENT_ID_PACKAGE_ID: string;
14
17
  /** The shared `Registry` object id. */
15
18
  declare const AGENT_ID_REGISTRY_ID: string;
@@ -29,7 +32,11 @@ declare function buildUpdateTx(reg?: AgentRegistration): Transaction;
29
32
  declare function buildSetPendingOwnerTx(owner: string): Transaction;
30
33
  /** The proposed owner (signer) confirms ownership of `agent`. */
31
34
  declare function buildConfirmOwnershipTx(agent: string): Transaction;
35
+ /** The confirmed owner (signer) renounces ownership of `agent` — the record
36
+ * returns to autonomous (`owner = none`). Re-linking is the normal two-sided
37
+ * flow (the agent proposes, the owner confirms). Requires package v2+. */
38
+ declare function buildRenounceOwnershipTx(agent: string): Transaction;
32
39
  /** Toggle an agent's active flag (signer must be the agent or its owner). */
33
40
  declare function buildSetActiveTx(agent: string, active: boolean): Transaction;
34
41
 
35
- export { AGENT_ID_PACKAGE_ID, AGENT_ID_REGISTRY_ID, type AgentRegistration, buildConfirmOwnershipTx, buildRegisterTx, buildSetActiveTx, buildSetPendingOwnerTx, buildUpdateTx };
42
+ export { AGENT_ID_PACKAGE_ID, AGENT_ID_REGISTRY_ID, type AgentRegistration, buildConfirmOwnershipTx, buildRegisterTx, buildRenounceOwnershipTx, buildSetActiveTx, buildSetPendingOwnerTx, buildUpdateTx };
package/dist/index.d.ts CHANGED
@@ -9,7 +9,10 @@ import { Transaction } from '@mysten/sui/transactions';
9
9
  *
10
10
  * Deployed on Sui mainnet 2026-06-29. Override via env for testnet/dev.
11
11
  */
12
- /** The published `agent_id` package id. */
12
+ /** The published `agent_id` package id — the LATEST version (v2, the
13
+ * 2026-07-09 additive upgrade that added `renounce_ownership`; the shared
14
+ * Registry object is unchanged). The original v1 package
15
+ * (`0x7669be20…be9a45e9`) remains callable for its own functions. */
13
16
  declare const AGENT_ID_PACKAGE_ID: string;
14
17
  /** The shared `Registry` object id. */
15
18
  declare const AGENT_ID_REGISTRY_ID: string;
@@ -29,7 +32,11 @@ declare function buildUpdateTx(reg?: AgentRegistration): Transaction;
29
32
  declare function buildSetPendingOwnerTx(owner: string): Transaction;
30
33
  /** The proposed owner (signer) confirms ownership of `agent`. */
31
34
  declare function buildConfirmOwnershipTx(agent: string): Transaction;
35
+ /** The confirmed owner (signer) renounces ownership of `agent` — the record
36
+ * returns to autonomous (`owner = none`). Re-linking is the normal two-sided
37
+ * flow (the agent proposes, the owner confirms). Requires package v2+. */
38
+ declare function buildRenounceOwnershipTx(agent: string): Transaction;
32
39
  /** Toggle an agent's active flag (signer must be the agent or its owner). */
33
40
  declare function buildSetActiveTx(agent: string, active: boolean): Transaction;
34
41
 
35
- export { AGENT_ID_PACKAGE_ID, AGENT_ID_REGISTRY_ID, type AgentRegistration, buildConfirmOwnershipTx, buildRegisterTx, buildSetActiveTx, buildSetPendingOwnerTx, buildUpdateTx };
42
+ export { AGENT_ID_PACKAGE_ID, AGENT_ID_REGISTRY_ID, type AgentRegistration, buildConfirmOwnershipTx, buildRegisterTx, buildRenounceOwnershipTx, buildSetActiveTx, buildSetPendingOwnerTx, buildUpdateTx };
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Transaction } from '@mysten/sui/transactions';
2
2
 
3
3
  // src/index.ts
4
- var AGENT_ID_PACKAGE_ID = process.env.AGENT_ID_PACKAGE_ID ?? "0x7669be207f9ac28a34d2cbd45dcfdade11e6fd503ad24e687c180931be9a45e9";
4
+ var AGENT_ID_PACKAGE_ID = process.env.AGENT_ID_PACKAGE_ID ?? "0x78d365066fb0e6468a9dcb49595e559434a53d7a12d845f776bcda76b4d15451";
5
5
  var AGENT_ID_REGISTRY_ID = process.env.AGENT_ID_REGISTRY_ID ?? "0xf41683aa9f4c121f34e4082c35180b0efdbd6d5293e3c88b1bcfa45ddf5c4119";
6
6
  var CLOCK_ID = "0x6";
7
7
  var MODULE = "registry";
@@ -55,6 +55,18 @@ function buildConfirmOwnershipTx(agent) {
55
55
  });
56
56
  return tx;
57
57
  }
58
+ function buildRenounceOwnershipTx(agent) {
59
+ const tx = new Transaction();
60
+ tx.moveCall({
61
+ target: `${AGENT_ID_PACKAGE_ID}::${MODULE}::renounce_ownership`,
62
+ arguments: [
63
+ tx.object(AGENT_ID_REGISTRY_ID),
64
+ tx.pure.address(agent),
65
+ tx.object(CLOCK_ID)
66
+ ]
67
+ });
68
+ return tx;
69
+ }
58
70
  function buildSetActiveTx(agent, active) {
59
71
  const tx = new Transaction();
60
72
  tx.moveCall({
@@ -69,6 +81,6 @@ function buildSetActiveTx(agent, active) {
69
81
  return tx;
70
82
  }
71
83
 
72
- export { AGENT_ID_PACKAGE_ID, AGENT_ID_REGISTRY_ID, buildConfirmOwnershipTx, buildRegisterTx, buildSetActiveTx, buildSetPendingOwnerTx, buildUpdateTx };
84
+ export { AGENT_ID_PACKAGE_ID, AGENT_ID_REGISTRY_ID, buildConfirmOwnershipTx, buildRegisterTx, buildRenounceOwnershipTx, buildSetActiveTx, buildSetPendingOwnerTx, buildUpdateTx };
73
85
  //# sourceMappingURL=index.js.map
74
86
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;AAaO,IAAM,mBAAA,GACX,OAAA,CAAQ,GAAA,CAAI,mBAAA,IACZ;AAGK,IAAM,oBAAA,GACX,OAAA,CAAQ,GAAA,CAAI,oBAAA,IACZ;AAEF,IAAM,QAAA,GAAW,KAAA;AACjB,IAAM,MAAA,GAAS,UAAA;AAWf,SAAS,gBAAA,CAAiB,IAAiB,GAAA,EAAwB;AACjE,EAAA,OAAO;AAAA,IACL,EAAA,CAAG,OAAO,oBAAoB,CAAA;AAAA,IAC9B,GAAG,IAAA,CAAK,MAAA,CAAO,QAAA,EAAU,GAAA,CAAI,eAAe,IAAI,CAAA;AAAA,IAChD,GAAG,IAAA,CAAK,MAAA,CAAO,UAAU,GAAA,CAAI,cAAA,IAAkB,EAAE,CAAA;AAAA,IACjD,GAAG,IAAA,CAAK,MAAA,CAAO,QAAA,EAAU,GAAA,CAAI,OAAO,IAAI,CAAA;AAAA,IACxC,GAAG,IAAA,CAAK,MAAA,CAAO,QAAA,EAAU,GAAA,CAAI,eAAe,IAAI,CAAA;AAAA,IAChD,EAAA,CAAG,OAAO,QAAQ;AAAA,GACpB;AACF;AAGO,SAAS,eAAA,CAAgB,GAAA,GAA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A,mBAAA,CAAA;AAAA,IACzC,SAAA,EAAW;AAAA,MACT,EAAA,CAAG,OAAO,oBAAoB,CAAA;AAAA,MAC9B,EAAA,CAAG,IAAA,CAAK,OAAA,CAAQ,KAAK,CAAA;AAAA,MACrB,EAAA,CAAG,OAAO,QAAQ;AAAA;AACpB,GACD,CAAA;AACD,EAAA,OAAO,EAAA;AACT;AAGO,SAAS,gBAAA,CAAiB,OAAe,MAAA,EAA8B;AAC5E,EAAA,MAAM,EAAA,GAAK,IAAI,WAAA,EAAY;AAC3B,EAAA,EAAA,CAAG,QAAA,CAAS;AAAA,IACV,MAAA,EAAQ,CAAA,EAAG,mBAAmB,CAAA,EAAA,EAAK,MAAM,CAAA,YAAA,CAAA;AAAA,IACzC,SAAA,EAAW;AAAA,MACT,EAAA,CAAG,OAAO,oBAAoB,CAAA;AAAA,MAC9B,EAAA,CAAG,IAAA,CAAK,OAAA,CAAQ,KAAK,CAAA;AAAA,MACrB,EAAA,CAAG,IAAA,CAAK,IAAA,CAAK,MAAM,CAAA;AAAA,MACnB,EAAA,CAAG,OAAO,QAAQ;AAAA;AACpB,GACD,CAAA;AACD,EAAA,OAAO,EAAA;AACT","file":"index.js","sourcesContent":["import { Transaction } from '@mysten/sui/transactions';\n\n/**\n * @t2000/id — client for the `agent_id::registry` Move package (Agent ID\n * Phase B). These builders construct UNSIGNED transactions calling the on-chain\n * registry; the caller signs (the agent's keypair for register/update/active;\n * the proposed owner for confirm) and may sponsor gas (the agent is the sender,\n * so `sender == agent` auth holds; a SUI-funded t2000 account co-signs gas).\n *\n * Deployed on Sui mainnet 2026-06-29. Override via env for testnet/dev.\n */\n\n/** The published `agent_id` package id. */\nexport const AGENT_ID_PACKAGE_ID =\n process.env.AGENT_ID_PACKAGE_ID ??\n '0x7669be207f9ac28a34d2cbd45dcfdade11e6fd503ad24e687c180931be9a45e9';\n\n/** The shared `Registry` object id. */\nexport const AGENT_ID_REGISTRY_ID =\n process.env.AGENT_ID_REGISTRY_ID ??\n '0xf41683aa9f4c121f34e4082c35180b0efdbd6d5293e3c88b1bcfa45ddf5c4119';\n\nconst CLOCK_ID = '0x6';\nconst MODULE = 'registry';\n\n/** The mutable registration payload. `update` is full-replace — supply the\n * complete desired state (omitted fields clear on-chain). */\nexport interface AgentRegistration {\n mcpEndpoint?: string | null;\n paymentMethods?: string[];\n did?: string | null;\n metadataUri?: string | null;\n}\n\nfunction registrationArgs(tx: Transaction, reg: AgentRegistration) {\n return [\n tx.object(AGENT_ID_REGISTRY_ID),\n tx.pure.option('string', reg.mcpEndpoint ?? null),\n tx.pure.vector('string', reg.paymentMethods ?? []),\n tx.pure.option('string', reg.did ?? null),\n tx.pure.option('string', reg.metadataUri ?? null),\n tx.object(CLOCK_ID),\n ];\n}\n\n/** Register the SIGNER as an agent (self-sovereign: `sender == agent`). */\nexport function buildRegisterTx(reg: AgentRegistration = {}): Transaction {\n const tx = new Transaction();\n tx.moveCall({\n target: `${AGENT_ID_PACKAGE_ID}::${MODULE}::register`,\n arguments: registrationArgs(tx, reg),\n });\n return tx;\n}\n\n/** Update the signer's record (full-replace). */\nexport function buildUpdateTx(reg: AgentRegistration = {}): Transaction {\n const tx = new Transaction();\n tx.moveCall({\n target: `${AGENT_ID_PACKAGE_ID}::${MODULE}::update`,\n arguments: registrationArgs(tx, reg),\n });\n return tx;\n}\n\n/** The agent (signer) proposes an owner; nothing binds until the owner confirms. */\nexport function buildSetPendingOwnerTx(owner: string): Transaction {\n const tx = new Transaction();\n tx.moveCall({\n target: `${AGENT_ID_PACKAGE_ID}::${MODULE}::set_pending_owner`,\n arguments: [\n tx.object(AGENT_ID_REGISTRY_ID),\n tx.pure.address(owner),\n tx.object(CLOCK_ID),\n ],\n });\n return tx;\n}\n\n/** The proposed owner (signer) confirms ownership of `agent`. */\nexport function buildConfirmOwnershipTx(agent: string): Transaction {\n const tx = new Transaction();\n tx.moveCall({\n target: `${AGENT_ID_PACKAGE_ID}::${MODULE}::confirm_ownership`,\n arguments: [\n tx.object(AGENT_ID_REGISTRY_ID),\n tx.pure.address(agent),\n tx.object(CLOCK_ID),\n ],\n });\n return tx;\n}\n\n/** Toggle an agent's active flag (signer must be the agent or its owner). */\nexport function buildSetActiveTx(agent: string, active: boolean): Transaction {\n const tx = new Transaction();\n tx.moveCall({\n target: `${AGENT_ID_PACKAGE_ID}::${MODULE}::set_active`,\n arguments: [\n tx.object(AGENT_ID_REGISTRY_ID),\n tx.pure.address(agent),\n tx.pure.bool(active),\n tx.object(CLOCK_ID),\n ],\n });\n return tx;\n}\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;AAgBO,IAAM,mBAAA,GACX,OAAA,CAAQ,GAAA,CAAI,mBAAA,IACZ;AAGK,IAAM,oBAAA,GACX,OAAA,CAAQ,GAAA,CAAI,oBAAA,IACZ;AAEF,IAAM,QAAA,GAAW,KAAA;AACjB,IAAM,MAAA,GAAS,UAAA;AAWf,SAAS,gBAAA,CAAiB,IAAiB,GAAA,EAAwB;AACjE,EAAA,OAAO;AAAA,IACL,EAAA,CAAG,OAAO,oBAAoB,CAAA;AAAA,IAC9B,GAAG,IAAA,CAAK,MAAA,CAAO,QAAA,EAAU,GAAA,CAAI,eAAe,IAAI,CAAA;AAAA,IAChD,GAAG,IAAA,CAAK,MAAA,CAAO,UAAU,GAAA,CAAI,cAAA,IAAkB,EAAE,CAAA;AAAA,IACjD,GAAG,IAAA,CAAK,MAAA,CAAO,QAAA,EAAU,GAAA,CAAI,OAAO,IAAI,CAAA;AAAA,IACxC,GAAG,IAAA,CAAK,MAAA,CAAO,QAAA,EAAU,GAAA,CAAI,eAAe,IAAI,CAAA;AAAA,IAChD,EAAA,CAAG,OAAO,QAAQ;AAAA,GACpB;AACF;AAGO,SAAS,eAAA,CAAgB,GAAA,GAAyB,EAAC,EAAgB;AACxE,EAAA,MAAM,EAAA,GAAK,IAAI,WAAA,EAAY;AAC3B,EAAA,EAAA,CAAG,QAAA,CAAS;AAAA,IACV,MAAA,EAAQ,C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AAQ,KAAK,CAAA;AAAA,MACrB,EAAA,CAAG,OAAO,QAAQ;AAAA;AACpB,GACD,CAAA;AACD,EAAA,OAAO,EAAA;AACT;AAKO,SAAS,yBAAyB,KAAA,EAA4B;AACnE,EAAA,MAAM,EAAA,GAAK,IAAI,WAAA,EAAY;AAC3B,EAAA,EAAA,CAAG,QAAA,CAAS;AAAA,IACV,MAAA,EAAQ,CAAA,EAAG,mBAAmB,CAAA,EAAA,EAAK,MAAM,CAAA,oBAAA,CAAA;AAAA,IACzC,SAAA,EAAW;AAAA,MACT,EAAA,CAAG,OAAO,oBAAoB,CAAA;AAAA,MAC9B,EAAA,CAAG,IAAA,CAAK,OAAA,CAAQ,KAAK,CAAA;AAAA,MACrB,EAAA,CAAG,OAAO,QAAQ;AAAA;AACpB,GACD,CAAA;AACD,EAAA,OAAO,EAAA;AACT;AAGO,SAAS,gBAAA,CAAiB,OAAe,MAAA,EAA8B;AAC5E,EAAA,MAAM,EAAA,GAAK,IAAI,WAAA,EAAY;AAC3B,EAAA,EAAA,CAAG,QAAA,CAAS;AAAA,IACV,MAAA,EAAQ,CAAA,EAAG,mBAAmB,CAAA,EAAA,EAAK,MAAM,CAAA,YAAA,CAAA;AAAA,IACzC,SAAA,EAAW;AAAA,MACT,EAAA,CAAG,OAAO,oBAAoB,CAAA;AAAA,MAC9B,EAAA,CAAG,IAAA,CAAK,OAAA,CAAQ,KAAK,CAAA;AAAA,MACrB,EAAA,CAAG,IAAA,CAAK,IAAA,CAAK,MAAM,CAAA;AAAA,MACnB,EAAA,CAAG,OAAO,QAAQ;AAAA;AACpB,GACD,CAAA;AACD,EAAA,OAAO,EAAA;AACT","file":"index.js","sourcesContent":["import { Transaction } from '@mysten/sui/transactions';\n\n/**\n * @t2000/id — client for the `agent_id::registry` Move package (Agent ID\n * Phase B). These builders construct UNSIGNED transactions calling the on-chain\n * registry; the caller signs (the agent's keypair for register/update/active;\n * the proposed owner for confirm) and may sponsor gas (the agent is the sender,\n * so `sender == agent` auth holds; a SUI-funded t2000 account co-signs gas).\n *\n * Deployed on Sui mainnet 2026-06-29. Override via env for testnet/dev.\n */\n\n/** The published `agent_id` package id — the LATEST version (v2, the\n * 2026-07-09 additive upgrade that added `renounce_ownership`; the shared\n * Registry object is unchanged). The original v1 package\n * (`0x7669be20…be9a45e9`) remains callable for its own functions. */\nexport const AGENT_ID_PACKAGE_ID =\n process.env.AGENT_ID_PACKAGE_ID ??\n '0x78d365066fb0e6468a9dcb49595e559434a53d7a12d845f776bcda76b4d15451';\n\n/** The shared `Registry` object id. */\nexport const AGENT_ID_REGISTRY_ID =\n process.env.AGENT_ID_REGISTRY_ID ??\n '0xf41683aa9f4c121f34e4082c35180b0efdbd6d5293e3c88b1bcfa45ddf5c4119';\n\nconst CLOCK_ID = '0x6';\nconst MODULE = 'registry';\n\n/** The mutable registration payload. `update` is full-replace — supply the\n * complete desired state (omitted fields clear on-chain). */\nexport interface AgentRegistration {\n mcpEndpoint?: string | null;\n paymentMethods?: string[];\n did?: string | null;\n metadataUri?: string | null;\n}\n\nfunction registrationArgs(tx: Transaction, reg: AgentRegistration) {\n return [\n tx.object(AGENT_ID_REGISTRY_ID),\n tx.pure.option('string', reg.mcpEndpoint ?? null),\n tx.pure.vector('string', reg.paymentMethods ?? []),\n tx.pure.option('string', reg.did ?? null),\n tx.pure.option('string', reg.metadataUri ?? null),\n tx.object(CLOCK_ID),\n ];\n}\n\n/** Register the SIGNER as an agent (self-sovereign: `sender == agent`). */\nexport function buildRegisterTx(reg: AgentRegistration = {}): Transaction {\n const tx = new Transaction();\n tx.moveCall({\n target: `${AGENT_ID_PACKAGE_ID}::${MODULE}::register`,\n arguments: registrationArgs(tx, reg),\n });\n return tx;\n}\n\n/** Update the signer's record (full-replace). */\nexport function buildUpdateTx(reg: AgentRegistration = {}): Transaction {\n const tx = new Transaction();\n tx.moveCall({\n target: `${AGENT_ID_PACKAGE_ID}::${MODULE}::update`,\n arguments: registrationArgs(tx, reg),\n });\n return tx;\n}\n\n/** The agent (signer) proposes an owner; nothing binds until the owner confirms. */\nexport function buildSetPendingOwnerTx(owner: string): Transaction {\n const tx = new Transaction();\n tx.moveCall({\n target: `${AGENT_ID_PACKAGE_ID}::${MODULE}::set_pending_owner`,\n arguments: [\n tx.object(AGENT_ID_REGISTRY_ID),\n tx.pure.address(owner),\n tx.object(CLOCK_ID),\n ],\n });\n return tx;\n}\n\n/** The proposed owner (signer) confirms ownership of `agent`. */\nexport function buildConfirmOwnershipTx(agent: string): Transaction {\n const tx = new Transaction();\n tx.moveCall({\n target: `${AGENT_ID_PACKAGE_ID}::${MODULE}::confirm_ownership`,\n arguments: [\n tx.object(AGENT_ID_REGISTRY_ID),\n tx.pure.address(agent),\n tx.object(CLOCK_ID),\n ],\n });\n return tx;\n}\n\n/** The confirmed owner (signer) renounces ownership of `agent` — the record\n * returns to autonomous (`owner = none`). Re-linking is the normal two-sided\n * flow (the agent proposes, the owner confirms). Requires package v2+. */\nexport function buildRenounceOwnershipTx(agent: string): Transaction {\n const tx = new Transaction();\n tx.moveCall({\n target: `${AGENT_ID_PACKAGE_ID}::${MODULE}::renounce_ownership`,\n arguments: [\n tx.object(AGENT_ID_REGISTRY_ID),\n tx.pure.address(agent),\n tx.object(CLOCK_ID),\n ],\n });\n return tx;\n}\n\n/** Toggle an agent's active flag (signer must be the agent or its owner). */\nexport function buildSetActiveTx(agent: string, active: boolean): Transaction {\n const tx = new Transaction();\n tx.moveCall({\n target: `${AGENT_ID_PACKAGE_ID}::${MODULE}::set_active`,\n arguments: [\n tx.object(AGENT_ID_REGISTRY_ID),\n tx.pure.address(agent),\n tx.pure.bool(active),\n tx.object(CLOCK_ID),\n ],\n });\n return tx;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@t2000/id",
3
- "version": "5.29.0",
3
+ "version": "5.30.0",
4
4
  "description": "Agent ID — on-chain agent identity registry client for the t2000 stack (Sui). Build register/update/ownership/active transactions against the agent_id::registry Move package.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",