@qorechain/sdk 0.6.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +141 -13
- package/dist/index.cjs +2675 -423
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1623 -195
- package/dist/index.d.ts +1623 -195
- package/dist/index.js +2638 -424
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -278,6 +278,35 @@ var RestClient = class {
|
|
|
278
278
|
getInflationRate() {
|
|
279
279
|
return this.get("/qorechain/inflation/v1/rate");
|
|
280
280
|
}
|
|
281
|
+
// --- Abstract-account authenticator lanes (v3.1.85) ----------------------
|
|
282
|
+
/**
|
|
283
|
+
* The canonical authenticator permission taxonomy
|
|
284
|
+
* (`/qorechain/abstractaccount/v1/permission_schema`): the valid permission
|
|
285
|
+
* strings, the message-typeURL→permission mapping, the never-delegable
|
|
286
|
+
* key-management typeURLs, and a `schema_version` for drift detection.
|
|
287
|
+
*/
|
|
288
|
+
getPermissionSchema() {
|
|
289
|
+
return this.get(
|
|
290
|
+
"/qorechain/abstractaccount/v1/permission_schema"
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
/** Abstract-account module config (`/qorechain/abstractaccount/v1/config`). */
|
|
294
|
+
getAbstractAccountConfig() {
|
|
295
|
+
return this.get("/qorechain/abstractaccount/v1/config");
|
|
296
|
+
}
|
|
297
|
+
/** All abstract accounts (`/qorechain/abstractaccount/v1/accounts`). */
|
|
298
|
+
getAbstractAccounts() {
|
|
299
|
+
return this.get("/qorechain/abstractaccount/v1/accounts");
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* A single abstract account by address
|
|
303
|
+
* (`/qorechain/abstractaccount/v1/accounts/{address}`).
|
|
304
|
+
*/
|
|
305
|
+
getAbstractAccount(address) {
|
|
306
|
+
return this.get(
|
|
307
|
+
`/qorechain/abstractaccount/v1/accounts/${encodeURIComponent(address)}`
|
|
308
|
+
);
|
|
309
|
+
}
|
|
281
310
|
};
|
|
282
311
|
|
|
283
312
|
// src/query/jsonrpc.ts
|
|
@@ -5751,6 +5780,8 @@ __export(tx_exports5, {
|
|
|
5751
5780
|
MsgRegisterPQCKeyResponse: () => MsgRegisterPQCKeyResponse,
|
|
5752
5781
|
MsgRegisterPQCKeyV2: () => MsgRegisterPQCKeyV2,
|
|
5753
5782
|
MsgRegisterPQCKeyV2Response: () => MsgRegisterPQCKeyV2Response,
|
|
5783
|
+
MsgRotatePQCKey: () => MsgRotatePQCKey,
|
|
5784
|
+
MsgRotatePQCKeyResponse: () => MsgRotatePQCKeyResponse,
|
|
5754
5785
|
protobufPackage: () => protobufPackage5
|
|
5755
5786
|
});
|
|
5756
5787
|
var protobufPackage5 = "qorechain.pqc.v1";
|
|
@@ -6205,6 +6236,160 @@ var MsgMigratePQCKeyResponse = {
|
|
|
6205
6236
|
return message;
|
|
6206
6237
|
}
|
|
6207
6238
|
};
|
|
6239
|
+
function createBaseMsgRotatePQCKey() {
|
|
6240
|
+
return {
|
|
6241
|
+
sender: "",
|
|
6242
|
+
oldPublicKey: new Uint8Array(0),
|
|
6243
|
+
newPublicKey: new Uint8Array(0),
|
|
6244
|
+
oldSignature: new Uint8Array(0),
|
|
6245
|
+
newSignature: new Uint8Array(0)
|
|
6246
|
+
};
|
|
6247
|
+
}
|
|
6248
|
+
var MsgRotatePQCKey = {
|
|
6249
|
+
encode(message, writer = new wire.BinaryWriter()) {
|
|
6250
|
+
if (message.sender !== "") {
|
|
6251
|
+
writer.uint32(10).string(message.sender);
|
|
6252
|
+
}
|
|
6253
|
+
if (message.oldPublicKey.length !== 0) {
|
|
6254
|
+
writer.uint32(18).bytes(message.oldPublicKey);
|
|
6255
|
+
}
|
|
6256
|
+
if (message.newPublicKey.length !== 0) {
|
|
6257
|
+
writer.uint32(26).bytes(message.newPublicKey);
|
|
6258
|
+
}
|
|
6259
|
+
if (message.oldSignature.length !== 0) {
|
|
6260
|
+
writer.uint32(34).bytes(message.oldSignature);
|
|
6261
|
+
}
|
|
6262
|
+
if (message.newSignature.length !== 0) {
|
|
6263
|
+
writer.uint32(42).bytes(message.newSignature);
|
|
6264
|
+
}
|
|
6265
|
+
return writer;
|
|
6266
|
+
},
|
|
6267
|
+
decode(input, length) {
|
|
6268
|
+
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
6269
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
6270
|
+
const message = createBaseMsgRotatePQCKey();
|
|
6271
|
+
while (reader.pos < end) {
|
|
6272
|
+
const tag = reader.uint32();
|
|
6273
|
+
switch (tag >>> 3) {
|
|
6274
|
+
case 1: {
|
|
6275
|
+
if (tag !== 10) {
|
|
6276
|
+
break;
|
|
6277
|
+
}
|
|
6278
|
+
message.sender = reader.string();
|
|
6279
|
+
continue;
|
|
6280
|
+
}
|
|
6281
|
+
case 2: {
|
|
6282
|
+
if (tag !== 18) {
|
|
6283
|
+
break;
|
|
6284
|
+
}
|
|
6285
|
+
message.oldPublicKey = reader.bytes();
|
|
6286
|
+
continue;
|
|
6287
|
+
}
|
|
6288
|
+
case 3: {
|
|
6289
|
+
if (tag !== 26) {
|
|
6290
|
+
break;
|
|
6291
|
+
}
|
|
6292
|
+
message.newPublicKey = reader.bytes();
|
|
6293
|
+
continue;
|
|
6294
|
+
}
|
|
6295
|
+
case 4: {
|
|
6296
|
+
if (tag !== 34) {
|
|
6297
|
+
break;
|
|
6298
|
+
}
|
|
6299
|
+
message.oldSignature = reader.bytes();
|
|
6300
|
+
continue;
|
|
6301
|
+
}
|
|
6302
|
+
case 5: {
|
|
6303
|
+
if (tag !== 42) {
|
|
6304
|
+
break;
|
|
6305
|
+
}
|
|
6306
|
+
message.newSignature = reader.bytes();
|
|
6307
|
+
continue;
|
|
6308
|
+
}
|
|
6309
|
+
}
|
|
6310
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
6311
|
+
break;
|
|
6312
|
+
}
|
|
6313
|
+
reader.skip(tag & 7);
|
|
6314
|
+
}
|
|
6315
|
+
return message;
|
|
6316
|
+
},
|
|
6317
|
+
fromJSON(object) {
|
|
6318
|
+
return {
|
|
6319
|
+
sender: isSet6(object.sender) ? globalThis.String(object.sender) : "",
|
|
6320
|
+
oldPublicKey: isSet6(object.oldPublicKey) ? bytesFromBase644(object.oldPublicKey) : isSet6(object.old_public_key) ? bytesFromBase644(object.old_public_key) : new Uint8Array(0),
|
|
6321
|
+
newPublicKey: isSet6(object.newPublicKey) ? bytesFromBase644(object.newPublicKey) : isSet6(object.new_public_key) ? bytesFromBase644(object.new_public_key) : new Uint8Array(0),
|
|
6322
|
+
oldSignature: isSet6(object.oldSignature) ? bytesFromBase644(object.oldSignature) : isSet6(object.old_signature) ? bytesFromBase644(object.old_signature) : new Uint8Array(0),
|
|
6323
|
+
newSignature: isSet6(object.newSignature) ? bytesFromBase644(object.newSignature) : isSet6(object.new_signature) ? bytesFromBase644(object.new_signature) : new Uint8Array(0)
|
|
6324
|
+
};
|
|
6325
|
+
},
|
|
6326
|
+
toJSON(message) {
|
|
6327
|
+
const obj = {};
|
|
6328
|
+
if (message.sender !== "") {
|
|
6329
|
+
obj.sender = message.sender;
|
|
6330
|
+
}
|
|
6331
|
+
if (message.oldPublicKey.length !== 0) {
|
|
6332
|
+
obj.oldPublicKey = base64FromBytes4(message.oldPublicKey);
|
|
6333
|
+
}
|
|
6334
|
+
if (message.newPublicKey.length !== 0) {
|
|
6335
|
+
obj.newPublicKey = base64FromBytes4(message.newPublicKey);
|
|
6336
|
+
}
|
|
6337
|
+
if (message.oldSignature.length !== 0) {
|
|
6338
|
+
obj.oldSignature = base64FromBytes4(message.oldSignature);
|
|
6339
|
+
}
|
|
6340
|
+
if (message.newSignature.length !== 0) {
|
|
6341
|
+
obj.newSignature = base64FromBytes4(message.newSignature);
|
|
6342
|
+
}
|
|
6343
|
+
return obj;
|
|
6344
|
+
},
|
|
6345
|
+
create(base) {
|
|
6346
|
+
return MsgRotatePQCKey.fromPartial(base ?? {});
|
|
6347
|
+
},
|
|
6348
|
+
fromPartial(object) {
|
|
6349
|
+
const message = createBaseMsgRotatePQCKey();
|
|
6350
|
+
message.sender = object.sender ?? "";
|
|
6351
|
+
message.oldPublicKey = object.oldPublicKey ?? new Uint8Array(0);
|
|
6352
|
+
message.newPublicKey = object.newPublicKey ?? new Uint8Array(0);
|
|
6353
|
+
message.oldSignature = object.oldSignature ?? new Uint8Array(0);
|
|
6354
|
+
message.newSignature = object.newSignature ?? new Uint8Array(0);
|
|
6355
|
+
return message;
|
|
6356
|
+
}
|
|
6357
|
+
};
|
|
6358
|
+
function createBaseMsgRotatePQCKeyResponse() {
|
|
6359
|
+
return {};
|
|
6360
|
+
}
|
|
6361
|
+
var MsgRotatePQCKeyResponse = {
|
|
6362
|
+
encode(_, writer = new wire.BinaryWriter()) {
|
|
6363
|
+
return writer;
|
|
6364
|
+
},
|
|
6365
|
+
decode(input, length) {
|
|
6366
|
+
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
6367
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
6368
|
+
const message = createBaseMsgRotatePQCKeyResponse();
|
|
6369
|
+
while (reader.pos < end) {
|
|
6370
|
+
const tag = reader.uint32();
|
|
6371
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
6372
|
+
break;
|
|
6373
|
+
}
|
|
6374
|
+
reader.skip(tag & 7);
|
|
6375
|
+
}
|
|
6376
|
+
return message;
|
|
6377
|
+
},
|
|
6378
|
+
fromJSON(_) {
|
|
6379
|
+
return {};
|
|
6380
|
+
},
|
|
6381
|
+
toJSON(_) {
|
|
6382
|
+
const obj = {};
|
|
6383
|
+
return obj;
|
|
6384
|
+
},
|
|
6385
|
+
create(base) {
|
|
6386
|
+
return MsgRotatePQCKeyResponse.fromPartial(base ?? {});
|
|
6387
|
+
},
|
|
6388
|
+
fromPartial(_) {
|
|
6389
|
+
const message = createBaseMsgRotatePQCKeyResponse();
|
|
6390
|
+
return message;
|
|
6391
|
+
}
|
|
6392
|
+
};
|
|
6208
6393
|
function createBaseMsgDeprecateAlgorithm() {
|
|
6209
6394
|
return { authority: "", algorithmId: 0, migrationBlocks: "0", replacementAlgorithmId: 0 };
|
|
6210
6395
|
}
|
|
@@ -6487,6 +6672,20 @@ var MsgDefinition5 = {
|
|
|
6487
6672
|
responseStream: false,
|
|
6488
6673
|
options: {}
|
|
6489
6674
|
},
|
|
6675
|
+
/**
|
|
6676
|
+
* RotatePQCKey replaces an account's PQC key with a NEW key of the SAME
|
|
6677
|
+
* algorithm — for rotating a compromised key or moving a legacy-derived key to
|
|
6678
|
+
* the canonical derivation. Dual-signed (old proves ownership, new proves
|
|
6679
|
+
* control); needs no active algorithm migration.
|
|
6680
|
+
*/
|
|
6681
|
+
rotatePQCKey: {
|
|
6682
|
+
name: "RotatePQCKey",
|
|
6683
|
+
requestType: MsgRotatePQCKey,
|
|
6684
|
+
requestStream: false,
|
|
6685
|
+
responseType: MsgRotatePQCKeyResponse,
|
|
6686
|
+
responseStream: false,
|
|
6687
|
+
options: {}
|
|
6688
|
+
},
|
|
6490
6689
|
/** DeprecateAlgorithm starts the migration period for an algorithm (governance). */
|
|
6491
6690
|
deprecateAlgorithm: {
|
|
6492
6691
|
name: "DeprecateAlgorithm",
|
|
@@ -6546,7 +6745,10 @@ __export(tx_exports6, {
|
|
|
6546
6745
|
MsgExecuteProgramResponse: () => MsgExecuteProgramResponse,
|
|
6547
6746
|
MsgRegisterSVMPQCKey: () => MsgRegisterSVMPQCKey,
|
|
6548
6747
|
MsgRegisterSVMPQCKeyResponse: () => MsgRegisterSVMPQCKeyResponse,
|
|
6748
|
+
MsgUpdateParams: () => MsgUpdateParams,
|
|
6749
|
+
MsgUpdateParamsResponse: () => MsgUpdateParamsResponse,
|
|
6549
6750
|
SVMAuth: () => SVMAuth,
|
|
6751
|
+
SVMParams: () => SVMParams,
|
|
6550
6752
|
SvmAccountMeta: () => SvmAccountMeta,
|
|
6551
6753
|
protobufPackage: () => protobufPackage6
|
|
6552
6754
|
});
|
|
@@ -7283,138 +7485,118 @@ var MsgRegisterSVMPQCKeyResponse = {
|
|
|
7283
7485
|
return message;
|
|
7284
7486
|
}
|
|
7285
7487
|
};
|
|
7286
|
-
|
|
7287
|
-
|
|
7288
|
-
|
|
7289
|
-
|
|
7290
|
-
|
|
7291
|
-
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
|
|
7296
|
-
|
|
7297
|
-
|
|
7298
|
-
createAccount: {
|
|
7299
|
-
name: "CreateAccount",
|
|
7300
|
-
requestType: MsgCreateAccount,
|
|
7301
|
-
requestStream: false,
|
|
7302
|
-
responseType: MsgCreateAccountResponse,
|
|
7303
|
-
responseStream: false,
|
|
7304
|
-
options: {}
|
|
7305
|
-
},
|
|
7306
|
-
executeProgram: {
|
|
7307
|
-
name: "ExecuteProgram",
|
|
7308
|
-
requestType: MsgExecuteProgram,
|
|
7309
|
-
requestStream: false,
|
|
7310
|
-
responseType: MsgExecuteProgramResponse,
|
|
7311
|
-
responseStream: false,
|
|
7312
|
-
options: {}
|
|
7313
|
-
},
|
|
7314
|
-
registerSVMPQCKey: {
|
|
7315
|
-
name: "RegisterSVMPQCKey",
|
|
7316
|
-
requestType: MsgRegisterSVMPQCKey,
|
|
7317
|
-
requestStream: false,
|
|
7318
|
-
responseType: MsgRegisterSVMPQCKeyResponse,
|
|
7319
|
-
responseStream: false,
|
|
7320
|
-
options: {}
|
|
7321
|
-
}
|
|
7322
|
-
}
|
|
7323
|
-
};
|
|
7324
|
-
function bytesFromBase645(b64) {
|
|
7325
|
-
if (globalThis.Buffer) {
|
|
7326
|
-
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
7327
|
-
} else {
|
|
7328
|
-
const bin = globalThis.atob(b64);
|
|
7329
|
-
const arr = new Uint8Array(bin.length);
|
|
7330
|
-
for (let i = 0; i < bin.length; ++i) {
|
|
7331
|
-
arr[i] = bin.charCodeAt(i);
|
|
7332
|
-
}
|
|
7333
|
-
return arr;
|
|
7334
|
-
}
|
|
7335
|
-
}
|
|
7336
|
-
function base64FromBytes5(arr) {
|
|
7337
|
-
if (globalThis.Buffer) {
|
|
7338
|
-
return globalThis.Buffer.from(arr).toString("base64");
|
|
7339
|
-
} else {
|
|
7340
|
-
const bin = [];
|
|
7341
|
-
arr.forEach((byte) => {
|
|
7342
|
-
bin.push(globalThis.String.fromCharCode(byte));
|
|
7343
|
-
});
|
|
7344
|
-
return globalThis.btoa(bin.join(""));
|
|
7345
|
-
}
|
|
7346
|
-
}
|
|
7347
|
-
function isSet7(value) {
|
|
7348
|
-
return value !== null && value !== void 0;
|
|
7349
|
-
}
|
|
7350
|
-
|
|
7351
|
-
// src/codegen/qorechain/lightnode/v1/tx.ts
|
|
7352
|
-
var tx_exports7 = {};
|
|
7353
|
-
__export(tx_exports7, {
|
|
7354
|
-
MsgClaimLightNodeRewards: () => MsgClaimLightNodeRewards,
|
|
7355
|
-
MsgClaimLightNodeRewardsResponse: () => MsgClaimLightNodeRewardsResponse,
|
|
7356
|
-
MsgDefinition: () => MsgDefinition7,
|
|
7357
|
-
MsgDeregisterLightNode: () => MsgDeregisterLightNode,
|
|
7358
|
-
MsgDeregisterLightNodeResponse: () => MsgDeregisterLightNodeResponse,
|
|
7359
|
-
MsgHeartbeat: () => MsgHeartbeat,
|
|
7360
|
-
MsgHeartbeatResponse: () => MsgHeartbeatResponse,
|
|
7361
|
-
MsgRegisterLightNode: () => MsgRegisterLightNode,
|
|
7362
|
-
MsgRegisterLightNodeResponse: () => MsgRegisterLightNodeResponse,
|
|
7363
|
-
protobufPackage: () => protobufPackage7
|
|
7364
|
-
});
|
|
7365
|
-
var protobufPackage7 = "qorechain.lightnode.v1";
|
|
7366
|
-
function createBaseMsgRegisterLightNode() {
|
|
7367
|
-
return { operator: "", nodeType: "", version: "", capabilities: [] };
|
|
7488
|
+
function createBaseSVMParams() {
|
|
7489
|
+
return {
|
|
7490
|
+
maxProgramSize: "0",
|
|
7491
|
+
maxAccountDataSize: "0",
|
|
7492
|
+
computeBudgetMax: "0",
|
|
7493
|
+
lamportsPerByte: "0",
|
|
7494
|
+
rentExemptionMulti: "",
|
|
7495
|
+
enabled: false,
|
|
7496
|
+
svmSlotOffset: "0",
|
|
7497
|
+
defaultSigScheme: 0,
|
|
7498
|
+
maxCpi: 0
|
|
7499
|
+
};
|
|
7368
7500
|
}
|
|
7369
|
-
var
|
|
7501
|
+
var SVMParams = {
|
|
7370
7502
|
encode(message, writer = new wire.BinaryWriter()) {
|
|
7371
|
-
if (message.
|
|
7372
|
-
writer.uint32(
|
|
7503
|
+
if (message.maxProgramSize !== "0") {
|
|
7504
|
+
writer.uint32(8).uint64(message.maxProgramSize);
|
|
7373
7505
|
}
|
|
7374
|
-
if (message.
|
|
7375
|
-
writer.uint32(
|
|
7506
|
+
if (message.maxAccountDataSize !== "0") {
|
|
7507
|
+
writer.uint32(16).uint64(message.maxAccountDataSize);
|
|
7376
7508
|
}
|
|
7377
|
-
if (message.
|
|
7378
|
-
writer.uint32(
|
|
7509
|
+
if (message.computeBudgetMax !== "0") {
|
|
7510
|
+
writer.uint32(24).uint64(message.computeBudgetMax);
|
|
7379
7511
|
}
|
|
7380
|
-
|
|
7381
|
-
writer.uint32(
|
|
7512
|
+
if (message.lamportsPerByte !== "0") {
|
|
7513
|
+
writer.uint32(32).uint64(message.lamportsPerByte);
|
|
7382
7514
|
}
|
|
7383
|
-
|
|
7515
|
+
if (message.rentExemptionMulti !== "") {
|
|
7516
|
+
writer.uint32(42).string(message.rentExemptionMulti);
|
|
7517
|
+
}
|
|
7518
|
+
if (message.enabled !== false) {
|
|
7519
|
+
writer.uint32(48).bool(message.enabled);
|
|
7520
|
+
}
|
|
7521
|
+
if (message.svmSlotOffset !== "0") {
|
|
7522
|
+
writer.uint32(56).int64(message.svmSlotOffset);
|
|
7523
|
+
}
|
|
7524
|
+
if (message.defaultSigScheme !== 0) {
|
|
7525
|
+
writer.uint32(64).uint32(message.defaultSigScheme);
|
|
7526
|
+
}
|
|
7527
|
+
if (message.maxCpi !== 0) {
|
|
7528
|
+
writer.uint32(72).uint32(message.maxCpi);
|
|
7529
|
+
}
|
|
7530
|
+
return writer;
|
|
7384
7531
|
},
|
|
7385
7532
|
decode(input, length) {
|
|
7386
7533
|
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
7387
7534
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
7388
|
-
const message =
|
|
7535
|
+
const message = createBaseSVMParams();
|
|
7389
7536
|
while (reader.pos < end) {
|
|
7390
7537
|
const tag = reader.uint32();
|
|
7391
7538
|
switch (tag >>> 3) {
|
|
7392
7539
|
case 1: {
|
|
7393
|
-
if (tag !==
|
|
7540
|
+
if (tag !== 8) {
|
|
7394
7541
|
break;
|
|
7395
7542
|
}
|
|
7396
|
-
message.
|
|
7543
|
+
message.maxProgramSize = reader.uint64().toString();
|
|
7397
7544
|
continue;
|
|
7398
7545
|
}
|
|
7399
7546
|
case 2: {
|
|
7400
|
-
if (tag !==
|
|
7547
|
+
if (tag !== 16) {
|
|
7401
7548
|
break;
|
|
7402
7549
|
}
|
|
7403
|
-
message.
|
|
7550
|
+
message.maxAccountDataSize = reader.uint64().toString();
|
|
7404
7551
|
continue;
|
|
7405
7552
|
}
|
|
7406
7553
|
case 3: {
|
|
7407
|
-
if (tag !==
|
|
7554
|
+
if (tag !== 24) {
|
|
7408
7555
|
break;
|
|
7409
7556
|
}
|
|
7410
|
-
message.
|
|
7557
|
+
message.computeBudgetMax = reader.uint64().toString();
|
|
7411
7558
|
continue;
|
|
7412
7559
|
}
|
|
7413
7560
|
case 4: {
|
|
7414
|
-
if (tag !==
|
|
7561
|
+
if (tag !== 32) {
|
|
7415
7562
|
break;
|
|
7416
7563
|
}
|
|
7417
|
-
message.
|
|
7564
|
+
message.lamportsPerByte = reader.uint64().toString();
|
|
7565
|
+
continue;
|
|
7566
|
+
}
|
|
7567
|
+
case 5: {
|
|
7568
|
+
if (tag !== 42) {
|
|
7569
|
+
break;
|
|
7570
|
+
}
|
|
7571
|
+
message.rentExemptionMulti = reader.string();
|
|
7572
|
+
continue;
|
|
7573
|
+
}
|
|
7574
|
+
case 6: {
|
|
7575
|
+
if (tag !== 48) {
|
|
7576
|
+
break;
|
|
7577
|
+
}
|
|
7578
|
+
message.enabled = reader.bool();
|
|
7579
|
+
continue;
|
|
7580
|
+
}
|
|
7581
|
+
case 7: {
|
|
7582
|
+
if (tag !== 56) {
|
|
7583
|
+
break;
|
|
7584
|
+
}
|
|
7585
|
+
message.svmSlotOffset = reader.int64().toString();
|
|
7586
|
+
continue;
|
|
7587
|
+
}
|
|
7588
|
+
case 8: {
|
|
7589
|
+
if (tag !== 64) {
|
|
7590
|
+
break;
|
|
7591
|
+
}
|
|
7592
|
+
message.defaultSigScheme = reader.uint32();
|
|
7593
|
+
continue;
|
|
7594
|
+
}
|
|
7595
|
+
case 9: {
|
|
7596
|
+
if (tag !== 72) {
|
|
7597
|
+
break;
|
|
7598
|
+
}
|
|
7599
|
+
message.maxCpi = reader.uint32();
|
|
7418
7600
|
continue;
|
|
7419
7601
|
}
|
|
7420
7602
|
}
|
|
@@ -7427,89 +7609,82 @@ var MsgRegisterLightNode = {
|
|
|
7427
7609
|
},
|
|
7428
7610
|
fromJSON(object) {
|
|
7429
7611
|
return {
|
|
7430
|
-
|
|
7431
|
-
|
|
7432
|
-
|
|
7433
|
-
|
|
7612
|
+
maxProgramSize: isSet7(object.maxProgramSize) ? globalThis.String(object.maxProgramSize) : isSet7(object.max_program_size) ? globalThis.String(object.max_program_size) : "0",
|
|
7613
|
+
maxAccountDataSize: isSet7(object.maxAccountDataSize) ? globalThis.String(object.maxAccountDataSize) : isSet7(object.max_account_data_size) ? globalThis.String(object.max_account_data_size) : "0",
|
|
7614
|
+
computeBudgetMax: isSet7(object.computeBudgetMax) ? globalThis.String(object.computeBudgetMax) : isSet7(object.compute_budget_max) ? globalThis.String(object.compute_budget_max) : "0",
|
|
7615
|
+
lamportsPerByte: isSet7(object.lamportsPerByte) ? globalThis.String(object.lamportsPerByte) : isSet7(object.lamports_per_byte) ? globalThis.String(object.lamports_per_byte) : "0",
|
|
7616
|
+
rentExemptionMulti: isSet7(object.rentExemptionMulti) ? globalThis.String(object.rentExemptionMulti) : isSet7(object.rent_exemption_multi) ? globalThis.String(object.rent_exemption_multi) : "",
|
|
7617
|
+
enabled: isSet7(object.enabled) ? globalThis.Boolean(object.enabled) : false,
|
|
7618
|
+
svmSlotOffset: isSet7(object.svmSlotOffset) ? globalThis.String(object.svmSlotOffset) : isSet7(object.svm_slot_offset) ? globalThis.String(object.svm_slot_offset) : "0",
|
|
7619
|
+
defaultSigScheme: isSet7(object.defaultSigScheme) ? globalThis.Number(object.defaultSigScheme) : isSet7(object.default_sig_scheme) ? globalThis.Number(object.default_sig_scheme) : 0,
|
|
7620
|
+
maxCpi: isSet7(object.maxCpi) ? globalThis.Number(object.maxCpi) : isSet7(object.max_cpi) ? globalThis.Number(object.max_cpi) : 0
|
|
7434
7621
|
};
|
|
7435
7622
|
},
|
|
7436
7623
|
toJSON(message) {
|
|
7437
7624
|
const obj = {};
|
|
7438
|
-
if (message.
|
|
7439
|
-
obj.
|
|
7625
|
+
if (message.maxProgramSize !== "0") {
|
|
7626
|
+
obj.maxProgramSize = message.maxProgramSize;
|
|
7440
7627
|
}
|
|
7441
|
-
if (message.
|
|
7442
|
-
obj.
|
|
7628
|
+
if (message.maxAccountDataSize !== "0") {
|
|
7629
|
+
obj.maxAccountDataSize = message.maxAccountDataSize;
|
|
7443
7630
|
}
|
|
7444
|
-
if (message.
|
|
7445
|
-
obj.
|
|
7631
|
+
if (message.computeBudgetMax !== "0") {
|
|
7632
|
+
obj.computeBudgetMax = message.computeBudgetMax;
|
|
7446
7633
|
}
|
|
7447
|
-
if (message.
|
|
7448
|
-
obj.
|
|
7634
|
+
if (message.lamportsPerByte !== "0") {
|
|
7635
|
+
obj.lamportsPerByte = message.lamportsPerByte;
|
|
7449
7636
|
}
|
|
7450
|
-
|
|
7451
|
-
|
|
7452
|
-
|
|
7453
|
-
|
|
7454
|
-
|
|
7455
|
-
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
|
|
7459
|
-
message.
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
-
function createBaseMsgRegisterLightNodeResponse() {
|
|
7465
|
-
return {};
|
|
7466
|
-
}
|
|
7467
|
-
var MsgRegisterLightNodeResponse = {
|
|
7468
|
-
encode(_, writer = new wire.BinaryWriter()) {
|
|
7469
|
-
return writer;
|
|
7470
|
-
},
|
|
7471
|
-
decode(input, length) {
|
|
7472
|
-
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
7473
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
7474
|
-
const message = createBaseMsgRegisterLightNodeResponse();
|
|
7475
|
-
while (reader.pos < end) {
|
|
7476
|
-
const tag = reader.uint32();
|
|
7477
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
7478
|
-
break;
|
|
7479
|
-
}
|
|
7480
|
-
reader.skip(tag & 7);
|
|
7637
|
+
if (message.rentExemptionMulti !== "") {
|
|
7638
|
+
obj.rentExemptionMulti = message.rentExemptionMulti;
|
|
7639
|
+
}
|
|
7640
|
+
if (message.enabled !== false) {
|
|
7641
|
+
obj.enabled = message.enabled;
|
|
7642
|
+
}
|
|
7643
|
+
if (message.svmSlotOffset !== "0") {
|
|
7644
|
+
obj.svmSlotOffset = message.svmSlotOffset;
|
|
7645
|
+
}
|
|
7646
|
+
if (message.defaultSigScheme !== 0) {
|
|
7647
|
+
obj.defaultSigScheme = Math.round(message.defaultSigScheme);
|
|
7648
|
+
}
|
|
7649
|
+
if (message.maxCpi !== 0) {
|
|
7650
|
+
obj.maxCpi = Math.round(message.maxCpi);
|
|
7481
7651
|
}
|
|
7482
|
-
return message;
|
|
7483
|
-
},
|
|
7484
|
-
fromJSON(_) {
|
|
7485
|
-
return {};
|
|
7486
|
-
},
|
|
7487
|
-
toJSON(_) {
|
|
7488
|
-
const obj = {};
|
|
7489
7652
|
return obj;
|
|
7490
7653
|
},
|
|
7491
7654
|
create(base) {
|
|
7492
|
-
return
|
|
7655
|
+
return SVMParams.fromPartial(base ?? {});
|
|
7493
7656
|
},
|
|
7494
|
-
fromPartial(
|
|
7495
|
-
const message =
|
|
7657
|
+
fromPartial(object) {
|
|
7658
|
+
const message = createBaseSVMParams();
|
|
7659
|
+
message.maxProgramSize = object.maxProgramSize ?? "0";
|
|
7660
|
+
message.maxAccountDataSize = object.maxAccountDataSize ?? "0";
|
|
7661
|
+
message.computeBudgetMax = object.computeBudgetMax ?? "0";
|
|
7662
|
+
message.lamportsPerByte = object.lamportsPerByte ?? "0";
|
|
7663
|
+
message.rentExemptionMulti = object.rentExemptionMulti ?? "";
|
|
7664
|
+
message.enabled = object.enabled ?? false;
|
|
7665
|
+
message.svmSlotOffset = object.svmSlotOffset ?? "0";
|
|
7666
|
+
message.defaultSigScheme = object.defaultSigScheme ?? 0;
|
|
7667
|
+
message.maxCpi = object.maxCpi ?? 0;
|
|
7496
7668
|
return message;
|
|
7497
7669
|
}
|
|
7498
7670
|
};
|
|
7499
|
-
function
|
|
7500
|
-
return {
|
|
7671
|
+
function createBaseMsgUpdateParams() {
|
|
7672
|
+
return { authority: "", params: void 0 };
|
|
7501
7673
|
}
|
|
7502
|
-
var
|
|
7674
|
+
var MsgUpdateParams = {
|
|
7503
7675
|
encode(message, writer = new wire.BinaryWriter()) {
|
|
7504
|
-
if (message.
|
|
7505
|
-
writer.uint32(10).string(message.
|
|
7676
|
+
if (message.authority !== "") {
|
|
7677
|
+
writer.uint32(10).string(message.authority);
|
|
7678
|
+
}
|
|
7679
|
+
if (message.params !== void 0) {
|
|
7680
|
+
SVMParams.encode(message.params, writer.uint32(18).fork()).join();
|
|
7506
7681
|
}
|
|
7507
7682
|
return writer;
|
|
7508
7683
|
},
|
|
7509
7684
|
decode(input, length) {
|
|
7510
7685
|
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
7511
7686
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
7512
|
-
const message =
|
|
7687
|
+
const message = createBaseMsgUpdateParams();
|
|
7513
7688
|
while (reader.pos < end) {
|
|
7514
7689
|
const tag = reader.uint32();
|
|
7515
7690
|
switch (tag >>> 3) {
|
|
@@ -7517,7 +7692,14 @@ var MsgHeartbeat = {
|
|
|
7517
7692
|
if (tag !== 10) {
|
|
7518
7693
|
break;
|
|
7519
7694
|
}
|
|
7520
|
-
message.
|
|
7695
|
+
message.authority = reader.string();
|
|
7696
|
+
continue;
|
|
7697
|
+
}
|
|
7698
|
+
case 2: {
|
|
7699
|
+
if (tag !== 18) {
|
|
7700
|
+
break;
|
|
7701
|
+
}
|
|
7702
|
+
message.params = SVMParams.decode(reader, reader.uint32());
|
|
7521
7703
|
continue;
|
|
7522
7704
|
}
|
|
7523
7705
|
}
|
|
@@ -7529,35 +7711,42 @@ var MsgHeartbeat = {
|
|
|
7529
7711
|
return message;
|
|
7530
7712
|
},
|
|
7531
7713
|
fromJSON(object) {
|
|
7532
|
-
return {
|
|
7714
|
+
return {
|
|
7715
|
+
authority: isSet7(object.authority) ? globalThis.String(object.authority) : "",
|
|
7716
|
+
params: isSet7(object.params) ? SVMParams.fromJSON(object.params) : void 0
|
|
7717
|
+
};
|
|
7533
7718
|
},
|
|
7534
7719
|
toJSON(message) {
|
|
7535
7720
|
const obj = {};
|
|
7536
|
-
if (message.
|
|
7537
|
-
obj.
|
|
7721
|
+
if (message.authority !== "") {
|
|
7722
|
+
obj.authority = message.authority;
|
|
7723
|
+
}
|
|
7724
|
+
if (message.params !== void 0) {
|
|
7725
|
+
obj.params = SVMParams.toJSON(message.params);
|
|
7538
7726
|
}
|
|
7539
7727
|
return obj;
|
|
7540
7728
|
},
|
|
7541
7729
|
create(base) {
|
|
7542
|
-
return
|
|
7730
|
+
return MsgUpdateParams.fromPartial(base ?? {});
|
|
7543
7731
|
},
|
|
7544
7732
|
fromPartial(object) {
|
|
7545
|
-
const message =
|
|
7546
|
-
message.
|
|
7733
|
+
const message = createBaseMsgUpdateParams();
|
|
7734
|
+
message.authority = object.authority ?? "";
|
|
7735
|
+
message.params = object.params !== void 0 && object.params !== null ? SVMParams.fromPartial(object.params) : void 0;
|
|
7547
7736
|
return message;
|
|
7548
7737
|
}
|
|
7549
7738
|
};
|
|
7550
|
-
function
|
|
7739
|
+
function createBaseMsgUpdateParamsResponse() {
|
|
7551
7740
|
return {};
|
|
7552
7741
|
}
|
|
7553
|
-
var
|
|
7742
|
+
var MsgUpdateParamsResponse = {
|
|
7554
7743
|
encode(_, writer = new wire.BinaryWriter()) {
|
|
7555
7744
|
return writer;
|
|
7556
7745
|
},
|
|
7557
7746
|
decode(input, length) {
|
|
7558
7747
|
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
7559
7748
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
7560
|
-
const message =
|
|
7749
|
+
const message = createBaseMsgUpdateParamsResponse();
|
|
7561
7750
|
while (reader.pos < end) {
|
|
7562
7751
|
const tag = reader.uint32();
|
|
7563
7752
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -7575,27 +7764,124 @@ var MsgHeartbeatResponse = {
|
|
|
7575
7764
|
return obj;
|
|
7576
7765
|
},
|
|
7577
7766
|
create(base) {
|
|
7578
|
-
return
|
|
7767
|
+
return MsgUpdateParamsResponse.fromPartial(base ?? {});
|
|
7579
7768
|
},
|
|
7580
7769
|
fromPartial(_) {
|
|
7581
|
-
const message =
|
|
7770
|
+
const message = createBaseMsgUpdateParamsResponse();
|
|
7582
7771
|
return message;
|
|
7583
7772
|
}
|
|
7584
7773
|
};
|
|
7585
|
-
|
|
7586
|
-
|
|
7774
|
+
var MsgDefinition6 = {
|
|
7775
|
+
name: "Msg",
|
|
7776
|
+
fullName: "qorechain.svm.v1.Msg",
|
|
7777
|
+
methods: {
|
|
7778
|
+
deployProgram: {
|
|
7779
|
+
name: "DeployProgram",
|
|
7780
|
+
requestType: MsgDeployProgram,
|
|
7781
|
+
requestStream: false,
|
|
7782
|
+
responseType: MsgDeployProgramResponse,
|
|
7783
|
+
responseStream: false,
|
|
7784
|
+
options: {}
|
|
7785
|
+
},
|
|
7786
|
+
createAccount: {
|
|
7787
|
+
name: "CreateAccount",
|
|
7788
|
+
requestType: MsgCreateAccount,
|
|
7789
|
+
requestStream: false,
|
|
7790
|
+
responseType: MsgCreateAccountResponse,
|
|
7791
|
+
responseStream: false,
|
|
7792
|
+
options: {}
|
|
7793
|
+
},
|
|
7794
|
+
executeProgram: {
|
|
7795
|
+
name: "ExecuteProgram",
|
|
7796
|
+
requestType: MsgExecuteProgram,
|
|
7797
|
+
requestStream: false,
|
|
7798
|
+
responseType: MsgExecuteProgramResponse,
|
|
7799
|
+
responseStream: false,
|
|
7800
|
+
options: {}
|
|
7801
|
+
},
|
|
7802
|
+
registerSVMPQCKey: {
|
|
7803
|
+
name: "RegisterSVMPQCKey",
|
|
7804
|
+
requestType: MsgRegisterSVMPQCKey,
|
|
7805
|
+
requestStream: false,
|
|
7806
|
+
responseType: MsgRegisterSVMPQCKeyResponse,
|
|
7807
|
+
responseStream: false,
|
|
7808
|
+
options: {}
|
|
7809
|
+
},
|
|
7810
|
+
updateParams: {
|
|
7811
|
+
name: "UpdateParams",
|
|
7812
|
+
requestType: MsgUpdateParams,
|
|
7813
|
+
requestStream: false,
|
|
7814
|
+
responseType: MsgUpdateParamsResponse,
|
|
7815
|
+
responseStream: false,
|
|
7816
|
+
options: {}
|
|
7817
|
+
}
|
|
7818
|
+
}
|
|
7819
|
+
};
|
|
7820
|
+
function bytesFromBase645(b64) {
|
|
7821
|
+
if (globalThis.Buffer) {
|
|
7822
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
7823
|
+
} else {
|
|
7824
|
+
const bin = globalThis.atob(b64);
|
|
7825
|
+
const arr = new Uint8Array(bin.length);
|
|
7826
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
7827
|
+
arr[i] = bin.charCodeAt(i);
|
|
7828
|
+
}
|
|
7829
|
+
return arr;
|
|
7830
|
+
}
|
|
7587
7831
|
}
|
|
7588
|
-
|
|
7832
|
+
function base64FromBytes5(arr) {
|
|
7833
|
+
if (globalThis.Buffer) {
|
|
7834
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
7835
|
+
} else {
|
|
7836
|
+
const bin = [];
|
|
7837
|
+
arr.forEach((byte) => {
|
|
7838
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
7839
|
+
});
|
|
7840
|
+
return globalThis.btoa(bin.join(""));
|
|
7841
|
+
}
|
|
7842
|
+
}
|
|
7843
|
+
function isSet7(value) {
|
|
7844
|
+
return value !== null && value !== void 0;
|
|
7845
|
+
}
|
|
7846
|
+
|
|
7847
|
+
// src/codegen/qorechain/lightnode/v1/tx.ts
|
|
7848
|
+
var tx_exports7 = {};
|
|
7849
|
+
__export(tx_exports7, {
|
|
7850
|
+
MsgClaimLightNodeRewards: () => MsgClaimLightNodeRewards,
|
|
7851
|
+
MsgClaimLightNodeRewardsResponse: () => MsgClaimLightNodeRewardsResponse,
|
|
7852
|
+
MsgDefinition: () => MsgDefinition7,
|
|
7853
|
+
MsgDeregisterLightNode: () => MsgDeregisterLightNode,
|
|
7854
|
+
MsgDeregisterLightNodeResponse: () => MsgDeregisterLightNodeResponse,
|
|
7855
|
+
MsgHeartbeat: () => MsgHeartbeat,
|
|
7856
|
+
MsgHeartbeatResponse: () => MsgHeartbeatResponse,
|
|
7857
|
+
MsgRegisterLightNode: () => MsgRegisterLightNode,
|
|
7858
|
+
MsgRegisterLightNodeResponse: () => MsgRegisterLightNodeResponse,
|
|
7859
|
+
protobufPackage: () => protobufPackage7
|
|
7860
|
+
});
|
|
7861
|
+
var protobufPackage7 = "qorechain.lightnode.v1";
|
|
7862
|
+
function createBaseMsgRegisterLightNode() {
|
|
7863
|
+
return { operator: "", nodeType: "", version: "", capabilities: [] };
|
|
7864
|
+
}
|
|
7865
|
+
var MsgRegisterLightNode = {
|
|
7589
7866
|
encode(message, writer = new wire.BinaryWriter()) {
|
|
7590
7867
|
if (message.operator !== "") {
|
|
7591
7868
|
writer.uint32(10).string(message.operator);
|
|
7592
7869
|
}
|
|
7870
|
+
if (message.nodeType !== "") {
|
|
7871
|
+
writer.uint32(18).string(message.nodeType);
|
|
7872
|
+
}
|
|
7873
|
+
if (message.version !== "") {
|
|
7874
|
+
writer.uint32(26).string(message.version);
|
|
7875
|
+
}
|
|
7876
|
+
for (const v of message.capabilities) {
|
|
7877
|
+
writer.uint32(34).string(v);
|
|
7878
|
+
}
|
|
7593
7879
|
return writer;
|
|
7594
7880
|
},
|
|
7595
7881
|
decode(input, length) {
|
|
7596
7882
|
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
7597
7883
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
7598
|
-
const message =
|
|
7884
|
+
const message = createBaseMsgRegisterLightNode();
|
|
7599
7885
|
while (reader.pos < end) {
|
|
7600
7886
|
const tag = reader.uint32();
|
|
7601
7887
|
switch (tag >>> 3) {
|
|
@@ -7606,13 +7892,223 @@ var MsgDeregisterLightNode = {
|
|
|
7606
7892
|
message.operator = reader.string();
|
|
7607
7893
|
continue;
|
|
7608
7894
|
}
|
|
7609
|
-
|
|
7610
|
-
|
|
7611
|
-
|
|
7612
|
-
|
|
7613
|
-
|
|
7614
|
-
|
|
7615
|
-
|
|
7895
|
+
case 2: {
|
|
7896
|
+
if (tag !== 18) {
|
|
7897
|
+
break;
|
|
7898
|
+
}
|
|
7899
|
+
message.nodeType = reader.string();
|
|
7900
|
+
continue;
|
|
7901
|
+
}
|
|
7902
|
+
case 3: {
|
|
7903
|
+
if (tag !== 26) {
|
|
7904
|
+
break;
|
|
7905
|
+
}
|
|
7906
|
+
message.version = reader.string();
|
|
7907
|
+
continue;
|
|
7908
|
+
}
|
|
7909
|
+
case 4: {
|
|
7910
|
+
if (tag !== 34) {
|
|
7911
|
+
break;
|
|
7912
|
+
}
|
|
7913
|
+
message.capabilities.push(reader.string());
|
|
7914
|
+
continue;
|
|
7915
|
+
}
|
|
7916
|
+
}
|
|
7917
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7918
|
+
break;
|
|
7919
|
+
}
|
|
7920
|
+
reader.skip(tag & 7);
|
|
7921
|
+
}
|
|
7922
|
+
return message;
|
|
7923
|
+
},
|
|
7924
|
+
fromJSON(object) {
|
|
7925
|
+
return {
|
|
7926
|
+
operator: isSet8(object.operator) ? globalThis.String(object.operator) : "",
|
|
7927
|
+
nodeType: isSet8(object.nodeType) ? globalThis.String(object.nodeType) : isSet8(object.node_type) ? globalThis.String(object.node_type) : "",
|
|
7928
|
+
version: isSet8(object.version) ? globalThis.String(object.version) : "",
|
|
7929
|
+
capabilities: globalThis.Array.isArray(object?.capabilities) ? object.capabilities.map((e) => globalThis.String(e)) : []
|
|
7930
|
+
};
|
|
7931
|
+
},
|
|
7932
|
+
toJSON(message) {
|
|
7933
|
+
const obj = {};
|
|
7934
|
+
if (message.operator !== "") {
|
|
7935
|
+
obj.operator = message.operator;
|
|
7936
|
+
}
|
|
7937
|
+
if (message.nodeType !== "") {
|
|
7938
|
+
obj.nodeType = message.nodeType;
|
|
7939
|
+
}
|
|
7940
|
+
if (message.version !== "") {
|
|
7941
|
+
obj.version = message.version;
|
|
7942
|
+
}
|
|
7943
|
+
if (message.capabilities?.length) {
|
|
7944
|
+
obj.capabilities = message.capabilities;
|
|
7945
|
+
}
|
|
7946
|
+
return obj;
|
|
7947
|
+
},
|
|
7948
|
+
create(base) {
|
|
7949
|
+
return MsgRegisterLightNode.fromPartial(base ?? {});
|
|
7950
|
+
},
|
|
7951
|
+
fromPartial(object) {
|
|
7952
|
+
const message = createBaseMsgRegisterLightNode();
|
|
7953
|
+
message.operator = object.operator ?? "";
|
|
7954
|
+
message.nodeType = object.nodeType ?? "";
|
|
7955
|
+
message.version = object.version ?? "";
|
|
7956
|
+
message.capabilities = object.capabilities?.map((e) => e) || [];
|
|
7957
|
+
return message;
|
|
7958
|
+
}
|
|
7959
|
+
};
|
|
7960
|
+
function createBaseMsgRegisterLightNodeResponse() {
|
|
7961
|
+
return {};
|
|
7962
|
+
}
|
|
7963
|
+
var MsgRegisterLightNodeResponse = {
|
|
7964
|
+
encode(_, writer = new wire.BinaryWriter()) {
|
|
7965
|
+
return writer;
|
|
7966
|
+
},
|
|
7967
|
+
decode(input, length) {
|
|
7968
|
+
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
7969
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
7970
|
+
const message = createBaseMsgRegisterLightNodeResponse();
|
|
7971
|
+
while (reader.pos < end) {
|
|
7972
|
+
const tag = reader.uint32();
|
|
7973
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7974
|
+
break;
|
|
7975
|
+
}
|
|
7976
|
+
reader.skip(tag & 7);
|
|
7977
|
+
}
|
|
7978
|
+
return message;
|
|
7979
|
+
},
|
|
7980
|
+
fromJSON(_) {
|
|
7981
|
+
return {};
|
|
7982
|
+
},
|
|
7983
|
+
toJSON(_) {
|
|
7984
|
+
const obj = {};
|
|
7985
|
+
return obj;
|
|
7986
|
+
},
|
|
7987
|
+
create(base) {
|
|
7988
|
+
return MsgRegisterLightNodeResponse.fromPartial(base ?? {});
|
|
7989
|
+
},
|
|
7990
|
+
fromPartial(_) {
|
|
7991
|
+
const message = createBaseMsgRegisterLightNodeResponse();
|
|
7992
|
+
return message;
|
|
7993
|
+
}
|
|
7994
|
+
};
|
|
7995
|
+
function createBaseMsgHeartbeat() {
|
|
7996
|
+
return { operator: "" };
|
|
7997
|
+
}
|
|
7998
|
+
var MsgHeartbeat = {
|
|
7999
|
+
encode(message, writer = new wire.BinaryWriter()) {
|
|
8000
|
+
if (message.operator !== "") {
|
|
8001
|
+
writer.uint32(10).string(message.operator);
|
|
8002
|
+
}
|
|
8003
|
+
return writer;
|
|
8004
|
+
},
|
|
8005
|
+
decode(input, length) {
|
|
8006
|
+
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
8007
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
8008
|
+
const message = createBaseMsgHeartbeat();
|
|
8009
|
+
while (reader.pos < end) {
|
|
8010
|
+
const tag = reader.uint32();
|
|
8011
|
+
switch (tag >>> 3) {
|
|
8012
|
+
case 1: {
|
|
8013
|
+
if (tag !== 10) {
|
|
8014
|
+
break;
|
|
8015
|
+
}
|
|
8016
|
+
message.operator = reader.string();
|
|
8017
|
+
continue;
|
|
8018
|
+
}
|
|
8019
|
+
}
|
|
8020
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
8021
|
+
break;
|
|
8022
|
+
}
|
|
8023
|
+
reader.skip(tag & 7);
|
|
8024
|
+
}
|
|
8025
|
+
return message;
|
|
8026
|
+
},
|
|
8027
|
+
fromJSON(object) {
|
|
8028
|
+
return { operator: isSet8(object.operator) ? globalThis.String(object.operator) : "" };
|
|
8029
|
+
},
|
|
8030
|
+
toJSON(message) {
|
|
8031
|
+
const obj = {};
|
|
8032
|
+
if (message.operator !== "") {
|
|
8033
|
+
obj.operator = message.operator;
|
|
8034
|
+
}
|
|
8035
|
+
return obj;
|
|
8036
|
+
},
|
|
8037
|
+
create(base) {
|
|
8038
|
+
return MsgHeartbeat.fromPartial(base ?? {});
|
|
8039
|
+
},
|
|
8040
|
+
fromPartial(object) {
|
|
8041
|
+
const message = createBaseMsgHeartbeat();
|
|
8042
|
+
message.operator = object.operator ?? "";
|
|
8043
|
+
return message;
|
|
8044
|
+
}
|
|
8045
|
+
};
|
|
8046
|
+
function createBaseMsgHeartbeatResponse() {
|
|
8047
|
+
return {};
|
|
8048
|
+
}
|
|
8049
|
+
var MsgHeartbeatResponse = {
|
|
8050
|
+
encode(_, writer = new wire.BinaryWriter()) {
|
|
8051
|
+
return writer;
|
|
8052
|
+
},
|
|
8053
|
+
decode(input, length) {
|
|
8054
|
+
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
8055
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
8056
|
+
const message = createBaseMsgHeartbeatResponse();
|
|
8057
|
+
while (reader.pos < end) {
|
|
8058
|
+
const tag = reader.uint32();
|
|
8059
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
8060
|
+
break;
|
|
8061
|
+
}
|
|
8062
|
+
reader.skip(tag & 7);
|
|
8063
|
+
}
|
|
8064
|
+
return message;
|
|
8065
|
+
},
|
|
8066
|
+
fromJSON(_) {
|
|
8067
|
+
return {};
|
|
8068
|
+
},
|
|
8069
|
+
toJSON(_) {
|
|
8070
|
+
const obj = {};
|
|
8071
|
+
return obj;
|
|
8072
|
+
},
|
|
8073
|
+
create(base) {
|
|
8074
|
+
return MsgHeartbeatResponse.fromPartial(base ?? {});
|
|
8075
|
+
},
|
|
8076
|
+
fromPartial(_) {
|
|
8077
|
+
const message = createBaseMsgHeartbeatResponse();
|
|
8078
|
+
return message;
|
|
8079
|
+
}
|
|
8080
|
+
};
|
|
8081
|
+
function createBaseMsgDeregisterLightNode() {
|
|
8082
|
+
return { operator: "" };
|
|
8083
|
+
}
|
|
8084
|
+
var MsgDeregisterLightNode = {
|
|
8085
|
+
encode(message, writer = new wire.BinaryWriter()) {
|
|
8086
|
+
if (message.operator !== "") {
|
|
8087
|
+
writer.uint32(10).string(message.operator);
|
|
8088
|
+
}
|
|
8089
|
+
return writer;
|
|
8090
|
+
},
|
|
8091
|
+
decode(input, length) {
|
|
8092
|
+
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
8093
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
8094
|
+
const message = createBaseMsgDeregisterLightNode();
|
|
8095
|
+
while (reader.pos < end) {
|
|
8096
|
+
const tag = reader.uint32();
|
|
8097
|
+
switch (tag >>> 3) {
|
|
8098
|
+
case 1: {
|
|
8099
|
+
if (tag !== 10) {
|
|
8100
|
+
break;
|
|
8101
|
+
}
|
|
8102
|
+
message.operator = reader.string();
|
|
8103
|
+
continue;
|
|
8104
|
+
}
|
|
8105
|
+
}
|
|
8106
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
8107
|
+
break;
|
|
8108
|
+
}
|
|
8109
|
+
reader.skip(tag & 7);
|
|
8110
|
+
}
|
|
8111
|
+
return message;
|
|
7616
8112
|
},
|
|
7617
8113
|
fromJSON(object) {
|
|
7618
8114
|
return { operator: isSet8(object.operator) ? globalThis.String(object.operator) : "" };
|
|
@@ -8361,6 +8857,10 @@ __export(tx_exports9, {
|
|
|
8361
8857
|
MsgCreateAbstractAccount: () => MsgCreateAbstractAccount,
|
|
8362
8858
|
MsgCreateAbstractAccountResponse: () => MsgCreateAbstractAccountResponse,
|
|
8363
8859
|
MsgDefinition: () => MsgDefinition9,
|
|
8860
|
+
MsgExecuteCosmos: () => MsgExecuteCosmos,
|
|
8861
|
+
MsgExecuteCosmosResponse: () => MsgExecuteCosmosResponse,
|
|
8862
|
+
MsgExecuteEVM: () => MsgExecuteEVM,
|
|
8863
|
+
MsgExecuteEVMResponse: () => MsgExecuteEVMResponse,
|
|
8364
8864
|
MsgRegisterAuthenticator: () => MsgRegisterAuthenticator,
|
|
8365
8865
|
MsgRegisterAuthenticatorResponse: () => MsgRegisterAuthenticatorResponse,
|
|
8366
8866
|
MsgRevokeAuthenticator: () => MsgRevokeAuthenticator,
|
|
@@ -8508,14 +9008,309 @@ var MsgCreateAbstractAccount = {
|
|
|
8508
9008
|
if (tag !== 10) {
|
|
8509
9009
|
break;
|
|
8510
9010
|
}
|
|
8511
|
-
message.owner = reader.string();
|
|
9011
|
+
message.owner = reader.string();
|
|
9012
|
+
continue;
|
|
9013
|
+
}
|
|
9014
|
+
case 2: {
|
|
9015
|
+
if (tag !== 18) {
|
|
9016
|
+
break;
|
|
9017
|
+
}
|
|
9018
|
+
message.accountType = reader.string();
|
|
9019
|
+
continue;
|
|
9020
|
+
}
|
|
9021
|
+
}
|
|
9022
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
9023
|
+
break;
|
|
9024
|
+
}
|
|
9025
|
+
reader.skip(tag & 7);
|
|
9026
|
+
}
|
|
9027
|
+
return message;
|
|
9028
|
+
},
|
|
9029
|
+
fromJSON(object) {
|
|
9030
|
+
return {
|
|
9031
|
+
owner: isSet10(object.owner) ? globalThis.String(object.owner) : "",
|
|
9032
|
+
accountType: isSet10(object.accountType) ? globalThis.String(object.accountType) : isSet10(object.account_type) ? globalThis.String(object.account_type) : ""
|
|
9033
|
+
};
|
|
9034
|
+
},
|
|
9035
|
+
toJSON(message) {
|
|
9036
|
+
const obj = {};
|
|
9037
|
+
if (message.owner !== "") {
|
|
9038
|
+
obj.owner = message.owner;
|
|
9039
|
+
}
|
|
9040
|
+
if (message.accountType !== "") {
|
|
9041
|
+
obj.accountType = message.accountType;
|
|
9042
|
+
}
|
|
9043
|
+
return obj;
|
|
9044
|
+
},
|
|
9045
|
+
create(base) {
|
|
9046
|
+
return MsgCreateAbstractAccount.fromPartial(base ?? {});
|
|
9047
|
+
},
|
|
9048
|
+
fromPartial(object) {
|
|
9049
|
+
const message = createBaseMsgCreateAbstractAccount();
|
|
9050
|
+
message.owner = object.owner ?? "";
|
|
9051
|
+
message.accountType = object.accountType ?? "";
|
|
9052
|
+
return message;
|
|
9053
|
+
}
|
|
9054
|
+
};
|
|
9055
|
+
function createBaseMsgCreateAbstractAccountResponse() {
|
|
9056
|
+
return { address: "" };
|
|
9057
|
+
}
|
|
9058
|
+
var MsgCreateAbstractAccountResponse = {
|
|
9059
|
+
encode(message, writer = new wire.BinaryWriter()) {
|
|
9060
|
+
if (message.address !== "") {
|
|
9061
|
+
writer.uint32(10).string(message.address);
|
|
9062
|
+
}
|
|
9063
|
+
return writer;
|
|
9064
|
+
},
|
|
9065
|
+
decode(input, length) {
|
|
9066
|
+
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
9067
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
9068
|
+
const message = createBaseMsgCreateAbstractAccountResponse();
|
|
9069
|
+
while (reader.pos < end) {
|
|
9070
|
+
const tag = reader.uint32();
|
|
9071
|
+
switch (tag >>> 3) {
|
|
9072
|
+
case 1: {
|
|
9073
|
+
if (tag !== 10) {
|
|
9074
|
+
break;
|
|
9075
|
+
}
|
|
9076
|
+
message.address = reader.string();
|
|
9077
|
+
continue;
|
|
9078
|
+
}
|
|
9079
|
+
}
|
|
9080
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
9081
|
+
break;
|
|
9082
|
+
}
|
|
9083
|
+
reader.skip(tag & 7);
|
|
9084
|
+
}
|
|
9085
|
+
return message;
|
|
9086
|
+
},
|
|
9087
|
+
fromJSON(object) {
|
|
9088
|
+
return { address: isSet10(object.address) ? globalThis.String(object.address) : "" };
|
|
9089
|
+
},
|
|
9090
|
+
toJSON(message) {
|
|
9091
|
+
const obj = {};
|
|
9092
|
+
if (message.address !== "") {
|
|
9093
|
+
obj.address = message.address;
|
|
9094
|
+
}
|
|
9095
|
+
return obj;
|
|
9096
|
+
},
|
|
9097
|
+
create(base) {
|
|
9098
|
+
return MsgCreateAbstractAccountResponse.fromPartial(base ?? {});
|
|
9099
|
+
},
|
|
9100
|
+
fromPartial(object) {
|
|
9101
|
+
const message = createBaseMsgCreateAbstractAccountResponse();
|
|
9102
|
+
message.address = object.address ?? "";
|
|
9103
|
+
return message;
|
|
9104
|
+
}
|
|
9105
|
+
};
|
|
9106
|
+
function createBaseMsgUpdateSpendingRules() {
|
|
9107
|
+
return { owner: "", accountAddress: "", rules: [] };
|
|
9108
|
+
}
|
|
9109
|
+
var MsgUpdateSpendingRules = {
|
|
9110
|
+
encode(message, writer = new wire.BinaryWriter()) {
|
|
9111
|
+
if (message.owner !== "") {
|
|
9112
|
+
writer.uint32(10).string(message.owner);
|
|
9113
|
+
}
|
|
9114
|
+
if (message.accountAddress !== "") {
|
|
9115
|
+
writer.uint32(18).string(message.accountAddress);
|
|
9116
|
+
}
|
|
9117
|
+
for (const v of message.rules) {
|
|
9118
|
+
SpendingRule.encode(v, writer.uint32(26).fork()).join();
|
|
9119
|
+
}
|
|
9120
|
+
return writer;
|
|
9121
|
+
},
|
|
9122
|
+
decode(input, length) {
|
|
9123
|
+
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
9124
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
9125
|
+
const message = createBaseMsgUpdateSpendingRules();
|
|
9126
|
+
while (reader.pos < end) {
|
|
9127
|
+
const tag = reader.uint32();
|
|
9128
|
+
switch (tag >>> 3) {
|
|
9129
|
+
case 1: {
|
|
9130
|
+
if (tag !== 10) {
|
|
9131
|
+
break;
|
|
9132
|
+
}
|
|
9133
|
+
message.owner = reader.string();
|
|
9134
|
+
continue;
|
|
9135
|
+
}
|
|
9136
|
+
case 2: {
|
|
9137
|
+
if (tag !== 18) {
|
|
9138
|
+
break;
|
|
9139
|
+
}
|
|
9140
|
+
message.accountAddress = reader.string();
|
|
9141
|
+
continue;
|
|
9142
|
+
}
|
|
9143
|
+
case 3: {
|
|
9144
|
+
if (tag !== 26) {
|
|
9145
|
+
break;
|
|
9146
|
+
}
|
|
9147
|
+
message.rules.push(SpendingRule.decode(reader, reader.uint32()));
|
|
9148
|
+
continue;
|
|
9149
|
+
}
|
|
9150
|
+
}
|
|
9151
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
9152
|
+
break;
|
|
9153
|
+
}
|
|
9154
|
+
reader.skip(tag & 7);
|
|
9155
|
+
}
|
|
9156
|
+
return message;
|
|
9157
|
+
},
|
|
9158
|
+
fromJSON(object) {
|
|
9159
|
+
return {
|
|
9160
|
+
owner: isSet10(object.owner) ? globalThis.String(object.owner) : "",
|
|
9161
|
+
accountAddress: isSet10(object.accountAddress) ? globalThis.String(object.accountAddress) : isSet10(object.account_address) ? globalThis.String(object.account_address) : "",
|
|
9162
|
+
rules: globalThis.Array.isArray(object?.rules) ? object.rules.map((e) => SpendingRule.fromJSON(e)) : []
|
|
9163
|
+
};
|
|
9164
|
+
},
|
|
9165
|
+
toJSON(message) {
|
|
9166
|
+
const obj = {};
|
|
9167
|
+
if (message.owner !== "") {
|
|
9168
|
+
obj.owner = message.owner;
|
|
9169
|
+
}
|
|
9170
|
+
if (message.accountAddress !== "") {
|
|
9171
|
+
obj.accountAddress = message.accountAddress;
|
|
9172
|
+
}
|
|
9173
|
+
if (message.rules?.length) {
|
|
9174
|
+
obj.rules = message.rules.map((e) => SpendingRule.toJSON(e));
|
|
9175
|
+
}
|
|
9176
|
+
return obj;
|
|
9177
|
+
},
|
|
9178
|
+
create(base) {
|
|
9179
|
+
return MsgUpdateSpendingRules.fromPartial(base ?? {});
|
|
9180
|
+
},
|
|
9181
|
+
fromPartial(object) {
|
|
9182
|
+
const message = createBaseMsgUpdateSpendingRules();
|
|
9183
|
+
message.owner = object.owner ?? "";
|
|
9184
|
+
message.accountAddress = object.accountAddress ?? "";
|
|
9185
|
+
message.rules = object.rules?.map((e) => SpendingRule.fromPartial(e)) || [];
|
|
9186
|
+
return message;
|
|
9187
|
+
}
|
|
9188
|
+
};
|
|
9189
|
+
function createBaseMsgUpdateSpendingRulesResponse() {
|
|
9190
|
+
return {};
|
|
9191
|
+
}
|
|
9192
|
+
var MsgUpdateSpendingRulesResponse = {
|
|
9193
|
+
encode(_, writer = new wire.BinaryWriter()) {
|
|
9194
|
+
return writer;
|
|
9195
|
+
},
|
|
9196
|
+
decode(input, length) {
|
|
9197
|
+
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
9198
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
9199
|
+
const message = createBaseMsgUpdateSpendingRulesResponse();
|
|
9200
|
+
while (reader.pos < end) {
|
|
9201
|
+
const tag = reader.uint32();
|
|
9202
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
9203
|
+
break;
|
|
9204
|
+
}
|
|
9205
|
+
reader.skip(tag & 7);
|
|
9206
|
+
}
|
|
9207
|
+
return message;
|
|
9208
|
+
},
|
|
9209
|
+
fromJSON(_) {
|
|
9210
|
+
return {};
|
|
9211
|
+
},
|
|
9212
|
+
toJSON(_) {
|
|
9213
|
+
const obj = {};
|
|
9214
|
+
return obj;
|
|
9215
|
+
},
|
|
9216
|
+
create(base) {
|
|
9217
|
+
return MsgUpdateSpendingRulesResponse.fromPartial(base ?? {});
|
|
9218
|
+
},
|
|
9219
|
+
fromPartial(_) {
|
|
9220
|
+
const message = createBaseMsgUpdateSpendingRulesResponse();
|
|
9221
|
+
return message;
|
|
9222
|
+
}
|
|
9223
|
+
};
|
|
9224
|
+
function createBaseMsgRegisterAuthenticator() {
|
|
9225
|
+
return {
|
|
9226
|
+
owner: "",
|
|
9227
|
+
accountAddress: "",
|
|
9228
|
+
scheme: "",
|
|
9229
|
+
pubkey: new Uint8Array(0),
|
|
9230
|
+
permissions: [],
|
|
9231
|
+
expiryUnix: "0",
|
|
9232
|
+
label: ""
|
|
9233
|
+
};
|
|
9234
|
+
}
|
|
9235
|
+
var MsgRegisterAuthenticator = {
|
|
9236
|
+
encode(message, writer = new wire.BinaryWriter()) {
|
|
9237
|
+
if (message.owner !== "") {
|
|
9238
|
+
writer.uint32(10).string(message.owner);
|
|
9239
|
+
}
|
|
9240
|
+
if (message.accountAddress !== "") {
|
|
9241
|
+
writer.uint32(18).string(message.accountAddress);
|
|
9242
|
+
}
|
|
9243
|
+
if (message.scheme !== "") {
|
|
9244
|
+
writer.uint32(26).string(message.scheme);
|
|
9245
|
+
}
|
|
9246
|
+
if (message.pubkey.length !== 0) {
|
|
9247
|
+
writer.uint32(34).bytes(message.pubkey);
|
|
9248
|
+
}
|
|
9249
|
+
for (const v of message.permissions) {
|
|
9250
|
+
writer.uint32(42).string(v);
|
|
9251
|
+
}
|
|
9252
|
+
if (message.expiryUnix !== "0") {
|
|
9253
|
+
writer.uint32(48).int64(message.expiryUnix);
|
|
9254
|
+
}
|
|
9255
|
+
if (message.label !== "") {
|
|
9256
|
+
writer.uint32(58).string(message.label);
|
|
9257
|
+
}
|
|
9258
|
+
return writer;
|
|
9259
|
+
},
|
|
9260
|
+
decode(input, length) {
|
|
9261
|
+
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
9262
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
9263
|
+
const message = createBaseMsgRegisterAuthenticator();
|
|
9264
|
+
while (reader.pos < end) {
|
|
9265
|
+
const tag = reader.uint32();
|
|
9266
|
+
switch (tag >>> 3) {
|
|
9267
|
+
case 1: {
|
|
9268
|
+
if (tag !== 10) {
|
|
9269
|
+
break;
|
|
9270
|
+
}
|
|
9271
|
+
message.owner = reader.string();
|
|
9272
|
+
continue;
|
|
9273
|
+
}
|
|
9274
|
+
case 2: {
|
|
9275
|
+
if (tag !== 18) {
|
|
9276
|
+
break;
|
|
9277
|
+
}
|
|
9278
|
+
message.accountAddress = reader.string();
|
|
9279
|
+
continue;
|
|
9280
|
+
}
|
|
9281
|
+
case 3: {
|
|
9282
|
+
if (tag !== 26) {
|
|
9283
|
+
break;
|
|
9284
|
+
}
|
|
9285
|
+
message.scheme = reader.string();
|
|
9286
|
+
continue;
|
|
9287
|
+
}
|
|
9288
|
+
case 4: {
|
|
9289
|
+
if (tag !== 34) {
|
|
9290
|
+
break;
|
|
9291
|
+
}
|
|
9292
|
+
message.pubkey = reader.bytes();
|
|
8512
9293
|
continue;
|
|
8513
9294
|
}
|
|
8514
|
-
case
|
|
8515
|
-
if (tag !==
|
|
9295
|
+
case 5: {
|
|
9296
|
+
if (tag !== 42) {
|
|
8516
9297
|
break;
|
|
8517
9298
|
}
|
|
8518
|
-
message.
|
|
9299
|
+
message.permissions.push(reader.string());
|
|
9300
|
+
continue;
|
|
9301
|
+
}
|
|
9302
|
+
case 6: {
|
|
9303
|
+
if (tag !== 48) {
|
|
9304
|
+
break;
|
|
9305
|
+
}
|
|
9306
|
+
message.expiryUnix = reader.int64().toString();
|
|
9307
|
+
continue;
|
|
9308
|
+
}
|
|
9309
|
+
case 7: {
|
|
9310
|
+
if (tag !== 58) {
|
|
9311
|
+
break;
|
|
9312
|
+
}
|
|
9313
|
+
message.label = reader.string();
|
|
8519
9314
|
continue;
|
|
8520
9315
|
}
|
|
8521
9316
|
}
|
|
@@ -8529,7 +9324,12 @@ var MsgCreateAbstractAccount = {
|
|
|
8529
9324
|
fromJSON(object) {
|
|
8530
9325
|
return {
|
|
8531
9326
|
owner: isSet10(object.owner) ? globalThis.String(object.owner) : "",
|
|
8532
|
-
|
|
9327
|
+
accountAddress: isSet10(object.accountAddress) ? globalThis.String(object.accountAddress) : isSet10(object.account_address) ? globalThis.String(object.account_address) : "",
|
|
9328
|
+
scheme: isSet10(object.scheme) ? globalThis.String(object.scheme) : "",
|
|
9329
|
+
pubkey: isSet10(object.pubkey) ? bytesFromBase646(object.pubkey) : new Uint8Array(0),
|
|
9330
|
+
permissions: globalThis.Array.isArray(object?.permissions) ? object.permissions.map((e) => globalThis.String(e)) : [],
|
|
9331
|
+
expiryUnix: isSet10(object.expiryUnix) ? globalThis.String(object.expiryUnix) : isSet10(object.expiry_unix) ? globalThis.String(object.expiry_unix) : "0",
|
|
9332
|
+
label: isSet10(object.label) ? globalThis.String(object.label) : ""
|
|
8533
9333
|
};
|
|
8534
9334
|
},
|
|
8535
9335
|
toJSON(message) {
|
|
@@ -8537,46 +9337,54 @@ var MsgCreateAbstractAccount = {
|
|
|
8537
9337
|
if (message.owner !== "") {
|
|
8538
9338
|
obj.owner = message.owner;
|
|
8539
9339
|
}
|
|
8540
|
-
if (message.
|
|
8541
|
-
obj.
|
|
9340
|
+
if (message.accountAddress !== "") {
|
|
9341
|
+
obj.accountAddress = message.accountAddress;
|
|
9342
|
+
}
|
|
9343
|
+
if (message.scheme !== "") {
|
|
9344
|
+
obj.scheme = message.scheme;
|
|
9345
|
+
}
|
|
9346
|
+
if (message.pubkey.length !== 0) {
|
|
9347
|
+
obj.pubkey = base64FromBytes6(message.pubkey);
|
|
9348
|
+
}
|
|
9349
|
+
if (message.permissions?.length) {
|
|
9350
|
+
obj.permissions = message.permissions;
|
|
9351
|
+
}
|
|
9352
|
+
if (message.expiryUnix !== "0") {
|
|
9353
|
+
obj.expiryUnix = message.expiryUnix;
|
|
9354
|
+
}
|
|
9355
|
+
if (message.label !== "") {
|
|
9356
|
+
obj.label = message.label;
|
|
8542
9357
|
}
|
|
8543
9358
|
return obj;
|
|
8544
9359
|
},
|
|
8545
9360
|
create(base) {
|
|
8546
|
-
return
|
|
9361
|
+
return MsgRegisterAuthenticator.fromPartial(base ?? {});
|
|
8547
9362
|
},
|
|
8548
9363
|
fromPartial(object) {
|
|
8549
|
-
const message =
|
|
9364
|
+
const message = createBaseMsgRegisterAuthenticator();
|
|
8550
9365
|
message.owner = object.owner ?? "";
|
|
8551
|
-
message.
|
|
9366
|
+
message.accountAddress = object.accountAddress ?? "";
|
|
9367
|
+
message.scheme = object.scheme ?? "";
|
|
9368
|
+
message.pubkey = object.pubkey ?? new Uint8Array(0);
|
|
9369
|
+
message.permissions = object.permissions?.map((e) => e) || [];
|
|
9370
|
+
message.expiryUnix = object.expiryUnix ?? "0";
|
|
9371
|
+
message.label = object.label ?? "";
|
|
8552
9372
|
return message;
|
|
8553
9373
|
}
|
|
8554
9374
|
};
|
|
8555
|
-
function
|
|
8556
|
-
return {
|
|
9375
|
+
function createBaseMsgRegisterAuthenticatorResponse() {
|
|
9376
|
+
return {};
|
|
8557
9377
|
}
|
|
8558
|
-
var
|
|
8559
|
-
encode(
|
|
8560
|
-
if (message.address !== "") {
|
|
8561
|
-
writer.uint32(10).string(message.address);
|
|
8562
|
-
}
|
|
9378
|
+
var MsgRegisterAuthenticatorResponse = {
|
|
9379
|
+
encode(_, writer = new wire.BinaryWriter()) {
|
|
8563
9380
|
return writer;
|
|
8564
9381
|
},
|
|
8565
9382
|
decode(input, length) {
|
|
8566
9383
|
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
8567
9384
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
8568
|
-
const message =
|
|
9385
|
+
const message = createBaseMsgRegisterAuthenticatorResponse();
|
|
8569
9386
|
while (reader.pos < end) {
|
|
8570
9387
|
const tag = reader.uint32();
|
|
8571
|
-
switch (tag >>> 3) {
|
|
8572
|
-
case 1: {
|
|
8573
|
-
if (tag !== 10) {
|
|
8574
|
-
break;
|
|
8575
|
-
}
|
|
8576
|
-
message.address = reader.string();
|
|
8577
|
-
continue;
|
|
8578
|
-
}
|
|
8579
|
-
}
|
|
8580
9388
|
if ((tag & 7) === 4 || tag === 0) {
|
|
8581
9389
|
break;
|
|
8582
9390
|
}
|
|
@@ -8584,29 +9392,25 @@ var MsgCreateAbstractAccountResponse = {
|
|
|
8584
9392
|
}
|
|
8585
9393
|
return message;
|
|
8586
9394
|
},
|
|
8587
|
-
fromJSON(
|
|
8588
|
-
return {
|
|
9395
|
+
fromJSON(_) {
|
|
9396
|
+
return {};
|
|
8589
9397
|
},
|
|
8590
|
-
toJSON(
|
|
9398
|
+
toJSON(_) {
|
|
8591
9399
|
const obj = {};
|
|
8592
|
-
if (message.address !== "") {
|
|
8593
|
-
obj.address = message.address;
|
|
8594
|
-
}
|
|
8595
9400
|
return obj;
|
|
8596
9401
|
},
|
|
8597
9402
|
create(base) {
|
|
8598
|
-
return
|
|
9403
|
+
return MsgRegisterAuthenticatorResponse.fromPartial(base ?? {});
|
|
8599
9404
|
},
|
|
8600
|
-
fromPartial(
|
|
8601
|
-
const message =
|
|
8602
|
-
message.address = object.address ?? "";
|
|
9405
|
+
fromPartial(_) {
|
|
9406
|
+
const message = createBaseMsgRegisterAuthenticatorResponse();
|
|
8603
9407
|
return message;
|
|
8604
9408
|
}
|
|
8605
9409
|
};
|
|
8606
|
-
function
|
|
8607
|
-
return { owner: "", accountAddress: "",
|
|
9410
|
+
function createBaseMsgRevokeAuthenticator() {
|
|
9411
|
+
return { owner: "", accountAddress: "", scheme: "", pubkey: new Uint8Array(0) };
|
|
8608
9412
|
}
|
|
8609
|
-
var
|
|
9413
|
+
var MsgRevokeAuthenticator = {
|
|
8610
9414
|
encode(message, writer = new wire.BinaryWriter()) {
|
|
8611
9415
|
if (message.owner !== "") {
|
|
8612
9416
|
writer.uint32(10).string(message.owner);
|
|
@@ -8614,15 +9418,18 @@ var MsgUpdateSpendingRules = {
|
|
|
8614
9418
|
if (message.accountAddress !== "") {
|
|
8615
9419
|
writer.uint32(18).string(message.accountAddress);
|
|
8616
9420
|
}
|
|
8617
|
-
|
|
8618
|
-
|
|
9421
|
+
if (message.scheme !== "") {
|
|
9422
|
+
writer.uint32(26).string(message.scheme);
|
|
9423
|
+
}
|
|
9424
|
+
if (message.pubkey.length !== 0) {
|
|
9425
|
+
writer.uint32(34).bytes(message.pubkey);
|
|
8619
9426
|
}
|
|
8620
9427
|
return writer;
|
|
8621
9428
|
},
|
|
8622
9429
|
decode(input, length) {
|
|
8623
9430
|
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
8624
9431
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
8625
|
-
const message =
|
|
9432
|
+
const message = createBaseMsgRevokeAuthenticator();
|
|
8626
9433
|
while (reader.pos < end) {
|
|
8627
9434
|
const tag = reader.uint32();
|
|
8628
9435
|
switch (tag >>> 3) {
|
|
@@ -8644,7 +9451,14 @@ var MsgUpdateSpendingRules = {
|
|
|
8644
9451
|
if (tag !== 26) {
|
|
8645
9452
|
break;
|
|
8646
9453
|
}
|
|
8647
|
-
message.
|
|
9454
|
+
message.scheme = reader.string();
|
|
9455
|
+
continue;
|
|
9456
|
+
}
|
|
9457
|
+
case 4: {
|
|
9458
|
+
if (tag !== 34) {
|
|
9459
|
+
break;
|
|
9460
|
+
}
|
|
9461
|
+
message.pubkey = reader.bytes();
|
|
8648
9462
|
continue;
|
|
8649
9463
|
}
|
|
8650
9464
|
}
|
|
@@ -8659,7 +9473,8 @@ var MsgUpdateSpendingRules = {
|
|
|
8659
9473
|
return {
|
|
8660
9474
|
owner: isSet10(object.owner) ? globalThis.String(object.owner) : "",
|
|
8661
9475
|
accountAddress: isSet10(object.accountAddress) ? globalThis.String(object.accountAddress) : isSet10(object.account_address) ? globalThis.String(object.account_address) : "",
|
|
8662
|
-
|
|
9476
|
+
scheme: isSet10(object.scheme) ? globalThis.String(object.scheme) : "",
|
|
9477
|
+
pubkey: isSet10(object.pubkey) ? bytesFromBase646(object.pubkey) : new Uint8Array(0)
|
|
8663
9478
|
};
|
|
8664
9479
|
},
|
|
8665
9480
|
toJSON(message) {
|
|
@@ -8670,33 +9485,37 @@ var MsgUpdateSpendingRules = {
|
|
|
8670
9485
|
if (message.accountAddress !== "") {
|
|
8671
9486
|
obj.accountAddress = message.accountAddress;
|
|
8672
9487
|
}
|
|
8673
|
-
if (message.
|
|
8674
|
-
obj.
|
|
9488
|
+
if (message.scheme !== "") {
|
|
9489
|
+
obj.scheme = message.scheme;
|
|
9490
|
+
}
|
|
9491
|
+
if (message.pubkey.length !== 0) {
|
|
9492
|
+
obj.pubkey = base64FromBytes6(message.pubkey);
|
|
8675
9493
|
}
|
|
8676
9494
|
return obj;
|
|
8677
9495
|
},
|
|
8678
9496
|
create(base) {
|
|
8679
|
-
return
|
|
9497
|
+
return MsgRevokeAuthenticator.fromPartial(base ?? {});
|
|
8680
9498
|
},
|
|
8681
9499
|
fromPartial(object) {
|
|
8682
|
-
const message =
|
|
9500
|
+
const message = createBaseMsgRevokeAuthenticator();
|
|
8683
9501
|
message.owner = object.owner ?? "";
|
|
8684
9502
|
message.accountAddress = object.accountAddress ?? "";
|
|
8685
|
-
message.
|
|
9503
|
+
message.scheme = object.scheme ?? "";
|
|
9504
|
+
message.pubkey = object.pubkey ?? new Uint8Array(0);
|
|
8686
9505
|
return message;
|
|
8687
9506
|
}
|
|
8688
9507
|
};
|
|
8689
|
-
function
|
|
9508
|
+
function createBaseMsgRevokeAuthenticatorResponse() {
|
|
8690
9509
|
return {};
|
|
8691
9510
|
}
|
|
8692
|
-
var
|
|
9511
|
+
var MsgRevokeAuthenticatorResponse = {
|
|
8693
9512
|
encode(_, writer = new wire.BinaryWriter()) {
|
|
8694
9513
|
return writer;
|
|
8695
9514
|
},
|
|
8696
9515
|
decode(input, length) {
|
|
8697
9516
|
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
8698
9517
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
8699
|
-
const message =
|
|
9518
|
+
const message = createBaseMsgRevokeAuthenticatorResponse();
|
|
8700
9519
|
while (reader.pos < end) {
|
|
8701
9520
|
const tag = reader.uint32();
|
|
8702
9521
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -8714,31 +9533,34 @@ var MsgUpdateSpendingRulesResponse = {
|
|
|
8714
9533
|
return obj;
|
|
8715
9534
|
},
|
|
8716
9535
|
create(base) {
|
|
8717
|
-
return
|
|
9536
|
+
return MsgRevokeAuthenticatorResponse.fromPartial(base ?? {});
|
|
8718
9537
|
},
|
|
8719
9538
|
fromPartial(_) {
|
|
8720
|
-
const message =
|
|
9539
|
+
const message = createBaseMsgRevokeAuthenticatorResponse();
|
|
8721
9540
|
return message;
|
|
8722
9541
|
}
|
|
8723
9542
|
};
|
|
8724
|
-
function
|
|
9543
|
+
function createBaseMsgExecuteEVM() {
|
|
8725
9544
|
return {
|
|
8726
|
-
|
|
8727
|
-
|
|
9545
|
+
relayer: "",
|
|
9546
|
+
account: "",
|
|
8728
9547
|
scheme: "",
|
|
8729
9548
|
pubkey: new Uint8Array(0),
|
|
8730
|
-
|
|
8731
|
-
|
|
8732
|
-
|
|
9549
|
+
signature: new Uint8Array(0),
|
|
9550
|
+
to: "",
|
|
9551
|
+
value: "",
|
|
9552
|
+
data: new Uint8Array(0),
|
|
9553
|
+
gasLimit: "0",
|
|
9554
|
+
nonce: "0"
|
|
8733
9555
|
};
|
|
8734
9556
|
}
|
|
8735
|
-
var
|
|
9557
|
+
var MsgExecuteEVM = {
|
|
8736
9558
|
encode(message, writer = new wire.BinaryWriter()) {
|
|
8737
|
-
if (message.
|
|
8738
|
-
writer.uint32(10).string(message.
|
|
9559
|
+
if (message.relayer !== "") {
|
|
9560
|
+
writer.uint32(10).string(message.relayer);
|
|
8739
9561
|
}
|
|
8740
|
-
if (message.
|
|
8741
|
-
writer.uint32(18).string(message.
|
|
9562
|
+
if (message.account !== "") {
|
|
9563
|
+
writer.uint32(18).string(message.account);
|
|
8742
9564
|
}
|
|
8743
9565
|
if (message.scheme !== "") {
|
|
8744
9566
|
writer.uint32(26).string(message.scheme);
|
|
@@ -8746,21 +9568,30 @@ var MsgRegisterAuthenticator = {
|
|
|
8746
9568
|
if (message.pubkey.length !== 0) {
|
|
8747
9569
|
writer.uint32(34).bytes(message.pubkey);
|
|
8748
9570
|
}
|
|
8749
|
-
|
|
8750
|
-
writer.uint32(42).
|
|
9571
|
+
if (message.signature.length !== 0) {
|
|
9572
|
+
writer.uint32(42).bytes(message.signature);
|
|
8751
9573
|
}
|
|
8752
|
-
if (message.
|
|
8753
|
-
writer.uint32(
|
|
9574
|
+
if (message.to !== "") {
|
|
9575
|
+
writer.uint32(50).string(message.to);
|
|
8754
9576
|
}
|
|
8755
|
-
if (message.
|
|
8756
|
-
writer.uint32(58).string(message.
|
|
9577
|
+
if (message.value !== "") {
|
|
9578
|
+
writer.uint32(58).string(message.value);
|
|
9579
|
+
}
|
|
9580
|
+
if (message.data.length !== 0) {
|
|
9581
|
+
writer.uint32(66).bytes(message.data);
|
|
9582
|
+
}
|
|
9583
|
+
if (message.gasLimit !== "0") {
|
|
9584
|
+
writer.uint32(72).uint64(message.gasLimit);
|
|
9585
|
+
}
|
|
9586
|
+
if (message.nonce !== "0") {
|
|
9587
|
+
writer.uint32(80).uint64(message.nonce);
|
|
8757
9588
|
}
|
|
8758
9589
|
return writer;
|
|
8759
9590
|
},
|
|
8760
9591
|
decode(input, length) {
|
|
8761
9592
|
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
8762
9593
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
8763
|
-
const message =
|
|
9594
|
+
const message = createBaseMsgExecuteEVM();
|
|
8764
9595
|
while (reader.pos < end) {
|
|
8765
9596
|
const tag = reader.uint32();
|
|
8766
9597
|
switch (tag >>> 3) {
|
|
@@ -8768,14 +9599,14 @@ var MsgRegisterAuthenticator = {
|
|
|
8768
9599
|
if (tag !== 10) {
|
|
8769
9600
|
break;
|
|
8770
9601
|
}
|
|
8771
|
-
message.
|
|
9602
|
+
message.relayer = reader.string();
|
|
8772
9603
|
continue;
|
|
8773
9604
|
}
|
|
8774
9605
|
case 2: {
|
|
8775
9606
|
if (tag !== 18) {
|
|
8776
9607
|
break;
|
|
8777
9608
|
}
|
|
8778
|
-
message.
|
|
9609
|
+
message.account = reader.string();
|
|
8779
9610
|
continue;
|
|
8780
9611
|
}
|
|
8781
9612
|
case 3: {
|
|
@@ -8796,21 +9627,42 @@ var MsgRegisterAuthenticator = {
|
|
|
8796
9627
|
if (tag !== 42) {
|
|
8797
9628
|
break;
|
|
8798
9629
|
}
|
|
8799
|
-
message.
|
|
9630
|
+
message.signature = reader.bytes();
|
|
8800
9631
|
continue;
|
|
8801
9632
|
}
|
|
8802
9633
|
case 6: {
|
|
8803
|
-
if (tag !==
|
|
9634
|
+
if (tag !== 50) {
|
|
8804
9635
|
break;
|
|
8805
9636
|
}
|
|
8806
|
-
message.
|
|
9637
|
+
message.to = reader.string();
|
|
8807
9638
|
continue;
|
|
8808
9639
|
}
|
|
8809
9640
|
case 7: {
|
|
8810
9641
|
if (tag !== 58) {
|
|
8811
9642
|
break;
|
|
8812
9643
|
}
|
|
8813
|
-
message.
|
|
9644
|
+
message.value = reader.string();
|
|
9645
|
+
continue;
|
|
9646
|
+
}
|
|
9647
|
+
case 8: {
|
|
9648
|
+
if (tag !== 66) {
|
|
9649
|
+
break;
|
|
9650
|
+
}
|
|
9651
|
+
message.data = reader.bytes();
|
|
9652
|
+
continue;
|
|
9653
|
+
}
|
|
9654
|
+
case 9: {
|
|
9655
|
+
if (tag !== 72) {
|
|
9656
|
+
break;
|
|
9657
|
+
}
|
|
9658
|
+
message.gasLimit = reader.uint64().toString();
|
|
9659
|
+
continue;
|
|
9660
|
+
}
|
|
9661
|
+
case 10: {
|
|
9662
|
+
if (tag !== 80) {
|
|
9663
|
+
break;
|
|
9664
|
+
}
|
|
9665
|
+
message.nonce = reader.uint64().toString();
|
|
8814
9666
|
continue;
|
|
8815
9667
|
}
|
|
8816
9668
|
}
|
|
@@ -8823,22 +9675,25 @@ var MsgRegisterAuthenticator = {
|
|
|
8823
9675
|
},
|
|
8824
9676
|
fromJSON(object) {
|
|
8825
9677
|
return {
|
|
8826
|
-
|
|
8827
|
-
|
|
9678
|
+
relayer: isSet10(object.relayer) ? globalThis.String(object.relayer) : "",
|
|
9679
|
+
account: isSet10(object.account) ? globalThis.String(object.account) : "",
|
|
8828
9680
|
scheme: isSet10(object.scheme) ? globalThis.String(object.scheme) : "",
|
|
8829
9681
|
pubkey: isSet10(object.pubkey) ? bytesFromBase646(object.pubkey) : new Uint8Array(0),
|
|
8830
|
-
|
|
8831
|
-
|
|
8832
|
-
|
|
9682
|
+
signature: isSet10(object.signature) ? bytesFromBase646(object.signature) : new Uint8Array(0),
|
|
9683
|
+
to: isSet10(object.to) ? globalThis.String(object.to) : "",
|
|
9684
|
+
value: isSet10(object.value) ? globalThis.String(object.value) : "",
|
|
9685
|
+
data: isSet10(object.data) ? bytesFromBase646(object.data) : new Uint8Array(0),
|
|
9686
|
+
gasLimit: isSet10(object.gasLimit) ? globalThis.String(object.gasLimit) : isSet10(object.gas_limit) ? globalThis.String(object.gas_limit) : "0",
|
|
9687
|
+
nonce: isSet10(object.nonce) ? globalThis.String(object.nonce) : "0"
|
|
8833
9688
|
};
|
|
8834
9689
|
},
|
|
8835
9690
|
toJSON(message) {
|
|
8836
9691
|
const obj = {};
|
|
8837
|
-
if (message.
|
|
8838
|
-
obj.
|
|
9692
|
+
if (message.relayer !== "") {
|
|
9693
|
+
obj.relayer = message.relayer;
|
|
8839
9694
|
}
|
|
8840
|
-
if (message.
|
|
8841
|
-
obj.
|
|
9695
|
+
if (message.account !== "") {
|
|
9696
|
+
obj.account = message.account;
|
|
8842
9697
|
}
|
|
8843
9698
|
if (message.scheme !== "") {
|
|
8844
9699
|
obj.scheme = message.scheme;
|
|
@@ -8846,45 +9701,99 @@ var MsgRegisterAuthenticator = {
|
|
|
8846
9701
|
if (message.pubkey.length !== 0) {
|
|
8847
9702
|
obj.pubkey = base64FromBytes6(message.pubkey);
|
|
8848
9703
|
}
|
|
8849
|
-
if (message.
|
|
8850
|
-
obj.
|
|
9704
|
+
if (message.signature.length !== 0) {
|
|
9705
|
+
obj.signature = base64FromBytes6(message.signature);
|
|
8851
9706
|
}
|
|
8852
|
-
if (message.
|
|
8853
|
-
obj.
|
|
9707
|
+
if (message.to !== "") {
|
|
9708
|
+
obj.to = message.to;
|
|
8854
9709
|
}
|
|
8855
|
-
if (message.
|
|
8856
|
-
obj.
|
|
9710
|
+
if (message.value !== "") {
|
|
9711
|
+
obj.value = message.value;
|
|
9712
|
+
}
|
|
9713
|
+
if (message.data.length !== 0) {
|
|
9714
|
+
obj.data = base64FromBytes6(message.data);
|
|
9715
|
+
}
|
|
9716
|
+
if (message.gasLimit !== "0") {
|
|
9717
|
+
obj.gasLimit = message.gasLimit;
|
|
9718
|
+
}
|
|
9719
|
+
if (message.nonce !== "0") {
|
|
9720
|
+
obj.nonce = message.nonce;
|
|
8857
9721
|
}
|
|
8858
9722
|
return obj;
|
|
8859
9723
|
},
|
|
8860
9724
|
create(base) {
|
|
8861
|
-
return
|
|
9725
|
+
return MsgExecuteEVM.fromPartial(base ?? {});
|
|
8862
9726
|
},
|
|
8863
9727
|
fromPartial(object) {
|
|
8864
|
-
const message =
|
|
8865
|
-
message.
|
|
8866
|
-
message.
|
|
9728
|
+
const message = createBaseMsgExecuteEVM();
|
|
9729
|
+
message.relayer = object.relayer ?? "";
|
|
9730
|
+
message.account = object.account ?? "";
|
|
8867
9731
|
message.scheme = object.scheme ?? "";
|
|
8868
9732
|
message.pubkey = object.pubkey ?? new Uint8Array(0);
|
|
8869
|
-
message.
|
|
8870
|
-
message.
|
|
8871
|
-
message.
|
|
9733
|
+
message.signature = object.signature ?? new Uint8Array(0);
|
|
9734
|
+
message.to = object.to ?? "";
|
|
9735
|
+
message.value = object.value ?? "";
|
|
9736
|
+
message.data = object.data ?? new Uint8Array(0);
|
|
9737
|
+
message.gasLimit = object.gasLimit ?? "0";
|
|
9738
|
+
message.nonce = object.nonce ?? "0";
|
|
8872
9739
|
return message;
|
|
8873
9740
|
}
|
|
8874
9741
|
};
|
|
8875
|
-
function
|
|
8876
|
-
return {};
|
|
9742
|
+
function createBaseMsgExecuteEVMResponse() {
|
|
9743
|
+
return { success: false, ret: new Uint8Array(0), gasUsed: "0", vmError: "" };
|
|
8877
9744
|
}
|
|
8878
|
-
var
|
|
8879
|
-
encode(
|
|
9745
|
+
var MsgExecuteEVMResponse = {
|
|
9746
|
+
encode(message, writer = new wire.BinaryWriter()) {
|
|
9747
|
+
if (message.success !== false) {
|
|
9748
|
+
writer.uint32(8).bool(message.success);
|
|
9749
|
+
}
|
|
9750
|
+
if (message.ret.length !== 0) {
|
|
9751
|
+
writer.uint32(18).bytes(message.ret);
|
|
9752
|
+
}
|
|
9753
|
+
if (message.gasUsed !== "0") {
|
|
9754
|
+
writer.uint32(24).uint64(message.gasUsed);
|
|
9755
|
+
}
|
|
9756
|
+
if (message.vmError !== "") {
|
|
9757
|
+
writer.uint32(34).string(message.vmError);
|
|
9758
|
+
}
|
|
8880
9759
|
return writer;
|
|
8881
9760
|
},
|
|
8882
9761
|
decode(input, length) {
|
|
8883
9762
|
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
8884
9763
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
8885
|
-
const message =
|
|
9764
|
+
const message = createBaseMsgExecuteEVMResponse();
|
|
8886
9765
|
while (reader.pos < end) {
|
|
8887
9766
|
const tag = reader.uint32();
|
|
9767
|
+
switch (tag >>> 3) {
|
|
9768
|
+
case 1: {
|
|
9769
|
+
if (tag !== 8) {
|
|
9770
|
+
break;
|
|
9771
|
+
}
|
|
9772
|
+
message.success = reader.bool();
|
|
9773
|
+
continue;
|
|
9774
|
+
}
|
|
9775
|
+
case 2: {
|
|
9776
|
+
if (tag !== 18) {
|
|
9777
|
+
break;
|
|
9778
|
+
}
|
|
9779
|
+
message.ret = reader.bytes();
|
|
9780
|
+
continue;
|
|
9781
|
+
}
|
|
9782
|
+
case 3: {
|
|
9783
|
+
if (tag !== 24) {
|
|
9784
|
+
break;
|
|
9785
|
+
}
|
|
9786
|
+
message.gasUsed = reader.uint64().toString();
|
|
9787
|
+
continue;
|
|
9788
|
+
}
|
|
9789
|
+
case 4: {
|
|
9790
|
+
if (tag !== 34) {
|
|
9791
|
+
break;
|
|
9792
|
+
}
|
|
9793
|
+
message.vmError = reader.string();
|
|
9794
|
+
continue;
|
|
9795
|
+
}
|
|
9796
|
+
}
|
|
8888
9797
|
if ((tag & 7) === 4 || tag === 0) {
|
|
8889
9798
|
break;
|
|
8890
9799
|
}
|
|
@@ -8892,31 +9801,61 @@ var MsgRegisterAuthenticatorResponse = {
|
|
|
8892
9801
|
}
|
|
8893
9802
|
return message;
|
|
8894
9803
|
},
|
|
8895
|
-
fromJSON(
|
|
8896
|
-
return {
|
|
9804
|
+
fromJSON(object) {
|
|
9805
|
+
return {
|
|
9806
|
+
success: isSet10(object.success) ? globalThis.Boolean(object.success) : false,
|
|
9807
|
+
ret: isSet10(object.ret) ? bytesFromBase646(object.ret) : new Uint8Array(0),
|
|
9808
|
+
gasUsed: isSet10(object.gasUsed) ? globalThis.String(object.gasUsed) : isSet10(object.gas_used) ? globalThis.String(object.gas_used) : "0",
|
|
9809
|
+
vmError: isSet10(object.vmError) ? globalThis.String(object.vmError) : isSet10(object.vm_error) ? globalThis.String(object.vm_error) : ""
|
|
9810
|
+
};
|
|
8897
9811
|
},
|
|
8898
|
-
toJSON(
|
|
9812
|
+
toJSON(message) {
|
|
8899
9813
|
const obj = {};
|
|
9814
|
+
if (message.success !== false) {
|
|
9815
|
+
obj.success = message.success;
|
|
9816
|
+
}
|
|
9817
|
+
if (message.ret.length !== 0) {
|
|
9818
|
+
obj.ret = base64FromBytes6(message.ret);
|
|
9819
|
+
}
|
|
9820
|
+
if (message.gasUsed !== "0") {
|
|
9821
|
+
obj.gasUsed = message.gasUsed;
|
|
9822
|
+
}
|
|
9823
|
+
if (message.vmError !== "") {
|
|
9824
|
+
obj.vmError = message.vmError;
|
|
9825
|
+
}
|
|
8900
9826
|
return obj;
|
|
8901
9827
|
},
|
|
8902
9828
|
create(base) {
|
|
8903
|
-
return
|
|
9829
|
+
return MsgExecuteEVMResponse.fromPartial(base ?? {});
|
|
8904
9830
|
},
|
|
8905
|
-
fromPartial(
|
|
8906
|
-
const message =
|
|
9831
|
+
fromPartial(object) {
|
|
9832
|
+
const message = createBaseMsgExecuteEVMResponse();
|
|
9833
|
+
message.success = object.success ?? false;
|
|
9834
|
+
message.ret = object.ret ?? new Uint8Array(0);
|
|
9835
|
+
message.gasUsed = object.gasUsed ?? "0";
|
|
9836
|
+
message.vmError = object.vmError ?? "";
|
|
8907
9837
|
return message;
|
|
8908
9838
|
}
|
|
8909
9839
|
};
|
|
8910
|
-
function
|
|
8911
|
-
return {
|
|
9840
|
+
function createBaseMsgExecuteCosmos() {
|
|
9841
|
+
return {
|
|
9842
|
+
relayer: "",
|
|
9843
|
+
account: "",
|
|
9844
|
+
scheme: "",
|
|
9845
|
+
pubkey: new Uint8Array(0),
|
|
9846
|
+
signature: new Uint8Array(0),
|
|
9847
|
+
to: "",
|
|
9848
|
+
amount: [],
|
|
9849
|
+
nonce: "0"
|
|
9850
|
+
};
|
|
8912
9851
|
}
|
|
8913
|
-
var
|
|
9852
|
+
var MsgExecuteCosmos = {
|
|
8914
9853
|
encode(message, writer = new wire.BinaryWriter()) {
|
|
8915
|
-
if (message.
|
|
8916
|
-
writer.uint32(10).string(message.
|
|
9854
|
+
if (message.relayer !== "") {
|
|
9855
|
+
writer.uint32(10).string(message.relayer);
|
|
8917
9856
|
}
|
|
8918
|
-
if (message.
|
|
8919
|
-
writer.uint32(18).string(message.
|
|
9857
|
+
if (message.account !== "") {
|
|
9858
|
+
writer.uint32(18).string(message.account);
|
|
8920
9859
|
}
|
|
8921
9860
|
if (message.scheme !== "") {
|
|
8922
9861
|
writer.uint32(26).string(message.scheme);
|
|
@@ -8924,12 +9863,24 @@ var MsgRevokeAuthenticator = {
|
|
|
8924
9863
|
if (message.pubkey.length !== 0) {
|
|
8925
9864
|
writer.uint32(34).bytes(message.pubkey);
|
|
8926
9865
|
}
|
|
9866
|
+
if (message.signature.length !== 0) {
|
|
9867
|
+
writer.uint32(42).bytes(message.signature);
|
|
9868
|
+
}
|
|
9869
|
+
if (message.to !== "") {
|
|
9870
|
+
writer.uint32(50).string(message.to);
|
|
9871
|
+
}
|
|
9872
|
+
for (const v of message.amount) {
|
|
9873
|
+
Coin.encode(v, writer.uint32(58).fork()).join();
|
|
9874
|
+
}
|
|
9875
|
+
if (message.nonce !== "0") {
|
|
9876
|
+
writer.uint32(64).uint64(message.nonce);
|
|
9877
|
+
}
|
|
8927
9878
|
return writer;
|
|
8928
9879
|
},
|
|
8929
9880
|
decode(input, length) {
|
|
8930
9881
|
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
8931
9882
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
8932
|
-
const message =
|
|
9883
|
+
const message = createBaseMsgExecuteCosmos();
|
|
8933
9884
|
while (reader.pos < end) {
|
|
8934
9885
|
const tag = reader.uint32();
|
|
8935
9886
|
switch (tag >>> 3) {
|
|
@@ -8937,14 +9888,14 @@ var MsgRevokeAuthenticator = {
|
|
|
8937
9888
|
if (tag !== 10) {
|
|
8938
9889
|
break;
|
|
8939
9890
|
}
|
|
8940
|
-
message.
|
|
9891
|
+
message.relayer = reader.string();
|
|
8941
9892
|
continue;
|
|
8942
9893
|
}
|
|
8943
9894
|
case 2: {
|
|
8944
9895
|
if (tag !== 18) {
|
|
8945
9896
|
break;
|
|
8946
9897
|
}
|
|
8947
|
-
message.
|
|
9898
|
+
message.account = reader.string();
|
|
8948
9899
|
continue;
|
|
8949
9900
|
}
|
|
8950
9901
|
case 3: {
|
|
@@ -8961,6 +9912,34 @@ var MsgRevokeAuthenticator = {
|
|
|
8961
9912
|
message.pubkey = reader.bytes();
|
|
8962
9913
|
continue;
|
|
8963
9914
|
}
|
|
9915
|
+
case 5: {
|
|
9916
|
+
if (tag !== 42) {
|
|
9917
|
+
break;
|
|
9918
|
+
}
|
|
9919
|
+
message.signature = reader.bytes();
|
|
9920
|
+
continue;
|
|
9921
|
+
}
|
|
9922
|
+
case 6: {
|
|
9923
|
+
if (tag !== 50) {
|
|
9924
|
+
break;
|
|
9925
|
+
}
|
|
9926
|
+
message.to = reader.string();
|
|
9927
|
+
continue;
|
|
9928
|
+
}
|
|
9929
|
+
case 7: {
|
|
9930
|
+
if (tag !== 58) {
|
|
9931
|
+
break;
|
|
9932
|
+
}
|
|
9933
|
+
message.amount.push(Coin.decode(reader, reader.uint32()));
|
|
9934
|
+
continue;
|
|
9935
|
+
}
|
|
9936
|
+
case 8: {
|
|
9937
|
+
if (tag !== 64) {
|
|
9938
|
+
break;
|
|
9939
|
+
}
|
|
9940
|
+
message.nonce = reader.uint64().toString();
|
|
9941
|
+
continue;
|
|
9942
|
+
}
|
|
8964
9943
|
}
|
|
8965
9944
|
if ((tag & 7) === 4 || tag === 0) {
|
|
8966
9945
|
break;
|
|
@@ -8971,19 +9950,23 @@ var MsgRevokeAuthenticator = {
|
|
|
8971
9950
|
},
|
|
8972
9951
|
fromJSON(object) {
|
|
8973
9952
|
return {
|
|
8974
|
-
|
|
8975
|
-
|
|
9953
|
+
relayer: isSet10(object.relayer) ? globalThis.String(object.relayer) : "",
|
|
9954
|
+
account: isSet10(object.account) ? globalThis.String(object.account) : "",
|
|
8976
9955
|
scheme: isSet10(object.scheme) ? globalThis.String(object.scheme) : "",
|
|
8977
|
-
pubkey: isSet10(object.pubkey) ? bytesFromBase646(object.pubkey) : new Uint8Array(0)
|
|
9956
|
+
pubkey: isSet10(object.pubkey) ? bytesFromBase646(object.pubkey) : new Uint8Array(0),
|
|
9957
|
+
signature: isSet10(object.signature) ? bytesFromBase646(object.signature) : new Uint8Array(0),
|
|
9958
|
+
to: isSet10(object.to) ? globalThis.String(object.to) : "",
|
|
9959
|
+
amount: globalThis.Array.isArray(object?.amount) ? object.amount.map((e) => Coin.fromJSON(e)) : [],
|
|
9960
|
+
nonce: isSet10(object.nonce) ? globalThis.String(object.nonce) : "0"
|
|
8978
9961
|
};
|
|
8979
9962
|
},
|
|
8980
9963
|
toJSON(message) {
|
|
8981
9964
|
const obj = {};
|
|
8982
|
-
if (message.
|
|
8983
|
-
obj.
|
|
9965
|
+
if (message.relayer !== "") {
|
|
9966
|
+
obj.relayer = message.relayer;
|
|
8984
9967
|
}
|
|
8985
|
-
if (message.
|
|
8986
|
-
obj.
|
|
9968
|
+
if (message.account !== "") {
|
|
9969
|
+
obj.account = message.account;
|
|
8987
9970
|
}
|
|
8988
9971
|
if (message.scheme !== "") {
|
|
8989
9972
|
obj.scheme = message.scheme;
|
|
@@ -8991,33 +9974,61 @@ var MsgRevokeAuthenticator = {
|
|
|
8991
9974
|
if (message.pubkey.length !== 0) {
|
|
8992
9975
|
obj.pubkey = base64FromBytes6(message.pubkey);
|
|
8993
9976
|
}
|
|
9977
|
+
if (message.signature.length !== 0) {
|
|
9978
|
+
obj.signature = base64FromBytes6(message.signature);
|
|
9979
|
+
}
|
|
9980
|
+
if (message.to !== "") {
|
|
9981
|
+
obj.to = message.to;
|
|
9982
|
+
}
|
|
9983
|
+
if (message.amount?.length) {
|
|
9984
|
+
obj.amount = message.amount.map((e) => Coin.toJSON(e));
|
|
9985
|
+
}
|
|
9986
|
+
if (message.nonce !== "0") {
|
|
9987
|
+
obj.nonce = message.nonce;
|
|
9988
|
+
}
|
|
8994
9989
|
return obj;
|
|
8995
9990
|
},
|
|
8996
9991
|
create(base) {
|
|
8997
|
-
return
|
|
9992
|
+
return MsgExecuteCosmos.fromPartial(base ?? {});
|
|
8998
9993
|
},
|
|
8999
9994
|
fromPartial(object) {
|
|
9000
|
-
const message =
|
|
9001
|
-
message.
|
|
9002
|
-
message.
|
|
9995
|
+
const message = createBaseMsgExecuteCosmos();
|
|
9996
|
+
message.relayer = object.relayer ?? "";
|
|
9997
|
+
message.account = object.account ?? "";
|
|
9003
9998
|
message.scheme = object.scheme ?? "";
|
|
9004
9999
|
message.pubkey = object.pubkey ?? new Uint8Array(0);
|
|
10000
|
+
message.signature = object.signature ?? new Uint8Array(0);
|
|
10001
|
+
message.to = object.to ?? "";
|
|
10002
|
+
message.amount = object.amount?.map((e) => Coin.fromPartial(e)) || [];
|
|
10003
|
+
message.nonce = object.nonce ?? "0";
|
|
9005
10004
|
return message;
|
|
9006
10005
|
}
|
|
9007
10006
|
};
|
|
9008
|
-
function
|
|
9009
|
-
return {};
|
|
10007
|
+
function createBaseMsgExecuteCosmosResponse() {
|
|
10008
|
+
return { success: false };
|
|
9010
10009
|
}
|
|
9011
|
-
var
|
|
9012
|
-
encode(
|
|
10010
|
+
var MsgExecuteCosmosResponse = {
|
|
10011
|
+
encode(message, writer = new wire.BinaryWriter()) {
|
|
10012
|
+
if (message.success !== false) {
|
|
10013
|
+
writer.uint32(8).bool(message.success);
|
|
10014
|
+
}
|
|
9013
10015
|
return writer;
|
|
9014
10016
|
},
|
|
9015
10017
|
decode(input, length) {
|
|
9016
10018
|
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
9017
10019
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
9018
|
-
const message =
|
|
10020
|
+
const message = createBaseMsgExecuteCosmosResponse();
|
|
9019
10021
|
while (reader.pos < end) {
|
|
9020
10022
|
const tag = reader.uint32();
|
|
10023
|
+
switch (tag >>> 3) {
|
|
10024
|
+
case 1: {
|
|
10025
|
+
if (tag !== 8) {
|
|
10026
|
+
break;
|
|
10027
|
+
}
|
|
10028
|
+
message.success = reader.bool();
|
|
10029
|
+
continue;
|
|
10030
|
+
}
|
|
10031
|
+
}
|
|
9021
10032
|
if ((tag & 7) === 4 || tag === 0) {
|
|
9022
10033
|
break;
|
|
9023
10034
|
}
|
|
@@ -9025,18 +10036,22 @@ var MsgRevokeAuthenticatorResponse = {
|
|
|
9025
10036
|
}
|
|
9026
10037
|
return message;
|
|
9027
10038
|
},
|
|
9028
|
-
fromJSON(
|
|
9029
|
-
return {};
|
|
10039
|
+
fromJSON(object) {
|
|
10040
|
+
return { success: isSet10(object.success) ? globalThis.Boolean(object.success) : false };
|
|
9030
10041
|
},
|
|
9031
|
-
toJSON(
|
|
10042
|
+
toJSON(message) {
|
|
9032
10043
|
const obj = {};
|
|
10044
|
+
if (message.success !== false) {
|
|
10045
|
+
obj.success = message.success;
|
|
10046
|
+
}
|
|
9033
10047
|
return obj;
|
|
9034
10048
|
},
|
|
9035
10049
|
create(base) {
|
|
9036
|
-
return
|
|
10050
|
+
return MsgExecuteCosmosResponse.fromPartial(base ?? {});
|
|
9037
10051
|
},
|
|
9038
|
-
fromPartial(
|
|
9039
|
-
const message =
|
|
10052
|
+
fromPartial(object) {
|
|
10053
|
+
const message = createBaseMsgExecuteCosmosResponse();
|
|
10054
|
+
message.success = object.success ?? false;
|
|
9040
10055
|
return message;
|
|
9041
10056
|
}
|
|
9042
10057
|
};
|
|
@@ -9075,6 +10090,22 @@ var MsgDefinition9 = {
|
|
|
9075
10090
|
responseType: MsgRevokeAuthenticatorResponse,
|
|
9076
10091
|
responseStream: false,
|
|
9077
10092
|
options: {}
|
|
10093
|
+
},
|
|
10094
|
+
executeEVM: {
|
|
10095
|
+
name: "ExecuteEVM",
|
|
10096
|
+
requestType: MsgExecuteEVM,
|
|
10097
|
+
requestStream: false,
|
|
10098
|
+
responseType: MsgExecuteEVMResponse,
|
|
10099
|
+
responseStream: false,
|
|
10100
|
+
options: {}
|
|
10101
|
+
},
|
|
10102
|
+
executeCosmos: {
|
|
10103
|
+
name: "ExecuteCosmos",
|
|
10104
|
+
requestType: MsgExecuteCosmos,
|
|
10105
|
+
requestStream: false,
|
|
10106
|
+
responseType: MsgExecuteCosmosResponse,
|
|
10107
|
+
responseStream: false,
|
|
10108
|
+
options: {}
|
|
9078
10109
|
}
|
|
9079
10110
|
}
|
|
9080
10111
|
};
|
|
@@ -9117,7 +10148,15 @@ __export(tx_exports10, {
|
|
|
9117
10148
|
});
|
|
9118
10149
|
var protobufPackage10 = "qorechain.crossvm.v1";
|
|
9119
10150
|
function createBaseMsgCrossVMCall() {
|
|
9120
|
-
return {
|
|
10151
|
+
return {
|
|
10152
|
+
sender: "",
|
|
10153
|
+
sourceVm: "",
|
|
10154
|
+
targetVm: "",
|
|
10155
|
+
targetContract: "",
|
|
10156
|
+
payload: new Uint8Array(0),
|
|
10157
|
+
funds: [],
|
|
10158
|
+
async: false
|
|
10159
|
+
};
|
|
9121
10160
|
}
|
|
9122
10161
|
var MsgCrossVMCall = {
|
|
9123
10162
|
encode(message, writer = new wire.BinaryWriter()) {
|
|
@@ -9139,6 +10178,9 @@ var MsgCrossVMCall = {
|
|
|
9139
10178
|
for (const v of message.funds) {
|
|
9140
10179
|
Coin.encode(v, writer.uint32(50).fork()).join();
|
|
9141
10180
|
}
|
|
10181
|
+
if (message.async !== false) {
|
|
10182
|
+
writer.uint32(56).bool(message.async);
|
|
10183
|
+
}
|
|
9142
10184
|
return writer;
|
|
9143
10185
|
},
|
|
9144
10186
|
decode(input, length) {
|
|
@@ -9190,6 +10232,13 @@ var MsgCrossVMCall = {
|
|
|
9190
10232
|
message.funds.push(Coin.decode(reader, reader.uint32()));
|
|
9191
10233
|
continue;
|
|
9192
10234
|
}
|
|
10235
|
+
case 7: {
|
|
10236
|
+
if (tag !== 56) {
|
|
10237
|
+
break;
|
|
10238
|
+
}
|
|
10239
|
+
message.async = reader.bool();
|
|
10240
|
+
continue;
|
|
10241
|
+
}
|
|
9193
10242
|
}
|
|
9194
10243
|
if ((tag & 7) === 4 || tag === 0) {
|
|
9195
10244
|
break;
|
|
@@ -9205,7 +10254,8 @@ var MsgCrossVMCall = {
|
|
|
9205
10254
|
targetVm: isSet11(object.targetVm) ? globalThis.String(object.targetVm) : isSet11(object.target_vm) ? globalThis.String(object.target_vm) : "",
|
|
9206
10255
|
targetContract: isSet11(object.targetContract) ? globalThis.String(object.targetContract) : isSet11(object.target_contract) ? globalThis.String(object.target_contract) : "",
|
|
9207
10256
|
payload: isSet11(object.payload) ? bytesFromBase647(object.payload) : new Uint8Array(0),
|
|
9208
|
-
funds: globalThis.Array.isArray(object?.funds) ? object.funds.map((e) => Coin.fromJSON(e)) : []
|
|
10257
|
+
funds: globalThis.Array.isArray(object?.funds) ? object.funds.map((e) => Coin.fromJSON(e)) : [],
|
|
10258
|
+
async: isSet11(object.async) ? globalThis.Boolean(object.async) : false
|
|
9209
10259
|
};
|
|
9210
10260
|
},
|
|
9211
10261
|
toJSON(message) {
|
|
@@ -9228,6 +10278,9 @@ var MsgCrossVMCall = {
|
|
|
9228
10278
|
if (message.funds?.length) {
|
|
9229
10279
|
obj.funds = message.funds.map((e) => Coin.toJSON(e));
|
|
9230
10280
|
}
|
|
10281
|
+
if (message.async !== false) {
|
|
10282
|
+
obj.async = message.async;
|
|
10283
|
+
}
|
|
9231
10284
|
return obj;
|
|
9232
10285
|
},
|
|
9233
10286
|
create(base) {
|
|
@@ -9241,17 +10294,27 @@ var MsgCrossVMCall = {
|
|
|
9241
10294
|
message.targetContract = object.targetContract ?? "";
|
|
9242
10295
|
message.payload = object.payload ?? new Uint8Array(0);
|
|
9243
10296
|
message.funds = object.funds?.map((e) => Coin.fromPartial(e)) || [];
|
|
10297
|
+
message.async = object.async ?? false;
|
|
9244
10298
|
return message;
|
|
9245
10299
|
}
|
|
9246
10300
|
};
|
|
9247
10301
|
function createBaseMsgCrossVMCallResponse() {
|
|
9248
|
-
return { messageId: "" };
|
|
10302
|
+
return { messageId: "", executed: false, data: new Uint8Array(0), gasUsed: "0" };
|
|
9249
10303
|
}
|
|
9250
10304
|
var MsgCrossVMCallResponse = {
|
|
9251
10305
|
encode(message, writer = new wire.BinaryWriter()) {
|
|
9252
10306
|
if (message.messageId !== "") {
|
|
9253
10307
|
writer.uint32(10).string(message.messageId);
|
|
9254
10308
|
}
|
|
10309
|
+
if (message.executed !== false) {
|
|
10310
|
+
writer.uint32(16).bool(message.executed);
|
|
10311
|
+
}
|
|
10312
|
+
if (message.data.length !== 0) {
|
|
10313
|
+
writer.uint32(26).bytes(message.data);
|
|
10314
|
+
}
|
|
10315
|
+
if (message.gasUsed !== "0") {
|
|
10316
|
+
writer.uint32(32).uint64(message.gasUsed);
|
|
10317
|
+
}
|
|
9255
10318
|
return writer;
|
|
9256
10319
|
},
|
|
9257
10320
|
decode(input, length) {
|
|
@@ -9268,6 +10331,27 @@ var MsgCrossVMCallResponse = {
|
|
|
9268
10331
|
message.messageId = reader.string();
|
|
9269
10332
|
continue;
|
|
9270
10333
|
}
|
|
10334
|
+
case 2: {
|
|
10335
|
+
if (tag !== 16) {
|
|
10336
|
+
break;
|
|
10337
|
+
}
|
|
10338
|
+
message.executed = reader.bool();
|
|
10339
|
+
continue;
|
|
10340
|
+
}
|
|
10341
|
+
case 3: {
|
|
10342
|
+
if (tag !== 26) {
|
|
10343
|
+
break;
|
|
10344
|
+
}
|
|
10345
|
+
message.data = reader.bytes();
|
|
10346
|
+
continue;
|
|
10347
|
+
}
|
|
10348
|
+
case 4: {
|
|
10349
|
+
if (tag !== 32) {
|
|
10350
|
+
break;
|
|
10351
|
+
}
|
|
10352
|
+
message.gasUsed = reader.uint64().toString();
|
|
10353
|
+
continue;
|
|
10354
|
+
}
|
|
9271
10355
|
}
|
|
9272
10356
|
if ((tag & 7) === 4 || tag === 0) {
|
|
9273
10357
|
break;
|
|
@@ -9278,7 +10362,10 @@ var MsgCrossVMCallResponse = {
|
|
|
9278
10362
|
},
|
|
9279
10363
|
fromJSON(object) {
|
|
9280
10364
|
return {
|
|
9281
|
-
messageId: isSet11(object.messageId) ? globalThis.String(object.messageId) : isSet11(object.message_id) ? globalThis.String(object.message_id) : ""
|
|
10365
|
+
messageId: isSet11(object.messageId) ? globalThis.String(object.messageId) : isSet11(object.message_id) ? globalThis.String(object.message_id) : "",
|
|
10366
|
+
executed: isSet11(object.executed) ? globalThis.Boolean(object.executed) : false,
|
|
10367
|
+
data: isSet11(object.data) ? bytesFromBase647(object.data) : new Uint8Array(0),
|
|
10368
|
+
gasUsed: isSet11(object.gasUsed) ? globalThis.String(object.gasUsed) : isSet11(object.gas_used) ? globalThis.String(object.gas_used) : "0"
|
|
9282
10369
|
};
|
|
9283
10370
|
},
|
|
9284
10371
|
toJSON(message) {
|
|
@@ -9286,6 +10373,15 @@ var MsgCrossVMCallResponse = {
|
|
|
9286
10373
|
if (message.messageId !== "") {
|
|
9287
10374
|
obj.messageId = message.messageId;
|
|
9288
10375
|
}
|
|
10376
|
+
if (message.executed !== false) {
|
|
10377
|
+
obj.executed = message.executed;
|
|
10378
|
+
}
|
|
10379
|
+
if (message.data.length !== 0) {
|
|
10380
|
+
obj.data = base64FromBytes7(message.data);
|
|
10381
|
+
}
|
|
10382
|
+
if (message.gasUsed !== "0") {
|
|
10383
|
+
obj.gasUsed = message.gasUsed;
|
|
10384
|
+
}
|
|
9289
10385
|
return obj;
|
|
9290
10386
|
},
|
|
9291
10387
|
create(base) {
|
|
@@ -9294,6 +10390,9 @@ var MsgCrossVMCallResponse = {
|
|
|
9294
10390
|
fromPartial(object) {
|
|
9295
10391
|
const message = createBaseMsgCrossVMCallResponse();
|
|
9296
10392
|
message.messageId = object.messageId ?? "";
|
|
10393
|
+
message.executed = object.executed ?? false;
|
|
10394
|
+
message.data = object.data ?? new Uint8Array(0);
|
|
10395
|
+
message.gasUsed = object.gasUsed ?? "0";
|
|
9297
10396
|
return message;
|
|
9298
10397
|
}
|
|
9299
10398
|
};
|
|
@@ -9387,7 +10486,11 @@ var MsgDefinition10 = {
|
|
|
9387
10486
|
name: "Msg",
|
|
9388
10487
|
fullName: "qorechain.crossvm.v1.Msg",
|
|
9389
10488
|
methods: {
|
|
9390
|
-
/**
|
|
10489
|
+
/**
|
|
10490
|
+
* CrossVMCall invokes a contract on another VM. It executes within the
|
|
10491
|
+
* transaction and returns the callee's answer, unless async is set, in which
|
|
10492
|
+
* case it is queued for ProcessQueue to dispatch later.
|
|
10493
|
+
*/
|
|
9391
10494
|
crossVMCall: {
|
|
9392
10495
|
name: "CrossVMCall",
|
|
9393
10496
|
requestType: MsgCrossVMCall,
|
|
@@ -10003,6 +11106,7 @@ var qorechainRegistryTypes = [
|
|
|
10003
11106
|
["/qorechain.pqc.v1.MsgRegisterPQCKey", MsgRegisterPQCKey],
|
|
10004
11107
|
["/qorechain.pqc.v1.MsgRegisterPQCKeyV2", MsgRegisterPQCKeyV2],
|
|
10005
11108
|
["/qorechain.pqc.v1.MsgMigratePQCKey", MsgMigratePQCKey],
|
|
11109
|
+
["/qorechain.pqc.v1.MsgRotatePQCKey", MsgRotatePQCKey],
|
|
10006
11110
|
["/qorechain.pqc.v1.MsgDeprecateAlgorithm", MsgDeprecateAlgorithm],
|
|
10007
11111
|
["/qorechain.pqc.v1.MsgDisableAlgorithm", MsgDisableAlgorithm],
|
|
10008
11112
|
// svm
|
|
@@ -10010,6 +11114,7 @@ var qorechainRegistryTypes = [
|
|
|
10010
11114
|
["/qorechain.svm.v1.MsgCreateAccount", MsgCreateAccount],
|
|
10011
11115
|
["/qorechain.svm.v1.MsgExecuteProgram", MsgExecuteProgram],
|
|
10012
11116
|
["/qorechain.svm.v1.MsgRegisterSVMPQCKey", MsgRegisterSVMPQCKey],
|
|
11117
|
+
["/qorechain.svm.v1.MsgUpdateParams", MsgUpdateParams],
|
|
10013
11118
|
// lightnode
|
|
10014
11119
|
["/qorechain.lightnode.v1.MsgRegisterLightNode", MsgRegisterLightNode],
|
|
10015
11120
|
["/qorechain.lightnode.v1.MsgHeartbeat", MsgHeartbeat],
|
|
@@ -10043,6 +11148,11 @@ var qorechainRegistryTypes = [
|
|
|
10043
11148
|
"/qorechain.abstractaccount.v1.MsgRevokeAuthenticator",
|
|
10044
11149
|
MsgRevokeAuthenticator
|
|
10045
11150
|
],
|
|
11151
|
+
["/qorechain.abstractaccount.v1.MsgExecuteEVM", MsgExecuteEVM],
|
|
11152
|
+
[
|
|
11153
|
+
"/qorechain.abstractaccount.v1.MsgExecuteCosmos",
|
|
11154
|
+
MsgExecuteCosmos
|
|
11155
|
+
],
|
|
10046
11156
|
// crossvm
|
|
10047
11157
|
["/qorechain.crossvm.v1.MsgCrossVMCall", MsgCrossVMCall],
|
|
10048
11158
|
["/qorechain.crossvm.v1.MsgProcessQueue", MsgProcessQueue],
|
|
@@ -10091,6 +11201,34 @@ var SDK_CODES = {
|
|
|
10091
11201
|
25: { kind: "invalid_gas_limit", message: "invalid gas limit" },
|
|
10092
11202
|
30: { kind: "tx_timeout_height", message: "transaction timeout height exceeded" }
|
|
10093
11203
|
};
|
|
11204
|
+
var ABSTRACTACCOUNT_CODES = {
|
|
11205
|
+
5: {
|
|
11206
|
+
kind: "spending_limit_exceeded",
|
|
11207
|
+
message: "spending limit exceeded \u2014 the amount is over the authenticator's per-tx or daily SpendingRule"
|
|
11208
|
+
},
|
|
11209
|
+
6: {
|
|
11210
|
+
kind: "session_key_expired",
|
|
11211
|
+
message: "session key expired \u2014 the authenticator's expiry_unix has passed; re-register the key"
|
|
11212
|
+
},
|
|
11213
|
+
10: {
|
|
11214
|
+
kind: "permission_denied",
|
|
11215
|
+
message: "permission denied \u2014 the authenticator lacks the permission this message requires (check the permission_schema)"
|
|
11216
|
+
},
|
|
11217
|
+
11: {
|
|
11218
|
+
kind: "authenticator_replay",
|
|
11219
|
+
message: "authenticator replay \u2014 the nonce does not match the account's expected value; refetch the current nonce/sequence and re-sign"
|
|
11220
|
+
}
|
|
11221
|
+
};
|
|
11222
|
+
var PQC_CODES = {
|
|
11223
|
+
21: {
|
|
11224
|
+
kind: "hybrid_verify_failed",
|
|
11225
|
+
message: "hybrid signature verification failed \u2014 the ML-DSA-87 signature did not verify (ensure deterministic signing; hedged signatures are rejected)"
|
|
11226
|
+
}
|
|
11227
|
+
};
|
|
11228
|
+
var MODULE_CODES = {
|
|
11229
|
+
abstractaccount: ABSTRACTACCOUNT_CODES,
|
|
11230
|
+
pqc: PQC_CODES
|
|
11231
|
+
};
|
|
10094
11232
|
var DEFAULT_CODESPACE = "sdk";
|
|
10095
11233
|
function decodeTxError(input) {
|
|
10096
11234
|
const codespace = input.codespace || DEFAULT_CODESPACE;
|
|
@@ -10106,6 +11244,17 @@ function decodeTxError(input) {
|
|
|
10106
11244
|
rawLog
|
|
10107
11245
|
};
|
|
10108
11246
|
}
|
|
11247
|
+
} else {
|
|
11248
|
+
const known = MODULE_CODES[codespace]?.[input.code];
|
|
11249
|
+
if (known) {
|
|
11250
|
+
return {
|
|
11251
|
+
code: input.code,
|
|
11252
|
+
codespace,
|
|
11253
|
+
kind: known.kind,
|
|
11254
|
+
message: rawLog ? `${known.message} (${rawLog})` : known.message,
|
|
11255
|
+
rawLog
|
|
11256
|
+
};
|
|
11257
|
+
}
|
|
10109
11258
|
}
|
|
10110
11259
|
const detail = rawLog && rawLog.length > 0 ? rawLog : "(no log provided)";
|
|
10111
11260
|
return {
|
|
@@ -10313,7 +11462,12 @@ var TxClient = class _TxClient {
|
|
|
10313
11462
|
height: res.height,
|
|
10314
11463
|
gasUsed: res.gasUsed,
|
|
10315
11464
|
gasWanted: res.gasWanted,
|
|
10316
|
-
rawLog: res.rawLog
|
|
11465
|
+
rawLog: res.rawLog,
|
|
11466
|
+
// Carried through so callers can read typed attributes / decode the
|
|
11467
|
+
// per-message responses (e.g. MsgCrossVMCallResponse) without a
|
|
11468
|
+
// second round-trip.
|
|
11469
|
+
events: res.events,
|
|
11470
|
+
msgResponses: res.msgResponses
|
|
10317
11471
|
};
|
|
10318
11472
|
}
|
|
10319
11473
|
const hash = await this.client.signAndBroadcastSync(
|
|
@@ -10941,9 +12095,16 @@ function generatePqcKeypair(seed) {
|
|
|
10941
12095
|
return { publicKey: kp.publicKey, secretKey: kp.secretKey };
|
|
10942
12096
|
}
|
|
10943
12097
|
function pqcSign(secretKey, message, opts) {
|
|
12098
|
+
if (secretKey.length !== ML_DSA_87_SECRET_KEY_LENGTH) {
|
|
12099
|
+
throw new Error(
|
|
12100
|
+
`ML-DSA-87 secret key must be ${ML_DSA_87_SECRET_KEY_LENGTH} bytes, got ${secretKey.length}`
|
|
12101
|
+
);
|
|
12102
|
+
}
|
|
10944
12103
|
return pqc$1.mldsa87.sign(secretKey, message, opts);
|
|
10945
12104
|
}
|
|
10946
12105
|
function pqcVerify(publicKey, message, signature) {
|
|
12106
|
+
if (publicKey.length !== ML_DSA_87_PUBLIC_KEY_LENGTH) return false;
|
|
12107
|
+
if (signature.length !== ML_DSA_87_SIGNATURE_LENGTH) return false;
|
|
10947
12108
|
return pqc$1.mldsa87.verify(publicKey, message, signature);
|
|
10948
12109
|
}
|
|
10949
12110
|
function buildHybridSignatureExtension(args) {
|
|
@@ -11154,37 +12315,17 @@ function unifiedAccountFromSeed(seed32) {
|
|
|
11154
12315
|
pqc: pqc2
|
|
11155
12316
|
};
|
|
11156
12317
|
}
|
|
11157
|
-
|
|
11158
|
-
|
|
11159
|
-
|
|
11160
|
-
|
|
11161
|
-
|
|
11162
|
-
|
|
11163
|
-
if (!pk) throw new Error("Phantom provider exposed no public key");
|
|
11164
|
-
if (pk instanceof Uint8Array) return pk;
|
|
11165
|
-
return pk.toBytes();
|
|
11166
|
-
}
|
|
11167
|
-
function signatureBytes(res) {
|
|
11168
|
-
return res instanceof Uint8Array ? res : res.signature;
|
|
12318
|
+
|
|
12319
|
+
// src/accounts/phantom.ts
|
|
12320
|
+
function unifiedAccountFromPhantomSignature(signatureBytes) {
|
|
12321
|
+
throw new Error(
|
|
12322
|
+
"unifiedAccountFromPhantomSignature was removed in v0.8.0: deriving a spend key from a wallet signature is unsafe \u2014 the signature is a bearer secret that any page can request from the wallet, so whoever obtains it controls the account. Use the authenticator lanes instead: register the external key with MsgRegisterAuthenticator and spend via MsgExecuteCosmos / MsgExecuteEVM (see the Authenticators guide). Any account previously derived this way must be treated as exposed \u2014 move its funds."
|
|
12323
|
+
);
|
|
11169
12324
|
}
|
|
11170
12325
|
async function connectPhantomUnified(opts = {}) {
|
|
11171
|
-
|
|
11172
|
-
|
|
11173
|
-
throw new Error(
|
|
11174
|
-
"no Phantom provider found (window.solana); pass opts.provider"
|
|
11175
|
-
);
|
|
11176
|
-
}
|
|
11177
|
-
const conn = await provider.connect();
|
|
11178
|
-
const pk = pubkeyBytes(
|
|
11179
|
-
provider.publicKey ?? conn.publicKey
|
|
11180
|
-
);
|
|
11181
|
-
const message = `${PHANTOM_DERIVATION_DOMAIN}
|
|
11182
|
-
${base.base58.encode(pk)}`;
|
|
11183
|
-
const signed = await provider.signMessage(
|
|
11184
|
-
new TextEncoder().encode(message),
|
|
11185
|
-
"utf8"
|
|
12326
|
+
throw new Error(
|
|
12327
|
+
"connectPhantomUnified was removed in v0.8.0: deriving a spend key from a wallet signature is unsafe \u2014 the signature is a bearer secret that any page can request from the wallet, so whoever obtains it controls the account. Use the authenticator lanes instead: register the external key with MsgRegisterAuthenticator and spend via MsgExecuteCosmos / MsgExecuteEVM (see the Authenticators guide). Any account previously derived this way must be treated as exposed \u2014 move its funds."
|
|
11186
12328
|
);
|
|
11187
|
-
return unifiedAccountFromPhantomSignature(signatureBytes(signed));
|
|
11188
12329
|
}
|
|
11189
12330
|
async function directSignerFromPrivateKey(privateKey, prefix) {
|
|
11190
12331
|
if (privateKey.length !== 32) {
|
|
@@ -11341,6 +12482,82 @@ async function withRetry2(fn, opts = {}) {
|
|
|
11341
12482
|
throw lastError;
|
|
11342
12483
|
}
|
|
11343
12484
|
|
|
12485
|
+
// src/tx/authenticator.ts
|
|
12486
|
+
var enc = new TextEncoder();
|
|
12487
|
+
var EVM_AUTH_DOMAIN = "qorechain-evm-auth-v1";
|
|
12488
|
+
var COSMOS_AUTH_DOMAIN = "qorechain-cosmos-auth-v1";
|
|
12489
|
+
var ROTATE_DOMAIN = "qorechain-pqc-rotate-v1";
|
|
12490
|
+
function be64(n) {
|
|
12491
|
+
const b = new Uint8Array(8);
|
|
12492
|
+
let v = BigInt(n);
|
|
12493
|
+
if (v < 0n) throw new Error(`be64: value must be non-negative, got ${n}`);
|
|
12494
|
+
for (let i = 7; i >= 0; i--) {
|
|
12495
|
+
b[i] = Number(v & 0xffn);
|
|
12496
|
+
v >>= 8n;
|
|
12497
|
+
}
|
|
12498
|
+
return b;
|
|
12499
|
+
}
|
|
12500
|
+
function concat(parts) {
|
|
12501
|
+
let len = 0;
|
|
12502
|
+
for (const p of parts) len += p.length;
|
|
12503
|
+
const out = new Uint8Array(len);
|
|
12504
|
+
let o = 0;
|
|
12505
|
+
for (const p of parts) {
|
|
12506
|
+
out.set(p, o);
|
|
12507
|
+
o += p.length;
|
|
12508
|
+
}
|
|
12509
|
+
return out;
|
|
12510
|
+
}
|
|
12511
|
+
function lengthPrefixed(bytes) {
|
|
12512
|
+
return concat([be64(bytes.length), bytes]);
|
|
12513
|
+
}
|
|
12514
|
+
function toBytes2(x) {
|
|
12515
|
+
return typeof x === "string" ? enc.encode(x) : x;
|
|
12516
|
+
}
|
|
12517
|
+
function toHexLower(bytes) {
|
|
12518
|
+
let s = "";
|
|
12519
|
+
for (const b of bytes) s += b.toString(16).padStart(2, "0");
|
|
12520
|
+
return s;
|
|
12521
|
+
}
|
|
12522
|
+
function evmAuthSignBytes(input) {
|
|
12523
|
+
const {
|
|
12524
|
+
chainId,
|
|
12525
|
+
account,
|
|
12526
|
+
pubkey,
|
|
12527
|
+
to = "",
|
|
12528
|
+
value = "0",
|
|
12529
|
+
data = new Uint8Array(0),
|
|
12530
|
+
nonce
|
|
12531
|
+
} = input;
|
|
12532
|
+
const body = concat([
|
|
12533
|
+
enc.encode(EVM_AUTH_DOMAIN),
|
|
12534
|
+
lengthPrefixed(toBytes2(chainId)),
|
|
12535
|
+
lengthPrefixed(toBytes2(account)),
|
|
12536
|
+
lengthPrefixed(pubkey),
|
|
12537
|
+
lengthPrefixed(toBytes2(to)),
|
|
12538
|
+
lengthPrefixed(toBytes2(value)),
|
|
12539
|
+
lengthPrefixed(data),
|
|
12540
|
+
be64(nonce)
|
|
12541
|
+
]);
|
|
12542
|
+
return sha256(body);
|
|
12543
|
+
}
|
|
12544
|
+
function cosmosAuthSignBytes(input) {
|
|
12545
|
+
const { chainId, account, pubkey, to, amount, nonce } = input;
|
|
12546
|
+
const body = concat([
|
|
12547
|
+
enc.encode(COSMOS_AUTH_DOMAIN),
|
|
12548
|
+
lengthPrefixed(toBytes2(chainId)),
|
|
12549
|
+
lengthPrefixed(toBytes2(account)),
|
|
12550
|
+
lengthPrefixed(pubkey),
|
|
12551
|
+
lengthPrefixed(toBytes2(to)),
|
|
12552
|
+
lengthPrefixed(toBytes2(amount)),
|
|
12553
|
+
be64(nonce)
|
|
12554
|
+
]);
|
|
12555
|
+
return sha256(body);
|
|
12556
|
+
}
|
|
12557
|
+
function rotationSignBytes(chainId, algorithmId, account, oldPub, newPub) {
|
|
12558
|
+
return `${ROTATE_DOMAIN}|${chainId}|${algorithmId}|${account}|${toHexLower(oldPub)}|${toHexLower(newPub)}`;
|
|
12559
|
+
}
|
|
12560
|
+
|
|
11344
12561
|
// src/codegen/qorechain/pqc/v1/hybrid.ts
|
|
11345
12562
|
var hybrid_exports = {};
|
|
11346
12563
|
__export(hybrid_exports, {
|
|
@@ -11486,21 +12703,28 @@ function attachHybridExtension(body, ext, opts = {}) {
|
|
|
11486
12703
|
}
|
|
11487
12704
|
return next;
|
|
11488
12705
|
}
|
|
12706
|
+
|
|
12707
|
+
// src/tx/signbytes.ts
|
|
12708
|
+
var SIGN_BYTES_V2_UPGRADE = "v3.1.98";
|
|
12709
|
+
var LEGACY_SIGN_BYTES_CHAINS = [
|
|
12710
|
+
"qorechain-vladi",
|
|
12711
|
+
"qorechain-diana"
|
|
12712
|
+
];
|
|
12713
|
+
var HYBRID_SIGN_BYTES_V2_DOMAIN = "qorechain-pqc-hybrid-v2";
|
|
12714
|
+
var MIGRATION_SIGN_BYTES_V2_DOMAIN = "qorechain-key-migration-v2";
|
|
12715
|
+
var BRIDGE_ATTESTATION_V2_DOMAIN = "qorechain-bridge-attestation-v2";
|
|
12716
|
+
var utf8 = new TextEncoder();
|
|
11489
12717
|
function be32(n) {
|
|
11490
12718
|
const b = new Uint8Array(4);
|
|
11491
|
-
b
|
|
11492
|
-
b[1] = n >>> 16 & 255;
|
|
11493
|
-
b[2] = n >>> 8 & 255;
|
|
11494
|
-
b[3] = n & 255;
|
|
12719
|
+
new DataView(b.buffer).setUint32(0, n >>> 0, false);
|
|
11495
12720
|
return b;
|
|
11496
12721
|
}
|
|
11497
|
-
function
|
|
11498
|
-
const
|
|
11499
|
-
|
|
11500
|
-
|
|
11501
|
-
return out;
|
|
12722
|
+
function be642(n) {
|
|
12723
|
+
const b = new Uint8Array(8);
|
|
12724
|
+
new DataView(b.buffer).setBigUint64(0, BigInt(n), false);
|
|
12725
|
+
return b;
|
|
11502
12726
|
}
|
|
11503
|
-
function
|
|
12727
|
+
function concat2(parts) {
|
|
11504
12728
|
let total = 0;
|
|
11505
12729
|
for (const p of parts) total += p.length;
|
|
11506
12730
|
const out = new Uint8Array(total);
|
|
@@ -11511,6 +12735,154 @@ function concatBytes(...parts) {
|
|
|
11511
12735
|
}
|
|
11512
12736
|
return out;
|
|
11513
12737
|
}
|
|
12738
|
+
function assertVersion(version) {
|
|
12739
|
+
if (version !== "v1" && version !== "v2") {
|
|
12740
|
+
throw new Error(`sign-bytes version must be "v1" or "v2", got ${JSON.stringify(version)}`);
|
|
12741
|
+
}
|
|
12742
|
+
}
|
|
12743
|
+
function hybridSignBytesV1(b0, authInfo) {
|
|
12744
|
+
return concat2([be32(b0.length), b0, be32(authInfo.length), authInfo]);
|
|
12745
|
+
}
|
|
12746
|
+
function hybridSignBytesV2(chainId, b0, authInfo) {
|
|
12747
|
+
const cid = utf8.encode(chainId);
|
|
12748
|
+
return concat2([
|
|
12749
|
+
utf8.encode(HYBRID_SIGN_BYTES_V2_DOMAIN),
|
|
12750
|
+
be642(cid.length),
|
|
12751
|
+
cid,
|
|
12752
|
+
be32(b0.length),
|
|
12753
|
+
b0,
|
|
12754
|
+
be32(authInfo.length),
|
|
12755
|
+
authInfo
|
|
12756
|
+
]);
|
|
12757
|
+
}
|
|
12758
|
+
function hybridSignBytes(version, chainId, b0, authInfo) {
|
|
12759
|
+
assertVersion(version);
|
|
12760
|
+
return version === "v2" ? hybridSignBytesV2(chainId, b0, authInfo) : hybridSignBytesV1(b0, authInfo);
|
|
12761
|
+
}
|
|
12762
|
+
function migrationSignBytesV1(input) {
|
|
12763
|
+
return utf8.encode(
|
|
12764
|
+
`qorechain-key-migration:chain=${input.chainId}:from=${input.fromAlgorithmId}:to=${input.toAlgorithmId}:account=${input.account}:height=${BigInt(input.height)}`
|
|
12765
|
+
);
|
|
12766
|
+
}
|
|
12767
|
+
function migrationSignBytesV2(input) {
|
|
12768
|
+
const cid = utf8.encode(input.chainId);
|
|
12769
|
+
const acct = utf8.encode(input.account);
|
|
12770
|
+
return concat2([
|
|
12771
|
+
utf8.encode(MIGRATION_SIGN_BYTES_V2_DOMAIN),
|
|
12772
|
+
be642(cid.length),
|
|
12773
|
+
cid,
|
|
12774
|
+
be642(acct.length),
|
|
12775
|
+
acct,
|
|
12776
|
+
be32(input.fromAlgorithmId),
|
|
12777
|
+
be32(input.toAlgorithmId),
|
|
12778
|
+
be642(input.height),
|
|
12779
|
+
be32(input.oldPublicKey.length),
|
|
12780
|
+
input.oldPublicKey,
|
|
12781
|
+
be32(input.newPublicKey.length),
|
|
12782
|
+
input.newPublicKey
|
|
12783
|
+
]);
|
|
12784
|
+
}
|
|
12785
|
+
function migrationSignBytes(version, input) {
|
|
12786
|
+
assertVersion(version);
|
|
12787
|
+
return version === "v2" ? migrationSignBytesV2(input) : migrationSignBytesV1(input);
|
|
12788
|
+
}
|
|
12789
|
+
function bridgeAttestationSignBytesV1(input) {
|
|
12790
|
+
return utf8.encode(
|
|
12791
|
+
[input.chain, input.eventType, input.operationId, input.txHash, input.amount, input.asset].join("|")
|
|
12792
|
+
);
|
|
12793
|
+
}
|
|
12794
|
+
function bridgeAttestationSignBytesV2(input) {
|
|
12795
|
+
const parts = [utf8.encode(BRIDGE_ATTESTATION_V2_DOMAIN)];
|
|
12796
|
+
for (const f of [
|
|
12797
|
+
input.chainId,
|
|
12798
|
+
input.chain,
|
|
12799
|
+
input.eventType,
|
|
12800
|
+
input.operationId,
|
|
12801
|
+
input.txHash,
|
|
12802
|
+
input.amount,
|
|
12803
|
+
input.asset
|
|
12804
|
+
]) {
|
|
12805
|
+
const b = utf8.encode(f);
|
|
12806
|
+
parts.push(be642(b.length), b);
|
|
12807
|
+
}
|
|
12808
|
+
return concat2(parts);
|
|
12809
|
+
}
|
|
12810
|
+
function bridgeAttestationSignBytes(version, input) {
|
|
12811
|
+
assertVersion(version);
|
|
12812
|
+
return version === "v2" ? bridgeAttestationSignBytesV2(input) : bridgeAttestationSignBytesV1(input);
|
|
12813
|
+
}
|
|
12814
|
+
function isLegacySignBytesChain(chainId) {
|
|
12815
|
+
return LEGACY_SIGN_BYTES_CHAINS.includes(chainId);
|
|
12816
|
+
}
|
|
12817
|
+
function signBytesVersionFor(chainId, v2AppliedHeight) {
|
|
12818
|
+
return BigInt(v2AppliedHeight) > 0n || !isLegacySignBytesChain(chainId) ? "v2" : "v1";
|
|
12819
|
+
}
|
|
12820
|
+
function parseAppliedHeight(body) {
|
|
12821
|
+
const h = body?.height;
|
|
12822
|
+
if (h === void 0 || h === null || h === "") return 0n;
|
|
12823
|
+
if (typeof h !== "string" && typeof h !== "number" && typeof h !== "bigint") {
|
|
12824
|
+
throw new Error(`unexpected applied_plan height ${JSON.stringify(h)}`);
|
|
12825
|
+
}
|
|
12826
|
+
return BigInt(h);
|
|
12827
|
+
}
|
|
12828
|
+
async function fetchSignBytesV2AppliedHeight(rest, fetchImpl = globalThis.fetch) {
|
|
12829
|
+
const url = `${rest.replace(/\/+$/, "")}/cosmos/upgrade/v1beta1/applied_plan/${SIGN_BYTES_V2_UPGRADE}`;
|
|
12830
|
+
const res = await fetchImpl(url);
|
|
12831
|
+
if (!res.ok) {
|
|
12832
|
+
throw new Error(`applied_plan query failed: HTTP ${res.status} from ${url}`);
|
|
12833
|
+
}
|
|
12834
|
+
return parseAppliedHeight(await res.json());
|
|
12835
|
+
}
|
|
12836
|
+
var cache = /* @__PURE__ */ new Map();
|
|
12837
|
+
function clearSignBytesCache() {
|
|
12838
|
+
cache.clear();
|
|
12839
|
+
}
|
|
12840
|
+
async function resolveSignBytesVersion(opts) {
|
|
12841
|
+
const requested = opts.signBytesVersion ?? "auto";
|
|
12842
|
+
if (requested === "v1" || requested === "v2") return requested;
|
|
12843
|
+
if (requested !== "auto") {
|
|
12844
|
+
throw new Error(`signBytesVersion must be "auto", "v1" or "v2", got ${JSON.stringify(requested)}`);
|
|
12845
|
+
}
|
|
12846
|
+
if (!isLegacySignBytesChain(opts.chainId)) return "v2";
|
|
12847
|
+
if (!opts.rest) {
|
|
12848
|
+
throw new Error(
|
|
12849
|
+
`cannot choose the hybrid sign-bytes form for ${opts.chainId} without its REST endpoint: pass rest, or signBytesVersion "v1" (before the ${SIGN_BYTES_V2_UPGRADE} upgrade) or "v2" (after)`
|
|
12850
|
+
);
|
|
12851
|
+
}
|
|
12852
|
+
const key = `${opts.rest}\0${opts.chainId}`;
|
|
12853
|
+
const ttl = opts.ttlMs ?? 6e4;
|
|
12854
|
+
const hit = cache.get(key);
|
|
12855
|
+
if (!opts.forceRefresh && hit && Date.now() - hit.at < ttl) return hit.version;
|
|
12856
|
+
let height;
|
|
12857
|
+
try {
|
|
12858
|
+
height = await fetchSignBytesV2AppliedHeight(opts.rest, opts.fetch);
|
|
12859
|
+
} catch (e) {
|
|
12860
|
+
throw new Error(
|
|
12861
|
+
`cannot ask ${opts.rest} whether ${SIGN_BYTES_V2_UPGRADE} is applied (${e.message}); pass signBytesVersion "v1" or "v2"`
|
|
12862
|
+
);
|
|
12863
|
+
}
|
|
12864
|
+
const version = signBytesVersionFor(opts.chainId, height);
|
|
12865
|
+
cache.set(key, { version, at: Date.now() });
|
|
12866
|
+
return version;
|
|
12867
|
+
}
|
|
12868
|
+
var HYBRID_SIGN_BYTES_REJECTION_LOG = "hybrid PQC signature verification failed";
|
|
12869
|
+
function isHybridSignBytesRejection(x) {
|
|
12870
|
+
if (x === null || x === void 0) return false;
|
|
12871
|
+
const o = x;
|
|
12872
|
+
if (o.codespace === "pqc" && Number(o.code) === 21) return true;
|
|
12873
|
+
for (const t of [o.log, o.rawLog, o.message]) {
|
|
12874
|
+
if (typeof t === "string" && t.includes(HYBRID_SIGN_BYTES_REJECTION_LOG)) return true;
|
|
12875
|
+
}
|
|
12876
|
+
return false;
|
|
12877
|
+
}
|
|
12878
|
+
|
|
12879
|
+
// src/tx/hybrid-tx.ts
|
|
12880
|
+
function fromBase64(b64) {
|
|
12881
|
+
const binary = atob(b64);
|
|
12882
|
+
const out = new Uint8Array(binary.length);
|
|
12883
|
+
for (let i = 0; i < binary.length; i++) out[i] = binary.charCodeAt(i);
|
|
12884
|
+
return out;
|
|
12885
|
+
}
|
|
11514
12886
|
async function buildHybridTx(opts) {
|
|
11515
12887
|
const {
|
|
11516
12888
|
registry,
|
|
@@ -11546,12 +12918,14 @@ async function buildHybridTx(opts) {
|
|
|
11546
12918
|
fee.payer,
|
|
11547
12919
|
signing.SignMode.SIGN_MODE_DIRECT
|
|
11548
12920
|
);
|
|
11549
|
-
const
|
|
11550
|
-
|
|
11551
|
-
|
|
11552
|
-
|
|
11553
|
-
|
|
11554
|
-
|
|
12921
|
+
const signBytesVersion = await resolveSignBytesVersion({
|
|
12922
|
+
chainId,
|
|
12923
|
+
rest: opts.rest,
|
|
12924
|
+
signBytesVersion: opts.signBytesVersion,
|
|
12925
|
+
fetch: opts.fetch,
|
|
12926
|
+
forceRefresh: opts.forceRefreshSignBytesVersion
|
|
12927
|
+
});
|
|
12928
|
+
const pqcSignedMessage = hybridSignBytes(signBytesVersion, chainId, b0, authInfoBytes);
|
|
11555
12929
|
const pqcSignature = pqcSign(pqcKeypair.secretKey, pqcSignedMessage);
|
|
11556
12930
|
const ext = buildHybridSignatureExtension({
|
|
11557
12931
|
algorithmId: AlgorithmDilithium5,
|
|
@@ -11585,18 +12959,34 @@ async function buildHybridTx(opts) {
|
|
|
11585
12959
|
txRawBytes,
|
|
11586
12960
|
authInfoBytes,
|
|
11587
12961
|
pqcSignedMessage,
|
|
11588
|
-
pqcSignature
|
|
12962
|
+
pqcSignature,
|
|
12963
|
+
signBytesVersion
|
|
11589
12964
|
};
|
|
11590
12965
|
}
|
|
11591
12966
|
async function signAndBroadcastHybrid(opts) {
|
|
12967
|
+
const auto = (opts.signBytesVersion ?? "auto") === "auto";
|
|
12968
|
+
try {
|
|
12969
|
+
return await broadcastHybridOnce(opts, false);
|
|
12970
|
+
} catch (e) {
|
|
12971
|
+
if (!auto || !isHybridSignBytesRejection(e)) throw e;
|
|
12972
|
+
return broadcastHybridOnce(opts, true);
|
|
12973
|
+
}
|
|
12974
|
+
}
|
|
12975
|
+
async function broadcastHybridOnce(opts, forceRefresh) {
|
|
11592
12976
|
const { transport } = opts;
|
|
11593
12977
|
const mode = opts.mode ?? "commit";
|
|
11594
|
-
const built = await buildHybridTx(
|
|
12978
|
+
const built = await buildHybridTx({
|
|
12979
|
+
...opts,
|
|
12980
|
+
forceRefreshSignBytesVersion: forceRefresh || opts.forceRefreshSignBytesVersion
|
|
12981
|
+
});
|
|
11595
12982
|
if (mode === "commit") {
|
|
11596
12983
|
const res = await transport.broadcastTx(built.txRawBytes);
|
|
11597
12984
|
if (res.code !== 0) {
|
|
11598
|
-
throw
|
|
11599
|
-
|
|
12985
|
+
throw Object.assign(
|
|
12986
|
+
new Error(
|
|
12987
|
+
`hybrid transaction failed with code ${res.code}: ${res.rawLog ?? "(no log)"} (hash ${res.transactionHash})`
|
|
12988
|
+
),
|
|
12989
|
+
{ code: res.code, rawLog: res.rawLog, transactionHash: res.transactionHash }
|
|
11600
12990
|
);
|
|
11601
12991
|
}
|
|
11602
12992
|
return {
|
|
@@ -11620,29 +13010,16 @@ function fromHex(hex) {
|
|
|
11620
13010
|
}
|
|
11621
13011
|
return bytes;
|
|
11622
13012
|
}
|
|
11623
|
-
function
|
|
11624
|
-
|
|
11625
|
-
|
|
11626
|
-
|
|
11627
|
-
|
|
11628
|
-
b[3] = n & 255;
|
|
11629
|
-
return b;
|
|
11630
|
-
}
|
|
11631
|
-
function concatBytes2(...parts) {
|
|
11632
|
-
let total = 0;
|
|
11633
|
-
for (const p of parts) total += p.length;
|
|
11634
|
-
const out = new Uint8Array(total);
|
|
11635
|
-
let off = 0;
|
|
11636
|
-
for (const p of parts) {
|
|
11637
|
-
out.set(p, off);
|
|
11638
|
-
off += p.length;
|
|
11639
|
-
}
|
|
11640
|
-
return out;
|
|
13013
|
+
function defaultSignBytesVersion(chainId) {
|
|
13014
|
+
if (!isLegacySignBytesChain(chainId)) return "v2";
|
|
13015
|
+
throw new Error(
|
|
13016
|
+
`signHybridEth on ${chainId} needs signBytesVersion: resolve it with resolveSignBytesVersion({ chainId, rest }) \u2014 the network switches from v1 to v2 at its own upgrade height`
|
|
13017
|
+
);
|
|
11641
13018
|
}
|
|
11642
13019
|
function encodeMessages(params) {
|
|
11643
|
-
const
|
|
13020
|
+
const enc3 = params.encodeMessage;
|
|
11644
13021
|
return params.messages.map((m) => {
|
|
11645
|
-
if (
|
|
13022
|
+
if (enc3) return enc3(m);
|
|
11646
13023
|
if (m.value instanceof Uint8Array) {
|
|
11647
13024
|
return any.Any.fromPartial({ typeUrl: m.typeUrl, value: m.value });
|
|
11648
13025
|
}
|
|
@@ -11723,12 +13100,8 @@ function signHybridEth(params) {
|
|
|
11723
13100
|
const b0 = tx$1.TxBody.encode(
|
|
11724
13101
|
tx$1.TxBody.fromPartial({ messages: encodedMessages, memo, timeoutHeight })
|
|
11725
13102
|
).finish();
|
|
11726
|
-
const
|
|
11727
|
-
|
|
11728
|
-
b0,
|
|
11729
|
-
be322(authInfoBytes.length),
|
|
11730
|
-
authInfoBytes
|
|
11731
|
-
);
|
|
13103
|
+
const version = params.signBytesVersion ?? defaultSignBytesVersion(params.chainId);
|
|
13104
|
+
const pqcSignedMessage = hybridSignBytes(version, params.chainId, b0, authInfoBytes);
|
|
11732
13105
|
const pqcSignature = pqcSign(params.account.pqc.secretKey, pqcSignedMessage);
|
|
11733
13106
|
const ext = buildHybridSignatureExtension({
|
|
11734
13107
|
algorithmId: AlgorithmDilithium5,
|
|
@@ -11777,6 +13150,22 @@ var EthNativeSigner = class {
|
|
|
11777
13150
|
};
|
|
11778
13151
|
this.registry = opts.registry ?? qorechainRegistry();
|
|
11779
13152
|
this.signMode = opts.signMode ?? "hybrid";
|
|
13153
|
+
this.signBytesVersion = opts.signBytesVersion ?? "auto";
|
|
13154
|
+
this.rest = opts.rest;
|
|
13155
|
+
this.fetchImpl = opts.fetch;
|
|
13156
|
+
}
|
|
13157
|
+
/**
|
|
13158
|
+
* The hybrid sign-bytes form for `chainId` under this signer's settings.
|
|
13159
|
+
* Pass `forceRefresh` to bypass the cached answer.
|
|
13160
|
+
*/
|
|
13161
|
+
resolveSignBytesVersion(chainId, forceRefresh = false) {
|
|
13162
|
+
return resolveSignBytesVersion({
|
|
13163
|
+
chainId,
|
|
13164
|
+
rest: this.rest,
|
|
13165
|
+
signBytesVersion: this.signBytesVersion,
|
|
13166
|
+
fetch: this.fetchImpl,
|
|
13167
|
+
forceRefresh
|
|
13168
|
+
});
|
|
11780
13169
|
}
|
|
11781
13170
|
/** Build and sign a `TxRaw` for the given messages. Does not broadcast. */
|
|
11782
13171
|
sign(params) {
|
|
@@ -11789,20 +13178,34 @@ var EthNativeSigner = class {
|
|
|
11789
13178
|
sequence: params.sequence,
|
|
11790
13179
|
memo: params.memo,
|
|
11791
13180
|
timeoutHeight: params.timeoutHeight,
|
|
11792
|
-
encodeMessage: this.encode
|
|
13181
|
+
encodeMessage: this.encode,
|
|
13182
|
+
signBytesVersion: params.signBytesVersion ?? (this.signBytesVersion === "auto" ? void 0 : this.signBytesVersion)
|
|
11793
13183
|
};
|
|
11794
13184
|
return this.signMode === "classical" ? signClassicalEth(signParams) : signHybridEth(signParams);
|
|
11795
13185
|
}
|
|
11796
13186
|
/** Sign and broadcast the given messages via `transport`. */
|
|
11797
13187
|
async signAndBroadcast(transport, params) {
|
|
11798
|
-
const
|
|
11799
|
-
|
|
11800
|
-
|
|
11801
|
-
|
|
11802
|
-
|
|
11803
|
-
|
|
13188
|
+
const once = async (forceRefresh) => {
|
|
13189
|
+
const signBytesVersion = this.signMode === "hybrid" ? params.signBytesVersion ?? await this.resolveSignBytesVersion(params.chainId, forceRefresh) : void 0;
|
|
13190
|
+
const { txRawBytes } = this.sign({ ...params, signBytesVersion });
|
|
13191
|
+
const res = await transport.broadcastTx(txRawBytes);
|
|
13192
|
+
if (res.code !== 0) {
|
|
13193
|
+
throw Object.assign(
|
|
13194
|
+
new Error(
|
|
13195
|
+
`eth-native tx failed with code ${res.code}: ${res.rawLog ?? "(no log)"} (hash ${res.transactionHash})`
|
|
13196
|
+
),
|
|
13197
|
+
{ code: res.code, rawLog: res.rawLog, transactionHash: res.transactionHash }
|
|
13198
|
+
);
|
|
13199
|
+
}
|
|
13200
|
+
return res;
|
|
13201
|
+
};
|
|
13202
|
+
const auto = this.signMode === "hybrid" && params.signBytesVersion === void 0 && this.signBytesVersion === "auto";
|
|
13203
|
+
try {
|
|
13204
|
+
return await once(false);
|
|
13205
|
+
} catch (e) {
|
|
13206
|
+
if (!auto || !isHybridSignBytesRejection(e)) throw e;
|
|
13207
|
+
return once(true);
|
|
11804
13208
|
}
|
|
11805
|
-
return res;
|
|
11806
13209
|
}
|
|
11807
13210
|
/** Send `amount` to `toAddress` via a bank `MsgSend`, signed eth-native. */
|
|
11808
13211
|
bankSend(transport, toAddress, amount, params) {
|
|
@@ -12069,6 +13472,17 @@ var pqc = {
|
|
|
12069
13472
|
disableAlgorithm: composer2(
|
|
12070
13473
|
"/qorechain.pqc.v1.MsgDisableAlgorithm",
|
|
12071
13474
|
MsgDisableAlgorithm
|
|
13475
|
+
),
|
|
13476
|
+
/**
|
|
13477
|
+
* Replace an account's PQC key with a NEW key of the SAME algorithm (rotate a
|
|
13478
|
+
* compromised key, or migrate a legacy-derived key to the canonical
|
|
13479
|
+
* derivation). Dual-signed over the domain-separated rotation bytes (the old
|
|
13480
|
+
* key proves ownership, the new key proves control). Sender-signed; broadcast
|
|
13481
|
+
* BY the account, cosigned (hybrid) with the OLD key.
|
|
13482
|
+
*/
|
|
13483
|
+
rotatePqcKey: composer2(
|
|
13484
|
+
"/qorechain.pqc.v1.MsgRotatePQCKey",
|
|
13485
|
+
MsgRotatePQCKey
|
|
12072
13486
|
)
|
|
12073
13487
|
};
|
|
12074
13488
|
var svm = {
|
|
@@ -12087,6 +13501,20 @@ var svm = {
|
|
|
12087
13501
|
registerSvmPqcKey: composer2(
|
|
12088
13502
|
"/qorechain.svm.v1.MsgRegisterSVMPQCKey",
|
|
12089
13503
|
MsgRegisterSVMPQCKey
|
|
13504
|
+
),
|
|
13505
|
+
/**
|
|
13506
|
+
* Replace the x/svm runtime parameters wholesale (chain v3.1.97).
|
|
13507
|
+
*
|
|
13508
|
+
* GOVERNANCE ONLY: `authority` must be the governance module account, so this
|
|
13509
|
+
* message is submitted inside a gov proposal, not signed by a user. It is what
|
|
13510
|
+
* makes enabling/disabling the SVM lane a proposal rather than a binary
|
|
13511
|
+
* release. `params` is replaced in full — send every field, not just the ones
|
|
13512
|
+
* you mean to change. `rentExemptionMulti` is a `LegacyDec` string (e.g.
|
|
13513
|
+
* `"2.000000000000000000"`).
|
|
13514
|
+
*/
|
|
13515
|
+
updateParams: composer2(
|
|
13516
|
+
"/qorechain.svm.v1.MsgUpdateParams",
|
|
13517
|
+
MsgUpdateParams
|
|
12090
13518
|
)
|
|
12091
13519
|
};
|
|
12092
13520
|
var lightnode = {
|
|
@@ -12147,6 +13575,26 @@ var abstractaccount = {
|
|
|
12147
13575
|
revokeAuthenticator: composer2(
|
|
12148
13576
|
"/qorechain.abstractaccount.v1.MsgRevokeAuthenticator",
|
|
12149
13577
|
MsgRevokeAuthenticator
|
|
13578
|
+
),
|
|
13579
|
+
/**
|
|
13580
|
+
* EVM-lane spend: execute an EVM call/transfer FROM the canonical account's
|
|
13581
|
+
* 0x address, authorized by a linked authenticator's signature over the EVM
|
|
13582
|
+
* auth sign-bytes. Relayer-signed (it submits + pays fees). See
|
|
13583
|
+
* {@link ../tx/authenticator.evmAuthSignBytes}.
|
|
13584
|
+
*/
|
|
13585
|
+
executeEvm: composer2(
|
|
13586
|
+
"/qorechain.abstractaccount.v1.MsgExecuteEVM",
|
|
13587
|
+
MsgExecuteEVM
|
|
13588
|
+
),
|
|
13589
|
+
/**
|
|
13590
|
+
* Native-lane spend: move native QOR FROM the canonical account via x/bank,
|
|
13591
|
+
* authorized by a linked authenticator's signature over the Cosmos auth
|
|
13592
|
+
* sign-bytes. Relayer-signed (it submits + pays fees). See
|
|
13593
|
+
* {@link ../tx/authenticator.cosmosAuthSignBytes}.
|
|
13594
|
+
*/
|
|
13595
|
+
executeCosmos: composer2(
|
|
13596
|
+
"/qorechain.abstractaccount.v1.MsgExecuteCosmos",
|
|
13597
|
+
MsgExecuteCosmos
|
|
12150
13598
|
)
|
|
12151
13599
|
};
|
|
12152
13600
|
var crossvm = {
|
|
@@ -12244,6 +13692,9 @@ __export(query_exports, {
|
|
|
12244
13692
|
QueryConfigRequest: () => QueryConfigRequest,
|
|
12245
13693
|
QueryConfigResponse: () => QueryConfigResponse,
|
|
12246
13694
|
QueryDefinition: () => QueryDefinition,
|
|
13695
|
+
QueryPermissionSchemaRequest: () => QueryPermissionSchemaRequest,
|
|
13696
|
+
QueryPermissionSchemaResponse: () => QueryPermissionSchemaResponse,
|
|
13697
|
+
QueryPermissionSchemaResponse_MsgPermissionsEntry: () => QueryPermissionSchemaResponse_MsgPermissionsEntry,
|
|
12247
13698
|
protobufPackage: () => protobufPackage13
|
|
12248
13699
|
});
|
|
12249
13700
|
var protobufPackage13 = "qorechain.abstractaccount.v1";
|
|
@@ -12772,6 +14223,236 @@ var QueryAccountsResponse = {
|
|
|
12772
14223
|
return message;
|
|
12773
14224
|
}
|
|
12774
14225
|
};
|
|
14226
|
+
function createBaseQueryPermissionSchemaRequest() {
|
|
14227
|
+
return {};
|
|
14228
|
+
}
|
|
14229
|
+
var QueryPermissionSchemaRequest = {
|
|
14230
|
+
encode(_, writer = new wire.BinaryWriter()) {
|
|
14231
|
+
return writer;
|
|
14232
|
+
},
|
|
14233
|
+
decode(input, length) {
|
|
14234
|
+
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
14235
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
14236
|
+
const message = createBaseQueryPermissionSchemaRequest();
|
|
14237
|
+
while (reader.pos < end) {
|
|
14238
|
+
const tag = reader.uint32();
|
|
14239
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
14240
|
+
break;
|
|
14241
|
+
}
|
|
14242
|
+
reader.skip(tag & 7);
|
|
14243
|
+
}
|
|
14244
|
+
return message;
|
|
14245
|
+
},
|
|
14246
|
+
fromJSON(_) {
|
|
14247
|
+
return {};
|
|
14248
|
+
},
|
|
14249
|
+
toJSON(_) {
|
|
14250
|
+
const obj = {};
|
|
14251
|
+
return obj;
|
|
14252
|
+
},
|
|
14253
|
+
create(base) {
|
|
14254
|
+
return QueryPermissionSchemaRequest.fromPartial(base ?? {});
|
|
14255
|
+
},
|
|
14256
|
+
fromPartial(_) {
|
|
14257
|
+
const message = createBaseQueryPermissionSchemaRequest();
|
|
14258
|
+
return message;
|
|
14259
|
+
}
|
|
14260
|
+
};
|
|
14261
|
+
function createBaseQueryPermissionSchemaResponse() {
|
|
14262
|
+
return { schemaVersion: "", permissions: [], msgPermissions: {}, keyManagementMsgs: [] };
|
|
14263
|
+
}
|
|
14264
|
+
var QueryPermissionSchemaResponse = {
|
|
14265
|
+
encode(message, writer = new wire.BinaryWriter()) {
|
|
14266
|
+
if (message.schemaVersion !== "") {
|
|
14267
|
+
writer.uint32(10).string(message.schemaVersion);
|
|
14268
|
+
}
|
|
14269
|
+
for (const v of message.permissions) {
|
|
14270
|
+
writer.uint32(18).string(v);
|
|
14271
|
+
}
|
|
14272
|
+
globalThis.Object.entries(message.msgPermissions).forEach(([key, value]) => {
|
|
14273
|
+
QueryPermissionSchemaResponse_MsgPermissionsEntry.encode({ key, value }, writer.uint32(26).fork()).join();
|
|
14274
|
+
});
|
|
14275
|
+
for (const v of message.keyManagementMsgs) {
|
|
14276
|
+
writer.uint32(34).string(v);
|
|
14277
|
+
}
|
|
14278
|
+
return writer;
|
|
14279
|
+
},
|
|
14280
|
+
decode(input, length) {
|
|
14281
|
+
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
14282
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
14283
|
+
const message = createBaseQueryPermissionSchemaResponse();
|
|
14284
|
+
while (reader.pos < end) {
|
|
14285
|
+
const tag = reader.uint32();
|
|
14286
|
+
switch (tag >>> 3) {
|
|
14287
|
+
case 1: {
|
|
14288
|
+
if (tag !== 10) {
|
|
14289
|
+
break;
|
|
14290
|
+
}
|
|
14291
|
+
message.schemaVersion = reader.string();
|
|
14292
|
+
continue;
|
|
14293
|
+
}
|
|
14294
|
+
case 2: {
|
|
14295
|
+
if (tag !== 18) {
|
|
14296
|
+
break;
|
|
14297
|
+
}
|
|
14298
|
+
message.permissions.push(reader.string());
|
|
14299
|
+
continue;
|
|
14300
|
+
}
|
|
14301
|
+
case 3: {
|
|
14302
|
+
if (tag !== 26) {
|
|
14303
|
+
break;
|
|
14304
|
+
}
|
|
14305
|
+
const entry3 = QueryPermissionSchemaResponse_MsgPermissionsEntry.decode(reader, reader.uint32());
|
|
14306
|
+
if (entry3.value !== void 0) {
|
|
14307
|
+
message.msgPermissions[entry3.key] = entry3.value;
|
|
14308
|
+
}
|
|
14309
|
+
continue;
|
|
14310
|
+
}
|
|
14311
|
+
case 4: {
|
|
14312
|
+
if (tag !== 34) {
|
|
14313
|
+
break;
|
|
14314
|
+
}
|
|
14315
|
+
message.keyManagementMsgs.push(reader.string());
|
|
14316
|
+
continue;
|
|
14317
|
+
}
|
|
14318
|
+
}
|
|
14319
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
14320
|
+
break;
|
|
14321
|
+
}
|
|
14322
|
+
reader.skip(tag & 7);
|
|
14323
|
+
}
|
|
14324
|
+
return message;
|
|
14325
|
+
},
|
|
14326
|
+
fromJSON(object) {
|
|
14327
|
+
return {
|
|
14328
|
+
schemaVersion: isSet14(object.schemaVersion) ? globalThis.String(object.schemaVersion) : isSet14(object.schema_version) ? globalThis.String(object.schema_version) : "",
|
|
14329
|
+
permissions: globalThis.Array.isArray(object?.permissions) ? object.permissions.map((e) => globalThis.String(e)) : [],
|
|
14330
|
+
msgPermissions: isObject(object.msgPermissions) ? globalThis.Object.entries(object.msgPermissions).reduce(
|
|
14331
|
+
(acc, [key, value]) => {
|
|
14332
|
+
acc[key] = globalThis.String(value);
|
|
14333
|
+
return acc;
|
|
14334
|
+
},
|
|
14335
|
+
{}
|
|
14336
|
+
) : isObject(object.msg_permissions) ? globalThis.Object.entries(object.msg_permissions).reduce(
|
|
14337
|
+
(acc, [key, value]) => {
|
|
14338
|
+
acc[key] = globalThis.String(value);
|
|
14339
|
+
return acc;
|
|
14340
|
+
},
|
|
14341
|
+
{}
|
|
14342
|
+
) : {},
|
|
14343
|
+
keyManagementMsgs: globalThis.Array.isArray(object?.keyManagementMsgs) ? object.keyManagementMsgs.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.key_management_msgs) ? object.key_management_msgs.map((e) => globalThis.String(e)) : []
|
|
14344
|
+
};
|
|
14345
|
+
},
|
|
14346
|
+
toJSON(message) {
|
|
14347
|
+
const obj = {};
|
|
14348
|
+
if (message.schemaVersion !== "") {
|
|
14349
|
+
obj.schemaVersion = message.schemaVersion;
|
|
14350
|
+
}
|
|
14351
|
+
if (message.permissions?.length) {
|
|
14352
|
+
obj.permissions = message.permissions;
|
|
14353
|
+
}
|
|
14354
|
+
if (message.msgPermissions) {
|
|
14355
|
+
const entries = globalThis.Object.entries(message.msgPermissions);
|
|
14356
|
+
if (entries.length > 0) {
|
|
14357
|
+
obj.msgPermissions = {};
|
|
14358
|
+
entries.forEach(([k, v]) => {
|
|
14359
|
+
obj.msgPermissions[k] = v;
|
|
14360
|
+
});
|
|
14361
|
+
}
|
|
14362
|
+
}
|
|
14363
|
+
if (message.keyManagementMsgs?.length) {
|
|
14364
|
+
obj.keyManagementMsgs = message.keyManagementMsgs;
|
|
14365
|
+
}
|
|
14366
|
+
return obj;
|
|
14367
|
+
},
|
|
14368
|
+
create(base) {
|
|
14369
|
+
return QueryPermissionSchemaResponse.fromPartial(base ?? {});
|
|
14370
|
+
},
|
|
14371
|
+
fromPartial(object) {
|
|
14372
|
+
const message = createBaseQueryPermissionSchemaResponse();
|
|
14373
|
+
message.schemaVersion = object.schemaVersion ?? "";
|
|
14374
|
+
message.permissions = object.permissions?.map((e) => e) || [];
|
|
14375
|
+
message.msgPermissions = globalThis.Object.entries(object.msgPermissions ?? {}).reduce(
|
|
14376
|
+
(acc, [key, value]) => {
|
|
14377
|
+
if (value !== void 0) {
|
|
14378
|
+
acc[key] = globalThis.String(value);
|
|
14379
|
+
}
|
|
14380
|
+
return acc;
|
|
14381
|
+
},
|
|
14382
|
+
{}
|
|
14383
|
+
);
|
|
14384
|
+
message.keyManagementMsgs = object.keyManagementMsgs?.map((e) => e) || [];
|
|
14385
|
+
return message;
|
|
14386
|
+
}
|
|
14387
|
+
};
|
|
14388
|
+
function createBaseQueryPermissionSchemaResponse_MsgPermissionsEntry() {
|
|
14389
|
+
return { key: "", value: "" };
|
|
14390
|
+
}
|
|
14391
|
+
var QueryPermissionSchemaResponse_MsgPermissionsEntry = {
|
|
14392
|
+
encode(message, writer = new wire.BinaryWriter()) {
|
|
14393
|
+
if (message.key !== "") {
|
|
14394
|
+
writer.uint32(10).string(message.key);
|
|
14395
|
+
}
|
|
14396
|
+
if (message.value !== "") {
|
|
14397
|
+
writer.uint32(18).string(message.value);
|
|
14398
|
+
}
|
|
14399
|
+
return writer;
|
|
14400
|
+
},
|
|
14401
|
+
decode(input, length) {
|
|
14402
|
+
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
14403
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
14404
|
+
const message = createBaseQueryPermissionSchemaResponse_MsgPermissionsEntry();
|
|
14405
|
+
while (reader.pos < end) {
|
|
14406
|
+
const tag = reader.uint32();
|
|
14407
|
+
switch (tag >>> 3) {
|
|
14408
|
+
case 1: {
|
|
14409
|
+
if (tag !== 10) {
|
|
14410
|
+
break;
|
|
14411
|
+
}
|
|
14412
|
+
message.key = reader.string();
|
|
14413
|
+
continue;
|
|
14414
|
+
}
|
|
14415
|
+
case 2: {
|
|
14416
|
+
if (tag !== 18) {
|
|
14417
|
+
break;
|
|
14418
|
+
}
|
|
14419
|
+
message.value = reader.string();
|
|
14420
|
+
continue;
|
|
14421
|
+
}
|
|
14422
|
+
}
|
|
14423
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
14424
|
+
break;
|
|
14425
|
+
}
|
|
14426
|
+
reader.skip(tag & 7);
|
|
14427
|
+
}
|
|
14428
|
+
return message;
|
|
14429
|
+
},
|
|
14430
|
+
fromJSON(object) {
|
|
14431
|
+
return {
|
|
14432
|
+
key: isSet14(object.key) ? globalThis.String(object.key) : "",
|
|
14433
|
+
value: isSet14(object.value) ? globalThis.String(object.value) : ""
|
|
14434
|
+
};
|
|
14435
|
+
},
|
|
14436
|
+
toJSON(message) {
|
|
14437
|
+
const obj = {};
|
|
14438
|
+
if (message.key !== "") {
|
|
14439
|
+
obj.key = message.key;
|
|
14440
|
+
}
|
|
14441
|
+
if (message.value !== "") {
|
|
14442
|
+
obj.value = message.value;
|
|
14443
|
+
}
|
|
14444
|
+
return obj;
|
|
14445
|
+
},
|
|
14446
|
+
create(base) {
|
|
14447
|
+
return QueryPermissionSchemaResponse_MsgPermissionsEntry.fromPartial(base ?? {});
|
|
14448
|
+
},
|
|
14449
|
+
fromPartial(object) {
|
|
14450
|
+
const message = createBaseQueryPermissionSchemaResponse_MsgPermissionsEntry();
|
|
14451
|
+
message.key = object.key ?? "";
|
|
14452
|
+
message.value = object.value ?? "";
|
|
14453
|
+
return message;
|
|
14454
|
+
}
|
|
14455
|
+
};
|
|
12775
14456
|
var QueryDefinition = {
|
|
12776
14457
|
name: "Query",
|
|
12777
14458
|
fullName: "qorechain.abstractaccount.v1.Query",
|
|
@@ -12783,7 +14464,53 @@ var QueryDefinition = {
|
|
|
12783
14464
|
requestStream: false,
|
|
12784
14465
|
responseType: QueryConfigResponse,
|
|
12785
14466
|
responseStream: false,
|
|
12786
|
-
options: {
|
|
14467
|
+
options: {
|
|
14468
|
+
_unknownFields: {
|
|
14469
|
+
578365826: [
|
|
14470
|
+
new Uint8Array([
|
|
14471
|
+
38,
|
|
14472
|
+
18,
|
|
14473
|
+
36,
|
|
14474
|
+
47,
|
|
14475
|
+
113,
|
|
14476
|
+
111,
|
|
14477
|
+
114,
|
|
14478
|
+
101,
|
|
14479
|
+
99,
|
|
14480
|
+
104,
|
|
14481
|
+
97,
|
|
14482
|
+
105,
|
|
14483
|
+
110,
|
|
14484
|
+
47,
|
|
14485
|
+
97,
|
|
14486
|
+
98,
|
|
14487
|
+
115,
|
|
14488
|
+
116,
|
|
14489
|
+
114,
|
|
14490
|
+
97,
|
|
14491
|
+
99,
|
|
14492
|
+
116,
|
|
14493
|
+
97,
|
|
14494
|
+
99,
|
|
14495
|
+
99,
|
|
14496
|
+
111,
|
|
14497
|
+
117,
|
|
14498
|
+
110,
|
|
14499
|
+
116,
|
|
14500
|
+
47,
|
|
14501
|
+
118,
|
|
14502
|
+
49,
|
|
14503
|
+
47,
|
|
14504
|
+
99,
|
|
14505
|
+
111,
|
|
14506
|
+
110,
|
|
14507
|
+
102,
|
|
14508
|
+
105,
|
|
14509
|
+
103
|
|
14510
|
+
])
|
|
14511
|
+
]
|
|
14512
|
+
}
|
|
14513
|
+
}
|
|
12787
14514
|
},
|
|
12788
14515
|
/** Account returns a single abstract account by address. */
|
|
12789
14516
|
account: {
|
|
@@ -12792,7 +14519,65 @@ var QueryDefinition = {
|
|
|
12792
14519
|
requestStream: false,
|
|
12793
14520
|
responseType: QueryAccountResponse,
|
|
12794
14521
|
responseStream: false,
|
|
12795
|
-
options: {
|
|
14522
|
+
options: {
|
|
14523
|
+
_unknownFields: {
|
|
14524
|
+
578365826: [
|
|
14525
|
+
new Uint8Array([
|
|
14526
|
+
50,
|
|
14527
|
+
18,
|
|
14528
|
+
48,
|
|
14529
|
+
47,
|
|
14530
|
+
113,
|
|
14531
|
+
111,
|
|
14532
|
+
114,
|
|
14533
|
+
101,
|
|
14534
|
+
99,
|
|
14535
|
+
104,
|
|
14536
|
+
97,
|
|
14537
|
+
105,
|
|
14538
|
+
110,
|
|
14539
|
+
47,
|
|
14540
|
+
97,
|
|
14541
|
+
98,
|
|
14542
|
+
115,
|
|
14543
|
+
116,
|
|
14544
|
+
114,
|
|
14545
|
+
97,
|
|
14546
|
+
99,
|
|
14547
|
+
116,
|
|
14548
|
+
97,
|
|
14549
|
+
99,
|
|
14550
|
+
99,
|
|
14551
|
+
111,
|
|
14552
|
+
117,
|
|
14553
|
+
110,
|
|
14554
|
+
116,
|
|
14555
|
+
47,
|
|
14556
|
+
118,
|
|
14557
|
+
49,
|
|
14558
|
+
47,
|
|
14559
|
+
97,
|
|
14560
|
+
99,
|
|
14561
|
+
99,
|
|
14562
|
+
111,
|
|
14563
|
+
117,
|
|
14564
|
+
110,
|
|
14565
|
+
116,
|
|
14566
|
+
115,
|
|
14567
|
+
47,
|
|
14568
|
+
123,
|
|
14569
|
+
97,
|
|
14570
|
+
100,
|
|
14571
|
+
100,
|
|
14572
|
+
114,
|
|
14573
|
+
101,
|
|
14574
|
+
115,
|
|
14575
|
+
115,
|
|
14576
|
+
125
|
|
14577
|
+
])
|
|
14578
|
+
]
|
|
14579
|
+
}
|
|
14580
|
+
}
|
|
12796
14581
|
},
|
|
12797
14582
|
/** Accounts lists all abstract accounts. */
|
|
12798
14583
|
accounts: {
|
|
@@ -12801,10 +14586,131 @@ var QueryDefinition = {
|
|
|
12801
14586
|
requestStream: false,
|
|
12802
14587
|
responseType: QueryAccountsResponse,
|
|
12803
14588
|
responseStream: false,
|
|
12804
|
-
options: {
|
|
14589
|
+
options: {
|
|
14590
|
+
_unknownFields: {
|
|
14591
|
+
578365826: [
|
|
14592
|
+
new Uint8Array([
|
|
14593
|
+
40,
|
|
14594
|
+
18,
|
|
14595
|
+
38,
|
|
14596
|
+
47,
|
|
14597
|
+
113,
|
|
14598
|
+
111,
|
|
14599
|
+
114,
|
|
14600
|
+
101,
|
|
14601
|
+
99,
|
|
14602
|
+
104,
|
|
14603
|
+
97,
|
|
14604
|
+
105,
|
|
14605
|
+
110,
|
|
14606
|
+
47,
|
|
14607
|
+
97,
|
|
14608
|
+
98,
|
|
14609
|
+
115,
|
|
14610
|
+
116,
|
|
14611
|
+
114,
|
|
14612
|
+
97,
|
|
14613
|
+
99,
|
|
14614
|
+
116,
|
|
14615
|
+
97,
|
|
14616
|
+
99,
|
|
14617
|
+
99,
|
|
14618
|
+
111,
|
|
14619
|
+
117,
|
|
14620
|
+
110,
|
|
14621
|
+
116,
|
|
14622
|
+
47,
|
|
14623
|
+
118,
|
|
14624
|
+
49,
|
|
14625
|
+
47,
|
|
14626
|
+
97,
|
|
14627
|
+
99,
|
|
14628
|
+
99,
|
|
14629
|
+
111,
|
|
14630
|
+
117,
|
|
14631
|
+
110,
|
|
14632
|
+
116,
|
|
14633
|
+
115
|
|
14634
|
+
])
|
|
14635
|
+
]
|
|
14636
|
+
}
|
|
14637
|
+
}
|
|
14638
|
+
},
|
|
14639
|
+
/**
|
|
14640
|
+
* PermissionSchema returns the canonical authenticator permission taxonomy so
|
|
14641
|
+
* clients (QoreX/dashboard/relayer) validate scopes without hardcoding strings
|
|
14642
|
+
* and detect drift via schema_version (v3.1.85).
|
|
14643
|
+
*/
|
|
14644
|
+
permissionSchema: {
|
|
14645
|
+
name: "PermissionSchema",
|
|
14646
|
+
requestType: QueryPermissionSchemaRequest,
|
|
14647
|
+
requestStream: false,
|
|
14648
|
+
responseType: QueryPermissionSchemaResponse,
|
|
14649
|
+
responseStream: false,
|
|
14650
|
+
options: {
|
|
14651
|
+
_unknownFields: {
|
|
14652
|
+
578365826: [
|
|
14653
|
+
new Uint8Array([
|
|
14654
|
+
49,
|
|
14655
|
+
18,
|
|
14656
|
+
47,
|
|
14657
|
+
47,
|
|
14658
|
+
113,
|
|
14659
|
+
111,
|
|
14660
|
+
114,
|
|
14661
|
+
101,
|
|
14662
|
+
99,
|
|
14663
|
+
104,
|
|
14664
|
+
97,
|
|
14665
|
+
105,
|
|
14666
|
+
110,
|
|
14667
|
+
47,
|
|
14668
|
+
97,
|
|
14669
|
+
98,
|
|
14670
|
+
115,
|
|
14671
|
+
116,
|
|
14672
|
+
114,
|
|
14673
|
+
97,
|
|
14674
|
+
99,
|
|
14675
|
+
116,
|
|
14676
|
+
97,
|
|
14677
|
+
99,
|
|
14678
|
+
99,
|
|
14679
|
+
111,
|
|
14680
|
+
117,
|
|
14681
|
+
110,
|
|
14682
|
+
116,
|
|
14683
|
+
47,
|
|
14684
|
+
118,
|
|
14685
|
+
49,
|
|
14686
|
+
47,
|
|
14687
|
+
112,
|
|
14688
|
+
101,
|
|
14689
|
+
114,
|
|
14690
|
+
109,
|
|
14691
|
+
105,
|
|
14692
|
+
115,
|
|
14693
|
+
115,
|
|
14694
|
+
105,
|
|
14695
|
+
111,
|
|
14696
|
+
110,
|
|
14697
|
+
95,
|
|
14698
|
+
115,
|
|
14699
|
+
99,
|
|
14700
|
+
104,
|
|
14701
|
+
101,
|
|
14702
|
+
109,
|
|
14703
|
+
97
|
|
14704
|
+
])
|
|
14705
|
+
]
|
|
14706
|
+
}
|
|
14707
|
+
}
|
|
12805
14708
|
}
|
|
12806
14709
|
}
|
|
12807
14710
|
};
|
|
14711
|
+
function isObject(value) {
|
|
14712
|
+
return typeof value === "object" && value !== null;
|
|
14713
|
+
}
|
|
12808
14714
|
function isSet14(value) {
|
|
12809
14715
|
return value !== null && value !== void 0;
|
|
12810
14716
|
}
|
|
@@ -24019,6 +25925,277 @@ function base64FromBytes11(arr) {
|
|
|
24019
25925
|
function isSet26(value) {
|
|
24020
25926
|
return value !== null && value !== void 0;
|
|
24021
25927
|
}
|
|
25928
|
+
var enc2 = new TextEncoder();
|
|
25929
|
+
function toBytes3(x) {
|
|
25930
|
+
return typeof x === "string" ? enc2.encode(x) : x;
|
|
25931
|
+
}
|
|
25932
|
+
function hexToBytes3(hex) {
|
|
25933
|
+
const h = hex.replace(/^0x/, "");
|
|
25934
|
+
const out = new Uint8Array(h.length / 2);
|
|
25935
|
+
for (let i = 0; i < out.length; i++) {
|
|
25936
|
+
out[i] = parseInt(h.slice(i * 2, i * 2 + 2), 16);
|
|
25937
|
+
}
|
|
25938
|
+
return out;
|
|
25939
|
+
}
|
|
25940
|
+
function bytesToHex0x(b) {
|
|
25941
|
+
let s = "0x";
|
|
25942
|
+
for (const x of b) s += x.toString(16).padStart(2, "0");
|
|
25943
|
+
return s;
|
|
25944
|
+
}
|
|
25945
|
+
function toHexLower2(b) {
|
|
25946
|
+
let s = "";
|
|
25947
|
+
for (const x of b) s += x.toString(16).padStart(2, "0");
|
|
25948
|
+
return s;
|
|
25949
|
+
}
|
|
25950
|
+
function parseCoins(amount) {
|
|
25951
|
+
const m = /^([0-9]+)([a-zA-Z][a-zA-Z0-9/:._-]*)$/.exec(String(amount).trim());
|
|
25952
|
+
if (!m) {
|
|
25953
|
+
throw new Error(`invalid amount "${amount}" (expected e.g. "100uqor")`);
|
|
25954
|
+
}
|
|
25955
|
+
return [{ denom: m[2], amount: m[1] }];
|
|
25956
|
+
}
|
|
25957
|
+
function executeEvmMsg(input) {
|
|
25958
|
+
const {
|
|
25959
|
+
relayer,
|
|
25960
|
+
account,
|
|
25961
|
+
scheme,
|
|
25962
|
+
pubkey,
|
|
25963
|
+
signature,
|
|
25964
|
+
to = "",
|
|
25965
|
+
value = "0",
|
|
25966
|
+
data = new Uint8Array(0),
|
|
25967
|
+
gasLimit,
|
|
25968
|
+
nonce
|
|
25969
|
+
} = input;
|
|
25970
|
+
return {
|
|
25971
|
+
typeUrl: "/qorechain.abstractaccount.v1.MsgExecuteEVM",
|
|
25972
|
+
value: {
|
|
25973
|
+
relayer,
|
|
25974
|
+
account,
|
|
25975
|
+
scheme,
|
|
25976
|
+
pubkey: toBytes3(pubkey),
|
|
25977
|
+
signature: toBytes3(signature),
|
|
25978
|
+
to,
|
|
25979
|
+
value,
|
|
25980
|
+
data: toBytes3(data),
|
|
25981
|
+
gasLimit: BigInt(gasLimit),
|
|
25982
|
+
nonce: BigInt(nonce)
|
|
25983
|
+
}
|
|
25984
|
+
};
|
|
25985
|
+
}
|
|
25986
|
+
function executeCosmosMsg(input) {
|
|
25987
|
+
const { relayer, account, scheme, pubkey, signature, to, amount, nonce } = input;
|
|
25988
|
+
return {
|
|
25989
|
+
typeUrl: "/qorechain.abstractaccount.v1.MsgExecuteCosmos",
|
|
25990
|
+
value: {
|
|
25991
|
+
relayer,
|
|
25992
|
+
account,
|
|
25993
|
+
scheme,
|
|
25994
|
+
pubkey: toBytes3(pubkey),
|
|
25995
|
+
signature: toBytes3(signature),
|
|
25996
|
+
to,
|
|
25997
|
+
amount: parseCoins(amount),
|
|
25998
|
+
nonce: BigInt(nonce)
|
|
25999
|
+
}
|
|
26000
|
+
};
|
|
26001
|
+
}
|
|
26002
|
+
function revokeAuthenticatorMsg(input) {
|
|
26003
|
+
const { owner, account = owner, scheme, pubkey } = input;
|
|
26004
|
+
return {
|
|
26005
|
+
typeUrl: "/qorechain.abstractaccount.v1.MsgRevokeAuthenticator",
|
|
26006
|
+
value: {
|
|
26007
|
+
owner,
|
|
26008
|
+
accountAddress: account,
|
|
26009
|
+
scheme,
|
|
26010
|
+
pubkey: toBytes3(pubkey)
|
|
26011
|
+
}
|
|
26012
|
+
};
|
|
26013
|
+
}
|
|
26014
|
+
function registerEthAuthenticatorMsg(input) {
|
|
26015
|
+
const {
|
|
26016
|
+
owner,
|
|
26017
|
+
account = owner,
|
|
26018
|
+
ethAddress,
|
|
26019
|
+
permissions = ["evm"],
|
|
26020
|
+
expiryUnix,
|
|
26021
|
+
label = "metamask"
|
|
26022
|
+
} = input;
|
|
26023
|
+
return {
|
|
26024
|
+
typeUrl: "/qorechain.abstractaccount.v1.MsgRegisterAuthenticator",
|
|
26025
|
+
value: {
|
|
26026
|
+
owner,
|
|
26027
|
+
accountAddress: account,
|
|
26028
|
+
scheme: "secp256k1",
|
|
26029
|
+
pubkey: hexToBytes3(ethAddress),
|
|
26030
|
+
permissions,
|
|
26031
|
+
expiryUnix: BigInt(expiryUnix),
|
|
26032
|
+
label
|
|
26033
|
+
}
|
|
26034
|
+
};
|
|
26035
|
+
}
|
|
26036
|
+
function rotatePqcKeyMsg(input) {
|
|
26037
|
+
const { sender, oldPublicKey, newPublicKey, oldSignature, newSignature } = input;
|
|
26038
|
+
return {
|
|
26039
|
+
typeUrl: "/qorechain.pqc.v1.MsgRotatePQCKey",
|
|
26040
|
+
value: {
|
|
26041
|
+
sender,
|
|
26042
|
+
oldPublicKey: toBytes3(oldPublicKey),
|
|
26043
|
+
newPublicKey: toBytes3(newPublicKey),
|
|
26044
|
+
oldSignature: toBytes3(oldSignature),
|
|
26045
|
+
newSignature: toBytes3(newSignature)
|
|
26046
|
+
}
|
|
26047
|
+
};
|
|
26048
|
+
}
|
|
26049
|
+
function walletPubkey(wallet) {
|
|
26050
|
+
const pk = wallet.publicKey;
|
|
26051
|
+
return pk instanceof Uint8Array ? pk : pk.toBytes();
|
|
26052
|
+
}
|
|
26053
|
+
function normalizeSignature(res) {
|
|
26054
|
+
return res instanceof Uint8Array ? res : res.signature;
|
|
26055
|
+
}
|
|
26056
|
+
async function buildPhantomExecuteEvm(opts) {
|
|
26057
|
+
const {
|
|
26058
|
+
wallet,
|
|
26059
|
+
relayer,
|
|
26060
|
+
chainId,
|
|
26061
|
+
account,
|
|
26062
|
+
to = "",
|
|
26063
|
+
value = "0",
|
|
26064
|
+
data = new Uint8Array(0),
|
|
26065
|
+
gasLimit = 1e5,
|
|
26066
|
+
nonce
|
|
26067
|
+
} = opts;
|
|
26068
|
+
const pubkey = walletPubkey(wallet);
|
|
26069
|
+
const digest = evmAuthSignBytes({ chainId, account, pubkey, to, value, data, nonce });
|
|
26070
|
+
const signature = normalizeSignature(await wallet.signMessage(digest));
|
|
26071
|
+
return executeEvmMsg({
|
|
26072
|
+
relayer,
|
|
26073
|
+
account,
|
|
26074
|
+
scheme: "ed25519",
|
|
26075
|
+
pubkey,
|
|
26076
|
+
signature,
|
|
26077
|
+
to,
|
|
26078
|
+
value,
|
|
26079
|
+
data,
|
|
26080
|
+
gasLimit,
|
|
26081
|
+
nonce
|
|
26082
|
+
});
|
|
26083
|
+
}
|
|
26084
|
+
async function buildPhantomExecuteCosmos(opts) {
|
|
26085
|
+
const { wallet, relayer, chainId, account, to, amount, nonce } = opts;
|
|
26086
|
+
const pubkey = walletPubkey(wallet);
|
|
26087
|
+
const digest = cosmosAuthSignBytes({ chainId, account, pubkey, to, amount, nonce });
|
|
26088
|
+
const signature = normalizeSignature(await wallet.signMessage(digest));
|
|
26089
|
+
return executeCosmosMsg({
|
|
26090
|
+
relayer,
|
|
26091
|
+
account,
|
|
26092
|
+
scheme: "ed25519",
|
|
26093
|
+
pubkey,
|
|
26094
|
+
signature,
|
|
26095
|
+
to,
|
|
26096
|
+
amount,
|
|
26097
|
+
nonce
|
|
26098
|
+
});
|
|
26099
|
+
}
|
|
26100
|
+
async function ethPersonalSign(provider, address, digest) {
|
|
26101
|
+
const sigHex = await provider.request({
|
|
26102
|
+
method: "personal_sign",
|
|
26103
|
+
params: [bytesToHex0x(digest), address]
|
|
26104
|
+
});
|
|
26105
|
+
return hexToBytes3(sigHex);
|
|
26106
|
+
}
|
|
26107
|
+
async function buildMetaMaskExecuteEvm(opts) {
|
|
26108
|
+
const {
|
|
26109
|
+
provider,
|
|
26110
|
+
address,
|
|
26111
|
+
relayer,
|
|
26112
|
+
chainId,
|
|
26113
|
+
account,
|
|
26114
|
+
to = "",
|
|
26115
|
+
value = "0",
|
|
26116
|
+
data = new Uint8Array(0),
|
|
26117
|
+
gasLimit = 1e5,
|
|
26118
|
+
nonce
|
|
26119
|
+
} = opts;
|
|
26120
|
+
const pubkey = hexToBytes3(address);
|
|
26121
|
+
const digest = evmAuthSignBytes({ chainId, account, pubkey, to, value, data, nonce });
|
|
26122
|
+
const signature = await ethPersonalSign(provider, address, digest);
|
|
26123
|
+
return executeEvmMsg({
|
|
26124
|
+
relayer,
|
|
26125
|
+
account,
|
|
26126
|
+
scheme: "secp256k1",
|
|
26127
|
+
pubkey,
|
|
26128
|
+
signature,
|
|
26129
|
+
to,
|
|
26130
|
+
value,
|
|
26131
|
+
data,
|
|
26132
|
+
gasLimit,
|
|
26133
|
+
nonce
|
|
26134
|
+
});
|
|
26135
|
+
}
|
|
26136
|
+
async function buildMetaMaskExecuteCosmos(opts) {
|
|
26137
|
+
const { provider, address, relayer, chainId, account, to, amount, nonce } = opts;
|
|
26138
|
+
const pubkey = hexToBytes3(address);
|
|
26139
|
+
const digest = cosmosAuthSignBytes({ chainId, account, pubkey, to, amount, nonce });
|
|
26140
|
+
const signature = await ethPersonalSign(provider, address, digest);
|
|
26141
|
+
return executeCosmosMsg({
|
|
26142
|
+
relayer,
|
|
26143
|
+
account,
|
|
26144
|
+
scheme: "secp256k1",
|
|
26145
|
+
pubkey,
|
|
26146
|
+
signature,
|
|
26147
|
+
to,
|
|
26148
|
+
amount,
|
|
26149
|
+
nonce
|
|
26150
|
+
});
|
|
26151
|
+
}
|
|
26152
|
+
var CANONICAL_DERIVATION = "adapter";
|
|
26153
|
+
var LEGACY_DERIVATION = "bridge";
|
|
26154
|
+
function derivePqcLegacy(mnemonic) {
|
|
26155
|
+
return generatePqcKeypair(pqc$1.shake256(enc2.encode(mnemonic), 32));
|
|
26156
|
+
}
|
|
26157
|
+
function derivePqcCanonical(account, mnemonic) {
|
|
26158
|
+
return generatePqcKeypair(
|
|
26159
|
+
pqc$1.shake256(enc2.encode(`qorechain:pqc:v1|${account}|${mnemonic}`), 32)
|
|
26160
|
+
);
|
|
26161
|
+
}
|
|
26162
|
+
function derivePqcByScheme(scheme, account, mnemonic) {
|
|
26163
|
+
if (scheme === LEGACY_DERIVATION || scheme === "mnemonic-only") {
|
|
26164
|
+
return derivePqcLegacy(mnemonic);
|
|
26165
|
+
}
|
|
26166
|
+
if (scheme === CANONICAL_DERIVATION || scheme === "") {
|
|
26167
|
+
return derivePqcCanonical(account, mnemonic);
|
|
26168
|
+
}
|
|
26169
|
+
throw new Error(`unknown derivation "${scheme}" (use adapter|bridge)`);
|
|
26170
|
+
}
|
|
26171
|
+
function rotatePqcKeyMsgFromMnemonic(opts) {
|
|
26172
|
+
const {
|
|
26173
|
+
account,
|
|
26174
|
+
mnemonic,
|
|
26175
|
+
chainId,
|
|
26176
|
+
algorithmId = 1,
|
|
26177
|
+
oldDerivation = LEGACY_DERIVATION,
|
|
26178
|
+
newDerivation = CANONICAL_DERIVATION
|
|
26179
|
+
} = opts;
|
|
26180
|
+
const oldKp = derivePqcByScheme(oldDerivation, account, mnemonic);
|
|
26181
|
+
const newKp = derivePqcByScheme(newDerivation, account, mnemonic);
|
|
26182
|
+
if (toHexLower2(oldKp.publicKey) === toHexLower2(newKp.publicKey)) {
|
|
26183
|
+
throw new Error(
|
|
26184
|
+
"old and new derivations produce the same key \u2014 rotation would be a no-op"
|
|
26185
|
+
);
|
|
26186
|
+
}
|
|
26187
|
+
const sb = enc2.encode(
|
|
26188
|
+
rotationSignBytes(chainId, algorithmId, account, oldKp.publicKey, newKp.publicKey)
|
|
26189
|
+
);
|
|
26190
|
+
const msg2 = rotatePqcKeyMsg({
|
|
26191
|
+
sender: account,
|
|
26192
|
+
oldPublicKey: oldKp.publicKey,
|
|
26193
|
+
newPublicKey: newKp.publicKey,
|
|
26194
|
+
oldSignature: pqc$1.mldsa.sign(oldKp.secretKey, sb),
|
|
26195
|
+
newSignature: pqc$1.mldsa.sign(newKp.secretKey, sb)
|
|
26196
|
+
});
|
|
26197
|
+
return { msg: msg2, oldKeypair: oldKp, newKeypair: newKp };
|
|
26198
|
+
}
|
|
24022
26199
|
|
|
24023
26200
|
// src/wallet/cosmos.ts
|
|
24024
26201
|
function suggestChainInfo(network) {
|
|
@@ -24107,6 +26284,13 @@ function createQueryClients(rpc) {
|
|
|
24107
26284
|
"Accounts",
|
|
24108
26285
|
QueryAccountsRequest,
|
|
24109
26286
|
QueryAccountsResponse
|
|
26287
|
+
),
|
|
26288
|
+
permissionSchema: unary(
|
|
26289
|
+
rpc,
|
|
26290
|
+
"qorechain.abstractaccount.v1.Query",
|
|
26291
|
+
"PermissionSchema",
|
|
26292
|
+
QueryPermissionSchemaRequest,
|
|
26293
|
+
QueryPermissionSchemaResponse
|
|
24110
26294
|
)
|
|
24111
26295
|
},
|
|
24112
26296
|
amm: {
|
|
@@ -24669,6 +26853,30 @@ function extractMessageIds(result) {
|
|
|
24669
26853
|
}
|
|
24670
26854
|
return ids;
|
|
24671
26855
|
}
|
|
26856
|
+
var CROSSVM_CALL_RESPONSE_TYPE_URL = "/qorechain.crossvm.v1.MsgCrossVMCallResponse";
|
|
26857
|
+
function unknownOutcome() {
|
|
26858
|
+
return { executed: false, data: new Uint8Array(0), gasUsed: 0n };
|
|
26859
|
+
}
|
|
26860
|
+
function decodeCallOutcomes(result) {
|
|
26861
|
+
const responses = result.msgResponses;
|
|
26862
|
+
if (!Array.isArray(responses)) return [];
|
|
26863
|
+
const out = [];
|
|
26864
|
+
for (const r of responses) {
|
|
26865
|
+
if (r?.typeUrl !== CROSSVM_CALL_RESPONSE_TYPE_URL) continue;
|
|
26866
|
+
try {
|
|
26867
|
+
const decoded = MsgCrossVMCallResponse.decode(r.value);
|
|
26868
|
+
out.push({
|
|
26869
|
+
executed: decoded.executed,
|
|
26870
|
+
data: decoded.data,
|
|
26871
|
+
// uint64 is generated as a decimal string; surface it as a bigint.
|
|
26872
|
+
gasUsed: BigInt(decoded.gasUsed ?? 0)
|
|
26873
|
+
});
|
|
26874
|
+
} catch {
|
|
26875
|
+
out.push(unknownOutcome());
|
|
26876
|
+
}
|
|
26877
|
+
}
|
|
26878
|
+
return out;
|
|
26879
|
+
}
|
|
24672
26880
|
function createCrossVMClient(tx, opts = {}) {
|
|
24673
26881
|
const sender = tx.senderAddress;
|
|
24674
26882
|
const query = opts.query;
|
|
@@ -24679,7 +26887,8 @@ function createCrossVMClient(tx, opts = {}) {
|
|
|
24679
26887
|
targetVm: o.targetVm,
|
|
24680
26888
|
targetContract: o.targetContract,
|
|
24681
26889
|
payload,
|
|
24682
|
-
funds: o.funds ?? []
|
|
26890
|
+
funds: o.funds ?? [],
|
|
26891
|
+
async: o.async ?? false
|
|
24683
26892
|
});
|
|
24684
26893
|
const buildCallSync = (o, payload) => buildFrom(o, payload);
|
|
24685
26894
|
const buildCall = (o) => {
|
|
@@ -24704,7 +26913,8 @@ function createCrossVMClient(tx, opts = {}) {
|
|
|
24704
26913
|
{ autoFee: o.autoFee }
|
|
24705
26914
|
);
|
|
24706
26915
|
const [messageId = ""] = extractMessageIds(result);
|
|
24707
|
-
|
|
26916
|
+
const [outcome = unknownOutcome()] = decodeCallOutcomes(result);
|
|
26917
|
+
return { messageId, ...outcome, result };
|
|
24708
26918
|
};
|
|
24709
26919
|
const callAtomic = async (calls, w = {}) => {
|
|
24710
26920
|
if (calls.length === 0) {
|
|
@@ -24719,7 +26929,11 @@ function createCrossVMClient(tx, opts = {}) {
|
|
|
24719
26929
|
w.memo ?? "",
|
|
24720
26930
|
{ autoFee: w.autoFee }
|
|
24721
26931
|
);
|
|
24722
|
-
return {
|
|
26932
|
+
return {
|
|
26933
|
+
messageIds: extractMessageIds(result),
|
|
26934
|
+
outcomes: decodeCallOutcomes(result),
|
|
26935
|
+
result
|
|
26936
|
+
};
|
|
24723
26937
|
};
|
|
24724
26938
|
const getMessage = (id) => {
|
|
24725
26939
|
requireGetMessageSource(query, qor);
|
|
@@ -24823,7 +27037,7 @@ async function migrateToHybrid(tx, opts) {
|
|
|
24823
27037
|
}
|
|
24824
27038
|
|
|
24825
27039
|
// src/index.ts
|
|
24826
|
-
var VERSION = "0.
|
|
27040
|
+
var VERSION = "0.8.0";
|
|
24827
27041
|
|
|
24828
27042
|
Object.defineProperty(exports, "AI_ANOMALY_CHECK_ADDRESS", {
|
|
24829
27043
|
enumerable: true,
|
|
@@ -24856,28 +27070,35 @@ Object.defineProperty(exports, "simulateWithRiskScore", {
|
|
|
24856
27070
|
exports.AlgorithmDilithium5 = AlgorithmDilithium5;
|
|
24857
27071
|
exports.AlgorithmMLKEM1024 = AlgorithmMLKEM1024;
|
|
24858
27072
|
exports.AlgorithmUnspecified = AlgorithmUnspecified;
|
|
27073
|
+
exports.BRIDGE_ATTESTATION_V2_DOMAIN = BRIDGE_ATTESTATION_V2_DOMAIN;
|
|
27074
|
+
exports.CANONICAL_DERIVATION = CANONICAL_DERIVATION;
|
|
24859
27075
|
exports.DEFAULT_GAS_MULTIPLIER = DEFAULT_GAS_MULTIPLIER;
|
|
24860
27076
|
exports.DEFAULT_GAS_PRICE = DEFAULT_GAS_PRICE;
|
|
24861
27077
|
exports.ETHSECP256K1_PUBKEY_TYPE = ETHSECP256K1_PUBKEY_TYPE;
|
|
24862
27078
|
exports.EthNativeSigner = EthNativeSigner;
|
|
24863
27079
|
exports.GasPrice = GasPrice;
|
|
27080
|
+
exports.HYBRID_SIGN_BYTES_REJECTION_LOG = HYBRID_SIGN_BYTES_REJECTION_LOG;
|
|
27081
|
+
exports.HYBRID_SIGN_BYTES_V2_DOMAIN = HYBRID_SIGN_BYTES_V2_DOMAIN;
|
|
24864
27082
|
exports.HYBRID_SIG_TYPE_URL = HYBRID_SIG_TYPE_URL;
|
|
24865
27083
|
exports.HybridSigner = HybridSigner;
|
|
24866
27084
|
exports.JsonRpcClient = JsonRpcClient;
|
|
24867
27085
|
exports.JsonRpcError = JsonRpcError;
|
|
27086
|
+
exports.LEGACY_DERIVATION = LEGACY_DERIVATION;
|
|
27087
|
+
exports.LEGACY_SIGN_BYTES_CHAINS = LEGACY_SIGN_BYTES_CHAINS;
|
|
27088
|
+
exports.MIGRATION_SIGN_BYTES_V2_DOMAIN = MIGRATION_SIGN_BYTES_V2_DOMAIN;
|
|
24868
27089
|
exports.ML_DSA_87_PUBLIC_KEY_LENGTH = ML_DSA_87_PUBLIC_KEY_LENGTH;
|
|
24869
27090
|
exports.ML_DSA_87_SECRET_KEY_LENGTH = ML_DSA_87_SECRET_KEY_LENGTH;
|
|
24870
27091
|
exports.ML_DSA_87_SEED_LENGTH = ML_DSA_87_SEED_LENGTH;
|
|
24871
27092
|
exports.ML_DSA_87_SIGNATURE_LENGTH = ML_DSA_87_SIGNATURE_LENGTH;
|
|
24872
27093
|
exports.MSG_SEND_TYPE_URL = MSG_SEND_TYPE_URL;
|
|
24873
27094
|
exports.NETWORKS = NETWORKS;
|
|
24874
|
-
exports.PHANTOM_DERIVATION_DOMAIN = PHANTOM_DERIVATION_DOMAIN;
|
|
24875
27095
|
exports.PQC_KEY_STATUS_PRECOMPILE_ADDRESS = PQC_KEY_STATUS_PRECOMPILE_ADDRESS;
|
|
24876
27096
|
exports.PqcSigner = PqcSigner;
|
|
24877
27097
|
exports.QorClient = QorClient;
|
|
24878
27098
|
exports.QoreHttpError = QoreHttpError;
|
|
24879
27099
|
exports.QoreTxError = QoreTxError;
|
|
24880
27100
|
exports.RestClient = RestClient;
|
|
27101
|
+
exports.SIGN_BYTES_V2_UPGRADE = SIGN_BYTES_V2_UPGRADE;
|
|
24881
27102
|
exports.STATIC_FALLBACK = STATIC_FALLBACK;
|
|
24882
27103
|
exports.TxClient = TxClient;
|
|
24883
27104
|
exports.VERSION = VERSION;
|
|
@@ -24890,22 +27111,32 @@ exports.amm = amm;
|
|
|
24890
27111
|
exports.attachHybridExtension = attachHybridExtension;
|
|
24891
27112
|
exports.authz = authz;
|
|
24892
27113
|
exports.bank = bank;
|
|
27114
|
+
exports.be64 = be64;
|
|
24893
27115
|
exports.bech32ToHex = bech32ToHex;
|
|
24894
27116
|
exports.bridge = bridge;
|
|
27117
|
+
exports.bridgeAttestationSignBytes = bridgeAttestationSignBytes;
|
|
27118
|
+
exports.bridgeAttestationSignBytesV1 = bridgeAttestationSignBytesV1;
|
|
27119
|
+
exports.bridgeAttestationSignBytesV2 = bridgeAttestationSignBytesV2;
|
|
24895
27120
|
exports.broadcastAndWait = broadcastAndWait;
|
|
24896
27121
|
exports.buildAminoTypes = buildAminoTypes;
|
|
24897
27122
|
exports.buildEventsQuery = buildEventsQuery;
|
|
24898
27123
|
exports.buildHybridSignatureExtension = buildHybridSignatureExtension;
|
|
24899
27124
|
exports.buildHybridTx = buildHybridTx;
|
|
27125
|
+
exports.buildMetaMaskExecuteCosmos = buildMetaMaskExecuteCosmos;
|
|
27126
|
+
exports.buildMetaMaskExecuteEvm = buildMetaMaskExecuteEvm;
|
|
27127
|
+
exports.buildPhantomExecuteCosmos = buildPhantomExecuteCosmos;
|
|
27128
|
+
exports.buildPhantomExecuteEvm = buildPhantomExecuteEvm;
|
|
24900
27129
|
exports.buildRegisterPqcKeyMsg = buildRegisterPqcKeyMsg;
|
|
24901
27130
|
exports.buildTxQuery = buildTxQuery;
|
|
24902
27131
|
exports.buildUrl = buildUrl;
|
|
24903
27132
|
exports.bytesToBech32 = bytesToBech32;
|
|
24904
27133
|
exports.calculateFee = calculateFee;
|
|
24905
27134
|
exports.clearAdmin = clearAdmin;
|
|
27135
|
+
exports.clearSignBytesCache = clearSignBytesCache;
|
|
24906
27136
|
exports.connectCosmWasmSigner = connectCosmWasmSigner;
|
|
24907
27137
|
exports.connectPhantomUnified = connectPhantomUnified;
|
|
24908
27138
|
exports.connectQueryClients = connectQueryClients;
|
|
27139
|
+
exports.cosmosAuthSignBytes = cosmosAuthSignBytes;
|
|
24909
27140
|
exports.createClient = createClient;
|
|
24910
27141
|
exports.createCosmWasmClient = createCosmWasmClient;
|
|
24911
27142
|
exports.createCrossVMClient = createCrossVMClient;
|
|
@@ -24917,6 +27148,7 @@ exports.crossvm = crossvm;
|
|
|
24917
27148
|
exports.decodeTxError = decodeTxError;
|
|
24918
27149
|
exports.deriveEvmAccount = deriveEvmAccount;
|
|
24919
27150
|
exports.deriveNativeAccount = deriveNativeAccount;
|
|
27151
|
+
exports.derivePqcLegacy = derivePqcLegacy;
|
|
24920
27152
|
exports.deriveSvmAccount = deriveSvmAccount;
|
|
24921
27153
|
exports.deriveUnifiedAccount = deriveUnifiedAccount;
|
|
24922
27154
|
exports.directSignerFromPrivateKey = directSignerFromPrivateKey;
|
|
@@ -24924,12 +27156,16 @@ exports.distribution = distribution;
|
|
|
24924
27156
|
exports.encodeHybridExtension = encodeHybridExtension;
|
|
24925
27157
|
exports.ensurePqcRegistered = ensurePqcRegistered;
|
|
24926
27158
|
exports.estimateFee = estimateFee;
|
|
27159
|
+
exports.evmAuthSignBytes = evmAuthSignBytes;
|
|
24927
27160
|
exports.evmToQor = evmToQor;
|
|
24928
27161
|
exports.execute = execute;
|
|
27162
|
+
exports.executeCosmosMsg = executeCosmosMsg;
|
|
27163
|
+
exports.executeEvmMsg = executeEvmMsg;
|
|
24929
27164
|
exports.explorerAddressUrl = explorerAddressUrl;
|
|
24930
27165
|
exports.explorerBlockUrl = explorerBlockUrl;
|
|
24931
27166
|
exports.explorerTxUrl = explorerTxUrl;
|
|
24932
27167
|
exports.feegrant = feegrant;
|
|
27168
|
+
exports.fetchSignBytesV2AppliedHeight = fetchSignBytesV2AppliedHeight;
|
|
24933
27169
|
exports.formatUnits = formatUnits;
|
|
24934
27170
|
exports.fromBase = fromBase;
|
|
24935
27171
|
exports.generateMnemonic = generateMnemonic;
|
|
@@ -24950,10 +27186,15 @@ exports.getPqcStatus = getPqcStatus;
|
|
|
24950
27186
|
exports.getTx = getTx;
|
|
24951
27187
|
exports.gov = gov;
|
|
24952
27188
|
exports.hexToBech32 = hexToBech32;
|
|
27189
|
+
exports.hybridSignBytes = hybridSignBytes;
|
|
27190
|
+
exports.hybridSignBytesV1 = hybridSignBytesV1;
|
|
27191
|
+
exports.hybridSignBytesV2 = hybridSignBytesV2;
|
|
24953
27192
|
exports.ibc = ibc;
|
|
24954
27193
|
exports.instantiate = instantiate;
|
|
24955
27194
|
exports.instantiate2 = instantiate2;
|
|
24956
27195
|
exports.isChecksumAddress = isChecksumAddress;
|
|
27196
|
+
exports.isHybridSignBytesRejection = isHybridSignBytesRejection;
|
|
27197
|
+
exports.isLegacySignBytesChain = isLegacySignBytesChain;
|
|
24957
27198
|
exports.isPqcRegistered = isPqcRegistered;
|
|
24958
27199
|
exports.isSignatureAlgorithm = isSignatureAlgorithm;
|
|
24959
27200
|
exports.isTxFailure = isTxFailure;
|
|
@@ -24963,12 +27204,16 @@ exports.isValidSvmAddress = isValidSvmAddress;
|
|
|
24963
27204
|
exports.joinUrl = joinUrl;
|
|
24964
27205
|
exports.keccak256 = keccak256;
|
|
24965
27206
|
exports.keccak256Hex = keccak256Hex;
|
|
27207
|
+
exports.lengthPrefixed = lengthPrefixed;
|
|
24966
27208
|
exports.license = license;
|
|
24967
27209
|
exports.lightnode = lightnode;
|
|
24968
27210
|
exports.listNetworks = listNetworks;
|
|
24969
27211
|
exports.migrate = migrate;
|
|
24970
27212
|
exports.migratePqcKey = migratePqcKey;
|
|
24971
27213
|
exports.migrateToHybrid = migrateToHybrid;
|
|
27214
|
+
exports.migrationSignBytes = migrationSignBytes;
|
|
27215
|
+
exports.migrationSignBytesV1 = migrationSignBytesV1;
|
|
27216
|
+
exports.migrationSignBytesV2 = migrationSignBytesV2;
|
|
24972
27217
|
exports.msg = msg;
|
|
24973
27218
|
exports.multilayer = multilayer;
|
|
24974
27219
|
exports.parseEthPubkeyAny = parseEthPubkeyAny;
|
|
@@ -24984,14 +27229,21 @@ exports.qorechainRegistryTypes = qorechainRegistryTypes;
|
|
|
24984
27229
|
exports.qorechainTypes = codegen_exports;
|
|
24985
27230
|
exports.queryContractSmart = queryContractSmart;
|
|
24986
27231
|
exports.rdk = rdk;
|
|
27232
|
+
exports.registerEthAuthenticatorMsg = registerEthAuthenticatorMsg;
|
|
24987
27233
|
exports.requestFaucet = requestFaucet;
|
|
27234
|
+
exports.resolveSignBytesVersion = resolveSignBytesVersion;
|
|
27235
|
+
exports.revokeAuthenticatorMsg = revokeAuthenticatorMsg;
|
|
24988
27236
|
exports.ripemd160 = ripemd160;
|
|
24989
27237
|
exports.ripemd160Hex = ripemd160Hex;
|
|
24990
27238
|
exports.rlconsensus = rlconsensus;
|
|
27239
|
+
exports.rotatePqcKeyMsg = rotatePqcKeyMsg;
|
|
27240
|
+
exports.rotatePqcKeyMsgFromMnemonic = rotatePqcKeyMsgFromMnemonic;
|
|
27241
|
+
exports.rotationSignBytes = rotationSignBytes;
|
|
24991
27242
|
exports.searchTxs = searchTxs;
|
|
24992
27243
|
exports.sha256 = sha256;
|
|
24993
27244
|
exports.sha256Hex = sha256Hex;
|
|
24994
27245
|
exports.signAndBroadcastHybrid = signAndBroadcastHybrid;
|
|
27246
|
+
exports.signBytesVersionFor = signBytesVersionFor;
|
|
24995
27247
|
exports.signClassicalEth = signClassicalEth;
|
|
24996
27248
|
exports.signHybridEth = signHybridEth;
|
|
24997
27249
|
exports.staking = staking;
|