juno-network 0.10.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- package/main/codegen/cosmos/bundle.js +47 -47
- package/main/codegen/cosmwasm/bundle.js +10 -10
- package/main/codegen/helpers.js +4 -4
- package/main/codegen/ibc/bundle.js +28 -28
- package/main/codegen/index.js +11 -0
- package/main/codegen/juno/bundle.js +23 -9
- package/main/codegen/juno/client.js +67 -0
- package/main/codegen/juno/feeshare/v1/feeshare.js +64 -0
- package/main/codegen/juno/feeshare/v1/genesis.js +136 -0
- package/main/codegen/juno/feeshare/v1/query.js +456 -0
- package/main/codegen/juno/feeshare/v1/query.lcd.js +189 -0
- package/main/codegen/juno/feeshare/v1/query.rpc.Query.js +102 -0
- package/main/codegen/juno/feeshare/v1/tx.amino.js +74 -0
- package/main/codegen/juno/feeshare/v1/tx.js +248 -0
- package/main/codegen/juno/feeshare/v1/tx.registry.js +83 -0
- package/main/codegen/juno/feeshare/v1/tx.rpc.msg.js +55 -0
- package/main/codegen/juno/lcd.js +18 -4
- package/main/codegen/juno/rpc.query.js +14 -4
- package/main/codegen/juno/rpc.tx.js +133 -0
- package/main/codegen/tendermint/bundle.js +17 -17
- package/module/codegen/cosmos/bundle.js +47 -47
- package/module/codegen/cosmwasm/bundle.js +10 -10
- package/module/codegen/helpers.js +4 -4
- package/module/codegen/ibc/bundle.js +28 -28
- package/module/codegen/index.js +2 -1
- package/module/codegen/juno/bundle.js +23 -9
- package/module/codegen/juno/client.js +36 -0
- package/module/codegen/juno/feeshare/v1/feeshare.js +53 -0
- package/module/codegen/juno/feeshare/v1/genesis.js +98 -0
- package/module/codegen/juno/feeshare/v1/query.js +391 -0
- package/module/codegen/juno/feeshare/v1/query.lcd.js +67 -0
- package/module/codegen/juno/feeshare/v1/query.rpc.Query.js +65 -0
- package/module/codegen/juno/feeshare/v1/tx.amino.js +73 -0
- package/module/codegen/juno/feeshare/v1/tx.js +227 -0
- package/module/codegen/juno/feeshare/v1/tx.registry.js +69 -0
- package/module/codegen/juno/feeshare/v1/tx.rpc.msg.js +29 -0
- package/module/codegen/juno/lcd.js +5 -0
- package/module/codegen/juno/rpc.query.js +3 -0
- package/module/codegen/juno/rpc.tx.js +30 -0
- package/module/codegen/tendermint/bundle.js +17 -17
- package/package.json +8 -8
- package/src/codegen/cosmos/bundle.ts +76 -76
- package/src/codegen/cosmwasm/bundle.ts +16 -16
- package/src/codegen/helpers.ts +7 -5
- package/src/codegen/ibc/bundle.ts +34 -34
- package/src/codegen/index.ts +2 -1
- package/src/codegen/juno/bundle.ts +37 -14
- package/src/codegen/juno/client.ts +45 -0
- package/src/codegen/juno/feeshare/v1/feeshare.ts +115 -0
- package/src/codegen/juno/feeshare/v1/genesis.ts +181 -0
- package/src/codegen/juno/feeshare/v1/query.lcd.ts +83 -0
- package/src/codegen/juno/feeshare/v1/query.rpc.Query.ts +99 -0
- package/src/codegen/juno/feeshare/v1/query.ts +680 -0
- package/src/codegen/juno/feeshare/v1/tx.amino.ts +98 -0
- package/src/codegen/juno/feeshare/v1/tx.registry.ts +79 -0
- package/src/codegen/juno/feeshare/v1/tx.rpc.msg.ts +47 -0
- package/src/codegen/juno/feeshare/v1/tx.ts +409 -0
- package/src/codegen/juno/lcd.ts +5 -0
- package/src/codegen/juno/rpc.query.ts +3 -0
- package/src/codegen/juno/rpc.tx.ts +33 -0
- package/src/codegen/tendermint/bundle.ts +22 -22
- package/types/codegen/JunoSwap.client.d.ts +1 -1
- package/types/codegen/JunoSwap.types.d.ts +1 -1
- package/types/codegen/contracts.d.ts +1 -1
- package/types/codegen/cosmos/bundle.d.ts +331 -3694
- package/types/codegen/cosmos/client.d.ts +3 -2
- package/types/codegen/cosmos/rpc.query.d.ts +2 -1
- package/types/codegen/cosmos_proto/bundle.d.ts +2 -9
- package/types/codegen/cosmwasm/bundle.d.ts +56 -488
- package/types/codegen/cosmwasm/client.d.ts +3 -2
- package/types/codegen/cosmwasm/rpc.query.d.ts +2 -1
- package/types/codegen/google/bundle.d.ts +31 -1256
- package/types/codegen/helpers.d.ts +5 -5
- package/types/codegen/ibc/bundle.d.ts +169 -1905
- package/types/codegen/ibc/client.d.ts +3 -2
- package/types/codegen/ibc/rpc.query.d.ts +2 -1
- package/types/codegen/ics23/bundle.d.ts +13 -482
- package/types/codegen/index.d.ts +1 -1
- package/types/codegen/juno/bundle.d.ts +10 -38
- package/types/codegen/juno/rpc.query.d.ts +2 -1
- package/types/codegen/tendermint/bundle.d.ts +85 -1674
@@ -4,14 +4,14 @@ import * as _47 from "./wasm/v1/proposal";
|
|
4
4
|
import * as _48 from "./wasm/v1/query";
|
5
5
|
import * as _49 from "./wasm/v1/tx";
|
6
6
|
import * as _50 from "./wasm/v1/types";
|
7
|
-
import * as
|
8
|
-
import * as
|
9
|
-
import * as
|
10
|
-
import * as
|
11
|
-
import * as
|
12
|
-
import * as
|
13
|
-
import * as
|
14
|
-
import * as
|
7
|
+
import * as _132 from "./wasm/v1/tx.amino";
|
8
|
+
import * as _133 from "./wasm/v1/tx.registry";
|
9
|
+
import * as _134 from "./wasm/v1/query.lcd";
|
10
|
+
import * as _135 from "./wasm/v1/query.rpc.Query";
|
11
|
+
import * as _136 from "./wasm/v1/tx.rpc.msg";
|
12
|
+
import * as _167 from "./lcd";
|
13
|
+
import * as _168 from "./rpc.query";
|
14
|
+
import * as _169 from "./rpc.tx";
|
15
15
|
export namespace cosmwasm {
|
16
16
|
export namespace wasm {
|
17
17
|
export const v1 = { ..._45,
|
@@ -20,15 +20,15 @@ export namespace cosmwasm {
|
|
20
20
|
..._48,
|
21
21
|
..._49,
|
22
22
|
..._50,
|
23
|
-
...
|
24
|
-
...
|
25
|
-
...
|
26
|
-
...
|
27
|
-
...
|
23
|
+
..._132,
|
24
|
+
..._133,
|
25
|
+
..._134,
|
26
|
+
..._135,
|
27
|
+
..._136
|
28
28
|
};
|
29
29
|
}
|
30
|
-
export const ClientFactory = { ...
|
31
|
-
...
|
32
|
-
...
|
30
|
+
export const ClientFactory = { ..._167,
|
31
|
+
..._168,
|
32
|
+
..._169
|
33
33
|
};
|
34
34
|
}
|
package/src/codegen/helpers.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
/**
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
* This file and any referenced files were automatically generated by @osmonauts/telescope@0.80.0
|
3
|
+
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
|
4
|
+
* and run the transpile command or yarn proto command to regenerate this bundle.
|
5
|
+
*/
|
6
|
+
|
7
7
|
import * as _m0 from "protobufjs/minimal";
|
8
8
|
import Long from 'long';
|
9
9
|
|
@@ -162,6 +162,8 @@ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefi
|
|
162
162
|
|
163
163
|
export type DeepPartial<T> = T extends Builtin
|
164
164
|
? T
|
165
|
+
: T extends Long
|
166
|
+
? string | number | Long
|
165
167
|
: T extends Array<infer U>
|
166
168
|
? Array<DeepPartial<U>>
|
167
169
|
: T extends ReadonlyArray<infer U>
|
@@ -20,29 +20,29 @@ import * as _75 from "./lightclients/localhost/v1/localhost";
|
|
20
20
|
import * as _76 from "./lightclients/solomachine/v1/solomachine";
|
21
21
|
import * as _77 from "./lightclients/solomachine/v2/solomachine";
|
22
22
|
import * as _78 from "./lightclients/tendermint/v1/tendermint";
|
23
|
-
import * as
|
24
|
-
import * as
|
25
|
-
import * as
|
26
|
-
import * as
|
27
|
-
import * as
|
28
|
-
import * as
|
29
|
-
import * as
|
30
|
-
import * as
|
31
|
-
import * as
|
32
|
-
import * as
|
33
|
-
import * as
|
34
|
-
import * as
|
35
|
-
import * as
|
36
|
-
import * as
|
37
|
-
import * as
|
38
|
-
import * as
|
39
|
-
import * as
|
40
|
-
import * as
|
41
|
-
import * as
|
42
|
-
import * as
|
43
|
-
import * as
|
44
|
-
import * as
|
45
|
-
import * as
|
23
|
+
import * as _137 from "./applications/transfer/v1/tx.amino";
|
24
|
+
import * as _138 from "./core/channel/v1/tx.amino";
|
25
|
+
import * as _139 from "./core/client/v1/tx.amino";
|
26
|
+
import * as _140 from "./core/connection/v1/tx.amino";
|
27
|
+
import * as _141 from "./applications/transfer/v1/tx.registry";
|
28
|
+
import * as _142 from "./core/channel/v1/tx.registry";
|
29
|
+
import * as _143 from "./core/client/v1/tx.registry";
|
30
|
+
import * as _144 from "./core/connection/v1/tx.registry";
|
31
|
+
import * as _145 from "./applications/transfer/v1/query.lcd";
|
32
|
+
import * as _146 from "./core/channel/v1/query.lcd";
|
33
|
+
import * as _147 from "./core/client/v1/query.lcd";
|
34
|
+
import * as _148 from "./core/connection/v1/query.lcd";
|
35
|
+
import * as _149 from "./applications/transfer/v1/query.rpc.Query";
|
36
|
+
import * as _150 from "./core/channel/v1/query.rpc.Query";
|
37
|
+
import * as _151 from "./core/client/v1/query.rpc.Query";
|
38
|
+
import * as _152 from "./core/connection/v1/query.rpc.Query";
|
39
|
+
import * as _153 from "./applications/transfer/v1/tx.rpc.msg";
|
40
|
+
import * as _154 from "./core/channel/v1/tx.rpc.msg";
|
41
|
+
import * as _155 from "./core/client/v1/tx.rpc.msg";
|
42
|
+
import * as _156 from "./core/connection/v1/tx.rpc.msg";
|
43
|
+
import * as _170 from "./lcd";
|
44
|
+
import * as _171 from "./rpc.query";
|
45
|
+
import * as _172 from "./rpc.tx";
|
46
46
|
export namespace ibc {
|
47
47
|
export namespace applications {
|
48
48
|
export namespace transfer {
|
@@ -50,11 +50,11 @@ export namespace ibc {
|
|
50
50
|
..._58,
|
51
51
|
..._59,
|
52
52
|
..._60,
|
53
|
-
..._133,
|
54
53
|
..._137,
|
55
54
|
..._141,
|
56
55
|
..._145,
|
57
|
-
..._149
|
56
|
+
..._149,
|
57
|
+
..._153
|
58
58
|
};
|
59
59
|
export const v2 = { ..._61
|
60
60
|
};
|
@@ -66,11 +66,11 @@ export namespace ibc {
|
|
66
66
|
..._63,
|
67
67
|
..._64,
|
68
68
|
..._65,
|
69
|
-
..._134,
|
70
69
|
..._138,
|
71
70
|
..._142,
|
72
71
|
..._146,
|
73
|
-
..._150
|
72
|
+
..._150,
|
73
|
+
..._154
|
74
74
|
};
|
75
75
|
}
|
76
76
|
export namespace client {
|
@@ -78,11 +78,11 @@ export namespace ibc {
|
|
78
78
|
..._67,
|
79
79
|
..._68,
|
80
80
|
..._69,
|
81
|
-
..._135,
|
82
81
|
..._139,
|
83
82
|
..._143,
|
84
83
|
..._147,
|
85
|
-
..._151
|
84
|
+
..._151,
|
85
|
+
..._155
|
86
86
|
};
|
87
87
|
}
|
88
88
|
export namespace commitment {
|
@@ -94,11 +94,11 @@ export namespace ibc {
|
|
94
94
|
..._72,
|
95
95
|
..._73,
|
96
96
|
..._74,
|
97
|
-
..._136,
|
98
97
|
..._140,
|
99
98
|
..._144,
|
100
99
|
..._148,
|
101
|
-
..._152
|
100
|
+
..._152,
|
101
|
+
..._156
|
102
102
|
};
|
103
103
|
}
|
104
104
|
}
|
@@ -118,8 +118,8 @@ export namespace ibc {
|
|
118
118
|
};
|
119
119
|
}
|
120
120
|
}
|
121
|
-
export const ClientFactory = { ...
|
122
|
-
...
|
123
|
-
...
|
121
|
+
export const ClientFactory = { ..._170,
|
122
|
+
..._171,
|
123
|
+
..._172
|
124
124
|
};
|
125
125
|
}
|
package/src/codegen/index.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* This file and any referenced files were automatically generated by @osmonauts/telescope@0.
|
2
|
+
* This file and any referenced files were automatically generated by @osmonauts/telescope@0.80.0
|
3
3
|
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
|
4
4
|
* and run the transpile command or yarn proto command to regenerate this bundle.
|
5
5
|
*/
|
@@ -15,5 +15,6 @@ export * from "./google/bundle";
|
|
15
15
|
export * from "./ibc/bundle";
|
16
16
|
export * from "./ibc/client";
|
17
17
|
export * from "./juno/bundle";
|
18
|
+
export * from "./juno/client";
|
18
19
|
export * from "./tendermint/bundle";
|
19
20
|
export * from "./contracts";
|
@@ -1,18 +1,41 @@
|
|
1
|
-
import * as _79 from "./
|
2
|
-
import * as _80 from "./
|
3
|
-
import * as _81 from "./
|
4
|
-
import * as
|
5
|
-
import * as
|
6
|
-
import * as
|
7
|
-
import * as
|
1
|
+
import * as _79 from "./feeshare/v1/feeshare";
|
2
|
+
import * as _80 from "./feeshare/v1/genesis";
|
3
|
+
import * as _81 from "./feeshare/v1/query";
|
4
|
+
import * as _82 from "./feeshare/v1/tx";
|
5
|
+
import * as _83 from "./mint/genesis";
|
6
|
+
import * as _84 from "./mint/mint";
|
7
|
+
import * as _85 from "./mint/query";
|
8
|
+
import * as _157 from "./feeshare/v1/tx.amino";
|
9
|
+
import * as _158 from "./feeshare/v1/tx.registry";
|
10
|
+
import * as _159 from "./feeshare/v1/query.lcd";
|
11
|
+
import * as _160 from "./mint/query.lcd";
|
12
|
+
import * as _161 from "./feeshare/v1/query.rpc.Query";
|
13
|
+
import * as _162 from "./mint/query.rpc.Query";
|
14
|
+
import * as _163 from "./feeshare/v1/tx.rpc.msg";
|
15
|
+
import * as _173 from "./lcd";
|
16
|
+
import * as _174 from "./rpc.query";
|
17
|
+
import * as _175 from "./rpc.tx";
|
8
18
|
export namespace juno {
|
9
|
-
export
|
10
|
-
...
|
11
|
-
|
12
|
-
|
13
|
-
|
19
|
+
export namespace feeshare {
|
20
|
+
export const v1 = { ..._79,
|
21
|
+
..._80,
|
22
|
+
..._81,
|
23
|
+
..._82,
|
24
|
+
..._157,
|
25
|
+
..._158,
|
26
|
+
..._159,
|
27
|
+
..._161,
|
28
|
+
..._163
|
29
|
+
};
|
30
|
+
}
|
31
|
+
export const mint = { ..._83,
|
32
|
+
..._84,
|
33
|
+
..._85,
|
34
|
+
..._160,
|
35
|
+
..._162
|
14
36
|
};
|
15
|
-
export const ClientFactory = { ...
|
16
|
-
...
|
37
|
+
export const ClientFactory = { ..._173,
|
38
|
+
..._174,
|
39
|
+
..._175
|
17
40
|
};
|
18
41
|
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import { GeneratedType, Registry, OfflineSigner } from "@cosmjs/proto-signing";
|
2
|
+
import { defaultRegistryTypes, AminoTypes, SigningStargateClient } from "@cosmjs/stargate";
|
3
|
+
import { HttpEndpoint } from "@cosmjs/tendermint-rpc";
|
4
|
+
import * as junoFeeshareV1TxRegistry from "./feeshare/v1/tx.registry";
|
5
|
+
import * as junoFeeshareV1TxAmino from "./feeshare/v1/tx.amino";
|
6
|
+
export const junoAminoConverters = { ...junoFeeshareV1TxAmino.AminoConverter
|
7
|
+
};
|
8
|
+
export const junoProtoRegistry: ReadonlyArray<[string, GeneratedType]> = [...junoFeeshareV1TxRegistry.registry];
|
9
|
+
export const getSigningJunoClientOptions = ({
|
10
|
+
defaultTypes = defaultRegistryTypes
|
11
|
+
}: {
|
12
|
+
defaultTypes?: ReadonlyArray<[string, GeneratedType]>;
|
13
|
+
} = {}): {
|
14
|
+
registry: Registry;
|
15
|
+
aminoTypes: AminoTypes;
|
16
|
+
} => {
|
17
|
+
const registry = new Registry([...defaultTypes, ...junoProtoRegistry]);
|
18
|
+
const aminoTypes = new AminoTypes({ ...junoAminoConverters
|
19
|
+
});
|
20
|
+
return {
|
21
|
+
registry,
|
22
|
+
aminoTypes
|
23
|
+
};
|
24
|
+
};
|
25
|
+
export const getSigningJunoClient = async ({
|
26
|
+
rpcEndpoint,
|
27
|
+
signer,
|
28
|
+
defaultTypes = defaultRegistryTypes
|
29
|
+
}: {
|
30
|
+
rpcEndpoint: string | HttpEndpoint;
|
31
|
+
signer: OfflineSigner;
|
32
|
+
defaultTypes?: ReadonlyArray<[string, GeneratedType]>;
|
33
|
+
}) => {
|
34
|
+
const {
|
35
|
+
registry,
|
36
|
+
aminoTypes
|
37
|
+
} = getSigningJunoClientOptions({
|
38
|
+
defaultTypes
|
39
|
+
});
|
40
|
+
const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, {
|
41
|
+
registry,
|
42
|
+
aminoTypes
|
43
|
+
});
|
44
|
+
return client;
|
45
|
+
};
|
@@ -0,0 +1,115 @@
|
|
1
|
+
import * as _m0 from "protobufjs/minimal";
|
2
|
+
import { DeepPartial } from "../../../helpers";
|
3
|
+
/**
|
4
|
+
* FeeShare defines an instance that organizes fee distribution conditions for
|
5
|
+
* the owner of a given smart contract
|
6
|
+
*/
|
7
|
+
|
8
|
+
export interface FeeShare {
|
9
|
+
/**
|
10
|
+
* contract_address is the bech32 address of a registered contract in string
|
11
|
+
* form
|
12
|
+
*/
|
13
|
+
contractAddress: string;
|
14
|
+
/**
|
15
|
+
* deployer_address is the bech32 address of message sender. It must be the
|
16
|
+
* same as the contracts admin address.
|
17
|
+
*/
|
18
|
+
|
19
|
+
deployerAddress: string;
|
20
|
+
/**
|
21
|
+
* withdrawer_address is the bech32 address of account receiving the
|
22
|
+
* transaction fees.
|
23
|
+
*/
|
24
|
+
|
25
|
+
withdrawerAddress: string;
|
26
|
+
}
|
27
|
+
/**
|
28
|
+
* FeeShare defines an instance that organizes fee distribution conditions for
|
29
|
+
* the owner of a given smart contract
|
30
|
+
*/
|
31
|
+
|
32
|
+
export interface FeeShareSDKType {
|
33
|
+
/**
|
34
|
+
* contract_address is the bech32 address of a registered contract in string
|
35
|
+
* form
|
36
|
+
*/
|
37
|
+
contract_address: string;
|
38
|
+
/**
|
39
|
+
* deployer_address is the bech32 address of message sender. It must be the
|
40
|
+
* same as the contracts admin address.
|
41
|
+
*/
|
42
|
+
|
43
|
+
deployer_address: string;
|
44
|
+
/**
|
45
|
+
* withdrawer_address is the bech32 address of account receiving the
|
46
|
+
* transaction fees.
|
47
|
+
*/
|
48
|
+
|
49
|
+
withdrawer_address: string;
|
50
|
+
}
|
51
|
+
|
52
|
+
function createBaseFeeShare(): FeeShare {
|
53
|
+
return {
|
54
|
+
contractAddress: "",
|
55
|
+
deployerAddress: "",
|
56
|
+
withdrawerAddress: ""
|
57
|
+
};
|
58
|
+
}
|
59
|
+
|
60
|
+
export const FeeShare = {
|
61
|
+
encode(message: FeeShare, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
62
|
+
if (message.contractAddress !== "") {
|
63
|
+
writer.uint32(10).string(message.contractAddress);
|
64
|
+
}
|
65
|
+
|
66
|
+
if (message.deployerAddress !== "") {
|
67
|
+
writer.uint32(18).string(message.deployerAddress);
|
68
|
+
}
|
69
|
+
|
70
|
+
if (message.withdrawerAddress !== "") {
|
71
|
+
writer.uint32(26).string(message.withdrawerAddress);
|
72
|
+
}
|
73
|
+
|
74
|
+
return writer;
|
75
|
+
},
|
76
|
+
|
77
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): FeeShare {
|
78
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
79
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
80
|
+
const message = createBaseFeeShare();
|
81
|
+
|
82
|
+
while (reader.pos < end) {
|
83
|
+
const tag = reader.uint32();
|
84
|
+
|
85
|
+
switch (tag >>> 3) {
|
86
|
+
case 1:
|
87
|
+
message.contractAddress = reader.string();
|
88
|
+
break;
|
89
|
+
|
90
|
+
case 2:
|
91
|
+
message.deployerAddress = reader.string();
|
92
|
+
break;
|
93
|
+
|
94
|
+
case 3:
|
95
|
+
message.withdrawerAddress = reader.string();
|
96
|
+
break;
|
97
|
+
|
98
|
+
default:
|
99
|
+
reader.skipType(tag & 7);
|
100
|
+
break;
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
return message;
|
105
|
+
},
|
106
|
+
|
107
|
+
fromPartial(object: DeepPartial<FeeShare>): FeeShare {
|
108
|
+
const message = createBaseFeeShare();
|
109
|
+
message.contractAddress = object.contractAddress ?? "";
|
110
|
+
message.deployerAddress = object.deployerAddress ?? "";
|
111
|
+
message.withdrawerAddress = object.withdrawerAddress ?? "";
|
112
|
+
return message;
|
113
|
+
}
|
114
|
+
|
115
|
+
};
|
@@ -0,0 +1,181 @@
|
|
1
|
+
import { FeeShare, FeeShareSDKType } from "./feeshare";
|
2
|
+
import * as _m0 from "protobufjs/minimal";
|
3
|
+
import { DeepPartial } from "../../../helpers";
|
4
|
+
/** GenesisState defines the module's genesis state. */
|
5
|
+
|
6
|
+
export interface GenesisState {
|
7
|
+
/** params are the feeshare module parameters */
|
8
|
+
params?: Params;
|
9
|
+
/** FeeShare is a slice of active registered contracts for fee distribution */
|
10
|
+
|
11
|
+
feeShare: FeeShare[];
|
12
|
+
}
|
13
|
+
/** GenesisState defines the module's genesis state. */
|
14
|
+
|
15
|
+
export interface GenesisStateSDKType {
|
16
|
+
/** params are the feeshare module parameters */
|
17
|
+
params?: ParamsSDKType;
|
18
|
+
/** FeeShare is a slice of active registered contracts for fee distribution */
|
19
|
+
|
20
|
+
fee_share: FeeShareSDKType[];
|
21
|
+
}
|
22
|
+
/** Params defines the feeshare module params */
|
23
|
+
|
24
|
+
export interface Params {
|
25
|
+
/** enable_feeshare defines a parameter to enable the feeshare module */
|
26
|
+
enableFeeShare: boolean;
|
27
|
+
/**
|
28
|
+
* developer_shares defines the proportion of the transaction fees to be
|
29
|
+
* distributed to the registered contract owner
|
30
|
+
*/
|
31
|
+
|
32
|
+
developerShares: string;
|
33
|
+
/**
|
34
|
+
* allowed_denoms defines the list of denoms that are allowed to be paid to
|
35
|
+
* the contract withdraw addresses. If said denom is not in the list, the fees
|
36
|
+
* will ONLY be sent to the community pool.
|
37
|
+
* If this list is empty, all denoms are allowed.
|
38
|
+
*/
|
39
|
+
|
40
|
+
allowedDenoms: string[];
|
41
|
+
}
|
42
|
+
/** Params defines the feeshare module params */
|
43
|
+
|
44
|
+
export interface ParamsSDKType {
|
45
|
+
/** enable_feeshare defines a parameter to enable the feeshare module */
|
46
|
+
enable_fee_share: boolean;
|
47
|
+
/**
|
48
|
+
* developer_shares defines the proportion of the transaction fees to be
|
49
|
+
* distributed to the registered contract owner
|
50
|
+
*/
|
51
|
+
|
52
|
+
developer_shares: string;
|
53
|
+
/**
|
54
|
+
* allowed_denoms defines the list of denoms that are allowed to be paid to
|
55
|
+
* the contract withdraw addresses. If said denom is not in the list, the fees
|
56
|
+
* will ONLY be sent to the community pool.
|
57
|
+
* If this list is empty, all denoms are allowed.
|
58
|
+
*/
|
59
|
+
|
60
|
+
allowed_denoms: string[];
|
61
|
+
}
|
62
|
+
|
63
|
+
function createBaseGenesisState(): GenesisState {
|
64
|
+
return {
|
65
|
+
params: undefined,
|
66
|
+
feeShare: []
|
67
|
+
};
|
68
|
+
}
|
69
|
+
|
70
|
+
export const GenesisState = {
|
71
|
+
encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
72
|
+
if (message.params !== undefined) {
|
73
|
+
Params.encode(message.params, writer.uint32(10).fork()).ldelim();
|
74
|
+
}
|
75
|
+
|
76
|
+
for (const v of message.feeShare) {
|
77
|
+
FeeShare.encode(v!, writer.uint32(18).fork()).ldelim();
|
78
|
+
}
|
79
|
+
|
80
|
+
return writer;
|
81
|
+
},
|
82
|
+
|
83
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState {
|
84
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
85
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
86
|
+
const message = createBaseGenesisState();
|
87
|
+
|
88
|
+
while (reader.pos < end) {
|
89
|
+
const tag = reader.uint32();
|
90
|
+
|
91
|
+
switch (tag >>> 3) {
|
92
|
+
case 1:
|
93
|
+
message.params = Params.decode(reader, reader.uint32());
|
94
|
+
break;
|
95
|
+
|
96
|
+
case 2:
|
97
|
+
message.feeShare.push(FeeShare.decode(reader, reader.uint32()));
|
98
|
+
break;
|
99
|
+
|
100
|
+
default:
|
101
|
+
reader.skipType(tag & 7);
|
102
|
+
break;
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
return message;
|
107
|
+
},
|
108
|
+
|
109
|
+
fromPartial(object: DeepPartial<GenesisState>): GenesisState {
|
110
|
+
const message = createBaseGenesisState();
|
111
|
+
message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined;
|
112
|
+
message.feeShare = object.feeShare?.map(e => FeeShare.fromPartial(e)) || [];
|
113
|
+
return message;
|
114
|
+
}
|
115
|
+
|
116
|
+
};
|
117
|
+
|
118
|
+
function createBaseParams(): Params {
|
119
|
+
return {
|
120
|
+
enableFeeShare: false,
|
121
|
+
developerShares: "",
|
122
|
+
allowedDenoms: []
|
123
|
+
};
|
124
|
+
}
|
125
|
+
|
126
|
+
export const Params = {
|
127
|
+
encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
128
|
+
if (message.enableFeeShare === true) {
|
129
|
+
writer.uint32(8).bool(message.enableFeeShare);
|
130
|
+
}
|
131
|
+
|
132
|
+
if (message.developerShares !== "") {
|
133
|
+
writer.uint32(18).string(message.developerShares);
|
134
|
+
}
|
135
|
+
|
136
|
+
for (const v of message.allowedDenoms) {
|
137
|
+
writer.uint32(26).string(v!);
|
138
|
+
}
|
139
|
+
|
140
|
+
return writer;
|
141
|
+
},
|
142
|
+
|
143
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): Params {
|
144
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
145
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
146
|
+
const message = createBaseParams();
|
147
|
+
|
148
|
+
while (reader.pos < end) {
|
149
|
+
const tag = reader.uint32();
|
150
|
+
|
151
|
+
switch (tag >>> 3) {
|
152
|
+
case 1:
|
153
|
+
message.enableFeeShare = reader.bool();
|
154
|
+
break;
|
155
|
+
|
156
|
+
case 2:
|
157
|
+
message.developerShares = reader.string();
|
158
|
+
break;
|
159
|
+
|
160
|
+
case 3:
|
161
|
+
message.allowedDenoms.push(reader.string());
|
162
|
+
break;
|
163
|
+
|
164
|
+
default:
|
165
|
+
reader.skipType(tag & 7);
|
166
|
+
break;
|
167
|
+
}
|
168
|
+
}
|
169
|
+
|
170
|
+
return message;
|
171
|
+
},
|
172
|
+
|
173
|
+
fromPartial(object: DeepPartial<Params>): Params {
|
174
|
+
const message = createBaseParams();
|
175
|
+
message.enableFeeShare = object.enableFeeShare ?? false;
|
176
|
+
message.developerShares = object.developerShares ?? "";
|
177
|
+
message.allowedDenoms = object.allowedDenoms?.map(e => e) || [];
|
178
|
+
return message;
|
179
|
+
}
|
180
|
+
|
181
|
+
};
|
@@ -0,0 +1,83 @@
|
|
1
|
+
import { setPaginationParams } from "../../../helpers";
|
2
|
+
import { LCDClient } from "@osmonauts/lcd";
|
3
|
+
import { QueryFeeSharesRequest, QueryFeeSharesResponseSDKType, QueryFeeShareRequest, QueryFeeShareResponseSDKType, QueryParamsRequest, QueryParamsResponseSDKType, QueryDeployerFeeSharesRequest, QueryDeployerFeeSharesResponseSDKType, QueryWithdrawerFeeSharesRequest, QueryWithdrawerFeeSharesResponseSDKType } from "./query";
|
4
|
+
export class LCDQueryClient {
|
5
|
+
req: LCDClient;
|
6
|
+
|
7
|
+
constructor({
|
8
|
+
requestClient
|
9
|
+
}: {
|
10
|
+
requestClient: LCDClient;
|
11
|
+
}) {
|
12
|
+
this.req = requestClient;
|
13
|
+
this.feeShares = this.feeShares.bind(this);
|
14
|
+
this.feeShare = this.feeShare.bind(this);
|
15
|
+
this.params = this.params.bind(this);
|
16
|
+
this.deployerFeeShares = this.deployerFeeShares.bind(this);
|
17
|
+
this.withdrawerFeeShares = this.withdrawerFeeShares.bind(this);
|
18
|
+
}
|
19
|
+
/* FeeShares retrieves all registered FeeShares */
|
20
|
+
|
21
|
+
|
22
|
+
async feeShares(params: QueryFeeSharesRequest = {
|
23
|
+
pagination: undefined
|
24
|
+
}): Promise<QueryFeeSharesResponseSDKType> {
|
25
|
+
const options: any = {
|
26
|
+
params: {}
|
27
|
+
};
|
28
|
+
|
29
|
+
if (typeof params?.pagination !== "undefined") {
|
30
|
+
setPaginationParams(options, params.pagination);
|
31
|
+
}
|
32
|
+
|
33
|
+
const endpoint = `juno/feeshare/v1/fee_shares`;
|
34
|
+
return await this.req.get<QueryFeeSharesResponseSDKType>(endpoint, options);
|
35
|
+
}
|
36
|
+
/* FeeShare retrieves a registered FeeShare for a given contract address */
|
37
|
+
|
38
|
+
|
39
|
+
async feeShare(params: QueryFeeShareRequest): Promise<QueryFeeShareResponseSDKType> {
|
40
|
+
const endpoint = `juno/feeshare/v1/fee_shares/${params.contractAddress}`;
|
41
|
+
return await this.req.get<QueryFeeShareResponseSDKType>(endpoint);
|
42
|
+
}
|
43
|
+
/* Params retrieves the FeeShare module params */
|
44
|
+
|
45
|
+
|
46
|
+
async params(_params: QueryParamsRequest = {}): Promise<QueryParamsResponseSDKType> {
|
47
|
+
const endpoint = `juno/feeshare/v1/params`;
|
48
|
+
return await this.req.get<QueryParamsResponseSDKType>(endpoint);
|
49
|
+
}
|
50
|
+
/* DeployerFeeShares retrieves all FeeShares that a given deployer has
|
51
|
+
registered */
|
52
|
+
|
53
|
+
|
54
|
+
async deployerFeeShares(params: QueryDeployerFeeSharesRequest): Promise<QueryDeployerFeeSharesResponseSDKType> {
|
55
|
+
const options: any = {
|
56
|
+
params: {}
|
57
|
+
};
|
58
|
+
|
59
|
+
if (typeof params?.pagination !== "undefined") {
|
60
|
+
setPaginationParams(options, params.pagination);
|
61
|
+
}
|
62
|
+
|
63
|
+
const endpoint = `juno/feeshare/v1/fee_shares/${params.deployerAddress}`;
|
64
|
+
return await this.req.get<QueryDeployerFeeSharesResponseSDKType>(endpoint, options);
|
65
|
+
}
|
66
|
+
/* WithdrawerFeeShares retrieves all FeeShares with a given withdrawer
|
67
|
+
address */
|
68
|
+
|
69
|
+
|
70
|
+
async withdrawerFeeShares(params: QueryWithdrawerFeeSharesRequest): Promise<QueryWithdrawerFeeSharesResponseSDKType> {
|
71
|
+
const options: any = {
|
72
|
+
params: {}
|
73
|
+
};
|
74
|
+
|
75
|
+
if (typeof params?.pagination !== "undefined") {
|
76
|
+
setPaginationParams(options, params.pagination);
|
77
|
+
}
|
78
|
+
|
79
|
+
const endpoint = `juno/feeshare/v1/fee_shares/${params.withdrawerAddress}`;
|
80
|
+
return await this.req.get<QueryWithdrawerFeeSharesResponseSDKType>(endpoint, options);
|
81
|
+
}
|
82
|
+
|
83
|
+
}
|