@initia/initia.proto
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -77,2 +77,11 @@ import Long from "long"; | ||
} | ||
/** ExecuteAuthorizationItem is the information for granting module execution */ | ||
export interface ExecuteAuthorizationItem { | ||
/** ModuleAddr is the address of the module deployer */ | ||
moduleAddress: string; | ||
/** ModuleName is the names of module to execute */ | ||
moduleName: string; | ||
/** FunctionName is the name of function to execute with wildcard '*' support */ | ||
functionNames: string[]; | ||
} | ||
export declare const Params: { | ||
@@ -268,2 +277,17 @@ encode(message: Params, writer?: _m0.Writer): _m0.Writer; | ||
}; | ||
export declare const ExecuteAuthorizationItem: { | ||
encode(message: ExecuteAuthorizationItem, writer?: _m0.Writer): _m0.Writer; | ||
decode(input: _m0.Reader | Uint8Array, length?: number): ExecuteAuthorizationItem; | ||
fromJSON(object: any): ExecuteAuthorizationItem; | ||
toJSON(message: ExecuteAuthorizationItem): unknown; | ||
fromPartial<I extends { | ||
moduleAddress?: string | undefined; | ||
moduleName?: string | undefined; | ||
functionNames?: string[] | undefined; | ||
} & { | ||
moduleAddress?: string | undefined; | ||
moduleName?: string | undefined; | ||
functionNames?: (string[] & string[] & { [K in Exclude<keyof I["functionNames"], keyof string[]>]: never; }) | undefined; | ||
} & { [K_1 in Exclude<keyof I, keyof ExecuteAuthorizationItem>]: never; }>(object: I): ExecuteAuthorizationItem; | ||
}; | ||
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; | ||
@@ -270,0 +294,0 @@ export declare type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? { |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DexPairEntry = exports.DexPair = exports.UpgradePolicyProto = exports.TableEntry = exports.Module = exports.Resource = exports.Params = exports.upgradePolicyToJSON = exports.upgradePolicyFromJSON = exports.UpgradePolicy = exports.protobufPackage = void 0; | ||
exports.ExecuteAuthorizationItem = exports.DexPairEntry = exports.DexPair = exports.UpgradePolicyProto = exports.TableEntry = exports.Module = exports.Resource = exports.Params = exports.upgradePolicyToJSON = exports.upgradePolicyFromJSON = exports.UpgradePolicy = exports.protobufPackage = void 0; | ||
/* eslint-disable */ | ||
@@ -517,2 +517,71 @@ const long_1 = __importDefault(require("long")); | ||
}; | ||
function createBaseExecuteAuthorizationItem() { | ||
return { moduleAddress: "", moduleName: "", functionNames: [] }; | ||
} | ||
exports.ExecuteAuthorizationItem = { | ||
encode(message, writer = minimal_1.default.Writer.create()) { | ||
if (message.moduleAddress !== "") { | ||
writer.uint32(10).string(message.moduleAddress); | ||
} | ||
if (message.moduleName !== "") { | ||
writer.uint32(18).string(message.moduleName); | ||
} | ||
for (const v of message.functionNames) { | ||
writer.uint32(26).string(v); | ||
} | ||
return writer; | ||
}, | ||
decode(input, length) { | ||
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseExecuteAuthorizationItem(); | ||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
switch (tag >>> 3) { | ||
case 1: | ||
message.moduleAddress = reader.string(); | ||
break; | ||
case 2: | ||
message.moduleName = reader.string(); | ||
break; | ||
case 3: | ||
message.functionNames.push(reader.string()); | ||
break; | ||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
return message; | ||
}, | ||
fromJSON(object) { | ||
return { | ||
moduleAddress: isSet(object.moduleAddress) ? String(object.moduleAddress) : "", | ||
moduleName: isSet(object.moduleName) ? String(object.moduleName) : "", | ||
functionNames: Array.isArray(object === null || object === void 0 ? void 0 : object.functionNames) | ||
? object.functionNames.map((e) => String(e)) | ||
: [], | ||
}; | ||
}, | ||
toJSON(message) { | ||
const obj = {}; | ||
message.moduleAddress !== undefined && (obj.moduleAddress = message.moduleAddress); | ||
message.moduleName !== undefined && (obj.moduleName = message.moduleName); | ||
if (message.functionNames) { | ||
obj.functionNames = message.functionNames.map((e) => e); | ||
} | ||
else { | ||
obj.functionNames = []; | ||
} | ||
return obj; | ||
}, | ||
fromPartial(object) { | ||
var _a, _b, _c; | ||
const message = createBaseExecuteAuthorizationItem(); | ||
message.moduleAddress = (_a = object.moduleAddress) !== null && _a !== void 0 ? _a : ""; | ||
message.moduleName = (_b = object.moduleName) !== null && _b !== void 0 ? _b : ""; | ||
message.functionNames = ((_c = object.functionNames) === null || _c === void 0 ? void 0 : _c.map((e) => e)) || []; | ||
return message; | ||
}, | ||
}; | ||
var globalThis = (() => { | ||
@@ -519,0 +588,0 @@ if (typeof globalThis !== "undefined") { |
{ | ||
"name": "@initia/initia.proto", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "JS and TS types relating to Protocol Buffers used by Initia project", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
Sorry, the diff of this file is not supported yet
19040615
473
221542