@kimafinance/kima-transaction-api 1.0.26-beta.1 → 1.0.28-beta.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/build/index.d.ts +16 -2
- package/build/index.js +33 -1
- package/build/kima/common.d.ts +3 -1
- package/build/kima/common.js +10 -0
- package/build/kima/tx.d.ts +92 -9
- package/build/kima/tx.js +320 -19
- package/package.json +1 -1
- package/src/index.ts +73 -3
- package/src/kima/common.ts +16 -1
- package/src/kima/tx.ts +415 -21
package/src/kima/tx.ts
CHANGED
|
@@ -35,8 +35,9 @@ export interface MsgFinalizeTransaction {
|
|
|
35
35
|
creator: string;
|
|
36
36
|
txId: number;
|
|
37
37
|
txHash: string;
|
|
38
|
-
success:
|
|
38
|
+
success: boolean;
|
|
39
39
|
signedKey: string;
|
|
40
|
+
errReason: string;
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
export interface MsgFinalizeTransactionResponse {
|
|
@@ -48,8 +49,9 @@ export interface MsgFinalizeProvisionTransaction {
|
|
|
48
49
|
creator: string;
|
|
49
50
|
txId: number;
|
|
50
51
|
txHash: string;
|
|
51
|
-
success:
|
|
52
|
+
success: boolean;
|
|
52
53
|
signedKey: string;
|
|
54
|
+
errReason: string;
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
export interface MsgFinalizeProvisionTransactionResponse {
|
|
@@ -135,8 +137,9 @@ export interface MsgFinalizeDrainTransaction {
|
|
|
135
137
|
creator: string;
|
|
136
138
|
txId: number;
|
|
137
139
|
txHash: string;
|
|
138
|
-
success:
|
|
140
|
+
success: boolean;
|
|
139
141
|
signedKey: string;
|
|
142
|
+
errReason: string;
|
|
140
143
|
}
|
|
141
144
|
|
|
142
145
|
export interface MsgFinalizeDrainTransactionResponse {
|
|
@@ -144,6 +147,26 @@ export interface MsgFinalizeDrainTransactionResponse {
|
|
|
144
147
|
msg: string;
|
|
145
148
|
}
|
|
146
149
|
|
|
150
|
+
export interface MsgRequestHtlcLock {
|
|
151
|
+
creator: string;
|
|
152
|
+
fromAddress: string;
|
|
153
|
+
senderPubkey: string;
|
|
154
|
+
amount: string;
|
|
155
|
+
htlcTimeout: string;
|
|
156
|
+
txHash: string;
|
|
157
|
+
htlcAddress: string;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface MsgRequestHtlcLockResponse {}
|
|
161
|
+
|
|
162
|
+
export interface MsgHtlcReclaim {
|
|
163
|
+
creator: string;
|
|
164
|
+
txHash: string;
|
|
165
|
+
senderAddress: string;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export interface MsgHtlcReclaimResponse {}
|
|
169
|
+
|
|
147
170
|
function createBaseMsgRequestTransaction(): MsgRequestTransaction {
|
|
148
171
|
return {
|
|
149
172
|
creator: "",
|
|
@@ -424,7 +447,14 @@ export const MsgRequestTransactionResponse = {
|
|
|
424
447
|
};
|
|
425
448
|
|
|
426
449
|
function createBaseMsgFinalizeTransaction(): MsgFinalizeTransaction {
|
|
427
|
-
return {
|
|
450
|
+
return {
|
|
451
|
+
creator: "",
|
|
452
|
+
txId: 0,
|
|
453
|
+
txHash: "",
|
|
454
|
+
success: false,
|
|
455
|
+
signedKey: "",
|
|
456
|
+
errReason: "",
|
|
457
|
+
};
|
|
428
458
|
}
|
|
429
459
|
|
|
430
460
|
export const MsgFinalizeTransaction = {
|
|
@@ -441,12 +471,15 @@ export const MsgFinalizeTransaction = {
|
|
|
441
471
|
if (message.txHash !== "") {
|
|
442
472
|
writer.uint32(26).string(message.txHash);
|
|
443
473
|
}
|
|
444
|
-
if (message.success
|
|
445
|
-
writer.uint32(
|
|
474
|
+
if (message.success === true) {
|
|
475
|
+
writer.uint32(32).bool(message.success);
|
|
446
476
|
}
|
|
447
477
|
if (message.signedKey !== "") {
|
|
448
478
|
writer.uint32(42).string(message.signedKey);
|
|
449
479
|
}
|
|
480
|
+
if (message.errReason !== "") {
|
|
481
|
+
writer.uint32(50).string(message.errReason);
|
|
482
|
+
}
|
|
450
483
|
return writer;
|
|
451
484
|
},
|
|
452
485
|
|
|
@@ -470,11 +503,14 @@ export const MsgFinalizeTransaction = {
|
|
|
470
503
|
message.txHash = reader.string();
|
|
471
504
|
break;
|
|
472
505
|
case 4:
|
|
473
|
-
message.success = reader.
|
|
506
|
+
message.success = reader.bool();
|
|
474
507
|
break;
|
|
475
508
|
case 5:
|
|
476
509
|
message.signedKey = reader.string();
|
|
477
510
|
break;
|
|
511
|
+
case 6:
|
|
512
|
+
message.errReason = reader.string();
|
|
513
|
+
break;
|
|
478
514
|
default:
|
|
479
515
|
reader.skipType(tag & 7);
|
|
480
516
|
break;
|
|
@@ -488,8 +524,9 @@ export const MsgFinalizeTransaction = {
|
|
|
488
524
|
creator: isSet(object.creator) ? String(object.creator) : "",
|
|
489
525
|
txId: isSet(object.txId) ? Number(object.txId) : 0,
|
|
490
526
|
txHash: isSet(object.txHash) ? String(object.txHash) : "",
|
|
491
|
-
success: isSet(object.success) ?
|
|
527
|
+
success: isSet(object.success) ? Boolean(object.success) : false,
|
|
492
528
|
signedKey: isSet(object.signedKey) ? String(object.signedKey) : "",
|
|
529
|
+
errReason: isSet(object.errReason) ? String(object.errReason) : "",
|
|
493
530
|
};
|
|
494
531
|
},
|
|
495
532
|
|
|
@@ -500,6 +537,7 @@ export const MsgFinalizeTransaction = {
|
|
|
500
537
|
message.txHash !== undefined && (obj.txHash = message.txHash);
|
|
501
538
|
message.success !== undefined && (obj.success = message.success);
|
|
502
539
|
message.signedKey !== undefined && (obj.signedKey = message.signedKey);
|
|
540
|
+
message.errReason !== undefined && (obj.errReason = message.errReason);
|
|
503
541
|
return obj;
|
|
504
542
|
},
|
|
505
543
|
|
|
@@ -510,8 +548,9 @@ export const MsgFinalizeTransaction = {
|
|
|
510
548
|
message.creator = object.creator ?? "";
|
|
511
549
|
message.txId = object.txId ?? 0;
|
|
512
550
|
message.txHash = object.txHash ?? "";
|
|
513
|
-
message.success = object.success ??
|
|
551
|
+
message.success = object.success ?? false;
|
|
514
552
|
message.signedKey = object.signedKey ?? "";
|
|
553
|
+
message.errReason = object.errReason ?? "";
|
|
515
554
|
return message;
|
|
516
555
|
},
|
|
517
556
|
};
|
|
@@ -583,7 +622,14 @@ export const MsgFinalizeTransactionResponse = {
|
|
|
583
622
|
};
|
|
584
623
|
|
|
585
624
|
function createBaseMsgFinalizeProvisionTransaction(): MsgFinalizeProvisionTransaction {
|
|
586
|
-
return {
|
|
625
|
+
return {
|
|
626
|
+
creator: "",
|
|
627
|
+
txId: 0,
|
|
628
|
+
txHash: "",
|
|
629
|
+
success: false,
|
|
630
|
+
signedKey: "",
|
|
631
|
+
errReason: "",
|
|
632
|
+
};
|
|
587
633
|
}
|
|
588
634
|
|
|
589
635
|
export const MsgFinalizeProvisionTransaction = {
|
|
@@ -600,12 +646,15 @@ export const MsgFinalizeProvisionTransaction = {
|
|
|
600
646
|
if (message.txHash !== "") {
|
|
601
647
|
writer.uint32(26).string(message.txHash);
|
|
602
648
|
}
|
|
603
|
-
if (message.success
|
|
604
|
-
writer.uint32(
|
|
649
|
+
if (message.success === true) {
|
|
650
|
+
writer.uint32(32).bool(message.success);
|
|
605
651
|
}
|
|
606
652
|
if (message.signedKey !== "") {
|
|
607
653
|
writer.uint32(42).string(message.signedKey);
|
|
608
654
|
}
|
|
655
|
+
if (message.errReason !== "") {
|
|
656
|
+
writer.uint32(50).string(message.errReason);
|
|
657
|
+
}
|
|
609
658
|
return writer;
|
|
610
659
|
},
|
|
611
660
|
|
|
@@ -629,11 +678,14 @@ export const MsgFinalizeProvisionTransaction = {
|
|
|
629
678
|
message.txHash = reader.string();
|
|
630
679
|
break;
|
|
631
680
|
case 4:
|
|
632
|
-
message.success = reader.
|
|
681
|
+
message.success = reader.bool();
|
|
633
682
|
break;
|
|
634
683
|
case 5:
|
|
635
684
|
message.signedKey = reader.string();
|
|
636
685
|
break;
|
|
686
|
+
case 6:
|
|
687
|
+
message.errReason = reader.string();
|
|
688
|
+
break;
|
|
637
689
|
default:
|
|
638
690
|
reader.skipType(tag & 7);
|
|
639
691
|
break;
|
|
@@ -647,8 +699,9 @@ export const MsgFinalizeProvisionTransaction = {
|
|
|
647
699
|
creator: isSet(object.creator) ? String(object.creator) : "",
|
|
648
700
|
txId: isSet(object.txId) ? Number(object.txId) : 0,
|
|
649
701
|
txHash: isSet(object.txHash) ? String(object.txHash) : "",
|
|
650
|
-
success: isSet(object.success) ?
|
|
702
|
+
success: isSet(object.success) ? Boolean(object.success) : false,
|
|
651
703
|
signedKey: isSet(object.signedKey) ? String(object.signedKey) : "",
|
|
704
|
+
errReason: isSet(object.errReason) ? String(object.errReason) : "",
|
|
652
705
|
};
|
|
653
706
|
},
|
|
654
707
|
|
|
@@ -659,6 +712,7 @@ export const MsgFinalizeProvisionTransaction = {
|
|
|
659
712
|
message.txHash !== undefined && (obj.txHash = message.txHash);
|
|
660
713
|
message.success !== undefined && (obj.success = message.success);
|
|
661
714
|
message.signedKey !== undefined && (obj.signedKey = message.signedKey);
|
|
715
|
+
message.errReason !== undefined && (obj.errReason = message.errReason);
|
|
662
716
|
return obj;
|
|
663
717
|
},
|
|
664
718
|
|
|
@@ -669,8 +723,9 @@ export const MsgFinalizeProvisionTransaction = {
|
|
|
669
723
|
message.creator = object.creator ?? "";
|
|
670
724
|
message.txId = object.txId ?? 0;
|
|
671
725
|
message.txHash = object.txHash ?? "";
|
|
672
|
-
message.success = object.success ??
|
|
726
|
+
message.success = object.success ?? false;
|
|
673
727
|
message.signedKey = object.signedKey ?? "";
|
|
728
|
+
message.errReason = object.errReason ?? "";
|
|
674
729
|
return message;
|
|
675
730
|
},
|
|
676
731
|
};
|
|
@@ -1598,7 +1653,14 @@ export const MsgRequestDrainTransactionResponse = {
|
|
|
1598
1653
|
};
|
|
1599
1654
|
|
|
1600
1655
|
function createBaseMsgFinalizeDrainTransaction(): MsgFinalizeDrainTransaction {
|
|
1601
|
-
return {
|
|
1656
|
+
return {
|
|
1657
|
+
creator: "",
|
|
1658
|
+
txId: 0,
|
|
1659
|
+
txHash: "",
|
|
1660
|
+
success: false,
|
|
1661
|
+
signedKey: "",
|
|
1662
|
+
errReason: "",
|
|
1663
|
+
};
|
|
1602
1664
|
}
|
|
1603
1665
|
|
|
1604
1666
|
export const MsgFinalizeDrainTransaction = {
|
|
@@ -1615,12 +1677,15 @@ export const MsgFinalizeDrainTransaction = {
|
|
|
1615
1677
|
if (message.txHash !== "") {
|
|
1616
1678
|
writer.uint32(26).string(message.txHash);
|
|
1617
1679
|
}
|
|
1618
|
-
if (message.success
|
|
1619
|
-
writer.uint32(
|
|
1680
|
+
if (message.success === true) {
|
|
1681
|
+
writer.uint32(32).bool(message.success);
|
|
1620
1682
|
}
|
|
1621
1683
|
if (message.signedKey !== "") {
|
|
1622
1684
|
writer.uint32(42).string(message.signedKey);
|
|
1623
1685
|
}
|
|
1686
|
+
if (message.errReason !== "") {
|
|
1687
|
+
writer.uint32(50).string(message.errReason);
|
|
1688
|
+
}
|
|
1624
1689
|
return writer;
|
|
1625
1690
|
},
|
|
1626
1691
|
|
|
@@ -1644,11 +1709,14 @@ export const MsgFinalizeDrainTransaction = {
|
|
|
1644
1709
|
message.txHash = reader.string();
|
|
1645
1710
|
break;
|
|
1646
1711
|
case 4:
|
|
1647
|
-
message.success = reader.
|
|
1712
|
+
message.success = reader.bool();
|
|
1648
1713
|
break;
|
|
1649
1714
|
case 5:
|
|
1650
1715
|
message.signedKey = reader.string();
|
|
1651
1716
|
break;
|
|
1717
|
+
case 6:
|
|
1718
|
+
message.errReason = reader.string();
|
|
1719
|
+
break;
|
|
1652
1720
|
default:
|
|
1653
1721
|
reader.skipType(tag & 7);
|
|
1654
1722
|
break;
|
|
@@ -1662,8 +1730,9 @@ export const MsgFinalizeDrainTransaction = {
|
|
|
1662
1730
|
creator: isSet(object.creator) ? String(object.creator) : "",
|
|
1663
1731
|
txId: isSet(object.txId) ? Number(object.txId) : 0,
|
|
1664
1732
|
txHash: isSet(object.txHash) ? String(object.txHash) : "",
|
|
1665
|
-
success: isSet(object.success) ?
|
|
1733
|
+
success: isSet(object.success) ? Boolean(object.success) : false,
|
|
1666
1734
|
signedKey: isSet(object.signedKey) ? String(object.signedKey) : "",
|
|
1735
|
+
errReason: isSet(object.errReason) ? String(object.errReason) : "",
|
|
1667
1736
|
};
|
|
1668
1737
|
},
|
|
1669
1738
|
|
|
@@ -1674,6 +1743,7 @@ export const MsgFinalizeDrainTransaction = {
|
|
|
1674
1743
|
message.txHash !== undefined && (obj.txHash = message.txHash);
|
|
1675
1744
|
message.success !== undefined && (obj.success = message.success);
|
|
1676
1745
|
message.signedKey !== undefined && (obj.signedKey = message.signedKey);
|
|
1746
|
+
message.errReason !== undefined && (obj.errReason = message.errReason);
|
|
1677
1747
|
return obj;
|
|
1678
1748
|
},
|
|
1679
1749
|
|
|
@@ -1684,8 +1754,9 @@ export const MsgFinalizeDrainTransaction = {
|
|
|
1684
1754
|
message.creator = object.creator ?? "";
|
|
1685
1755
|
message.txId = object.txId ?? 0;
|
|
1686
1756
|
message.txHash = object.txHash ?? "";
|
|
1687
|
-
message.success = object.success ??
|
|
1757
|
+
message.success = object.success ?? false;
|
|
1688
1758
|
message.signedKey = object.signedKey ?? "";
|
|
1759
|
+
message.errReason = object.errReason ?? "";
|
|
1689
1760
|
return message;
|
|
1690
1761
|
},
|
|
1691
1762
|
};
|
|
@@ -1756,6 +1827,297 @@ export const MsgFinalizeDrainTransactionResponse = {
|
|
|
1756
1827
|
},
|
|
1757
1828
|
};
|
|
1758
1829
|
|
|
1830
|
+
function createBaseMsgRequestHtlcLock(): MsgRequestHtlcLock {
|
|
1831
|
+
return {
|
|
1832
|
+
creator: "",
|
|
1833
|
+
fromAddress: "",
|
|
1834
|
+
senderPubkey: "",
|
|
1835
|
+
amount: "",
|
|
1836
|
+
htlcTimeout: "",
|
|
1837
|
+
txHash: "",
|
|
1838
|
+
htlcAddress: "",
|
|
1839
|
+
};
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
export const MsgRequestHtlcLock = {
|
|
1843
|
+
encode(
|
|
1844
|
+
message: MsgRequestHtlcLock,
|
|
1845
|
+
writer: _m0.Writer = _m0.Writer.create()
|
|
1846
|
+
): _m0.Writer {
|
|
1847
|
+
if (message.creator !== "") {
|
|
1848
|
+
writer.uint32(10).string(message.creator);
|
|
1849
|
+
}
|
|
1850
|
+
if (message.fromAddress !== "") {
|
|
1851
|
+
writer.uint32(18).string(message.fromAddress);
|
|
1852
|
+
}
|
|
1853
|
+
if (message.senderPubkey !== "") {
|
|
1854
|
+
writer.uint32(26).string(message.senderPubkey);
|
|
1855
|
+
}
|
|
1856
|
+
if (message.amount !== "") {
|
|
1857
|
+
writer.uint32(34).string(message.amount);
|
|
1858
|
+
}
|
|
1859
|
+
if (message.htlcTimeout !== "") {
|
|
1860
|
+
writer.uint32(42).string(message.htlcTimeout);
|
|
1861
|
+
}
|
|
1862
|
+
if (message.txHash !== "") {
|
|
1863
|
+
writer.uint32(50).string(message.txHash);
|
|
1864
|
+
}
|
|
1865
|
+
if (message.htlcAddress !== "") {
|
|
1866
|
+
writer.uint32(58).string(message.htlcAddress);
|
|
1867
|
+
}
|
|
1868
|
+
return writer;
|
|
1869
|
+
},
|
|
1870
|
+
|
|
1871
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): MsgRequestHtlcLock {
|
|
1872
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1873
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1874
|
+
const message = createBaseMsgRequestHtlcLock();
|
|
1875
|
+
while (reader.pos < end) {
|
|
1876
|
+
const tag = reader.uint32();
|
|
1877
|
+
switch (tag >>> 3) {
|
|
1878
|
+
case 1:
|
|
1879
|
+
message.creator = reader.string();
|
|
1880
|
+
break;
|
|
1881
|
+
case 2:
|
|
1882
|
+
message.fromAddress = reader.string();
|
|
1883
|
+
break;
|
|
1884
|
+
case 3:
|
|
1885
|
+
message.senderPubkey = reader.string();
|
|
1886
|
+
break;
|
|
1887
|
+
case 4:
|
|
1888
|
+
message.amount = reader.string();
|
|
1889
|
+
break;
|
|
1890
|
+
case 5:
|
|
1891
|
+
message.htlcTimeout = reader.string();
|
|
1892
|
+
break;
|
|
1893
|
+
case 6:
|
|
1894
|
+
message.txHash = reader.string();
|
|
1895
|
+
break;
|
|
1896
|
+
case 7:
|
|
1897
|
+
message.htlcAddress = reader.string();
|
|
1898
|
+
break;
|
|
1899
|
+
default:
|
|
1900
|
+
reader.skipType(tag & 7);
|
|
1901
|
+
break;
|
|
1902
|
+
}
|
|
1903
|
+
}
|
|
1904
|
+
return message;
|
|
1905
|
+
},
|
|
1906
|
+
|
|
1907
|
+
fromJSON(object: any): MsgRequestHtlcLock {
|
|
1908
|
+
return {
|
|
1909
|
+
creator: isSet(object.creator) ? String(object.creator) : "",
|
|
1910
|
+
fromAddress: isSet(object.fromAddress) ? String(object.fromAddress) : "",
|
|
1911
|
+
senderPubkey: isSet(object.senderPubkey)
|
|
1912
|
+
? String(object.senderPubkey)
|
|
1913
|
+
: "",
|
|
1914
|
+
amount: isSet(object.amount) ? String(object.amount) : "",
|
|
1915
|
+
htlcTimeout: isSet(object.htlcTimeout) ? String(object.htlcTimeout) : "",
|
|
1916
|
+
txHash: isSet(object.txHash) ? String(object.txHash) : "",
|
|
1917
|
+
htlcAddress: isSet(object.htlcAddress) ? String(object.htlcAddress) : "",
|
|
1918
|
+
};
|
|
1919
|
+
},
|
|
1920
|
+
|
|
1921
|
+
toJSON(message: MsgRequestHtlcLock): unknown {
|
|
1922
|
+
const obj: any = {};
|
|
1923
|
+
message.creator !== undefined && (obj.creator = message.creator);
|
|
1924
|
+
message.fromAddress !== undefined &&
|
|
1925
|
+
(obj.fromAddress = message.fromAddress);
|
|
1926
|
+
message.senderPubkey !== undefined &&
|
|
1927
|
+
(obj.senderPubkey = message.senderPubkey);
|
|
1928
|
+
message.amount !== undefined && (obj.amount = message.amount);
|
|
1929
|
+
message.htlcTimeout !== undefined &&
|
|
1930
|
+
(obj.htlcTimeout = message.htlcTimeout);
|
|
1931
|
+
message.txHash !== undefined && (obj.txHash = message.txHash);
|
|
1932
|
+
message.htlcAddress !== undefined &&
|
|
1933
|
+
(obj.htlcAddress = message.htlcAddress);
|
|
1934
|
+
return obj;
|
|
1935
|
+
},
|
|
1936
|
+
|
|
1937
|
+
fromPartial<I extends Exact<DeepPartial<MsgRequestHtlcLock>, I>>(
|
|
1938
|
+
object: I
|
|
1939
|
+
): MsgRequestHtlcLock {
|
|
1940
|
+
const message = createBaseMsgRequestHtlcLock();
|
|
1941
|
+
message.creator = object.creator ?? "";
|
|
1942
|
+
message.fromAddress = object.fromAddress ?? "";
|
|
1943
|
+
message.senderPubkey = object.senderPubkey ?? "";
|
|
1944
|
+
message.amount = object.amount ?? "";
|
|
1945
|
+
message.htlcTimeout = object.htlcTimeout ?? "";
|
|
1946
|
+
message.txHash = object.txHash ?? "";
|
|
1947
|
+
message.htlcAddress = object.htlcAddress ?? "";
|
|
1948
|
+
return message;
|
|
1949
|
+
},
|
|
1950
|
+
};
|
|
1951
|
+
|
|
1952
|
+
function createBaseMsgRequestHtlcLockResponse(): MsgRequestHtlcLockResponse {
|
|
1953
|
+
return {};
|
|
1954
|
+
}
|
|
1955
|
+
|
|
1956
|
+
export const MsgRequestHtlcLockResponse = {
|
|
1957
|
+
encode(
|
|
1958
|
+
_: MsgRequestHtlcLockResponse,
|
|
1959
|
+
writer: _m0.Writer = _m0.Writer.create()
|
|
1960
|
+
): _m0.Writer {
|
|
1961
|
+
return writer;
|
|
1962
|
+
},
|
|
1963
|
+
|
|
1964
|
+
decode(
|
|
1965
|
+
input: _m0.Reader | Uint8Array,
|
|
1966
|
+
length?: number
|
|
1967
|
+
): MsgRequestHtlcLockResponse {
|
|
1968
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1969
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1970
|
+
const message = createBaseMsgRequestHtlcLockResponse();
|
|
1971
|
+
while (reader.pos < end) {
|
|
1972
|
+
const tag = reader.uint32();
|
|
1973
|
+
switch (tag >>> 3) {
|
|
1974
|
+
default:
|
|
1975
|
+
reader.skipType(tag & 7);
|
|
1976
|
+
break;
|
|
1977
|
+
}
|
|
1978
|
+
}
|
|
1979
|
+
return message;
|
|
1980
|
+
},
|
|
1981
|
+
|
|
1982
|
+
fromJSON(_: any): MsgRequestHtlcLockResponse {
|
|
1983
|
+
return {};
|
|
1984
|
+
},
|
|
1985
|
+
|
|
1986
|
+
toJSON(_: MsgRequestHtlcLockResponse): unknown {
|
|
1987
|
+
const obj: any = {};
|
|
1988
|
+
return obj;
|
|
1989
|
+
},
|
|
1990
|
+
|
|
1991
|
+
fromPartial<I extends Exact<DeepPartial<MsgRequestHtlcLockResponse>, I>>(
|
|
1992
|
+
_: I
|
|
1993
|
+
): MsgRequestHtlcLockResponse {
|
|
1994
|
+
const message = createBaseMsgRequestHtlcLockResponse();
|
|
1995
|
+
return message;
|
|
1996
|
+
},
|
|
1997
|
+
};
|
|
1998
|
+
|
|
1999
|
+
function createBaseMsgHtlcReclaim(): MsgHtlcReclaim {
|
|
2000
|
+
return { creator: "", txHash: "", senderAddress: "" };
|
|
2001
|
+
}
|
|
2002
|
+
|
|
2003
|
+
export const MsgHtlcReclaim = {
|
|
2004
|
+
encode(
|
|
2005
|
+
message: MsgHtlcReclaim,
|
|
2006
|
+
writer: _m0.Writer = _m0.Writer.create()
|
|
2007
|
+
): _m0.Writer {
|
|
2008
|
+
if (message.creator !== "") {
|
|
2009
|
+
writer.uint32(10).string(message.creator);
|
|
2010
|
+
}
|
|
2011
|
+
if (message.txHash !== "") {
|
|
2012
|
+
writer.uint32(18).string(message.txHash);
|
|
2013
|
+
}
|
|
2014
|
+
if (message.senderAddress !== "") {
|
|
2015
|
+
writer.uint32(26).string(message.senderAddress);
|
|
2016
|
+
}
|
|
2017
|
+
return writer;
|
|
2018
|
+
},
|
|
2019
|
+
|
|
2020
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): MsgHtlcReclaim {
|
|
2021
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
2022
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2023
|
+
const message = createBaseMsgHtlcReclaim();
|
|
2024
|
+
while (reader.pos < end) {
|
|
2025
|
+
const tag = reader.uint32();
|
|
2026
|
+
switch (tag >>> 3) {
|
|
2027
|
+
case 1:
|
|
2028
|
+
message.creator = reader.string();
|
|
2029
|
+
break;
|
|
2030
|
+
case 2:
|
|
2031
|
+
message.txHash = reader.string();
|
|
2032
|
+
break;
|
|
2033
|
+
case 3:
|
|
2034
|
+
message.senderAddress = reader.string();
|
|
2035
|
+
break;
|
|
2036
|
+
default:
|
|
2037
|
+
reader.skipType(tag & 7);
|
|
2038
|
+
break;
|
|
2039
|
+
}
|
|
2040
|
+
}
|
|
2041
|
+
return message;
|
|
2042
|
+
},
|
|
2043
|
+
|
|
2044
|
+
fromJSON(object: any): MsgHtlcReclaim {
|
|
2045
|
+
return {
|
|
2046
|
+
creator: isSet(object.creator) ? String(object.creator) : "",
|
|
2047
|
+
txHash: isSet(object.txHash) ? String(object.txHash) : "",
|
|
2048
|
+
senderAddress: isSet(object.senderAddress)
|
|
2049
|
+
? String(object.senderAddress)
|
|
2050
|
+
: "",
|
|
2051
|
+
};
|
|
2052
|
+
},
|
|
2053
|
+
|
|
2054
|
+
toJSON(message: MsgHtlcReclaim): unknown {
|
|
2055
|
+
const obj: any = {};
|
|
2056
|
+
message.creator !== undefined && (obj.creator = message.creator);
|
|
2057
|
+
message.txHash !== undefined && (obj.txHash = message.txHash);
|
|
2058
|
+
message.senderAddress !== undefined &&
|
|
2059
|
+
(obj.senderAddress = message.senderAddress);
|
|
2060
|
+
return obj;
|
|
2061
|
+
},
|
|
2062
|
+
|
|
2063
|
+
fromPartial<I extends Exact<DeepPartial<MsgHtlcReclaim>, I>>(
|
|
2064
|
+
object: I
|
|
2065
|
+
): MsgHtlcReclaim {
|
|
2066
|
+
const message = createBaseMsgHtlcReclaim();
|
|
2067
|
+
message.creator = object.creator ?? "";
|
|
2068
|
+
message.txHash = object.txHash ?? "";
|
|
2069
|
+
message.senderAddress = object.senderAddress ?? "";
|
|
2070
|
+
return message;
|
|
2071
|
+
},
|
|
2072
|
+
};
|
|
2073
|
+
|
|
2074
|
+
function createBaseMsgHtlcReclaimResponse(): MsgHtlcReclaimResponse {
|
|
2075
|
+
return {};
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
export const MsgHtlcReclaimResponse = {
|
|
2079
|
+
encode(
|
|
2080
|
+
_: MsgHtlcReclaimResponse,
|
|
2081
|
+
writer: _m0.Writer = _m0.Writer.create()
|
|
2082
|
+
): _m0.Writer {
|
|
2083
|
+
return writer;
|
|
2084
|
+
},
|
|
2085
|
+
|
|
2086
|
+
decode(
|
|
2087
|
+
input: _m0.Reader | Uint8Array,
|
|
2088
|
+
length?: number
|
|
2089
|
+
): MsgHtlcReclaimResponse {
|
|
2090
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
2091
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2092
|
+
const message = createBaseMsgHtlcReclaimResponse();
|
|
2093
|
+
while (reader.pos < end) {
|
|
2094
|
+
const tag = reader.uint32();
|
|
2095
|
+
switch (tag >>> 3) {
|
|
2096
|
+
default:
|
|
2097
|
+
reader.skipType(tag & 7);
|
|
2098
|
+
break;
|
|
2099
|
+
}
|
|
2100
|
+
}
|
|
2101
|
+
return message;
|
|
2102
|
+
},
|
|
2103
|
+
|
|
2104
|
+
fromJSON(_: any): MsgHtlcReclaimResponse {
|
|
2105
|
+
return {};
|
|
2106
|
+
},
|
|
2107
|
+
|
|
2108
|
+
toJSON(_: MsgHtlcReclaimResponse): unknown {
|
|
2109
|
+
const obj: any = {};
|
|
2110
|
+
return obj;
|
|
2111
|
+
},
|
|
2112
|
+
|
|
2113
|
+
fromPartial<I extends Exact<DeepPartial<MsgHtlcReclaimResponse>, I>>(
|
|
2114
|
+
_: I
|
|
2115
|
+
): MsgHtlcReclaimResponse {
|
|
2116
|
+
const message = createBaseMsgHtlcReclaimResponse();
|
|
2117
|
+
return message;
|
|
2118
|
+
},
|
|
2119
|
+
};
|
|
2120
|
+
|
|
1759
2121
|
/** Msg defines the Msg service. */
|
|
1760
2122
|
export interface Msg {
|
|
1761
2123
|
RequestTransaction(
|
|
@@ -1781,6 +2143,10 @@ export interface Msg {
|
|
|
1781
2143
|
FinalizeDrainTransaction(
|
|
1782
2144
|
request: MsgFinalizeDrainTransaction
|
|
1783
2145
|
): Promise<MsgFinalizeDrainTransactionResponse>;
|
|
2146
|
+
RequestHtlcLock(
|
|
2147
|
+
request: MsgRequestHtlcLock
|
|
2148
|
+
): Promise<MsgRequestHtlcLockResponse>;
|
|
2149
|
+
HtlcReclaim(request: MsgHtlcReclaim): Promise<MsgHtlcReclaimResponse>;
|
|
1784
2150
|
}
|
|
1785
2151
|
|
|
1786
2152
|
export class MsgClientImpl implements Msg {
|
|
@@ -1798,6 +2164,8 @@ export class MsgClientImpl implements Msg {
|
|
|
1798
2164
|
this.FinalizeProvisionTransaction.bind(this);
|
|
1799
2165
|
this.RequestDrainTransaction = this.RequestDrainTransaction.bind(this);
|
|
1800
2166
|
this.FinalizeDrainTransaction = this.FinalizeDrainTransaction.bind(this);
|
|
2167
|
+
this.RequestHtlcLock = this.RequestHtlcLock.bind(this);
|
|
2168
|
+
this.HtlcReclaim = this.HtlcReclaim.bind(this);
|
|
1801
2169
|
}
|
|
1802
2170
|
RequestTransaction(
|
|
1803
2171
|
request: MsgRequestTransaction
|
|
@@ -1920,6 +2288,32 @@ export class MsgClientImpl implements Msg {
|
|
|
1920
2288
|
MsgFinalizeDrainTransactionResponse.decode(new _m0.Reader(data))
|
|
1921
2289
|
);
|
|
1922
2290
|
}
|
|
2291
|
+
|
|
2292
|
+
RequestHtlcLock(
|
|
2293
|
+
request: MsgRequestHtlcLock
|
|
2294
|
+
): Promise<MsgRequestHtlcLockResponse> {
|
|
2295
|
+
const data = MsgRequestHtlcLock.encode(request).finish();
|
|
2296
|
+
const promise = this.rpc.request(
|
|
2297
|
+
"kimablockchain.transaction.Msg",
|
|
2298
|
+
"RequestHtlcLock",
|
|
2299
|
+
data
|
|
2300
|
+
);
|
|
2301
|
+
return promise.then((data) =>
|
|
2302
|
+
MsgRequestHtlcLockResponse.decode(new _m0.Reader(data))
|
|
2303
|
+
);
|
|
2304
|
+
}
|
|
2305
|
+
|
|
2306
|
+
HtlcReclaim(request: MsgHtlcReclaim): Promise<MsgHtlcReclaimResponse> {
|
|
2307
|
+
const data = MsgHtlcReclaim.encode(request).finish();
|
|
2308
|
+
const promise = this.rpc.request(
|
|
2309
|
+
"kimablockchain.transaction.Msg",
|
|
2310
|
+
"HtlcReclaim",
|
|
2311
|
+
data
|
|
2312
|
+
);
|
|
2313
|
+
return promise.then((data) =>
|
|
2314
|
+
MsgHtlcReclaimResponse.decode(new _m0.Reader(data))
|
|
2315
|
+
);
|
|
2316
|
+
}
|
|
1923
2317
|
}
|
|
1924
2318
|
|
|
1925
2319
|
interface Rpc {
|