@axelar-network/axelarjs-types
Advanced tools
Comparing version 0.28.0-alpha.5 to 0.28.0-alpha.6
@@ -48,11 +48,29 @@ import Long from "long"; | ||
} | ||
export interface GeneralMessageApprovedWithToken { | ||
export interface ContractCallSubmitted { | ||
messageId: string; | ||
sender: string; | ||
sourceChain: string; | ||
destinationChain: string; | ||
destinationAddress: string; | ||
contractAddress: string; | ||
payload: Uint8Array; | ||
payloadHash: Uint8Array; | ||
} | ||
export interface ContractCallWithTokenSubmitted { | ||
messageId: string; | ||
sender: string; | ||
sourceChain: string; | ||
destinationChain: string; | ||
contractAddress: string; | ||
payload: Uint8Array; | ||
coin?: Coin; | ||
payloadHash: Uint8Array; | ||
asset?: Coin; | ||
} | ||
export interface TokenSent { | ||
transferId: Long; | ||
sender: string; | ||
sourceChain: string; | ||
destinationChain: string; | ||
destinationAddress: string; | ||
asset?: Coin; | ||
} | ||
export declare const IBCTransferSent: { | ||
@@ -717,15 +735,39 @@ encode(message: IBCTransferSent, writer?: _m0.Writer): _m0.Writer; | ||
}; | ||
export declare const GeneralMessageApprovedWithToken: { | ||
encode(message: GeneralMessageApprovedWithToken, writer?: _m0.Writer): _m0.Writer; | ||
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): GeneralMessageApprovedWithToken; | ||
fromJSON(object: any): GeneralMessageApprovedWithToken; | ||
toJSON(message: GeneralMessageApprovedWithToken): unknown; | ||
export declare const ContractCallSubmitted: { | ||
encode(message: ContractCallSubmitted, writer?: _m0.Writer): _m0.Writer; | ||
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ContractCallSubmitted; | ||
fromJSON(object: any): ContractCallSubmitted; | ||
toJSON(message: ContractCallSubmitted): unknown; | ||
fromPartial<I extends { | ||
messageId?: string | undefined; | ||
sender?: string | undefined; | ||
sourceChain?: string | undefined; | ||
destinationChain?: string | undefined; | ||
destinationAddress?: string | undefined; | ||
contractAddress?: string | undefined; | ||
payload?: Uint8Array | undefined; | ||
payloadHash?: Uint8Array | undefined; | ||
} & { | ||
messageId?: string | undefined; | ||
sender?: string | undefined; | ||
sourceChain?: string | undefined; | ||
destinationChain?: string | undefined; | ||
contractAddress?: string | undefined; | ||
payload?: Uint8Array | undefined; | ||
coin?: { | ||
payloadHash?: Uint8Array | undefined; | ||
} & Record<Exclude<keyof I, keyof ContractCallSubmitted>, never>>(object: I): ContractCallSubmitted; | ||
}; | ||
export declare const ContractCallWithTokenSubmitted: { | ||
encode(message: ContractCallWithTokenSubmitted, writer?: _m0.Writer): _m0.Writer; | ||
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ContractCallWithTokenSubmitted; | ||
fromJSON(object: any): ContractCallWithTokenSubmitted; | ||
toJSON(message: ContractCallWithTokenSubmitted): unknown; | ||
fromPartial<I extends { | ||
messageId?: string | undefined; | ||
sender?: string | undefined; | ||
sourceChain?: string | undefined; | ||
destinationChain?: string | undefined; | ||
contractAddress?: string | undefined; | ||
payload?: Uint8Array | undefined; | ||
payloadHash?: Uint8Array | undefined; | ||
asset?: { | ||
denom?: string | undefined; | ||
@@ -735,9 +777,10 @@ amount?: string | undefined; | ||
} & { | ||
messageId?: string | undefined; | ||
sender?: string | undefined; | ||
sourceChain?: string | undefined; | ||
destinationChain?: string | undefined; | ||
destinationAddress?: string | undefined; | ||
contractAddress?: string | undefined; | ||
payload?: Uint8Array | undefined; | ||
payloadHash?: Uint8Array | undefined; | ||
payload?: Uint8Array | undefined; | ||
coin?: ({ | ||
asset?: ({ | ||
denom?: string | undefined; | ||
@@ -748,5 +791,92 @@ amount?: string | undefined; | ||
amount?: string | undefined; | ||
} & Record<Exclude<keyof I["coin"], keyof Coin>, never>) | undefined; | ||
} & Record<Exclude<keyof I, keyof GeneralMessageApprovedWithToken>, never>>(object: I): GeneralMessageApprovedWithToken; | ||
} & Record<Exclude<keyof I["asset"], keyof Coin>, never>) | undefined; | ||
} & Record<Exclude<keyof I, keyof ContractCallWithTokenSubmitted>, never>>(object: I): ContractCallWithTokenSubmitted; | ||
}; | ||
export declare const TokenSent: { | ||
encode(message: TokenSent, writer?: _m0.Writer): _m0.Writer; | ||
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): TokenSent; | ||
fromJSON(object: any): TokenSent; | ||
toJSON(message: TokenSent): unknown; | ||
fromPartial<I extends { | ||
transferId?: string | number | Long.Long | undefined; | ||
sender?: string | undefined; | ||
sourceChain?: string | undefined; | ||
destinationChain?: string | undefined; | ||
destinationAddress?: string | undefined; | ||
asset?: { | ||
denom?: string | undefined; | ||
amount?: string | undefined; | ||
} | undefined; | ||
} & { | ||
transferId?: string | number | (Long.Long & { | ||
high: number; | ||
low: number; | ||
unsigned: boolean; | ||
add: (addend: string | number | Long.Long) => Long.Long; | ||
and: (other: string | number | Long.Long) => Long.Long; | ||
compare: (other: string | number | Long.Long) => number; | ||
comp: (other: string | number | Long.Long) => number; | ||
divide: (divisor: string | number | Long.Long) => Long.Long; | ||
div: (divisor: string | number | Long.Long) => Long.Long; | ||
equals: (other: string | number | Long.Long) => boolean; | ||
eq: (other: string | number | Long.Long) => boolean; | ||
getHighBits: () => number; | ||
getHighBitsUnsigned: () => number; | ||
getLowBits: () => number; | ||
getLowBitsUnsigned: () => number; | ||
getNumBitsAbs: () => number; | ||
greaterThan: (other: string | number | Long.Long) => boolean; | ||
gt: (other: string | number | Long.Long) => boolean; | ||
greaterThanOrEqual: (other: string | number | Long.Long) => boolean; | ||
gte: (other: string | number | Long.Long) => boolean; | ||
isEven: () => boolean; | ||
isNegative: () => boolean; | ||
isOdd: () => boolean; | ||
isPositive: () => boolean; | ||
isZero: () => boolean; | ||
lessThan: (other: string | number | Long.Long) => boolean; | ||
lt: (other: string | number | Long.Long) => boolean; | ||
lessThanOrEqual: (other: string | number | Long.Long) => boolean; | ||
lte: (other: string | number | Long.Long) => boolean; | ||
modulo: (other: string | number | Long.Long) => Long.Long; | ||
mod: (other: string | number | Long.Long) => Long.Long; | ||
multiply: (multiplier: string | number | Long.Long) => Long.Long; | ||
mul: (multiplier: string | number | Long.Long) => Long.Long; | ||
negate: () => Long.Long; | ||
neg: () => Long.Long; | ||
not: () => Long.Long; | ||
notEquals: (other: string | number | Long.Long) => boolean; | ||
neq: (other: string | number | Long.Long) => boolean; | ||
or: (other: string | number | Long.Long) => Long.Long; | ||
shiftLeft: (numBits: number | Long.Long) => Long.Long; | ||
shl: (numBits: number | Long.Long) => Long.Long; | ||
shiftRight: (numBits: number | Long.Long) => Long.Long; | ||
shr: (numBits: number | Long.Long) => Long.Long; | ||
shiftRightUnsigned: (numBits: number | Long.Long) => Long.Long; | ||
shru: (numBits: number | Long.Long) => Long.Long; | ||
subtract: (subtrahend: string | number | Long.Long) => Long.Long; | ||
sub: (subtrahend: string | number | Long.Long) => Long.Long; | ||
toInt: () => number; | ||
toNumber: () => number; | ||
toBytes: (le?: boolean | undefined) => number[]; | ||
toBytesLE: () => number[]; | ||
toBytesBE: () => number[]; | ||
toSigned: () => Long.Long; | ||
toString: (radix?: number | undefined) => string; | ||
toUnsigned: () => Long.Long; | ||
xor: (other: string | number | Long.Long) => Long.Long; | ||
} & Record<Exclude<keyof I["transferId"], keyof Long.Long>, never>) | undefined; | ||
sender?: string | undefined; | ||
sourceChain?: string | undefined; | ||
destinationChain?: string | undefined; | ||
destinationAddress?: string | undefined; | ||
asset?: ({ | ||
denom?: string | undefined; | ||
amount?: string | undefined; | ||
} & { | ||
denom?: string | undefined; | ||
amount?: string | undefined; | ||
} & Record<Exclude<keyof I["asset"], keyof Coin>, never>) | undefined; | ||
} & Record<Exclude<keyof I, keyof TokenSent>, never>>(object: I): TokenSent; | ||
}; | ||
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; | ||
@@ -753,0 +883,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 {} ? { |
@@ -25,3 +25,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.GeneralMessageApprovedWithToken = exports.FeeCollected = exports.AxelarTransferCompleted = exports.IBCTransferRetried = exports.IBCTransferFailed = exports.IBCTransferCompleted = exports.IBCTransferSent = exports.protobufPackage = void 0; | ||
exports.TokenSent = exports.ContractCallWithTokenSubmitted = exports.ContractCallSubmitted = exports.FeeCollected = exports.AxelarTransferCompleted = exports.IBCTransferRetried = exports.IBCTransferFailed = exports.IBCTransferCompleted = exports.IBCTransferSent = exports.protobufPackage = void 0; | ||
/* eslint-disable */ | ||
@@ -526,36 +526,148 @@ const long_1 = __importDefault(require("long")); | ||
}; | ||
function createBaseGeneralMessageApprovedWithToken() { | ||
function createBaseContractCallSubmitted() { | ||
return { | ||
messageId: "", | ||
sender: "", | ||
sourceChain: "", | ||
destinationChain: "", | ||
destinationAddress: "", | ||
contractAddress: "", | ||
payload: new Uint8Array(), | ||
payloadHash: new Uint8Array(), | ||
payload: new Uint8Array(), | ||
coin: undefined, | ||
}; | ||
} | ||
exports.GeneralMessageApprovedWithToken = { | ||
exports.ContractCallSubmitted = { | ||
encode(message, writer = _m0.Writer.create()) { | ||
if (message.messageId !== "") { | ||
writer.uint32(10).string(message.messageId); | ||
} | ||
if (message.sender !== "") { | ||
writer.uint32(10).string(message.sender); | ||
writer.uint32(18).string(message.sender); | ||
} | ||
if (message.sourceChain !== "") { | ||
writer.uint32(18).string(message.sourceChain); | ||
writer.uint32(26).string(message.sourceChain); | ||
} | ||
if (message.destinationChain !== "") { | ||
writer.uint32(26).string(message.destinationChain); | ||
writer.uint32(34).string(message.destinationChain); | ||
} | ||
if (message.destinationAddress !== "") { | ||
writer.uint32(34).string(message.destinationAddress); | ||
if (message.contractAddress !== "") { | ||
writer.uint32(42).string(message.contractAddress); | ||
} | ||
if (message.payload.length !== 0) { | ||
writer.uint32(50).bytes(message.payload); | ||
} | ||
if (message.payloadHash.length !== 0) { | ||
writer.uint32(42).bytes(message.payloadHash); | ||
writer.uint32(58).bytes(message.payloadHash); | ||
} | ||
return writer; | ||
}, | ||
decode(input, length) { | ||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseContractCallSubmitted(); | ||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
switch (tag >>> 3) { | ||
case 1: | ||
message.messageId = reader.string(); | ||
break; | ||
case 2: | ||
message.sender = reader.string(); | ||
break; | ||
case 3: | ||
message.sourceChain = reader.string(); | ||
break; | ||
case 4: | ||
message.destinationChain = reader.string(); | ||
break; | ||
case 5: | ||
message.contractAddress = reader.string(); | ||
break; | ||
case 6: | ||
message.payload = reader.bytes(); | ||
break; | ||
case 7: | ||
message.payloadHash = reader.bytes(); | ||
break; | ||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
return message; | ||
}, | ||
fromJSON(object) { | ||
return { | ||
messageId: isSet(object.messageId) ? String(object.messageId) : "", | ||
sender: isSet(object.sender) ? String(object.sender) : "", | ||
sourceChain: isSet(object.sourceChain) ? String(object.sourceChain) : "", | ||
destinationChain: isSet(object.destinationChain) ? String(object.destinationChain) : "", | ||
contractAddress: isSet(object.contractAddress) ? String(object.contractAddress) : "", | ||
payload: isSet(object.payload) ? bytesFromBase64(object.payload) : new Uint8Array(), | ||
payloadHash: isSet(object.payloadHash) ? bytesFromBase64(object.payloadHash) : new Uint8Array(), | ||
}; | ||
}, | ||
toJSON(message) { | ||
const obj = {}; | ||
message.messageId !== undefined && (obj.messageId = message.messageId); | ||
message.sender !== undefined && (obj.sender = message.sender); | ||
message.sourceChain !== undefined && (obj.sourceChain = message.sourceChain); | ||
message.destinationChain !== undefined && (obj.destinationChain = message.destinationChain); | ||
message.contractAddress !== undefined && (obj.contractAddress = message.contractAddress); | ||
message.payload !== undefined && | ||
(obj.payload = base64FromBytes(message.payload !== undefined ? message.payload : new Uint8Array())); | ||
message.payloadHash !== undefined && | ||
(obj.payloadHash = base64FromBytes(message.payloadHash !== undefined ? message.payloadHash : new Uint8Array())); | ||
return obj; | ||
}, | ||
fromPartial(object) { | ||
var _a, _b, _c, _d, _e, _f, _g; | ||
const message = createBaseContractCallSubmitted(); | ||
message.messageId = (_a = object.messageId) !== null && _a !== void 0 ? _a : ""; | ||
message.sender = (_b = object.sender) !== null && _b !== void 0 ? _b : ""; | ||
message.sourceChain = (_c = object.sourceChain) !== null && _c !== void 0 ? _c : ""; | ||
message.destinationChain = (_d = object.destinationChain) !== null && _d !== void 0 ? _d : ""; | ||
message.contractAddress = (_e = object.contractAddress) !== null && _e !== void 0 ? _e : ""; | ||
message.payload = (_f = object.payload) !== null && _f !== void 0 ? _f : new Uint8Array(); | ||
message.payloadHash = (_g = object.payloadHash) !== null && _g !== void 0 ? _g : new Uint8Array(); | ||
return message; | ||
}, | ||
}; | ||
function createBaseContractCallWithTokenSubmitted() { | ||
return { | ||
messageId: "", | ||
sender: "", | ||
sourceChain: "", | ||
destinationChain: "", | ||
contractAddress: "", | ||
payload: new Uint8Array(), | ||
payloadHash: new Uint8Array(), | ||
asset: undefined, | ||
}; | ||
} | ||
exports.ContractCallWithTokenSubmitted = { | ||
encode(message, writer = _m0.Writer.create()) { | ||
if (message.messageId !== "") { | ||
writer.uint32(10).string(message.messageId); | ||
} | ||
if (message.sender !== "") { | ||
writer.uint32(18).string(message.sender); | ||
} | ||
if (message.sourceChain !== "") { | ||
writer.uint32(26).string(message.sourceChain); | ||
} | ||
if (message.destinationChain !== "") { | ||
writer.uint32(34).string(message.destinationChain); | ||
} | ||
if (message.contractAddress !== "") { | ||
writer.uint32(42).string(message.contractAddress); | ||
} | ||
if (message.payload.length !== 0) { | ||
writer.uint32(50).bytes(message.payload); | ||
} | ||
if (message.coin !== undefined) { | ||
coin_1.Coin.encode(message.coin, writer.uint32(58).fork()).ldelim(); | ||
if (message.payloadHash.length !== 0) { | ||
writer.uint32(58).bytes(message.payloadHash); | ||
} | ||
if (message.asset !== undefined) { | ||
coin_1.Coin.encode(message.asset, writer.uint32(66).fork()).ldelim(); | ||
} | ||
return writer; | ||
@@ -566,3 +678,3 @@ }, | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseGeneralMessageApprovedWithToken(); | ||
const message = createBaseContractCallWithTokenSubmitted(); | ||
while (reader.pos < end) { | ||
@@ -572,15 +684,15 @@ const tag = reader.uint32(); | ||
case 1: | ||
message.sender = reader.string(); | ||
message.messageId = reader.string(); | ||
break; | ||
case 2: | ||
message.sourceChain = reader.string(); | ||
message.sender = reader.string(); | ||
break; | ||
case 3: | ||
message.destinationChain = reader.string(); | ||
message.sourceChain = reader.string(); | ||
break; | ||
case 4: | ||
message.destinationAddress = reader.string(); | ||
message.destinationChain = reader.string(); | ||
break; | ||
case 5: | ||
message.payloadHash = reader.bytes(); | ||
message.contractAddress = reader.string(); | ||
break; | ||
@@ -591,4 +703,7 @@ case 6: | ||
case 7: | ||
message.coin = coin_1.Coin.decode(reader, reader.uint32()); | ||
message.payloadHash = reader.bytes(); | ||
break; | ||
case 8: | ||
message.asset = coin_1.Coin.decode(reader, reader.uint32()); | ||
break; | ||
default: | ||
@@ -603,9 +718,10 @@ reader.skipType(tag & 7); | ||
return { | ||
messageId: isSet(object.messageId) ? String(object.messageId) : "", | ||
sender: isSet(object.sender) ? String(object.sender) : "", | ||
sourceChain: isSet(object.sourceChain) ? String(object.sourceChain) : "", | ||
destinationChain: isSet(object.destinationChain) ? String(object.destinationChain) : "", | ||
destinationAddress: isSet(object.destinationAddress) ? String(object.destinationAddress) : "", | ||
contractAddress: isSet(object.contractAddress) ? String(object.contractAddress) : "", | ||
payload: isSet(object.payload) ? bytesFromBase64(object.payload) : new Uint8Array(), | ||
payloadHash: isSet(object.payloadHash) ? bytesFromBase64(object.payloadHash) : new Uint8Array(), | ||
payload: isSet(object.payload) ? bytesFromBase64(object.payload) : new Uint8Array(), | ||
coin: isSet(object.coin) ? coin_1.Coin.fromJSON(object.coin) : undefined, | ||
asset: isSet(object.asset) ? coin_1.Coin.fromJSON(object.asset) : undefined, | ||
}; | ||
@@ -615,16 +731,120 @@ }, | ||
const obj = {}; | ||
message.messageId !== undefined && (obj.messageId = message.messageId); | ||
message.sender !== undefined && (obj.sender = message.sender); | ||
message.sourceChain !== undefined && (obj.sourceChain = message.sourceChain); | ||
message.destinationChain !== undefined && (obj.destinationChain = message.destinationChain); | ||
message.destinationAddress !== undefined && (obj.destinationAddress = message.destinationAddress); | ||
message.contractAddress !== undefined && (obj.contractAddress = message.contractAddress); | ||
message.payload !== undefined && | ||
(obj.payload = base64FromBytes(message.payload !== undefined ? message.payload : new Uint8Array())); | ||
message.payloadHash !== undefined && | ||
(obj.payloadHash = base64FromBytes(message.payloadHash !== undefined ? message.payloadHash : new Uint8Array())); | ||
message.payload !== undefined && | ||
(obj.payload = base64FromBytes(message.payload !== undefined ? message.payload : new Uint8Array())); | ||
message.coin !== undefined && (obj.coin = message.coin ? coin_1.Coin.toJSON(message.coin) : undefined); | ||
message.asset !== undefined && (obj.asset = message.asset ? coin_1.Coin.toJSON(message.asset) : undefined); | ||
return obj; | ||
}, | ||
fromPartial(object) { | ||
var _a, _b, _c, _d, _e, _f; | ||
const message = createBaseGeneralMessageApprovedWithToken(); | ||
var _a, _b, _c, _d, _e, _f, _g; | ||
const message = createBaseContractCallWithTokenSubmitted(); | ||
message.messageId = (_a = object.messageId) !== null && _a !== void 0 ? _a : ""; | ||
message.sender = (_b = object.sender) !== null && _b !== void 0 ? _b : ""; | ||
message.sourceChain = (_c = object.sourceChain) !== null && _c !== void 0 ? _c : ""; | ||
message.destinationChain = (_d = object.destinationChain) !== null && _d !== void 0 ? _d : ""; | ||
message.contractAddress = (_e = object.contractAddress) !== null && _e !== void 0 ? _e : ""; | ||
message.payload = (_f = object.payload) !== null && _f !== void 0 ? _f : new Uint8Array(); | ||
message.payloadHash = (_g = object.payloadHash) !== null && _g !== void 0 ? _g : new Uint8Array(); | ||
message.asset = | ||
object.asset !== undefined && object.asset !== null ? coin_1.Coin.fromPartial(object.asset) : undefined; | ||
return message; | ||
}, | ||
}; | ||
function createBaseTokenSent() { | ||
return { | ||
transferId: long_1.default.UZERO, | ||
sender: "", | ||
sourceChain: "", | ||
destinationChain: "", | ||
destinationAddress: "", | ||
asset: undefined, | ||
}; | ||
} | ||
exports.TokenSent = { | ||
encode(message, writer = _m0.Writer.create()) { | ||
if (!message.transferId.isZero()) { | ||
writer.uint32(8).uint64(message.transferId); | ||
} | ||
if (message.sender !== "") { | ||
writer.uint32(18).string(message.sender); | ||
} | ||
if (message.sourceChain !== "") { | ||
writer.uint32(26).string(message.sourceChain); | ||
} | ||
if (message.destinationChain !== "") { | ||
writer.uint32(34).string(message.destinationChain); | ||
} | ||
if (message.destinationAddress !== "") { | ||
writer.uint32(42).string(message.destinationAddress); | ||
} | ||
if (message.asset !== undefined) { | ||
coin_1.Coin.encode(message.asset, writer.uint32(50).fork()).ldelim(); | ||
} | ||
return writer; | ||
}, | ||
decode(input, length) { | ||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseTokenSent(); | ||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
switch (tag >>> 3) { | ||
case 1: | ||
message.transferId = reader.uint64(); | ||
break; | ||
case 2: | ||
message.sender = reader.string(); | ||
break; | ||
case 3: | ||
message.sourceChain = reader.string(); | ||
break; | ||
case 4: | ||
message.destinationChain = reader.string(); | ||
break; | ||
case 5: | ||
message.destinationAddress = reader.string(); | ||
break; | ||
case 6: | ||
message.asset = coin_1.Coin.decode(reader, reader.uint32()); | ||
break; | ||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
return message; | ||
}, | ||
fromJSON(object) { | ||
return { | ||
transferId: isSet(object.transferId) ? long_1.default.fromValue(object.transferId) : long_1.default.UZERO, | ||
sender: isSet(object.sender) ? String(object.sender) : "", | ||
sourceChain: isSet(object.sourceChain) ? String(object.sourceChain) : "", | ||
destinationChain: isSet(object.destinationChain) ? String(object.destinationChain) : "", | ||
destinationAddress: isSet(object.destinationAddress) ? String(object.destinationAddress) : "", | ||
asset: isSet(object.asset) ? coin_1.Coin.fromJSON(object.asset) : undefined, | ||
}; | ||
}, | ||
toJSON(message) { | ||
const obj = {}; | ||
message.transferId !== undefined && (obj.transferId = (message.transferId || long_1.default.UZERO).toString()); | ||
message.sender !== undefined && (obj.sender = message.sender); | ||
message.sourceChain !== undefined && (obj.sourceChain = message.sourceChain); | ||
message.destinationChain !== undefined && (obj.destinationChain = message.destinationChain); | ||
message.destinationAddress !== undefined && (obj.destinationAddress = message.destinationAddress); | ||
message.asset !== undefined && (obj.asset = message.asset ? coin_1.Coin.toJSON(message.asset) : undefined); | ||
return obj; | ||
}, | ||
fromPartial(object) { | ||
var _a, _b, _c, _d; | ||
const message = createBaseTokenSent(); | ||
message.transferId = | ||
object.transferId !== undefined && object.transferId !== null | ||
? long_1.default.fromValue(object.transferId) | ||
: long_1.default.UZERO; | ||
message.sender = (_a = object.sender) !== null && _a !== void 0 ? _a : ""; | ||
@@ -634,6 +854,4 @@ message.sourceChain = (_b = object.sourceChain) !== null && _b !== void 0 ? _b : ""; | ||
message.destinationAddress = (_d = object.destinationAddress) !== null && _d !== void 0 ? _d : ""; | ||
message.payloadHash = (_e = object.payloadHash) !== null && _e !== void 0 ? _e : new Uint8Array(); | ||
message.payload = (_f = object.payload) !== null && _f !== void 0 ? _f : new Uint8Array(); | ||
message.coin = | ||
object.coin !== undefined && object.coin !== null ? coin_1.Coin.fromPartial(object.coin) : undefined; | ||
message.asset = | ||
object.asset !== undefined && object.asset !== null ? coin_1.Coin.fromPartial(object.asset) : undefined; | ||
return message; | ||
@@ -640,0 +858,0 @@ }, |
@@ -1,2 +0,2 @@ | ||
import { LinkResponse, ConfirmDepositResponse, ExecutePendingTransfersResponse, AddCosmosBasedChainResponse, RegisterAssetResponse, RouteIBCTransfersResponse, RegisterFeeCollectorResponse, RetryIBCTransferResponse, ExecuteGeneralMessageWithTokenResponse, LinkRequest, ConfirmDepositRequest, ExecutePendingTransfersRequest, AddCosmosBasedChainRequest, RegisterAssetRequest, RouteIBCTransfersRequest, RegisterFeeCollectorRequest, RetryIBCTransferRequest, ExecuteGeneralMessageWithTokenRequest } from "../../../axelar/axelarnet/v1beta1/tx"; | ||
import { LinkResponse, ConfirmDepositResponse, ExecutePendingTransfersResponse, AddCosmosBasedChainResponse, RegisterAssetResponse, RouteIBCTransfersResponse, RegisterFeeCollectorResponse, RetryIBCTransferResponse, ExecuteMessageResponse, CallContractResponse, LinkRequest, ConfirmDepositRequest, ExecutePendingTransfersRequest, AddCosmosBasedChainRequest, RegisterAssetRequest, RouteIBCTransfersRequest, RegisterFeeCollectorRequest, RetryIBCTransferRequest, ExecuteMessageRequest, CallContractRequest } from "../../../axelar/axelarnet/v1beta1/tx"; | ||
import { PendingIBCTransferCountResponse, PendingIBCTransferCountRequest } from "../../../axelar/axelarnet/v1beta1/query"; | ||
@@ -14,3 +14,4 @@ export declare const protobufPackage = "axelar.axelarnet.v1beta1"; | ||
RetryIBCTransfer(request: RetryIBCTransferRequest): Promise<RetryIBCTransferResponse>; | ||
ExecuteGeneralMessageWithToken(request: ExecuteGeneralMessageWithTokenRequest): Promise<ExecuteGeneralMessageWithTokenResponse>; | ||
ExecuteMessage(request: ExecuteMessageRequest): Promise<ExecuteMessageResponse>; | ||
CallContract(request: CallContractRequest): Promise<CallContractResponse>; | ||
} | ||
@@ -28,3 +29,4 @@ export declare class MsgServiceClientImpl implements MsgService { | ||
RetryIBCTransfer(request: RetryIBCTransferRequest): Promise<RetryIBCTransferResponse>; | ||
ExecuteGeneralMessageWithToken(request: ExecuteGeneralMessageWithTokenRequest): Promise<ExecuteGeneralMessageWithTokenResponse>; | ||
ExecuteMessage(request: ExecuteMessageRequest): Promise<ExecuteMessageResponse>; | ||
CallContract(request: CallContractRequest): Promise<CallContractResponse>; | ||
} | ||
@@ -31,0 +33,0 @@ /** QueryService defines the gRPC querier service. */ |
@@ -43,3 +43,4 @@ "use strict"; | ||
this.RetryIBCTransfer = this.RetryIBCTransfer.bind(this); | ||
this.ExecuteGeneralMessageWithToken = this.ExecuteGeneralMessageWithToken.bind(this); | ||
this.ExecuteMessage = this.ExecuteMessage.bind(this); | ||
this.CallContract = this.CallContract.bind(this); | ||
} | ||
@@ -86,7 +87,12 @@ Link(request) { | ||
} | ||
ExecuteGeneralMessageWithToken(request) { | ||
const data = tx_1.ExecuteGeneralMessageWithTokenRequest.encode(request).finish(); | ||
const promise = this.rpc.request("axelar.axelarnet.v1beta1.MsgService", "ExecuteGeneralMessageWithToken", data); | ||
return promise.then((data) => tx_1.ExecuteGeneralMessageWithTokenResponse.decode(new _m0.Reader(data))); | ||
ExecuteMessage(request) { | ||
const data = tx_1.ExecuteMessageRequest.encode(request).finish(); | ||
const promise = this.rpc.request("axelar.axelarnet.v1beta1.MsgService", "ExecuteMessage", data); | ||
return promise.then((data) => tx_1.ExecuteMessageResponse.decode(new _m0.Reader(data))); | ||
} | ||
CallContract(request) { | ||
const data = tx_1.CallContractRequest.encode(request).finish(); | ||
const promise = this.rpc.request("axelar.axelarnet.v1beta1.MsgService", "CallContract", data); | ||
return promise.then((data) => tx_1.CallContractResponse.decode(new _m0.Reader(data))); | ||
} | ||
} | ||
@@ -93,0 +99,0 @@ exports.MsgServiceClientImpl = MsgServiceClientImpl; |
@@ -113,10 +113,17 @@ import Long from "long"; | ||
} | ||
export interface ExecuteGeneralMessageWithTokenRequest { | ||
export interface ExecuteMessageRequest { | ||
sender: Uint8Array; | ||
chain: string; | ||
id: string; | ||
payload: Uint8Array; | ||
} | ||
export interface ExecuteGeneralMessageWithTokenResponse { | ||
export interface ExecuteMessageResponse { | ||
} | ||
export interface CallContractRequest { | ||
sender: Uint8Array; | ||
chain: string; | ||
contractAddress: string; | ||
payload: Uint8Array; | ||
} | ||
export interface CallContractResponse { | ||
} | ||
export declare const LinkRequest: { | ||
@@ -488,10 +495,9 @@ encode(message: LinkRequest, writer?: _m0.Writer): _m0.Writer; | ||
}; | ||
export declare const ExecuteGeneralMessageWithTokenRequest: { | ||
encode(message: ExecuteGeneralMessageWithTokenRequest, writer?: _m0.Writer): _m0.Writer; | ||
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ExecuteGeneralMessageWithTokenRequest; | ||
fromJSON(object: any): ExecuteGeneralMessageWithTokenRequest; | ||
toJSON(message: ExecuteGeneralMessageWithTokenRequest): unknown; | ||
export declare const ExecuteMessageRequest: { | ||
encode(message: ExecuteMessageRequest, writer?: _m0.Writer): _m0.Writer; | ||
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ExecuteMessageRequest; | ||
fromJSON(object: any): ExecuteMessageRequest; | ||
toJSON(message: ExecuteMessageRequest): unknown; | ||
fromPartial<I extends { | ||
sender?: Uint8Array | undefined; | ||
chain?: string | undefined; | ||
id?: string | undefined; | ||
@@ -501,14 +507,37 @@ payload?: Uint8Array | undefined; | ||
sender?: Uint8Array | undefined; | ||
chain?: string | undefined; | ||
id?: string | undefined; | ||
payload?: Uint8Array | undefined; | ||
} & Record<Exclude<keyof I, keyof ExecuteGeneralMessageWithTokenRequest>, never>>(object: I): ExecuteGeneralMessageWithTokenRequest; | ||
} & Record<Exclude<keyof I, keyof ExecuteMessageRequest>, never>>(object: I): ExecuteMessageRequest; | ||
}; | ||
export declare const ExecuteGeneralMessageWithTokenResponse: { | ||
encode(_: ExecuteGeneralMessageWithTokenResponse, writer?: _m0.Writer): _m0.Writer; | ||
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ExecuteGeneralMessageWithTokenResponse; | ||
fromJSON(_: any): ExecuteGeneralMessageWithTokenResponse; | ||
toJSON(_: ExecuteGeneralMessageWithTokenResponse): unknown; | ||
fromPartial<I extends {} & {} & Record<Exclude<keyof I, never>, never>>(_: I): ExecuteGeneralMessageWithTokenResponse; | ||
export declare const ExecuteMessageResponse: { | ||
encode(_: ExecuteMessageResponse, writer?: _m0.Writer): _m0.Writer; | ||
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ExecuteMessageResponse; | ||
fromJSON(_: any): ExecuteMessageResponse; | ||
toJSON(_: ExecuteMessageResponse): unknown; | ||
fromPartial<I extends {} & {} & Record<Exclude<keyof I, never>, never>>(_: I): ExecuteMessageResponse; | ||
}; | ||
export declare const CallContractRequest: { | ||
encode(message: CallContractRequest, writer?: _m0.Writer): _m0.Writer; | ||
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): CallContractRequest; | ||
fromJSON(object: any): CallContractRequest; | ||
toJSON(message: CallContractRequest): unknown; | ||
fromPartial<I extends { | ||
sender?: Uint8Array | undefined; | ||
chain?: string | undefined; | ||
contractAddress?: string | undefined; | ||
payload?: Uint8Array | undefined; | ||
} & { | ||
sender?: Uint8Array | undefined; | ||
chain?: string | undefined; | ||
contractAddress?: string | undefined; | ||
payload?: Uint8Array | undefined; | ||
} & Record<Exclude<keyof I, keyof CallContractRequest>, never>>(object: I): CallContractRequest; | ||
}; | ||
export declare const CallContractResponse: { | ||
encode(_: CallContractResponse, writer?: _m0.Writer): _m0.Writer; | ||
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): CallContractResponse; | ||
fromJSON(_: any): CallContractResponse; | ||
toJSON(_: CallContractResponse): unknown; | ||
fromPartial<I extends {} & {} & Record<Exclude<keyof I, never>, never>>(_: I): CallContractResponse; | ||
}; | ||
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; | ||
@@ -515,0 +544,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 {} ? { |
@@ -25,3 +25,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ExecuteGeneralMessageWithTokenResponse = exports.ExecuteGeneralMessageWithTokenRequest = exports.RetryIBCTransferResponse = exports.RetryIBCTransferRequest = exports.RegisterFeeCollectorResponse = exports.RegisterFeeCollectorRequest = exports.RouteIBCTransfersResponse = exports.RouteIBCTransfersRequest = exports.RegisterAssetResponse = exports.RegisterAssetRequest = exports.AddCosmosBasedChainResponse = exports.AddCosmosBasedChainRequest = exports.RegisterIBCPathResponse = exports.RegisterIBCPathRequest = exports.ExecutePendingTransfersResponse = exports.ExecutePendingTransfersRequest = exports.ConfirmDepositResponse = exports.ConfirmDepositRequest = exports.LinkResponse = exports.LinkRequest = exports.protobufPackage = void 0; | ||
exports.CallContractResponse = exports.CallContractRequest = exports.ExecuteMessageResponse = exports.ExecuteMessageRequest = exports.RetryIBCTransferResponse = exports.RetryIBCTransferRequest = exports.RegisterFeeCollectorResponse = exports.RegisterFeeCollectorRequest = exports.RouteIBCTransfersResponse = exports.RouteIBCTransfersRequest = exports.RegisterAssetResponse = exports.RegisterAssetRequest = exports.AddCosmosBasedChainResponse = exports.AddCosmosBasedChainRequest = exports.RegisterIBCPathResponse = exports.RegisterIBCPathRequest = exports.ExecutePendingTransfersResponse = exports.ExecutePendingTransfersRequest = exports.ConfirmDepositResponse = exports.ConfirmDepositRequest = exports.LinkResponse = exports.LinkRequest = exports.protobufPackage = void 0; | ||
/* eslint-disable */ | ||
@@ -946,6 +946,6 @@ const long_1 = __importDefault(require("long")); | ||
}; | ||
function createBaseExecuteGeneralMessageWithTokenRequest() { | ||
return { sender: new Uint8Array(), chain: "", id: "", payload: new Uint8Array() }; | ||
function createBaseExecuteMessageRequest() { | ||
return { sender: new Uint8Array(), id: "", payload: new Uint8Array() }; | ||
} | ||
exports.ExecuteGeneralMessageWithTokenRequest = { | ||
exports.ExecuteMessageRequest = { | ||
encode(message, writer = _m0.Writer.create()) { | ||
@@ -955,7 +955,104 @@ if (message.sender.length !== 0) { | ||
} | ||
if (message.id !== "") { | ||
writer.uint32(18).string(message.id); | ||
} | ||
if (message.payload.length !== 0) { | ||
writer.uint32(26).bytes(message.payload); | ||
} | ||
return writer; | ||
}, | ||
decode(input, length) { | ||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseExecuteMessageRequest(); | ||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
switch (tag >>> 3) { | ||
case 1: | ||
message.sender = reader.bytes(); | ||
break; | ||
case 2: | ||
message.id = reader.string(); | ||
break; | ||
case 3: | ||
message.payload = reader.bytes(); | ||
break; | ||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
return message; | ||
}, | ||
fromJSON(object) { | ||
return { | ||
sender: isSet(object.sender) ? bytesFromBase64(object.sender) : new Uint8Array(), | ||
id: isSet(object.id) ? String(object.id) : "", | ||
payload: isSet(object.payload) ? bytesFromBase64(object.payload) : new Uint8Array(), | ||
}; | ||
}, | ||
toJSON(message) { | ||
const obj = {}; | ||
message.sender !== undefined && | ||
(obj.sender = base64FromBytes(message.sender !== undefined ? message.sender : new Uint8Array())); | ||
message.id !== undefined && (obj.id = message.id); | ||
message.payload !== undefined && | ||
(obj.payload = base64FromBytes(message.payload !== undefined ? message.payload : new Uint8Array())); | ||
return obj; | ||
}, | ||
fromPartial(object) { | ||
var _a, _b, _c; | ||
const message = createBaseExecuteMessageRequest(); | ||
message.sender = (_a = object.sender) !== null && _a !== void 0 ? _a : new Uint8Array(); | ||
message.id = (_b = object.id) !== null && _b !== void 0 ? _b : ""; | ||
message.payload = (_c = object.payload) !== null && _c !== void 0 ? _c : new Uint8Array(); | ||
return message; | ||
}, | ||
}; | ||
function createBaseExecuteMessageResponse() { | ||
return {}; | ||
} | ||
exports.ExecuteMessageResponse = { | ||
encode(_, writer = _m0.Writer.create()) { | ||
return writer; | ||
}, | ||
decode(input, length) { | ||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseExecuteMessageResponse(); | ||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
switch (tag >>> 3) { | ||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
return message; | ||
}, | ||
fromJSON(_) { | ||
return {}; | ||
}, | ||
toJSON(_) { | ||
const obj = {}; | ||
return obj; | ||
}, | ||
fromPartial(_) { | ||
const message = createBaseExecuteMessageResponse(); | ||
return message; | ||
}, | ||
}; | ||
function createBaseCallContractRequest() { | ||
return { sender: new Uint8Array(), chain: "", contractAddress: "", payload: new Uint8Array() }; | ||
} | ||
exports.CallContractRequest = { | ||
encode(message, writer = _m0.Writer.create()) { | ||
if (message.sender.length !== 0) { | ||
writer.uint32(10).bytes(message.sender); | ||
} | ||
if (message.chain !== "") { | ||
writer.uint32(18).string(message.chain); | ||
} | ||
if (message.id !== "") { | ||
writer.uint32(26).string(message.id); | ||
if (message.contractAddress !== "") { | ||
writer.uint32(26).string(message.contractAddress); | ||
} | ||
@@ -970,3 +1067,3 @@ if (message.payload.length !== 0) { | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseExecuteGeneralMessageWithTokenRequest(); | ||
const message = createBaseCallContractRequest(); | ||
while (reader.pos < end) { | ||
@@ -982,3 +1079,3 @@ const tag = reader.uint32(); | ||
case 3: | ||
message.id = reader.string(); | ||
message.contractAddress = reader.string(); | ||
break; | ||
@@ -999,3 +1096,3 @@ case 4: | ||
chain: isSet(object.chain) ? String(object.chain) : "", | ||
id: isSet(object.id) ? String(object.id) : "", | ||
contractAddress: isSet(object.contractAddress) ? String(object.contractAddress) : "", | ||
payload: isSet(object.payload) ? bytesFromBase64(object.payload) : new Uint8Array(), | ||
@@ -1009,3 +1106,3 @@ }; | ||
message.chain !== undefined && (obj.chain = message.chain); | ||
message.id !== undefined && (obj.id = message.id); | ||
message.contractAddress !== undefined && (obj.contractAddress = message.contractAddress); | ||
message.payload !== undefined && | ||
@@ -1017,6 +1114,6 @@ (obj.payload = base64FromBytes(message.payload !== undefined ? message.payload : new Uint8Array())); | ||
var _a, _b, _c, _d; | ||
const message = createBaseExecuteGeneralMessageWithTokenRequest(); | ||
const message = createBaseCallContractRequest(); | ||
message.sender = (_a = object.sender) !== null && _a !== void 0 ? _a : new Uint8Array(); | ||
message.chain = (_b = object.chain) !== null && _b !== void 0 ? _b : ""; | ||
message.id = (_c = object.id) !== null && _c !== void 0 ? _c : ""; | ||
message.contractAddress = (_c = object.contractAddress) !== null && _c !== void 0 ? _c : ""; | ||
message.payload = (_d = object.payload) !== null && _d !== void 0 ? _d : new Uint8Array(); | ||
@@ -1026,6 +1123,6 @@ return message; | ||
}; | ||
function createBaseExecuteGeneralMessageWithTokenResponse() { | ||
function createBaseCallContractResponse() { | ||
return {}; | ||
} | ||
exports.ExecuteGeneralMessageWithTokenResponse = { | ||
exports.CallContractResponse = { | ||
encode(_, writer = _m0.Writer.create()) { | ||
@@ -1037,3 +1134,3 @@ return writer; | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseExecuteGeneralMessageWithTokenResponse(); | ||
const message = createBaseCallContractResponse(); | ||
while (reader.pos < end) { | ||
@@ -1057,3 +1154,3 @@ const tag = reader.uint32(); | ||
fromPartial(_) { | ||
const message = createBaseExecuteGeneralMessageWithTokenResponse(); | ||
const message = createBaseCallContractResponse(); | ||
return message; | ||
@@ -1060,0 +1157,0 @@ }, |
@@ -37,20 +37,2 @@ import Long from "long"; | ||
} | ||
export interface GeneralMessageWithToken { | ||
id: string; | ||
chain: string; | ||
sender: string; | ||
destinationChain: string; | ||
receiver: string; | ||
payloadHash: Uint8Array; | ||
asset?: Coin; | ||
status: GeneralMessageWithToken_Status; | ||
} | ||
export declare enum GeneralMessageWithToken_Status { | ||
STATUS_UNSPECIFIED = 0, | ||
STATUS_APPROVED = 1, | ||
STATUS_EXECUTED = 2, | ||
UNRECOGNIZED = -1 | ||
} | ||
export declare function generalMessageWithToken_StatusFromJSON(object: any): GeneralMessageWithToken_Status; | ||
export declare function generalMessageWithToken_StatusToJSON(object: GeneralMessageWithToken_Status): string; | ||
export declare const IBCTransfer: { | ||
@@ -249,36 +231,2 @@ encode(message: IBCTransfer, writer?: _m0.Writer): _m0.Writer; | ||
}; | ||
export declare const GeneralMessageWithToken: { | ||
encode(message: GeneralMessageWithToken, writer?: _m0.Writer): _m0.Writer; | ||
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): GeneralMessageWithToken; | ||
fromJSON(object: any): GeneralMessageWithToken; | ||
toJSON(message: GeneralMessageWithToken): unknown; | ||
fromPartial<I extends { | ||
id?: string | undefined; | ||
chain?: string | undefined; | ||
sender?: string | undefined; | ||
destinationChain?: string | undefined; | ||
receiver?: string | undefined; | ||
payloadHash?: Uint8Array | undefined; | ||
asset?: { | ||
denom?: string | undefined; | ||
amount?: string | undefined; | ||
} | undefined; | ||
status?: GeneralMessageWithToken_Status | undefined; | ||
} & { | ||
id?: string | undefined; | ||
chain?: string | undefined; | ||
sender?: string | undefined; | ||
destinationChain?: string | undefined; | ||
receiver?: string | undefined; | ||
payloadHash?: Uint8Array | undefined; | ||
asset?: ({ | ||
denom?: string | undefined; | ||
amount?: string | undefined; | ||
} & { | ||
denom?: string | undefined; | ||
amount?: string | undefined; | ||
} & Record<Exclude<keyof I["asset"], keyof Coin>, never>) | undefined; | ||
status?: GeneralMessageWithToken_Status | undefined; | ||
} & Record<Exclude<keyof I, keyof GeneralMessageWithToken>, never>>(object: I): GeneralMessageWithToken; | ||
}; | ||
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; | ||
@@ -285,0 +233,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 {} ? { |
@@ -25,3 +25,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.GeneralMessageWithToken = exports.Asset = exports.CosmosChain = exports.IBCTransfer = exports.generalMessageWithToken_StatusToJSON = exports.generalMessageWithToken_StatusFromJSON = exports.GeneralMessageWithToken_Status = exports.iBCTransfer_StatusToJSON = exports.iBCTransfer_StatusFromJSON = exports.IBCTransfer_Status = exports.protobufPackage = void 0; | ||
exports.Asset = exports.CosmosChain = exports.IBCTransfer = exports.iBCTransfer_StatusToJSON = exports.iBCTransfer_StatusFromJSON = exports.IBCTransfer_Status = exports.protobufPackage = void 0; | ||
/* eslint-disable */ | ||
@@ -77,41 +77,2 @@ const long_1 = __importDefault(require("long")); | ||
exports.iBCTransfer_StatusToJSON = iBCTransfer_StatusToJSON; | ||
var GeneralMessageWithToken_Status; | ||
(function (GeneralMessageWithToken_Status) { | ||
GeneralMessageWithToken_Status[GeneralMessageWithToken_Status["STATUS_UNSPECIFIED"] = 0] = "STATUS_UNSPECIFIED"; | ||
GeneralMessageWithToken_Status[GeneralMessageWithToken_Status["STATUS_APPROVED"] = 1] = "STATUS_APPROVED"; | ||
GeneralMessageWithToken_Status[GeneralMessageWithToken_Status["STATUS_EXECUTED"] = 2] = "STATUS_EXECUTED"; | ||
GeneralMessageWithToken_Status[GeneralMessageWithToken_Status["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; | ||
})(GeneralMessageWithToken_Status = exports.GeneralMessageWithToken_Status || (exports.GeneralMessageWithToken_Status = {})); | ||
function generalMessageWithToken_StatusFromJSON(object) { | ||
switch (object) { | ||
case 0: | ||
case "STATUS_UNSPECIFIED": | ||
return GeneralMessageWithToken_Status.STATUS_UNSPECIFIED; | ||
case 1: | ||
case "STATUS_APPROVED": | ||
return GeneralMessageWithToken_Status.STATUS_APPROVED; | ||
case 2: | ||
case "STATUS_EXECUTED": | ||
return GeneralMessageWithToken_Status.STATUS_EXECUTED; | ||
case -1: | ||
case "UNRECOGNIZED": | ||
default: | ||
return GeneralMessageWithToken_Status.UNRECOGNIZED; | ||
} | ||
} | ||
exports.generalMessageWithToken_StatusFromJSON = generalMessageWithToken_StatusFromJSON; | ||
function generalMessageWithToken_StatusToJSON(object) { | ||
switch (object) { | ||
case GeneralMessageWithToken_Status.STATUS_UNSPECIFIED: | ||
return "STATUS_UNSPECIFIED"; | ||
case GeneralMessageWithToken_Status.STATUS_APPROVED: | ||
return "STATUS_APPROVED"; | ||
case GeneralMessageWithToken_Status.STATUS_EXECUTED: | ||
return "STATUS_EXECUTED"; | ||
case GeneralMessageWithToken_Status.UNRECOGNIZED: | ||
default: | ||
return "UNRECOGNIZED"; | ||
} | ||
} | ||
exports.generalMessageWithToken_StatusToJSON = generalMessageWithToken_StatusToJSON; | ||
function createBaseIBCTransfer() { | ||
@@ -368,120 +329,2 @@ return { | ||
}; | ||
function createBaseGeneralMessageWithToken() { | ||
return { | ||
id: "", | ||
chain: "", | ||
sender: "", | ||
destinationChain: "", | ||
receiver: "", | ||
payloadHash: new Uint8Array(), | ||
asset: undefined, | ||
status: 0, | ||
}; | ||
} | ||
exports.GeneralMessageWithToken = { | ||
encode(message, writer = _m0.Writer.create()) { | ||
if (message.id !== "") { | ||
writer.uint32(10).string(message.id); | ||
} | ||
if (message.chain !== "") { | ||
writer.uint32(18).string(message.chain); | ||
} | ||
if (message.sender !== "") { | ||
writer.uint32(26).string(message.sender); | ||
} | ||
if (message.destinationChain !== "") { | ||
writer.uint32(34).string(message.destinationChain); | ||
} | ||
if (message.receiver !== "") { | ||
writer.uint32(42).string(message.receiver); | ||
} | ||
if (message.payloadHash.length !== 0) { | ||
writer.uint32(50).bytes(message.payloadHash); | ||
} | ||
if (message.asset !== undefined) { | ||
coin_1.Coin.encode(message.asset, writer.uint32(58).fork()).ldelim(); | ||
} | ||
if (message.status !== 0) { | ||
writer.uint32(64).int32(message.status); | ||
} | ||
return writer; | ||
}, | ||
decode(input, length) { | ||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseGeneralMessageWithToken(); | ||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
switch (tag >>> 3) { | ||
case 1: | ||
message.id = reader.string(); | ||
break; | ||
case 2: | ||
message.chain = reader.string(); | ||
break; | ||
case 3: | ||
message.sender = reader.string(); | ||
break; | ||
case 4: | ||
message.destinationChain = reader.string(); | ||
break; | ||
case 5: | ||
message.receiver = reader.string(); | ||
break; | ||
case 6: | ||
message.payloadHash = reader.bytes(); | ||
break; | ||
case 7: | ||
message.asset = coin_1.Coin.decode(reader, reader.uint32()); | ||
break; | ||
case 8: | ||
message.status = reader.int32(); | ||
break; | ||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
return message; | ||
}, | ||
fromJSON(object) { | ||
return { | ||
id: isSet(object.id) ? String(object.id) : "", | ||
chain: isSet(object.chain) ? String(object.chain) : "", | ||
sender: isSet(object.sender) ? String(object.sender) : "", | ||
destinationChain: isSet(object.destinationChain) ? String(object.destinationChain) : "", | ||
receiver: isSet(object.receiver) ? String(object.receiver) : "", | ||
payloadHash: isSet(object.payloadHash) ? bytesFromBase64(object.payloadHash) : new Uint8Array(), | ||
asset: isSet(object.asset) ? coin_1.Coin.fromJSON(object.asset) : undefined, | ||
status: isSet(object.status) ? generalMessageWithToken_StatusFromJSON(object.status) : 0, | ||
}; | ||
}, | ||
toJSON(message) { | ||
const obj = {}; | ||
message.id !== undefined && (obj.id = message.id); | ||
message.chain !== undefined && (obj.chain = message.chain); | ||
message.sender !== undefined && (obj.sender = message.sender); | ||
message.destinationChain !== undefined && (obj.destinationChain = message.destinationChain); | ||
message.receiver !== undefined && (obj.receiver = message.receiver); | ||
message.payloadHash !== undefined && | ||
(obj.payloadHash = base64FromBytes(message.payloadHash !== undefined ? message.payloadHash : new Uint8Array())); | ||
message.asset !== undefined && (obj.asset = message.asset ? coin_1.Coin.toJSON(message.asset) : undefined); | ||
message.status !== undefined && (obj.status = generalMessageWithToken_StatusToJSON(message.status)); | ||
return obj; | ||
}, | ||
fromPartial(object) { | ||
var _a, _b, _c, _d, _e, _f, _g; | ||
const message = createBaseGeneralMessageWithToken(); | ||
message.id = (_a = object.id) !== null && _a !== void 0 ? _a : ""; | ||
message.chain = (_b = object.chain) !== null && _b !== void 0 ? _b : ""; | ||
message.sender = (_c = object.sender) !== null && _c !== void 0 ? _c : ""; | ||
message.destinationChain = (_d = object.destinationChain) !== null && _d !== void 0 ? _d : ""; | ||
message.receiver = (_e = object.receiver) !== null && _e !== void 0 ? _e : ""; | ||
message.payloadHash = (_f = object.payloadHash) !== null && _f !== void 0 ? _f : new Uint8Array(); | ||
message.asset = | ||
object.asset !== undefined && object.asset !== null ? coin_1.Coin.fromPartial(object.asset) : undefined; | ||
message.status = (_g = object.status) !== null && _g !== void 0 ? _g : 0; | ||
return message; | ||
}, | ||
}; | ||
var globalThis = (() => { | ||
@@ -488,0 +331,0 @@ if (typeof globalThis !== "undefined") |
@@ -96,2 +96,4 @@ "use strict"; | ||
confirmedEventQueue: undefined, | ||
legacyConfirmedDeposits: [], | ||
legacyBurnedDeposits: [], | ||
}; | ||
@@ -131,2 +133,8 @@ } | ||
} | ||
for (const v of message.legacyConfirmedDeposits) { | ||
types_1.ERC20Deposit.encode(v, writer.uint32(106).fork()).ldelim(); | ||
} | ||
for (const v of message.legacyBurnedDeposits) { | ||
types_1.ERC20Deposit.encode(v, writer.uint32(114).fork()).ldelim(); | ||
} | ||
return writer; | ||
@@ -171,2 +179,8 @@ }, | ||
break; | ||
case 13: | ||
message.legacyConfirmedDeposits.push(types_1.ERC20Deposit.decode(reader, reader.uint32())); | ||
break; | ||
case 14: | ||
message.legacyBurnedDeposits.push(types_1.ERC20Deposit.decode(reader, reader.uint32())); | ||
break; | ||
default: | ||
@@ -203,2 +217,8 @@ reader.skipType(tag & 7); | ||
: undefined, | ||
legacyConfirmedDeposits: Array.isArray(object === null || object === void 0 ? void 0 : object.legacyConfirmedDeposits) | ||
? object.legacyConfirmedDeposits.map((e) => types_1.ERC20Deposit.fromJSON(e)) | ||
: [], | ||
legacyBurnedDeposits: Array.isArray(object === null || object === void 0 ? void 0 : object.legacyBurnedDeposits) | ||
? object.legacyBurnedDeposits.map((e) => types_1.ERC20Deposit.fromJSON(e)) | ||
: [], | ||
}; | ||
@@ -253,6 +273,18 @@ }, | ||
: undefined); | ||
if (message.legacyConfirmedDeposits) { | ||
obj.legacyConfirmedDeposits = message.legacyConfirmedDeposits.map((e) => e ? types_1.ERC20Deposit.toJSON(e) : undefined); | ||
} | ||
else { | ||
obj.legacyConfirmedDeposits = []; | ||
} | ||
if (message.legacyBurnedDeposits) { | ||
obj.legacyBurnedDeposits = message.legacyBurnedDeposits.map((e) => e ? types_1.ERC20Deposit.toJSON(e) : undefined); | ||
} | ||
else { | ||
obj.legacyBurnedDeposits = []; | ||
} | ||
return obj; | ||
}, | ||
fromPartial(object) { | ||
var _a, _b, _c, _d, _e, _f; | ||
var _a, _b, _c, _d, _e, _f, _g, _h; | ||
const message = createBaseGenesisState_Chain(); | ||
@@ -279,2 +311,5 @@ message.params = | ||
: undefined; | ||
message.legacyConfirmedDeposits = | ||
((_g = object.legacyConfirmedDeposits) === null || _g === void 0 ? void 0 : _g.map((e) => types_1.ERC20Deposit.fromPartial(e))) || []; | ||
message.legacyBurnedDeposits = ((_h = object.legacyBurnedDeposits) === null || _h === void 0 ? void 0 : _h.map((e) => types_1.ERC20Deposit.fromPartial(e))) || []; | ||
return message; | ||
@@ -281,0 +316,0 @@ }, |
@@ -96,2 +96,19 @@ import Long from "long"; | ||
} | ||
export interface CommandRequest { | ||
chain: string; | ||
id: string; | ||
} | ||
export interface CommandResponse { | ||
id: string; | ||
type: string; | ||
params: { | ||
[key: string]: string; | ||
}; | ||
keyId: string; | ||
maxGasCost: number; | ||
} | ||
export interface CommandResponse_ParamsEntry { | ||
key: string; | ||
value: string; | ||
} | ||
export interface PendingCommandsRequest { | ||
@@ -646,2 +663,53 @@ chain: string; | ||
}; | ||
export declare const CommandRequest: { | ||
encode(message: CommandRequest, writer?: _m0.Writer): _m0.Writer; | ||
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): CommandRequest; | ||
fromJSON(object: any): CommandRequest; | ||
toJSON(message: CommandRequest): unknown; | ||
fromPartial<I extends { | ||
chain?: string | undefined; | ||
id?: string | undefined; | ||
} & { | ||
chain?: string | undefined; | ||
id?: string | undefined; | ||
} & Record<Exclude<keyof I, keyof CommandRequest>, never>>(object: I): CommandRequest; | ||
}; | ||
export declare const CommandResponse: { | ||
encode(message: CommandResponse, writer?: _m0.Writer): _m0.Writer; | ||
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): CommandResponse; | ||
fromJSON(object: any): CommandResponse; | ||
toJSON(message: CommandResponse): unknown; | ||
fromPartial<I extends { | ||
id?: string | undefined; | ||
type?: string | undefined; | ||
params?: { | ||
[x: string]: string | undefined; | ||
} | undefined; | ||
keyId?: string | undefined; | ||
maxGasCost?: number | undefined; | ||
} & { | ||
id?: string | undefined; | ||
type?: string | undefined; | ||
params?: ({ | ||
[x: string]: string | undefined; | ||
} & { | ||
[x: string]: string | undefined; | ||
} & Record<Exclude<keyof I["params"], string | number>, never>) | undefined; | ||
keyId?: string | undefined; | ||
maxGasCost?: number | undefined; | ||
} & Record<Exclude<keyof I, keyof CommandResponse>, never>>(object: I): CommandResponse; | ||
}; | ||
export declare const CommandResponse_ParamsEntry: { | ||
encode(message: CommandResponse_ParamsEntry, writer?: _m0.Writer): _m0.Writer; | ||
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): CommandResponse_ParamsEntry; | ||
fromJSON(object: any): CommandResponse_ParamsEntry; | ||
toJSON(message: CommandResponse_ParamsEntry): unknown; | ||
fromPartial<I extends { | ||
key?: string | undefined; | ||
value?: string | undefined; | ||
} & { | ||
key?: string | undefined; | ||
value?: string | undefined; | ||
} & Record<Exclude<keyof I, keyof CommandResponse_ParamsEntry>, never>>(object: I): CommandResponse_ParamsEntry; | ||
}; | ||
export declare const PendingCommandsRequest: { | ||
@@ -648,0 +716,0 @@ encode(message: PendingCommandsRequest, writer?: _m0.Writer): _m0.Writer; |
import { SetGatewayResponse, ConfirmGatewayTxResponse, LinkResponse, ConfirmTokenResponse, ConfirmDepositResponse, ConfirmTransferKeyResponse, CreateDeployTokenResponse, CreateBurnTokensResponse, CreatePendingTransfersResponse, CreateTransferOperatorshipResponse, SignCommandsResponse, AddChainResponse, RetryFailedEventResponse, SetGatewayRequest, ConfirmGatewayTxRequest, LinkRequest, ConfirmTokenRequest, ConfirmDepositRequest, ConfirmTransferKeyRequest, CreateDeployTokenRequest, CreateBurnTokensRequest, CreatePendingTransfersRequest, CreateTransferOperatorshipRequest, SignCommandsRequest, AddChainRequest, RetryFailedEventRequest } from "../../../axelar/evm/v1beta1/tx"; | ||
import { BatchedCommandsResponse, BurnerInfoResponse, ConfirmationHeightResponse, DepositStateResponse, PendingCommandsResponse, ChainsResponse, KeyAddressResponse, GatewayAddressResponse, BytecodeResponse, EventResponse, ERC20TokensResponse, TokenInfoResponse, BatchedCommandsRequest, BurnerInfoRequest, ConfirmationHeightRequest, DepositStateRequest, PendingCommandsRequest, ChainsRequest, KeyAddressRequest, GatewayAddressRequest, BytecodeRequest, EventRequest, ERC20TokensRequest, TokenInfoRequest } from "../../../axelar/evm/v1beta1/query"; | ||
import { BatchedCommandsResponse, BurnerInfoResponse, ConfirmationHeightResponse, DepositStateResponse, PendingCommandsResponse, ChainsResponse, CommandResponse, KeyAddressResponse, GatewayAddressResponse, BytecodeResponse, EventResponse, ERC20TokensResponse, TokenInfoResponse, BatchedCommandsRequest, BurnerInfoRequest, ConfirmationHeightRequest, DepositStateRequest, PendingCommandsRequest, ChainsRequest, CommandRequest, KeyAddressRequest, GatewayAddressRequest, BytecodeRequest, EventRequest, ERC20TokensRequest, TokenInfoRequest } from "../../../axelar/evm/v1beta1/query"; | ||
export declare const protobufPackage = "axelar.evm.v1beta1"; | ||
@@ -59,7 +59,15 @@ /** Msg defines the evm Msg service. */ | ||
Chains(request: ChainsRequest): Promise<ChainsResponse>; | ||
/** Command queries the command of a chain provided the command id */ | ||
Command(request: CommandRequest): Promise<CommandResponse>; | ||
/** KeyAddress queries the address of key of a chain */ | ||
KeyAddress(request: KeyAddressRequest): Promise<KeyAddressResponse>; | ||
/** GatewayAddress queries the address of axelar gateway at the specified chain */ | ||
/** | ||
* GatewayAddress queries the address of axelar gateway at the specified | ||
* chain | ||
*/ | ||
GatewayAddress(request: GatewayAddressRequest): Promise<GatewayAddressResponse>; | ||
/** Bytecode queries the bytecode of a specified gateway at the specified chain */ | ||
/** | ||
* Bytecode queries the bytecode of a specified gateway at the specified | ||
* chain | ||
*/ | ||
Bytecode(request: BytecodeRequest): Promise<BytecodeResponse>; | ||
@@ -82,2 +90,3 @@ /** Event queries an event at the specified chain */ | ||
Chains(request: ChainsRequest): Promise<ChainsResponse>; | ||
Command(request: CommandRequest): Promise<CommandResponse>; | ||
KeyAddress(request: KeyAddressRequest): Promise<KeyAddressResponse>; | ||
@@ -84,0 +93,0 @@ GatewayAddress(request: GatewayAddressRequest): Promise<GatewayAddressResponse>; |
@@ -125,2 +125,3 @@ "use strict"; | ||
this.Chains = this.Chains.bind(this); | ||
this.Command = this.Command.bind(this); | ||
this.KeyAddress = this.KeyAddress.bind(this); | ||
@@ -163,2 +164,7 @@ this.GatewayAddress = this.GatewayAddress.bind(this); | ||
} | ||
Command(request) { | ||
const data = query_1.CommandRequest.encode(request).finish(); | ||
const promise = this.rpc.request("axelar.evm.v1beta1.QueryService", "Command", data); | ||
return promise.then((data) => query_1.CommandResponse.decode(new _m0.Reader(data))); | ||
} | ||
KeyAddress(request) { | ||
@@ -165,0 +171,0 @@ const data = query_1.KeyAddressRequest.encode(request).finish(); |
@@ -60,2 +60,20 @@ import Long from "long"; | ||
} | ||
export interface GeneralMessage { | ||
id: string; | ||
sender?: CrossChainAddress; | ||
recipient?: CrossChainAddress; | ||
payloadHash: Uint8Array; | ||
status: GeneralMessage_Status; | ||
asset?: Coin; | ||
} | ||
export declare enum GeneralMessage_Status { | ||
STATUS_UNSPECIFIED = 0, | ||
STATUS_APPROVED = 1, | ||
STATUS_SENT = 2, | ||
STATUS_EXECUTED = 3, | ||
STATUS_FAILED = 4, | ||
UNRECOGNIZED = -1 | ||
} | ||
export declare function generalMessage_StatusFromJSON(object: any): GeneralMessage_Status; | ||
export declare function generalMessage_StatusToJSON(object: GeneralMessage_Status): string; | ||
export declare const Chain: { | ||
@@ -276,2 +294,90 @@ encode(message: Chain, writer?: _m0.Writer): _m0.Writer; | ||
}; | ||
export declare const GeneralMessage: { | ||
encode(message: GeneralMessage, writer?: _m0.Writer): _m0.Writer; | ||
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): GeneralMessage; | ||
fromJSON(object: any): GeneralMessage; | ||
toJSON(message: GeneralMessage): unknown; | ||
fromPartial<I extends { | ||
id?: string | undefined; | ||
sender?: { | ||
chain?: { | ||
name?: string | undefined; | ||
supportsForeignAssets?: boolean | undefined; | ||
keyType?: KeyType | undefined; | ||
module?: string | undefined; | ||
} | undefined; | ||
address?: string | undefined; | ||
} | undefined; | ||
recipient?: { | ||
chain?: { | ||
name?: string | undefined; | ||
supportsForeignAssets?: boolean | undefined; | ||
keyType?: KeyType | undefined; | ||
module?: string | undefined; | ||
} | undefined; | ||
address?: string | undefined; | ||
} | undefined; | ||
payloadHash?: Uint8Array | undefined; | ||
status?: GeneralMessage_Status | undefined; | ||
asset?: { | ||
denom?: string | undefined; | ||
amount?: string | undefined; | ||
} | undefined; | ||
} & { | ||
id?: string | undefined; | ||
sender?: ({ | ||
chain?: { | ||
name?: string | undefined; | ||
supportsForeignAssets?: boolean | undefined; | ||
keyType?: KeyType | undefined; | ||
module?: string | undefined; | ||
} | undefined; | ||
address?: string | undefined; | ||
} & { | ||
chain?: ({ | ||
name?: string | undefined; | ||
supportsForeignAssets?: boolean | undefined; | ||
keyType?: KeyType | undefined; | ||
module?: string | undefined; | ||
} & { | ||
name?: string | undefined; | ||
supportsForeignAssets?: boolean | undefined; | ||
keyType?: KeyType | undefined; | ||
module?: string | undefined; | ||
} & Record<Exclude<keyof I["sender"]["chain"], keyof Chain>, never>) | undefined; | ||
address?: string | undefined; | ||
} & Record<Exclude<keyof I["sender"], keyof CrossChainAddress>, never>) | undefined; | ||
recipient?: ({ | ||
chain?: { | ||
name?: string | undefined; | ||
supportsForeignAssets?: boolean | undefined; | ||
keyType?: KeyType | undefined; | ||
module?: string | undefined; | ||
} | undefined; | ||
address?: string | undefined; | ||
} & { | ||
chain?: ({ | ||
name?: string | undefined; | ||
supportsForeignAssets?: boolean | undefined; | ||
keyType?: KeyType | undefined; | ||
module?: string | undefined; | ||
} & { | ||
name?: string | undefined; | ||
supportsForeignAssets?: boolean | undefined; | ||
keyType?: KeyType | undefined; | ||
module?: string | undefined; | ||
} & Record<Exclude<keyof I["recipient"]["chain"], keyof Chain>, never>) | undefined; | ||
address?: string | undefined; | ||
} & Record<Exclude<keyof I["recipient"], keyof CrossChainAddress>, never>) | undefined; | ||
payloadHash?: Uint8Array | undefined; | ||
status?: GeneralMessage_Status | undefined; | ||
asset?: ({ | ||
denom?: string | undefined; | ||
amount?: string | undefined; | ||
} & { | ||
denom?: string | undefined; | ||
amount?: string | undefined; | ||
} & Record<Exclude<keyof I["asset"], keyof Coin>, never>) | undefined; | ||
} & Record<Exclude<keyof I, keyof GeneralMessage>, never>>(object: I): GeneralMessage; | ||
}; | ||
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; | ||
@@ -278,0 +384,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 {} ? { |
@@ -25,3 +25,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Asset = exports.FeeInfo = exports.TransferFee = exports.CrossChainTransfer = exports.CrossChainAddress = exports.Chain = exports.transferDirectionToJSON = exports.transferDirectionFromJSON = exports.TransferDirection = exports.transferStateToJSON = exports.transferStateFromJSON = exports.TransferState = exports.protobufPackage = void 0; | ||
exports.GeneralMessage = exports.Asset = exports.FeeInfo = exports.TransferFee = exports.CrossChainTransfer = exports.CrossChainAddress = exports.Chain = exports.generalMessage_StatusToJSON = exports.generalMessage_StatusFromJSON = exports.GeneralMessage_Status = exports.transferDirectionToJSON = exports.transferDirectionFromJSON = exports.TransferDirection = exports.transferStateToJSON = exports.transferStateFromJSON = exports.TransferState = exports.protobufPackage = void 0; | ||
/* eslint-disable */ | ||
@@ -117,2 +117,53 @@ const long_1 = __importDefault(require("long")); | ||
exports.transferDirectionToJSON = transferDirectionToJSON; | ||
var GeneralMessage_Status; | ||
(function (GeneralMessage_Status) { | ||
GeneralMessage_Status[GeneralMessage_Status["STATUS_UNSPECIFIED"] = 0] = "STATUS_UNSPECIFIED"; | ||
GeneralMessage_Status[GeneralMessage_Status["STATUS_APPROVED"] = 1] = "STATUS_APPROVED"; | ||
GeneralMessage_Status[GeneralMessage_Status["STATUS_SENT"] = 2] = "STATUS_SENT"; | ||
GeneralMessage_Status[GeneralMessage_Status["STATUS_EXECUTED"] = 3] = "STATUS_EXECUTED"; | ||
GeneralMessage_Status[GeneralMessage_Status["STATUS_FAILED"] = 4] = "STATUS_FAILED"; | ||
GeneralMessage_Status[GeneralMessage_Status["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; | ||
})(GeneralMessage_Status = exports.GeneralMessage_Status || (exports.GeneralMessage_Status = {})); | ||
function generalMessage_StatusFromJSON(object) { | ||
switch (object) { | ||
case 0: | ||
case "STATUS_UNSPECIFIED": | ||
return GeneralMessage_Status.STATUS_UNSPECIFIED; | ||
case 1: | ||
case "STATUS_APPROVED": | ||
return GeneralMessage_Status.STATUS_APPROVED; | ||
case 2: | ||
case "STATUS_SENT": | ||
return GeneralMessage_Status.STATUS_SENT; | ||
case 3: | ||
case "STATUS_EXECUTED": | ||
return GeneralMessage_Status.STATUS_EXECUTED; | ||
case 4: | ||
case "STATUS_FAILED": | ||
return GeneralMessage_Status.STATUS_FAILED; | ||
case -1: | ||
case "UNRECOGNIZED": | ||
default: | ||
return GeneralMessage_Status.UNRECOGNIZED; | ||
} | ||
} | ||
exports.generalMessage_StatusFromJSON = generalMessage_StatusFromJSON; | ||
function generalMessage_StatusToJSON(object) { | ||
switch (object) { | ||
case GeneralMessage_Status.STATUS_UNSPECIFIED: | ||
return "STATUS_UNSPECIFIED"; | ||
case GeneralMessage_Status.STATUS_APPROVED: | ||
return "STATUS_APPROVED"; | ||
case GeneralMessage_Status.STATUS_SENT: | ||
return "STATUS_SENT"; | ||
case GeneralMessage_Status.STATUS_EXECUTED: | ||
return "STATUS_EXECUTED"; | ||
case GeneralMessage_Status.STATUS_FAILED: | ||
return "STATUS_FAILED"; | ||
case GeneralMessage_Status.UNRECOGNIZED: | ||
default: | ||
return "UNRECOGNIZED"; | ||
} | ||
} | ||
exports.generalMessage_StatusToJSON = generalMessage_StatusToJSON; | ||
function createBaseChain() { | ||
@@ -513,2 +564,108 @@ return { name: "", supportsForeignAssets: false, keyType: 0, module: "" }; | ||
}; | ||
function createBaseGeneralMessage() { | ||
return { | ||
id: "", | ||
sender: undefined, | ||
recipient: undefined, | ||
payloadHash: new Uint8Array(), | ||
status: 0, | ||
asset: undefined, | ||
}; | ||
} | ||
exports.GeneralMessage = { | ||
encode(message, writer = _m0.Writer.create()) { | ||
if (message.id !== "") { | ||
writer.uint32(10).string(message.id); | ||
} | ||
if (message.sender !== undefined) { | ||
exports.CrossChainAddress.encode(message.sender, writer.uint32(18).fork()).ldelim(); | ||
} | ||
if (message.recipient !== undefined) { | ||
exports.CrossChainAddress.encode(message.recipient, writer.uint32(26).fork()).ldelim(); | ||
} | ||
if (message.payloadHash.length !== 0) { | ||
writer.uint32(34).bytes(message.payloadHash); | ||
} | ||
if (message.status !== 0) { | ||
writer.uint32(40).int32(message.status); | ||
} | ||
if (message.asset !== undefined) { | ||
coin_1.Coin.encode(message.asset, writer.uint32(50).fork()).ldelim(); | ||
} | ||
return writer; | ||
}, | ||
decode(input, length) { | ||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseGeneralMessage(); | ||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
switch (tag >>> 3) { | ||
case 1: | ||
message.id = reader.string(); | ||
break; | ||
case 2: | ||
message.sender = exports.CrossChainAddress.decode(reader, reader.uint32()); | ||
break; | ||
case 3: | ||
message.recipient = exports.CrossChainAddress.decode(reader, reader.uint32()); | ||
break; | ||
case 4: | ||
message.payloadHash = reader.bytes(); | ||
break; | ||
case 5: | ||
message.status = reader.int32(); | ||
break; | ||
case 6: | ||
message.asset = coin_1.Coin.decode(reader, reader.uint32()); | ||
break; | ||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
return message; | ||
}, | ||
fromJSON(object) { | ||
return { | ||
id: isSet(object.id) ? String(object.id) : "", | ||
sender: isSet(object.sender) ? exports.CrossChainAddress.fromJSON(object.sender) : undefined, | ||
recipient: isSet(object.recipient) ? exports.CrossChainAddress.fromJSON(object.recipient) : undefined, | ||
payloadHash: isSet(object.payloadHash) ? bytesFromBase64(object.payloadHash) : new Uint8Array(), | ||
status: isSet(object.status) ? generalMessage_StatusFromJSON(object.status) : 0, | ||
asset: isSet(object.asset) ? coin_1.Coin.fromJSON(object.asset) : undefined, | ||
}; | ||
}, | ||
toJSON(message) { | ||
const obj = {}; | ||
message.id !== undefined && (obj.id = message.id); | ||
message.sender !== undefined && | ||
(obj.sender = message.sender ? exports.CrossChainAddress.toJSON(message.sender) : undefined); | ||
message.recipient !== undefined && | ||
(obj.recipient = message.recipient ? exports.CrossChainAddress.toJSON(message.recipient) : undefined); | ||
message.payloadHash !== undefined && | ||
(obj.payloadHash = base64FromBytes(message.payloadHash !== undefined ? message.payloadHash : new Uint8Array())); | ||
message.status !== undefined && (obj.status = generalMessage_StatusToJSON(message.status)); | ||
message.asset !== undefined && (obj.asset = message.asset ? coin_1.Coin.toJSON(message.asset) : undefined); | ||
return obj; | ||
}, | ||
fromPartial(object) { | ||
var _a, _b, _c; | ||
const message = createBaseGeneralMessage(); | ||
message.id = (_a = object.id) !== null && _a !== void 0 ? _a : ""; | ||
message.sender = | ||
object.sender !== undefined && object.sender !== null | ||
? exports.CrossChainAddress.fromPartial(object.sender) | ||
: undefined; | ||
message.recipient = | ||
object.recipient !== undefined && object.recipient !== null | ||
? exports.CrossChainAddress.fromPartial(object.recipient) | ||
: undefined; | ||
message.payloadHash = (_b = object.payloadHash) !== null && _b !== void 0 ? _b : new Uint8Array(); | ||
message.status = (_c = object.status) !== null && _c !== void 0 ? _c : 0; | ||
message.asset = | ||
object.asset !== undefined && object.asset !== null ? coin_1.Coin.fromPartial(object.asset) : undefined; | ||
return message; | ||
}, | ||
}; | ||
var globalThis = (() => { | ||
@@ -515,0 +672,0 @@ if (typeof globalThis !== "undefined") |
@@ -25,3 +25,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TransferRateLimit = exports.TransferRateLimitResponse = exports.TransferRateLimitRequest = exports.RecipientAddressResponse = exports.RecipientAddressRequest = exports.ChainsByAssetResponse = exports.ChainsByAssetRequest = exports.ChainStateResponse = exports.ChainStateRequest = exports.AssetsResponse = exports.AssetsRequest = exports.ChainsResponse = exports.ChainsRequest = exports.TransferFeeResponse = exports.TransferFeeRequest = exports.FeeInfoResponse = exports.FeeInfoRequest = exports.TransfersForChainResponse = exports.TransfersForChainRequest = exports.LatestDepositAddressResponse = exports.LatestDepositAddressRequest = exports.QueryChainMaintainersResponse = exports.chainStatusToJSON = exports.chainStatusFromJSON = exports.ChainStatus = exports.protobufPackage = void 0; | ||
exports.TransferRateLimit = exports.TransferRateLimitResponse = exports.TransferRateLimitRequest = exports.RecipientAddressResponse = exports.RecipientAddressRequest = exports.ChainsByAssetResponse = exports.ChainsByAssetRequest = exports.ChainStateResponse = exports.ChainStateRequest = exports.AssetsResponse = exports.AssetsRequest = exports.ChainsResponse = exports.ChainsRequest = exports.TransferFeeResponse = exports.TransferFeeRequest = exports.FeeInfoResponse = exports.FeeInfoRequest = exports.TransfersForChainResponse = exports.TransfersForChainRequest = exports.LatestDepositAddressResponse = exports.LatestDepositAddressRequest = exports.ChainMaintainersResponse = exports.ChainMaintainersRequest = exports.chainStatusToJSON = exports.chainStatusFromJSON = exports.ChainStatus = exports.protobufPackage = void 0; | ||
/* eslint-disable */ | ||
@@ -75,6 +75,50 @@ const long_1 = __importDefault(require("long")); | ||
exports.chainStatusToJSON = chainStatusToJSON; | ||
function createBaseQueryChainMaintainersResponse() { | ||
function createBaseChainMaintainersRequest() { | ||
return { chain: "" }; | ||
} | ||
exports.ChainMaintainersRequest = { | ||
encode(message, writer = _m0.Writer.create()) { | ||
if (message.chain !== "") { | ||
writer.uint32(10).string(message.chain); | ||
} | ||
return writer; | ||
}, | ||
decode(input, length) { | ||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseChainMaintainersRequest(); | ||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
switch (tag >>> 3) { | ||
case 1: | ||
message.chain = reader.string(); | ||
break; | ||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
return message; | ||
}, | ||
fromJSON(object) { | ||
return { | ||
chain: isSet(object.chain) ? String(object.chain) : "", | ||
}; | ||
}, | ||
toJSON(message) { | ||
const obj = {}; | ||
message.chain !== undefined && (obj.chain = message.chain); | ||
return obj; | ||
}, | ||
fromPartial(object) { | ||
var _a; | ||
const message = createBaseChainMaintainersRequest(); | ||
message.chain = (_a = object.chain) !== null && _a !== void 0 ? _a : ""; | ||
return message; | ||
}, | ||
}; | ||
function createBaseChainMaintainersResponse() { | ||
return { maintainers: [] }; | ||
} | ||
exports.QueryChainMaintainersResponse = { | ||
exports.ChainMaintainersResponse = { | ||
encode(message, writer = _m0.Writer.create()) { | ||
@@ -89,3 +133,3 @@ for (const v of message.maintainers) { | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseQueryChainMaintainersResponse(); | ||
const message = createBaseChainMaintainersResponse(); | ||
while (reader.pos < end) { | ||
@@ -123,3 +167,3 @@ const tag = reader.uint32(); | ||
var _a; | ||
const message = createBaseQueryChainMaintainersResponse(); | ||
const message = createBaseChainMaintainersResponse(); | ||
message.maintainers = ((_a = object.maintainers) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || []; | ||
@@ -126,0 +170,0 @@ return message; |
import { RegisterChainMaintainerResponse, DeregisterChainMaintainerResponse, ActivateChainResponse, DeactivateChainResponse, RegisterAssetFeeResponse, SetTransferRateLimitResponse, RegisterChainMaintainerRequest, DeregisterChainMaintainerRequest, ActivateChainRequest, DeactivateChainRequest, RegisterAssetFeeRequest, SetTransferRateLimitRequest } from "../../../axelar/nexus/v1beta1/tx"; | ||
import { LatestDepositAddressResponse, TransfersForChainResponse, FeeInfoResponse, TransferFeeResponse, ChainsResponse, AssetsResponse, ChainStateResponse, ChainsByAssetResponse, RecipientAddressResponse, TransferRateLimitResponse, LatestDepositAddressRequest, TransfersForChainRequest, FeeInfoRequest, TransferFeeRequest, ChainsRequest, AssetsRequest, ChainStateRequest, ChainsByAssetRequest, RecipientAddressRequest, TransferRateLimitRequest } from "../../../axelar/nexus/v1beta1/query"; | ||
import { LatestDepositAddressResponse, TransfersForChainResponse, FeeInfoResponse, TransferFeeResponse, ChainsResponse, AssetsResponse, ChainStateResponse, ChainsByAssetResponse, RecipientAddressResponse, ChainMaintainersResponse, TransferRateLimitResponse, LatestDepositAddressRequest, TransfersForChainRequest, FeeInfoRequest, TransferFeeRequest, ChainsRequest, AssetsRequest, ChainStateRequest, ChainsByAssetRequest, RecipientAddressRequest, ChainMaintainersRequest, TransferRateLimitRequest } from "../../../axelar/nexus/v1beta1/query"; | ||
export declare const protobufPackage = "axelar.nexus.v1beta1"; | ||
@@ -46,2 +46,4 @@ /** Msg defines the nexus Msg service. */ | ||
RecipientAddress(request: RecipientAddressRequest): Promise<RecipientAddressResponse>; | ||
/** ChainMaintainers queries the chain maintainers for a given chain */ | ||
ChainMaintainers(request: ChainMaintainersRequest): Promise<ChainMaintainersResponse>; | ||
/** | ||
@@ -65,2 +67,3 @@ * TransferRateLimit queries the transfer rate limit for a given chain and | ||
RecipientAddress(request: RecipientAddressRequest): Promise<RecipientAddressResponse>; | ||
ChainMaintainers(request: ChainMaintainersRequest): Promise<ChainMaintainersResponse>; | ||
TransferRateLimit(request: TransferRateLimitRequest): Promise<TransferRateLimitResponse>; | ||
@@ -67,0 +70,0 @@ } |
@@ -86,2 +86,3 @@ "use strict"; | ||
this.RecipientAddress = this.RecipientAddress.bind(this); | ||
this.ChainMaintainers = this.ChainMaintainers.bind(this); | ||
this.TransferRateLimit = this.TransferRateLimit.bind(this); | ||
@@ -134,2 +135,7 @@ } | ||
} | ||
ChainMaintainers(request) { | ||
const data = query_1.ChainMaintainersRequest.encode(request).finish(); | ||
const promise = this.rpc.request("axelar.nexus.v1beta1.QueryService", "ChainMaintainers", data); | ||
return promise.then((data) => query_1.ChainMaintainersResponse.decode(new _m0.Reader(data))); | ||
} | ||
TransferRateLimit(request) { | ||
@@ -136,0 +142,0 @@ const data = query_1.TransferRateLimitRequest.encode(request).finish(); |
{ | ||
"name": "@axelar-network/axelarjs-types", | ||
"version": "0.28.0-alpha.5", | ||
"version": "0.28.0-alpha.6", | ||
"description": "JS and TS types relating to Protocol Buffers used by AxelarJS-SDK and other related projects", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9165155
58637