@initia/initia.js 0.0.16 → 0.0.17
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/bundle.js +1 -1
- package/dist/bundle.js.map +1 -1
- package/dist/bundle.node.js +1 -1
- package/dist/bundle.node.js.map +1 -1
- package/dist/client/lcd/api/MoveAPI.d.ts +15 -1
- package/dist/client/lcd/api/MoveAPI.js +28 -0
- package/dist/client/lcd/api/MoveAPI.js.map +1 -1
- package/dist/core/Msg.js +0 -12
- package/dist/core/Msg.js.map +1 -1
- package/dist/core/gov/Proposal.d.ts +5 -5
- package/dist/core/gov/Proposal.js +6 -6
- package/dist/core/gov/Proposal.js.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/move/StorageFee.d.ts +34 -0
- package/dist/core/move/StorageFee.js +78 -0
- package/dist/core/move/StorageFee.js.map +1 -0
- package/dist/core/move/msgs/MsgExecuteEntryFunction.d.ts +7 -7
- package/dist/core/move/msgs/MsgExecuteEntryFunction.js +17 -17
- package/dist/core/move/msgs/MsgExecuteEntryFunction.js.map +1 -1
- package/dist/core/move/msgs/index.d.ts +4 -8
- package/dist/core/move/msgs/index.js +0 -2
- package/dist/core/move/msgs/index.js.map +1 -1
- package/dist/core/move/proposals/ExecuteEntryFunctionProposal.d.ts +54 -0
- package/dist/core/move/proposals/ExecuteEntryFunctionProposal.js +105 -0
- package/dist/core/move/proposals/ExecuteEntryFunctionProposal.js.map +1 -0
- package/dist/core/move/proposals/index.d.ts +1 -1
- package/dist/core/move/proposals/index.js +1 -1
- package/dist/core/move/proposals/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import { MsgPublishModuleBundle } from './MsgPublishModuleBundle';
|
|
2
2
|
import { MsgExecuteEntryFunction } from './MsgExecuteEntryFunction';
|
|
3
3
|
import { MsgExecuteScript } from './MsgExecuteScript';
|
|
4
|
-
import { MsgConvertNativeCoin } from './MsgConvertNativeCoin';
|
|
5
|
-
import { MsgConvertMoveCoin } from './MsgConvertMoveCoin';
|
|
6
4
|
export * from './MsgPublishModuleBundle';
|
|
7
5
|
export * from './MsgExecuteEntryFunction';
|
|
8
6
|
export * from './MsgExecuteScript';
|
|
9
|
-
export
|
|
10
|
-
export * from './MsgConvertMoveCoin';
|
|
11
|
-
export declare type MoveMsg = MsgPublishModuleBundle | MsgExecuteEntryFunction | MsgExecuteScript | MsgConvertNativeCoin | MsgConvertMoveCoin;
|
|
7
|
+
export declare type MoveMsg = MsgPublishModuleBundle | MsgExecuteEntryFunction | MsgExecuteScript;
|
|
12
8
|
export declare namespace MoveMsg {
|
|
13
|
-
type Amino = MsgPublishModuleBundle.Amino | MsgExecuteEntryFunction.Amino | MsgExecuteScript.Amino
|
|
14
|
-
type Data = MsgPublishModuleBundle.Data | MsgExecuteEntryFunction.Data | MsgExecuteScript.Data
|
|
15
|
-
type Proto = MsgPublishModuleBundle.Proto | MsgExecuteEntryFunction.Proto | MsgExecuteScript.Proto
|
|
9
|
+
type Amino = MsgPublishModuleBundle.Amino | MsgExecuteEntryFunction.Amino | MsgExecuteScript.Amino;
|
|
10
|
+
type Data = MsgPublishModuleBundle.Data | MsgExecuteEntryFunction.Data | MsgExecuteScript.Data;
|
|
11
|
+
type Proto = MsgPublishModuleBundle.Proto | MsgExecuteEntryFunction.Proto | MsgExecuteScript.Proto;
|
|
16
12
|
}
|
|
@@ -17,6 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./MsgPublishModuleBundle"), exports);
|
|
18
18
|
__exportStar(require("./MsgExecuteEntryFunction"), exports);
|
|
19
19
|
__exportStar(require("./MsgExecuteScript"), exports);
|
|
20
|
-
__exportStar(require("./MsgConvertNativeCoin"), exports);
|
|
21
|
-
__exportStar(require("./MsgConvertMoveCoin"), exports);
|
|
22
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/move/msgs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/move/msgs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAIA,2DAAyC;AACzC,4DAA0C;AAC1C,qDAAmC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { JSONSerializable } from '../../../util/json';
|
|
2
|
+
import { Any } from '@initia/initia.proto/google/protobuf/any';
|
|
3
|
+
import { ExecuteEntryFunctionProposal as ExecuteEntryFunctionProposal_pb } from '@initia/initia.proto/initia/move//v1/proposal';
|
|
4
|
+
/**
|
|
5
|
+
* ExecuteEntryFunctionProposal gov proposal content type to execute entry function to the system
|
|
6
|
+
*/
|
|
7
|
+
export declare class ExecuteEntryFunctionProposal extends JSONSerializable<ExecuteEntryFunctionProposal.Amino, ExecuteEntryFunctionProposal.Data, ExecuteEntryFunctionProposal.Proto> {
|
|
8
|
+
title: string;
|
|
9
|
+
description: string;
|
|
10
|
+
module_name: string;
|
|
11
|
+
function_name: string;
|
|
12
|
+
type_args: string[];
|
|
13
|
+
args: string[];
|
|
14
|
+
/**
|
|
15
|
+
* @param title a short summary
|
|
16
|
+
* @param description a human readable text
|
|
17
|
+
* @param module_name a move module name
|
|
18
|
+
* @param function_name a move function name
|
|
19
|
+
* @param type_args move function type args
|
|
20
|
+
* @param args move function args
|
|
21
|
+
*/
|
|
22
|
+
constructor(title: string, description: string, module_name: string, function_name: string, type_args: string[], args: string[]);
|
|
23
|
+
static fromAmino(data: ExecuteEntryFunctionProposal.Amino): ExecuteEntryFunctionProposal;
|
|
24
|
+
toAmino(): ExecuteEntryFunctionProposal.Amino;
|
|
25
|
+
static fromData(data: ExecuteEntryFunctionProposal.Data): ExecuteEntryFunctionProposal;
|
|
26
|
+
toData(): ExecuteEntryFunctionProposal.Data;
|
|
27
|
+
static fromProto(proto: ExecuteEntryFunctionProposal.Proto): ExecuteEntryFunctionProposal;
|
|
28
|
+
toProto(): ExecuteEntryFunctionProposal.Proto;
|
|
29
|
+
packAny(): Any;
|
|
30
|
+
static unpackAny(msgAny: Any): ExecuteEntryFunctionProposal;
|
|
31
|
+
}
|
|
32
|
+
export declare namespace ExecuteEntryFunctionProposal {
|
|
33
|
+
interface Amino {
|
|
34
|
+
type: 'move/ExecuteEntryFunctionProposal';
|
|
35
|
+
value: {
|
|
36
|
+
title: string;
|
|
37
|
+
description: string;
|
|
38
|
+
module_name: string;
|
|
39
|
+
function_name: string;
|
|
40
|
+
type_args: string[];
|
|
41
|
+
args: string[];
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
interface Data {
|
|
45
|
+
'@type': '/initia.move.v1.ExecuteEntryFunctionProposal';
|
|
46
|
+
title: string;
|
|
47
|
+
description: string;
|
|
48
|
+
module_name: string;
|
|
49
|
+
function_name: string;
|
|
50
|
+
type_args: string[];
|
|
51
|
+
args: string[];
|
|
52
|
+
}
|
|
53
|
+
type Proto = ExecuteEntryFunctionProposal_pb;
|
|
54
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ExecuteEntryFunctionProposal = void 0;
|
|
19
|
+
var json_1 = require("../../../util/json");
|
|
20
|
+
var any_1 = require("@initia/initia.proto/google/protobuf/any");
|
|
21
|
+
var proposal_1 = require("@initia/initia.proto/initia/move//v1/proposal");
|
|
22
|
+
/**
|
|
23
|
+
* ExecuteEntryFunctionProposal gov proposal content type to execute entry function to the system
|
|
24
|
+
*/
|
|
25
|
+
var ExecuteEntryFunctionProposal = /** @class */ (function (_super) {
|
|
26
|
+
__extends(ExecuteEntryFunctionProposal, _super);
|
|
27
|
+
/**
|
|
28
|
+
* @param title a short summary
|
|
29
|
+
* @param description a human readable text
|
|
30
|
+
* @param module_name a move module name
|
|
31
|
+
* @param function_name a move function name
|
|
32
|
+
* @param type_args move function type args
|
|
33
|
+
* @param args move function args
|
|
34
|
+
*/
|
|
35
|
+
function ExecuteEntryFunctionProposal(title, description, module_name, function_name, type_args, args) {
|
|
36
|
+
var _this = _super.call(this) || this;
|
|
37
|
+
_this.title = title;
|
|
38
|
+
_this.description = description;
|
|
39
|
+
_this.module_name = module_name;
|
|
40
|
+
_this.function_name = function_name;
|
|
41
|
+
_this.type_args = type_args;
|
|
42
|
+
_this.args = args;
|
|
43
|
+
return _this;
|
|
44
|
+
}
|
|
45
|
+
ExecuteEntryFunctionProposal.fromAmino = function (data) {
|
|
46
|
+
var _a = data.value, title = _a.title, description = _a.description, module_name = _a.module_name, function_name = _a.function_name, type_args = _a.type_args, args = _a.args;
|
|
47
|
+
return new ExecuteEntryFunctionProposal(title, description, module_name, function_name, type_args, args);
|
|
48
|
+
};
|
|
49
|
+
ExecuteEntryFunctionProposal.prototype.toAmino = function () {
|
|
50
|
+
var _a = this, title = _a.title, description = _a.description, module_name = _a.module_name, function_name = _a.function_name, type_args = _a.type_args, args = _a.args;
|
|
51
|
+
return {
|
|
52
|
+
type: 'move/ExecuteEntryFunctionProposal',
|
|
53
|
+
value: {
|
|
54
|
+
title: title,
|
|
55
|
+
description: description,
|
|
56
|
+
module_name: module_name,
|
|
57
|
+
function_name: function_name,
|
|
58
|
+
type_args: type_args,
|
|
59
|
+
args: args,
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
ExecuteEntryFunctionProposal.fromData = function (data) {
|
|
64
|
+
var title = data.title, description = data.description, module_name = data.module_name, function_name = data.function_name, type_args = data.type_args, args = data.args;
|
|
65
|
+
return new ExecuteEntryFunctionProposal(title, description, module_name, function_name, type_args, args);
|
|
66
|
+
};
|
|
67
|
+
ExecuteEntryFunctionProposal.prototype.toData = function () {
|
|
68
|
+
var _a = this, title = _a.title, description = _a.description, module_name = _a.module_name, function_name = _a.function_name, type_args = _a.type_args, args = _a.args;
|
|
69
|
+
return {
|
|
70
|
+
'@type': '/initia.move.v1.ExecuteEntryFunctionProposal',
|
|
71
|
+
title: title,
|
|
72
|
+
description: description,
|
|
73
|
+
module_name: module_name,
|
|
74
|
+
function_name: function_name,
|
|
75
|
+
type_args: type_args,
|
|
76
|
+
args: args,
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
ExecuteEntryFunctionProposal.fromProto = function (proto) {
|
|
80
|
+
return new ExecuteEntryFunctionProposal(proto.title, proto.description, proto.moduleName, proto.functionName, proto.typeArgs, proto.args.map(function (arg) { return Buffer.from(arg).toString('base64'); }));
|
|
81
|
+
};
|
|
82
|
+
ExecuteEntryFunctionProposal.prototype.toProto = function () {
|
|
83
|
+
var _a = this, title = _a.title, description = _a.description, module_name = _a.module_name, function_name = _a.function_name, type_args = _a.type_args, args = _a.args;
|
|
84
|
+
return proposal_1.ExecuteEntryFunctionProposal.fromPartial({
|
|
85
|
+
title: title,
|
|
86
|
+
description: description,
|
|
87
|
+
moduleName: module_name,
|
|
88
|
+
functionName: function_name,
|
|
89
|
+
typeArgs: type_args,
|
|
90
|
+
args: args.map(function (arg) { return Buffer.from(arg, 'base64'); }),
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
ExecuteEntryFunctionProposal.prototype.packAny = function () {
|
|
94
|
+
return any_1.Any.fromPartial({
|
|
95
|
+
typeUrl: '/initia.move.v1.ExecuteEntryFunctionProposal',
|
|
96
|
+
value: proposal_1.ExecuteEntryFunctionProposal.encode(this.toProto()).finish(),
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
ExecuteEntryFunctionProposal.unpackAny = function (msgAny) {
|
|
100
|
+
return ExecuteEntryFunctionProposal.fromProto(proposal_1.ExecuteEntryFunctionProposal.decode(msgAny.value));
|
|
101
|
+
};
|
|
102
|
+
return ExecuteEntryFunctionProposal;
|
|
103
|
+
}(json_1.JSONSerializable));
|
|
104
|
+
exports.ExecuteEntryFunctionProposal = ExecuteEntryFunctionProposal;
|
|
105
|
+
//# sourceMappingURL=ExecuteEntryFunctionProposal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExecuteEntryFunctionProposal.js","sourceRoot":"","sources":["../../../../src/core/move/proposals/ExecuteEntryFunctionProposal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2CAAsD;AACtD,gEAA+D;AAC/D,0EAAgI;AAEhI;;GAEG;AACH;IAAkD,gDAIjD;IACC;;;;;;;OAOG;IACH,sCACS,KAAa,EACb,WAAmB,EACnB,WAAmB,EACnB,aAAqB,EACrB,SAAmB,EACnB,IAAc;QANvB,YAQE,iBAAO,SACR;QARQ,WAAK,GAAL,KAAK,CAAQ;QACb,iBAAW,GAAX,WAAW,CAAQ;QACnB,iBAAW,GAAX,WAAW,CAAQ;QACnB,mBAAa,GAAb,aAAa,CAAQ;QACrB,eAAS,GAAT,SAAS,CAAU;QACnB,UAAI,GAAJ,IAAI,CAAU;;IAGvB,CAAC;IAEa,sCAAS,GAAvB,UACE,IAAwC;QAGtC,IAAA,KAQE,IAAI,MADL,EANC,KAAK,WAAA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AA4B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './PublishStdModuleProposal';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './ExecuteEntryFunctionProposal';
|
|
@@ -15,5 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./PublishStdModuleProposal"), exports);
|
|
18
|
-
__exportStar(require("./
|
|
18
|
+
__exportStar(require("./ExecuteEntryFunctionProposal"), exports);
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/move/proposals/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA2C;AAC3C,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/move/proposals/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA2C;AAC3C,iEAA+C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@initia/initia.js",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"description": "The JavaScript SDK for Initia",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "InitiaLabs",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"webpack-cli": "^4.10.0"
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
|
-
"@initia/initia.proto": "^0.0.
|
|
85
|
+
"@initia/initia.proto": "^0.0.4-alpha1",
|
|
86
86
|
"@mysten/bcs": "^0.5.0",
|
|
87
87
|
"axios": "^0.27.2",
|
|
88
88
|
"bech32": "^2.0.0",
|