@openzeppelin/contracts-mcp 0.5.9 → 0.5.10
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/stellar/tools/vault.d.ts +3 -0
- package/dist/stellar/tools/vault.d.ts.map +1 -0
- package/dist/stellar/tools/vault.js +30 -0
- package/dist/stellar/tools/vault.js.map +1 -0
- package/dist/stellar/tools.d.ts.map +1 -1
- package/dist/stellar/tools.js +2 -0
- package/dist/stellar/tools.js.map +1 -1
- package/package.json +3 -3
- package/src/stellar/tools/vault.ts +34 -0
- package/src/stellar/tools.ts +2 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vault.d.ts","sourceRoot":"","sources":["../../../src/stellar/tools/vault.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAOzF,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,GAAG,cAAc,CA0BtE"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerStellarVault = registerStellarVault;
|
|
4
|
+
const wizard_stellar_1 = require("@openzeppelin/wizard-stellar");
|
|
5
|
+
const utils_1 = require("../../utils");
|
|
6
|
+
const schemas_1 = require("@openzeppelin/wizard-common/schemas");
|
|
7
|
+
const wizard_common_1 = require("@openzeppelin/wizard-common");
|
|
8
|
+
function registerStellarVault(server) {
|
|
9
|
+
return server.tool('stellar-vault', (0, utils_1.makeDetailedPrompt)(wizard_common_1.stellarPrompts.Vault), schemas_1.stellarVaultSchema, async ({ name, symbol, decimalsOffset, pausable, upgradeable, access, explicitImplementations, info }) => {
|
|
10
|
+
const opts = {
|
|
11
|
+
name,
|
|
12
|
+
symbol,
|
|
13
|
+
decimalsOffset,
|
|
14
|
+
pausable,
|
|
15
|
+
upgradeable,
|
|
16
|
+
access,
|
|
17
|
+
explicitImplementations,
|
|
18
|
+
info,
|
|
19
|
+
};
|
|
20
|
+
return {
|
|
21
|
+
content: [
|
|
22
|
+
{
|
|
23
|
+
type: 'text',
|
|
24
|
+
text: (0, utils_1.safePrintRustCodeBlock)(() => wizard_stellar_1.vault.print(opts)),
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=vault.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vault.js","sourceRoot":"","sources":["../../../src/stellar/tools/vault.ts"],"names":[],"mappings":";;AAOA,oDA0BC;AA/BD,iEAAqD;AACrD,uCAAyE;AACzE,iEAAyE;AACzE,+DAA6D;AAE7D,SAAgB,oBAAoB,CAAC,MAAiB;IACpD,OAAO,MAAM,CAAC,IAAI,CAChB,eAAe,EACf,IAAA,0BAAkB,EAAC,8BAAc,CAAC,KAAK,CAAC,EACxC,4BAAkB,EAClB,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,uBAAuB,EAAE,IAAI,EAAE,EAAE,EAAE;QACvG,MAAM,IAAI,GAAiB;YACzB,IAAI;YACJ,MAAM;YACN,cAAc;YACd,QAAQ;YACR,WAAW;YACX,MAAM;YACN,uBAAuB;YACvB,IAAI;SACL,CAAC;QACF,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAA,8BAAsB,EAAC,GAAG,EAAE,CAAC,sBAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;iBACtD;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/stellar/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/stellar/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAuBzE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,QAIrD"}
|
package/dist/stellar/tools.js
CHANGED
|
@@ -5,12 +5,14 @@ const fungible_js_1 = require("./tools/fungible.js");
|
|
|
5
5
|
const governor_js_1 = require("./tools/governor.js");
|
|
6
6
|
const stablecoin_js_1 = require("./tools/stablecoin.js");
|
|
7
7
|
const non_fungible_js_1 = require("./tools/non-fungible.js");
|
|
8
|
+
const vault_js_1 = require("./tools/vault.js");
|
|
8
9
|
function getRegisterFunctions(server) {
|
|
9
10
|
return {
|
|
10
11
|
Fungible: () => (0, fungible_js_1.registerStellarFungible)(server),
|
|
11
12
|
Governor: () => (0, governor_js_1.registerStellarGovernor)(server),
|
|
12
13
|
Stablecoin: () => (0, stablecoin_js_1.registerStellarStablecoin)(server),
|
|
13
14
|
NonFungible: () => (0, non_fungible_js_1.registerStellarNonFungible)(server),
|
|
15
|
+
Vault: () => (0, vault_js_1.registerStellarVault)(server),
|
|
14
16
|
};
|
|
15
17
|
}
|
|
16
18
|
function registerStellarTools(server) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/stellar/tools.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/stellar/tools.ts"],"names":[],"mappings":";;AAuBA,oDAIC;AA1BD,qDAA8D;AAC9D,qDAA8D;AAC9D,yDAAkE;AAClE,6DAAqE;AACrE,+CAAwD;AAQxD,SAAS,oBAAoB,CAAC,MAAiB;IAC7C,OAAO;QACL,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAA,qCAAuB,EAAC,MAAM,CAAC;QAC/C,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAA,qCAAuB,EAAC,MAAM,CAAC;QAC/C,UAAU,EAAE,GAAG,EAAE,CAAC,IAAA,yCAAyB,EAAC,MAAM,CAAC;QACnD,WAAW,EAAE,GAAG,EAAE,CAAC,IAAA,4CAA0B,EAAC,MAAM,CAAC;QACrD,KAAK,EAAE,GAAG,EAAE,CAAC,IAAA,+BAAoB,EAAC,MAAM,CAAC;KAC1C,CAAC;AACJ,CAAC;AAED,SAAgB,oBAAoB,CAAC,MAAiB;IACpD,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;QACjE,YAAY,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openzeppelin/contracts-mcp",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.10",
|
|
4
4
|
"description": "OpenZeppelin Contracts MCP Server",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": "https://github.com/OpenZeppelin/contracts-wizard",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
27
|
-
"@openzeppelin/wizard-common": "^0.5.
|
|
27
|
+
"@openzeppelin/wizard-common": "^0.5.3",
|
|
28
28
|
"@openzeppelin/wizard": "^0.10.10",
|
|
29
29
|
"@openzeppelin/wizard-stylus": "^0.3.0",
|
|
30
|
-
"@openzeppelin/wizard-stellar": "^0.6.
|
|
30
|
+
"@openzeppelin/wizard-stellar": "^0.6.3",
|
|
31
31
|
"@openzeppelin/wizard-cairo": "^3.0.0",
|
|
32
32
|
"@openzeppelin/wizard-confidential": "^0.1.2",
|
|
33
33
|
"@openzeppelin/wizard-uniswap-hooks": "^0.1.1"
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { McpServer, RegisteredTool } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import type { VaultOptions } from '@openzeppelin/wizard-stellar';
|
|
3
|
+
import { vault } from '@openzeppelin/wizard-stellar';
|
|
4
|
+
import { safePrintRustCodeBlock, makeDetailedPrompt } from '../../utils';
|
|
5
|
+
import { stellarVaultSchema } from '@openzeppelin/wizard-common/schemas';
|
|
6
|
+
import { stellarPrompts } from '@openzeppelin/wizard-common';
|
|
7
|
+
|
|
8
|
+
export function registerStellarVault(server: McpServer): RegisteredTool {
|
|
9
|
+
return server.tool(
|
|
10
|
+
'stellar-vault',
|
|
11
|
+
makeDetailedPrompt(stellarPrompts.Vault),
|
|
12
|
+
stellarVaultSchema,
|
|
13
|
+
async ({ name, symbol, decimalsOffset, pausable, upgradeable, access, explicitImplementations, info }) => {
|
|
14
|
+
const opts: VaultOptions = {
|
|
15
|
+
name,
|
|
16
|
+
symbol,
|
|
17
|
+
decimalsOffset,
|
|
18
|
+
pausable,
|
|
19
|
+
upgradeable,
|
|
20
|
+
access,
|
|
21
|
+
explicitImplementations,
|
|
22
|
+
info,
|
|
23
|
+
};
|
|
24
|
+
return {
|
|
25
|
+
content: [
|
|
26
|
+
{
|
|
27
|
+
type: 'text',
|
|
28
|
+
text: safePrintRustCodeBlock(() => vault.print(opts)),
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
);
|
|
34
|
+
}
|
package/src/stellar/tools.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { registerStellarFungible } from './tools/fungible.js';
|
|
|
3
3
|
import { registerStellarGovernor } from './tools/governor.js';
|
|
4
4
|
import { registerStellarStablecoin } from './tools/stablecoin.js';
|
|
5
5
|
import { registerStellarNonFungible } from './tools/non-fungible.js';
|
|
6
|
+
import { registerStellarVault } from './tools/vault.js';
|
|
6
7
|
import type { KindedOptions } from '@openzeppelin/wizard-stellar';
|
|
7
8
|
import type { RegisteredTool } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
8
9
|
|
|
@@ -16,6 +17,7 @@ function getRegisterFunctions(server: McpServer): StellarToolRegisterFunctions {
|
|
|
16
17
|
Governor: () => registerStellarGovernor(server),
|
|
17
18
|
Stablecoin: () => registerStellarStablecoin(server),
|
|
18
19
|
NonFungible: () => registerStellarNonFungible(server),
|
|
20
|
+
Vault: () => registerStellarVault(server),
|
|
19
21
|
};
|
|
20
22
|
}
|
|
21
23
|
|