@terminal3/t3n-sdk 4.13.0 → 4.14.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/cli/index.js +1 -1
- package/dist/index.d.ts +26 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1993,6 +1993,32 @@ declare class T3nClient {
|
|
|
1993
1993
|
* empty / too long)
|
|
1994
1994
|
*/
|
|
1995
1995
|
createOrganisation(name: string): Promise<Did>;
|
|
1996
|
+
/**
|
|
1997
|
+
* Provision a fresh org-owned agent.
|
|
1998
|
+
*
|
|
1999
|
+
* Dispatches `create-agent` on `tee:organisation/contracts` over the
|
|
2000
|
+
* standard authenticated `action.execute` path. The node injects the
|
|
2001
|
+
* caller's DID into the contract call context, and the contract refuses
|
|
2002
|
+
* unless the caller is listed as an admin of `organisationDid`. A brand
|
|
2003
|
+
* new secp256k1 wallet is minted in-TEE for the agent; its eth-derived
|
|
2004
|
+
* DID and its raw private key are both returned. The private key is the
|
|
2005
|
+
* "authentication token" the MCP sidecar uses to authenticate as this
|
|
2006
|
+
* agent (the existing `PRIVATE_KEY` eth auth mode) — it is generated and
|
|
2007
|
+
* returned exactly once here and is never persisted or recoverable
|
|
2008
|
+
* afterwards, so the caller must capture it immediately.
|
|
2009
|
+
*
|
|
2010
|
+
* @param organisationDid - the owning organisation's DID
|
|
2011
|
+
* (`did:t3n:<40-hex>`); the caller must be one of its admins
|
|
2012
|
+
* @param name - human-readable agent name (1..=128 bytes)
|
|
2013
|
+
* @returns the new agent's DID and its one-time private key
|
|
2014
|
+
* @throws if the session is not authenticated, or if the contract
|
|
2015
|
+
* refuses (e.g. the caller is not an admin of `organisationDid`, or the
|
|
2016
|
+
* name is empty / too long)
|
|
2017
|
+
*/
|
|
2018
|
+
createAgent(organisationDid: string, name: string): Promise<{
|
|
2019
|
+
agentDid: Did;
|
|
2020
|
+
privateKey: string;
|
|
2021
|
+
}>;
|
|
1996
2022
|
/**
|
|
1997
2023
|
* Read the authenticated user's own agent-auth policy — the standing
|
|
1998
2024
|
* grants delegated to agents. Dispatches `agent-auth-get` on
|