@sparkdreamnft/sparkdreamjs 0.0.29 → 0.0.30
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/akash/bme/v1/events.d.ts +332 -0
- package/akash/bme/v1/events.js +500 -0
- package/akash/bme/v1/filters.d.ts +80 -0
- package/akash/bme/v1/filters.js +110 -0
- package/akash/bme/v1/genesis.d.ts +271 -0
- package/akash/bme/v1/genesis.js +452 -0
- package/akash/bme/v1/msgs.d.ts +585 -0
- package/akash/bme/v1/msgs.js +867 -0
- package/akash/bme/v1/params.d.ts +147 -0
- package/akash/bme/v1/params.js +174 -0
- package/akash/bme/v1/query.d.ts +508 -0
- package/akash/bme/v1/query.js +727 -0
- package/akash/bme/v1/query.lcd.d.ts +12 -0
- package/akash/bme/v1/query.lcd.js +41 -0
- package/akash/bme/v1/query.rpc.Query.d.ts +28 -0
- package/akash/bme/v1/query.rpc.Query.js +56 -0
- package/akash/bme/v1/service.amino.d.ts +28 -0
- package/akash/bme/v1/service.amino.js +32 -0
- package/akash/bme/v1/service.d.ts +1 -0
- package/akash/bme/v1/service.js +2 -0
- package/akash/bme/v1/service.registry.d.ts +73 -0
- package/akash/bme/v1/service.registry.js +109 -0
- package/akash/bme/v1/service.rpc.msg.d.ts +46 -0
- package/akash/bme/v1/service.rpc.msg.js +55 -0
- package/akash/bme/v1/types.d.ts +766 -0
- package/akash/bme/v1/types.js +1283 -0
- package/akash/bundle.d.ts +3317 -2680
- package/akash/bundle.js +294 -263
- package/akash/client.d.ts +25 -0
- package/akash/client.js +4 -1
- package/akash/lcd.d.ts +3 -0
- package/akash/lcd.js +5 -0
- package/akash/rpc.query.d.ts +8 -0
- package/akash/rpc.query.js +3 -0
- package/akash/rpc.tx.d.ts +3 -0
- package/akash/rpc.tx.js +3 -0
- package/amino/bundle.js +2 -2
- package/cosmos/bundle.d.ts +7545 -7545
- package/cosmos/bundle.js +416 -416
- package/cosmos_proto/bundle.d.ts +23 -23
- package/cosmos_proto/bundle.js +2 -2
- package/esm/akash/bme/v1/events.js +497 -0
- package/esm/akash/bme/v1/filters.js +107 -0
- package/esm/akash/bme/v1/genesis.js +449 -0
- package/esm/akash/bme/v1/msgs.js +864 -0
- package/esm/akash/bme/v1/params.js +171 -0
- package/esm/akash/bme/v1/query.js +724 -0
- package/esm/akash/bme/v1/query.lcd.js +37 -0
- package/esm/akash/bme/v1/query.rpc.Query.js +51 -0
- package/esm/akash/bme/v1/service.amino.js +29 -0
- package/esm/akash/bme/v1/service.js +1 -0
- package/esm/akash/bme/v1/service.registry.js +105 -0
- package/esm/akash/bme/v1/service.rpc.msg.js +50 -0
- package/esm/akash/bme/v1/types.js +1274 -0
- package/esm/akash/bundle.js +294 -263
- package/esm/akash/client.js +4 -1
- package/esm/akash/lcd.js +5 -0
- package/esm/akash/rpc.query.js +3 -0
- package/esm/akash/rpc.tx.js +3 -0
- package/esm/amino/bundle.js +2 -2
- package/esm/cosmos/bundle.js +416 -416
- package/esm/cosmos_proto/bundle.js +2 -2
- package/esm/gogoproto/bundle.js +2 -2
- package/esm/google/bundle.js +8 -8
- package/esm/ibc/bundle.js +224 -224
- package/esm/sparkdream/bundle.js +486 -486
- package/esm/tendermint/bundle.js +20 -20
- package/gogoproto/bundle.js +2 -2
- package/google/bundle.d.ts +431 -431
- package/google/bundle.js +8 -8
- package/ibc/bundle.d.ts +3843 -3843
- package/ibc/bundle.js +224 -224
- package/package.json +1 -1
- package/sparkdream/bundle.d.ts +17352 -17352
- package/sparkdream/bundle.js +486 -486
- package/tendermint/bundle.d.ts +844 -844
- package/tendermint/bundle.js +20 -20
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//@ts-nocheck
|
|
2
|
+
import { setPaginationParams } from "../../../helpers";
|
|
3
|
+
export class LCDQueryClient {
|
|
4
|
+
req;
|
|
5
|
+
constructor({ requestClient }) {
|
|
6
|
+
this.req = requestClient;
|
|
7
|
+
}
|
|
8
|
+
/* Params returns the module parameters */
|
|
9
|
+
params = async (_params = {}) => {
|
|
10
|
+
const endpoint = `akash/bme/v1/params`;
|
|
11
|
+
return await this.req.get(endpoint);
|
|
12
|
+
};
|
|
13
|
+
/* VaultState returns the current vault state */
|
|
14
|
+
vaultState = async (_params = {}) => {
|
|
15
|
+
const endpoint = `akash/bme/v1/vault`;
|
|
16
|
+
return await this.req.get(endpoint);
|
|
17
|
+
};
|
|
18
|
+
/* Status returns the current circuit breaker status */
|
|
19
|
+
status = async (_params = {}) => {
|
|
20
|
+
const endpoint = `akash/bme/v1/status`;
|
|
21
|
+
return await this.req.get(endpoint);
|
|
22
|
+
};
|
|
23
|
+
/* LedgerRecords queries ledger records with optional filters for status, source, denom, to_denom */
|
|
24
|
+
ledgerRecords = async (params) => {
|
|
25
|
+
const options = {
|
|
26
|
+
params: {}
|
|
27
|
+
};
|
|
28
|
+
if (typeof params?.filters !== "undefined") {
|
|
29
|
+
options.params.filters = params.filters;
|
|
30
|
+
}
|
|
31
|
+
if (typeof params?.pagination !== "undefined") {
|
|
32
|
+
setPaginationParams(options, params.pagination);
|
|
33
|
+
}
|
|
34
|
+
const endpoint = `akash/bme/v1/ledger`;
|
|
35
|
+
return await this.req.get(endpoint, options);
|
|
36
|
+
};
|
|
37
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { BinaryReader } from "../../../binary";
|
|
2
|
+
import { createProtobufRpcClient } from "@cosmjs/stargate";
|
|
3
|
+
import { QueryParamsRequest, QueryParamsResponse, QueryVaultStateRequest, QueryVaultStateResponse, QueryStatusRequest, QueryStatusResponse, QueryLedgerRecordsRequest, QueryLedgerRecordsResponse } from "./query";
|
|
4
|
+
export class QueryClientImpl {
|
|
5
|
+
rpc;
|
|
6
|
+
constructor(rpc) {
|
|
7
|
+
this.rpc = rpc;
|
|
8
|
+
}
|
|
9
|
+
/* Params returns the module parameters */
|
|
10
|
+
params = async (request = {}) => {
|
|
11
|
+
const data = QueryParamsRequest.encode(request).finish();
|
|
12
|
+
const promise = this.rpc.request("akash.bme.v1.Query", "Params", data);
|
|
13
|
+
return promise.then(data => QueryParamsResponse.decode(new BinaryReader(data)));
|
|
14
|
+
};
|
|
15
|
+
/* VaultState returns the current vault state */
|
|
16
|
+
vaultState = async (request = {}) => {
|
|
17
|
+
const data = QueryVaultStateRequest.encode(request).finish();
|
|
18
|
+
const promise = this.rpc.request("akash.bme.v1.Query", "VaultState", data);
|
|
19
|
+
return promise.then(data => QueryVaultStateResponse.decode(new BinaryReader(data)));
|
|
20
|
+
};
|
|
21
|
+
/* Status returns the current circuit breaker status */
|
|
22
|
+
status = async (request = {}) => {
|
|
23
|
+
const data = QueryStatusRequest.encode(request).finish();
|
|
24
|
+
const promise = this.rpc.request("akash.bme.v1.Query", "Status", data);
|
|
25
|
+
return promise.then(data => QueryStatusResponse.decode(new BinaryReader(data)));
|
|
26
|
+
};
|
|
27
|
+
/* LedgerRecords queries ledger records with optional filters for status, source, denom, to_denom */
|
|
28
|
+
ledgerRecords = async (request) => {
|
|
29
|
+
const data = QueryLedgerRecordsRequest.encode(request).finish();
|
|
30
|
+
const promise = this.rpc.request("akash.bme.v1.Query", "LedgerRecords", data);
|
|
31
|
+
return promise.then(data => QueryLedgerRecordsResponse.decode(new BinaryReader(data)));
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export const createRpcQueryExtension = (base) => {
|
|
35
|
+
const rpc = createProtobufRpcClient(base);
|
|
36
|
+
const queryService = new QueryClientImpl(rpc);
|
|
37
|
+
return {
|
|
38
|
+
params(request) {
|
|
39
|
+
return queryService.params(request);
|
|
40
|
+
},
|
|
41
|
+
vaultState(request) {
|
|
42
|
+
return queryService.vaultState(request);
|
|
43
|
+
},
|
|
44
|
+
status(request) {
|
|
45
|
+
return queryService.status(request);
|
|
46
|
+
},
|
|
47
|
+
ledgerRecords(request) {
|
|
48
|
+
return queryService.ledgerRecords(request);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//@ts-nocheck
|
|
2
|
+
import { MsgUpdateParams, MsgBurnMint, MsgMintACT, MsgBurnACT, MsgFundVault } from "./msgs";
|
|
3
|
+
export const AminoConverter = {
|
|
4
|
+
"/akash.bme.v1.MsgUpdateParams": {
|
|
5
|
+
aminoType: "akash/bme/v1/MsgUpdateParams",
|
|
6
|
+
toAmino: MsgUpdateParams.toAmino,
|
|
7
|
+
fromAmino: MsgUpdateParams.fromAmino
|
|
8
|
+
},
|
|
9
|
+
"/akash.bme.v1.MsgBurnMint": {
|
|
10
|
+
aminoType: "akash/bme/v1/MsgBurnMint",
|
|
11
|
+
toAmino: MsgBurnMint.toAmino,
|
|
12
|
+
fromAmino: MsgBurnMint.fromAmino
|
|
13
|
+
},
|
|
14
|
+
"/akash.bme.v1.MsgMintACT": {
|
|
15
|
+
aminoType: "akash/bme/v1/MsgMintACT",
|
|
16
|
+
toAmino: MsgMintACT.toAmino,
|
|
17
|
+
fromAmino: MsgMintACT.fromAmino
|
|
18
|
+
},
|
|
19
|
+
"/akash.bme.v1.MsgBurnACT": {
|
|
20
|
+
aminoType: "akash/bme/v1/MsgBurnACT",
|
|
21
|
+
toAmino: MsgBurnACT.toAmino,
|
|
22
|
+
fromAmino: MsgBurnACT.fromAmino
|
|
23
|
+
},
|
|
24
|
+
"/akash.bme.v1.MsgFundVault": {
|
|
25
|
+
aminoType: "akash/bme/v1/MsgFundVault",
|
|
26
|
+
toAmino: MsgFundVault.toAmino,
|
|
27
|
+
fromAmino: MsgFundVault.fromAmino
|
|
28
|
+
}
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { MsgUpdateParams, MsgBurnMint, MsgMintACT, MsgBurnACT, MsgFundVault } from "./msgs";
|
|
2
|
+
export const registry = [["/akash.bme.v1.MsgUpdateParams", MsgUpdateParams], ["/akash.bme.v1.MsgBurnMint", MsgBurnMint], ["/akash.bme.v1.MsgMintACT", MsgMintACT], ["/akash.bme.v1.MsgBurnACT", MsgBurnACT], ["/akash.bme.v1.MsgFundVault", MsgFundVault]];
|
|
3
|
+
export const load = (protoRegistry) => {
|
|
4
|
+
registry.forEach(([typeUrl, mod]) => {
|
|
5
|
+
protoRegistry.register(typeUrl, mod);
|
|
6
|
+
});
|
|
7
|
+
};
|
|
8
|
+
export const MessageComposer = {
|
|
9
|
+
encoded: {
|
|
10
|
+
updateParams(value) {
|
|
11
|
+
return {
|
|
12
|
+
typeUrl: "/akash.bme.v1.MsgUpdateParams",
|
|
13
|
+
value: MsgUpdateParams.encode(value).finish()
|
|
14
|
+
};
|
|
15
|
+
},
|
|
16
|
+
burnMint(value) {
|
|
17
|
+
return {
|
|
18
|
+
typeUrl: "/akash.bme.v1.MsgBurnMint",
|
|
19
|
+
value: MsgBurnMint.encode(value).finish()
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
mintACT(value) {
|
|
23
|
+
return {
|
|
24
|
+
typeUrl: "/akash.bme.v1.MsgMintACT",
|
|
25
|
+
value: MsgMintACT.encode(value).finish()
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
burnACT(value) {
|
|
29
|
+
return {
|
|
30
|
+
typeUrl: "/akash.bme.v1.MsgBurnACT",
|
|
31
|
+
value: MsgBurnACT.encode(value).finish()
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
fundVault(value) {
|
|
35
|
+
return {
|
|
36
|
+
typeUrl: "/akash.bme.v1.MsgFundVault",
|
|
37
|
+
value: MsgFundVault.encode(value).finish()
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
withTypeUrl: {
|
|
42
|
+
updateParams(value) {
|
|
43
|
+
return {
|
|
44
|
+
typeUrl: "/akash.bme.v1.MsgUpdateParams",
|
|
45
|
+
value
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
burnMint(value) {
|
|
49
|
+
return {
|
|
50
|
+
typeUrl: "/akash.bme.v1.MsgBurnMint",
|
|
51
|
+
value
|
|
52
|
+
};
|
|
53
|
+
},
|
|
54
|
+
mintACT(value) {
|
|
55
|
+
return {
|
|
56
|
+
typeUrl: "/akash.bme.v1.MsgMintACT",
|
|
57
|
+
value
|
|
58
|
+
};
|
|
59
|
+
},
|
|
60
|
+
burnACT(value) {
|
|
61
|
+
return {
|
|
62
|
+
typeUrl: "/akash.bme.v1.MsgBurnACT",
|
|
63
|
+
value
|
|
64
|
+
};
|
|
65
|
+
},
|
|
66
|
+
fundVault(value) {
|
|
67
|
+
return {
|
|
68
|
+
typeUrl: "/akash.bme.v1.MsgFundVault",
|
|
69
|
+
value
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
fromPartial: {
|
|
74
|
+
updateParams(value) {
|
|
75
|
+
return {
|
|
76
|
+
typeUrl: "/akash.bme.v1.MsgUpdateParams",
|
|
77
|
+
value: MsgUpdateParams.fromPartial(value)
|
|
78
|
+
};
|
|
79
|
+
},
|
|
80
|
+
burnMint(value) {
|
|
81
|
+
return {
|
|
82
|
+
typeUrl: "/akash.bme.v1.MsgBurnMint",
|
|
83
|
+
value: MsgBurnMint.fromPartial(value)
|
|
84
|
+
};
|
|
85
|
+
},
|
|
86
|
+
mintACT(value) {
|
|
87
|
+
return {
|
|
88
|
+
typeUrl: "/akash.bme.v1.MsgMintACT",
|
|
89
|
+
value: MsgMintACT.fromPartial(value)
|
|
90
|
+
};
|
|
91
|
+
},
|
|
92
|
+
burnACT(value) {
|
|
93
|
+
return {
|
|
94
|
+
typeUrl: "/akash.bme.v1.MsgBurnACT",
|
|
95
|
+
value: MsgBurnACT.fromPartial(value)
|
|
96
|
+
};
|
|
97
|
+
},
|
|
98
|
+
fundVault(value) {
|
|
99
|
+
return {
|
|
100
|
+
typeUrl: "/akash.bme.v1.MsgFundVault",
|
|
101
|
+
value: MsgFundVault.fromPartial(value)
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { BinaryReader } from "../../../binary";
|
|
2
|
+
import { MsgUpdateParams, MsgUpdateParamsResponse, MsgBurnMint, MsgBurnMintResponse, MsgMintACT, MsgMintACTResponse, MsgBurnACT, MsgBurnACTResponse, MsgFundVault, MsgFundVaultResponse } from "./msgs";
|
|
3
|
+
export class MsgClientImpl {
|
|
4
|
+
rpc;
|
|
5
|
+
constructor(rpc) {
|
|
6
|
+
this.rpc = rpc;
|
|
7
|
+
}
|
|
8
|
+
/* UpdateParams updates the module parameters.
|
|
9
|
+
This operation can only be performed through governance proposals. */
|
|
10
|
+
updateParams = async (request) => {
|
|
11
|
+
const data = MsgUpdateParams.encode(request).finish();
|
|
12
|
+
const promise = this.rpc.request("akash.bme.v1.Msg", "UpdateParams", data);
|
|
13
|
+
return promise.then(data => MsgUpdateParamsResponse.decode(new BinaryReader(data)));
|
|
14
|
+
};
|
|
15
|
+
/* BurnMint allows users to burn one token and mint another at current oracle prices.
|
|
16
|
+
Typically used to burn unused ACT tokens back to AKT.
|
|
17
|
+
The operation may be delayed or rejected based on circuit breaker status. */
|
|
18
|
+
burnMint = async (request) => {
|
|
19
|
+
const data = MsgBurnMint.encode(request).finish();
|
|
20
|
+
const promise = this.rpc.request("akash.bme.v1.Msg", "BurnMint", data);
|
|
21
|
+
return promise.then(data => MsgBurnMintResponse.decode(new BinaryReader(data)));
|
|
22
|
+
};
|
|
23
|
+
/* MintACT mints ACT tokens by burning the specified source token.
|
|
24
|
+
The mint amount is calculated based on current oracle prices and
|
|
25
|
+
the collateral ratio. May be halted if circuit breaker is triggered. */
|
|
26
|
+
mintACT = async (request) => {
|
|
27
|
+
const data = MsgMintACT.encode(request).finish();
|
|
28
|
+
const promise = this.rpc.request("akash.bme.v1.Msg", "MintACT", data);
|
|
29
|
+
return promise.then(data => MsgMintACTResponse.decode(new BinaryReader(data)));
|
|
30
|
+
};
|
|
31
|
+
/* BurnACT burns ACT tokens and mints the specified destination token.
|
|
32
|
+
The burn operation uses remint credits when available, otherwise
|
|
33
|
+
requires adequate collateral backing based on oracle prices. */
|
|
34
|
+
burnACT = async (request) => {
|
|
35
|
+
const data = MsgBurnACT.encode(request).finish();
|
|
36
|
+
const promise = this.rpc.request("akash.bme.v1.Msg", "BurnACT", data);
|
|
37
|
+
return promise.then(data => MsgBurnACTResponse.decode(new BinaryReader(data)));
|
|
38
|
+
};
|
|
39
|
+
/* FundVault seeds the BME vault with AKT from a designated source (e.g., community pool).
|
|
40
|
+
This provides the initial volatility buffer required for burn/mint operations.
|
|
41
|
+
Can only be executed through governance proposals. */
|
|
42
|
+
fundVault = async (request) => {
|
|
43
|
+
const data = MsgFundVault.encode(request).finish();
|
|
44
|
+
const promise = this.rpc.request("akash.bme.v1.Msg", "FundVault", data);
|
|
45
|
+
return promise.then(data => MsgFundVaultResponse.decode(new BinaryReader(data)));
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export const createClientImpl = (rpc) => {
|
|
49
|
+
return new MsgClientImpl(rpc);
|
|
50
|
+
};
|