@nevermined-io/commons 1.2.1 → 1.3.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/lib/constants/DelegationCurrencies.d.ts +25 -0
- package/dist/lib/constants/DelegationCurrencies.d.ts.map +1 -0
- package/dist/lib/constants/DelegationCurrencies.js +29 -0
- package/dist/lib/constants/DelegationCurrencies.js.map +1 -0
- package/dist/lib/constants/index.d.ts +2 -0
- package/dist/lib/constants/index.d.ts.map +1 -1
- package/dist/lib/constants/index.js +1 -0
- package/dist/lib/constants/index.js.map +1 -1
- package/dist/lib/types/DDOTypes.d.ts +21 -0
- package/dist/lib/types/DDOTypes.d.ts.map +1 -1
- package/dist/lib/types/DDOTypes.js +11 -0
- package/dist/lib/types/DDOTypes.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/constants/DelegationCurrencies.ts +22 -0
- package/src/lib/constants/index.ts +2 -0
- package/src/lib/types/DDOTypes.ts +24 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Selectable currencies for delegation creation, grouped by rail. Delegations
|
|
3
|
+
* are plan-agnostic (#1534) so the user picks the currency; the backend enum is
|
|
4
|
+
* usd|eur|usdc|eurc (#1677). `label` is the spending-limit suffix — '$'/'€'
|
|
5
|
+
* prefixed for fiat, 'USDC'/'EURC' appended for crypto. Single source for both
|
|
6
|
+
* the webapp delegation dialog and the embed delegation form so the option
|
|
7
|
+
* lists can't drift (#2014).
|
|
8
|
+
*/
|
|
9
|
+
export declare const FIAT_CURRENCIES: readonly [{
|
|
10
|
+
readonly value: "usd";
|
|
11
|
+
readonly label: "$";
|
|
12
|
+
}, {
|
|
13
|
+
readonly value: "eur";
|
|
14
|
+
readonly label: "€";
|
|
15
|
+
}];
|
|
16
|
+
export declare const CRYPTO_CURRENCIES: readonly [{
|
|
17
|
+
readonly value: "usdc";
|
|
18
|
+
readonly label: "USDC";
|
|
19
|
+
}, {
|
|
20
|
+
readonly value: "eurc";
|
|
21
|
+
readonly label: "EURC";
|
|
22
|
+
}];
|
|
23
|
+
/** The closed currency union, derived from the arrays so it can't fall out of sync. */
|
|
24
|
+
export type DelegationCurrency = (typeof FIAT_CURRENCIES)[number]['value'] | (typeof CRYPTO_CURRENCIES)[number]['value'];
|
|
25
|
+
//# sourceMappingURL=DelegationCurrencies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DelegationCurrencies.d.ts","sourceRoot":"","sources":["../../../src/lib/constants/DelegationCurrencies.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe;;;;;;EAGlB,CAAA;AAEV,eAAO,MAAM,iBAAiB;;;;;;EAGpB,CAAA;AAEV,uFAAuF;AACvF,MAAM,MAAM,kBAAkB,GAC1B,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,GACzC,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Selectable currencies for delegation creation, grouped by rail. Delegations
|
|
3
|
+
* are plan-agnostic (#1534) so the user picks the currency; the backend enum is
|
|
4
|
+
* usd|eur|usdc|eurc (#1677). `label` is the spending-limit suffix — '$'/'€'
|
|
5
|
+
* prefixed for fiat, 'USDC'/'EURC' appended for crypto. Single source for both
|
|
6
|
+
* the webapp delegation dialog and the embed delegation form so the option
|
|
7
|
+
* lists can't drift (#2014).
|
|
8
|
+
*/ export const FIAT_CURRENCIES = [
|
|
9
|
+
{
|
|
10
|
+
value: 'usd',
|
|
11
|
+
label: '$'
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
value: 'eur',
|
|
15
|
+
label: '€'
|
|
16
|
+
}
|
|
17
|
+
];
|
|
18
|
+
export const CRYPTO_CURRENCIES = [
|
|
19
|
+
{
|
|
20
|
+
value: 'usdc',
|
|
21
|
+
label: 'USDC'
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
value: 'eurc',
|
|
25
|
+
label: 'EURC'
|
|
26
|
+
}
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=DelegationCurrencies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/constants/DelegationCurrencies.ts"],"sourcesContent":["/**\n * Selectable currencies for delegation creation, grouped by rail. Delegations\n * are plan-agnostic (#1534) so the user picks the currency; the backend enum is\n * usd|eur|usdc|eurc (#1677). `label` is the spending-limit suffix — '$'/'€'\n * prefixed for fiat, 'USDC'/'EURC' appended for crypto. Single source for both\n * the webapp delegation dialog and the embed delegation form so the option\n * lists can't drift (#2014).\n */\nexport const FIAT_CURRENCIES = [\n { value: 'usd', label: '$' },\n { value: 'eur', label: '€' },\n] as const\n\nexport const CRYPTO_CURRENCIES = [\n { value: 'usdc', label: 'USDC' },\n { value: 'eurc', label: 'EURC' },\n] as const\n\n/** The closed currency union, derived from the arrays so it can't fall out of sync. */\nexport type DelegationCurrency =\n | (typeof FIAT_CURRENCIES)[number]['value']\n | (typeof CRYPTO_CURRENCIES)[number]['value']\n"],"names":["FIAT_CURRENCIES","value","label","CRYPTO_CURRENCIES"],"mappings":"AAAA;;;;;;;CAOC,GACD,OAAO,MAAMA,kBAAkB;IAC7B;QAAEC,OAAO;QAAOC,OAAO;IAAI;IAC3B;QAAED,OAAO;QAAOC,OAAO;IAAI;CAC5B,CAAS;AAEV,OAAO,MAAMC,oBAAoB;IAC/B;QAAEF,OAAO;QAAQC,OAAO;IAAO;IAC/B;QAAED,OAAO;QAAQC,OAAO;IAAO;CAChC,CAAS"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { DEFAULT_ENCRYPTION_METHOD, NETWORK_FEE_DENOMINATOR } from './AssetConstants.js';
|
|
2
2
|
export type { EncryptionMethod } from './AssetConstants.js';
|
|
3
|
+
export { FIAT_CURRENCIES, CRYPTO_CURRENCIES } from './DelegationCurrencies.js';
|
|
4
|
+
export type { DelegationCurrency } from './DelegationCurrencies.js';
|
|
3
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AACxF,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AACxF,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC9E,YAAY,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/constants/index.ts"],"sourcesContent":["export { DEFAULT_ENCRYPTION_METHOD, NETWORK_FEE_DENOMINATOR } from './AssetConstants.js'\nexport type { EncryptionMethod } from './AssetConstants.js'\n"],"names":["DEFAULT_ENCRYPTION_METHOD","NETWORK_FEE_DENOMINATOR"],"mappings":"AAAA,SAASA,yBAAyB,EAAEC,uBAAuB,QAAQ,sBAAqB"}
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/constants/index.ts"],"sourcesContent":["export { DEFAULT_ENCRYPTION_METHOD, NETWORK_FEE_DENOMINATOR } from './AssetConstants.js'\nexport type { EncryptionMethod } from './AssetConstants.js'\nexport { FIAT_CURRENCIES, CRYPTO_CURRENCIES } from './DelegationCurrencies.js'\nexport type { DelegationCurrency } from './DelegationCurrencies.js'\n"],"names":["DEFAULT_ENCRYPTION_METHOD","NETWORK_FEE_DENOMINATOR","FIAT_CURRENCIES","CRYPTO_CURRENCIES"],"mappings":"AAAA,SAASA,yBAAyB,EAAEC,uBAAuB,QAAQ,sBAAqB;AAExF,SAASC,eAAe,EAAEC,iBAAiB,QAAQ,4BAA2B"}
|
|
@@ -54,6 +54,16 @@ export interface AgentMetadata {
|
|
|
54
54
|
* This attribute is useful to indicate which endpoints are available for public access (documentation, definitions, etc).
|
|
55
55
|
*/
|
|
56
56
|
openEndpoints?: string[];
|
|
57
|
+
/**
|
|
58
|
+
* URL to a discoverable agent definition (A2A Agent Card, MCP Manifest, or
|
|
59
|
+
* OpenAPI spec). Used for documentation/discovery only.
|
|
60
|
+
*/
|
|
61
|
+
agentDefinitionUrl?: string;
|
|
62
|
+
/**
|
|
63
|
+
* The integration protocol the agent speaks. Drives the registration UX
|
|
64
|
+
* guidance and discovery/catalogue categorisation. Optional.
|
|
65
|
+
*/
|
|
66
|
+
integrationType?: AgentIntegrationType;
|
|
57
67
|
requiredHeaders?: {
|
|
58
68
|
[verb: string]: string;
|
|
59
69
|
}[];
|
|
@@ -135,6 +145,17 @@ export declare enum ApiAuthenticationType {
|
|
|
135
145
|
bearer = "bearer",
|
|
136
146
|
oauth = "oauth"
|
|
137
147
|
}
|
|
148
|
+
/**
|
|
149
|
+
* The integration protocol an agent exposes. Mirrors the taxonomy Google's
|
|
150
|
+
* Agentic Resource Discovery catalogue switches on (A2A / MCP / OpenAPI), plus
|
|
151
|
+
* an "other" escape hatch.
|
|
152
|
+
*/
|
|
153
|
+
export declare enum AgentIntegrationType {
|
|
154
|
+
a2a = "a2a",
|
|
155
|
+
mcp = "mcp",
|
|
156
|
+
rest = "rest",
|
|
157
|
+
other = "other"
|
|
158
|
+
}
|
|
138
159
|
export type ApiEndpoint = {
|
|
139
160
|
[verb: string]: string;
|
|
140
161
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DDOTypes.d.ts","sourceRoot":"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,oBAAY,oBAAoB;IAC9B,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED,MAAM,MAAM,WAAW,GAAG;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAA;AAEpD,oBAAY,eAAe;IACzB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,WAAW,gBAAgB;CAC5B"}
|
|
@@ -5,6 +5,17 @@ export var ApiAuthenticationType = /*#__PURE__*/ function(ApiAuthenticationType)
|
|
|
5
5
|
ApiAuthenticationType["oauth"] = "oauth";
|
|
6
6
|
return ApiAuthenticationType;
|
|
7
7
|
}({});
|
|
8
|
+
/**
|
|
9
|
+
* The integration protocol an agent exposes. Mirrors the taxonomy Google's
|
|
10
|
+
* Agentic Resource Discovery catalogue switches on (A2A / MCP / OpenAPI), plus
|
|
11
|
+
* an "other" escape hatch.
|
|
12
|
+
*/ export var AgentIntegrationType = /*#__PURE__*/ function(AgentIntegrationType) {
|
|
13
|
+
AgentIntegrationType["a2a"] = "a2a";
|
|
14
|
+
AgentIntegrationType["mcp"] = "mcp";
|
|
15
|
+
AgentIntegrationType["rest"] = "rest";
|
|
16
|
+
AgentIntegrationType["other"] = "other";
|
|
17
|
+
return AgentIntegrationType;
|
|
18
|
+
}({});
|
|
8
19
|
export var AgentTaskStatus = /*#__PURE__*/ function(AgentTaskStatus) {
|
|
9
20
|
AgentTaskStatus["SUCCESS"] = "Success";
|
|
10
21
|
AgentTaskStatus["FAILURE"] = "Failure";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/types/DDOTypes.ts"],"sourcesContent":["import { CreditsConfig, PriceConfig } from './ContractsTypes.js'\n\nexport interface Metadata {\n serviceEndpoint: string\n main: MetadataMainAttributes\n agent?: AgentMetadata\n additionalInformation?: unknown\n curation: Curation\n plan?: PlanMetadata\n}\n\nexport interface NvmConfigVersions {\n id: number\n updated: string\n checksum: string\n}\nexport interface NvmConfig {\n userId: string\n userAddress: string\n appId: string\n versions: NvmConfigVersions[]\n}\n\nexport interface Proof {\n created: string\n creator: string\n signatureValue: string\n type: string\n}\n\nexport interface MetadataMainAttributes {\n name: string\n description?: string\n author?: string\n dateCreated?: string\n datePublished?: string\n license?: string\n tags?: string[]\n}\n\n/**\n * Interface describing an asset of type `service`\n */\nexport interface AgentMetadata {\n /**\n * Type of Web service\n */\n apiType?: 'restful' | 'graphql' | 'rpc' | 'other'\n\n /**\n * Authentication required by the API\n */\n authentication?: ResourceAuthentication\n\n /**\n * List of endpoints of the API exposed by the Agent\n */\n endpoints?: ApiEndpoint[]\n\n /**\n * List of open endpoints available for the agent. These endpoints are not protected.\n * This attribute is useful to indicate which endpoints are available for public access (documentation, definitions, etc).\n */\n openEndpoints?: string[]\n\n requiredHeaders?: { [verb: string]: string }[]\n\n encryptedAttributes?: string\n}\n\nexport interface PlanMetadata {\n isTrialPlan?: boolean\n productId?: string\n priceId?: string\n recurringSubscription?: boolean\n accessLimit: 'credits' | 'time'\n fiatPaymentProvider?: 'stripe' | 'braintree'\n currency?: string\n /**\n * x402 payment scheme identifier (e.g., 'nvm:erc4337')\n */\n x402Scheme?: string\n /**\n * URL of the x402 facilitator endpoint\n */\n x402FacilitatorUrl?: string\n /**\n * URL to the x402 scheme specification\n */\n x402SpecUrl?: string\n}\n\nexport interface AgentRegistry {\n owner: string\n creator: string\n url: string\n lastUpdated: string\n plans: string[]\n}\n\nexport interface PlanRegistry {\n owner: string\n lastUpdated: string\n price: PriceConfig\n credits: CreditsConfig\n}\n\nexport interface ResourceAuthentication {\n type: ApiAuthenticationType\n\n user?: string\n password?: string\n token?: string\n encrypted?: boolean\n privateParameters?: { [name: string]: string }[]\n}\n\n/**\n * Curation attributes of Assets Metadata.\n * @see https://github.com/nevermined-io/docs/blob/master/docs/architecture/specs/metadata/README.md#curation-attributes\n */\nexport interface Curation {\n /**\n * Decimal value between 0 and 1. 0 is the default value.\n * @example 0.93\n */\n rating: number\n\n /**\n * Number of votes. 0 is the default value.\n * @example 123\n */\n numVotes: number\n\n /**\n * Schema applied to calculate the rating.\n * @example \"Binary Voting\"\n */\n schema?: string\n\n /**\n * Flag unsuitable content.\n * @example true\n */\n isListed?: boolean\n}\n\nexport enum ApiAuthenticationType {\n none = 'none',\n basic = 'basic',\n bearer = 'bearer',\n oauth = 'oauth',\n}\n\nexport type ApiEndpoint = { [verb: string]: string }\n\nexport enum AgentTaskStatus {\n SUCCESS = 'Success',\n FAILURE = 'Failure',\n PENDING = 'Pending',\n IN_PROGRESS = 'In_Progress',\n}\n"],"names":["ApiAuthenticationType","AgentTaskStatus"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/types/DDOTypes.ts"],"sourcesContent":["import { CreditsConfig, PriceConfig } from './ContractsTypes.js'\n\nexport interface Metadata {\n serviceEndpoint: string\n main: MetadataMainAttributes\n agent?: AgentMetadata\n additionalInformation?: unknown\n curation: Curation\n plan?: PlanMetadata\n}\n\nexport interface NvmConfigVersions {\n id: number\n updated: string\n checksum: string\n}\nexport interface NvmConfig {\n userId: string\n userAddress: string\n appId: string\n versions: NvmConfigVersions[]\n}\n\nexport interface Proof {\n created: string\n creator: string\n signatureValue: string\n type: string\n}\n\nexport interface MetadataMainAttributes {\n name: string\n description?: string\n author?: string\n dateCreated?: string\n datePublished?: string\n license?: string\n tags?: string[]\n}\n\n/**\n * Interface describing an asset of type `service`\n */\nexport interface AgentMetadata {\n /**\n * Type of Web service\n */\n apiType?: 'restful' | 'graphql' | 'rpc' | 'other'\n\n /**\n * Authentication required by the API\n */\n authentication?: ResourceAuthentication\n\n /**\n * List of endpoints of the API exposed by the Agent\n */\n endpoints?: ApiEndpoint[]\n\n /**\n * List of open endpoints available for the agent. These endpoints are not protected.\n * This attribute is useful to indicate which endpoints are available for public access (documentation, definitions, etc).\n */\n openEndpoints?: string[]\n\n /**\n * URL to a discoverable agent definition (A2A Agent Card, MCP Manifest, or\n * OpenAPI spec). Used for documentation/discovery only.\n */\n agentDefinitionUrl?: string\n\n /**\n * The integration protocol the agent speaks. Drives the registration UX\n * guidance and discovery/catalogue categorisation. Optional.\n */\n integrationType?: AgentIntegrationType\n\n requiredHeaders?: { [verb: string]: string }[]\n\n encryptedAttributes?: string\n}\n\nexport interface PlanMetadata {\n isTrialPlan?: boolean\n productId?: string\n priceId?: string\n recurringSubscription?: boolean\n accessLimit: 'credits' | 'time'\n fiatPaymentProvider?: 'stripe' | 'braintree'\n currency?: string\n /**\n * x402 payment scheme identifier (e.g., 'nvm:erc4337')\n */\n x402Scheme?: string\n /**\n * URL of the x402 facilitator endpoint\n */\n x402FacilitatorUrl?: string\n /**\n * URL to the x402 scheme specification\n */\n x402SpecUrl?: string\n}\n\nexport interface AgentRegistry {\n owner: string\n creator: string\n url: string\n lastUpdated: string\n plans: string[]\n}\n\nexport interface PlanRegistry {\n owner: string\n lastUpdated: string\n price: PriceConfig\n credits: CreditsConfig\n}\n\nexport interface ResourceAuthentication {\n type: ApiAuthenticationType\n\n user?: string\n password?: string\n token?: string\n encrypted?: boolean\n privateParameters?: { [name: string]: string }[]\n}\n\n/**\n * Curation attributes of Assets Metadata.\n * @see https://github.com/nevermined-io/docs/blob/master/docs/architecture/specs/metadata/README.md#curation-attributes\n */\nexport interface Curation {\n /**\n * Decimal value between 0 and 1. 0 is the default value.\n * @example 0.93\n */\n rating: number\n\n /**\n * Number of votes. 0 is the default value.\n * @example 123\n */\n numVotes: number\n\n /**\n * Schema applied to calculate the rating.\n * @example \"Binary Voting\"\n */\n schema?: string\n\n /**\n * Flag unsuitable content.\n * @example true\n */\n isListed?: boolean\n}\n\nexport enum ApiAuthenticationType {\n none = 'none',\n basic = 'basic',\n bearer = 'bearer',\n oauth = 'oauth',\n}\n\n/**\n * The integration protocol an agent exposes. Mirrors the taxonomy Google's\n * Agentic Resource Discovery catalogue switches on (A2A / MCP / OpenAPI), plus\n * an \"other\" escape hatch.\n */\nexport enum AgentIntegrationType {\n a2a = 'a2a',\n mcp = 'mcp',\n rest = 'rest',\n other = 'other',\n}\n\nexport type ApiEndpoint = { [verb: string]: string }\n\nexport enum AgentTaskStatus {\n SUCCESS = 'Success',\n FAILURE = 'Failure',\n PENDING = 'Pending',\n IN_PROGRESS = 'In_Progress',\n}\n"],"names":["ApiAuthenticationType","AgentIntegrationType","AgentTaskStatus"],"mappings":"AA+JA,OAAO,IAAA,AAAKA,+CAAAA;;;;;WAAAA;MAKX;AAED;;;;CAIC,GACD,OAAO,IAAA,AAAKC,8CAAAA;;;;;WAAAA;MAKX;AAID,OAAO,IAAA,AAAKC,yCAAAA;;;;;WAAAA;MAKX"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Selectable currencies for delegation creation, grouped by rail. Delegations
|
|
3
|
+
* are plan-agnostic (#1534) so the user picks the currency; the backend enum is
|
|
4
|
+
* usd|eur|usdc|eurc (#1677). `label` is the spending-limit suffix — '$'/'€'
|
|
5
|
+
* prefixed for fiat, 'USDC'/'EURC' appended for crypto. Single source for both
|
|
6
|
+
* the webapp delegation dialog and the embed delegation form so the option
|
|
7
|
+
* lists can't drift (#2014).
|
|
8
|
+
*/
|
|
9
|
+
export const FIAT_CURRENCIES = [
|
|
10
|
+
{ value: 'usd', label: '$' },
|
|
11
|
+
{ value: 'eur', label: '€' },
|
|
12
|
+
] as const
|
|
13
|
+
|
|
14
|
+
export const CRYPTO_CURRENCIES = [
|
|
15
|
+
{ value: 'usdc', label: 'USDC' },
|
|
16
|
+
{ value: 'eurc', label: 'EURC' },
|
|
17
|
+
] as const
|
|
18
|
+
|
|
19
|
+
/** The closed currency union, derived from the arrays so it can't fall out of sync. */
|
|
20
|
+
export type DelegationCurrency =
|
|
21
|
+
| (typeof FIAT_CURRENCIES)[number]['value']
|
|
22
|
+
| (typeof CRYPTO_CURRENCIES)[number]['value']
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export { DEFAULT_ENCRYPTION_METHOD, NETWORK_FEE_DENOMINATOR } from './AssetConstants.js'
|
|
2
2
|
export type { EncryptionMethod } from './AssetConstants.js'
|
|
3
|
+
export { FIAT_CURRENCIES, CRYPTO_CURRENCIES } from './DelegationCurrencies.js'
|
|
4
|
+
export type { DelegationCurrency } from './DelegationCurrencies.js'
|
|
@@ -63,6 +63,18 @@ export interface AgentMetadata {
|
|
|
63
63
|
*/
|
|
64
64
|
openEndpoints?: string[]
|
|
65
65
|
|
|
66
|
+
/**
|
|
67
|
+
* URL to a discoverable agent definition (A2A Agent Card, MCP Manifest, or
|
|
68
|
+
* OpenAPI spec). Used for documentation/discovery only.
|
|
69
|
+
*/
|
|
70
|
+
agentDefinitionUrl?: string
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The integration protocol the agent speaks. Drives the registration UX
|
|
74
|
+
* guidance and discovery/catalogue categorisation. Optional.
|
|
75
|
+
*/
|
|
76
|
+
integrationType?: AgentIntegrationType
|
|
77
|
+
|
|
66
78
|
requiredHeaders?: { [verb: string]: string }[]
|
|
67
79
|
|
|
68
80
|
encryptedAttributes?: string
|
|
@@ -152,6 +164,18 @@ export enum ApiAuthenticationType {
|
|
|
152
164
|
oauth = 'oauth',
|
|
153
165
|
}
|
|
154
166
|
|
|
167
|
+
/**
|
|
168
|
+
* The integration protocol an agent exposes. Mirrors the taxonomy Google's
|
|
169
|
+
* Agentic Resource Discovery catalogue switches on (A2A / MCP / OpenAPI), plus
|
|
170
|
+
* an "other" escape hatch.
|
|
171
|
+
*/
|
|
172
|
+
export enum AgentIntegrationType {
|
|
173
|
+
a2a = 'a2a',
|
|
174
|
+
mcp = 'mcp',
|
|
175
|
+
rest = 'rest',
|
|
176
|
+
other = 'other',
|
|
177
|
+
}
|
|
178
|
+
|
|
155
179
|
export type ApiEndpoint = { [verb: string]: string }
|
|
156
180
|
|
|
157
181
|
export enum AgentTaskStatus {
|