@orbitflare/sdk 0.3.0 → 0.3.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/dist/proto/jetstream_v2.d.ts +31 -0
- package/dist/proto/jetstream_v2.d.ts.map +1 -1
- package/dist/proto/jetstream_v2.js +163 -0
- package/dist/proto/jetstream_v2.js.map +1 -1
- package/dist/proto/solana-storage.d.ts +10 -0
- package/dist/proto/solana-storage.d.ts.map +1 -1
- package/dist/proto/solana-storage.js +166 -1
- package/dist/proto/solana-storage.js.map +1 -1
- package/dist/rpc.js +1 -1
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@ export var RewardType;
|
|
|
13
13
|
RewardType[RewardType["Rent"] = 2] = "Rent";
|
|
14
14
|
RewardType[RewardType["Staking"] = 3] = "Staking";
|
|
15
15
|
RewardType[RewardType["Voting"] = 4] = "Voting";
|
|
16
|
+
RewardType[RewardType["DeactivatedStake"] = 5] = "DeactivatedStake";
|
|
16
17
|
RewardType[RewardType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
17
18
|
})(RewardType || (RewardType = {}));
|
|
18
19
|
export function rewardTypeFromJSON(object) {
|
|
@@ -32,6 +33,9 @@ export function rewardTypeFromJSON(object) {
|
|
|
32
33
|
case 4:
|
|
33
34
|
case "Voting":
|
|
34
35
|
return RewardType.Voting;
|
|
36
|
+
case 5:
|
|
37
|
+
case "DeactivatedStake":
|
|
38
|
+
return RewardType.DeactivatedStake;
|
|
35
39
|
case -1:
|
|
36
40
|
case "UNRECOGNIZED":
|
|
37
41
|
default:
|
|
@@ -50,6 +54,8 @@ export function rewardTypeToJSON(object) {
|
|
|
50
54
|
return "Staking";
|
|
51
55
|
case RewardType.Voting:
|
|
52
56
|
return "Voting";
|
|
57
|
+
case RewardType.DeactivatedStake:
|
|
58
|
+
return "DeactivatedStake";
|
|
53
59
|
case RewardType.UNRECOGNIZED:
|
|
54
60
|
default:
|
|
55
61
|
return "UNRECOGNIZED";
|
|
@@ -405,6 +411,7 @@ function createBaseMessage() {
|
|
|
405
411
|
instructions: [],
|
|
406
412
|
versioned: false,
|
|
407
413
|
addressTableLookups: [],
|
|
414
|
+
config: undefined,
|
|
408
415
|
};
|
|
409
416
|
}
|
|
410
417
|
export const Message = {
|
|
@@ -427,6 +434,9 @@ export const Message = {
|
|
|
427
434
|
for (const v of message.addressTableLookups) {
|
|
428
435
|
MessageAddressTableLookup.encode(v, writer.uint32(50).fork()).join();
|
|
429
436
|
}
|
|
437
|
+
if (message.config !== undefined) {
|
|
438
|
+
TransactionConfig.encode(message.config, writer.uint32(58).fork()).join();
|
|
439
|
+
}
|
|
430
440
|
return writer;
|
|
431
441
|
},
|
|
432
442
|
decode(input, length) {
|
|
@@ -478,6 +488,13 @@ export const Message = {
|
|
|
478
488
|
message.addressTableLookups.push(MessageAddressTableLookup.decode(reader, reader.uint32()));
|
|
479
489
|
continue;
|
|
480
490
|
}
|
|
491
|
+
case 7: {
|
|
492
|
+
if (tag !== 58) {
|
|
493
|
+
break;
|
|
494
|
+
}
|
|
495
|
+
message.config = TransactionConfig.decode(reader, reader.uint32());
|
|
496
|
+
continue;
|
|
497
|
+
}
|
|
481
498
|
}
|
|
482
499
|
if ((tag & 7) === 4 || tag === 0) {
|
|
483
500
|
break;
|
|
@@ -508,6 +525,7 @@ export const Message = {
|
|
|
508
525
|
: globalThis.Array.isArray(object?.address_table_lookups)
|
|
509
526
|
? object.address_table_lookups.map((e) => MessageAddressTableLookup.fromJSON(e))
|
|
510
527
|
: [],
|
|
528
|
+
config: isSet(object.config) ? TransactionConfig.fromJSON(object.config) : undefined,
|
|
511
529
|
};
|
|
512
530
|
},
|
|
513
531
|
toJSON(message) {
|
|
@@ -530,6 +548,9 @@ export const Message = {
|
|
|
530
548
|
if (message.addressTableLookups?.length) {
|
|
531
549
|
obj.addressTableLookups = message.addressTableLookups.map((e) => MessageAddressTableLookup.toJSON(e));
|
|
532
550
|
}
|
|
551
|
+
if (message.config !== undefined) {
|
|
552
|
+
obj.config = TransactionConfig.toJSON(message.config);
|
|
553
|
+
}
|
|
533
554
|
return obj;
|
|
534
555
|
},
|
|
535
556
|
create(base) {
|
|
@@ -546,6 +567,131 @@ export const Message = {
|
|
|
546
567
|
message.versioned = object.versioned ?? false;
|
|
547
568
|
message.addressTableLookups = object.addressTableLookups?.map((e) => MessageAddressTableLookup.fromPartial(e)) ||
|
|
548
569
|
[];
|
|
570
|
+
message.config = (object.config !== undefined && object.config !== null)
|
|
571
|
+
? TransactionConfig.fromPartial(object.config)
|
|
572
|
+
: undefined;
|
|
573
|
+
return message;
|
|
574
|
+
},
|
|
575
|
+
};
|
|
576
|
+
function createBaseTransactionConfig() {
|
|
577
|
+
return {
|
|
578
|
+
priorityFee: undefined,
|
|
579
|
+
computeUnitLimit: undefined,
|
|
580
|
+
loadedAccountsDataSizeLimit: undefined,
|
|
581
|
+
heapSize: undefined,
|
|
582
|
+
};
|
|
583
|
+
}
|
|
584
|
+
export const TransactionConfig = {
|
|
585
|
+
encode(message, writer = new BinaryWriter()) {
|
|
586
|
+
if (message.priorityFee !== undefined) {
|
|
587
|
+
if (BigInt.asUintN(64, message.priorityFee) !== message.priorityFee) {
|
|
588
|
+
throw new globalThis.Error("value provided for field message.priorityFee of type uint64 too large");
|
|
589
|
+
}
|
|
590
|
+
writer.uint32(8).uint64(message.priorityFee);
|
|
591
|
+
}
|
|
592
|
+
if (message.computeUnitLimit !== undefined) {
|
|
593
|
+
writer.uint32(16).uint32(message.computeUnitLimit);
|
|
594
|
+
}
|
|
595
|
+
if (message.loadedAccountsDataSizeLimit !== undefined) {
|
|
596
|
+
writer.uint32(24).uint32(message.loadedAccountsDataSizeLimit);
|
|
597
|
+
}
|
|
598
|
+
if (message.heapSize !== undefined) {
|
|
599
|
+
writer.uint32(32).uint32(message.heapSize);
|
|
600
|
+
}
|
|
601
|
+
return writer;
|
|
602
|
+
},
|
|
603
|
+
decode(input, length) {
|
|
604
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
605
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
606
|
+
const message = createBaseTransactionConfig();
|
|
607
|
+
while (reader.pos < end) {
|
|
608
|
+
const tag = reader.uint32();
|
|
609
|
+
switch (tag >>> 3) {
|
|
610
|
+
case 1: {
|
|
611
|
+
if (tag !== 8) {
|
|
612
|
+
break;
|
|
613
|
+
}
|
|
614
|
+
message.priorityFee = reader.uint64();
|
|
615
|
+
continue;
|
|
616
|
+
}
|
|
617
|
+
case 2: {
|
|
618
|
+
if (tag !== 16) {
|
|
619
|
+
break;
|
|
620
|
+
}
|
|
621
|
+
message.computeUnitLimit = reader.uint32();
|
|
622
|
+
continue;
|
|
623
|
+
}
|
|
624
|
+
case 3: {
|
|
625
|
+
if (tag !== 24) {
|
|
626
|
+
break;
|
|
627
|
+
}
|
|
628
|
+
message.loadedAccountsDataSizeLimit = reader.uint32();
|
|
629
|
+
continue;
|
|
630
|
+
}
|
|
631
|
+
case 4: {
|
|
632
|
+
if (tag !== 32) {
|
|
633
|
+
break;
|
|
634
|
+
}
|
|
635
|
+
message.heapSize = reader.uint32();
|
|
636
|
+
continue;
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
640
|
+
break;
|
|
641
|
+
}
|
|
642
|
+
reader.skip(tag & 7);
|
|
643
|
+
}
|
|
644
|
+
return message;
|
|
645
|
+
},
|
|
646
|
+
fromJSON(object) {
|
|
647
|
+
return {
|
|
648
|
+
priorityFee: isSet(object.priorityFee)
|
|
649
|
+
? BigInt(object.priorityFee)
|
|
650
|
+
: isSet(object.priority_fee)
|
|
651
|
+
? BigInt(object.priority_fee)
|
|
652
|
+
: undefined,
|
|
653
|
+
computeUnitLimit: isSet(object.computeUnitLimit)
|
|
654
|
+
? globalThis.Number(object.computeUnitLimit)
|
|
655
|
+
: isSet(object.compute_unit_limit)
|
|
656
|
+
? globalThis.Number(object.compute_unit_limit)
|
|
657
|
+
: undefined,
|
|
658
|
+
loadedAccountsDataSizeLimit: isSet(object.loadedAccountsDataSizeLimit)
|
|
659
|
+
? globalThis.Number(object.loadedAccountsDataSizeLimit)
|
|
660
|
+
: isSet(object.loaded_accounts_data_size_limit)
|
|
661
|
+
? globalThis.Number(object.loaded_accounts_data_size_limit)
|
|
662
|
+
: undefined,
|
|
663
|
+
heapSize: isSet(object.heapSize)
|
|
664
|
+
? globalThis.Number(object.heapSize)
|
|
665
|
+
: isSet(object.heap_size)
|
|
666
|
+
? globalThis.Number(object.heap_size)
|
|
667
|
+
: undefined,
|
|
668
|
+
};
|
|
669
|
+
},
|
|
670
|
+
toJSON(message) {
|
|
671
|
+
const obj = {};
|
|
672
|
+
if (message.priorityFee !== undefined) {
|
|
673
|
+
obj.priorityFee = message.priorityFee.toString();
|
|
674
|
+
}
|
|
675
|
+
if (message.computeUnitLimit !== undefined) {
|
|
676
|
+
obj.computeUnitLimit = Math.round(message.computeUnitLimit);
|
|
677
|
+
}
|
|
678
|
+
if (message.loadedAccountsDataSizeLimit !== undefined) {
|
|
679
|
+
obj.loadedAccountsDataSizeLimit = Math.round(message.loadedAccountsDataSizeLimit);
|
|
680
|
+
}
|
|
681
|
+
if (message.heapSize !== undefined) {
|
|
682
|
+
obj.heapSize = Math.round(message.heapSize);
|
|
683
|
+
}
|
|
684
|
+
return obj;
|
|
685
|
+
},
|
|
686
|
+
create(base) {
|
|
687
|
+
return TransactionConfig.fromPartial(base ?? {});
|
|
688
|
+
},
|
|
689
|
+
fromPartial(object) {
|
|
690
|
+
const message = createBaseTransactionConfig();
|
|
691
|
+
message.priorityFee = object.priorityFee ?? undefined;
|
|
692
|
+
message.computeUnitLimit = object.computeUnitLimit ?? undefined;
|
|
693
|
+
message.loadedAccountsDataSizeLimit = object.loadedAccountsDataSizeLimit ?? undefined;
|
|
694
|
+
message.heapSize = object.heapSize ?? undefined;
|
|
549
695
|
return message;
|
|
550
696
|
},
|
|
551
697
|
};
|
|
@@ -1763,7 +1909,7 @@ export const ReturnData = {
|
|
|
1763
1909
|
},
|
|
1764
1910
|
};
|
|
1765
1911
|
function createBaseReward() {
|
|
1766
|
-
return { pubkey: "", lamports: 0n, postBalance: 0n, rewardType: 0, commission: "" };
|
|
1912
|
+
return { pubkey: "", lamports: 0n, postBalance: 0n, rewardType: 0, commission: "", commissionBps: "" };
|
|
1767
1913
|
}
|
|
1768
1914
|
export const Reward = {
|
|
1769
1915
|
encode(message, writer = new BinaryWriter()) {
|
|
@@ -1788,6 +1934,9 @@ export const Reward = {
|
|
|
1788
1934
|
if (message.commission !== "") {
|
|
1789
1935
|
writer.uint32(42).string(message.commission);
|
|
1790
1936
|
}
|
|
1937
|
+
if (message.commissionBps !== "") {
|
|
1938
|
+
writer.uint32(50).string(message.commissionBps);
|
|
1939
|
+
}
|
|
1791
1940
|
return writer;
|
|
1792
1941
|
},
|
|
1793
1942
|
decode(input, length) {
|
|
@@ -1832,6 +1981,13 @@ export const Reward = {
|
|
|
1832
1981
|
message.commission = reader.string();
|
|
1833
1982
|
continue;
|
|
1834
1983
|
}
|
|
1984
|
+
case 6: {
|
|
1985
|
+
if (tag !== 50) {
|
|
1986
|
+
break;
|
|
1987
|
+
}
|
|
1988
|
+
message.commissionBps = reader.string();
|
|
1989
|
+
continue;
|
|
1990
|
+
}
|
|
1835
1991
|
}
|
|
1836
1992
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1837
1993
|
break;
|
|
@@ -1855,6 +2011,11 @@ export const Reward = {
|
|
|
1855
2011
|
? rewardTypeFromJSON(object.reward_type)
|
|
1856
2012
|
: 0,
|
|
1857
2013
|
commission: isSet(object.commission) ? globalThis.String(object.commission) : "",
|
|
2014
|
+
commissionBps: isSet(object.commissionBps)
|
|
2015
|
+
? globalThis.String(object.commissionBps)
|
|
2016
|
+
: isSet(object.commission_bps)
|
|
2017
|
+
? globalThis.String(object.commission_bps)
|
|
2018
|
+
: "",
|
|
1858
2019
|
};
|
|
1859
2020
|
},
|
|
1860
2021
|
toJSON(message) {
|
|
@@ -1874,6 +2035,9 @@ export const Reward = {
|
|
|
1874
2035
|
if (message.commission !== "") {
|
|
1875
2036
|
obj.commission = message.commission;
|
|
1876
2037
|
}
|
|
2038
|
+
if (message.commissionBps !== "") {
|
|
2039
|
+
obj.commissionBps = message.commissionBps;
|
|
2040
|
+
}
|
|
1877
2041
|
return obj;
|
|
1878
2042
|
},
|
|
1879
2043
|
create(base) {
|
|
@@ -1886,6 +2050,7 @@ export const Reward = {
|
|
|
1886
2050
|
message.postBalance = object.postBalance ?? 0n;
|
|
1887
2051
|
message.rewardType = object.rewardType ?? 0;
|
|
1888
2052
|
message.commission = object.commission ?? "";
|
|
2053
|
+
message.commissionBps = object.commissionBps ?? "";
|
|
1889
2054
|
return message;
|
|
1890
2055
|
},
|
|
1891
2056
|
};
|