@gala-chain/launchpad-mcp-server 4.0.22-beta.0 → 4.0.22-beta.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/DOCS_AUDIT_REPORT.md +189 -0
- package/MCP_TEST_ANALYSIS.md +180 -30
- package/README.md +6 -4
- package/dist/constants/mcpToolNames.d.ts +1 -1
- package/dist/constants/mcpToolNames.js +1 -1
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/schemas/common-schemas.d.ts +48 -0
- package/dist/schemas/common-schemas.d.ts.map +1 -1
- package/dist/schemas/common-schemas.js +29 -1
- package/dist/schemas/common-schemas.js.map +1 -1
- package/dist/tools/burns/index.d.ts +9 -0
- package/dist/tools/burns/index.d.ts.map +1 -0
- package/dist/tools/burns/index.js +65 -0
- package/dist/tools/burns/index.js.map +1 -0
- package/dist/tools/index.d.ts +2 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +13 -6
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/locks/index.d.ts +6 -2
- package/dist/tools/locks/index.d.ts.map +1 -1
- package/dist/tools/locks/index.js +93 -40
- package/dist/tools/locks/index.js.map +1 -1
- package/dist/tools/utils/explainSdkUsage.d.ts.map +1 -1
- package/dist/tools/utils/explainSdkUsage.js +146 -57
- package/dist/tools/utils/explainSdkUsage.js.map +1 -1
- package/dist/tools/utils/getConfig.js +1 -1
- package/dist/tools/utils/getConfig.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Token Burn Tools
|
|
4
|
+
*
|
|
5
|
+
* WARNING: Burn operations are IRREVERSIBLE. Tokens are permanently destroyed.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.burnTools = exports.burnTokensTool = void 0;
|
|
9
|
+
const response_formatter_js_1 = require("../../utils/response-formatter.js");
|
|
10
|
+
const error_handler_js_1 = require("../../utils/error-handler.js");
|
|
11
|
+
const common_schemas_js_1 = require("../../schemas/common-schemas.js");
|
|
12
|
+
// Batch Burn Tokens
|
|
13
|
+
exports.burnTokensTool = {
|
|
14
|
+
name: 'gala_launchpad_burn_tokens',
|
|
15
|
+
description: `Permanently burn (destroy) one or more token types on GalaChain in a single transaction.
|
|
16
|
+
|
|
17
|
+
**WARNING: THIS OPERATION IS IRREVERSIBLE!**
|
|
18
|
+
|
|
19
|
+
Once tokens are burned, they are permanently destroyed and cannot be recovered.
|
|
20
|
+
The burned tokens are removed from circulation, reducing total supply.
|
|
21
|
+
|
|
22
|
+
Supports batch burning of multiple token types in a single transaction.`,
|
|
23
|
+
inputSchema: {
|
|
24
|
+
type: 'object',
|
|
25
|
+
properties: {
|
|
26
|
+
tokens: {
|
|
27
|
+
type: 'array',
|
|
28
|
+
description: 'Array of tokens to burn (each with tokenId or tokenName, and amount)',
|
|
29
|
+
items: {
|
|
30
|
+
type: 'object',
|
|
31
|
+
properties: {
|
|
32
|
+
tokenId: {
|
|
33
|
+
...common_schemas_js_1.FLEXIBLE_TOKEN_ID_SCHEMA,
|
|
34
|
+
description: 'Token identifier (use this OR tokenName, not both)',
|
|
35
|
+
},
|
|
36
|
+
tokenName: {
|
|
37
|
+
...common_schemas_js_1.TOKEN_NAME_SCHEMA,
|
|
38
|
+
description: 'Token name for lookup (e.g., "anime", "dragon") - used if tokenId not provided',
|
|
39
|
+
},
|
|
40
|
+
amount: {
|
|
41
|
+
...common_schemas_js_1.INTEGER_AMOUNT_SCHEMA,
|
|
42
|
+
description: 'Amount of tokens to burn in decimal format',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
required: ['amount'],
|
|
46
|
+
},
|
|
47
|
+
minItems: 1,
|
|
48
|
+
},
|
|
49
|
+
uniqueKey: common_schemas_js_1.UNIQUE_KEY_SCHEMA,
|
|
50
|
+
privateKey: common_schemas_js_1.PRIVATE_KEY_SCHEMA,
|
|
51
|
+
},
|
|
52
|
+
required: ['tokens'],
|
|
53
|
+
},
|
|
54
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
55
|
+
const tokens = args.tokens;
|
|
56
|
+
const result = await sdk.burnTokens({
|
|
57
|
+
tokens,
|
|
58
|
+
uniqueKey: args.uniqueKey,
|
|
59
|
+
privateKey: args.privateKey,
|
|
60
|
+
});
|
|
61
|
+
return (0, response_formatter_js_1.formatSuccess)(result);
|
|
62
|
+
}),
|
|
63
|
+
};
|
|
64
|
+
exports.burnTools = [exports.burnTokensTool];
|
|
65
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/burns/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAGH,6EAAkE;AAClE,mEAAiE;AACjE,uEAMyC;AAEzC,oBAAoB;AACP,QAAA,cAAc,GAAY;IACrC,IAAI,EAAE,4BAA4B;IAClC,WAAW,EAAE;;;;;;;wEAOyD;IACtE,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,sEAAsE;gBACnF,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,OAAO,EAAE;4BACP,GAAG,4CAAwB;4BAC3B,WAAW,EAAE,oDAAoD;yBAClE;wBACD,SAAS,EAAE;4BACT,GAAG,qCAAiB;4BACpB,WAAW,EAAE,gFAAgF;yBAC9F;wBACD,MAAM,EAAE;4BACN,GAAG,yCAAqB;4BACxB,WAAW,EAAE,4CAA4C;yBAC1D;qBACF;oBACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;iBACrB;gBACD,QAAQ,EAAE,CAAC;aACZ;YACD,SAAS,EAAE,qCAAiB;YAC5B,UAAU,EAAE,sCAAkB;SAC/B;QACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;KACrB;IACD,OAAO,EAAE,IAAA,oCAAiB,EAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC7C,MAAM,MAAM,GAAG,IAAI,CAAC,MAIlB,CAAC;QAEH,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC;YAClC,MAAM;YACN,SAAS,EAAE,IAAI,CAAC,SAA+B;YAC/C,UAAU,EAAE,IAAI,CAAC,UAAgC;SAClD,CAAC,CAAC;QACH,OAAO,IAAA,qCAAa,EAAC,MAAM,CAAC,CAAC;IAC/B,CAAC,CAAC;CACH,CAAC;AAEW,QAAA,SAAS,GAAc,CAAC,sBAAc,CAAC,CAAC"}
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @see src/utils/tool-registry.ts
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
|
-
* Enhanced tool registry with validation (
|
|
10
|
+
* Enhanced tool registry with validation (128 tools total):
|
|
11
11
|
* - Pools: 19 tools (pool operations + 2 watchers: onDexPoolCreation, onLaunchpadTokenCreation)
|
|
12
12
|
* - Trading: 13 tools (buy, sell, calculate amounts, graduation)
|
|
13
13
|
* - DEX/GalaSwap: 29 tools (swap/quote, liquidity, pool discovery, leaderboard, volume, token discovery)
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* - Creation: 4 tools (token creation, launch, calculateInitialBuy)
|
|
16
16
|
* - Transfers: 2 tools (GALA and token transfers)
|
|
17
17
|
* - Locks: 2 tools (token lock/unlock for staking, escrow)
|
|
18
|
+
* - Burns: 1 tool (batch token burning - IRREVERSIBLE)
|
|
18
19
|
* - Utilities: 19 tools (config, version, environment, wallet, Solana wallet, cache, cleanup, key derivation)
|
|
19
20
|
* - Bridge: 31 tools (cross-chain bridging, bridgeable/wrappable token queries, wrap/unwrap execution, devnet airdrop, tx status)
|
|
20
21
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAsEH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,QAAQ,kDAA0C,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,KAAK,qCAAiB,CAAC"}
|
package/dist/tools/index.js
CHANGED
|
@@ -16,8 +16,9 @@ const index_js_4 = require("./balance/index.js");
|
|
|
16
16
|
const index_js_5 = require("./creation/index.js");
|
|
17
17
|
const index_js_6 = require("./transfers/index.js");
|
|
18
18
|
const index_js_7 = require("./locks/index.js");
|
|
19
|
-
const index_js_8 = require("./
|
|
20
|
-
const index_js_9 = require("./
|
|
19
|
+
const index_js_8 = require("./burns/index.js");
|
|
20
|
+
const index_js_9 = require("./utils/index.js");
|
|
21
|
+
const index_js_10 = require("./bridge/index.js");
|
|
21
22
|
const tool_registry_js_1 = require("../utils/tool-registry.js");
|
|
22
23
|
/**
|
|
23
24
|
* Tool categories with metadata
|
|
@@ -58,19 +59,24 @@ const toolCategories = [
|
|
|
58
59
|
description: 'Token lock/unlock operations (staking, escrow)',
|
|
59
60
|
tools: index_js_7.lockTools,
|
|
60
61
|
},
|
|
62
|
+
{
|
|
63
|
+
name: 'burns',
|
|
64
|
+
description: 'Token burn operations (IRREVERSIBLE - permanently destroys tokens)',
|
|
65
|
+
tools: index_js_8.burnTools,
|
|
66
|
+
},
|
|
61
67
|
{
|
|
62
68
|
name: 'utils',
|
|
63
69
|
description: 'Utility tools (wallet, config, SDK documentation)',
|
|
64
|
-
tools:
|
|
70
|
+
tools: index_js_9.utilityTools,
|
|
65
71
|
},
|
|
66
72
|
{
|
|
67
73
|
name: 'bridge',
|
|
68
74
|
description: 'Cross-chain bridging (GalaChain ↔ Ethereum, GalaChain ↔ Solana)',
|
|
69
|
-
tools:
|
|
75
|
+
tools: index_js_10.bridgeTools,
|
|
70
76
|
},
|
|
71
77
|
];
|
|
72
78
|
/**
|
|
73
|
-
* Enhanced tool registry with validation (
|
|
79
|
+
* Enhanced tool registry with validation (128 tools total):
|
|
74
80
|
* - Pools: 19 tools (pool operations + 2 watchers: onDexPoolCreation, onLaunchpadTokenCreation)
|
|
75
81
|
* - Trading: 13 tools (buy, sell, calculate amounts, graduation)
|
|
76
82
|
* - DEX/GalaSwap: 29 tools (swap/quote, liquidity, pool discovery, leaderboard, volume, token discovery)
|
|
@@ -78,10 +84,11 @@ const toolCategories = [
|
|
|
78
84
|
* - Creation: 4 tools (token creation, launch, calculateInitialBuy)
|
|
79
85
|
* - Transfers: 2 tools (GALA and token transfers)
|
|
80
86
|
* - Locks: 2 tools (token lock/unlock for staking, escrow)
|
|
87
|
+
* - Burns: 1 tool (batch token burning - IRREVERSIBLE)
|
|
81
88
|
* - Utilities: 19 tools (config, version, environment, wallet, Solana wallet, cache, cleanup, key derivation)
|
|
82
89
|
* - Bridge: 31 tools (cross-chain bridging, bridgeable/wrappable token queries, wrap/unwrap execution, devnet airdrop, tx status)
|
|
83
90
|
*/
|
|
84
|
-
exports.registry = (0, tool_registry_js_1.createToolRegistry)(toolCategories,
|
|
91
|
+
exports.registry = (0, tool_registry_js_1.createToolRegistry)(toolCategories, 128);
|
|
85
92
|
/**
|
|
86
93
|
* Complete tool array (for backward compatibility)
|
|
87
94
|
*/
|
package/dist/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAEH,+CAA6C;AAC7C,iDAAkD;AAClD,6CAA0C;AAC1C,iDAAkD;AAClD,kDAAoD;AACpD,mDAAqD;AACrD,+CAA6C;AAC7C,+CAAgD;AAChD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src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A,KAAK,GAAG,gBAAQ,CAAC,KAAK,CAAC;AAEpC,wCAAwC;AACxC,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,MAAM,EAAE,CAAC;IACjC,IAAA,kCAAe,EAAC,gBAAQ,CAAC,CAAC;AAC5B,CAAC;AAED,qCAAqC;AACrC,IAAI,CAAC,gBAAQ,CAAC,OAAO,EAAE,CAAC;IACtB,MAAM,IAAI,KAAK,CACb,qCAAqC,gBAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAClE,CAAC;AACJ,CAAC"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Token Lock/Unlock Tools
|
|
3
|
+
*
|
|
4
|
+
* Batch operations for locking and unlocking tokens on GalaChain.
|
|
5
|
+
* Lock operations place holds on tokens, preventing transfers until unlocked.
|
|
6
|
+
* Useful for staking, escrow, vesting, or other hold scenarios.
|
|
3
7
|
*/
|
|
4
8
|
import type { MCPTool } from '../../types/mcp.js';
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
9
|
+
export declare const lockTokensTool: MCPTool;
|
|
10
|
+
export declare const unlockTokensTool: MCPTool;
|
|
7
11
|
export declare const lockTools: MCPTool[];
|
|
8
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/locks/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/locks/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAYlD,eAAO,MAAM,cAAc,EAAE,OAoE5B,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,OA2D9B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,OAAO,EAAuC,CAAC"}
|
|
@@ -1,79 +1,132 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
3
|
* Token Lock/Unlock Tools
|
|
4
|
+
*
|
|
5
|
+
* Batch operations for locking and unlocking tokens on GalaChain.
|
|
6
|
+
* Lock operations place holds on tokens, preventing transfers until unlocked.
|
|
7
|
+
* Useful for staking, escrow, vesting, or other hold scenarios.
|
|
4
8
|
*/
|
|
5
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.lockTools = exports.
|
|
10
|
+
exports.lockTools = exports.unlockTokensTool = exports.lockTokensTool = void 0;
|
|
7
11
|
const response_formatter_js_1 = require("../../utils/response-formatter.js");
|
|
8
12
|
const error_handler_js_1 = require("../../utils/error-handler.js");
|
|
9
13
|
const common_schemas_js_1 = require("../../schemas/common-schemas.js");
|
|
10
|
-
// 1. Lock
|
|
11
|
-
exports.
|
|
12
|
-
name: '
|
|
13
|
-
description:
|
|
14
|
+
// 1. Lock Tokens (Batch)
|
|
15
|
+
exports.lockTokensTool = {
|
|
16
|
+
name: 'gala_launchpad_lock_tokens',
|
|
17
|
+
description: `Lock one or more token types on GalaChain in a single transaction.
|
|
18
|
+
|
|
19
|
+
Locked tokens cannot be transferred until unlocked by the lock authority.
|
|
20
|
+
Useful for staking, escrow, vesting, or other hold scenarios.
|
|
21
|
+
|
|
22
|
+
Supports batch locking of multiple token types for efficiency.`,
|
|
14
23
|
inputSchema: {
|
|
15
24
|
type: 'object',
|
|
16
25
|
properties: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
tokens: {
|
|
27
|
+
type: 'array',
|
|
28
|
+
description: 'Array of tokens to lock (each with tokenId or tokenName, amount, and optional lock settings)',
|
|
29
|
+
items: {
|
|
30
|
+
type: 'object',
|
|
31
|
+
properties: {
|
|
32
|
+
tokenId: {
|
|
33
|
+
...common_schemas_js_1.FLEXIBLE_TOKEN_ID_SCHEMA,
|
|
34
|
+
description: 'Token identifier (use this OR tokenName, not both)',
|
|
35
|
+
},
|
|
36
|
+
tokenName: {
|
|
37
|
+
...common_schemas_js_1.TOKEN_NAME_SCHEMA,
|
|
38
|
+
description: 'Token name for lookup (e.g., "anime", "dragon") - used if tokenId not provided',
|
|
39
|
+
},
|
|
40
|
+
amount: {
|
|
41
|
+
...common_schemas_js_1.INTEGER_AMOUNT_SCHEMA,
|
|
42
|
+
description: 'Amount of tokens to lock in decimal format',
|
|
43
|
+
},
|
|
44
|
+
lockAuthority: {
|
|
45
|
+
type: 'string',
|
|
46
|
+
description: 'Address that can unlock these tokens (defaults to caller if not specified)',
|
|
47
|
+
},
|
|
48
|
+
expires: {
|
|
49
|
+
type: 'number',
|
|
50
|
+
description: 'Optional expiration timestamp in milliseconds (epoch time). Lock auto-releases after this time.',
|
|
51
|
+
},
|
|
52
|
+
name: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
description: 'Optional name/identifier for the lock. Can be used to match during unlock.',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
required: ['amount'],
|
|
58
|
+
},
|
|
59
|
+
minItems: 1,
|
|
30
60
|
},
|
|
31
61
|
uniqueKey: common_schemas_js_1.UNIQUE_KEY_SCHEMA,
|
|
32
62
|
privateKey: common_schemas_js_1.PRIVATE_KEY_SCHEMA,
|
|
33
63
|
},
|
|
34
|
-
required: ['
|
|
64
|
+
required: ['tokens'],
|
|
35
65
|
},
|
|
36
66
|
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
lockAuthority: args.lockAuthority,
|
|
41
|
-
expires: args.expires,
|
|
42
|
-
name: args.name,
|
|
67
|
+
const tokens = args.tokens;
|
|
68
|
+
const result = await sdk.lockTokens({
|
|
69
|
+
tokens,
|
|
43
70
|
uniqueKey: args.uniqueKey,
|
|
44
71
|
privateKey: args.privateKey,
|
|
45
72
|
});
|
|
46
73
|
return (0, response_formatter_js_1.formatSuccess)(result);
|
|
47
74
|
}),
|
|
48
75
|
};
|
|
49
|
-
// 2. Unlock
|
|
50
|
-
exports.
|
|
51
|
-
name: '
|
|
52
|
-
description:
|
|
76
|
+
// 2. Unlock Tokens (Batch)
|
|
77
|
+
exports.unlockTokensTool = {
|
|
78
|
+
name: 'gala_launchpad_unlock_tokens',
|
|
79
|
+
description: `Unlock one or more previously locked token types on GalaChain in a single transaction.
|
|
80
|
+
|
|
81
|
+
Releases token holds, making them available for transfer again.
|
|
82
|
+
Must be called by the lock authority (the address that locked the tokens
|
|
83
|
+
or was designated as lock authority during the lock operation).
|
|
84
|
+
|
|
85
|
+
Supports batch unlocking of multiple token types for efficiency.`,
|
|
53
86
|
inputSchema: {
|
|
54
87
|
type: 'object',
|
|
55
88
|
properties: {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
89
|
+
tokens: {
|
|
90
|
+
type: 'array',
|
|
91
|
+
description: 'Array of tokens to unlock (each with tokenId or tokenName, amount, and optional name)',
|
|
92
|
+
items: {
|
|
93
|
+
type: 'object',
|
|
94
|
+
properties: {
|
|
95
|
+
tokenId: {
|
|
96
|
+
...common_schemas_js_1.FLEXIBLE_TOKEN_ID_SCHEMA,
|
|
97
|
+
description: 'Token identifier (use this OR tokenName, not both)',
|
|
98
|
+
},
|
|
99
|
+
tokenName: {
|
|
100
|
+
...common_schemas_js_1.TOKEN_NAME_SCHEMA,
|
|
101
|
+
description: 'Token name for lookup (e.g., "anime", "dragon") - used if tokenId not provided',
|
|
102
|
+
},
|
|
103
|
+
amount: {
|
|
104
|
+
...common_schemas_js_1.INTEGER_AMOUNT_SCHEMA,
|
|
105
|
+
description: 'Amount of tokens to unlock in decimal format',
|
|
106
|
+
},
|
|
107
|
+
name: {
|
|
108
|
+
type: 'string',
|
|
109
|
+
description: 'Optional name to match a specific lock (must match the name used during lock)',
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
required: ['amount'],
|
|
113
|
+
},
|
|
114
|
+
minItems: 1,
|
|
61
115
|
},
|
|
62
116
|
uniqueKey: common_schemas_js_1.UNIQUE_KEY_SCHEMA,
|
|
63
117
|
privateKey: common_schemas_js_1.PRIVATE_KEY_SCHEMA,
|
|
64
118
|
},
|
|
65
|
-
required: ['
|
|
119
|
+
required: ['tokens'],
|
|
66
120
|
},
|
|
67
121
|
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
name: args.name,
|
|
122
|
+
const tokens = args.tokens;
|
|
123
|
+
const result = await sdk.unlockTokens({
|
|
124
|
+
tokens,
|
|
72
125
|
uniqueKey: args.uniqueKey,
|
|
73
126
|
privateKey: args.privateKey,
|
|
74
127
|
});
|
|
75
128
|
return (0, response_formatter_js_1.formatSuccess)(result);
|
|
76
129
|
}),
|
|
77
130
|
};
|
|
78
|
-
exports.lockTools = [exports.
|
|
131
|
+
exports.lockTools = [exports.lockTokensTool, exports.unlockTokensTool];
|
|
79
132
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/locks/index.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/locks/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAGH,6EAAkE;AAClE,mEAAiE;AACjE,uEAMyC;AAEzC,yBAAyB;AACZ,QAAA,cAAc,GAAY;IACrC,IAAI,EAAE,4BAA4B;IAClC,WAAW,EAAE;;;;;+DAKgD;IAC7D,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,8FAA8F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AAM,oBAAoB,CAAC;AAIlD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CA8EzD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,aAS3B,CAAC;
|
|
1
|
+
{"version":3,"file":"explainSdkUsage.d.ts","sourceRoot":"","sources":["../../../src/tools/utils/explainSdkUsage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAIlD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CA8EzD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,aAS3B,CAAC;AAgvGH;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,OAgEjC,CAAC"}
|