@initia/initia.js 0.0.20 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +1 -1
- package/dist/bundle.js.map +1 -1
- package/dist/bundle.node.js +1 -1
- package/dist/bundle.node.js.map +1 -1
- package/dist/client/lcd/api/AuthAPI.d.ts +2 -1
- package/dist/client/lcd/api/AuthAPI.js +15 -0
- package/dist/client/lcd/api/AuthAPI.js.map +1 -1
- package/dist/client/lcd/api/MoveAPI.d.ts +2 -5
- package/dist/client/lcd/api/MoveAPI.js +4 -2
- package/dist/client/lcd/api/MoveAPI.js.map +1 -1
- package/dist/client/lcd/api/StakingAPI.d.ts +10 -8
- package/dist/client/lcd/api/StakingAPI.js +16 -15
- package/dist/client/lcd/api/StakingAPI.js.map +1 -1
- package/dist/core/Msg.js +10 -22
- package/dist/core/Msg.js.map +1 -1
- package/dist/core/auth/Account.d.ts +4 -3
- package/dist/core/auth/Account.js +8 -0
- package/dist/core/auth/Account.js.map +1 -1
- package/dist/core/auth/ModuleAccount.d.ts +48 -0
- package/dist/core/auth/ModuleAccount.js +115 -0
- package/dist/core/auth/ModuleAccount.js.map +1 -0
- package/dist/core/auth/index.d.ts +1 -0
- package/dist/core/auth/index.js +1 -0
- package/dist/core/auth/index.js.map +1 -1
- package/dist/core/authz/authorizations/Authorization.js +2 -2
- package/dist/core/authz/authorizations/Authorization.js.map +1 -1
- package/dist/core/authz/authorizations/StakeAuthorization.d.ts +6 -6
- package/dist/core/authz/authorizations/StakeAuthorization.js +7 -7
- package/dist/core/authz/authorizations/StakeAuthorization.js.map +1 -1
- package/dist/core/staking/Delegation.d.ts +9 -9
- package/dist/core/staking/Delegation.js +10 -12
- package/dist/core/staking/Delegation.js.map +1 -1
- package/dist/core/staking/Redelegation.d.ts +12 -11
- package/dist/core/staking/Redelegation.js +17 -20
- package/dist/core/staking/Redelegation.js.map +1 -1
- package/dist/core/staking/UnbondingDelegation.d.ts +9 -8
- package/dist/core/staking/UnbondingDelegation.js +13 -15
- package/dist/core/staking/UnbondingDelegation.js.map +1 -1
- package/dist/core/staking/Validator.d.ts +15 -11
- package/dist/core/staking/Validator.js +26 -22
- package/dist/core/staking/Validator.js.map +1 -1
- package/dist/core/staking/msgs/MsgBeginRedelegate.d.ts +8 -8
- package/dist/core/staking/msgs/MsgBeginRedelegate.js +9 -9
- package/dist/core/staking/msgs/MsgBeginRedelegate.js.map +1 -1
- package/dist/core/staking/msgs/MsgCreateValidator.d.ts +8 -12
- package/dist/core/staking/msgs/MsgCreateValidator.js +18 -25
- package/dist/core/staking/msgs/MsgCreateValidator.js.map +1 -1
- package/dist/core/staking/msgs/MsgDelegate.d.ts +8 -8
- package/dist/core/staking/msgs/MsgDelegate.js +9 -9
- package/dist/core/staking/msgs/MsgDelegate.js.map +1 -1
- package/dist/core/staking/msgs/MsgEditValidator.d.ts +5 -9
- package/dist/core/staking/msgs/MsgEditValidator.js +14 -29
- package/dist/core/staking/msgs/MsgEditValidator.js.map +1 -1
- package/dist/core/staking/msgs/MsgUndelegate.d.ts +8 -8
- package/dist/core/staking/msgs/MsgUndelegate.js +9 -9
- package/dist/core/staking/msgs/MsgUndelegate.js.map +1 -1
- package/dist/core/vesting/msgs/index.d.ts +4 -8
- package/dist/core/vesting/msgs/index.js +0 -2
- package/dist/core/vesting/msgs/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { JSONSerializable } from '../../util/json';
|
|
2
|
+
import { Coins } from '../Coins';
|
|
2
3
|
import { AccAddress, ValAddress } from '../bech32';
|
|
3
|
-
import { UnbondingDelegation as UnbondingDelegation_pb, UnbondingDelegationEntry as UnbondingDelegationEntry_pb } from '@initia/initia.proto/
|
|
4
|
+
import { UnbondingDelegation as UnbondingDelegation_pb, UnbondingDelegationEntry as UnbondingDelegationEntry_pb } from '@initia/initia.proto/initia/mstaking/v1/staking';
|
|
4
5
|
/**
|
|
5
6
|
* When a delegator decides to take out their funds from the staking pool, they must
|
|
6
7
|
* unbond their tokens which takes an amount of time specified by `unbonding_time`
|
|
@@ -37,10 +38,10 @@ export declare namespace UnbondingDelegation {
|
|
|
37
38
|
}
|
|
38
39
|
type Proto = UnbondingDelegation_pb;
|
|
39
40
|
class Entry extends JSONSerializable<Entry.Amino, Entry.Data, Entry.Proto> {
|
|
40
|
-
initial_balance: string;
|
|
41
|
-
balance: string;
|
|
42
41
|
creation_height: number;
|
|
43
42
|
completion_time: Date;
|
|
43
|
+
initial_balance: Coins;
|
|
44
|
+
balance: Coins;
|
|
44
45
|
/**
|
|
45
46
|
* Note that the size of the undelegation is `initial_balance - balance`
|
|
46
47
|
* @param initial_balance balance of delegation prior to initiating unbond
|
|
@@ -48,7 +49,7 @@ export declare namespace UnbondingDelegation {
|
|
|
48
49
|
* @param creation_height height of blockchain when entry was created
|
|
49
50
|
* @param completion_time time when unbonding will be completed
|
|
50
51
|
*/
|
|
51
|
-
constructor(initial_balance:
|
|
52
|
+
constructor(initial_balance: Coins.Input, balance: Coins.Input, creation_height: number, completion_time: Date);
|
|
52
53
|
toAmino(): Entry.Amino;
|
|
53
54
|
static fromAmino(data: Entry.Amino): Entry;
|
|
54
55
|
toData(): Entry.Data;
|
|
@@ -58,14 +59,14 @@ export declare namespace UnbondingDelegation {
|
|
|
58
59
|
}
|
|
59
60
|
namespace Entry {
|
|
60
61
|
interface Amino {
|
|
61
|
-
initial_balance:
|
|
62
|
-
balance:
|
|
62
|
+
initial_balance: Coins.Amino;
|
|
63
|
+
balance: Coins.Amino;
|
|
63
64
|
creation_height: string;
|
|
64
65
|
completion_time: string;
|
|
65
66
|
}
|
|
66
67
|
interface Data {
|
|
67
|
-
initial_balance:
|
|
68
|
-
balance:
|
|
68
|
+
initial_balance: Coins.Data;
|
|
69
|
+
balance: Coins.Data;
|
|
69
70
|
creation_height: string;
|
|
70
71
|
completion_time: string;
|
|
71
72
|
}
|
|
@@ -20,8 +20,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
exports.UnbondingDelegation = void 0;
|
|
22
22
|
var json_1 = require("../../util/json");
|
|
23
|
-
var
|
|
24
|
-
var staking_1 = require("@initia/initia.proto/
|
|
23
|
+
var Coins_1 = require("../Coins");
|
|
24
|
+
var staking_1 = require("@initia/initia.proto/initia/mstaking/v1/staking");
|
|
25
25
|
var long_1 = __importDefault(require("long"));
|
|
26
26
|
/**
|
|
27
27
|
* When a delegator decides to take out their funds from the staking pool, they must
|
|
@@ -93,49 +93,47 @@ exports.UnbondingDelegation = UnbondingDelegation;
|
|
|
93
93
|
*/
|
|
94
94
|
function Entry(initial_balance, balance, creation_height, completion_time) {
|
|
95
95
|
var _this = _super.call(this) || this;
|
|
96
|
-
_this.initial_balance = initial_balance;
|
|
97
|
-
_this.balance = balance;
|
|
98
96
|
_this.creation_height = creation_height;
|
|
99
97
|
_this.completion_time = completion_time;
|
|
100
|
-
_this.initial_balance =
|
|
101
|
-
_this.balance =
|
|
98
|
+
_this.initial_balance = new Coins_1.Coins(initial_balance);
|
|
99
|
+
_this.balance = new Coins_1.Coins(balance);
|
|
102
100
|
return _this;
|
|
103
101
|
}
|
|
104
102
|
Entry.prototype.toAmino = function () {
|
|
105
103
|
return {
|
|
106
|
-
initial_balance: this.initial_balance.
|
|
107
|
-
balance: this.balance.
|
|
104
|
+
initial_balance: this.initial_balance.toAmino(),
|
|
105
|
+
balance: this.balance.toAmino(),
|
|
108
106
|
creation_height: this.creation_height.toFixed(),
|
|
109
107
|
completion_time: this.completion_time.toISOString(),
|
|
110
108
|
};
|
|
111
109
|
};
|
|
112
110
|
Entry.fromAmino = function (data) {
|
|
113
111
|
var initial_balance = data.initial_balance, balance = data.balance, creation_height = data.creation_height, completion_time = data.completion_time;
|
|
114
|
-
return new Entry(initial_balance, balance, Number.parseInt(creation_height), new Date(completion_time));
|
|
112
|
+
return new Entry(Coins_1.Coins.fromAmino(initial_balance), Coins_1.Coins.fromAmino(balance), Number.parseInt(creation_height), new Date(completion_time));
|
|
115
113
|
};
|
|
116
114
|
Entry.prototype.toData = function () {
|
|
117
115
|
return {
|
|
118
|
-
initial_balance: this.initial_balance.
|
|
119
|
-
balance: this.balance.
|
|
116
|
+
initial_balance: this.initial_balance.toData(),
|
|
117
|
+
balance: this.balance.toData(),
|
|
120
118
|
creation_height: this.creation_height.toFixed(),
|
|
121
119
|
completion_time: this.completion_time.toISOString(),
|
|
122
120
|
};
|
|
123
121
|
};
|
|
124
122
|
Entry.fromData = function (data) {
|
|
125
123
|
var initial_balance = data.initial_balance, balance = data.balance, creation_height = data.creation_height, completion_time = data.completion_time;
|
|
126
|
-
return new Entry(initial_balance, balance, Number.parseInt(creation_height), new Date(completion_time));
|
|
124
|
+
return new Entry(Coins_1.Coins.fromData(initial_balance), Coins_1.Coins.fromData(balance), Number.parseInt(creation_height), new Date(completion_time));
|
|
127
125
|
};
|
|
128
126
|
Entry.prototype.toProto = function () {
|
|
129
127
|
var _a = this, initial_balance = _a.initial_balance, balance = _a.balance, creation_height = _a.creation_height, completion_time = _a.completion_time;
|
|
130
128
|
return staking_1.UnbondingDelegationEntry.fromPartial({
|
|
131
|
-
balance: balance.
|
|
129
|
+
balance: balance.toProto(),
|
|
132
130
|
completionTime: completion_time,
|
|
133
131
|
creationHeight: long_1.default.fromNumber(creation_height),
|
|
134
|
-
initialBalance: initial_balance.
|
|
132
|
+
initialBalance: initial_balance.toProto(),
|
|
135
133
|
});
|
|
136
134
|
};
|
|
137
135
|
Entry.fromProto = function (proto) {
|
|
138
|
-
return new Entry(proto.initialBalance, proto.balance, proto.creationHeight.toNumber(), proto.completionTime);
|
|
136
|
+
return new Entry(Coins_1.Coins.fromProto(proto.initialBalance), Coins_1.Coins.fromProto(proto.balance), proto.creationHeight.toNumber(), proto.completionTime);
|
|
139
137
|
};
|
|
140
138
|
return Entry;
|
|
141
139
|
}(json_1.JSONSerializable));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnbondingDelegation.js","sourceRoot":"","sources":["../../../src/core/staking/UnbondingDelegation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,wCAAmD;AACnD,
|
|
1
|
+
{"version":3,"file":"UnbondingDelegation.js","sourceRoot":"","sources":["../../../src/core/staking/UnbondingDelegation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,wCAAmD;AACnD,kCAAiC;AAEjC,2EAGyD;AACzD,8CAAwB;AAExB;;;;;;;;;;GAUG;AACH;IAAyC,uCAIxC;IACC,6BACS,iBAA6B,EAC7B,iBAA6B,EAC7B,OAAoC;QAH7C,YAKE,iBAAO,SACR;QALQ,uBAAiB,GAAjB,iBAAiB,CAAY;QAC7B,uBAAiB,GAAjB,iBAAiB,CAAY;QAC7B,aAAO,GAAP,OAAO,CAA6B;;IAG7C,CAAC;IAEa,6BAAS,GAAvB,UACE,IAA+B;QAEvB,IAAA,iBAAiB,GAAiC,IAAI,kBAArC,EAAE,iBAAiB,GAAc,IAAI,kBAAlB,EAAE,OAAO,GAAK,IAAI,QAAT,CAAU;QAC/D,OAAO,IAAI,mBAAmB,CAC5B,iBAAiB,EACjB,iBAAiB,EACjB,OAAO,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,mBAAmB,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAtC,CAAsC,CAAC,CACzD,CAAC;IACJ,CAAC;IAEM,qCAAO,GAAd;QACQ,IAAA,KAAoD,IAAI,EAAtD,iBAAiB,uBAAA,EAAE,iBAAiB,uBAAA,EAAE,OAAO,aAAS,CAAC;QAC/D,OAAO;YACL,iBAAiB,mBAAA;YACjB,iBAAiB,mBAAA;YACjB,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,OAAO,EAAE,EAAX,CAAW,CAAC;SACvC,CAAC;IACJ,CAAC;IAEa,4BA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AAgB,GAqF1C;IArFY,yBAAK,QAqFjB,CAAA;AAmBH,CAAC,EAvHgB,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAuHnC;AA9LY,kDAAmB"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { JSONSerializable } from '../../util/json';
|
|
2
|
+
import { Coins } from '../Coins';
|
|
2
3
|
import { ValAddress } from '../bech32';
|
|
3
4
|
import { ValConsPublicKey } from '../PublicKey';
|
|
4
|
-
import { Validator as Validator_pb, Description as Description_pb, Commission as Commission_pb, CommissionRates as CommissionRates_pb, BondStatus } from '@initia/initia.proto/
|
|
5
|
+
import { Validator as Validator_pb, Description as Description_pb, Commission as Commission_pb, CommissionRates as CommissionRates_pb, BondStatus } from '@initia/initia.proto/initia/mstaking/v1/staking';
|
|
5
6
|
/**
|
|
6
7
|
* Stores information fetched from the blockchain about the current status of a validator.
|
|
7
8
|
* As an end user, you will not have to create an instance of this class, one will be
|
|
@@ -13,13 +14,14 @@ export declare class Validator extends JSONSerializable<Validator.Amino, Validat
|
|
|
13
14
|
consensus_pubkey: ValConsPublicKey;
|
|
14
15
|
jailed: boolean;
|
|
15
16
|
status: BondStatus;
|
|
16
|
-
tokens: string;
|
|
17
|
-
delegator_shares: string;
|
|
18
17
|
description: Validator.Description;
|
|
19
18
|
unbonding_height: number;
|
|
20
19
|
unbonding_time: Date;
|
|
21
20
|
commission: Validator.Commission;
|
|
22
|
-
|
|
21
|
+
voting_power: string;
|
|
22
|
+
tokens: Coins;
|
|
23
|
+
delegator_shares: Coins;
|
|
24
|
+
voting_powers: Coins;
|
|
23
25
|
/**
|
|
24
26
|
*
|
|
25
27
|
* @param operator_address validator's operator address
|
|
@@ -34,7 +36,7 @@ export declare class Validator extends JSONSerializable<Validator.Amino, Validat
|
|
|
34
36
|
* @param commission validator commission
|
|
35
37
|
* @param min_self_delegation minimum self delegation
|
|
36
38
|
*/
|
|
37
|
-
constructor(operator_address: ValAddress, consensus_pubkey: ValConsPublicKey, jailed: boolean, status: BondStatus, tokens:
|
|
39
|
+
constructor(operator_address: ValAddress, consensus_pubkey: ValConsPublicKey, jailed: boolean, status: BondStatus, tokens: Coins.Input, delegator_shares: Coins.Input, description: Validator.Description, unbonding_height: number, unbonding_time: Date, commission: Validator.Commission, voting_powers: Coins.Input, voting_power: string);
|
|
38
40
|
toAmino(): Validator.Amino;
|
|
39
41
|
static fromAmino(data: Validator.Amino): Validator;
|
|
40
42
|
toData(): Validator.Data;
|
|
@@ -50,26 +52,28 @@ export declare namespace Validator {
|
|
|
50
52
|
consensus_pubkey: ValConsPublicKey.Amino;
|
|
51
53
|
jailed: boolean;
|
|
52
54
|
status: BondStatus;
|
|
53
|
-
tokens:
|
|
54
|
-
delegator_shares:
|
|
55
|
+
tokens: Coins.Amino;
|
|
56
|
+
delegator_shares: Coins.Amino;
|
|
55
57
|
description: Description.Amino;
|
|
56
58
|
unbonding_height: string;
|
|
57
59
|
unbonding_time: string;
|
|
58
60
|
commission: Commission.Amino;
|
|
59
|
-
|
|
61
|
+
voting_powers: Coins.Amino;
|
|
62
|
+
voting_power: string;
|
|
60
63
|
}
|
|
61
64
|
interface Data {
|
|
62
65
|
operator_address: ValAddress;
|
|
63
66
|
consensus_pubkey: ValConsPublicKey.Data;
|
|
64
67
|
jailed: boolean;
|
|
65
68
|
status: BondStatus;
|
|
66
|
-
tokens:
|
|
67
|
-
delegator_shares:
|
|
69
|
+
tokens: Coins.Data;
|
|
70
|
+
delegator_shares: Coins.Data;
|
|
68
71
|
description: Description.Data;
|
|
69
72
|
unbonding_height: string;
|
|
70
73
|
unbonding_time: string;
|
|
71
74
|
commission: Commission.Data;
|
|
72
|
-
|
|
75
|
+
voting_powers: Coins.Data;
|
|
76
|
+
voting_power: string;
|
|
73
77
|
}
|
|
74
78
|
type Proto = Validator_pb;
|
|
75
79
|
class Description extends JSONSerializable<Description.Amino, Description.Data, Description.Proto> {
|
|
@@ -20,9 +20,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
exports.Validator = void 0;
|
|
22
22
|
var json_1 = require("../../util/json");
|
|
23
|
+
var Coins_1 = require("../Coins");
|
|
23
24
|
var num_1 = require("../num");
|
|
24
25
|
var PublicKey_1 = require("../PublicKey");
|
|
25
|
-
var staking_1 = require("@initia/initia.proto/
|
|
26
|
+
var staking_1 = require("@initia/initia.proto/initia/mstaking/v1/staking");
|
|
26
27
|
var long_1 = __importDefault(require("long"));
|
|
27
28
|
/**
|
|
28
29
|
* Stores information fetched from the blockchain about the current status of a validator.
|
|
@@ -46,20 +47,20 @@ var Validator = /** @class */ (function (_super) {
|
|
|
46
47
|
* @param commission validator commission
|
|
47
48
|
* @param min_self_delegation minimum self delegation
|
|
48
49
|
*/
|
|
49
|
-
function Validator(operator_address, consensus_pubkey, jailed, status, tokens, delegator_shares, description, unbonding_height, unbonding_time, commission,
|
|
50
|
+
function Validator(operator_address, consensus_pubkey, jailed, status, tokens, delegator_shares, description, unbonding_height, unbonding_time, commission, voting_powers, voting_power) {
|
|
50
51
|
var _this = _super.call(this) || this;
|
|
51
52
|
_this.operator_address = operator_address;
|
|
52
53
|
_this.consensus_pubkey = consensus_pubkey;
|
|
53
54
|
_this.jailed = jailed;
|
|
54
55
|
_this.status = status;
|
|
55
|
-
_this.tokens = tokens;
|
|
56
|
-
_this.delegator_shares = delegator_shares;
|
|
57
56
|
_this.description = description;
|
|
58
57
|
_this.unbonding_height = unbonding_height;
|
|
59
58
|
_this.unbonding_time = unbonding_time;
|
|
60
59
|
_this.commission = commission;
|
|
61
|
-
_this.
|
|
62
|
-
_this.
|
|
60
|
+
_this.voting_power = voting_power;
|
|
61
|
+
_this.tokens = new Coins_1.Coins(tokens);
|
|
62
|
+
_this.delegator_shares = new Coins_1.Coins(delegator_shares);
|
|
63
|
+
_this.voting_powers = new Coins_1.Coins(voting_powers);
|
|
63
64
|
return _this;
|
|
64
65
|
}
|
|
65
66
|
Validator.prototype.toAmino = function () {
|
|
@@ -68,17 +69,18 @@ var Validator = /** @class */ (function (_super) {
|
|
|
68
69
|
consensus_pubkey: this.consensus_pubkey.toAmino(),
|
|
69
70
|
jailed: this.jailed,
|
|
70
71
|
status: this.status,
|
|
71
|
-
tokens: this.tokens.
|
|
72
|
-
delegator_shares:
|
|
72
|
+
tokens: this.tokens.toAmino(),
|
|
73
|
+
delegator_shares: this.delegator_shares.toAmino(),
|
|
73
74
|
description: this.description,
|
|
74
75
|
unbonding_height: this.unbonding_height.toFixed(),
|
|
75
76
|
unbonding_time: this.unbonding_time.toISOString(),
|
|
76
77
|
commission: this.commission.toAmino(),
|
|
77
|
-
|
|
78
|
+
voting_powers: this.voting_powers.toAmino(),
|
|
79
|
+
voting_power: this.voting_power
|
|
78
80
|
};
|
|
79
81
|
};
|
|
80
82
|
Validator.fromAmino = function (data) {
|
|
81
|
-
return new Validator(data.operator_address, PublicKey_1.ValConsPublicKey.fromAmino(data.consensus_pubkey), data.jailed || false, data.status || 0, data.tokens, data.delegator_shares, Validator.Description.fromAmino(data.description), Number.parseInt(data.unbonding_height), new Date(data.unbonding_time), Validator.Commission.fromAmino(data.commission), data.
|
|
83
|
+
return new Validator(data.operator_address, PublicKey_1.ValConsPublicKey.fromAmino(data.consensus_pubkey), data.jailed || false, data.status || 0, Coins_1.Coins.fromAmino(data.tokens), Coins_1.Coins.fromAmino(data.delegator_shares), Validator.Description.fromAmino(data.description), Number.parseInt(data.unbonding_height), new Date(data.unbonding_time), Validator.Commission.fromAmino(data.commission), Coins_1.Coins.fromAmino(data.voting_powers), data.voting_power);
|
|
82
84
|
};
|
|
83
85
|
Validator.prototype.toData = function () {
|
|
84
86
|
return {
|
|
@@ -86,36 +88,38 @@ var Validator = /** @class */ (function (_super) {
|
|
|
86
88
|
consensus_pubkey: this.consensus_pubkey.toData(),
|
|
87
89
|
jailed: this.jailed,
|
|
88
90
|
status: this.status,
|
|
89
|
-
tokens: this.tokens.
|
|
90
|
-
delegator_shares:
|
|
91
|
+
tokens: this.tokens.toData(),
|
|
92
|
+
delegator_shares: this.delegator_shares.toData(),
|
|
91
93
|
description: this.description,
|
|
92
94
|
unbonding_height: this.unbonding_height.toFixed(),
|
|
93
95
|
unbonding_time: this.unbonding_time.toISOString(),
|
|
94
96
|
commission: this.commission.toData(),
|
|
95
|
-
|
|
97
|
+
voting_powers: this.voting_powers.toData(),
|
|
98
|
+
voting_power: this.voting_power,
|
|
96
99
|
};
|
|
97
100
|
};
|
|
98
101
|
Validator.fromData = function (data) {
|
|
99
|
-
return new Validator(data.operator_address, PublicKey_1.ValConsPublicKey.fromData(data.consensus_pubkey), data.jailed || false, data.status || 0, data.tokens, data.delegator_shares, Validator.Description.fromData(data.description), Number.parseInt(data.unbonding_height), new Date(data.unbonding_time), Validator.Commission.fromData(data.commission), data.
|
|
102
|
+
return new Validator(data.operator_address, PublicKey_1.ValConsPublicKey.fromData(data.consensus_pubkey), data.jailed || false, data.status || 0, Coins_1.Coins.fromData(data.tokens), Coins_1.Coins.fromData(data.delegator_shares), Validator.Description.fromData(data.description), Number.parseInt(data.unbonding_height), new Date(data.unbonding_time), Validator.Commission.fromData(data.commission), Coins_1.Coins.fromData(data.voting_powers), data.voting_power);
|
|
100
103
|
};
|
|
101
104
|
Validator.prototype.toProto = function () {
|
|
102
|
-
var _a = this, operator_address = _a.operator_address, consensus_pubkey = _a.consensus_pubkey, jailed = _a.jailed, status = _a.status, tokens = _a.tokens, delegator_shares = _a.delegator_shares, description = _a.description, unbonding_height = _a.unbonding_height, unbonding_time = _a.unbonding_time, commission = _a.commission,
|
|
105
|
+
var _a = this, operator_address = _a.operator_address, consensus_pubkey = _a.consensus_pubkey, jailed = _a.jailed, status = _a.status, tokens = _a.tokens, delegator_shares = _a.delegator_shares, description = _a.description, unbonding_height = _a.unbonding_height, unbonding_time = _a.unbonding_time, commission = _a.commission, voting_powers = _a.voting_powers, voting_power = _a.voting_power;
|
|
103
106
|
return staking_1.Validator.fromPartial({
|
|
104
|
-
|
|
107
|
+
operatorAddress: operator_address,
|
|
105
108
|
consensusPubkey: consensus_pubkey.packAny(),
|
|
106
|
-
delegatorShares: (0, num_1.num)(this.delegator_shares).toFixed(18),
|
|
107
|
-
description: description.toProto(),
|
|
108
109
|
jailed: jailed,
|
|
109
|
-
minSelfDelegation: min_self_delegation.toString(),
|
|
110
|
-
operatorAddress: operator_address,
|
|
111
110
|
status: status,
|
|
112
|
-
tokens: tokens.
|
|
111
|
+
tokens: tokens.toProto(),
|
|
112
|
+
delegatorShares: delegator_shares.toProto(),
|
|
113
|
+
description: description.toProto(),
|
|
113
114
|
unbondingHeight: long_1.default.fromNumber(unbonding_height),
|
|
114
115
|
unbondingTime: unbonding_time,
|
|
116
|
+
commission: commission.toProto(),
|
|
117
|
+
votingPowers: voting_powers.toProto(),
|
|
118
|
+
votingPower: voting_power,
|
|
115
119
|
});
|
|
116
120
|
};
|
|
117
121
|
Validator.fromProto = function (data) {
|
|
118
|
-
return new Validator(data.operatorAddress, PublicKey_1.ValConsPublicKey.unpackAny(data.consensusPubkey), data.jailed, data.status, data.tokens, data.delegatorShares, Validator.Description.fromProto(data.description), data.unbondingHeight.toNumber(), data.unbondingTime, Validator.Commission.fromProto(data.commission), data.
|
|
122
|
+
return new Validator(data.operatorAddress, PublicKey_1.ValConsPublicKey.unpackAny(data.consensusPubkey), data.jailed, data.status, Coins_1.Coins.fromProto(data.tokens), Coins_1.Coins.fromProto(data.delegatorShares), Validator.Description.fromProto(data.description), data.unbondingHeight.toNumber(), data.unbondingTime, Validator.Commission.fromProto(data.commission), Coins_1.Coins.fromProto(data.votingPowers), data.votingPower);
|
|
119
123
|
};
|
|
120
124
|
return Validator;
|
|
121
125
|
}(json_1.JSONSerializable));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Validator.js","sourceRoot":"","sources":["../../../src/core/staking/Validator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,wCAAmD;AACnD,8BAA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BAAgB,CAAC,EAChD,IAAI,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAC3B,CAAC;QACJ,CAAC;QAEM,2BAAM,GAAb;YACE,OAAO;gBACL,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE;gBAChD,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE;aAC5C,CAAC;QACJ,CAAC;QAEa,mBAAQ,GAAtB,UAAuB,IAAqB;YAC1C,OAAO,IAAI,UAAU,CACnB,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAC/C,IAAI,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAC3B,CAAC;QACJ,CAAC;QAEM,4BAAO,GAAd;YACQ,IAAA,KAAoC,IAAI,EAAtC,gBAAgB,sBAAA,EAAE,WAAW,iBAAS,CAAC;YAC/C,OAAO,oBAAa,CAAC,WAAW,CAAC;gBAC/B,eAAe,EAAE,gBAAgB,CAAC,OAAO,EAAE;gBAC3C,UAAU,EAAE,WAAW;aACxB,CAAC,CAAC;QACL,CAAC;QAEa,oBAAS,GAAvB,UAAwB,KAAuB;YAC7C,OAAO,IAAI,UAAU,CACnB,eAAe,CAAC,SAAS,CACvB,KAAK,CAAC,eAAwC,CAC/C,EACD,KAAK,CAAC,UAAkB,CACzB,CAAC;QACJ,CAAC;QACH,iBAAC;IAAD,CAAC,AA5DD,CAAgC,uBAAgB,GA4D/C;IA5DY,oBAAU,aA4DtB,CAAA;AAeH,CAAC,EA1SgB,SAAS,GAAT,iBAAS,KAAT,iBAAS,QA0SzB;AA9cY,8BAAS"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { JSONSerializable } from '../../../util/json';
|
|
2
|
-
import {
|
|
2
|
+
import { Coins } from '../../Coins';
|
|
3
3
|
import { AccAddress, ValAddress } from '../../bech32';
|
|
4
4
|
import { Any } from '@initia/initia.proto/google/protobuf/any';
|
|
5
|
-
import { MsgBeginRedelegate as MsgBeginRedelegate_pb } from '@initia/initia.proto/
|
|
5
|
+
import { MsgBeginRedelegate as MsgBeginRedelegate_pb } from '@initia/initia.proto/initia/mstaking/v1/tx';
|
|
6
6
|
/**
|
|
7
7
|
* A delegator can choose to redelegate their bonded Initia and transfer a delegation
|
|
8
8
|
* amount from one validator to another. Unlike undelegating, redelegations do not incur
|
|
@@ -12,15 +12,15 @@ export declare class MsgBeginRedelegate extends JSONSerializable<MsgBeginRedeleg
|
|
|
12
12
|
delegator_address: AccAddress;
|
|
13
13
|
validator_src_address: ValAddress;
|
|
14
14
|
validator_dst_address: ValAddress;
|
|
15
|
-
amount:
|
|
15
|
+
amount: Coins;
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
* @param delegator_address delegator's account address
|
|
19
19
|
* @param validator_src_address validator to undelegate from
|
|
20
20
|
* @param validator_dst_address validator to delegate to
|
|
21
|
-
* @param amount
|
|
21
|
+
* @param amount INIT to be redelegated
|
|
22
22
|
*/
|
|
23
|
-
constructor(delegator_address: AccAddress, validator_src_address: ValAddress, validator_dst_address: ValAddress, amount:
|
|
23
|
+
constructor(delegator_address: AccAddress, validator_src_address: ValAddress, validator_dst_address: ValAddress, amount: Coins.Input);
|
|
24
24
|
static fromAmino(data: MsgBeginRedelegate.Amino): MsgBeginRedelegate;
|
|
25
25
|
toAmino(): MsgBeginRedelegate.Amino;
|
|
26
26
|
static fromData(data: MsgBeginRedelegate.Data): MsgBeginRedelegate;
|
|
@@ -37,15 +37,15 @@ export declare namespace MsgBeginRedelegate {
|
|
|
37
37
|
delegator_address: AccAddress;
|
|
38
38
|
validator_src_address: ValAddress;
|
|
39
39
|
validator_dst_address: ValAddress;
|
|
40
|
-
amount:
|
|
40
|
+
amount: Coins.Amino;
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
interface Data {
|
|
44
|
-
'@type': '/
|
|
44
|
+
'@type': '/initia.mstaking.v1.MsgBeginRedelegate';
|
|
45
45
|
delegator_address: AccAddress;
|
|
46
46
|
validator_src_address: ValAddress;
|
|
47
47
|
validator_dst_address: ValAddress;
|
|
48
|
-
amount:
|
|
48
|
+
amount: Coins.Data;
|
|
49
49
|
}
|
|
50
50
|
type Proto = MsgBeginRedelegate_pb;
|
|
51
51
|
}
|
|
@@ -17,9 +17,9 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.MsgBeginRedelegate = void 0;
|
|
19
19
|
var json_1 = require("../../../util/json");
|
|
20
|
-
var
|
|
20
|
+
var Coins_1 = require("../../Coins");
|
|
21
21
|
var any_1 = require("@initia/initia.proto/google/protobuf/any");
|
|
22
|
-
var tx_1 = require("@initia/initia.proto/
|
|
22
|
+
var tx_1 = require("@initia/initia.proto/initia/mstaking/v1/tx");
|
|
23
23
|
/**
|
|
24
24
|
* A delegator can choose to redelegate their bonded Initia and transfer a delegation
|
|
25
25
|
* amount from one validator to another. Unlike undelegating, redelegations do not incur
|
|
@@ -32,19 +32,19 @@ var MsgBeginRedelegate = /** @class */ (function (_super) {
|
|
|
32
32
|
* @param delegator_address delegator's account address
|
|
33
33
|
* @param validator_src_address validator to undelegate from
|
|
34
34
|
* @param validator_dst_address validator to delegate to
|
|
35
|
-
* @param amount
|
|
35
|
+
* @param amount INIT to be redelegated
|
|
36
36
|
*/
|
|
37
37
|
function MsgBeginRedelegate(delegator_address, validator_src_address, validator_dst_address, amount) {
|
|
38
38
|
var _this = _super.call(this) || this;
|
|
39
39
|
_this.delegator_address = delegator_address;
|
|
40
40
|
_this.validator_src_address = validator_src_address;
|
|
41
41
|
_this.validator_dst_address = validator_dst_address;
|
|
42
|
-
_this.amount = amount;
|
|
42
|
+
_this.amount = new Coins_1.Coins(amount);
|
|
43
43
|
return _this;
|
|
44
44
|
}
|
|
45
45
|
MsgBeginRedelegate.fromAmino = function (data) {
|
|
46
46
|
var _a = data.value, delegator_address = _a.delegator_address, validator_src_address = _a.validator_src_address, validator_dst_address = _a.validator_dst_address, amount = _a.amount;
|
|
47
|
-
return new MsgBeginRedelegate(delegator_address, validator_src_address, validator_dst_address,
|
|
47
|
+
return new MsgBeginRedelegate(delegator_address, validator_src_address, validator_dst_address, Coins_1.Coins.fromAmino(amount));
|
|
48
48
|
};
|
|
49
49
|
MsgBeginRedelegate.prototype.toAmino = function () {
|
|
50
50
|
var _a = this, delegator_address = _a.delegator_address, validator_src_address = _a.validator_src_address, validator_dst_address = _a.validator_dst_address, amount = _a.amount;
|
|
@@ -60,12 +60,12 @@ var MsgBeginRedelegate = /** @class */ (function (_super) {
|
|
|
60
60
|
};
|
|
61
61
|
MsgBeginRedelegate.fromData = function (data) {
|
|
62
62
|
var delegator_address = data.delegator_address, validator_src_address = data.validator_src_address, validator_dst_address = data.validator_dst_address, amount = data.amount;
|
|
63
|
-
return new MsgBeginRedelegate(delegator_address, validator_src_address, validator_dst_address,
|
|
63
|
+
return new MsgBeginRedelegate(delegator_address, validator_src_address, validator_dst_address, Coins_1.Coins.fromData(amount));
|
|
64
64
|
};
|
|
65
65
|
MsgBeginRedelegate.prototype.toData = function () {
|
|
66
66
|
var _a = this, delegator_address = _a.delegator_address, validator_src_address = _a.validator_src_address, validator_dst_address = _a.validator_dst_address, amount = _a.amount;
|
|
67
67
|
return {
|
|
68
|
-
'@type': '/
|
|
68
|
+
'@type': '/initia.mstaking.v1.MsgBeginRedelegate',
|
|
69
69
|
delegator_address: delegator_address,
|
|
70
70
|
validator_src_address: validator_src_address,
|
|
71
71
|
validator_dst_address: validator_dst_address,
|
|
@@ -73,7 +73,7 @@ var MsgBeginRedelegate = /** @class */ (function (_super) {
|
|
|
73
73
|
};
|
|
74
74
|
};
|
|
75
75
|
MsgBeginRedelegate.fromProto = function (proto) {
|
|
76
|
-
return new MsgBeginRedelegate(proto.delegatorAddress, proto.validatorSrcAddress, proto.validatorDstAddress,
|
|
76
|
+
return new MsgBeginRedelegate(proto.delegatorAddress, proto.validatorSrcAddress, proto.validatorDstAddress, Coins_1.Coins.fromProto(proto.amount));
|
|
77
77
|
};
|
|
78
78
|
MsgBeginRedelegate.prototype.toProto = function () {
|
|
79
79
|
var _a = this, delegator_address = _a.delegator_address, validator_src_address = _a.validator_src_address, validator_dst_address = _a.validator_dst_address, amount = _a.amount;
|
|
@@ -86,7 +86,7 @@ var MsgBeginRedelegate = /** @class */ (function (_super) {
|
|
|
86
86
|
};
|
|
87
87
|
MsgBeginRedelegate.prototype.packAny = function () {
|
|
88
88
|
return any_1.Any.fromPartial({
|
|
89
|
-
typeUrl: '/
|
|
89
|
+
typeUrl: '/initia.mstaking.v1.MsgBeginRedelegate',
|
|
90
90
|
value: tx_1.MsgBeginRedelegate.encode(this.toProto()).finish(),
|
|
91
91
|
});
|
|
92
92
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MsgBeginRedelegate.js","sourceRoot":"","sources":["../../../../src/core/staking/msgs/MsgBeginRedelegate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2CAAsD;AACtD,
|
|
1
|
+
{"version":3,"file":"MsgBeginRedelegate.js","sourceRoot":"","sources":["../../../../src/core/staking/msgs/MsgBeginRedelegate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2CAAsD;AACtD,qCAAoC;AAEpC,gEAA+D;AAC/D,iEAAyG;AAEzG;;;;GAIG;AACH;IAAwC,sCAIvC;IAGC;;;;;;OAMG;IACH,4BACS,iBAA6B,EAC7B,qBAAiC,EACjC,qBAAiC,EACxC,MAAmB;QAJrB,YAME,iBAAO,SAER;QAPQ,uBAAiB,GAAjB,iBAAiB,CAAY;QAC7B,2BAAqB,GAArB,qBAAqB,CAAY;QACjC,2BAAqB,GAArB,qBAAqB,CAAY;QAIxC,KAAI,CAAC,MAAM,GAAG,IAAI,aAAK,CAAC,MAAM,CAAC,CAAC;;IAClC,CAAC;IAEa,4BAAS,GAAvB,UAAwB,IAA8B;QAElD,IAAA,KAME,IAAI,MADL,EAJC,iBAA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,gBAAgB,EACtB,KAAK,CAAC,mBAAmB,EACzB,KAAK,CAAC,mBAAmB,EACzB,aAAK,CAAC,SAAS,CAAC,KAAK,CAAC,MAAqB,CAAC,CAC7C,CAAC;IACJ,CAAC;IAEM,oCAAO,GAAd;QACQ,IAAA,KAKF,IAAI,EAJN,iBAAiB,uBAAA,EACjB,qBAAqB,2BAAA,EACrB,qBAAqB,2BAAA,EACrB,MAAM,YACA,CAAC;QACT,OAAO,uBAAqB,CAAC,WAAW,CAAC;YACvC,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE;YACxB,gBAAgB,EAAE,iBAAiB;YACnC,mBAAmB,EAAE,qBAAqB;YAC1C,mBAAmB,EAAE,qBAAqB;SAC3C,CAAC,CAAC;IACL,CAAC;IAEM,oCAAO,GAAd;QACE,OAAO,SAAG,CAAC,WAAW,CAAC;YACrB,OAAO,EAAE,wCAAwC;YACjD,KAAK,EAAE,uBAAqB,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;SAC7D,CAAC,CAAC;IACL,CAAC;IAEa,4BAAS,GAAvB,UAAwB,MAAW;QACjC,OAAO,kBAAkB,CAAC,SAAS,CACjC,uBAAqB,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAC3C,CAAC;IACJ,CAAC;IACH,yBAAC;AAAD,CAAC,AA9HD,CAAwC,uBAAgB,GA8HvD;AA9HY,gDAAkB"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { JSONSerializable } from '../../../util/json';
|
|
2
|
-
import {
|
|
2
|
+
import { Coins } from '../../Coins';
|
|
3
3
|
import { AccAddress, ValAddress } from '../../bech32';
|
|
4
4
|
import { Validator } from '../Validator';
|
|
5
5
|
import { Any } from '@initia/initia.proto/google/protobuf/any';
|
|
6
|
-
import { MsgCreateValidator as MsgCreateValidator_pb } from '@initia/initia.proto/
|
|
6
|
+
import { MsgCreateValidator as MsgCreateValidator_pb } from '@initia/initia.proto/initia/mstaking/v1/tx';
|
|
7
7
|
import { ValConsPublicKey } from '../../PublicKey';
|
|
8
8
|
/**
|
|
9
9
|
* For new validators, this message registers a validator address to be a delegate on
|
|
@@ -12,22 +12,20 @@ import { ValConsPublicKey } from '../../PublicKey';
|
|
|
12
12
|
export declare class MsgCreateValidator extends JSONSerializable<MsgCreateValidator.Amino, MsgCreateValidator.Data, MsgCreateValidator.Proto> {
|
|
13
13
|
description: Validator.Description;
|
|
14
14
|
commission: Validator.CommissionRates;
|
|
15
|
-
min_self_delegation: string;
|
|
16
15
|
delegator_address: AccAddress;
|
|
17
16
|
validator_address: ValAddress;
|
|
18
17
|
pubkey: ValConsPublicKey;
|
|
19
|
-
|
|
18
|
+
amount: Coins;
|
|
20
19
|
/**
|
|
21
20
|
*
|
|
22
21
|
* @param description validator's delegate information
|
|
23
22
|
* @param commission validator's commission policy
|
|
24
|
-
* @param min_self_delegation minimum self delegation
|
|
25
23
|
* @param delegator_address validator's account address
|
|
26
24
|
* @param validator_address validator's operator address
|
|
27
25
|
* @param pubkey validator's consensus public key
|
|
28
|
-
* @param
|
|
26
|
+
* @param amount amount to use for self-delegation
|
|
29
27
|
*/
|
|
30
|
-
constructor(description: Validator.Description, commission: Validator.CommissionRates,
|
|
28
|
+
constructor(description: Validator.Description, commission: Validator.CommissionRates, delegator_address: AccAddress, validator_address: ValAddress, pubkey: ValConsPublicKey, amount: Coins.Input);
|
|
31
29
|
static fromAmino(data: MsgCreateValidator.Amino): MsgCreateValidator;
|
|
32
30
|
toAmino(): MsgCreateValidator.Amino;
|
|
33
31
|
static fromData(data: MsgCreateValidator.Data): MsgCreateValidator;
|
|
@@ -43,22 +41,20 @@ export declare namespace MsgCreateValidator {
|
|
|
43
41
|
value: {
|
|
44
42
|
description: Validator.Description;
|
|
45
43
|
commission: Validator.CommissionRates.Amino;
|
|
46
|
-
min_self_delegation: string;
|
|
47
44
|
delegator_address: AccAddress;
|
|
48
45
|
validator_address: ValAddress;
|
|
49
46
|
pubkey: ValConsPublicKey.Amino;
|
|
50
|
-
|
|
47
|
+
amount: Coins.Amino;
|
|
51
48
|
};
|
|
52
49
|
}
|
|
53
50
|
interface Data {
|
|
54
|
-
'@type': '/
|
|
51
|
+
'@type': '/initia.mstaking.v1.MsgCreateValidator';
|
|
55
52
|
description: Validator.Description;
|
|
56
53
|
commission: Validator.CommissionRates.Data;
|
|
57
|
-
min_self_delegation: string;
|
|
58
54
|
delegator_address: AccAddress;
|
|
59
55
|
validator_address: ValAddress;
|
|
60
56
|
pubkey: ValConsPublicKey.Data;
|
|
61
|
-
|
|
57
|
+
amount: Coins.Data;
|
|
62
58
|
}
|
|
63
59
|
type Proto = MsgCreateValidator_pb;
|
|
64
60
|
}
|