jay-network 0.1.0
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/LICENSE +21 -0
- package/README.md +138 -0
- package/dist/index.cjs +426 -0
- package/dist/index.d.cts +216 -0
- package/dist/index.d.ts +216 -0
- package/dist/index.js +371 -0
- package/package.json +58 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import * as _cosmjs_stargate from '@cosmjs/stargate';
|
|
2
|
+
import { SigningStargateClient, StdFee } from '@cosmjs/stargate';
|
|
3
|
+
import { OfflineSigner } from '@cosmjs/proto-signing';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Static chain configuration for The Jay Network.
|
|
7
|
+
*/
|
|
8
|
+
declare const JAY_CHAIN_ID = "thejaynetwork";
|
|
9
|
+
declare const JAY_CHAIN_NAME = "Jay Network";
|
|
10
|
+
declare const JAY_DENOM = "ujay";
|
|
11
|
+
declare const JAY_SYMBOL = "JAY";
|
|
12
|
+
declare const JAY_DECIMALS = 6;
|
|
13
|
+
declare const JAY_PREFIX = "yjay";
|
|
14
|
+
/** Public proxied endpoints. */
|
|
15
|
+
declare const DEFAULT_RPC = "https://pixture.thejaynetwork.com/rpc";
|
|
16
|
+
declare const DEFAULT_REST = "https://pixture.thejaynetwork.com/rest";
|
|
17
|
+
/**
|
|
18
|
+
* Keplr-compatible chain registration object.
|
|
19
|
+
* Pass to `window.keplr.experimentalSuggestChain(JAY_CHAIN_INFO)`.
|
|
20
|
+
*/
|
|
21
|
+
declare const JAY_CHAIN_INFO: {
|
|
22
|
+
readonly chainId: "thejaynetwork";
|
|
23
|
+
readonly chainName: "Jay Network";
|
|
24
|
+
readonly rpc: "https://pixture.thejaynetwork.com/rpc";
|
|
25
|
+
readonly rest: "https://pixture.thejaynetwork.com/rest";
|
|
26
|
+
readonly bip44: {
|
|
27
|
+
readonly coinType: 118;
|
|
28
|
+
};
|
|
29
|
+
readonly bech32Config: {
|
|
30
|
+
readonly bech32PrefixAccAddr: "yjay";
|
|
31
|
+
readonly bech32PrefixAccPub: "yjaypub";
|
|
32
|
+
readonly bech32PrefixValAddr: "yjayvaloper";
|
|
33
|
+
readonly bech32PrefixValPub: "yjayvaloperpub";
|
|
34
|
+
readonly bech32PrefixConsAddr: "yjayvalcons";
|
|
35
|
+
readonly bech32PrefixConsPub: "yjayvalconspub";
|
|
36
|
+
};
|
|
37
|
+
readonly currencies: readonly [{
|
|
38
|
+
readonly coinDenom: "JAY";
|
|
39
|
+
readonly coinMinimalDenom: "ujay";
|
|
40
|
+
readonly coinDecimals: 6;
|
|
41
|
+
}];
|
|
42
|
+
readonly feeCurrencies: readonly [{
|
|
43
|
+
readonly coinDenom: "JAY";
|
|
44
|
+
readonly coinMinimalDenom: "ujay";
|
|
45
|
+
readonly coinDecimals: 6;
|
|
46
|
+
readonly gasPriceStep: {
|
|
47
|
+
readonly low: 0.01;
|
|
48
|
+
readonly average: 0.025;
|
|
49
|
+
readonly high: 0.04;
|
|
50
|
+
};
|
|
51
|
+
}];
|
|
52
|
+
readonly stakeCurrency: {
|
|
53
|
+
readonly coinDenom: "JAY";
|
|
54
|
+
readonly coinMinimalDenom: "ujay";
|
|
55
|
+
readonly coinDecimals: 6;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
interface JaySdkOptions {
|
|
59
|
+
/** Tendermint RPC endpoint. Defaults to the public proxy. */
|
|
60
|
+
rpc?: string;
|
|
61
|
+
/** Cosmos REST (LCD) endpoint. Defaults to the public proxy. */
|
|
62
|
+
rest?: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** Convert a human JAY amount to base micro-units (ujay). */
|
|
66
|
+
declare function toMicro(amount: string | number, decimals?: number): string;
|
|
67
|
+
/** Convert base micro-units (ujay) to a human-readable JAY amount. */
|
|
68
|
+
declare function fromMicro(amount: string | number, decimals?: number): string;
|
|
69
|
+
/** Build a coin object for the native JAY token. */
|
|
70
|
+
declare function jayCoin(amount: string | number, denom?: string): {
|
|
71
|
+
denom: string;
|
|
72
|
+
amount: string;
|
|
73
|
+
};
|
|
74
|
+
/** Re-encode any bech32 address to a different prefix (e.g. yjay -> cosmos). */
|
|
75
|
+
declare function reEncodeAddress(address: string, prefix: string): string;
|
|
76
|
+
/** Derive the validator operator (valoper) address from an account address. */
|
|
77
|
+
declare function toValoper(accountAddress: string): string;
|
|
78
|
+
/** True when the account address operates the given validator operator address. */
|
|
79
|
+
declare function isValidatorOperator(accountAddress: string, valoperAddress: string): boolean;
|
|
80
|
+
/** Validate a Jay Network (yjay) bech32 address. */
|
|
81
|
+
declare function isValidJayAddress(address: string): boolean;
|
|
82
|
+
/** Shorten an address for display: yjay1abc…wxyz */
|
|
83
|
+
declare function shortenAddress(address: string, head?: number, tail?: number): string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Read-only client for The Jay Network.
|
|
87
|
+
* Wraps the Cosmos REST (LCD) and Tendermint RPC endpoints — no wallet required.
|
|
88
|
+
*/
|
|
89
|
+
declare class JayClient {
|
|
90
|
+
readonly rpc: string;
|
|
91
|
+
readonly rest: string;
|
|
92
|
+
constructor(options?: JaySdkOptions);
|
|
93
|
+
private getJson;
|
|
94
|
+
/** Latest block height and time from the RPC status endpoint. */
|
|
95
|
+
getLatestBlock(): Promise<{
|
|
96
|
+
height: string;
|
|
97
|
+
time: string;
|
|
98
|
+
}>;
|
|
99
|
+
/** Node sync / network identity info. */
|
|
100
|
+
getNodeInfo(): Promise<any>;
|
|
101
|
+
/** All balances for an address. Amounts are in base units (ujay). */
|
|
102
|
+
getBalances(address: string): Promise<Array<{
|
|
103
|
+
denom: string;
|
|
104
|
+
amount: string;
|
|
105
|
+
}>>;
|
|
106
|
+
/** Native JAY balance as a human-readable string. */
|
|
107
|
+
getJayBalance(address: string): Promise<string>;
|
|
108
|
+
/** Bonded validators (optionally filter by status). */
|
|
109
|
+
getValidators(status?: string): Promise<any>;
|
|
110
|
+
/** A single validator by operator (valoper) address. */
|
|
111
|
+
getValidator(valoperAddress: string): Promise<any>;
|
|
112
|
+
/** All delegations for a delegator. */
|
|
113
|
+
getDelegations(delegatorAddress: string): Promise<any>;
|
|
114
|
+
/** Pending staking rewards for a delegator across all validators. */
|
|
115
|
+
getRewards(delegatorAddress: string): Promise<any>;
|
|
116
|
+
/** Validator commission accrued by an operator. */
|
|
117
|
+
getValidatorCommission(valoperAddress: string): Promise<string>;
|
|
118
|
+
/** Governance proposals (optionally filter by status). */
|
|
119
|
+
getProposals(status?: string): Promise<any>;
|
|
120
|
+
/** A single governance proposal by id. */
|
|
121
|
+
getProposal(proposalId: string | number): Promise<any>;
|
|
122
|
+
/** Total token supply. */
|
|
123
|
+
getSupply(): Promise<any>;
|
|
124
|
+
/** Open IBC transfer channels. */
|
|
125
|
+
getIbcChannels(): Promise<any>;
|
|
126
|
+
/** Resolve an `ibc/<hash>` denom to its base denom + path. */
|
|
127
|
+
resolveIbcDenom(denom: string): Promise<{
|
|
128
|
+
baseDenom: string;
|
|
129
|
+
path: string;
|
|
130
|
+
}>;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
type VoteOption = 'VOTE_OPTION_YES' | 'VOTE_OPTION_ABSTAIN' | 'VOTE_OPTION_NO' | 'VOTE_OPTION_NO_WITH_VETO';
|
|
134
|
+
/**
|
|
135
|
+
* Signing client for The Jay Network.
|
|
136
|
+
* Build one from a wallet's offline signer (Keplr/JAY Wallet/mnemonic).
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* const signer = await window.keplr.getOfflineSignerAuto('thejaynetwork')
|
|
140
|
+
* const jay = await JaySigningClient.connect(signer, address)
|
|
141
|
+
* await jay.delegate(valoperAddress, '10')
|
|
142
|
+
*/
|
|
143
|
+
declare class JaySigningClient {
|
|
144
|
+
private readonly client;
|
|
145
|
+
readonly address: string;
|
|
146
|
+
private constructor();
|
|
147
|
+
/** Connect using an offline signer and the sender address. */
|
|
148
|
+
static connect(signer: OfflineSigner, address: string, options?: JaySdkOptions): Promise<JaySigningClient>;
|
|
149
|
+
/** Underlying CosmJS client for advanced use. */
|
|
150
|
+
get raw(): SigningStargateClient;
|
|
151
|
+
private broadcast;
|
|
152
|
+
/** Send JAY to another address. */
|
|
153
|
+
send(to: string, amount: string | number, memo?: string, fee?: StdFee): Promise<{
|
|
154
|
+
txHash: string;
|
|
155
|
+
height: number;
|
|
156
|
+
raw: _cosmjs_stargate.DeliverTxResponse;
|
|
157
|
+
}>;
|
|
158
|
+
/** Delegate (stake) JAY to a validator. */
|
|
159
|
+
delegate(valoperAddress: string, amount: string | number, memo?: string, fee?: StdFee): Promise<{
|
|
160
|
+
txHash: string;
|
|
161
|
+
height: number;
|
|
162
|
+
raw: _cosmjs_stargate.DeliverTxResponse;
|
|
163
|
+
}>;
|
|
164
|
+
/** Undelegate (unstake) JAY from a validator. */
|
|
165
|
+
undelegate(valoperAddress: string, amount: string | number, memo?: string, fee?: StdFee): Promise<{
|
|
166
|
+
txHash: string;
|
|
167
|
+
height: number;
|
|
168
|
+
raw: _cosmjs_stargate.DeliverTxResponse;
|
|
169
|
+
}>;
|
|
170
|
+
/** Move stake from one validator to another. */
|
|
171
|
+
redelegate(srcValoper: string, dstValoper: string, amount: string | number, memo?: string, fee?: StdFee): Promise<{
|
|
172
|
+
txHash: string;
|
|
173
|
+
height: number;
|
|
174
|
+
raw: _cosmjs_stargate.DeliverTxResponse;
|
|
175
|
+
}>;
|
|
176
|
+
/** Claim staking rewards from one validator. */
|
|
177
|
+
claimRewards(valoperAddress: string, memo?: string, fee?: StdFee): Promise<{
|
|
178
|
+
txHash: string;
|
|
179
|
+
height: number;
|
|
180
|
+
raw: _cosmjs_stargate.DeliverTxResponse;
|
|
181
|
+
}>;
|
|
182
|
+
/** Claim staking rewards from many validators in one tx. */
|
|
183
|
+
claimAllRewards(valoperAddresses: string[], memo?: string, fee?: StdFee): Promise<{
|
|
184
|
+
txHash: string;
|
|
185
|
+
height: number;
|
|
186
|
+
raw: _cosmjs_stargate.DeliverTxResponse;
|
|
187
|
+
}>;
|
|
188
|
+
/** Withdraw a validator operator's accrued commission. */
|
|
189
|
+
withdrawCommission(valoperAddress: string, memo?: string, fee?: StdFee): Promise<{
|
|
190
|
+
txHash: string;
|
|
191
|
+
height: number;
|
|
192
|
+
raw: _cosmjs_stargate.DeliverTxResponse;
|
|
193
|
+
}>;
|
|
194
|
+
/** Vote on a governance proposal (gov v1). */
|
|
195
|
+
vote(proposalId: string | number, option: VoteOption, memo?: string, fee?: StdFee): Promise<{
|
|
196
|
+
txHash: string;
|
|
197
|
+
height: number;
|
|
198
|
+
raw: _cosmjs_stargate.DeliverTxResponse;
|
|
199
|
+
}>;
|
|
200
|
+
/** IBC transfer of JAY to another chain. */
|
|
201
|
+
ibcTransfer(params: {
|
|
202
|
+
sourceChannel: string;
|
|
203
|
+
receiver: string;
|
|
204
|
+
amount: string | number;
|
|
205
|
+
denom?: string;
|
|
206
|
+
timeoutMinutes?: number;
|
|
207
|
+
}, memo?: string, fee?: StdFee): Promise<{
|
|
208
|
+
txHash: string;
|
|
209
|
+
height: number;
|
|
210
|
+
raw: _cosmjs_stargate.DeliverTxResponse;
|
|
211
|
+
}>;
|
|
212
|
+
/** Disconnect the underlying client. */
|
|
213
|
+
disconnect(): void;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export { DEFAULT_REST, DEFAULT_RPC, JAY_CHAIN_ID, JAY_CHAIN_INFO, JAY_CHAIN_NAME, JAY_DECIMALS, JAY_DENOM, JAY_PREFIX, JAY_SYMBOL, JayClient, type JaySdkOptions, JaySigningClient, type VoteOption, fromMicro, isValidJayAddress, isValidatorOperator, jayCoin, reEncodeAddress, shortenAddress, toMicro, toValoper };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import * as _cosmjs_stargate from '@cosmjs/stargate';
|
|
2
|
+
import { SigningStargateClient, StdFee } from '@cosmjs/stargate';
|
|
3
|
+
import { OfflineSigner } from '@cosmjs/proto-signing';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Static chain configuration for The Jay Network.
|
|
7
|
+
*/
|
|
8
|
+
declare const JAY_CHAIN_ID = "thejaynetwork";
|
|
9
|
+
declare const JAY_CHAIN_NAME = "Jay Network";
|
|
10
|
+
declare const JAY_DENOM = "ujay";
|
|
11
|
+
declare const JAY_SYMBOL = "JAY";
|
|
12
|
+
declare const JAY_DECIMALS = 6;
|
|
13
|
+
declare const JAY_PREFIX = "yjay";
|
|
14
|
+
/** Public proxied endpoints. */
|
|
15
|
+
declare const DEFAULT_RPC = "https://pixture.thejaynetwork.com/rpc";
|
|
16
|
+
declare const DEFAULT_REST = "https://pixture.thejaynetwork.com/rest";
|
|
17
|
+
/**
|
|
18
|
+
* Keplr-compatible chain registration object.
|
|
19
|
+
* Pass to `window.keplr.experimentalSuggestChain(JAY_CHAIN_INFO)`.
|
|
20
|
+
*/
|
|
21
|
+
declare const JAY_CHAIN_INFO: {
|
|
22
|
+
readonly chainId: "thejaynetwork";
|
|
23
|
+
readonly chainName: "Jay Network";
|
|
24
|
+
readonly rpc: "https://pixture.thejaynetwork.com/rpc";
|
|
25
|
+
readonly rest: "https://pixture.thejaynetwork.com/rest";
|
|
26
|
+
readonly bip44: {
|
|
27
|
+
readonly coinType: 118;
|
|
28
|
+
};
|
|
29
|
+
readonly bech32Config: {
|
|
30
|
+
readonly bech32PrefixAccAddr: "yjay";
|
|
31
|
+
readonly bech32PrefixAccPub: "yjaypub";
|
|
32
|
+
readonly bech32PrefixValAddr: "yjayvaloper";
|
|
33
|
+
readonly bech32PrefixValPub: "yjayvaloperpub";
|
|
34
|
+
readonly bech32PrefixConsAddr: "yjayvalcons";
|
|
35
|
+
readonly bech32PrefixConsPub: "yjayvalconspub";
|
|
36
|
+
};
|
|
37
|
+
readonly currencies: readonly [{
|
|
38
|
+
readonly coinDenom: "JAY";
|
|
39
|
+
readonly coinMinimalDenom: "ujay";
|
|
40
|
+
readonly coinDecimals: 6;
|
|
41
|
+
}];
|
|
42
|
+
readonly feeCurrencies: readonly [{
|
|
43
|
+
readonly coinDenom: "JAY";
|
|
44
|
+
readonly coinMinimalDenom: "ujay";
|
|
45
|
+
readonly coinDecimals: 6;
|
|
46
|
+
readonly gasPriceStep: {
|
|
47
|
+
readonly low: 0.01;
|
|
48
|
+
readonly average: 0.025;
|
|
49
|
+
readonly high: 0.04;
|
|
50
|
+
};
|
|
51
|
+
}];
|
|
52
|
+
readonly stakeCurrency: {
|
|
53
|
+
readonly coinDenom: "JAY";
|
|
54
|
+
readonly coinMinimalDenom: "ujay";
|
|
55
|
+
readonly coinDecimals: 6;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
interface JaySdkOptions {
|
|
59
|
+
/** Tendermint RPC endpoint. Defaults to the public proxy. */
|
|
60
|
+
rpc?: string;
|
|
61
|
+
/** Cosmos REST (LCD) endpoint. Defaults to the public proxy. */
|
|
62
|
+
rest?: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** Convert a human JAY amount to base micro-units (ujay). */
|
|
66
|
+
declare function toMicro(amount: string | number, decimals?: number): string;
|
|
67
|
+
/** Convert base micro-units (ujay) to a human-readable JAY amount. */
|
|
68
|
+
declare function fromMicro(amount: string | number, decimals?: number): string;
|
|
69
|
+
/** Build a coin object for the native JAY token. */
|
|
70
|
+
declare function jayCoin(amount: string | number, denom?: string): {
|
|
71
|
+
denom: string;
|
|
72
|
+
amount: string;
|
|
73
|
+
};
|
|
74
|
+
/** Re-encode any bech32 address to a different prefix (e.g. yjay -> cosmos). */
|
|
75
|
+
declare function reEncodeAddress(address: string, prefix: string): string;
|
|
76
|
+
/** Derive the validator operator (valoper) address from an account address. */
|
|
77
|
+
declare function toValoper(accountAddress: string): string;
|
|
78
|
+
/** True when the account address operates the given validator operator address. */
|
|
79
|
+
declare function isValidatorOperator(accountAddress: string, valoperAddress: string): boolean;
|
|
80
|
+
/** Validate a Jay Network (yjay) bech32 address. */
|
|
81
|
+
declare function isValidJayAddress(address: string): boolean;
|
|
82
|
+
/** Shorten an address for display: yjay1abc…wxyz */
|
|
83
|
+
declare function shortenAddress(address: string, head?: number, tail?: number): string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Read-only client for The Jay Network.
|
|
87
|
+
* Wraps the Cosmos REST (LCD) and Tendermint RPC endpoints — no wallet required.
|
|
88
|
+
*/
|
|
89
|
+
declare class JayClient {
|
|
90
|
+
readonly rpc: string;
|
|
91
|
+
readonly rest: string;
|
|
92
|
+
constructor(options?: JaySdkOptions);
|
|
93
|
+
private getJson;
|
|
94
|
+
/** Latest block height and time from the RPC status endpoint. */
|
|
95
|
+
getLatestBlock(): Promise<{
|
|
96
|
+
height: string;
|
|
97
|
+
time: string;
|
|
98
|
+
}>;
|
|
99
|
+
/** Node sync / network identity info. */
|
|
100
|
+
getNodeInfo(): Promise<any>;
|
|
101
|
+
/** All balances for an address. Amounts are in base units (ujay). */
|
|
102
|
+
getBalances(address: string): Promise<Array<{
|
|
103
|
+
denom: string;
|
|
104
|
+
amount: string;
|
|
105
|
+
}>>;
|
|
106
|
+
/** Native JAY balance as a human-readable string. */
|
|
107
|
+
getJayBalance(address: string): Promise<string>;
|
|
108
|
+
/** Bonded validators (optionally filter by status). */
|
|
109
|
+
getValidators(status?: string): Promise<any>;
|
|
110
|
+
/** A single validator by operator (valoper) address. */
|
|
111
|
+
getValidator(valoperAddress: string): Promise<any>;
|
|
112
|
+
/** All delegations for a delegator. */
|
|
113
|
+
getDelegations(delegatorAddress: string): Promise<any>;
|
|
114
|
+
/** Pending staking rewards for a delegator across all validators. */
|
|
115
|
+
getRewards(delegatorAddress: string): Promise<any>;
|
|
116
|
+
/** Validator commission accrued by an operator. */
|
|
117
|
+
getValidatorCommission(valoperAddress: string): Promise<string>;
|
|
118
|
+
/** Governance proposals (optionally filter by status). */
|
|
119
|
+
getProposals(status?: string): Promise<any>;
|
|
120
|
+
/** A single governance proposal by id. */
|
|
121
|
+
getProposal(proposalId: string | number): Promise<any>;
|
|
122
|
+
/** Total token supply. */
|
|
123
|
+
getSupply(): Promise<any>;
|
|
124
|
+
/** Open IBC transfer channels. */
|
|
125
|
+
getIbcChannels(): Promise<any>;
|
|
126
|
+
/** Resolve an `ibc/<hash>` denom to its base denom + path. */
|
|
127
|
+
resolveIbcDenom(denom: string): Promise<{
|
|
128
|
+
baseDenom: string;
|
|
129
|
+
path: string;
|
|
130
|
+
}>;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
type VoteOption = 'VOTE_OPTION_YES' | 'VOTE_OPTION_ABSTAIN' | 'VOTE_OPTION_NO' | 'VOTE_OPTION_NO_WITH_VETO';
|
|
134
|
+
/**
|
|
135
|
+
* Signing client for The Jay Network.
|
|
136
|
+
* Build one from a wallet's offline signer (Keplr/JAY Wallet/mnemonic).
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* const signer = await window.keplr.getOfflineSignerAuto('thejaynetwork')
|
|
140
|
+
* const jay = await JaySigningClient.connect(signer, address)
|
|
141
|
+
* await jay.delegate(valoperAddress, '10')
|
|
142
|
+
*/
|
|
143
|
+
declare class JaySigningClient {
|
|
144
|
+
private readonly client;
|
|
145
|
+
readonly address: string;
|
|
146
|
+
private constructor();
|
|
147
|
+
/** Connect using an offline signer and the sender address. */
|
|
148
|
+
static connect(signer: OfflineSigner, address: string, options?: JaySdkOptions): Promise<JaySigningClient>;
|
|
149
|
+
/** Underlying CosmJS client for advanced use. */
|
|
150
|
+
get raw(): SigningStargateClient;
|
|
151
|
+
private broadcast;
|
|
152
|
+
/** Send JAY to another address. */
|
|
153
|
+
send(to: string, amount: string | number, memo?: string, fee?: StdFee): Promise<{
|
|
154
|
+
txHash: string;
|
|
155
|
+
height: number;
|
|
156
|
+
raw: _cosmjs_stargate.DeliverTxResponse;
|
|
157
|
+
}>;
|
|
158
|
+
/** Delegate (stake) JAY to a validator. */
|
|
159
|
+
delegate(valoperAddress: string, amount: string | number, memo?: string, fee?: StdFee): Promise<{
|
|
160
|
+
txHash: string;
|
|
161
|
+
height: number;
|
|
162
|
+
raw: _cosmjs_stargate.DeliverTxResponse;
|
|
163
|
+
}>;
|
|
164
|
+
/** Undelegate (unstake) JAY from a validator. */
|
|
165
|
+
undelegate(valoperAddress: string, amount: string | number, memo?: string, fee?: StdFee): Promise<{
|
|
166
|
+
txHash: string;
|
|
167
|
+
height: number;
|
|
168
|
+
raw: _cosmjs_stargate.DeliverTxResponse;
|
|
169
|
+
}>;
|
|
170
|
+
/** Move stake from one validator to another. */
|
|
171
|
+
redelegate(srcValoper: string, dstValoper: string, amount: string | number, memo?: string, fee?: StdFee): Promise<{
|
|
172
|
+
txHash: string;
|
|
173
|
+
height: number;
|
|
174
|
+
raw: _cosmjs_stargate.DeliverTxResponse;
|
|
175
|
+
}>;
|
|
176
|
+
/** Claim staking rewards from one validator. */
|
|
177
|
+
claimRewards(valoperAddress: string, memo?: string, fee?: StdFee): Promise<{
|
|
178
|
+
txHash: string;
|
|
179
|
+
height: number;
|
|
180
|
+
raw: _cosmjs_stargate.DeliverTxResponse;
|
|
181
|
+
}>;
|
|
182
|
+
/** Claim staking rewards from many validators in one tx. */
|
|
183
|
+
claimAllRewards(valoperAddresses: string[], memo?: string, fee?: StdFee): Promise<{
|
|
184
|
+
txHash: string;
|
|
185
|
+
height: number;
|
|
186
|
+
raw: _cosmjs_stargate.DeliverTxResponse;
|
|
187
|
+
}>;
|
|
188
|
+
/** Withdraw a validator operator's accrued commission. */
|
|
189
|
+
withdrawCommission(valoperAddress: string, memo?: string, fee?: StdFee): Promise<{
|
|
190
|
+
txHash: string;
|
|
191
|
+
height: number;
|
|
192
|
+
raw: _cosmjs_stargate.DeliverTxResponse;
|
|
193
|
+
}>;
|
|
194
|
+
/** Vote on a governance proposal (gov v1). */
|
|
195
|
+
vote(proposalId: string | number, option: VoteOption, memo?: string, fee?: StdFee): Promise<{
|
|
196
|
+
txHash: string;
|
|
197
|
+
height: number;
|
|
198
|
+
raw: _cosmjs_stargate.DeliverTxResponse;
|
|
199
|
+
}>;
|
|
200
|
+
/** IBC transfer of JAY to another chain. */
|
|
201
|
+
ibcTransfer(params: {
|
|
202
|
+
sourceChannel: string;
|
|
203
|
+
receiver: string;
|
|
204
|
+
amount: string | number;
|
|
205
|
+
denom?: string;
|
|
206
|
+
timeoutMinutes?: number;
|
|
207
|
+
}, memo?: string, fee?: StdFee): Promise<{
|
|
208
|
+
txHash: string;
|
|
209
|
+
height: number;
|
|
210
|
+
raw: _cosmjs_stargate.DeliverTxResponse;
|
|
211
|
+
}>;
|
|
212
|
+
/** Disconnect the underlying client. */
|
|
213
|
+
disconnect(): void;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export { DEFAULT_REST, DEFAULT_RPC, JAY_CHAIN_ID, JAY_CHAIN_INFO, JAY_CHAIN_NAME, JAY_DECIMALS, JAY_DENOM, JAY_PREFIX, JAY_SYMBOL, JayClient, type JaySdkOptions, JaySigningClient, type VoteOption, fromMicro, isValidJayAddress, isValidatorOperator, jayCoin, reEncodeAddress, shortenAddress, toMicro, toValoper };
|