@qorechain/sdk 0.7.0 → 0.8.1
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 +68 -13
- package/dist/index.cjs +713 -91
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +464 -56
- package/dist/index.d.ts +464 -56
- package/dist/index.js +691 -91
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -6745,7 +6745,10 @@ __export(tx_exports6, {
|
|
|
6745
6745
|
MsgExecuteProgramResponse: () => MsgExecuteProgramResponse,
|
|
6746
6746
|
MsgRegisterSVMPQCKey: () => MsgRegisterSVMPQCKey,
|
|
6747
6747
|
MsgRegisterSVMPQCKeyResponse: () => MsgRegisterSVMPQCKeyResponse,
|
|
6748
|
+
MsgUpdateParams: () => MsgUpdateParams,
|
|
6749
|
+
MsgUpdateParamsResponse: () => MsgUpdateParamsResponse,
|
|
6748
6750
|
SVMAuth: () => SVMAuth,
|
|
6751
|
+
SVMParams: () => SVMParams,
|
|
6749
6752
|
SvmAccountMeta: () => SvmAccountMeta,
|
|
6750
6753
|
protobufPackage: () => protobufPackage6
|
|
6751
6754
|
});
|
|
@@ -7482,6 +7485,292 @@ var MsgRegisterSVMPQCKeyResponse = {
|
|
|
7482
7485
|
return message;
|
|
7483
7486
|
}
|
|
7484
7487
|
};
|
|
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
|
+
};
|
|
7500
|
+
}
|
|
7501
|
+
var SVMParams = {
|
|
7502
|
+
encode(message, writer = new wire.BinaryWriter()) {
|
|
7503
|
+
if (message.maxProgramSize !== "0") {
|
|
7504
|
+
writer.uint32(8).uint64(message.maxProgramSize);
|
|
7505
|
+
}
|
|
7506
|
+
if (message.maxAccountDataSize !== "0") {
|
|
7507
|
+
writer.uint32(16).uint64(message.maxAccountDataSize);
|
|
7508
|
+
}
|
|
7509
|
+
if (message.computeBudgetMax !== "0") {
|
|
7510
|
+
writer.uint32(24).uint64(message.computeBudgetMax);
|
|
7511
|
+
}
|
|
7512
|
+
if (message.lamportsPerByte !== "0") {
|
|
7513
|
+
writer.uint32(32).uint64(message.lamportsPerByte);
|
|
7514
|
+
}
|
|
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;
|
|
7531
|
+
},
|
|
7532
|
+
decode(input, length) {
|
|
7533
|
+
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
7534
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
7535
|
+
const message = createBaseSVMParams();
|
|
7536
|
+
while (reader.pos < end) {
|
|
7537
|
+
const tag = reader.uint32();
|
|
7538
|
+
switch (tag >>> 3) {
|
|
7539
|
+
case 1: {
|
|
7540
|
+
if (tag !== 8) {
|
|
7541
|
+
break;
|
|
7542
|
+
}
|
|
7543
|
+
message.maxProgramSize = reader.uint64().toString();
|
|
7544
|
+
continue;
|
|
7545
|
+
}
|
|
7546
|
+
case 2: {
|
|
7547
|
+
if (tag !== 16) {
|
|
7548
|
+
break;
|
|
7549
|
+
}
|
|
7550
|
+
message.maxAccountDataSize = reader.uint64().toString();
|
|
7551
|
+
continue;
|
|
7552
|
+
}
|
|
7553
|
+
case 3: {
|
|
7554
|
+
if (tag !== 24) {
|
|
7555
|
+
break;
|
|
7556
|
+
}
|
|
7557
|
+
message.computeBudgetMax = reader.uint64().toString();
|
|
7558
|
+
continue;
|
|
7559
|
+
}
|
|
7560
|
+
case 4: {
|
|
7561
|
+
if (tag !== 32) {
|
|
7562
|
+
break;
|
|
7563
|
+
}
|
|
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();
|
|
7600
|
+
continue;
|
|
7601
|
+
}
|
|
7602
|
+
}
|
|
7603
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7604
|
+
break;
|
|
7605
|
+
}
|
|
7606
|
+
reader.skip(tag & 7);
|
|
7607
|
+
}
|
|
7608
|
+
return message;
|
|
7609
|
+
},
|
|
7610
|
+
fromJSON(object) {
|
|
7611
|
+
return {
|
|
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
|
|
7621
|
+
};
|
|
7622
|
+
},
|
|
7623
|
+
toJSON(message) {
|
|
7624
|
+
const obj = {};
|
|
7625
|
+
if (message.maxProgramSize !== "0") {
|
|
7626
|
+
obj.maxProgramSize = message.maxProgramSize;
|
|
7627
|
+
}
|
|
7628
|
+
if (message.maxAccountDataSize !== "0") {
|
|
7629
|
+
obj.maxAccountDataSize = message.maxAccountDataSize;
|
|
7630
|
+
}
|
|
7631
|
+
if (message.computeBudgetMax !== "0") {
|
|
7632
|
+
obj.computeBudgetMax = message.computeBudgetMax;
|
|
7633
|
+
}
|
|
7634
|
+
if (message.lamportsPerByte !== "0") {
|
|
7635
|
+
obj.lamportsPerByte = message.lamportsPerByte;
|
|
7636
|
+
}
|
|
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);
|
|
7651
|
+
}
|
|
7652
|
+
return obj;
|
|
7653
|
+
},
|
|
7654
|
+
create(base) {
|
|
7655
|
+
return SVMParams.fromPartial(base ?? {});
|
|
7656
|
+
},
|
|
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;
|
|
7668
|
+
return message;
|
|
7669
|
+
}
|
|
7670
|
+
};
|
|
7671
|
+
function createBaseMsgUpdateParams() {
|
|
7672
|
+
return { authority: "", params: void 0 };
|
|
7673
|
+
}
|
|
7674
|
+
var MsgUpdateParams = {
|
|
7675
|
+
encode(message, writer = new wire.BinaryWriter()) {
|
|
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();
|
|
7681
|
+
}
|
|
7682
|
+
return writer;
|
|
7683
|
+
},
|
|
7684
|
+
decode(input, length) {
|
|
7685
|
+
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
7686
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
7687
|
+
const message = createBaseMsgUpdateParams();
|
|
7688
|
+
while (reader.pos < end) {
|
|
7689
|
+
const tag = reader.uint32();
|
|
7690
|
+
switch (tag >>> 3) {
|
|
7691
|
+
case 1: {
|
|
7692
|
+
if (tag !== 10) {
|
|
7693
|
+
break;
|
|
7694
|
+
}
|
|
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());
|
|
7703
|
+
continue;
|
|
7704
|
+
}
|
|
7705
|
+
}
|
|
7706
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7707
|
+
break;
|
|
7708
|
+
}
|
|
7709
|
+
reader.skip(tag & 7);
|
|
7710
|
+
}
|
|
7711
|
+
return message;
|
|
7712
|
+
},
|
|
7713
|
+
fromJSON(object) {
|
|
7714
|
+
return {
|
|
7715
|
+
authority: isSet7(object.authority) ? globalThis.String(object.authority) : "",
|
|
7716
|
+
params: isSet7(object.params) ? SVMParams.fromJSON(object.params) : void 0
|
|
7717
|
+
};
|
|
7718
|
+
},
|
|
7719
|
+
toJSON(message) {
|
|
7720
|
+
const obj = {};
|
|
7721
|
+
if (message.authority !== "") {
|
|
7722
|
+
obj.authority = message.authority;
|
|
7723
|
+
}
|
|
7724
|
+
if (message.params !== void 0) {
|
|
7725
|
+
obj.params = SVMParams.toJSON(message.params);
|
|
7726
|
+
}
|
|
7727
|
+
return obj;
|
|
7728
|
+
},
|
|
7729
|
+
create(base) {
|
|
7730
|
+
return MsgUpdateParams.fromPartial(base ?? {});
|
|
7731
|
+
},
|
|
7732
|
+
fromPartial(object) {
|
|
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;
|
|
7736
|
+
return message;
|
|
7737
|
+
}
|
|
7738
|
+
};
|
|
7739
|
+
function createBaseMsgUpdateParamsResponse() {
|
|
7740
|
+
return {};
|
|
7741
|
+
}
|
|
7742
|
+
var MsgUpdateParamsResponse = {
|
|
7743
|
+
encode(_, writer = new wire.BinaryWriter()) {
|
|
7744
|
+
return writer;
|
|
7745
|
+
},
|
|
7746
|
+
decode(input, length) {
|
|
7747
|
+
const reader = input instanceof wire.BinaryReader ? input : new wire.BinaryReader(input);
|
|
7748
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
7749
|
+
const message = createBaseMsgUpdateParamsResponse();
|
|
7750
|
+
while (reader.pos < end) {
|
|
7751
|
+
const tag = reader.uint32();
|
|
7752
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7753
|
+
break;
|
|
7754
|
+
}
|
|
7755
|
+
reader.skip(tag & 7);
|
|
7756
|
+
}
|
|
7757
|
+
return message;
|
|
7758
|
+
},
|
|
7759
|
+
fromJSON(_) {
|
|
7760
|
+
return {};
|
|
7761
|
+
},
|
|
7762
|
+
toJSON(_) {
|
|
7763
|
+
const obj = {};
|
|
7764
|
+
return obj;
|
|
7765
|
+
},
|
|
7766
|
+
create(base) {
|
|
7767
|
+
return MsgUpdateParamsResponse.fromPartial(base ?? {});
|
|
7768
|
+
},
|
|
7769
|
+
fromPartial(_) {
|
|
7770
|
+
const message = createBaseMsgUpdateParamsResponse();
|
|
7771
|
+
return message;
|
|
7772
|
+
}
|
|
7773
|
+
};
|
|
7485
7774
|
var MsgDefinition6 = {
|
|
7486
7775
|
name: "Msg",
|
|
7487
7776
|
fullName: "qorechain.svm.v1.Msg",
|
|
@@ -7517,6 +7806,14 @@ var MsgDefinition6 = {
|
|
|
7517
7806
|
responseType: MsgRegisterSVMPQCKeyResponse,
|
|
7518
7807
|
responseStream: false,
|
|
7519
7808
|
options: {}
|
|
7809
|
+
},
|
|
7810
|
+
updateParams: {
|
|
7811
|
+
name: "UpdateParams",
|
|
7812
|
+
requestType: MsgUpdateParams,
|
|
7813
|
+
requestStream: false,
|
|
7814
|
+
responseType: MsgUpdateParamsResponse,
|
|
7815
|
+
responseStream: false,
|
|
7816
|
+
options: {}
|
|
7520
7817
|
}
|
|
7521
7818
|
}
|
|
7522
7819
|
};
|
|
@@ -9851,7 +10148,15 @@ __export(tx_exports10, {
|
|
|
9851
10148
|
});
|
|
9852
10149
|
var protobufPackage10 = "qorechain.crossvm.v1";
|
|
9853
10150
|
function createBaseMsgCrossVMCall() {
|
|
9854
|
-
return {
|
|
10151
|
+
return {
|
|
10152
|
+
sender: "",
|
|
10153
|
+
sourceVm: "",
|
|
10154
|
+
targetVm: "",
|
|
10155
|
+
targetContract: "",
|
|
10156
|
+
payload: new Uint8Array(0),
|
|
10157
|
+
funds: [],
|
|
10158
|
+
async: false
|
|
10159
|
+
};
|
|
9855
10160
|
}
|
|
9856
10161
|
var MsgCrossVMCall = {
|
|
9857
10162
|
encode(message, writer = new wire.BinaryWriter()) {
|
|
@@ -9873,6 +10178,9 @@ var MsgCrossVMCall = {
|
|
|
9873
10178
|
for (const v of message.funds) {
|
|
9874
10179
|
Coin.encode(v, writer.uint32(50).fork()).join();
|
|
9875
10180
|
}
|
|
10181
|
+
if (message.async !== false) {
|
|
10182
|
+
writer.uint32(56).bool(message.async);
|
|
10183
|
+
}
|
|
9876
10184
|
return writer;
|
|
9877
10185
|
},
|
|
9878
10186
|
decode(input, length) {
|
|
@@ -9924,6 +10232,13 @@ var MsgCrossVMCall = {
|
|
|
9924
10232
|
message.funds.push(Coin.decode(reader, reader.uint32()));
|
|
9925
10233
|
continue;
|
|
9926
10234
|
}
|
|
10235
|
+
case 7: {
|
|
10236
|
+
if (tag !== 56) {
|
|
10237
|
+
break;
|
|
10238
|
+
}
|
|
10239
|
+
message.async = reader.bool();
|
|
10240
|
+
continue;
|
|
10241
|
+
}
|
|
9927
10242
|
}
|
|
9928
10243
|
if ((tag & 7) === 4 || tag === 0) {
|
|
9929
10244
|
break;
|
|
@@ -9939,7 +10254,8 @@ var MsgCrossVMCall = {
|
|
|
9939
10254
|
targetVm: isSet11(object.targetVm) ? globalThis.String(object.targetVm) : isSet11(object.target_vm) ? globalThis.String(object.target_vm) : "",
|
|
9940
10255
|
targetContract: isSet11(object.targetContract) ? globalThis.String(object.targetContract) : isSet11(object.target_contract) ? globalThis.String(object.target_contract) : "",
|
|
9941
10256
|
payload: isSet11(object.payload) ? bytesFromBase647(object.payload) : new Uint8Array(0),
|
|
9942
|
-
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
|
|
9943
10259
|
};
|
|
9944
10260
|
},
|
|
9945
10261
|
toJSON(message) {
|
|
@@ -9962,6 +10278,9 @@ var MsgCrossVMCall = {
|
|
|
9962
10278
|
if (message.funds?.length) {
|
|
9963
10279
|
obj.funds = message.funds.map((e) => Coin.toJSON(e));
|
|
9964
10280
|
}
|
|
10281
|
+
if (message.async !== false) {
|
|
10282
|
+
obj.async = message.async;
|
|
10283
|
+
}
|
|
9965
10284
|
return obj;
|
|
9966
10285
|
},
|
|
9967
10286
|
create(base) {
|
|
@@ -9975,17 +10294,27 @@ var MsgCrossVMCall = {
|
|
|
9975
10294
|
message.targetContract = object.targetContract ?? "";
|
|
9976
10295
|
message.payload = object.payload ?? new Uint8Array(0);
|
|
9977
10296
|
message.funds = object.funds?.map((e) => Coin.fromPartial(e)) || [];
|
|
10297
|
+
message.async = object.async ?? false;
|
|
9978
10298
|
return message;
|
|
9979
10299
|
}
|
|
9980
10300
|
};
|
|
9981
10301
|
function createBaseMsgCrossVMCallResponse() {
|
|
9982
|
-
return { messageId: "" };
|
|
10302
|
+
return { messageId: "", executed: false, data: new Uint8Array(0), gasUsed: "0" };
|
|
9983
10303
|
}
|
|
9984
10304
|
var MsgCrossVMCallResponse = {
|
|
9985
10305
|
encode(message, writer = new wire.BinaryWriter()) {
|
|
9986
10306
|
if (message.messageId !== "") {
|
|
9987
10307
|
writer.uint32(10).string(message.messageId);
|
|
9988
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
|
+
}
|
|
9989
10318
|
return writer;
|
|
9990
10319
|
},
|
|
9991
10320
|
decode(input, length) {
|
|
@@ -10002,6 +10331,27 @@ var MsgCrossVMCallResponse = {
|
|
|
10002
10331
|
message.messageId = reader.string();
|
|
10003
10332
|
continue;
|
|
10004
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
|
+
}
|
|
10005
10355
|
}
|
|
10006
10356
|
if ((tag & 7) === 4 || tag === 0) {
|
|
10007
10357
|
break;
|
|
@@ -10012,7 +10362,10 @@ var MsgCrossVMCallResponse = {
|
|
|
10012
10362
|
},
|
|
10013
10363
|
fromJSON(object) {
|
|
10014
10364
|
return {
|
|
10015
|
-
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"
|
|
10016
10369
|
};
|
|
10017
10370
|
},
|
|
10018
10371
|
toJSON(message) {
|
|
@@ -10020,6 +10373,15 @@ var MsgCrossVMCallResponse = {
|
|
|
10020
10373
|
if (message.messageId !== "") {
|
|
10021
10374
|
obj.messageId = message.messageId;
|
|
10022
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
|
+
}
|
|
10023
10385
|
return obj;
|
|
10024
10386
|
},
|
|
10025
10387
|
create(base) {
|
|
@@ -10028,6 +10390,9 @@ var MsgCrossVMCallResponse = {
|
|
|
10028
10390
|
fromPartial(object) {
|
|
10029
10391
|
const message = createBaseMsgCrossVMCallResponse();
|
|
10030
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";
|
|
10031
10396
|
return message;
|
|
10032
10397
|
}
|
|
10033
10398
|
};
|
|
@@ -10121,7 +10486,11 @@ var MsgDefinition10 = {
|
|
|
10121
10486
|
name: "Msg",
|
|
10122
10487
|
fullName: "qorechain.crossvm.v1.Msg",
|
|
10123
10488
|
methods: {
|
|
10124
|
-
/**
|
|
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
|
+
*/
|
|
10125
10494
|
crossVMCall: {
|
|
10126
10495
|
name: "CrossVMCall",
|
|
10127
10496
|
requestType: MsgCrossVMCall,
|
|
@@ -10745,6 +11114,7 @@ var qorechainRegistryTypes = [
|
|
|
10745
11114
|
["/qorechain.svm.v1.MsgCreateAccount", MsgCreateAccount],
|
|
10746
11115
|
["/qorechain.svm.v1.MsgExecuteProgram", MsgExecuteProgram],
|
|
10747
11116
|
["/qorechain.svm.v1.MsgRegisterSVMPQCKey", MsgRegisterSVMPQCKey],
|
|
11117
|
+
["/qorechain.svm.v1.MsgUpdateParams", MsgUpdateParams],
|
|
10748
11118
|
// lightnode
|
|
10749
11119
|
["/qorechain.lightnode.v1.MsgRegisterLightNode", MsgRegisterLightNode],
|
|
10750
11120
|
["/qorechain.lightnode.v1.MsgHeartbeat", MsgHeartbeat],
|
|
@@ -11092,7 +11462,12 @@ var TxClient = class _TxClient {
|
|
|
11092
11462
|
height: res.height,
|
|
11093
11463
|
gasUsed: res.gasUsed,
|
|
11094
11464
|
gasWanted: res.gasWanted,
|
|
11095
|
-
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
|
|
11096
11471
|
};
|
|
11097
11472
|
}
|
|
11098
11473
|
const hash = await this.client.signAndBroadcastSync(
|
|
@@ -11720,9 +12095,16 @@ function generatePqcKeypair(seed) {
|
|
|
11720
12095
|
return { publicKey: kp.publicKey, secretKey: kp.secretKey };
|
|
11721
12096
|
}
|
|
11722
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
|
+
}
|
|
11723
12103
|
return pqc$1.mldsa87.sign(secretKey, message, opts);
|
|
11724
12104
|
}
|
|
11725
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;
|
|
11726
12108
|
return pqc$1.mldsa87.verify(publicKey, message, signature);
|
|
11727
12109
|
}
|
|
11728
12110
|
function buildHybridSignatureExtension(args) {
|
|
@@ -11933,37 +12315,17 @@ function unifiedAccountFromSeed(seed32) {
|
|
|
11933
12315
|
pqc: pqc2
|
|
11934
12316
|
};
|
|
11935
12317
|
}
|
|
11936
|
-
|
|
11937
|
-
|
|
11938
|
-
|
|
11939
|
-
|
|
11940
|
-
|
|
11941
|
-
|
|
11942
|
-
if (!pk) throw new Error("Phantom provider exposed no public key");
|
|
11943
|
-
if (pk instanceof Uint8Array) return pk;
|
|
11944
|
-
return pk.toBytes();
|
|
11945
|
-
}
|
|
11946
|
-
function signatureBytes(res) {
|
|
11947
|
-
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
|
+
);
|
|
11948
12324
|
}
|
|
11949
12325
|
async function connectPhantomUnified(opts = {}) {
|
|
11950
|
-
|
|
11951
|
-
|
|
11952
|
-
throw new Error(
|
|
11953
|
-
"no Phantom provider found (window.solana); pass opts.provider"
|
|
11954
|
-
);
|
|
11955
|
-
}
|
|
11956
|
-
const conn = await provider.connect();
|
|
11957
|
-
const pk = pubkeyBytes(
|
|
11958
|
-
provider.publicKey ?? conn.publicKey
|
|
11959
|
-
);
|
|
11960
|
-
const message = `${PHANTOM_DERIVATION_DOMAIN}
|
|
11961
|
-
${base.base58.encode(pk)}`;
|
|
11962
|
-
const signed = await provider.signMessage(
|
|
11963
|
-
new TextEncoder().encode(message),
|
|
11964
|
-
"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."
|
|
11965
12328
|
);
|
|
11966
|
-
return unifiedAccountFromPhantomSignature(signatureBytes(signed));
|
|
11967
12329
|
}
|
|
11968
12330
|
async function directSignerFromPrivateKey(privateKey, prefix) {
|
|
11969
12331
|
if (privateKey.length !== 32) {
|
|
@@ -12341,21 +12703,29 @@ function attachHybridExtension(body, ext, opts = {}) {
|
|
|
12341
12703
|
}
|
|
12342
12704
|
return next;
|
|
12343
12705
|
}
|
|
12706
|
+
|
|
12707
|
+
// src/tx/signbytes.ts
|
|
12708
|
+
var SIGN_BYTES_V2_UPGRADE = "v3.2.0";
|
|
12709
|
+
var SIGN_BYTES_V2_UPGRADES = ["v3.2.0", "v3.1.98"];
|
|
12710
|
+
var LEGACY_SIGN_BYTES_CHAINS = [
|
|
12711
|
+
"qorechain-vladi",
|
|
12712
|
+
"qorechain-diana"
|
|
12713
|
+
];
|
|
12714
|
+
var HYBRID_SIGN_BYTES_V2_DOMAIN = "qorechain-pqc-hybrid-v2";
|
|
12715
|
+
var MIGRATION_SIGN_BYTES_V2_DOMAIN = "qorechain-key-migration-v2";
|
|
12716
|
+
var BRIDGE_ATTESTATION_V2_DOMAIN = "qorechain-bridge-attestation-v2";
|
|
12717
|
+
var utf8 = new TextEncoder();
|
|
12344
12718
|
function be32(n) {
|
|
12345
12719
|
const b = new Uint8Array(4);
|
|
12346
|
-
b
|
|
12347
|
-
b[1] = n >>> 16 & 255;
|
|
12348
|
-
b[2] = n >>> 8 & 255;
|
|
12349
|
-
b[3] = n & 255;
|
|
12720
|
+
new DataView(b.buffer).setUint32(0, n >>> 0, false);
|
|
12350
12721
|
return b;
|
|
12351
12722
|
}
|
|
12352
|
-
function
|
|
12353
|
-
const
|
|
12354
|
-
|
|
12355
|
-
|
|
12356
|
-
return out;
|
|
12723
|
+
function be642(n) {
|
|
12724
|
+
const b = new Uint8Array(8);
|
|
12725
|
+
new DataView(b.buffer).setBigUint64(0, BigInt(n), false);
|
|
12726
|
+
return b;
|
|
12357
12727
|
}
|
|
12358
|
-
function
|
|
12728
|
+
function concat2(parts) {
|
|
12359
12729
|
let total = 0;
|
|
12360
12730
|
for (const p of parts) total += p.length;
|
|
12361
12731
|
const out = new Uint8Array(total);
|
|
@@ -12366,6 +12736,161 @@ function concatBytes(...parts) {
|
|
|
12366
12736
|
}
|
|
12367
12737
|
return out;
|
|
12368
12738
|
}
|
|
12739
|
+
function assertVersion(version) {
|
|
12740
|
+
if (version !== "v1" && version !== "v2") {
|
|
12741
|
+
throw new Error(`sign-bytes version must be "v1" or "v2", got ${JSON.stringify(version)}`);
|
|
12742
|
+
}
|
|
12743
|
+
}
|
|
12744
|
+
function hybridSignBytesV1(b0, authInfo) {
|
|
12745
|
+
return concat2([be32(b0.length), b0, be32(authInfo.length), authInfo]);
|
|
12746
|
+
}
|
|
12747
|
+
function hybridSignBytesV2(chainId, b0, authInfo) {
|
|
12748
|
+
const cid = utf8.encode(chainId);
|
|
12749
|
+
return concat2([
|
|
12750
|
+
utf8.encode(HYBRID_SIGN_BYTES_V2_DOMAIN),
|
|
12751
|
+
be642(cid.length),
|
|
12752
|
+
cid,
|
|
12753
|
+
be32(b0.length),
|
|
12754
|
+
b0,
|
|
12755
|
+
be32(authInfo.length),
|
|
12756
|
+
authInfo
|
|
12757
|
+
]);
|
|
12758
|
+
}
|
|
12759
|
+
function hybridSignBytes(version, chainId, b0, authInfo) {
|
|
12760
|
+
assertVersion(version);
|
|
12761
|
+
return version === "v2" ? hybridSignBytesV2(chainId, b0, authInfo) : hybridSignBytesV1(b0, authInfo);
|
|
12762
|
+
}
|
|
12763
|
+
function migrationSignBytesV1(input) {
|
|
12764
|
+
return utf8.encode(
|
|
12765
|
+
`qorechain-key-migration:chain=${input.chainId}:from=${input.fromAlgorithmId}:to=${input.toAlgorithmId}:account=${input.account}:height=${BigInt(input.height)}`
|
|
12766
|
+
);
|
|
12767
|
+
}
|
|
12768
|
+
function migrationSignBytesV2(input) {
|
|
12769
|
+
const cid = utf8.encode(input.chainId);
|
|
12770
|
+
const acct = utf8.encode(input.account);
|
|
12771
|
+
return concat2([
|
|
12772
|
+
utf8.encode(MIGRATION_SIGN_BYTES_V2_DOMAIN),
|
|
12773
|
+
be642(cid.length),
|
|
12774
|
+
cid,
|
|
12775
|
+
be642(acct.length),
|
|
12776
|
+
acct,
|
|
12777
|
+
be32(input.fromAlgorithmId),
|
|
12778
|
+
be32(input.toAlgorithmId),
|
|
12779
|
+
be642(input.height),
|
|
12780
|
+
be32(input.oldPublicKey.length),
|
|
12781
|
+
input.oldPublicKey,
|
|
12782
|
+
be32(input.newPublicKey.length),
|
|
12783
|
+
input.newPublicKey
|
|
12784
|
+
]);
|
|
12785
|
+
}
|
|
12786
|
+
function migrationSignBytes(version, input) {
|
|
12787
|
+
assertVersion(version);
|
|
12788
|
+
return version === "v2" ? migrationSignBytesV2(input) : migrationSignBytesV1(input);
|
|
12789
|
+
}
|
|
12790
|
+
function bridgeAttestationSignBytesV1(input) {
|
|
12791
|
+
return utf8.encode(
|
|
12792
|
+
[input.chain, input.eventType, input.operationId, input.txHash, input.amount, input.asset].join("|")
|
|
12793
|
+
);
|
|
12794
|
+
}
|
|
12795
|
+
function bridgeAttestationSignBytesV2(input) {
|
|
12796
|
+
const parts = [utf8.encode(BRIDGE_ATTESTATION_V2_DOMAIN)];
|
|
12797
|
+
for (const f of [
|
|
12798
|
+
input.chainId,
|
|
12799
|
+
input.chain,
|
|
12800
|
+
input.eventType,
|
|
12801
|
+
input.operationId,
|
|
12802
|
+
input.txHash,
|
|
12803
|
+
input.amount,
|
|
12804
|
+
input.asset
|
|
12805
|
+
]) {
|
|
12806
|
+
const b = utf8.encode(f);
|
|
12807
|
+
parts.push(be642(b.length), b);
|
|
12808
|
+
}
|
|
12809
|
+
return concat2(parts);
|
|
12810
|
+
}
|
|
12811
|
+
function bridgeAttestationSignBytes(version, input) {
|
|
12812
|
+
assertVersion(version);
|
|
12813
|
+
return version === "v2" ? bridgeAttestationSignBytesV2(input) : bridgeAttestationSignBytesV1(input);
|
|
12814
|
+
}
|
|
12815
|
+
function isLegacySignBytesChain(chainId) {
|
|
12816
|
+
return LEGACY_SIGN_BYTES_CHAINS.includes(chainId);
|
|
12817
|
+
}
|
|
12818
|
+
function signBytesVersionFor(chainId, v2AppliedHeight) {
|
|
12819
|
+
return BigInt(v2AppliedHeight) > 0n || !isLegacySignBytesChain(chainId) ? "v2" : "v1";
|
|
12820
|
+
}
|
|
12821
|
+
function parseAppliedHeight(body) {
|
|
12822
|
+
const h = body?.height;
|
|
12823
|
+
if (h === void 0 || h === null || h === "") return 0n;
|
|
12824
|
+
if (typeof h !== "string" && typeof h !== "number" && typeof h !== "bigint") {
|
|
12825
|
+
throw new Error(`unexpected applied_plan height ${JSON.stringify(h)}`);
|
|
12826
|
+
}
|
|
12827
|
+
return BigInt(h);
|
|
12828
|
+
}
|
|
12829
|
+
async function fetchSignBytesV2AppliedHeight(rest, fetchImpl = globalThis.fetch, upgradeName = SIGN_BYTES_V2_UPGRADE) {
|
|
12830
|
+
const url = `${rest.replace(/\/+$/, "")}/cosmos/upgrade/v1beta1/applied_plan/${upgradeName}`;
|
|
12831
|
+
const res = await fetchImpl(url);
|
|
12832
|
+
if (!res.ok) {
|
|
12833
|
+
throw new Error(`applied_plan query failed: HTTP ${res.status} from ${url}`);
|
|
12834
|
+
}
|
|
12835
|
+
return parseAppliedHeight(await res.json());
|
|
12836
|
+
}
|
|
12837
|
+
async function fetchSignBytesV2AppliedHeightAny(rest, fetchImpl = globalThis.fetch) {
|
|
12838
|
+
for (const name of SIGN_BYTES_V2_UPGRADES) {
|
|
12839
|
+
const height = await fetchSignBytesV2AppliedHeight(rest, fetchImpl, name);
|
|
12840
|
+
if (height > 0n) return height;
|
|
12841
|
+
}
|
|
12842
|
+
return 0n;
|
|
12843
|
+
}
|
|
12844
|
+
var cache = /* @__PURE__ */ new Map();
|
|
12845
|
+
function clearSignBytesCache() {
|
|
12846
|
+
cache.clear();
|
|
12847
|
+
}
|
|
12848
|
+
async function resolveSignBytesVersion(opts) {
|
|
12849
|
+
const requested = opts.signBytesVersion ?? "auto";
|
|
12850
|
+
if (requested === "v1" || requested === "v2") return requested;
|
|
12851
|
+
if (requested !== "auto") {
|
|
12852
|
+
throw new Error(`signBytesVersion must be "auto", "v1" or "v2", got ${JSON.stringify(requested)}`);
|
|
12853
|
+
}
|
|
12854
|
+
if (!isLegacySignBytesChain(opts.chainId)) return "v2";
|
|
12855
|
+
if (!opts.rest) {
|
|
12856
|
+
throw new Error(
|
|
12857
|
+
`cannot choose the hybrid sign-bytes form for ${opts.chainId} without its REST endpoint: pass rest, or signBytesVersion "v1" (before the ${SIGN_BYTES_V2_UPGRADES.join(" / ")} upgrade) or "v2" (after)`
|
|
12858
|
+
);
|
|
12859
|
+
}
|
|
12860
|
+
const key = `${opts.rest}\0${opts.chainId}`;
|
|
12861
|
+
const ttl = opts.ttlMs ?? 6e4;
|
|
12862
|
+
const hit = cache.get(key);
|
|
12863
|
+
if (!opts.forceRefresh && hit && Date.now() - hit.at < ttl) return hit.version;
|
|
12864
|
+
let height;
|
|
12865
|
+
try {
|
|
12866
|
+
height = await fetchSignBytesV2AppliedHeightAny(opts.rest, opts.fetch);
|
|
12867
|
+
} catch (e) {
|
|
12868
|
+
throw new Error(
|
|
12869
|
+
`cannot ask ${opts.rest} whether any of ${SIGN_BYTES_V2_UPGRADES.join(", ")} is applied (${e.message}); pass signBytesVersion "v1" or "v2"`
|
|
12870
|
+
);
|
|
12871
|
+
}
|
|
12872
|
+
const version = signBytesVersionFor(opts.chainId, height);
|
|
12873
|
+
cache.set(key, { version, at: Date.now() });
|
|
12874
|
+
return version;
|
|
12875
|
+
}
|
|
12876
|
+
var HYBRID_SIGN_BYTES_REJECTION_LOG = "hybrid PQC signature verification failed";
|
|
12877
|
+
function isHybridSignBytesRejection(x) {
|
|
12878
|
+
if (x === null || x === void 0) return false;
|
|
12879
|
+
const o = x;
|
|
12880
|
+
if (o.codespace === "pqc" && Number(o.code) === 21) return true;
|
|
12881
|
+
for (const t of [o.log, o.rawLog, o.message]) {
|
|
12882
|
+
if (typeof t === "string" && t.includes(HYBRID_SIGN_BYTES_REJECTION_LOG)) return true;
|
|
12883
|
+
}
|
|
12884
|
+
return false;
|
|
12885
|
+
}
|
|
12886
|
+
|
|
12887
|
+
// src/tx/hybrid-tx.ts
|
|
12888
|
+
function fromBase64(b64) {
|
|
12889
|
+
const binary = atob(b64);
|
|
12890
|
+
const out = new Uint8Array(binary.length);
|
|
12891
|
+
for (let i = 0; i < binary.length; i++) out[i] = binary.charCodeAt(i);
|
|
12892
|
+
return out;
|
|
12893
|
+
}
|
|
12369
12894
|
async function buildHybridTx(opts) {
|
|
12370
12895
|
const {
|
|
12371
12896
|
registry,
|
|
@@ -12401,12 +12926,14 @@ async function buildHybridTx(opts) {
|
|
|
12401
12926
|
fee.payer,
|
|
12402
12927
|
signing.SignMode.SIGN_MODE_DIRECT
|
|
12403
12928
|
);
|
|
12404
|
-
const
|
|
12405
|
-
|
|
12406
|
-
|
|
12407
|
-
|
|
12408
|
-
|
|
12409
|
-
|
|
12929
|
+
const signBytesVersion = await resolveSignBytesVersion({
|
|
12930
|
+
chainId,
|
|
12931
|
+
rest: opts.rest,
|
|
12932
|
+
signBytesVersion: opts.signBytesVersion,
|
|
12933
|
+
fetch: opts.fetch,
|
|
12934
|
+
forceRefresh: opts.forceRefreshSignBytesVersion
|
|
12935
|
+
});
|
|
12936
|
+
const pqcSignedMessage = hybridSignBytes(signBytesVersion, chainId, b0, authInfoBytes);
|
|
12410
12937
|
const pqcSignature = pqcSign(pqcKeypair.secretKey, pqcSignedMessage);
|
|
12411
12938
|
const ext = buildHybridSignatureExtension({
|
|
12412
12939
|
algorithmId: AlgorithmDilithium5,
|
|
@@ -12440,18 +12967,34 @@ async function buildHybridTx(opts) {
|
|
|
12440
12967
|
txRawBytes,
|
|
12441
12968
|
authInfoBytes,
|
|
12442
12969
|
pqcSignedMessage,
|
|
12443
|
-
pqcSignature
|
|
12970
|
+
pqcSignature,
|
|
12971
|
+
signBytesVersion
|
|
12444
12972
|
};
|
|
12445
12973
|
}
|
|
12446
12974
|
async function signAndBroadcastHybrid(opts) {
|
|
12975
|
+
const auto = (opts.signBytesVersion ?? "auto") === "auto";
|
|
12976
|
+
try {
|
|
12977
|
+
return await broadcastHybridOnce(opts, false);
|
|
12978
|
+
} catch (e) {
|
|
12979
|
+
if (!auto || !isHybridSignBytesRejection(e)) throw e;
|
|
12980
|
+
return broadcastHybridOnce(opts, true);
|
|
12981
|
+
}
|
|
12982
|
+
}
|
|
12983
|
+
async function broadcastHybridOnce(opts, forceRefresh) {
|
|
12447
12984
|
const { transport } = opts;
|
|
12448
12985
|
const mode = opts.mode ?? "commit";
|
|
12449
|
-
const built = await buildHybridTx(
|
|
12986
|
+
const built = await buildHybridTx({
|
|
12987
|
+
...opts,
|
|
12988
|
+
forceRefreshSignBytesVersion: forceRefresh || opts.forceRefreshSignBytesVersion
|
|
12989
|
+
});
|
|
12450
12990
|
if (mode === "commit") {
|
|
12451
12991
|
const res = await transport.broadcastTx(built.txRawBytes);
|
|
12452
12992
|
if (res.code !== 0) {
|
|
12453
|
-
throw
|
|
12454
|
-
|
|
12993
|
+
throw Object.assign(
|
|
12994
|
+
new Error(
|
|
12995
|
+
`hybrid transaction failed with code ${res.code}: ${res.rawLog ?? "(no log)"} (hash ${res.transactionHash})`
|
|
12996
|
+
),
|
|
12997
|
+
{ code: res.code, rawLog: res.rawLog, transactionHash: res.transactionHash }
|
|
12455
12998
|
);
|
|
12456
12999
|
}
|
|
12457
13000
|
return {
|
|
@@ -12475,24 +13018,11 @@ function fromHex(hex) {
|
|
|
12475
13018
|
}
|
|
12476
13019
|
return bytes;
|
|
12477
13020
|
}
|
|
12478
|
-
function
|
|
12479
|
-
|
|
12480
|
-
|
|
12481
|
-
|
|
12482
|
-
|
|
12483
|
-
b[3] = n & 255;
|
|
12484
|
-
return b;
|
|
12485
|
-
}
|
|
12486
|
-
function concatBytes2(...parts) {
|
|
12487
|
-
let total = 0;
|
|
12488
|
-
for (const p of parts) total += p.length;
|
|
12489
|
-
const out = new Uint8Array(total);
|
|
12490
|
-
let off = 0;
|
|
12491
|
-
for (const p of parts) {
|
|
12492
|
-
out.set(p, off);
|
|
12493
|
-
off += p.length;
|
|
12494
|
-
}
|
|
12495
|
-
return out;
|
|
13021
|
+
function defaultSignBytesVersion(chainId) {
|
|
13022
|
+
if (!isLegacySignBytesChain(chainId)) return "v2";
|
|
13023
|
+
throw new Error(
|
|
13024
|
+
`signHybridEth on ${chainId} needs signBytesVersion: resolve it with resolveSignBytesVersion({ chainId, rest }) \u2014 the network switches from v1 to v2 at its own upgrade height`
|
|
13025
|
+
);
|
|
12496
13026
|
}
|
|
12497
13027
|
function encodeMessages(params) {
|
|
12498
13028
|
const enc3 = params.encodeMessage;
|
|
@@ -12578,12 +13108,8 @@ function signHybridEth(params) {
|
|
|
12578
13108
|
const b0 = tx$1.TxBody.encode(
|
|
12579
13109
|
tx$1.TxBody.fromPartial({ messages: encodedMessages, memo, timeoutHeight })
|
|
12580
13110
|
).finish();
|
|
12581
|
-
const
|
|
12582
|
-
|
|
12583
|
-
b0,
|
|
12584
|
-
be322(authInfoBytes.length),
|
|
12585
|
-
authInfoBytes
|
|
12586
|
-
);
|
|
13111
|
+
const version = params.signBytesVersion ?? defaultSignBytesVersion(params.chainId);
|
|
13112
|
+
const pqcSignedMessage = hybridSignBytes(version, params.chainId, b0, authInfoBytes);
|
|
12587
13113
|
const pqcSignature = pqcSign(params.account.pqc.secretKey, pqcSignedMessage);
|
|
12588
13114
|
const ext = buildHybridSignatureExtension({
|
|
12589
13115
|
algorithmId: AlgorithmDilithium5,
|
|
@@ -12632,6 +13158,22 @@ var EthNativeSigner = class {
|
|
|
12632
13158
|
};
|
|
12633
13159
|
this.registry = opts.registry ?? qorechainRegistry();
|
|
12634
13160
|
this.signMode = opts.signMode ?? "hybrid";
|
|
13161
|
+
this.signBytesVersion = opts.signBytesVersion ?? "auto";
|
|
13162
|
+
this.rest = opts.rest;
|
|
13163
|
+
this.fetchImpl = opts.fetch;
|
|
13164
|
+
}
|
|
13165
|
+
/**
|
|
13166
|
+
* The hybrid sign-bytes form for `chainId` under this signer's settings.
|
|
13167
|
+
* Pass `forceRefresh` to bypass the cached answer.
|
|
13168
|
+
*/
|
|
13169
|
+
resolveSignBytesVersion(chainId, forceRefresh = false) {
|
|
13170
|
+
return resolveSignBytesVersion({
|
|
13171
|
+
chainId,
|
|
13172
|
+
rest: this.rest,
|
|
13173
|
+
signBytesVersion: this.signBytesVersion,
|
|
13174
|
+
fetch: this.fetchImpl,
|
|
13175
|
+
forceRefresh
|
|
13176
|
+
});
|
|
12635
13177
|
}
|
|
12636
13178
|
/** Build and sign a `TxRaw` for the given messages. Does not broadcast. */
|
|
12637
13179
|
sign(params) {
|
|
@@ -12644,20 +13186,34 @@ var EthNativeSigner = class {
|
|
|
12644
13186
|
sequence: params.sequence,
|
|
12645
13187
|
memo: params.memo,
|
|
12646
13188
|
timeoutHeight: params.timeoutHeight,
|
|
12647
|
-
encodeMessage: this.encode
|
|
13189
|
+
encodeMessage: this.encode,
|
|
13190
|
+
signBytesVersion: params.signBytesVersion ?? (this.signBytesVersion === "auto" ? void 0 : this.signBytesVersion)
|
|
12648
13191
|
};
|
|
12649
13192
|
return this.signMode === "classical" ? signClassicalEth(signParams) : signHybridEth(signParams);
|
|
12650
13193
|
}
|
|
12651
13194
|
/** Sign and broadcast the given messages via `transport`. */
|
|
12652
13195
|
async signAndBroadcast(transport, params) {
|
|
12653
|
-
const
|
|
12654
|
-
|
|
12655
|
-
|
|
12656
|
-
|
|
12657
|
-
|
|
12658
|
-
|
|
13196
|
+
const once = async (forceRefresh) => {
|
|
13197
|
+
const signBytesVersion = this.signMode === "hybrid" ? params.signBytesVersion ?? await this.resolveSignBytesVersion(params.chainId, forceRefresh) : void 0;
|
|
13198
|
+
const { txRawBytes } = this.sign({ ...params, signBytesVersion });
|
|
13199
|
+
const res = await transport.broadcastTx(txRawBytes);
|
|
13200
|
+
if (res.code !== 0) {
|
|
13201
|
+
throw Object.assign(
|
|
13202
|
+
new Error(
|
|
13203
|
+
`eth-native tx failed with code ${res.code}: ${res.rawLog ?? "(no log)"} (hash ${res.transactionHash})`
|
|
13204
|
+
),
|
|
13205
|
+
{ code: res.code, rawLog: res.rawLog, transactionHash: res.transactionHash }
|
|
13206
|
+
);
|
|
13207
|
+
}
|
|
13208
|
+
return res;
|
|
13209
|
+
};
|
|
13210
|
+
const auto = this.signMode === "hybrid" && params.signBytesVersion === void 0 && this.signBytesVersion === "auto";
|
|
13211
|
+
try {
|
|
13212
|
+
return await once(false);
|
|
13213
|
+
} catch (e) {
|
|
13214
|
+
if (!auto || !isHybridSignBytesRejection(e)) throw e;
|
|
13215
|
+
return once(true);
|
|
12659
13216
|
}
|
|
12660
|
-
return res;
|
|
12661
13217
|
}
|
|
12662
13218
|
/** Send `amount` to `toAddress` via a bank `MsgSend`, signed eth-native. */
|
|
12663
13219
|
bankSend(transport, toAddress, amount, params) {
|
|
@@ -12953,6 +13509,20 @@ var svm = {
|
|
|
12953
13509
|
registerSvmPqcKey: composer2(
|
|
12954
13510
|
"/qorechain.svm.v1.MsgRegisterSVMPQCKey",
|
|
12955
13511
|
MsgRegisterSVMPQCKey
|
|
13512
|
+
),
|
|
13513
|
+
/**
|
|
13514
|
+
* Replace the x/svm runtime parameters wholesale (chain v3.1.97).
|
|
13515
|
+
*
|
|
13516
|
+
* GOVERNANCE ONLY: `authority` must be the governance module account, so this
|
|
13517
|
+
* message is submitted inside a gov proposal, not signed by a user. It is what
|
|
13518
|
+
* makes enabling/disabling the SVM lane a proposal rather than a binary
|
|
13519
|
+
* release. `params` is replaced in full — send every field, not just the ones
|
|
13520
|
+
* you mean to change. `rentExemptionMulti` is a `LegacyDec` string (e.g.
|
|
13521
|
+
* `"2.000000000000000000"`).
|
|
13522
|
+
*/
|
|
13523
|
+
updateParams: composer2(
|
|
13524
|
+
"/qorechain.svm.v1.MsgUpdateParams",
|
|
13525
|
+
MsgUpdateParams
|
|
12956
13526
|
)
|
|
12957
13527
|
};
|
|
12958
13528
|
var lightnode = {
|
|
@@ -26291,6 +26861,30 @@ function extractMessageIds(result) {
|
|
|
26291
26861
|
}
|
|
26292
26862
|
return ids;
|
|
26293
26863
|
}
|
|
26864
|
+
var CROSSVM_CALL_RESPONSE_TYPE_URL = "/qorechain.crossvm.v1.MsgCrossVMCallResponse";
|
|
26865
|
+
function unknownOutcome() {
|
|
26866
|
+
return { executed: false, data: new Uint8Array(0), gasUsed: 0n };
|
|
26867
|
+
}
|
|
26868
|
+
function decodeCallOutcomes(result) {
|
|
26869
|
+
const responses = result.msgResponses;
|
|
26870
|
+
if (!Array.isArray(responses)) return [];
|
|
26871
|
+
const out = [];
|
|
26872
|
+
for (const r of responses) {
|
|
26873
|
+
if (r?.typeUrl !== CROSSVM_CALL_RESPONSE_TYPE_URL) continue;
|
|
26874
|
+
try {
|
|
26875
|
+
const decoded = MsgCrossVMCallResponse.decode(r.value);
|
|
26876
|
+
out.push({
|
|
26877
|
+
executed: decoded.executed,
|
|
26878
|
+
data: decoded.data,
|
|
26879
|
+
// uint64 is generated as a decimal string; surface it as a bigint.
|
|
26880
|
+
gasUsed: BigInt(decoded.gasUsed ?? 0)
|
|
26881
|
+
});
|
|
26882
|
+
} catch {
|
|
26883
|
+
out.push(unknownOutcome());
|
|
26884
|
+
}
|
|
26885
|
+
}
|
|
26886
|
+
return out;
|
|
26887
|
+
}
|
|
26294
26888
|
function createCrossVMClient(tx, opts = {}) {
|
|
26295
26889
|
const sender = tx.senderAddress;
|
|
26296
26890
|
const query = opts.query;
|
|
@@ -26301,7 +26895,8 @@ function createCrossVMClient(tx, opts = {}) {
|
|
|
26301
26895
|
targetVm: o.targetVm,
|
|
26302
26896
|
targetContract: o.targetContract,
|
|
26303
26897
|
payload,
|
|
26304
|
-
funds: o.funds ?? []
|
|
26898
|
+
funds: o.funds ?? [],
|
|
26899
|
+
async: o.async ?? false
|
|
26305
26900
|
});
|
|
26306
26901
|
const buildCallSync = (o, payload) => buildFrom(o, payload);
|
|
26307
26902
|
const buildCall = (o) => {
|
|
@@ -26326,7 +26921,8 @@ function createCrossVMClient(tx, opts = {}) {
|
|
|
26326
26921
|
{ autoFee: o.autoFee }
|
|
26327
26922
|
);
|
|
26328
26923
|
const [messageId = ""] = extractMessageIds(result);
|
|
26329
|
-
|
|
26924
|
+
const [outcome = unknownOutcome()] = decodeCallOutcomes(result);
|
|
26925
|
+
return { messageId, ...outcome, result };
|
|
26330
26926
|
};
|
|
26331
26927
|
const callAtomic = async (calls, w = {}) => {
|
|
26332
26928
|
if (calls.length === 0) {
|
|
@@ -26341,7 +26937,11 @@ function createCrossVMClient(tx, opts = {}) {
|
|
|
26341
26937
|
w.memo ?? "",
|
|
26342
26938
|
{ autoFee: w.autoFee }
|
|
26343
26939
|
);
|
|
26344
|
-
return {
|
|
26940
|
+
return {
|
|
26941
|
+
messageIds: extractMessageIds(result),
|
|
26942
|
+
outcomes: decodeCallOutcomes(result),
|
|
26943
|
+
result
|
|
26944
|
+
};
|
|
26345
26945
|
};
|
|
26346
26946
|
const getMessage = (id) => {
|
|
26347
26947
|
requireGetMessageSource(query, qor);
|
|
@@ -26445,7 +27045,7 @@ async function migrateToHybrid(tx, opts) {
|
|
|
26445
27045
|
}
|
|
26446
27046
|
|
|
26447
27047
|
// src/index.ts
|
|
26448
|
-
var VERSION = "0.
|
|
27048
|
+
var VERSION = "0.8.0";
|
|
26449
27049
|
|
|
26450
27050
|
Object.defineProperty(exports, "AI_ANOMALY_CHECK_ADDRESS", {
|
|
26451
27051
|
enumerable: true,
|
|
@@ -26478,30 +27078,36 @@ Object.defineProperty(exports, "simulateWithRiskScore", {
|
|
|
26478
27078
|
exports.AlgorithmDilithium5 = AlgorithmDilithium5;
|
|
26479
27079
|
exports.AlgorithmMLKEM1024 = AlgorithmMLKEM1024;
|
|
26480
27080
|
exports.AlgorithmUnspecified = AlgorithmUnspecified;
|
|
27081
|
+
exports.BRIDGE_ATTESTATION_V2_DOMAIN = BRIDGE_ATTESTATION_V2_DOMAIN;
|
|
26481
27082
|
exports.CANONICAL_DERIVATION = CANONICAL_DERIVATION;
|
|
26482
27083
|
exports.DEFAULT_GAS_MULTIPLIER = DEFAULT_GAS_MULTIPLIER;
|
|
26483
27084
|
exports.DEFAULT_GAS_PRICE = DEFAULT_GAS_PRICE;
|
|
26484
27085
|
exports.ETHSECP256K1_PUBKEY_TYPE = ETHSECP256K1_PUBKEY_TYPE;
|
|
26485
27086
|
exports.EthNativeSigner = EthNativeSigner;
|
|
26486
27087
|
exports.GasPrice = GasPrice;
|
|
27088
|
+
exports.HYBRID_SIGN_BYTES_REJECTION_LOG = HYBRID_SIGN_BYTES_REJECTION_LOG;
|
|
27089
|
+
exports.HYBRID_SIGN_BYTES_V2_DOMAIN = HYBRID_SIGN_BYTES_V2_DOMAIN;
|
|
26487
27090
|
exports.HYBRID_SIG_TYPE_URL = HYBRID_SIG_TYPE_URL;
|
|
26488
27091
|
exports.HybridSigner = HybridSigner;
|
|
26489
27092
|
exports.JsonRpcClient = JsonRpcClient;
|
|
26490
27093
|
exports.JsonRpcError = JsonRpcError;
|
|
26491
27094
|
exports.LEGACY_DERIVATION = LEGACY_DERIVATION;
|
|
27095
|
+
exports.LEGACY_SIGN_BYTES_CHAINS = LEGACY_SIGN_BYTES_CHAINS;
|
|
27096
|
+
exports.MIGRATION_SIGN_BYTES_V2_DOMAIN = MIGRATION_SIGN_BYTES_V2_DOMAIN;
|
|
26492
27097
|
exports.ML_DSA_87_PUBLIC_KEY_LENGTH = ML_DSA_87_PUBLIC_KEY_LENGTH;
|
|
26493
27098
|
exports.ML_DSA_87_SECRET_KEY_LENGTH = ML_DSA_87_SECRET_KEY_LENGTH;
|
|
26494
27099
|
exports.ML_DSA_87_SEED_LENGTH = ML_DSA_87_SEED_LENGTH;
|
|
26495
27100
|
exports.ML_DSA_87_SIGNATURE_LENGTH = ML_DSA_87_SIGNATURE_LENGTH;
|
|
26496
27101
|
exports.MSG_SEND_TYPE_URL = MSG_SEND_TYPE_URL;
|
|
26497
27102
|
exports.NETWORKS = NETWORKS;
|
|
26498
|
-
exports.PHANTOM_DERIVATION_DOMAIN = PHANTOM_DERIVATION_DOMAIN;
|
|
26499
27103
|
exports.PQC_KEY_STATUS_PRECOMPILE_ADDRESS = PQC_KEY_STATUS_PRECOMPILE_ADDRESS;
|
|
26500
27104
|
exports.PqcSigner = PqcSigner;
|
|
26501
27105
|
exports.QorClient = QorClient;
|
|
26502
27106
|
exports.QoreHttpError = QoreHttpError;
|
|
26503
27107
|
exports.QoreTxError = QoreTxError;
|
|
26504
27108
|
exports.RestClient = RestClient;
|
|
27109
|
+
exports.SIGN_BYTES_V2_UPGRADE = SIGN_BYTES_V2_UPGRADE;
|
|
27110
|
+
exports.SIGN_BYTES_V2_UPGRADES = SIGN_BYTES_V2_UPGRADES;
|
|
26505
27111
|
exports.STATIC_FALLBACK = STATIC_FALLBACK;
|
|
26506
27112
|
exports.TxClient = TxClient;
|
|
26507
27113
|
exports.VERSION = VERSION;
|
|
@@ -26517,6 +27123,9 @@ exports.bank = bank;
|
|
|
26517
27123
|
exports.be64 = be64;
|
|
26518
27124
|
exports.bech32ToHex = bech32ToHex;
|
|
26519
27125
|
exports.bridge = bridge;
|
|
27126
|
+
exports.bridgeAttestationSignBytes = bridgeAttestationSignBytes;
|
|
27127
|
+
exports.bridgeAttestationSignBytesV1 = bridgeAttestationSignBytesV1;
|
|
27128
|
+
exports.bridgeAttestationSignBytesV2 = bridgeAttestationSignBytesV2;
|
|
26520
27129
|
exports.broadcastAndWait = broadcastAndWait;
|
|
26521
27130
|
exports.buildAminoTypes = buildAminoTypes;
|
|
26522
27131
|
exports.buildEventsQuery = buildEventsQuery;
|
|
@@ -26532,6 +27141,7 @@ exports.buildUrl = buildUrl;
|
|
|
26532
27141
|
exports.bytesToBech32 = bytesToBech32;
|
|
26533
27142
|
exports.calculateFee = calculateFee;
|
|
26534
27143
|
exports.clearAdmin = clearAdmin;
|
|
27144
|
+
exports.clearSignBytesCache = clearSignBytesCache;
|
|
26535
27145
|
exports.connectCosmWasmSigner = connectCosmWasmSigner;
|
|
26536
27146
|
exports.connectPhantomUnified = connectPhantomUnified;
|
|
26537
27147
|
exports.connectQueryClients = connectQueryClients;
|
|
@@ -26564,6 +27174,8 @@ exports.explorerAddressUrl = explorerAddressUrl;
|
|
|
26564
27174
|
exports.explorerBlockUrl = explorerBlockUrl;
|
|
26565
27175
|
exports.explorerTxUrl = explorerTxUrl;
|
|
26566
27176
|
exports.feegrant = feegrant;
|
|
27177
|
+
exports.fetchSignBytesV2AppliedHeight = fetchSignBytesV2AppliedHeight;
|
|
27178
|
+
exports.fetchSignBytesV2AppliedHeightAny = fetchSignBytesV2AppliedHeightAny;
|
|
26567
27179
|
exports.formatUnits = formatUnits;
|
|
26568
27180
|
exports.fromBase = fromBase;
|
|
26569
27181
|
exports.generateMnemonic = generateMnemonic;
|
|
@@ -26584,10 +27196,15 @@ exports.getPqcStatus = getPqcStatus;
|
|
|
26584
27196
|
exports.getTx = getTx;
|
|
26585
27197
|
exports.gov = gov;
|
|
26586
27198
|
exports.hexToBech32 = hexToBech32;
|
|
27199
|
+
exports.hybridSignBytes = hybridSignBytes;
|
|
27200
|
+
exports.hybridSignBytesV1 = hybridSignBytesV1;
|
|
27201
|
+
exports.hybridSignBytesV2 = hybridSignBytesV2;
|
|
26587
27202
|
exports.ibc = ibc;
|
|
26588
27203
|
exports.instantiate = instantiate;
|
|
26589
27204
|
exports.instantiate2 = instantiate2;
|
|
26590
27205
|
exports.isChecksumAddress = isChecksumAddress;
|
|
27206
|
+
exports.isHybridSignBytesRejection = isHybridSignBytesRejection;
|
|
27207
|
+
exports.isLegacySignBytesChain = isLegacySignBytesChain;
|
|
26591
27208
|
exports.isPqcRegistered = isPqcRegistered;
|
|
26592
27209
|
exports.isSignatureAlgorithm = isSignatureAlgorithm;
|
|
26593
27210
|
exports.isTxFailure = isTxFailure;
|
|
@@ -26604,6 +27221,9 @@ exports.listNetworks = listNetworks;
|
|
|
26604
27221
|
exports.migrate = migrate;
|
|
26605
27222
|
exports.migratePqcKey = migratePqcKey;
|
|
26606
27223
|
exports.migrateToHybrid = migrateToHybrid;
|
|
27224
|
+
exports.migrationSignBytes = migrationSignBytes;
|
|
27225
|
+
exports.migrationSignBytesV1 = migrationSignBytesV1;
|
|
27226
|
+
exports.migrationSignBytesV2 = migrationSignBytesV2;
|
|
26607
27227
|
exports.msg = msg;
|
|
26608
27228
|
exports.multilayer = multilayer;
|
|
26609
27229
|
exports.parseEthPubkeyAny = parseEthPubkeyAny;
|
|
@@ -26621,6 +27241,7 @@ exports.queryContractSmart = queryContractSmart;
|
|
|
26621
27241
|
exports.rdk = rdk;
|
|
26622
27242
|
exports.registerEthAuthenticatorMsg = registerEthAuthenticatorMsg;
|
|
26623
27243
|
exports.requestFaucet = requestFaucet;
|
|
27244
|
+
exports.resolveSignBytesVersion = resolveSignBytesVersion;
|
|
26624
27245
|
exports.revokeAuthenticatorMsg = revokeAuthenticatorMsg;
|
|
26625
27246
|
exports.ripemd160 = ripemd160;
|
|
26626
27247
|
exports.ripemd160Hex = ripemd160Hex;
|
|
@@ -26632,6 +27253,7 @@ exports.searchTxs = searchTxs;
|
|
|
26632
27253
|
exports.sha256 = sha256;
|
|
26633
27254
|
exports.sha256Hex = sha256Hex;
|
|
26634
27255
|
exports.signAndBroadcastHybrid = signAndBroadcastHybrid;
|
|
27256
|
+
exports.signBytesVersionFor = signBytesVersionFor;
|
|
26635
27257
|
exports.signClassicalEth = signClassicalEth;
|
|
26636
27258
|
exports.signHybridEth = signHybridEth;
|
|
26637
27259
|
exports.staking = staking;
|