@akashnetwork/chain-sdk 1.0.0-alpha.24 → 1.0.0-alpha.25
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 +25 -0
- package/dist/cjs/generated/createCosmosSDK.cjs +237 -237
- package/dist/cjs/generated/createCosmosSDK.cjs.map +2 -2
- package/dist/cjs/generated/createIbc-goSDK.cjs +91 -91
- package/dist/cjs/generated/createIbc-goSDK.cjs.map +2 -2
- package/dist/cjs/generated/createNodeSDK.cjs +68 -61
- package/dist/cjs/generated/createNodeSDK.cjs.map +2 -2
- package/dist/cjs/generated/createProviderSDK.cjs +18 -11
- package/dist/cjs/generated/createProviderSDK.cjs.map +2 -2
- package/dist/cjs/generated/patches/providerCustomTypePatches.cjs +34 -0
- package/dist/cjs/generated/patches/providerCustomTypePatches.cjs.map +7 -0
- package/dist/cjs/generated/patches/providerPatchMessage.cjs +38 -0
- package/dist/cjs/generated/patches/providerPatchMessage.cjs.map +7 -0
- package/dist/cjs/generated/protos/akash/bme/v1/filters.cjs +125 -0
- package/dist/cjs/generated/protos/akash/bme/v1/filters.cjs.map +7 -0
- package/dist/cjs/generated/protos/akash/bme/v1/params.cjs +26 -10
- package/dist/cjs/generated/protos/akash/bme/v1/params.cjs.map +2 -2
- package/dist/cjs/generated/protos/akash/bme/v1/query.cjs +233 -0
- package/dist/cjs/generated/protos/akash/bme/v1/query.cjs.map +2 -2
- package/dist/cjs/generated/protos/akash/bme/v1/query_akash.cjs +9 -0
- package/dist/cjs/generated/protos/akash/bme/v1/query_akash.cjs.map +2 -2
- package/dist/cjs/generated/protos/akash/manifest/v2beta3/service.cjs +67 -2
- package/dist/cjs/generated/protos/akash/manifest/v2beta3/service.cjs.map +2 -2
- package/dist/cjs/generated/protos/akash/market/v1beta5/params.cjs +17 -2
- package/dist/cjs/generated/protos/akash/market/v1beta5/params.cjs.map +2 -2
- package/dist/cjs/generated/protos/akash/market/v1beta5/resourcesoffer.cjs +266 -3
- package/dist/cjs/generated/protos/akash/market/v1beta5/resourcesoffer.cjs.map +2 -2
- package/dist/cjs/generated/protos/akash/oracle/v1/params.cjs +53 -1
- package/dist/cjs/generated/protos/akash/oracle/v1/params.cjs.map +2 -2
- package/dist/cjs/generated/protos/akash/provider/v1/service_akash.cjs +9 -0
- package/dist/cjs/generated/protos/akash/provider/v1/service_akash.cjs.map +2 -2
- package/dist/cjs/generated/protos/akash/provider/v1/validation.cjs +195 -0
- package/dist/cjs/generated/protos/akash/provider/v1/validation.cjs.map +7 -0
- package/dist/cjs/generated/protos/google/protobuf/descriptor.cjs +6 -0
- package/dist/cjs/generated/protos/google/protobuf/descriptor.cjs.map +2 -2
- package/dist/cjs/generated/protos/index.akash.v1.cjs +11 -5
- package/dist/cjs/generated/protos/index.akash.v1.cjs.map +3 -3
- package/dist/cjs/generated/protos/index.akash.v1beta5.cjs +4 -1
- package/dist/cjs/generated/protos/index.akash.v1beta5.cjs.map +2 -2
- package/dist/cjs/generated/protos/index.provider.akash.v1.cjs +3 -0
- package/dist/cjs/generated/protos/index.provider.akash.v1.cjs.map +2 -2
- package/dist/cjs/generated/protos/index.provider.akash.v2beta3.cjs +1 -0
- package/dist/cjs/generated/protos/index.provider.akash.v2beta3.cjs.map +2 -2
- package/dist/cjs/sdk/chain/createChainNodeSDK.cjs +2 -1
- package/dist/cjs/sdk/chain/createChainNodeSDK.cjs.map +2 -2
- package/dist/cjs/sdk/chain/createChainNodeWebSDK.cjs +2 -1
- package/dist/cjs/sdk/chain/createChainNodeWebSDK.cjs.map +2 -2
- package/dist/cjs/sdk/chain/helpers.cjs +56 -0
- package/dist/cjs/sdk/chain/helpers.cjs.map +7 -0
- package/dist/cjs/sdk/client/sdkMetadata.cjs.map +2 -2
- package/dist/cjs/sdk/index.cjs.map +2 -2
- package/dist/cjs/sdk/index.shared.cjs +4 -1
- package/dist/cjs/sdk/index.shared.cjs.map +2 -2
- package/dist/cjs/sdk/index.web.cjs.map +2 -2
- package/dist/cjs/sdk/transport/tx/createTxTransport.cjs +1 -1
- package/dist/cjs/sdk/transport/tx/createTxTransport.cjs.map +2 -2
- package/dist/cjs/sdl/manifest/generateManifest.cjs +8 -6
- package/dist/cjs/sdl/manifest/generateManifest.cjs.map +2 -2
- package/dist/cjs/sdl/manifest/generateManifestVersion.cjs.map +2 -2
- package/dist/cjs/sdl/manifest/manifestUtils.cjs +16 -9
- package/dist/cjs/sdl/manifest/manifestUtils.cjs.map +2 -2
- package/dist/cjs/utils/yaml.cjs +10 -3
- package/dist/cjs/utils/yaml.cjs.map +2 -2
- package/dist/esm/{chunk-BYQF33C6.js → chunk-5YIS3XNX.js} +2 -2
- package/dist/esm/{chunk-JISXXX24.js → chunk-6CIH635G.js} +2 -2
- package/dist/esm/{chunk-GUNMCW7A.js → chunk-BWGYKJLS.js} +2 -2
- package/dist/esm/{chunk-MQPC6TDF.js → chunk-C3DBWOZD.js} +53 -1
- package/dist/esm/{chunk-MQPC6TDF.js.map → chunk-C3DBWOZD.js.map} +2 -2
- package/dist/esm/{chunk-TCVGOF7L.js → chunk-DJASDN6A.js} +2 -2
- package/dist/esm/{chunk-5DCYIWCG.js → chunk-E76SLJJ3.js} +3 -1
- package/dist/esm/{chunk-4D3QNKFB.js → chunk-EKFJV4QU.js} +6 -4
- package/dist/esm/{chunk-4D3QNKFB.js.map → chunk-EKFJV4QU.js.map} +1 -1
- package/dist/esm/{chunk-XFCN5LRY.js → chunk-H5WUFEMM.js} +2 -2
- package/dist/esm/{chunk-YSMDEW4E.js → chunk-JZTFWLSX.js} +178 -2
- package/dist/esm/{chunk-YSMDEW4E.js.map → chunk-JZTFWLSX.js.map} +4 -4
- package/dist/esm/{chunk-C7UQYVYH.js → chunk-KFWTFROT.js} +21 -79
- package/dist/esm/chunk-KFWTFROT.js.map +7 -0
- package/dist/esm/{chunk-IZQCYKLD.js → chunk-LGAXM6RX.js} +27 -11
- package/dist/esm/chunk-LGAXM6RX.js.map +7 -0
- package/dist/esm/{chunk-VRE72ZD5.js → chunk-M2ZK7HEC.js} +69 -4
- package/dist/esm/chunk-M2ZK7HEC.js.map +7 -0
- package/dist/esm/{chunk-Z5KZUB7X.js → chunk-MVADLHLI.js} +2 -2
- package/dist/esm/chunk-OL4JUIQC.js +702 -0
- package/dist/esm/chunk-OL4JUIQC.js.map +7 -0
- package/dist/esm/{chunk-5YECXI3P.js → chunk-RUC3LXDX.js} +2 -2
- package/dist/esm/{chunk-SA4SEZ6F.js → chunk-TXQ2BR6G.js} +5 -3
- package/dist/esm/{chunk-SA4SEZ6F.js.map → chunk-TXQ2BR6G.js.map} +1 -1
- package/dist/esm/{chunk-IJSLZIPC.js → chunk-UFJRY3ID.js} +2 -2
- package/dist/esm/chunk-Y7JCYDLU.js +346 -0
- package/dist/esm/chunk-Y7JCYDLU.js.map +7 -0
- package/dist/esm/{chunk-RON4KFMD.js → chunk-ZQDAXUFL.js} +6 -1
- package/dist/esm/chunk-ZQDAXUFL.js.map +7 -0
- package/dist/esm/{chunk-RIIYZIXM.js → chunk-ZRM47VCZ.js} +398 -338
- package/dist/esm/{chunk-RIIYZIXM.js.map → chunk-ZRM47VCZ.js.map} +4 -4
- package/dist/esm/generated/protos/index.akash.v1.js +18 -8
- package/dist/esm/generated/protos/index.akash.v1.js.map +1 -1
- package/dist/esm/generated/protos/index.akash.v1beta4.js +5 -5
- package/dist/esm/generated/protos/index.akash.v1beta5.js +16 -8
- package/dist/esm/generated/protos/index.akash.v1beta5.js.map +1 -1
- package/dist/esm/generated/protos/index.cosmos.v1.js +1 -1
- package/dist/esm/generated/protos/index.provider.akash.v1.js +10 -4
- package/dist/esm/generated/protos/index.provider.akash.v2beta3.js +4 -2
- package/dist/esm/index.js +33 -21
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/index.web.js +13 -8
- package/dist/esm/index.web.js.map +2 -2
- package/dist/esm/{query_akash-RGYTHUNZ.js → query_akash-745M5I3X.js} +3 -3
- package/dist/esm/{query_akash-N2BNNOTD.js → query_akash-EHAEDYOH.js} +15 -3
- package/dist/esm/query_akash-EHAEDYOH.js.map +7 -0
- package/dist/esm/{query_akash-DJ7LTLRE.js → query_akash-FYNRLU72.js} +6 -5
- package/dist/esm/{query_akash-DJ7LTLRE.js.map → query_akash-FYNRLU72.js.map} +1 -1
- package/dist/esm/{query_akash-4CTLBKZR.js → query_akash-LW3YJGS6.js} +4 -4
- package/dist/esm/{reflection_akash-WUBSNT7I.js → reflection_akash-YHEVUIB6.js} +2 -2
- package/dist/esm/{service_akash-KPU6LPVP.js → service_akash-2VS4VW6P.js} +3 -3
- package/dist/esm/{service_akash-AZFAYT7H.js → service_akash-5JSE44LJ.js} +4 -4
- package/dist/esm/{service_akash-VMU3LNBA.js → service_akash-FI6WXDZP.js} +4 -4
- package/dist/esm/{service_akash-WRGOVR7I.js → service_akash-QEN5EQUY.js} +5 -4
- package/dist/esm/{service_akash-WRGOVR7I.js.map → service_akash-QEN5EQUY.js.map} +1 -1
- package/dist/esm/{service_akash-CQVYVSHE.js → service_akash-UDPD4GFX.js} +18 -2
- package/dist/esm/service_akash-UDPD4GFX.js.map +7 -0
- package/dist/esm/{service_akash-RQDCQLQH.js → service_akash-VFDQVHZD.js} +3 -3
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/generated/createNodeSDK.d.ts +11 -0
- package/dist/types/generated/createProviderSDK.d.ts +11 -0
- package/dist/types/generated/patches/providerCustomTypePatches.d.ts +7 -0
- package/dist/types/generated/patches/providerPatchMessage.d.ts +2 -0
- package/dist/types/generated/protos/akash/bme/v1/filters.d.ts +17 -0
- package/dist/types/generated/protos/akash/bme/v1/params.d.ts +6 -1
- package/dist/types/generated/protos/akash/bme/v1/query.d.ts +31 -1
- package/dist/types/generated/protos/akash/bme/v1/query_akash.d.ts +8 -1
- package/dist/types/generated/protos/akash/manifest/v2beta3/service.d.ts +10 -0
- package/dist/types/generated/protos/akash/market/v1beta5/params.d.ts +6 -1
- package/dist/types/generated/protos/akash/market/v1beta5/resourcesoffer.d.ts +91 -0
- package/dist/types/generated/protos/akash/oracle/v1/params.d.ts +14 -0
- package/dist/types/generated/protos/akash/provider/v1/service_akash.d.ts +7 -0
- package/dist/types/generated/protos/akash/provider/v1/validation.d.ts +30 -0
- package/dist/types/generated/protos/google/protobuf/descriptor.d.ts +2 -0
- package/dist/types/generated/protos/index.akash.v1.d.ts +3 -2
- package/dist/types/generated/protos/index.akash.v1beta5.d.ts +1 -1
- package/dist/types/generated/protos/index.provider.akash.v1.d.ts +1 -0
- package/dist/types/generated/protos/index.provider.akash.v2beta3.d.ts +1 -1
- package/dist/types/sdk/chain/createChainNodeSDK.d.ts +3 -0
- package/dist/types/sdk/chain/createChainNodeWebSDK.d.ts +3 -0
- package/dist/types/sdk/chain/helpers.d.ts +14 -0
- package/dist/types/sdk/client/sdkMetadata.d.ts +5 -2
- package/dist/types/sdk/index.d.ts +2 -0
- package/dist/types/sdk/index.shared.d.ts +2 -0
- package/dist/types/sdk/index.web.d.ts +2 -0
- package/dist/types/sdl/manifest/generateManifest.d.ts +3 -3
- package/dist/types/sdl/manifest/generateManifestVersion.d.ts +2 -2
- package/dist/types/utils/yaml.d.ts +3 -0
- package/package.json +1 -1
- package/dist/esm/chunk-C7UQYVYH.js.map +0 -7
- package/dist/esm/chunk-IZQCYKLD.js.map +0 -7
- package/dist/esm/chunk-RON4KFMD.js.map +0 -7
- package/dist/esm/chunk-VRE72ZD5.js.map +0 -7
- package/dist/esm/chunk-XPIWBE65.js +0 -362
- package/dist/esm/chunk-XPIWBE65.js.map +0 -7
- package/dist/esm/query_akash-N2BNNOTD.js.map +0 -7
- package/dist/esm/service_akash-CQVYVSHE.js.map +0 -7
- /package/dist/esm/{chunk-BYQF33C6.js.map → chunk-5YIS3XNX.js.map} +0 -0
- /package/dist/esm/{chunk-JISXXX24.js.map → chunk-6CIH635G.js.map} +0 -0
- /package/dist/esm/{chunk-GUNMCW7A.js.map → chunk-BWGYKJLS.js.map} +0 -0
- /package/dist/esm/{chunk-TCVGOF7L.js.map → chunk-DJASDN6A.js.map} +0 -0
- /package/dist/esm/{chunk-5DCYIWCG.js.map → chunk-E76SLJJ3.js.map} +0 -0
- /package/dist/esm/{chunk-XFCN5LRY.js.map → chunk-H5WUFEMM.js.map} +0 -0
- /package/dist/esm/{chunk-Z5KZUB7X.js.map → chunk-MVADLHLI.js.map} +0 -0
- /package/dist/esm/{chunk-5YECXI3P.js.map → chunk-RUC3LXDX.js.map} +0 -0
- /package/dist/esm/{chunk-IJSLZIPC.js.map → chunk-UFJRY3ID.js.map} +0 -0
- /package/dist/esm/{query_akash-RGYTHUNZ.js.map → query_akash-745M5I3X.js.map} +0 -0
- /package/dist/esm/{query_akash-4CTLBKZR.js.map → query_akash-LW3YJGS6.js.map} +0 -0
- /package/dist/esm/{reflection_akash-WUBSNT7I.js.map → reflection_akash-YHEVUIB6.js.map} +0 -0
- /package/dist/esm/{service_akash-KPU6LPVP.js.map → service_akash-2VS4VW6P.js.map} +0 -0
- /package/dist/esm/{service_akash-AZFAYT7H.js.map → service_akash-5JSE44LJ.js.map} +0 -0
- /package/dist/esm/{service_akash-VMU3LNBA.js.map → service_akash-FI6WXDZP.js.map} +0 -0
- /package/dist/esm/{service_akash-RQDCQLQH.js.map → service_akash-VFDQVHZD.js.map} +0 -0
|
@@ -18,14 +18,262 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var resourcesoffer_exports = {};
|
|
20
20
|
__export(resourcesoffer_exports, {
|
|
21
|
-
|
|
21
|
+
EndpointOfferPrice: () => EndpointOfferPrice,
|
|
22
|
+
OfferPrices: () => OfferPrices,
|
|
23
|
+
ResourceOffer: () => ResourceOffer,
|
|
24
|
+
StorageOfferPrice: () => StorageOfferPrice
|
|
22
25
|
});
|
|
23
26
|
module.exports = __toCommonJS(resourcesoffer_exports);
|
|
24
27
|
var import_typeEncodingHelpers = require("../../../../../encoding/typeEncodingHelpers.cjs");
|
|
25
28
|
var import_wire = require("@bufbuild/protobuf/wire");
|
|
29
|
+
var import_coin = require("../../../cosmos/base/v1beta1/coin.cjs");
|
|
30
|
+
var import_endpoint = require("../../base/resources/v1beta4/endpoint.cjs");
|
|
26
31
|
var import_resources = require("../../base/resources/v1beta4/resources.cjs");
|
|
32
|
+
function createBaseStorageOfferPrice() {
|
|
33
|
+
return { name: "", price: void 0 };
|
|
34
|
+
}
|
|
35
|
+
const StorageOfferPrice = {
|
|
36
|
+
$type: "akash.market.v1beta5.StorageOfferPrice",
|
|
37
|
+
encode(message, writer = new import_wire.BinaryWriter()) {
|
|
38
|
+
if (message.name !== "") {
|
|
39
|
+
writer.uint32(10).string(message.name);
|
|
40
|
+
}
|
|
41
|
+
if (message.price !== void 0) {
|
|
42
|
+
import_coin.DecCoin.encode(message.price, writer.uint32(18).fork()).join();
|
|
43
|
+
}
|
|
44
|
+
return writer;
|
|
45
|
+
},
|
|
46
|
+
decode(input, length) {
|
|
47
|
+
const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input);
|
|
48
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
49
|
+
const message = createBaseStorageOfferPrice();
|
|
50
|
+
while (reader.pos < end) {
|
|
51
|
+
const tag = reader.uint32();
|
|
52
|
+
switch (tag >>> 3) {
|
|
53
|
+
case 1: {
|
|
54
|
+
if (tag !== 10) {
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
message.name = reader.string();
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
case 2: {
|
|
61
|
+
if (tag !== 18) {
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
message.price = import_coin.DecCoin.decode(reader, reader.uint32());
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
reader.skip(tag & 7);
|
|
72
|
+
}
|
|
73
|
+
return message;
|
|
74
|
+
},
|
|
75
|
+
fromJSON(object) {
|
|
76
|
+
return {
|
|
77
|
+
name: (0, import_typeEncodingHelpers.isSet)(object.name) ? globalThis.String(object.name) : "",
|
|
78
|
+
price: (0, import_typeEncodingHelpers.isSet)(object.price) ? import_coin.DecCoin.fromJSON(object.price) : void 0
|
|
79
|
+
};
|
|
80
|
+
},
|
|
81
|
+
toJSON(message) {
|
|
82
|
+
const obj = {};
|
|
83
|
+
if (message.name !== "") {
|
|
84
|
+
obj.name = message.name;
|
|
85
|
+
}
|
|
86
|
+
if (message.price !== void 0) {
|
|
87
|
+
obj.price = import_coin.DecCoin.toJSON(message.price);
|
|
88
|
+
}
|
|
89
|
+
return obj;
|
|
90
|
+
},
|
|
91
|
+
fromPartial(object) {
|
|
92
|
+
const message = createBaseStorageOfferPrice();
|
|
93
|
+
message.name = object.name ?? "";
|
|
94
|
+
message.price = object.price !== void 0 && object.price !== null ? import_coin.DecCoin.fromPartial(object.price) : void 0;
|
|
95
|
+
return message;
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
function createBaseEndpointOfferPrice() {
|
|
99
|
+
return { kind: 0, price: void 0 };
|
|
100
|
+
}
|
|
101
|
+
const EndpointOfferPrice = {
|
|
102
|
+
$type: "akash.market.v1beta5.EndpointOfferPrice",
|
|
103
|
+
encode(message, writer = new import_wire.BinaryWriter()) {
|
|
104
|
+
if (message.kind !== 0) {
|
|
105
|
+
writer.uint32(8).int32(message.kind);
|
|
106
|
+
}
|
|
107
|
+
if (message.price !== void 0) {
|
|
108
|
+
import_coin.DecCoin.encode(message.price, writer.uint32(18).fork()).join();
|
|
109
|
+
}
|
|
110
|
+
return writer;
|
|
111
|
+
},
|
|
112
|
+
decode(input, length) {
|
|
113
|
+
const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input);
|
|
114
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
115
|
+
const message = createBaseEndpointOfferPrice();
|
|
116
|
+
while (reader.pos < end) {
|
|
117
|
+
const tag = reader.uint32();
|
|
118
|
+
switch (tag >>> 3) {
|
|
119
|
+
case 1: {
|
|
120
|
+
if (tag !== 8) {
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
message.kind = reader.int32();
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
case 2: {
|
|
127
|
+
if (tag !== 18) {
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
message.price = import_coin.DecCoin.decode(reader, reader.uint32());
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
reader.skip(tag & 7);
|
|
138
|
+
}
|
|
139
|
+
return message;
|
|
140
|
+
},
|
|
141
|
+
fromJSON(object) {
|
|
142
|
+
return {
|
|
143
|
+
kind: (0, import_typeEncodingHelpers.isSet)(object.kind) ? (0, import_endpoint.endpoint_KindFromJSON)(object.kind) : 0,
|
|
144
|
+
price: (0, import_typeEncodingHelpers.isSet)(object.price) ? import_coin.DecCoin.fromJSON(object.price) : void 0
|
|
145
|
+
};
|
|
146
|
+
},
|
|
147
|
+
toJSON(message) {
|
|
148
|
+
const obj = {};
|
|
149
|
+
if (message.kind !== 0) {
|
|
150
|
+
obj.kind = (0, import_endpoint.endpoint_KindToJSON)(message.kind);
|
|
151
|
+
}
|
|
152
|
+
if (message.price !== void 0) {
|
|
153
|
+
obj.price = import_coin.DecCoin.toJSON(message.price);
|
|
154
|
+
}
|
|
155
|
+
return obj;
|
|
156
|
+
},
|
|
157
|
+
fromPartial(object) {
|
|
158
|
+
const message = createBaseEndpointOfferPrice();
|
|
159
|
+
message.kind = object.kind ?? 0;
|
|
160
|
+
message.price = object.price !== void 0 && object.price !== null ? import_coin.DecCoin.fromPartial(object.price) : void 0;
|
|
161
|
+
return message;
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
function createBaseOfferPrices() {
|
|
165
|
+
return { cpu: void 0, memory: void 0, storage: [], gpu: void 0, endpoints: [] };
|
|
166
|
+
}
|
|
167
|
+
const OfferPrices = {
|
|
168
|
+
$type: "akash.market.v1beta5.OfferPrices",
|
|
169
|
+
encode(message, writer = new import_wire.BinaryWriter()) {
|
|
170
|
+
if (message.cpu !== void 0) {
|
|
171
|
+
import_coin.DecCoin.encode(message.cpu, writer.uint32(18).fork()).join();
|
|
172
|
+
}
|
|
173
|
+
if (message.memory !== void 0) {
|
|
174
|
+
import_coin.DecCoin.encode(message.memory, writer.uint32(26).fork()).join();
|
|
175
|
+
}
|
|
176
|
+
for (const v of message.storage) {
|
|
177
|
+
StorageOfferPrice.encode(v, writer.uint32(34).fork()).join();
|
|
178
|
+
}
|
|
179
|
+
if (message.gpu !== void 0) {
|
|
180
|
+
import_coin.DecCoin.encode(message.gpu, writer.uint32(42).fork()).join();
|
|
181
|
+
}
|
|
182
|
+
for (const v of message.endpoints) {
|
|
183
|
+
EndpointOfferPrice.encode(v, writer.uint32(50).fork()).join();
|
|
184
|
+
}
|
|
185
|
+
return writer;
|
|
186
|
+
},
|
|
187
|
+
decode(input, length) {
|
|
188
|
+
const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input);
|
|
189
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
190
|
+
const message = createBaseOfferPrices();
|
|
191
|
+
while (reader.pos < end) {
|
|
192
|
+
const tag = reader.uint32();
|
|
193
|
+
switch (tag >>> 3) {
|
|
194
|
+
case 2: {
|
|
195
|
+
if (tag !== 18) {
|
|
196
|
+
break;
|
|
197
|
+
}
|
|
198
|
+
message.cpu = import_coin.DecCoin.decode(reader, reader.uint32());
|
|
199
|
+
continue;
|
|
200
|
+
}
|
|
201
|
+
case 3: {
|
|
202
|
+
if (tag !== 26) {
|
|
203
|
+
break;
|
|
204
|
+
}
|
|
205
|
+
message.memory = import_coin.DecCoin.decode(reader, reader.uint32());
|
|
206
|
+
continue;
|
|
207
|
+
}
|
|
208
|
+
case 4: {
|
|
209
|
+
if (tag !== 34) {
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
message.storage.push(StorageOfferPrice.decode(reader, reader.uint32()));
|
|
213
|
+
continue;
|
|
214
|
+
}
|
|
215
|
+
case 5: {
|
|
216
|
+
if (tag !== 42) {
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
message.gpu = import_coin.DecCoin.decode(reader, reader.uint32());
|
|
220
|
+
continue;
|
|
221
|
+
}
|
|
222
|
+
case 6: {
|
|
223
|
+
if (tag !== 50) {
|
|
224
|
+
break;
|
|
225
|
+
}
|
|
226
|
+
message.endpoints.push(EndpointOfferPrice.decode(reader, reader.uint32()));
|
|
227
|
+
continue;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
231
|
+
break;
|
|
232
|
+
}
|
|
233
|
+
reader.skip(tag & 7);
|
|
234
|
+
}
|
|
235
|
+
return message;
|
|
236
|
+
},
|
|
237
|
+
fromJSON(object) {
|
|
238
|
+
return {
|
|
239
|
+
cpu: (0, import_typeEncodingHelpers.isSet)(object.cpu) ? import_coin.DecCoin.fromJSON(object.cpu) : void 0,
|
|
240
|
+
memory: (0, import_typeEncodingHelpers.isSet)(object.memory) ? import_coin.DecCoin.fromJSON(object.memory) : void 0,
|
|
241
|
+
storage: globalThis.Array.isArray(object?.storage) ? object.storage.map((e) => StorageOfferPrice.fromJSON(e)) : [],
|
|
242
|
+
gpu: (0, import_typeEncodingHelpers.isSet)(object.gpu) ? import_coin.DecCoin.fromJSON(object.gpu) : void 0,
|
|
243
|
+
endpoints: globalThis.Array.isArray(object?.endpoints) ? object.endpoints.map((e) => EndpointOfferPrice.fromJSON(e)) : []
|
|
244
|
+
};
|
|
245
|
+
},
|
|
246
|
+
toJSON(message) {
|
|
247
|
+
const obj = {};
|
|
248
|
+
if (message.cpu !== void 0) {
|
|
249
|
+
obj.cpu = import_coin.DecCoin.toJSON(message.cpu);
|
|
250
|
+
}
|
|
251
|
+
if (message.memory !== void 0) {
|
|
252
|
+
obj.memory = import_coin.DecCoin.toJSON(message.memory);
|
|
253
|
+
}
|
|
254
|
+
if (message.storage?.length) {
|
|
255
|
+
obj.storage = message.storage.map((e) => StorageOfferPrice.toJSON(e));
|
|
256
|
+
}
|
|
257
|
+
if (message.gpu !== void 0) {
|
|
258
|
+
obj.gpu = import_coin.DecCoin.toJSON(message.gpu);
|
|
259
|
+
}
|
|
260
|
+
if (message.endpoints?.length) {
|
|
261
|
+
obj.endpoints = message.endpoints.map((e) => EndpointOfferPrice.toJSON(e));
|
|
262
|
+
}
|
|
263
|
+
return obj;
|
|
264
|
+
},
|
|
265
|
+
fromPartial(object) {
|
|
266
|
+
const message = createBaseOfferPrices();
|
|
267
|
+
message.cpu = object.cpu !== void 0 && object.cpu !== null ? import_coin.DecCoin.fromPartial(object.cpu) : void 0;
|
|
268
|
+
message.memory = object.memory !== void 0 && object.memory !== null ? import_coin.DecCoin.fromPartial(object.memory) : void 0;
|
|
269
|
+
message.storage = object.storage?.map((e) => StorageOfferPrice.fromPartial(e)) || [];
|
|
270
|
+
message.gpu = object.gpu !== void 0 && object.gpu !== null ? import_coin.DecCoin.fromPartial(object.gpu) : void 0;
|
|
271
|
+
message.endpoints = object.endpoints?.map((e) => EndpointOfferPrice.fromPartial(e)) || [];
|
|
272
|
+
return message;
|
|
273
|
+
}
|
|
274
|
+
};
|
|
27
275
|
function createBaseResourceOffer() {
|
|
28
|
-
return { resources: void 0, count: 0 };
|
|
276
|
+
return { resources: void 0, count: 0, prices: void 0 };
|
|
29
277
|
}
|
|
30
278
|
const ResourceOffer = {
|
|
31
279
|
$type: "akash.market.v1beta5.ResourceOffer",
|
|
@@ -36,6 +284,9 @@ const ResourceOffer = {
|
|
|
36
284
|
if (message.count !== 0) {
|
|
37
285
|
writer.uint32(16).uint32(message.count);
|
|
38
286
|
}
|
|
287
|
+
if (message.prices !== void 0) {
|
|
288
|
+
OfferPrices.encode(message.prices, writer.uint32(26).fork()).join();
|
|
289
|
+
}
|
|
39
290
|
return writer;
|
|
40
291
|
},
|
|
41
292
|
decode(input, length) {
|
|
@@ -59,6 +310,13 @@ const ResourceOffer = {
|
|
|
59
310
|
message.count = reader.uint32();
|
|
60
311
|
continue;
|
|
61
312
|
}
|
|
313
|
+
case 3: {
|
|
314
|
+
if (tag !== 26) {
|
|
315
|
+
break;
|
|
316
|
+
}
|
|
317
|
+
message.prices = OfferPrices.decode(reader, reader.uint32());
|
|
318
|
+
continue;
|
|
319
|
+
}
|
|
62
320
|
}
|
|
63
321
|
if ((tag & 7) === 4 || tag === 0) {
|
|
64
322
|
break;
|
|
@@ -70,7 +328,8 @@ const ResourceOffer = {
|
|
|
70
328
|
fromJSON(object) {
|
|
71
329
|
return {
|
|
72
330
|
resources: (0, import_typeEncodingHelpers.isSet)(object.resources) ? import_resources.Resources.fromJSON(object.resources) : void 0,
|
|
73
|
-
count: (0, import_typeEncodingHelpers.isSet)(object.count) ? globalThis.Number(object.count) : 0
|
|
331
|
+
count: (0, import_typeEncodingHelpers.isSet)(object.count) ? globalThis.Number(object.count) : 0,
|
|
332
|
+
prices: (0, import_typeEncodingHelpers.isSet)(object.prices) ? OfferPrices.fromJSON(object.prices) : void 0
|
|
74
333
|
};
|
|
75
334
|
},
|
|
76
335
|
toJSON(message) {
|
|
@@ -81,12 +340,16 @@ const ResourceOffer = {
|
|
|
81
340
|
if (message.count !== 0) {
|
|
82
341
|
obj.count = Math.round(message.count);
|
|
83
342
|
}
|
|
343
|
+
if (message.prices !== void 0) {
|
|
344
|
+
obj.prices = OfferPrices.toJSON(message.prices);
|
|
345
|
+
}
|
|
84
346
|
return obj;
|
|
85
347
|
},
|
|
86
348
|
fromPartial(object) {
|
|
87
349
|
const message = createBaseResourceOffer();
|
|
88
350
|
message.resources = object.resources !== void 0 && object.resources !== null ? import_resources.Resources.fromPartial(object.resources) : void 0;
|
|
89
351
|
message.count = object.count ?? 0;
|
|
352
|
+
message.prices = object.prices !== void 0 && object.prices !== null ? OfferPrices.fromPartial(object.prices) : void 0;
|
|
90
353
|
return message;
|
|
91
354
|
}
|
|
92
355
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/generated/protos/akash/market/v1beta5/resourcesoffer.ts"],
|
|
4
|
-
"sourcesContent": ["import { isSet } from \"../../../../../encoding/typeEncodingHelpers.ts\"\nimport type { DeepPartial, MessageFns } from \"../../../../../encoding/typeEncodingHelpers.ts\"\n// Code generated by protoc-gen-ts_proto. DO NOT EDIT.\n// versions:\n// protoc-gen-ts_proto v2.7.7\n// protoc unknown\n// source: akash/market/v1beta5/resourcesoffer.proto\n\n/* eslint-disable */\nimport { BinaryReader, BinaryWriter } from \"@bufbuild/protobuf/wire\";\nimport Long from \"long\";\nimport { Resources } from \"../../base/resources/v1beta4/resources.ts\";\n\n/**\n * ResourceOffer describes resources that provider is offering\n * for deployment.\n */\nexport interface ResourceOffer {\n /** Resources holds information about bid resources. */\n resources:\n | Resources\n | undefined;\n /** Count is the number of resources. */\n count: number;\n}\n\nfunction createBaseResourceOffer(): ResourceOffer {\n return { resources: undefined, count: 0 };\n}\n\nexport const ResourceOffer: MessageFns<ResourceOffer, \"akash.market.v1beta5.ResourceOffer\"> = {\n $type: \"akash.market.v1beta5.ResourceOffer\" as const,\n\n encode(message: ResourceOffer, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n if (message.resources !== undefined) {\n Resources.encode(message.resources, writer.uint32(10).fork()).join();\n }\n if (message.count !== 0) {\n writer.uint32(16).uint32(message.count);\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): ResourceOffer {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseResourceOffer();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.resources = Resources.decode(reader, reader.uint32());\n continue;\n }\n case 2: {\n if (tag !== 16) {\n break;\n }\n\n message.count = reader.uint32();\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n fromJSON(object: any): ResourceOffer {\n return {\n resources: isSet(object.resources) ? Resources.fromJSON(object.resources) : undefined,\n count: isSet(object.count) ? globalThis.Number(object.count) : 0,\n };\n },\n\n toJSON(message: ResourceOffer): unknown {\n const obj: any = {};\n if (message.resources !== undefined) {\n obj.resources = Resources.toJSON(message.resources);\n }\n if (message.count !== 0) {\n obj.count = Math.round(message.count);\n }\n return obj;\n },\n fromPartial(object: DeepPartial<ResourceOffer>): ResourceOffer {\n const message = createBaseResourceOffer();\n message.resources = (object.resources !== undefined && object.resources !== null)\n ? Resources.fromPartial(object.resources)\n : undefined;\n message.count = object.count ?? 0;\n return message;\n },\n};\n\ntype Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;\n\ntype _unused_DeepPartial<T> = T extends Builtin ? T\n : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>\n : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>\n : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }\n : Partial<T>;\n\nfunction _unused_isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n\ninterface _unused_MessageFns<T, V extends string> {\n readonly $type: V;\n encode(message: T, writer?: BinaryWriter): BinaryWriter;\n decode(input: BinaryReader | Uint8Array, length?: number): T;\n fromJSON(object: any): T;\n toJSON(message: T): unknown;\n create(base?: DeepPartial<T>): T;\n fromPartial(object: DeepPartial<T>): T;\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iCAAsB;AAStB,kBAA2C;AAE3C,uBAA0B;
|
|
4
|
+
"sourcesContent": ["import { isSet } from \"../../../../../encoding/typeEncodingHelpers.ts\"\nimport type { DeepPartial, MessageFns } from \"../../../../../encoding/typeEncodingHelpers.ts\"\n// Code generated by protoc-gen-ts_proto. DO NOT EDIT.\n// versions:\n// protoc-gen-ts_proto v2.7.7\n// protoc unknown\n// source: akash/market/v1beta5/resourcesoffer.proto\n\n/* eslint-disable */\nimport { BinaryReader, BinaryWriter } from \"@bufbuild/protobuf/wire\";\nimport Long from \"long\";\nimport { DecCoin } from \"../../../cosmos/base/v1beta1/coin.ts\";\nimport { Endpoint_Kind, endpoint_KindFromJSON, endpoint_KindToJSON } from \"../../base/resources/v1beta4/endpoint.ts\";\nimport { Resources } from \"../../base/resources/v1beta4/resources.ts\";\n\n/**\n * StorageOfferPrice represents the price a provider is offering for a specific\n * class of persistent storage. Providers may offer multiple storage classes\n * (e.g., SSD, HDD, NVMe), each identified by name and priced independently.\n * This type is used as a repeated field within OfferPrices to express\n * per-class storage pricing in a bid.\n */\nexport interface StorageOfferPrice {\n /**\n * Name holds an arbitrary name for the storage class (e.g., \"default\", \"ssd\", \"hdd\").\n * This must match a storage class name from the corresponding resource specification.\n */\n name: string;\n /**\n * Price is the offered price per unit of this storage class, expressed as a\n * DecCoin (decimal coin) to allow fractional pricing. When nil, no explicit\n * price is set for this storage class.\n */\n price: DecCoin | undefined;\n}\n\n/**\n * EndpointOfferPrice represents the price a provider is offering for a specific\n * kind of network endpoint. Providers may price each endpoint kind differently\n * (e.g., a leased IP may cost more than a shared HTTP ingress). This type is\n * used as a repeated field within OfferPrices to express per-kind endpoint\n * pricing in a bid.\n */\nexport interface EndpointOfferPrice {\n /**\n * Kind specifies the type of network endpoint being priced. Possible values:\n * - SHARED_HTTP (0): A Kubernetes Ingress endpoint.\n * - RANDOM_PORT (1): A Kubernetes NodePort endpoint.\n * - LEASED_IP (2): A dedicated leased IP endpoint.\n */\n kind: Endpoint_Kind;\n /**\n * Price is the offered price per unit of this endpoint kind, expressed as a\n * DecCoin (decimal coin) to allow fractional pricing. When nil, no explicit\n * price is set for this endpoint kind.\n */\n price: DecCoin | undefined;\n}\n\n/**\n * OfferPrices contains the complete pricing breakdown that a provider includes\n * in a bid for a deployment resource group. Each field represents the price for\n * a specific compute resource type. All price fields use DecCoin (decimal coin)\n * to support fractional pricing denominated in any supported token.\n *\n * This message is embedded as a nullable field on ResourceOffer, which in turn\n * is carried by Bid and MsgCreateBid messages. A nil OfferPrices on a\n * ResourceOffer indicates that no per-resource pricing was specified.\n *\n * Field 1 is reserved for backward compatibility with a previously removed field.\n */\nexport interface OfferPrices {\n /**\n * Cpu is the offered price for CPU resources. When nil, no explicit\n * CPU price is set.\n */\n cpu:\n | DecCoin\n | undefined;\n /**\n * Memory is the offered price for memory resources. When nil, no explicit\n * memory price is set.\n */\n memory:\n | DecCoin\n | undefined;\n /**\n * Storage is a list of per-class storage prices. Each entry corresponds to a\n * named storage class (e.g., \"default\", \"ssd\") and its associated price.\n * Multiple entries allow providers to price different storage tiers independently.\n */\n storage: StorageOfferPrice[];\n /**\n * Gpu is the offered price for GPU resources. When nil, no explicit\n * GPU price is set.\n */\n gpu:\n | DecCoin\n | undefined;\n /**\n * Endpoints is a list of per-kind endpoint prices. Each entry corresponds to\n * a network endpoint kind (SHARED_HTTP, RANDOM_PORT, or LEASED_IP) and its\n * associated price. Multiple entries allow providers to price different\n * endpoint types independently.\n */\n endpoints: EndpointOfferPrice[];\n}\n\n/**\n * ResourceOffer describes resources that provider is offering\n * for deployment.\n */\nexport interface ResourceOffer {\n /** Resources holds information about bid resources. */\n resources:\n | Resources\n | undefined;\n /** Count is the number of resources. */\n count: number;\n /** Prices contains per-resource pricing details (CPU, memory, storage, GPU, endpoints) for this offer. */\n prices: OfferPrices | undefined;\n}\n\nfunction createBaseStorageOfferPrice(): StorageOfferPrice {\n return { name: \"\", price: undefined };\n}\n\nexport const StorageOfferPrice: MessageFns<StorageOfferPrice, \"akash.market.v1beta5.StorageOfferPrice\"> = {\n $type: \"akash.market.v1beta5.StorageOfferPrice\" as const,\n\n encode(message: StorageOfferPrice, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n if (message.name !== \"\") {\n writer.uint32(10).string(message.name);\n }\n if (message.price !== undefined) {\n DecCoin.encode(message.price, writer.uint32(18).fork()).join();\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): StorageOfferPrice {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseStorageOfferPrice();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.name = reader.string();\n continue;\n }\n case 2: {\n if (tag !== 18) {\n break;\n }\n\n message.price = DecCoin.decode(reader, reader.uint32());\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n fromJSON(object: any): StorageOfferPrice {\n return {\n name: isSet(object.name) ? globalThis.String(object.name) : \"\",\n price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined,\n };\n },\n\n toJSON(message: StorageOfferPrice): unknown {\n const obj: any = {};\n if (message.name !== \"\") {\n obj.name = message.name;\n }\n if (message.price !== undefined) {\n obj.price = DecCoin.toJSON(message.price);\n }\n return obj;\n },\n fromPartial(object: DeepPartial<StorageOfferPrice>): StorageOfferPrice {\n const message = createBaseStorageOfferPrice();\n message.name = object.name ?? \"\";\n message.price = (object.price !== undefined && object.price !== null)\n ? DecCoin.fromPartial(object.price)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseEndpointOfferPrice(): EndpointOfferPrice {\n return { kind: 0, price: undefined };\n}\n\nexport const EndpointOfferPrice: MessageFns<EndpointOfferPrice, \"akash.market.v1beta5.EndpointOfferPrice\"> = {\n $type: \"akash.market.v1beta5.EndpointOfferPrice\" as const,\n\n encode(message: EndpointOfferPrice, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n if (message.kind !== 0) {\n writer.uint32(8).int32(message.kind);\n }\n if (message.price !== undefined) {\n DecCoin.encode(message.price, writer.uint32(18).fork()).join();\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): EndpointOfferPrice {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseEndpointOfferPrice();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 8) {\n break;\n }\n\n message.kind = reader.int32() as any;\n continue;\n }\n case 2: {\n if (tag !== 18) {\n break;\n }\n\n message.price = DecCoin.decode(reader, reader.uint32());\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n fromJSON(object: any): EndpointOfferPrice {\n return {\n kind: isSet(object.kind) ? endpoint_KindFromJSON(object.kind) : 0,\n price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined,\n };\n },\n\n toJSON(message: EndpointOfferPrice): unknown {\n const obj: any = {};\n if (message.kind !== 0) {\n obj.kind = endpoint_KindToJSON(message.kind);\n }\n if (message.price !== undefined) {\n obj.price = DecCoin.toJSON(message.price);\n }\n return obj;\n },\n fromPartial(object: DeepPartial<EndpointOfferPrice>): EndpointOfferPrice {\n const message = createBaseEndpointOfferPrice();\n message.kind = object.kind ?? 0;\n message.price = (object.price !== undefined && object.price !== null)\n ? DecCoin.fromPartial(object.price)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseOfferPrices(): OfferPrices {\n return { cpu: undefined, memory: undefined, storage: [], gpu: undefined, endpoints: [] };\n}\n\nexport const OfferPrices: MessageFns<OfferPrices, \"akash.market.v1beta5.OfferPrices\"> = {\n $type: \"akash.market.v1beta5.OfferPrices\" as const,\n\n encode(message: OfferPrices, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n if (message.cpu !== undefined) {\n DecCoin.encode(message.cpu, writer.uint32(18).fork()).join();\n }\n if (message.memory !== undefined) {\n DecCoin.encode(message.memory, writer.uint32(26).fork()).join();\n }\n for (const v of message.storage) {\n StorageOfferPrice.encode(v!, writer.uint32(34).fork()).join();\n }\n if (message.gpu !== undefined) {\n DecCoin.encode(message.gpu, writer.uint32(42).fork()).join();\n }\n for (const v of message.endpoints) {\n EndpointOfferPrice.encode(v!, writer.uint32(50).fork()).join();\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): OfferPrices {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseOfferPrices();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 2: {\n if (tag !== 18) {\n break;\n }\n\n message.cpu = DecCoin.decode(reader, reader.uint32());\n continue;\n }\n case 3: {\n if (tag !== 26) {\n break;\n }\n\n message.memory = DecCoin.decode(reader, reader.uint32());\n continue;\n }\n case 4: {\n if (tag !== 34) {\n break;\n }\n\n message.storage.push(StorageOfferPrice.decode(reader, reader.uint32()));\n continue;\n }\n case 5: {\n if (tag !== 42) {\n break;\n }\n\n message.gpu = DecCoin.decode(reader, reader.uint32());\n continue;\n }\n case 6: {\n if (tag !== 50) {\n break;\n }\n\n message.endpoints.push(EndpointOfferPrice.decode(reader, reader.uint32()));\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n fromJSON(object: any): OfferPrices {\n return {\n cpu: isSet(object.cpu) ? DecCoin.fromJSON(object.cpu) : undefined,\n memory: isSet(object.memory) ? DecCoin.fromJSON(object.memory) : undefined,\n storage: globalThis.Array.isArray(object?.storage)\n ? object.storage.map((e: any) => StorageOfferPrice.fromJSON(e))\n : [],\n gpu: isSet(object.gpu) ? DecCoin.fromJSON(object.gpu) : undefined,\n endpoints: globalThis.Array.isArray(object?.endpoints)\n ? object.endpoints.map((e: any) => EndpointOfferPrice.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: OfferPrices): unknown {\n const obj: any = {};\n if (message.cpu !== undefined) {\n obj.cpu = DecCoin.toJSON(message.cpu);\n }\n if (message.memory !== undefined) {\n obj.memory = DecCoin.toJSON(message.memory);\n }\n if (message.storage?.length) {\n obj.storage = message.storage.map((e) => StorageOfferPrice.toJSON(e));\n }\n if (message.gpu !== undefined) {\n obj.gpu = DecCoin.toJSON(message.gpu);\n }\n if (message.endpoints?.length) {\n obj.endpoints = message.endpoints.map((e) => EndpointOfferPrice.toJSON(e));\n }\n return obj;\n },\n fromPartial(object: DeepPartial<OfferPrices>): OfferPrices {\n const message = createBaseOfferPrices();\n message.cpu = (object.cpu !== undefined && object.cpu !== null) ? DecCoin.fromPartial(object.cpu) : undefined;\n message.memory = (object.memory !== undefined && object.memory !== null)\n ? DecCoin.fromPartial(object.memory)\n : undefined;\n message.storage = object.storage?.map((e) => StorageOfferPrice.fromPartial(e)) || [];\n message.gpu = (object.gpu !== undefined && object.gpu !== null) ? DecCoin.fromPartial(object.gpu) : undefined;\n message.endpoints = object.endpoints?.map((e) => EndpointOfferPrice.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseResourceOffer(): ResourceOffer {\n return { resources: undefined, count: 0, prices: undefined };\n}\n\nexport const ResourceOffer: MessageFns<ResourceOffer, \"akash.market.v1beta5.ResourceOffer\"> = {\n $type: \"akash.market.v1beta5.ResourceOffer\" as const,\n\n encode(message: ResourceOffer, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n if (message.resources !== undefined) {\n Resources.encode(message.resources, writer.uint32(10).fork()).join();\n }\n if (message.count !== 0) {\n writer.uint32(16).uint32(message.count);\n }\n if (message.prices !== undefined) {\n OfferPrices.encode(message.prices, writer.uint32(26).fork()).join();\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): ResourceOffer {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseResourceOffer();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.resources = Resources.decode(reader, reader.uint32());\n continue;\n }\n case 2: {\n if (tag !== 16) {\n break;\n }\n\n message.count = reader.uint32();\n continue;\n }\n case 3: {\n if (tag !== 26) {\n break;\n }\n\n message.prices = OfferPrices.decode(reader, reader.uint32());\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n fromJSON(object: any): ResourceOffer {\n return {\n resources: isSet(object.resources) ? Resources.fromJSON(object.resources) : undefined,\n count: isSet(object.count) ? globalThis.Number(object.count) : 0,\n prices: isSet(object.prices) ? OfferPrices.fromJSON(object.prices) : undefined,\n };\n },\n\n toJSON(message: ResourceOffer): unknown {\n const obj: any = {};\n if (message.resources !== undefined) {\n obj.resources = Resources.toJSON(message.resources);\n }\n if (message.count !== 0) {\n obj.count = Math.round(message.count);\n }\n if (message.prices !== undefined) {\n obj.prices = OfferPrices.toJSON(message.prices);\n }\n return obj;\n },\n fromPartial(object: DeepPartial<ResourceOffer>): ResourceOffer {\n const message = createBaseResourceOffer();\n message.resources = (object.resources !== undefined && object.resources !== null)\n ? Resources.fromPartial(object.resources)\n : undefined;\n message.count = object.count ?? 0;\n message.prices = (object.prices !== undefined && object.prices !== null)\n ? OfferPrices.fromPartial(object.prices)\n : undefined;\n return message;\n },\n};\n\ntype Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;\n\ntype _unused_DeepPartial<T> = T extends Builtin ? T\n : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>\n : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>\n : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }\n : Partial<T>;\n\nfunction _unused_isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n\ninterface _unused_MessageFns<T, V extends string> {\n readonly $type: V;\n encode(message: T, writer?: BinaryWriter): BinaryWriter;\n decode(input: BinaryReader | Uint8Array, length?: number): T;\n fromJSON(object: any): T;\n toJSON(message: T): unknown;\n create(base?: DeepPartial<T>): T;\n fromPartial(object: DeepPartial<T>): T;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iCAAsB;AAStB,kBAA2C;AAE3C,kBAAwB;AACxB,sBAA0E;AAC1E,uBAA0B;AA8G1B,SAAS,8BAAiD;AACxD,SAAO,EAAE,MAAM,IAAI,OAAO,OAAU;AACtC;AAEO,MAAM,oBAA6F;AAAA,EACxG,OAAO;AAAA,EAEP,OAAO,SAA4B,SAAuB,IAAI,yBAAa,GAAiB;AAC1F,QAAI,QAAQ,SAAS,IAAI;AACvB,aAAO,OAAO,EAAE,EAAE,OAAO,QAAQ,IAAI;AAAA,IACvC;AACA,QAAI,QAAQ,UAAU,QAAW;AAC/B,0BAAQ,OAAO,QAAQ,OAAO,OAAO,OAAO,EAAE,EAAE,KAAK,CAAC,EAAE,KAAK;AAAA,IAC/D;AACA,WAAO;AAAA,EACT;AAAA,EAEA,OAAO,OAAkC,QAAoC;AAC3E,UAAM,SAAS,iBAAiB,2BAAe,QAAQ,IAAI,yBAAa,KAAK;AAC7E,UAAM,MAAM,WAAW,SAAY,OAAO,MAAM,OAAO,MAAM;AAC7D,UAAM,UAAU,4BAA4B;AAC5C,WAAO,OAAO,MAAM,KAAK;AACvB,YAAM,MAAM,OAAO,OAAO;AAC1B,cAAQ,QAAQ,GAAG;AAAA,QACjB,KAAK,GAAG;AACN,cAAI,QAAQ,IAAI;AACd;AAAA,UACF;AAEA,kBAAQ,OAAO,OAAO,OAAO;AAC7B;AAAA,QACF;AAAA,QACA,KAAK,GAAG;AACN,cAAI,QAAQ,IAAI;AACd;AAAA,UACF;AAEA,kBAAQ,QAAQ,oBAAQ,OAAO,QAAQ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AAChC;AAAA,MACF;AACA,aAAO,KAAK,MAAM,CAAC;AAAA,IACrB;AACA,WAAO;AAAA,EACT;AAAA,EAEA,SAAS,QAA4B;AACnC,WAAO;AAAA,MACL,eAAW,kCAAM,OAAO,SAAS,IAAI,2BAAU,SAAS,OAAO,SAAS,IAAI;AAAA,MAC5E,WAAO,kCAAM,OAAO,KAAK,IAAI,WAAW,OAAO,OAAO,KAAK,IAAI;AAAA,MAC/D,YAAQ,kCAAM,OAAO,MAAM,IAAI,YAAY,SAAS,OAAO,MAAM,IAAI;AAAA,IACvE;AAAA,EACF;AAAA,EAEA,OAAO,SAAiC;AACtC,UAAM,MAAW,CAAC;AAClB,QAAI,QAAQ,cAAc,QAAW;AACnC,UAAI,YAAY,2BAAU,OAAO,QAAQ,SAAS;AAAA,IACpD;AACA,QAAI,QAAQ,UAAU,GAAG;AACvB,UAAI,QAAQ,KAAK,MAAM,QAAQ,KAAK;AAAA,IACtC;AACA,QAAI,QAAQ,WAAW,QAAW;AAChC,UAAI,SAAS,YAAY,OAAO,QAAQ,MAAM;AAAA,IAChD;AACA,WAAO;AAAA,EACT;AAAA,EACA,YAAY,QAAmD;AAC7D,UAAM,UAAU,wBAAwB;AACxC,YAAQ,YAAa,OAAO,cAAc,UAAa,OAAO,cAAc,OACxE,2BAAU,YAAY,OAAO,SAAS,IACtC;AACJ,YAAQ,QAAQ,OAAO,SAAS;AAChC,YAAQ,SAAU,OAAO,WAAW,UAAa,OAAO,WAAW,OAC/D,YAAY,YAAY,OAAO,MAAM,IACrC;AACJ,WAAO;AAAA,EACT;AACF;AAUA,SAAS,cAAc,OAAqB;AAC1C,SAAO,UAAU,QAAQ,UAAU;AACrC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -29,7 +29,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
var params_exports = {};
|
|
30
30
|
__export(params_exports, {
|
|
31
31
|
Params: () => Params,
|
|
32
|
-
PythContractParams: () => PythContractParams
|
|
32
|
+
PythContractParams: () => PythContractParams,
|
|
33
|
+
WormholeContractParams: () => WormholeContractParams
|
|
33
34
|
});
|
|
34
35
|
module.exports = __toCommonJS(params_exports);
|
|
35
36
|
var import_typeEncodingHelpers = require("../../../../../encoding/typeEncodingHelpers.cjs");
|
|
@@ -85,6 +86,57 @@ const PythContractParams = {
|
|
|
85
86
|
return message;
|
|
86
87
|
}
|
|
87
88
|
};
|
|
89
|
+
function createBaseWormholeContractParams() {
|
|
90
|
+
return { guardianAddresses: [] };
|
|
91
|
+
}
|
|
92
|
+
const WormholeContractParams = {
|
|
93
|
+
$type: "akash.oracle.v1.WormholeContractParams",
|
|
94
|
+
encode(message, writer = new import_wire.BinaryWriter()) {
|
|
95
|
+
for (const v of message.guardianAddresses) {
|
|
96
|
+
writer.uint32(10).string(v);
|
|
97
|
+
}
|
|
98
|
+
return writer;
|
|
99
|
+
},
|
|
100
|
+
decode(input, length) {
|
|
101
|
+
const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input);
|
|
102
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
103
|
+
const message = createBaseWormholeContractParams();
|
|
104
|
+
while (reader.pos < end) {
|
|
105
|
+
const tag = reader.uint32();
|
|
106
|
+
switch (tag >>> 3) {
|
|
107
|
+
case 1: {
|
|
108
|
+
if (tag !== 10) {
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
message.guardianAddresses.push(reader.string());
|
|
112
|
+
continue;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
reader.skip(tag & 7);
|
|
119
|
+
}
|
|
120
|
+
return message;
|
|
121
|
+
},
|
|
122
|
+
fromJSON(object) {
|
|
123
|
+
return {
|
|
124
|
+
guardianAddresses: globalThis.Array.isArray(object?.guardian_addresses) ? object.guardian_addresses.map((e) => globalThis.String(e)) : []
|
|
125
|
+
};
|
|
126
|
+
},
|
|
127
|
+
toJSON(message) {
|
|
128
|
+
const obj = {};
|
|
129
|
+
if (message.guardianAddresses?.length) {
|
|
130
|
+
obj.guardian_addresses = message.guardianAddresses;
|
|
131
|
+
}
|
|
132
|
+
return obj;
|
|
133
|
+
},
|
|
134
|
+
fromPartial(object) {
|
|
135
|
+
const message = createBaseWormholeContractParams();
|
|
136
|
+
message.guardianAddresses = object.guardianAddresses?.map((e) => e) || [];
|
|
137
|
+
return message;
|
|
138
|
+
}
|
|
139
|
+
};
|
|
88
140
|
function createBaseParams() {
|
|
89
141
|
return {
|
|
90
142
|
sources: [],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/generated/protos/akash/oracle/v1/params.ts"],
|
|
4
|
-
"sourcesContent": ["import { isSet } from \"../../../../../encoding/typeEncodingHelpers.ts\"\nimport type { DeepPartial, MessageFns } from \"../../../../../encoding/typeEncodingHelpers.ts\"\n// Code generated by protoc-gen-ts_proto. DO NOT EDIT.\n// versions:\n// protoc-gen-ts_proto v2.7.7\n// protoc unknown\n// source: akash/oracle/v1/params.proto\n\n/* eslint-disable */\nimport { BinaryReader, BinaryWriter } from \"@bufbuild/protobuf/wire\";\nimport Long from \"long\";\nimport { Any } from \"../../../google/protobuf/any.ts\";\n\n/** PythContractParams contains configuration for Pyth price feeds */\nexport interface PythContractParams {\n /** akt_price_feed_id is the Pyth price feed identifier for AKT/USD */\n aktPriceFeedId: string;\n}\n\n/** Params defines the parameters for the oracle module */\nexport interface Params {\n /**\n * sources addresses allowed to write prices into oracle module\n * those are to be smartcontract addresses\n */\n sources: string[];\n /** Minimum number of price sources required (default: 2) */\n minPriceSources: number;\n /** Maximum price staleness in blocks (default: 50 = ~ 5 minutes) */\n maxPriceStalenessBlocks: Long;\n /** TWAP window in blocks (default: 50 = ~ 5 minutes) */\n twapWindow: Long;\n /** Maximum price deviation in basis points (default: 150 = 1.5%) */\n maxPriceDeviationBps: Long;\n /** feed_contracts_params contains the configuration for the price feed contracts */\n feedContractsParams: Any[];\n}\n\nfunction createBasePythContractParams(): PythContractParams {\n return { aktPriceFeedId: \"\" };\n}\n\nexport const PythContractParams: MessageFns<PythContractParams, \"akash.oracle.v1.PythContractParams\"> = {\n $type: \"akash.oracle.v1.PythContractParams\" as const,\n\n encode(message: PythContractParams, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n if (message.aktPriceFeedId !== \"\") {\n writer.uint32(10).string(message.aktPriceFeedId);\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): PythContractParams {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePythContractParams();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.aktPriceFeedId = reader.string();\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n fromJSON(object: any): PythContractParams {\n return { aktPriceFeedId: isSet(object.akt_price_feed_id) ? globalThis.String(object.akt_price_feed_id) : \"\" };\n },\n\n toJSON(message: PythContractParams): unknown {\n const obj: any = {};\n if (message.aktPriceFeedId !== \"\") {\n obj.akt_price_feed_id = message.aktPriceFeedId;\n }\n return obj;\n },\n fromPartial(object: DeepPartial<PythContractParams>): PythContractParams {\n const message = createBasePythContractParams();\n message.aktPriceFeedId = object.aktPriceFeedId ?? \"\";\n return message;\n },\n};\n\nfunction createBaseParams(): Params {\n return {\n sources: [],\n minPriceSources: 0,\n maxPriceStalenessBlocks: Long.ZERO,\n twapWindow: Long.ZERO,\n maxPriceDeviationBps: Long.UZERO,\n feedContractsParams: [],\n };\n}\n\nexport const Params: MessageFns<Params, \"akash.oracle.v1.Params\"> = {\n $type: \"akash.oracle.v1.Params\" as const,\n\n encode(message: Params, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n for (const v of message.sources) {\n writer.uint32(10).string(v!);\n }\n if (message.minPriceSources !== 0) {\n writer.uint32(16).uint32(message.minPriceSources);\n }\n if (!message.maxPriceStalenessBlocks.equals(Long.ZERO)) {\n writer.uint32(24).int64(message.maxPriceStalenessBlocks.toString());\n }\n if (!message.twapWindow.equals(Long.ZERO)) {\n writer.uint32(32).int64(message.twapWindow.toString());\n }\n if (!message.maxPriceDeviationBps.equals(Long.UZERO)) {\n writer.uint32(40).uint64(message.maxPriceDeviationBps.toString());\n }\n for (const v of message.feedContractsParams) {\n Any.encode(v!, writer.uint32(50).fork()).join();\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): Params {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseParams();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.sources.push(reader.string());\n continue;\n }\n case 2: {\n if (tag !== 16) {\n break;\n }\n\n message.minPriceSources = reader.uint32();\n continue;\n }\n case 3: {\n if (tag !== 24) {\n break;\n }\n\n message.maxPriceStalenessBlocks = Long.fromString(reader.int64().toString());\n continue;\n }\n case 4: {\n if (tag !== 32) {\n break;\n }\n\n message.twapWindow = Long.fromString(reader.int64().toString());\n continue;\n }\n case 5: {\n if (tag !== 40) {\n break;\n }\n\n message.maxPriceDeviationBps = Long.fromString(reader.uint64().toString(), true);\n continue;\n }\n case 6: {\n if (tag !== 50) {\n break;\n }\n\n message.feedContractsParams.push(Any.decode(reader, reader.uint32()));\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n fromJSON(object: any): Params {\n return {\n sources: globalThis.Array.isArray(object?.sources) ? object.sources.map((e: any) => globalThis.String(e)) : [],\n minPriceSources: isSet(object.min_price_sources) ? globalThis.Number(object.min_price_sources) : 0,\n maxPriceStalenessBlocks: isSet(object.max_price_staleness_blocks)\n ? Long.fromValue(object.max_price_staleness_blocks)\n : Long.ZERO,\n twapWindow: isSet(object.twap_window) ? Long.fromValue(object.twap_window) : Long.ZERO,\n maxPriceDeviationBps: isSet(object.max_price_deviation_bps)\n ? Long.fromValue(object.max_price_deviation_bps)\n : Long.UZERO,\n feedContractsParams: globalThis.Array.isArray(object?.feed_contracts_params)\n ? object.feed_contracts_params.map((e: any) => Any.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: Params): unknown {\n const obj: any = {};\n if (message.sources?.length) {\n obj.sources = message.sources;\n }\n if (message.minPriceSources !== 0) {\n obj.min_price_sources = Math.round(message.minPriceSources);\n }\n if (!message.maxPriceStalenessBlocks.equals(Long.ZERO)) {\n obj.max_price_staleness_blocks = (message.maxPriceStalenessBlocks || Long.ZERO).toString();\n }\n if (!message.twapWindow.equals(Long.ZERO)) {\n obj.twap_window = (message.twapWindow || Long.ZERO).toString();\n }\n if (!message.maxPriceDeviationBps.equals(Long.UZERO)) {\n obj.max_price_deviation_bps = (message.maxPriceDeviationBps || Long.UZERO).toString();\n }\n if (message.feedContractsParams?.length) {\n obj.feed_contracts_params = message.feedContractsParams.map((e) => Any.toJSON(e));\n }\n return obj;\n },\n fromPartial(object: DeepPartial<Params>): Params {\n const message = createBaseParams();\n message.sources = object.sources?.map((e) => e) || [];\n message.minPriceSources = object.minPriceSources ?? 0;\n message.maxPriceStalenessBlocks =\n (object.maxPriceStalenessBlocks !== undefined && object.maxPriceStalenessBlocks !== null)\n ? Long.fromValue(object.maxPriceStalenessBlocks)\n : Long.ZERO;\n message.twapWindow = (object.twapWindow !== undefined && object.twapWindow !== null)\n ? Long.fromValue(object.twapWindow)\n : Long.ZERO;\n message.maxPriceDeviationBps = (object.maxPriceDeviationBps !== undefined && object.maxPriceDeviationBps !== null)\n ? Long.fromValue(object.maxPriceDeviationBps)\n : Long.UZERO;\n message.feedContractsParams = object.feedContractsParams?.map((e) => Any.fromPartial(e)) || [];\n return message;\n },\n};\n\ntype Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;\n\ntype _unused_DeepPartial<T> = T extends Builtin ? T\n : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>\n : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>\n : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }\n : Partial<T>;\n\nfunction _unused_isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n\ninterface _unused_MessageFns<T, V extends string> {\n readonly $type: V;\n encode(message: T, writer?: BinaryWriter): BinaryWriter;\n decode(input: BinaryReader | Uint8Array, length?: number): T;\n fromJSON(object: any): T;\n toJSON(message: T): unknown;\n create(base?: DeepPartial<T>): T;\n fromPartial(object: DeepPartial<T>): T;\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iCAAsB;AAStB,kBAA2C;AAC3C,kBAAiB;AACjB,iBAAoB;
|
|
4
|
+
"sourcesContent": ["import { isSet } from \"../../../../../encoding/typeEncodingHelpers.ts\"\nimport type { DeepPartial, MessageFns } from \"../../../../../encoding/typeEncodingHelpers.ts\"\n// Code generated by protoc-gen-ts_proto. DO NOT EDIT.\n// versions:\n// protoc-gen-ts_proto v2.7.7\n// protoc unknown\n// source: akash/oracle/v1/params.proto\n\n/* eslint-disable */\nimport { BinaryReader, BinaryWriter } from \"@bufbuild/protobuf/wire\";\nimport Long from \"long\";\nimport { Any } from \"../../../google/protobuf/any.ts\";\n\n/** PythContractParams contains configuration for Pyth price feeds */\nexport interface PythContractParams {\n /** akt_price_feed_id is the Pyth price feed identifier for AKT/USD */\n aktPriceFeedId: string;\n}\n\n/**\n * WormholeContractParams contains configuration for Wormhole guardian set.\n * This allows the Wormhole contract to pull guardian public keys from x/oracle\n * module params, enabling guardian set updates via Akash governance.\n */\nexport interface WormholeContractParams {\n /**\n * guardian_addresses is the list of Wormhole guardian addresses.\n * Each address is a 20-byte Ethereum-style address, hex-encoded.\n * The Wormhole contract uses these to verify VAA signatures.\n */\n guardianAddresses: string[];\n}\n\n/** Params defines the parameters for the oracle module */\nexport interface Params {\n /**\n * sources addresses allowed to write prices into oracle module\n * those are to be smartcontract addresses\n */\n sources: string[];\n /** Minimum number of price sources required (default: 2) */\n minPriceSources: number;\n /** Maximum price staleness in blocks (default: 50 = ~ 5 minutes) */\n maxPriceStalenessBlocks: Long;\n /** TWAP window in blocks (default: 50 = ~ 5 minutes) */\n twapWindow: Long;\n /** Maximum price deviation in basis points (default: 150 = 1.5%) */\n maxPriceDeviationBps: Long;\n /** feed_contracts_params contains the configuration for the price feed contracts */\n feedContractsParams: Any[];\n}\n\nfunction createBasePythContractParams(): PythContractParams {\n return { aktPriceFeedId: \"\" };\n}\n\nexport const PythContractParams: MessageFns<PythContractParams, \"akash.oracle.v1.PythContractParams\"> = {\n $type: \"akash.oracle.v1.PythContractParams\" as const,\n\n encode(message: PythContractParams, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n if (message.aktPriceFeedId !== \"\") {\n writer.uint32(10).string(message.aktPriceFeedId);\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): PythContractParams {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePythContractParams();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.aktPriceFeedId = reader.string();\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n fromJSON(object: any): PythContractParams {\n return { aktPriceFeedId: isSet(object.akt_price_feed_id) ? globalThis.String(object.akt_price_feed_id) : \"\" };\n },\n\n toJSON(message: PythContractParams): unknown {\n const obj: any = {};\n if (message.aktPriceFeedId !== \"\") {\n obj.akt_price_feed_id = message.aktPriceFeedId;\n }\n return obj;\n },\n fromPartial(object: DeepPartial<PythContractParams>): PythContractParams {\n const message = createBasePythContractParams();\n message.aktPriceFeedId = object.aktPriceFeedId ?? \"\";\n return message;\n },\n};\n\nfunction createBaseWormholeContractParams(): WormholeContractParams {\n return { guardianAddresses: [] };\n}\n\nexport const WormholeContractParams: MessageFns<WormholeContractParams, \"akash.oracle.v1.WormholeContractParams\"> = {\n $type: \"akash.oracle.v1.WormholeContractParams\" as const,\n\n encode(message: WormholeContractParams, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n for (const v of message.guardianAddresses) {\n writer.uint32(10).string(v!);\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): WormholeContractParams {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseWormholeContractParams();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.guardianAddresses.push(reader.string());\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n fromJSON(object: any): WormholeContractParams {\n return {\n guardianAddresses: globalThis.Array.isArray(object?.guardian_addresses)\n ? object.guardian_addresses.map((e: any) => globalThis.String(e))\n : [],\n };\n },\n\n toJSON(message: WormholeContractParams): unknown {\n const obj: any = {};\n if (message.guardianAddresses?.length) {\n obj.guardian_addresses = message.guardianAddresses;\n }\n return obj;\n },\n fromPartial(object: DeepPartial<WormholeContractParams>): WormholeContractParams {\n const message = createBaseWormholeContractParams();\n message.guardianAddresses = object.guardianAddresses?.map((e) => e) || [];\n return message;\n },\n};\n\nfunction createBaseParams(): Params {\n return {\n sources: [],\n minPriceSources: 0,\n maxPriceStalenessBlocks: Long.ZERO,\n twapWindow: Long.ZERO,\n maxPriceDeviationBps: Long.UZERO,\n feedContractsParams: [],\n };\n}\n\nexport const Params: MessageFns<Params, \"akash.oracle.v1.Params\"> = {\n $type: \"akash.oracle.v1.Params\" as const,\n\n encode(message: Params, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n for (const v of message.sources) {\n writer.uint32(10).string(v!);\n }\n if (message.minPriceSources !== 0) {\n writer.uint32(16).uint32(message.minPriceSources);\n }\n if (!message.maxPriceStalenessBlocks.equals(Long.ZERO)) {\n writer.uint32(24).int64(message.maxPriceStalenessBlocks.toString());\n }\n if (!message.twapWindow.equals(Long.ZERO)) {\n writer.uint32(32).int64(message.twapWindow.toString());\n }\n if (!message.maxPriceDeviationBps.equals(Long.UZERO)) {\n writer.uint32(40).uint64(message.maxPriceDeviationBps.toString());\n }\n for (const v of message.feedContractsParams) {\n Any.encode(v!, writer.uint32(50).fork()).join();\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): Params {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseParams();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.sources.push(reader.string());\n continue;\n }\n case 2: {\n if (tag !== 16) {\n break;\n }\n\n message.minPriceSources = reader.uint32();\n continue;\n }\n case 3: {\n if (tag !== 24) {\n break;\n }\n\n message.maxPriceStalenessBlocks = Long.fromString(reader.int64().toString());\n continue;\n }\n case 4: {\n if (tag !== 32) {\n break;\n }\n\n message.twapWindow = Long.fromString(reader.int64().toString());\n continue;\n }\n case 5: {\n if (tag !== 40) {\n break;\n }\n\n message.maxPriceDeviationBps = Long.fromString(reader.uint64().toString(), true);\n continue;\n }\n case 6: {\n if (tag !== 50) {\n break;\n }\n\n message.feedContractsParams.push(Any.decode(reader, reader.uint32()));\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n fromJSON(object: any): Params {\n return {\n sources: globalThis.Array.isArray(object?.sources) ? object.sources.map((e: any) => globalThis.String(e)) : [],\n minPriceSources: isSet(object.min_price_sources) ? globalThis.Number(object.min_price_sources) : 0,\n maxPriceStalenessBlocks: isSet(object.max_price_staleness_blocks)\n ? Long.fromValue(object.max_price_staleness_blocks)\n : Long.ZERO,\n twapWindow: isSet(object.twap_window) ? Long.fromValue(object.twap_window) : Long.ZERO,\n maxPriceDeviationBps: isSet(object.max_price_deviation_bps)\n ? Long.fromValue(object.max_price_deviation_bps)\n : Long.UZERO,\n feedContractsParams: globalThis.Array.isArray(object?.feed_contracts_params)\n ? object.feed_contracts_params.map((e: any) => Any.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: Params): unknown {\n const obj: any = {};\n if (message.sources?.length) {\n obj.sources = message.sources;\n }\n if (message.minPriceSources !== 0) {\n obj.min_price_sources = Math.round(message.minPriceSources);\n }\n if (!message.maxPriceStalenessBlocks.equals(Long.ZERO)) {\n obj.max_price_staleness_blocks = (message.maxPriceStalenessBlocks || Long.ZERO).toString();\n }\n if (!message.twapWindow.equals(Long.ZERO)) {\n obj.twap_window = (message.twapWindow || Long.ZERO).toString();\n }\n if (!message.maxPriceDeviationBps.equals(Long.UZERO)) {\n obj.max_price_deviation_bps = (message.maxPriceDeviationBps || Long.UZERO).toString();\n }\n if (message.feedContractsParams?.length) {\n obj.feed_contracts_params = message.feedContractsParams.map((e) => Any.toJSON(e));\n }\n return obj;\n },\n fromPartial(object: DeepPartial<Params>): Params {\n const message = createBaseParams();\n message.sources = object.sources?.map((e) => e) || [];\n message.minPriceSources = object.minPriceSources ?? 0;\n message.maxPriceStalenessBlocks =\n (object.maxPriceStalenessBlocks !== undefined && object.maxPriceStalenessBlocks !== null)\n ? Long.fromValue(object.maxPriceStalenessBlocks)\n : Long.ZERO;\n message.twapWindow = (object.twapWindow !== undefined && object.twapWindow !== null)\n ? Long.fromValue(object.twapWindow)\n : Long.ZERO;\n message.maxPriceDeviationBps = (object.maxPriceDeviationBps !== undefined && object.maxPriceDeviationBps !== null)\n ? Long.fromValue(object.maxPriceDeviationBps)\n : Long.UZERO;\n message.feedContractsParams = object.feedContractsParams?.map((e) => Any.fromPartial(e)) || [];\n return message;\n },\n};\n\ntype Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;\n\ntype _unused_DeepPartial<T> = T extends Builtin ? T\n : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>\n : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>\n : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }\n : Partial<T>;\n\nfunction _unused_isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n\ninterface _unused_MessageFns<T, V extends string> {\n readonly $type: V;\n encode(message: T, writer?: BinaryWriter): BinaryWriter;\n decode(input: BinaryReader | Uint8Array, length?: number): T;\n fromJSON(object: any): T;\n toJSON(message: T): unknown;\n create(base?: DeepPartial<T>): T;\n fromPartial(object: DeepPartial<T>): T;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iCAAsB;AAStB,kBAA2C;AAC3C,kBAAiB;AACjB,iBAAoB;AAyCpB,SAAS,+BAAmD;AAC1D,SAAO,EAAE,gBAAgB,GAAG;AAC9B;AAEO,MAAM,qBAA2F;AAAA,EACtG,OAAO;AAAA,EAEP,OAAO,SAA6B,SAAuB,IAAI,yBAAa,GAAiB;AAC3F,QAAI,QAAQ,mBAAmB,IAAI;AACjC,aAAO,OAAO,EAAE,EAAE,OAAO,QAAQ,cAAc;AAAA,IACjD;AACA,WAAO;AAAA,EACT;AAAA,EAEA,OAAO,OAAkC,QAAqC;AAC5E,UAAM,SAAS,iBAAiB,2BAAe,QAAQ,IAAI,yBAAa,KAAK;AAC7E,UAAM,MAAM,WAAW,SAAY,OAAO,MAAM,OAAO,MAA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AAA,QAAK;AACT,YAAQ,uBAAwB,OAAO,yBAAyB,UAAa,OAAO,yBAAyB,OACzG,YAAAA,QAAK,UAAU,OAAO,oBAAoB,IAC1C,YAAAA,QAAK;AACT,YAAQ,sBAAsB,OAAO,qBAAqB,IAAI,CAAC,MAAM,eAAI,YAAY,CAAC,CAAC,KAAK,CAAC;AAC7F,WAAO;AAAA,EACT;AACF;AAUA,SAAS,cAAc,OAAqB;AAC1C,SAAO,UAAU,QAAQ,UAAU;AACrC;",
|
|
6
6
|
"names": ["Long"]
|
|
7
7
|
}
|
|
@@ -23,6 +23,7 @@ __export(service_akash_exports, {
|
|
|
23
23
|
module.exports = __toCommonJS(service_akash_exports);
|
|
24
24
|
var import_empty = require("../../../google/protobuf/empty.cjs");
|
|
25
25
|
var import_status = require("./status.cjs");
|
|
26
|
+
var import_validation = require("./validation.cjs");
|
|
26
27
|
const ProviderRPC = {
|
|
27
28
|
typeName: "akash.provider.v1.ProviderRPC",
|
|
28
29
|
methods: {
|
|
@@ -43,6 +44,14 @@ const ProviderRPC = {
|
|
|
43
44
|
get parent() {
|
|
44
45
|
return ProviderRPC;
|
|
45
46
|
}
|
|
47
|
+
},
|
|
48
|
+
bidScreening: {
|
|
49
|
+
name: "BidScreening",
|
|
50
|
+
input: import_validation.BidScreeningRequest,
|
|
51
|
+
output: import_validation.BidScreeningResponse,
|
|
52
|
+
get parent() {
|
|
53
|
+
return ProviderRPC;
|
|
54
|
+
}
|
|
46
55
|
}
|
|
47
56
|
}
|
|
48
57
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/generated/protos/akash/provider/v1/service_akash.ts"],
|
|
4
|
-
"sourcesContent": ["import { Empty } from \"../../../google/protobuf/empty.ts\";\nimport { Status } from \"./status.ts\";\n\nexport const ProviderRPC = {\n typeName: \"akash.provider.v1.ProviderRPC\",\n methods: {\n getStatus: {\n name: \"GetStatus\",\n httpPath: \"/v1/status\",\n input: Empty,\n output: Status,\n get parent() { return ProviderRPC; },\n },\n streamStatus: {\n name: \"StreamStatus\",\n kind: \"server_streaming\",\n input: Empty,\n output: Status,\n get parent() { return ProviderRPC; },\n },\n },\n} as const;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAsB;AACtB,oBAAuB;
|
|
4
|
+
"sourcesContent": ["import { Empty } from \"../../../google/protobuf/empty.ts\";\nimport { Status } from \"./status.ts\";\nimport { BidScreeningRequest, BidScreeningResponse } from \"./validation.ts\";\n\nexport const ProviderRPC = {\n typeName: \"akash.provider.v1.ProviderRPC\",\n methods: {\n getStatus: {\n name: \"GetStatus\",\n httpPath: \"/v1/status\",\n input: Empty,\n output: Status,\n get parent() { return ProviderRPC; },\n },\n streamStatus: {\n name: \"StreamStatus\",\n kind: \"server_streaming\",\n input: Empty,\n output: Status,\n get parent() { return ProviderRPC; },\n },\n bidScreening: {\n name: \"BidScreening\",\n input: BidScreeningRequest,\n output: BidScreeningResponse,\n get parent() { return ProviderRPC; },\n },\n },\n} as const;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAsB;AACtB,oBAAuB;AACvB,wBAA0D;AAEnD,MAAM,cAAc;AAAA,EACzB,UAAU;AAAA,EACV,SAAS;AAAA,IACP,WAAW;AAAA,MACT,MAAM;AAAA,MACN,UAAU;AAAA,MACV,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,IAAI,SAAS;AAAE,eAAO;AAAA,MAAa;AAAA,IACrC;AAAA,IACA,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,IAAI,SAAS;AAAE,eAAO;AAAA,MAAa;AAAA,IACrC;AAAA,IACA,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,IAAI,SAAS;AAAE,eAAO;AAAA,MAAa;AAAA,IACrC;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|