@manifest-network/manifest-mcp-core 0.5.0 → 0.6.1
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.d.ts
CHANGED
|
@@ -6,9 +6,10 @@ import { cosmosEstimateFee, cosmosQuery, cosmosTx } from "./cosmos.js";
|
|
|
6
6
|
import { createLCDQueryClient } from "./lcd-adapter.js";
|
|
7
7
|
import { LogLevel, logger } from "./logger.js";
|
|
8
8
|
import { getAvailableModules, getModuleSubcommands, getSubcommandUsage, getSupportedModules, isSubcommandSupported } from "./modules.js";
|
|
9
|
+
import { validateAddress } from "./transactions/utils.js";
|
|
9
10
|
import { MAX_PAGE_LIMIT, createPagination } from "./queries/utils.js";
|
|
10
11
|
import { INFRASTRUCTURE_ERROR_CODES, ManifestMCPServerOptions, MnemonicServerConfig, SENSITIVE_FIELDS, bigIntReplacer, createMnemonicServer, jsonResponse, sanitizeForLogging, withErrorHandling } from "./server-utils.js";
|
|
11
|
-
import { fundCredits } from "./tools/fundCredits.js";
|
|
12
|
+
import { FundCreditsResult, fundCredits } from "./tools/fundCredits.js";
|
|
12
13
|
import { getBalance } from "./tools/getBalance.js";
|
|
13
14
|
import { StopAppResult, stopApp } from "./tools/stopApp.js";
|
|
14
15
|
import { DNS_LABEL_RE, optionalBoolean, parseArgs, requireString, requireStringEnum, requireUuid } from "./validation.js";
|
|
@@ -16,4 +17,4 @@ import { VERSION } from "./version.js";
|
|
|
16
17
|
import { MnemonicWalletProvider } from "./wallet/mnemonic.js";
|
|
17
18
|
import { signArbitraryWithAmino } from "./wallet/sign-arbitrary.js";
|
|
18
19
|
import { LeaseState, leaseStateFromJSON, leaseStateToJSON } from "@manifest-network/manifestjs/dist/codegen/liftedinit/billing/v1/types.js";
|
|
19
|
-
export { AccountInfo, AccountInfoResult, AddressBytesToStringResult, AddressStringToBytesResult, Any, AuthAccountResult, AuthAccountsResult, AuthParams, AuthParamsResult, AvailableModules, BalanceResult, BalancesResult, BankMetadata, BankParams, BankParamsResult, BaseAccount, Bech32PrefixResult, BillingParams, BillingParamsResult, BuiltMessages, CodeInfoResponse, Coin, CommissionResult, CommunityPoolResult, ContractCodeHistoryEntry, ContractInfo, CosmosClientManager, CosmosQueryResult, CosmosTxResult, CreditAccount, CreditAccountResult, CreditAccountsResult, CreditAddressResult, CreditEstimateResult, DEFAULT_RETRY_CONFIG, DNS_LABEL_RE, DecCoin, DelegationDelegatorReward, DelegationResponse, DelegationResult, DelegationsResult, DelegatorValidatorsResult, DelegatorWithdrawAddressResult, DenomMetadataResult, DenomsMetadataResult, DepositParams, DepositResult, DepositsResult, DistributionParams, DistributionParamsResult, FeeEstimateResult, GovDeposit, GovParams, GovParamsResult, GovProposal, GovTallyResult, GovVote, GroupInfo, GroupInfoResult, GroupMember, GroupMembersResult, GroupPoliciesResult, GroupPolicyInfo, GroupPolicyInfoResult, GroupProposal, GroupProposalResult, GroupProposalsResult, GroupTallyQueryResult, GroupTallyResult, GroupVote, GroupVoteResult, GroupVotesResult, GroupsResult, HistoricalInfo, HistoricalInfoResult, INFRASTRUCTURE_ERROR_CODES, Lease, LeaseItemInput, LeaseResult, LeaseState, LeasesResult, type LogLevel, MAX_PAGE_LIMIT, ManifestMCPConfig, ManifestMCPError, ManifestMCPErrorCode, type ManifestMCPServerOptions, type ManifestQueryClient, type MnemonicServerConfig, MnemonicWalletProvider, Model, ModuleAccount, ModuleAccountsResult, ModuleInfo, PaginatedResult, PaginationResponse, ProposalResult, ProposalsResult, Provider, ProviderResult, ProviderWithdrawableResult, ProvidersResult, QueryCreditEstimateResponse, QueryResult, RateLimitConfig, RedelegationResponse, RedelegationsResult, RetryConfig, type RetryOptions, RewardsResult, SENSITIVE_FIELDS, SKU, SendEnabled, SendEnabledResult, SignArbitraryResult, SkuParams, SkuParamsResult, SkuResult, SkusResult, SlashesResult, StakingParams, StakingParamsResult, StakingPool, StakingPoolResult, type StopAppResult, SupplyOfResult, TallyParams, TallyResult, TotalSupplyResult, TxOptions, TxOverrides, UnbondingDelegation, UnbondingDelegationResult, UnbondingDelegationsResult, VERSION, type ValidationResult, Validator, ValidatorAccumulatedCommission, ValidatorOutstandingRewards, ValidatorOutstandingRewardsResult, ValidatorResult, ValidatorSlashEvent, ValidatorsResult, VoteResult, VotesResult, VotingParams, WalletProvider, WasmAllContractStateResult, WasmBuildAddressResult, WasmCodeInfo, WasmCodeInfoResult, WasmCodeResult, WasmCodesResult, WasmContractHistoryResult, WasmContractInfoResult, WasmContractsByCodeResult, WasmContractsByCreatorResult, WasmLimitsConfigResult, WasmParams, WasmParamsResult, WasmPinnedCodesResult, WasmRawContractStateResult, WasmSmartContractStateResult, WithdrawableAmountResult, bigIntReplacer, calculateBackoff, cosmosEstimateFee, cosmosQuery, cosmosTx, createConfig, createLCDQueryClient, createMnemonicServer, createPagination, createValidatedConfig, fundCredits, getAvailableModules, getBalance, getModuleSubcommands, getSubcommandUsage, getSupportedModules, isRetryableError, isSubcommandSupported, jsonResponse, leaseStateFromJSON, leaseStateToJSON, logger, optionalBoolean, parseArgs, requireString, requireStringEnum, requireUuid, sanitizeForLogging, signArbitraryWithAmino, stopApp, validateConfig, withErrorHandling, withRetry };
|
|
20
|
+
export { AccountInfo, AccountInfoResult, AddressBytesToStringResult, AddressStringToBytesResult, Any, AuthAccountResult, AuthAccountsResult, AuthParams, AuthParamsResult, AvailableModules, BalanceResult, BalancesResult, BankMetadata, BankParams, BankParamsResult, BaseAccount, Bech32PrefixResult, BillingParams, BillingParamsResult, BuiltMessages, CodeInfoResponse, Coin, CommissionResult, CommunityPoolResult, ContractCodeHistoryEntry, ContractInfo, CosmosClientManager, CosmosQueryResult, CosmosTxResult, CreditAccount, CreditAccountResult, CreditAccountsResult, CreditAddressResult, CreditEstimateResult, DEFAULT_RETRY_CONFIG, DNS_LABEL_RE, DecCoin, DelegationDelegatorReward, DelegationResponse, DelegationResult, DelegationsResult, DelegatorValidatorsResult, DelegatorWithdrawAddressResult, DenomMetadataResult, DenomsMetadataResult, DepositParams, DepositResult, DepositsResult, DistributionParams, DistributionParamsResult, FeeEstimateResult, type FundCreditsResult, GovDeposit, GovParams, GovParamsResult, GovProposal, GovTallyResult, GovVote, GroupInfo, GroupInfoResult, GroupMember, GroupMembersResult, GroupPoliciesResult, GroupPolicyInfo, GroupPolicyInfoResult, GroupProposal, GroupProposalResult, GroupProposalsResult, GroupTallyQueryResult, GroupTallyResult, GroupVote, GroupVoteResult, GroupVotesResult, GroupsResult, HistoricalInfo, HistoricalInfoResult, INFRASTRUCTURE_ERROR_CODES, Lease, LeaseItemInput, LeaseResult, LeaseState, LeasesResult, type LogLevel, MAX_PAGE_LIMIT, ManifestMCPConfig, ManifestMCPError, ManifestMCPErrorCode, type ManifestMCPServerOptions, type ManifestQueryClient, type MnemonicServerConfig, MnemonicWalletProvider, Model, ModuleAccount, ModuleAccountsResult, ModuleInfo, PaginatedResult, PaginationResponse, ProposalResult, ProposalsResult, Provider, ProviderResult, ProviderWithdrawableResult, ProvidersResult, QueryCreditEstimateResponse, QueryResult, RateLimitConfig, RedelegationResponse, RedelegationsResult, RetryConfig, type RetryOptions, RewardsResult, SENSITIVE_FIELDS, SKU, SendEnabled, SendEnabledResult, SignArbitraryResult, SkuParams, SkuParamsResult, SkuResult, SkusResult, SlashesResult, StakingParams, StakingParamsResult, StakingPool, StakingPoolResult, type StopAppResult, SupplyOfResult, TallyParams, TallyResult, TotalSupplyResult, TxOptions, TxOverrides, UnbondingDelegation, UnbondingDelegationResult, UnbondingDelegationsResult, VERSION, type ValidationResult, Validator, ValidatorAccumulatedCommission, ValidatorOutstandingRewards, ValidatorOutstandingRewardsResult, ValidatorResult, ValidatorSlashEvent, ValidatorsResult, VoteResult, VotesResult, VotingParams, WalletProvider, WasmAllContractStateResult, WasmBuildAddressResult, WasmCodeInfo, WasmCodeInfoResult, WasmCodeResult, WasmCodesResult, WasmContractHistoryResult, WasmContractInfoResult, WasmContractsByCodeResult, WasmContractsByCreatorResult, WasmLimitsConfigResult, WasmParams, WasmParamsResult, WasmPinnedCodesResult, WasmRawContractStateResult, WasmSmartContractStateResult, WithdrawableAmountResult, bigIntReplacer, calculateBackoff, cosmosEstimateFee, cosmosQuery, cosmosTx, createConfig, createLCDQueryClient, createMnemonicServer, createPagination, createValidatedConfig, fundCredits, getAvailableModules, getBalance, getModuleSubcommands, getSubcommandUsage, getSupportedModules, isRetryableError, isSubcommandSupported, jsonResponse, leaseStateFromJSON, leaseStateToJSON, logger, optionalBoolean, parseArgs, requireString, requireStringEnum, requireUuid, sanitizeForLogging, signArbitraryWithAmino, stopApp, validateAddress, validateConfig, withErrorHandling, withRetry };
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import { logger } from "./logger.js";
|
|
|
5
5
|
import { createLCDQueryClient } from "./lcd-adapter.js";
|
|
6
6
|
import { CosmosClientManager } from "./client.js";
|
|
7
7
|
import { DNS_LABEL_RE, optionalBoolean, parseArgs, requireString, requireStringEnum, requireUuid } from "./validation.js";
|
|
8
|
+
import { validateAddress } from "./transactions/utils.js";
|
|
8
9
|
import { MAX_PAGE_LIMIT, createPagination } from "./queries/utils.js";
|
|
9
10
|
import { getAvailableModules, getModuleSubcommands, getSubcommandUsage, getSupportedModules, isSubcommandSupported } from "./modules.js";
|
|
10
11
|
import { cosmosEstimateFee, cosmosQuery, cosmosTx } from "./cosmos.js";
|
|
@@ -17,4 +18,4 @@ import { getBalance } from "./tools/getBalance.js";
|
|
|
17
18
|
import { stopApp } from "./tools/stopApp.js";
|
|
18
19
|
import { VERSION } from "./version.js";
|
|
19
20
|
import { LeaseState, leaseStateFromJSON, leaseStateToJSON } from "@manifest-network/manifestjs/dist/codegen/liftedinit/billing/v1/types.js";
|
|
20
|
-
export { CosmosClientManager, DEFAULT_RETRY_CONFIG, DNS_LABEL_RE, INFRASTRUCTURE_ERROR_CODES, LeaseState, MAX_PAGE_LIMIT, ManifestMCPError, ManifestMCPErrorCode, MnemonicWalletProvider, SENSITIVE_FIELDS, VERSION, bigIntReplacer, calculateBackoff, cosmosEstimateFee, cosmosQuery, cosmosTx, createConfig, createLCDQueryClient, createMnemonicServer, createPagination, createValidatedConfig, fundCredits, getAvailableModules, getBalance, getModuleSubcommands, getSubcommandUsage, getSupportedModules, isRetryableError, isSubcommandSupported, jsonResponse, leaseStateFromJSON, leaseStateToJSON, logger, optionalBoolean, parseArgs, requireString, requireStringEnum, requireUuid, sanitizeForLogging, signArbitraryWithAmino, stopApp, validateConfig, withErrorHandling, withRetry };
|
|
21
|
+
export { CosmosClientManager, DEFAULT_RETRY_CONFIG, DNS_LABEL_RE, INFRASTRUCTURE_ERROR_CODES, LeaseState, MAX_PAGE_LIMIT, ManifestMCPError, ManifestMCPErrorCode, MnemonicWalletProvider, SENSITIVE_FIELDS, VERSION, bigIntReplacer, calculateBackoff, cosmosEstimateFee, cosmosQuery, cosmosTx, createConfig, createLCDQueryClient, createMnemonicServer, createPagination, createValidatedConfig, fundCredits, getAvailableModules, getBalance, getModuleSubcommands, getSubcommandUsage, getSupportedModules, isRetryableError, isSubcommandSupported, jsonResponse, leaseStateFromJSON, leaseStateToJSON, logger, optionalBoolean, parseArgs, requireString, requireStringEnum, requireUuid, sanitizeForLogging, signArbitraryWithAmino, stopApp, validateAddress, validateConfig, withErrorHandling, withRetry };
|
|
@@ -2,7 +2,12 @@ import { CosmosTxResult, TxOverrides } from "../types.js";
|
|
|
2
2
|
import { CosmosClientManager } from "../client.js";
|
|
3
3
|
|
|
4
4
|
//#region src/tools/fundCredits.d.ts
|
|
5
|
-
|
|
5
|
+
interface FundCreditsResult extends CosmosTxResult {
|
|
6
|
+
readonly sender: string;
|
|
7
|
+
readonly tenant: string;
|
|
8
|
+
readonly amount: string;
|
|
9
|
+
}
|
|
10
|
+
declare function fundCredits(clientManager: CosmosClientManager, amount: string, overrides?: TxOverrides, tenant?: string): Promise<FundCreditsResult>;
|
|
6
11
|
//#endregion
|
|
7
|
-
export { fundCredits };
|
|
12
|
+
export { FundCreditsResult, fundCredits };
|
|
8
13
|
//# sourceMappingURL=fundCredits.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fundCredits.d.ts","names":[],"sources":["../../src/tools/fundCredits.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"fundCredits.d.ts","names":[],"sources":["../../src/tools/fundCredits.ts"],"mappings":";;;;UAIiB,iBAAA,SAA0B,cAAA;EAAA,SAChC,MAAA;EAAA,SACA,MAAA;EAAA,SACA,MAAA;AAAA;AAAA,iBAGW,WAAA,CACpB,aAAA,EAAe,mBAAA,EACf,MAAA,UACA,SAAA,GAAY,WAAA,EACZ,MAAA,YACC,OAAA,CAAQ,iBAAA"}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { cosmosTx } from "../cosmos.js";
|
|
2
2
|
//#region src/tools/fundCredits.ts
|
|
3
|
-
async function fundCredits(clientManager, amount, overrides) {
|
|
4
|
-
|
|
3
|
+
async function fundCredits(clientManager, amount, overrides, tenant) {
|
|
4
|
+
const sender = await clientManager.getAddress();
|
|
5
|
+
const recipient = tenant ?? sender;
|
|
6
|
+
return {
|
|
7
|
+
...await cosmosTx(clientManager, "billing", "fund-credit", [recipient, amount], true, overrides),
|
|
8
|
+
sender,
|
|
9
|
+
tenant: recipient,
|
|
10
|
+
amount
|
|
11
|
+
};
|
|
5
12
|
}
|
|
6
13
|
//#endregion
|
|
7
14
|
export { fundCredits };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fundCredits.js","names":[],"sources":["../../src/tools/fundCredits.ts"],"sourcesContent":["import type { CosmosClientManager } from '../client.js';\nimport { cosmosTx } from '../cosmos.js';\nimport type { CosmosTxResult, TxOverrides } from '../types.js';\n\nexport async function fundCredits(\n clientManager: CosmosClientManager,\n amount: string,\n overrides?: TxOverrides,\n): Promise<
|
|
1
|
+
{"version":3,"file":"fundCredits.js","names":[],"sources":["../../src/tools/fundCredits.ts"],"sourcesContent":["import type { CosmosClientManager } from '../client.js';\nimport { cosmosTx } from '../cosmos.js';\nimport type { CosmosTxResult, TxOverrides } from '../types.js';\n\nexport interface FundCreditsResult extends CosmosTxResult {\n readonly sender: string;\n readonly tenant: string;\n readonly amount: string;\n}\n\nexport async function fundCredits(\n clientManager: CosmosClientManager,\n amount: string,\n overrides?: TxOverrides,\n tenant?: string,\n): Promise<FundCreditsResult> {\n const sender = await clientManager.getAddress();\n const recipient = tenant ?? sender;\n const result = await cosmosTx(\n clientManager,\n 'billing',\n 'fund-credit',\n [recipient, amount],\n true,\n overrides,\n );\n return {\n ...result,\n sender,\n tenant: recipient,\n amount,\n };\n}\n"],"mappings":";;AAUA,eAAsB,YACpB,eACA,QACA,WACA,QAC4B;CAC5B,MAAM,SAAS,MAAM,cAAc,YAAY;CAC/C,MAAM,YAAY,UAAU;AAS5B,QAAO;EACL,GATa,MAAM,SACnB,eACA,WACA,eACA,CAAC,WAAW,OAAO,EACnB,MACA,UACD;EAGC;EACA,QAAQ;EACR;EACD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manifest-network/manifest-mcp-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Shared library for Cosmos SDK blockchain logic, tool functions, and server utilities (Manifest Network)",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@cosmjs/encoding": "0.32.4",
|
|
57
57
|
"@cosmjs/proto-signing": "0.32.4",
|
|
58
58
|
"@cosmjs/stargate": "npm:@manifest-network/stargate@0.32.4-ll.3",
|
|
59
|
-
"@manifest-network/manifestjs": "2.
|
|
59
|
+
"@manifest-network/manifestjs": "2.3.0",
|
|
60
60
|
"@modelcontextprotocol/sdk": "1.27.1",
|
|
61
61
|
"limiter": "3.0.0"
|
|
62
62
|
},
|