@ocap/message 1.28.8 → 1.29.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/README.md +0 -1
- package/esm/_virtual/rolldown_runtime.mjs +8 -0
- package/esm/index.d.mts +3 -0
- package/esm/index.mjs +10 -0
- package/esm/message.d.mts +144 -0
- package/esm/message.mjs +484 -0
- package/esm/package.mjs +87 -0
- package/esm/patch.d.mts +1 -0
- package/esm/patch.mjs +40 -0
- package/esm/provider.d.mts +27 -0
- package/esm/provider.mjs +42 -0
- package/lib/_virtual/rolldown_runtime.cjs +31 -0
- package/lib/index.cjs +26 -0
- package/lib/index.d.cts +3 -0
- package/lib/message.cjs +500 -0
- package/lib/message.d.cts +144 -0
- package/lib/package.cjs +90 -0
- package/lib/patch.cjs +41 -0
- package/lib/patch.d.cts +1 -0
- package/lib/provider.cjs +49 -0
- package/lib/provider.d.cts +27 -0
- package/package.json +32 -11
- package/index.d.ts +0 -5
- package/index.js +0 -7
- package/lib/message.d.ts +0 -138
- package/lib/message.js +0 -605
- package/lib/patch.d.ts +0 -1
- package/lib/patch.js +0 -57
- package/lib/provider.d.ts +0 -12
- package/lib/provider.js +0 -68
package/lib/package.cjs
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
2
|
+
|
|
3
|
+
//#region package.json
|
|
4
|
+
var require_package = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
|
|
5
|
+
module.exports = {
|
|
6
|
+
"name": "@ocap/message",
|
|
7
|
+
"description": "Utility functions to encode and decode message that can send to forge",
|
|
8
|
+
"version": "1.20.2",
|
|
9
|
+
"author": {
|
|
10
|
+
"name": "wangshijun",
|
|
11
|
+
"email": "shijun@arcblock.io",
|
|
12
|
+
"url": "https://github.com/wangshijun"
|
|
13
|
+
},
|
|
14
|
+
"contributors": ["wangshijun <shijun@arcblock.io> (https://github.com/wangshijun)"],
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/ArcBlock/blockchain/issues",
|
|
17
|
+
"email": "shijun@arcblock.io"
|
|
18
|
+
},
|
|
19
|
+
"publishConfig": { "access": "public" },
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@ocap/proto": "workspace:*",
|
|
22
|
+
"@ocap/util": "workspace:*",
|
|
23
|
+
"debug": "^4.4.3",
|
|
24
|
+
"google-protobuf": "3.21.0",
|
|
25
|
+
"lodash": "^4.17.23"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@types/google-protobuf": "^3.15.12",
|
|
29
|
+
"jsdoc-to-markdown": "^7.1.1",
|
|
30
|
+
"remark-cli": "^10.0.1",
|
|
31
|
+
"remark-preset-github": "^4.0.4"
|
|
32
|
+
},
|
|
33
|
+
"remarkConfig": { "plugins": ["preset-github", [{ "repository": "ArcBlock/blockchain" }]] },
|
|
34
|
+
"homepage": "https://github.com/ArcBlock/blockchain/tree/master/core/forge-message",
|
|
35
|
+
"keywords": [
|
|
36
|
+
"blockchain",
|
|
37
|
+
"arcblock",
|
|
38
|
+
"sdk",
|
|
39
|
+
"nodejs"
|
|
40
|
+
],
|
|
41
|
+
"license": "Apache-2.0",
|
|
42
|
+
"type": "module",
|
|
43
|
+
"main": "./lib/index.cjs",
|
|
44
|
+
"module": "./esm/index.mjs",
|
|
45
|
+
"types": "./esm/index.d.mts",
|
|
46
|
+
"exports": {
|
|
47
|
+
".": {
|
|
48
|
+
"types": "./esm/index.d.mts",
|
|
49
|
+
"import": "./esm/index.mjs",
|
|
50
|
+
"default": "./lib/index.cjs"
|
|
51
|
+
},
|
|
52
|
+
"./lib/*.js": {
|
|
53
|
+
"types": "./esm/*.d.mts",
|
|
54
|
+
"import": "./esm/*.mjs",
|
|
55
|
+
"default": "./lib/*.cjs"
|
|
56
|
+
},
|
|
57
|
+
"./lib/*": {
|
|
58
|
+
"types": "./esm/*.d.mts",
|
|
59
|
+
"import": "./esm/*.mjs",
|
|
60
|
+
"default": "./lib/*.cjs"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"files": ["lib", "esm"],
|
|
64
|
+
"repository": {
|
|
65
|
+
"type": "git",
|
|
66
|
+
"url": "https://github.com/ArcBlock/blockchain/tree/master/core/forge-message"
|
|
67
|
+
},
|
|
68
|
+
"scripts": {
|
|
69
|
+
"build": "tsdown",
|
|
70
|
+
"prebuild": "rm -rf lib esm",
|
|
71
|
+
"lint": "biome check",
|
|
72
|
+
"lint:fix": "biome check --write",
|
|
73
|
+
"docs": "bun run gen-docs && bun run cleanup-docs && bun run format-docs",
|
|
74
|
+
"cleanup-docs": "node ../../scripts/cleanup-docs.js docs/README.md $npm_package_name",
|
|
75
|
+
"gen-docs": "jsdoc2md lib/message.js > docs/README.md",
|
|
76
|
+
"format-docs": "remark . -o",
|
|
77
|
+
"test": "bun test",
|
|
78
|
+
"coverage": "npm run test -- --coverage"
|
|
79
|
+
},
|
|
80
|
+
"gitHead": "87990c8b5e215107fc587c1ced0d6b3e2cd2483e"
|
|
81
|
+
};
|
|
82
|
+
}));
|
|
83
|
+
|
|
84
|
+
//#endregion
|
|
85
|
+
Object.defineProperty(exports, 'default', {
|
|
86
|
+
enumerable: true,
|
|
87
|
+
get: function () {
|
|
88
|
+
return require_package();
|
|
89
|
+
}
|
|
90
|
+
});
|
package/lib/patch.cjs
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_package$1 = require('./package.cjs');
|
|
3
|
+
let assert = require("assert");
|
|
4
|
+
assert = require_rolldown_runtime.__toESM(assert);
|
|
5
|
+
let debug = require("debug");
|
|
6
|
+
debug = require_rolldown_runtime.__toESM(debug);
|
|
7
|
+
|
|
8
|
+
//#region src/patch.ts
|
|
9
|
+
/**
|
|
10
|
+
* This patch fixes an issue in `google-protobuf` package
|
|
11
|
+
* After this patch is applied: The deserialize of `map` fields can accept empty values
|
|
12
|
+
*/
|
|
13
|
+
const jspb = require("google-protobuf");
|
|
14
|
+
const debug$1 = (0, debug.default)(`${require_package$1.default.name}:Map`);
|
|
15
|
+
if (typeof jspb.Map.deserializeBinary === "function" && !jspb.Map.deserializeBinary.__patched__) {
|
|
16
|
+
jspb.Map.deserializeBinary = (map, reader, keyReaderFn, valueReaderFn, opt_valueReaderCallback, opt_defaultKey = 0) => {
|
|
17
|
+
let key = opt_defaultKey;
|
|
18
|
+
let value;
|
|
19
|
+
while (reader.nextField()) {
|
|
20
|
+
if (reader.isEndGroup()) break;
|
|
21
|
+
const field = reader.getFieldNumber();
|
|
22
|
+
debug$1("deserializeBinary.field", field);
|
|
23
|
+
if (field === 1) {
|
|
24
|
+
key = keyReaderFn.call(reader);
|
|
25
|
+
debug$1("deserializeBinary.key", key);
|
|
26
|
+
} else if (field === 2) {
|
|
27
|
+
debug$1("deserializeBinary.map", map);
|
|
28
|
+
if (map.valueCtor_) {
|
|
29
|
+
(0, assert.default)(opt_valueReaderCallback, "opt_valueReaderCallback");
|
|
30
|
+
value = new map.valueCtor_();
|
|
31
|
+
valueReaderFn.call(reader, value, opt_valueReaderCallback);
|
|
32
|
+
} else value = valueReaderFn.call(reader);
|
|
33
|
+
debug$1("deserializeBinary.value", typeof value?.toObject === "function" ? value.toObject() : value);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
if (typeof key !== "undefined" && typeof value !== "undefined") map.set(key, value);
|
|
37
|
+
};
|
|
38
|
+
jspb.Map.deserializeBinary.__patched__ = true;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
//#endregion
|
package/lib/patch.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/lib/provider.cjs
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/provider.ts
|
|
3
|
+
const providers = [];
|
|
4
|
+
const enums = {};
|
|
5
|
+
const messages = {};
|
|
6
|
+
function getMessageType(type) {
|
|
7
|
+
const provider = providers.find((x) => x.getMessageType(type).fn);
|
|
8
|
+
if (provider) return provider.getMessageType(type);
|
|
9
|
+
return {};
|
|
10
|
+
}
|
|
11
|
+
function toTypeUrl(type) {
|
|
12
|
+
const provider = providers.find((x) => x.toTypeUrl(type) !== type);
|
|
13
|
+
if (provider) return provider.toTypeUrl(type);
|
|
14
|
+
return type;
|
|
15
|
+
}
|
|
16
|
+
function fromTypeUrl(url) {
|
|
17
|
+
const provider = providers.find((x) => x.fromTypeUrl(url) !== url);
|
|
18
|
+
if (provider) return provider.fromTypeUrl(url);
|
|
19
|
+
return url;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Add type provider that can be used to format/create messages
|
|
23
|
+
*
|
|
24
|
+
* @param provider - proto generated from @ocap/proto
|
|
25
|
+
*/
|
|
26
|
+
function addProvider(provider) {
|
|
27
|
+
if ([
|
|
28
|
+
"getMessageType",
|
|
29
|
+
"toTypeUrl",
|
|
30
|
+
"fromTypeUrl"
|
|
31
|
+
].some((x) => typeof provider[x] !== "function")) throw new Error("addProvider requires a valid proto provider");
|
|
32
|
+
if (providers.includes(provider) === false) {
|
|
33
|
+
providers.push(provider);
|
|
34
|
+
if (provider.enums) Object.assign(enums, provider.enums);
|
|
35
|
+
if (provider.messages) Object.assign(messages, provider.messages);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function resetProviders() {
|
|
39
|
+
while (providers.length) providers.pop();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
//#endregion
|
|
43
|
+
exports.addProvider = addProvider;
|
|
44
|
+
exports.enums = enums;
|
|
45
|
+
exports.fromTypeUrl = fromTypeUrl;
|
|
46
|
+
exports.getMessageType = getMessageType;
|
|
47
|
+
exports.messages = messages;
|
|
48
|
+
exports.resetProviders = resetProviders;
|
|
49
|
+
exports.toTypeUrl = toTypeUrl;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region src/provider.d.ts
|
|
2
|
+
interface MessageTypeResult {
|
|
3
|
+
fn?: new () => unknown;
|
|
4
|
+
fields?: Record<string, unknown>;
|
|
5
|
+
oneofs?: Record<string, unknown>;
|
|
6
|
+
}
|
|
7
|
+
interface ProtoProvider {
|
|
8
|
+
getMessageType(type: string): MessageTypeResult;
|
|
9
|
+
toTypeUrl(type: string): string;
|
|
10
|
+
fromTypeUrl(url: string): string;
|
|
11
|
+
enums?: Record<string, Record<string | number, string | number>>;
|
|
12
|
+
messages?: Record<string, Record<string | number, string>>;
|
|
13
|
+
}
|
|
14
|
+
declare const enums: Record<string, Record<string | number, string | number>>;
|
|
15
|
+
declare const messages: Record<string, Record<string | number, string>>;
|
|
16
|
+
declare function getMessageType(type: string): MessageTypeResult;
|
|
17
|
+
declare function toTypeUrl(type: string): string;
|
|
18
|
+
declare function fromTypeUrl(url: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Add type provider that can be used to format/create messages
|
|
21
|
+
*
|
|
22
|
+
* @param provider - proto generated from @ocap/proto
|
|
23
|
+
*/
|
|
24
|
+
declare function addProvider(provider: ProtoProvider): void;
|
|
25
|
+
declare function resetProviders(): void;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { type MessageTypeResult, type ProtoProvider, addProvider, enums, fromTypeUrl, getMessageType, messages, resetProviders, toTypeUrl };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ocap/message",
|
|
3
3
|
"description": "Utility functions to encode and decode message that can send to forge",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.29.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "wangshijun",
|
|
7
7
|
"email": "shijun@arcblock.io",
|
|
@@ -18,13 +18,14 @@
|
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@ocap/proto": "1.
|
|
22
|
-
"@ocap/util": "1.
|
|
23
|
-
"debug": "^4.3
|
|
21
|
+
"@ocap/proto": "1.29.0",
|
|
22
|
+
"@ocap/util": "1.29.0",
|
|
23
|
+
"debug": "^4.4.3",
|
|
24
24
|
"google-protobuf": "3.21.0",
|
|
25
|
-
"lodash": "^4.17.
|
|
25
|
+
"lodash": "^4.17.23"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
+
"@types/google-protobuf": "^3.15.12",
|
|
28
29
|
"jsdoc-to-markdown": "^7.1.1",
|
|
29
30
|
"remark-cli": "^10.0.1",
|
|
30
31
|
"remark-preset-github": "^4.0.4"
|
|
@@ -47,24 +48,44 @@
|
|
|
47
48
|
"nodejs"
|
|
48
49
|
],
|
|
49
50
|
"license": "Apache-2.0",
|
|
50
|
-
"
|
|
51
|
+
"type": "module",
|
|
52
|
+
"main": "./lib/index.cjs",
|
|
53
|
+
"module": "./esm/index.mjs",
|
|
54
|
+
"types": "./esm/index.d.mts",
|
|
55
|
+
"exports": {
|
|
56
|
+
".": {
|
|
57
|
+
"types": "./esm/index.d.mts",
|
|
58
|
+
"import": "./esm/index.mjs",
|
|
59
|
+
"default": "./lib/index.cjs"
|
|
60
|
+
},
|
|
61
|
+
"./lib/*.js": {
|
|
62
|
+
"types": "./esm/*.d.mts",
|
|
63
|
+
"import": "./esm/*.mjs",
|
|
64
|
+
"default": "./lib/*.cjs"
|
|
65
|
+
},
|
|
66
|
+
"./lib/*": {
|
|
67
|
+
"types": "./esm/*.d.mts",
|
|
68
|
+
"import": "./esm/*.mjs",
|
|
69
|
+
"default": "./lib/*.cjs"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
51
72
|
"files": [
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"lib"
|
|
73
|
+
"lib",
|
|
74
|
+
"esm"
|
|
55
75
|
],
|
|
56
76
|
"repository": {
|
|
57
77
|
"type": "git",
|
|
58
78
|
"url": "https://github.com/ArcBlock/blockchain/tree/master/core/forge-message"
|
|
59
79
|
},
|
|
60
80
|
"scripts": {
|
|
81
|
+
"build": "tsdown",
|
|
82
|
+
"prebuild": "rm -rf lib esm",
|
|
61
83
|
"lint": "biome check",
|
|
62
84
|
"lint:fix": "biome check --write",
|
|
63
|
-
"docs": "bun run gen-
|
|
85
|
+
"docs": "bun run gen-docs && bun run cleanup-docs && bun run format-docs",
|
|
64
86
|
"cleanup-docs": "node ../../scripts/cleanup-docs.js docs/README.md $npm_package_name",
|
|
65
87
|
"gen-docs": "jsdoc2md lib/message.js > docs/README.md",
|
|
66
88
|
"format-docs": "remark . -o",
|
|
67
|
-
"gen-dts": "j2d index.js",
|
|
68
89
|
"test": "bun test",
|
|
69
90
|
"coverage": "npm run test -- --coverage"
|
|
70
91
|
},
|
package/index.d.ts
DELETED
package/index.js
DELETED
package/lib/message.d.ts
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Format an message from RPC to UI friendly
|
|
3
|
-
*
|
|
4
|
-
* @public
|
|
5
|
-
* @static
|
|
6
|
-
* @param {string} type - input type
|
|
7
|
-
* @param {object} data - input data
|
|
8
|
-
* @returns {object} [almost same structure as input]
|
|
9
|
-
*/
|
|
10
|
-
export function formatMessage(type: string, data: object): object;
|
|
11
|
-
/**
|
|
12
|
-
* Create an protobuf encoded Typed message with specified data, ready to send to rpc server
|
|
13
|
-
*
|
|
14
|
-
* @public
|
|
15
|
-
* @static
|
|
16
|
-
* @param {string} type - message type defined in forge-proto
|
|
17
|
-
* @param {object} params - message content
|
|
18
|
-
* @returns {object} Message instance
|
|
19
|
-
* @example
|
|
20
|
-
* const { createMessage } = require('@ocap/message');
|
|
21
|
-
* const message = createMessage ('CreateAssetTx', {
|
|
22
|
-
* moniker: 'asset',
|
|
23
|
-
* address: 'zaAKEJRKQWsdfjksdfjkASRD',
|
|
24
|
-
* });
|
|
25
|
-
*
|
|
26
|
-
* message.getMoniker(); // 'asset'
|
|
27
|
-
* message.getAddress(); // 'zaAKEJRKQWsdfjksdfjkASRD'
|
|
28
|
-
* message.getReadonly(); // false
|
|
29
|
-
* message.setReadonly(true);
|
|
30
|
-
*/
|
|
31
|
-
export function createMessage(type: string, params: object): object;
|
|
32
|
-
/**
|
|
33
|
-
* Generated a fake message for a type, the message can be RPC request/response
|
|
34
|
-
*
|
|
35
|
-
* @public
|
|
36
|
-
* @static
|
|
37
|
-
* @param {string} type - Message type string, should be defined in forge-abi or forge-core-protocol
|
|
38
|
-
* @returns {object}
|
|
39
|
-
* @example
|
|
40
|
-
* const { fakeMessage} = require('@ocap/message');
|
|
41
|
-
* const message = fakeMessage('CreateAssetTx');
|
|
42
|
-
* // will output
|
|
43
|
-
* {
|
|
44
|
-
* moniker: 'arcblock',
|
|
45
|
-
* data: { type: 'string', value: 'ABCD 1234' },
|
|
46
|
-
* readonly: true,
|
|
47
|
-
* transferrable: true,
|
|
48
|
-
* ttl: 2,
|
|
49
|
-
* parent: 'arcblock',
|
|
50
|
-
* address: 'F2D072CBD4954A20F26280730795D91AC1039996CEB6E24A31E9CE548DCB5E55',
|
|
51
|
-
* }
|
|
52
|
-
*/
|
|
53
|
-
export function fakeMessage(type: string): object;
|
|
54
|
-
/**
|
|
55
|
-
* Decode an google.protobuf.Any%{ typeUrl, value } => { type, value }
|
|
56
|
-
*
|
|
57
|
-
* @public
|
|
58
|
-
* @static
|
|
59
|
-
* @param {object} data encoded data object
|
|
60
|
-
* @returns {object} Object%{type, value}
|
|
61
|
-
*/
|
|
62
|
-
export function decodeAny(data: object): object;
|
|
63
|
-
/**
|
|
64
|
-
* Encode { type, value } => google.protobuf.Any%{ typeUrl, value }
|
|
65
|
-
* Does nothing on already encoded message
|
|
66
|
-
*
|
|
67
|
-
* @public
|
|
68
|
-
* @static
|
|
69
|
-
* @param {object} data
|
|
70
|
-
* @returns {object} google.protobuf.Any
|
|
71
|
-
*/
|
|
72
|
-
export function encodeAny(data: object): object;
|
|
73
|
-
/**
|
|
74
|
-
* Convert an { seconds, nanos } | date-string to google.protobuf.Timestamp object
|
|
75
|
-
*
|
|
76
|
-
* @public
|
|
77
|
-
* @static
|
|
78
|
-
* @param {string|object} value
|
|
79
|
-
* @returns {object} instanceof google.protobuf.Timestamp
|
|
80
|
-
*/
|
|
81
|
-
export function encodeTimestamp(value: string | object): object;
|
|
82
|
-
/**
|
|
83
|
-
* Decode google.protobuf.Timestamp message to ISO Date String
|
|
84
|
-
*
|
|
85
|
-
* FIXME: node strictly equal because we rounded the `nanos` field
|
|
86
|
-
*
|
|
87
|
-
* @public
|
|
88
|
-
* @static
|
|
89
|
-
* @param {object} data
|
|
90
|
-
* @returns {strong} String timestamp
|
|
91
|
-
*/
|
|
92
|
-
export function decodeTimestamp(data: object): strong;
|
|
93
|
-
/**
|
|
94
|
-
* Encode BigUint and BigSint types defined in forge-sdk, double encoding is avoided
|
|
95
|
-
*
|
|
96
|
-
* @public
|
|
97
|
-
* @static
|
|
98
|
-
* @param {buffer|string|number} value - value to encode
|
|
99
|
-
* @param {string} type - type names defined in forge-proto
|
|
100
|
-
* @returns {object} Message
|
|
101
|
-
*/
|
|
102
|
-
export function encodeBigInt(value: buffer | string | number, type: string): object;
|
|
103
|
-
/**
|
|
104
|
-
* Convert BigUint and BigSint to string representation of numbers
|
|
105
|
-
*
|
|
106
|
-
* @public
|
|
107
|
-
* @static
|
|
108
|
-
* @link https://stackoverflow.com/questions/23948278/how-to-convert-byte-array-into-a-signed-big-integer-in-javascript
|
|
109
|
-
* @param {object} data - usually from encodeBigInt
|
|
110
|
-
* @param {buffer} data.value
|
|
111
|
-
* @param {boolean} data.minus
|
|
112
|
-
* @returns {string} human readable number
|
|
113
|
-
*/
|
|
114
|
-
export function decodeBigInt(data: {
|
|
115
|
-
value: buffer;
|
|
116
|
-
minus: boolean;
|
|
117
|
-
}): string;
|
|
118
|
-
/**
|
|
119
|
-
* Attach an $format method to rpc response
|
|
120
|
-
*
|
|
121
|
-
* @private
|
|
122
|
-
* @param {object} data
|
|
123
|
-
* @param {string} type
|
|
124
|
-
*/
|
|
125
|
-
export function attachFormatFn(type: string, data: object, key?: string): void;
|
|
126
|
-
/**
|
|
127
|
-
* Attach an example method to
|
|
128
|
-
*
|
|
129
|
-
* @private
|
|
130
|
-
* @param {object} data
|
|
131
|
-
* @param {string} type
|
|
132
|
-
*/
|
|
133
|
-
export function attachExampleFn(type: string, host: any, key: any): void;
|
|
134
|
-
import { addProvider } from "./provider";
|
|
135
|
-
import { getMessageType } from "./provider";
|
|
136
|
-
import { toTypeUrl } from "./provider";
|
|
137
|
-
import { fromTypeUrl } from "./provider";
|
|
138
|
-
export { addProvider, getMessageType, toTypeUrl, fromTypeUrl };
|