@initia/initia.js 0.1.0 → 0.1.1
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/package.json +1 -1
- package/dist/client/lcd/LCDUtils.d.ts +0 -18
- package/dist/client/lcd/LCDUtils.js +0 -93
- package/dist/client/lcd/LCDUtils.js.map +0 -1
- package/dist/client/lcd/api/MintAPI.d.ts +0 -27
- package/dist/client/lcd/api/MintAPI.js +0 -109
- package/dist/client/lcd/api/MintAPI.js.map +0 -1
- package/dist/client/lcd/api/StakingAPI.d.ts +0 -100
- package/dist/client/lcd/api/StakingAPI.js +0 -297
- package/dist/client/lcd/api/StakingAPI.js.map +0 -1
- package/dist/core/CompactBitArray.d.ts +0 -23
- package/dist/core/CompactBitArray.js +0 -94
- package/dist/core/CompactBitArray.js.map +0 -1
- package/dist/core/Deposit.d.ts +0 -37
- package/dist/core/Deposit.js +0 -81
- package/dist/core/Deposit.js.map +0 -1
- package/dist/core/Fee.d.ts +0 -42
- package/dist/core/Fee.js +0 -88
- package/dist/core/Fee.js.map +0 -1
- package/dist/core/MultiSignature.d.ts +0 -17
- package/dist/core/MultiSignature.js +0 -57
- package/dist/core/MultiSignature.js.map +0 -1
- package/dist/core/SignDoc.d.ts +0 -54
- package/dist/core/SignDoc.js +0 -96
- package/dist/core/SignDoc.js.map +0 -1
- package/dist/core/SignatureV2.d.ts +0 -66
- package/dist/core/SignatureV2.js +0 -131
- package/dist/core/SignatureV2.js.map +0 -1
- package/dist/core/Tx.d.ts +0 -147
- package/dist/core/Tx.js +0 -279
- package/dist/core/Tx.js.map +0 -1
- package/dist/core/TxInfo.d.ts +0 -91
- package/dist/core/TxInfo.js +0 -115
- package/dist/core/TxInfo.js.map +0 -1
- package/dist/core/ValidatorSet.d.ts +0 -11
- package/dist/core/ValidatorSet.js +0 -3
- package/dist/core/ValidatorSet.js.map +0 -1
- package/dist/core/auth/BaseVestingAccount.d.ts +0 -58
- package/dist/core/auth/BaseVestingAccount.js +0 -123
- package/dist/core/auth/BaseVestingAccount.js.map +0 -1
- package/dist/core/auth/ContinuousVestingAccount.d.ts +0 -45
- package/dist/core/auth/ContinuousVestingAccount.js +0 -116
- package/dist/core/auth/ContinuousVestingAccount.js.map +0 -1
- package/dist/core/auth/DelayedVestingAccount.d.ts +0 -42
- package/dist/core/auth/DelayedVestingAccount.js +0 -108
- package/dist/core/auth/DelayedVestingAccount.js.map +0 -1
- package/dist/core/auth/PeriodicVestingAccount.d.ts +0 -72
- package/dist/core/auth/PeriodicVestingAccount.js +0 -170
- package/dist/core/auth/PeriodicVestingAccount.js.map +0 -1
- package/dist/core/crisis/MsgVerifyInvariant.d.ts +0 -43
- package/dist/core/crisis/MsgVerifyInvariant.js +0 -77
- package/dist/core/crisis/MsgVerifyInvariant.js.map +0 -1
- package/dist/core/distribution/proposals/CommunityPoolSpendProposal.d.ts +0 -49
- package/dist/core/distribution/proposals/CommunityPoolSpendProposal.js +0 -97
- package/dist/core/distribution/proposals/CommunityPoolSpendProposal.js.map +0 -1
- package/dist/core/distribution/proposals/index.d.ts +0 -1
- package/dist/core/distribution/proposals/index.js +0 -18
- package/dist/core/distribution/proposals/index.js.map +0 -1
- package/dist/core/gov/Proposal.d.ts +0 -96
- package/dist/core/gov/Proposal.js +0 -244
- package/dist/core/gov/Proposal.js.map +0 -1
- package/dist/core/ibc/applications/fee/msgs/MsgRegisterCounterpartAddress.d.ts +0 -34
- package/dist/core/ibc/applications/fee/msgs/MsgRegisterCounterpartAddress.js +0 -82
- package/dist/core/ibc/applications/fee/msgs/MsgRegisterCounterpartAddress.js.map +0 -1
- package/dist/core/ibc/applications/nft-transfer/ClassTrace.d.ts +0 -28
- package/dist/core/ibc/applications/nft-transfer/ClassTrace.js +0 -67
- package/dist/core/ibc/applications/nft-transfer/ClassTrace.js.map +0 -1
- package/dist/core/ibc/core/connection/Version.d.ts +0 -28
- package/dist/core/ibc/core/connection/Version.js +0 -70
- package/dist/core/ibc/core/connection/Version.js.map +0 -1
- package/dist/core/move/StorageFee.d.ts +0 -34
- package/dist/core/move/StorageFee.js +0 -78
- package/dist/core/move/StorageFee.js.map +0 -1
- package/dist/core/move/proposals/DelistProposal.d.ts +0 -50
- package/dist/core/move/proposals/DelistProposal.js +0 -100
- package/dist/core/move/proposals/DelistProposal.js.map +0 -1
- package/dist/core/move/proposals/ExecuteOperation.d.ts +0 -51
- package/dist/core/move/proposals/ExecuteOperation.js +0 -100
- package/dist/core/move/proposals/ExecuteOperation.js.map +0 -1
- package/dist/core/move/proposals/ExecuteProposal.d.ts +0 -54
- package/dist/core/move/proposals/ExecuteProposal.js +0 -105
- package/dist/core/move/proposals/ExecuteProposal.js.map +0 -1
- package/dist/core/move/proposals/OperationsProposal.d.ts +0 -57
- package/dist/core/move/proposals/OperationsProposal.js +0 -129
- package/dist/core/move/proposals/OperationsProposal.js.map +0 -1
- package/dist/core/move/proposals/PublishOperation.d.ts +0 -34
- package/dist/core/move/proposals/PublishOperation.js +0 -76
- package/dist/core/move/proposals/PublishOperation.js.map +0 -1
- package/dist/core/move/proposals/PublishProposal.d.ts +0 -42
- package/dist/core/move/proposals/PublishProposal.js +0 -90
- package/dist/core/move/proposals/PublishProposal.js.map +0 -1
- package/dist/core/move/proposals/WhitelistProposal.d.ts +0 -54
- package/dist/core/move/proposals/WhitelistProposal.js +0 -105
- package/dist/core/move/proposals/WhitelistProposal.js.map +0 -1
- package/dist/core/move/proposals/index.d.ts +0 -5
- package/dist/core/move/proposals/index.js +0 -22
- package/dist/core/move/proposals/index.js.map +0 -1
- package/dist/core/staking/Delegation.d.ts +0 -45
- package/dist/core/staking/Delegation.js +0 -89
- package/dist/core/staking/Delegation.js.map +0 -1
- package/dist/core/staking/Redelegation.d.ts +0 -97
- package/dist/core/staking/Redelegation.js +0 -174
- package/dist/core/staking/Redelegation.js.map +0 -1
- package/dist/core/staking/UnbondingDelegation.d.ts +0 -75
- package/dist/core/staking/UnbondingDelegation.js +0 -143
- package/dist/core/staking/UnbondingDelegation.js.map +0 -1
- package/dist/core/staking/Validator.d.ts +0 -173
- package/dist/core/staking/Validator.js +0 -287
- package/dist/core/staking/Validator.js.map +0 -1
- package/dist/core/staking/msgs/MsgBeginRedelegate.d.ts +0 -51
- package/dist/core/staking/msgs/MsgBeginRedelegate.js +0 -99
- package/dist/core/staking/msgs/MsgBeginRedelegate.js.map +0 -1
- package/dist/core/staking/msgs/MsgCreateValidator.d.ts +0 -60
- package/dist/core/staking/msgs/MsgCreateValidator.js +0 -110
- package/dist/core/staking/msgs/MsgCreateValidator.js.map +0 -1
- package/dist/core/staking/msgs/MsgDelegate.d.ts +0 -46
- package/dist/core/staking/msgs/MsgDelegate.js +0 -93
- package/dist/core/staking/msgs/MsgDelegate.js.map +0 -1
- package/dist/core/staking/msgs/MsgEditValidator.d.ts +0 -50
- package/dist/core/staking/msgs/MsgEditValidator.js +0 -111
- package/dist/core/staking/msgs/MsgEditValidator.js.map +0 -1
- package/dist/core/staking/msgs/MsgUndelegate.d.ts +0 -46
- package/dist/core/staking/msgs/MsgUndelegate.js +0 -93
- package/dist/core/staking/msgs/MsgUndelegate.js.map +0 -1
- package/dist/core/staking/msgs/index.d.ts +0 -16
- package/dist/core/staking/msgs/index.js +0 -22
- package/dist/core/staking/msgs/index.js.map +0 -1
- package/dist/core/upgrade/proposals/CancelSoftwareUpgradeProposal.d.ts +0 -39
- package/dist/core/upgrade/proposals/CancelSoftwareUpgradeProposal.js +0 -86
- package/dist/core/upgrade/proposals/CancelSoftwareUpgradeProposal.js.map +0 -1
- package/dist/core/upgrade/proposals/SoftwareUpgradeProposal.d.ts +0 -44
- package/dist/core/upgrade/proposals/SoftwareUpgradeProposal.js +0 -92
- package/dist/core/upgrade/proposals/SoftwareUpgradeProposal.js.map +0 -1
- package/dist/core/upgrade/proposals/index.d.ts +0 -2
- package/dist/core/upgrade/proposals/index.js +0 -19
- package/dist/core/upgrade/proposals/index.js.map +0 -1
- package/dist/core/vesting/Period.d.ts +0 -32
- package/dist/core/vesting/Period.js +0 -78
- package/dist/core/vesting/Period.js.map +0 -1
- package/dist/core/vesting/index.d.ts +0 -2
- package/dist/core/vesting/index.js +0 -19
- package/dist/core/vesting/index.js.map +0 -1
- package/dist/core/vesting/msgs/MsgCreateVestingAccount.d.ts +0 -50
- package/dist/core/vesting/msgs/MsgCreateVestingAccount.js +0 -103
- package/dist/core/vesting/msgs/MsgCreateVestingAccount.js.map +0 -1
- package/dist/core/vesting/msgs/index.d.ts +0 -8
- package/dist/core/vesting/msgs/index.js +0 -18
- package/dist/core/vesting/msgs/index.js.map +0 -1
- package/dist/util/contract.d.ts +0 -9
- package/dist/util/contract.js +0 -57
- package/dist/util/contract.js.map +0 -1
- package/dist/util/convert.d.ts +0 -8
- package/dist/util/convert.js +0 -12
- package/dist/util/convert.js.map +0 -1
package/dist/core/TxInfo.d.ts
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { Tx } from './Tx';
|
|
2
|
-
import { ABCIMessageLog as ABCIMessageLog_pb, TxResponse as TxResponse_pb } from '@initia/initia.proto/cosmos/base/abci/v1beta1/abci';
|
|
3
|
-
/**
|
|
4
|
-
* A TxInfo data structure is used to capture information from a transaction lookup for
|
|
5
|
-
* a transaction already included in a block
|
|
6
|
-
*/
|
|
7
|
-
export declare class TxInfo {
|
|
8
|
-
height: number;
|
|
9
|
-
txhash: string;
|
|
10
|
-
raw_log: string;
|
|
11
|
-
logs: TxLog[] | undefined;
|
|
12
|
-
gas_wanted: number;
|
|
13
|
-
gas_used: number;
|
|
14
|
-
tx: Tx;
|
|
15
|
-
timestamp: string;
|
|
16
|
-
code?: number | undefined;
|
|
17
|
-
codespace?: string | undefined;
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
* @param height height of the block in which the transaction was included.
|
|
21
|
-
* @param txhash transaction's hash.
|
|
22
|
-
* @param raw_log raw log information, as a string.
|
|
23
|
-
* @param logs log information
|
|
24
|
-
* @param gas_wanted gas limited submitted in fee
|
|
25
|
-
* @param gas_used actual gas consumption
|
|
26
|
-
* @param tx transaction content
|
|
27
|
-
* @param timestamp time of inclusion
|
|
28
|
-
* @param code error code
|
|
29
|
-
*/
|
|
30
|
-
constructor(height: number, txhash: string, raw_log: string, logs: TxLog[] | undefined, gas_wanted: number, gas_used: number, tx: Tx, timestamp: string, code?: number | undefined, codespace?: string | undefined);
|
|
31
|
-
static fromProto(proto: TxInfo.Proto): TxInfo;
|
|
32
|
-
static fromData(data: TxInfo.Data): TxInfo;
|
|
33
|
-
}
|
|
34
|
-
export interface EventKV {
|
|
35
|
-
key: string;
|
|
36
|
-
value: string;
|
|
37
|
-
}
|
|
38
|
-
export interface Event {
|
|
39
|
-
type: string;
|
|
40
|
-
attributes: EventKV[];
|
|
41
|
-
}
|
|
42
|
-
export interface EventsByType {
|
|
43
|
-
[type: string]: {
|
|
44
|
-
[key: string]: string[];
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
export declare namespace EventsByType {
|
|
48
|
-
function parse(eventAmino: Event[]): EventsByType;
|
|
49
|
-
}
|
|
50
|
-
export declare class TxLog {
|
|
51
|
-
msg_index: number;
|
|
52
|
-
log: string;
|
|
53
|
-
events: Event[];
|
|
54
|
-
eventsByType: EventsByType;
|
|
55
|
-
constructor(msg_index: number, log: string, events: Event[]);
|
|
56
|
-
static fromData(data: TxLog.Data): TxLog;
|
|
57
|
-
toData(): TxLog.Data;
|
|
58
|
-
static fromProto(proto: TxLog.Proto): TxLog;
|
|
59
|
-
toProto(): TxLog.Proto;
|
|
60
|
-
}
|
|
61
|
-
export declare namespace TxLog {
|
|
62
|
-
interface Data {
|
|
63
|
-
msg_index: number;
|
|
64
|
-
log: string;
|
|
65
|
-
events: {
|
|
66
|
-
type: string;
|
|
67
|
-
attributes: {
|
|
68
|
-
key: string;
|
|
69
|
-
value: string;
|
|
70
|
-
}[];
|
|
71
|
-
}[];
|
|
72
|
-
}
|
|
73
|
-
type Proto = ABCIMessageLog_pb;
|
|
74
|
-
}
|
|
75
|
-
export declare namespace TxInfo {
|
|
76
|
-
interface Data {
|
|
77
|
-
height: string;
|
|
78
|
-
txhash: string;
|
|
79
|
-
codespace: string;
|
|
80
|
-
code: number;
|
|
81
|
-
data: string;
|
|
82
|
-
raw_log: string;
|
|
83
|
-
logs: TxLog.Data[];
|
|
84
|
-
info: string;
|
|
85
|
-
gas_wanted: string;
|
|
86
|
-
gas_used: string;
|
|
87
|
-
tx: Tx.Data;
|
|
88
|
-
timestamp: string;
|
|
89
|
-
}
|
|
90
|
-
type Proto = TxResponse_pb;
|
|
91
|
-
}
|
package/dist/core/TxInfo.js
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TxLog = exports.EventsByType = exports.TxInfo = void 0;
|
|
4
|
-
var Tx_1 = require("./Tx");
|
|
5
|
-
var abci_1 = require("@initia/initia.proto/cosmos/base/abci/v1beta1/abci");
|
|
6
|
-
/**
|
|
7
|
-
* A TxInfo data structure is used to capture information from a transaction lookup for
|
|
8
|
-
* a transaction already included in a block
|
|
9
|
-
*/
|
|
10
|
-
var TxInfo = /** @class */ (function () {
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
* @param height height of the block in which the transaction was included.
|
|
14
|
-
* @param txhash transaction's hash.
|
|
15
|
-
* @param raw_log raw log information, as a string.
|
|
16
|
-
* @param logs log information
|
|
17
|
-
* @param gas_wanted gas limited submitted in fee
|
|
18
|
-
* @param gas_used actual gas consumption
|
|
19
|
-
* @param tx transaction content
|
|
20
|
-
* @param timestamp time of inclusion
|
|
21
|
-
* @param code error code
|
|
22
|
-
*/
|
|
23
|
-
function TxInfo(height, txhash, raw_log, logs, gas_wanted, gas_used, tx, timestamp, code, codespace) {
|
|
24
|
-
this.height = height;
|
|
25
|
-
this.txhash = txhash;
|
|
26
|
-
this.raw_log = raw_log;
|
|
27
|
-
this.logs = logs;
|
|
28
|
-
this.gas_wanted = gas_wanted;
|
|
29
|
-
this.gas_used = gas_used;
|
|
30
|
-
this.tx = tx;
|
|
31
|
-
this.timestamp = timestamp;
|
|
32
|
-
this.code = code;
|
|
33
|
-
this.codespace = codespace;
|
|
34
|
-
}
|
|
35
|
-
TxInfo.fromProto = function (proto) {
|
|
36
|
-
return new TxInfo(proto.height.toNumber(), proto.txhash, proto.rawLog, proto.logs.map(function (log) { return TxLog.fromProto(log); }), proto.gasWanted.toNumber(), proto.gasUsed.toNumber(), Tx_1.Tx.unpackAny(proto.tx), proto.timestamp, proto.code, proto.codespace);
|
|
37
|
-
};
|
|
38
|
-
TxInfo.fromData = function (data) {
|
|
39
|
-
return new TxInfo(Number.parseInt(data.height), data.txhash, data.raw_log, data.logs.map(function (log) { return TxLog.fromData(log); }), Number.parseInt(data.gas_wanted), Number.parseInt(data.gas_used), Tx_1.Tx.fromData(data.tx), data.timestamp, data.code, data.codespace);
|
|
40
|
-
};
|
|
41
|
-
return TxInfo;
|
|
42
|
-
}());
|
|
43
|
-
exports.TxInfo = TxInfo;
|
|
44
|
-
var EventsByType;
|
|
45
|
-
(function (EventsByType) {
|
|
46
|
-
function parse(eventAmino) {
|
|
47
|
-
var events = {};
|
|
48
|
-
eventAmino.forEach(function (ev) {
|
|
49
|
-
ev.attributes.forEach(function (attr) {
|
|
50
|
-
if (!(ev.type in events)) {
|
|
51
|
-
events[ev.type] = {};
|
|
52
|
-
}
|
|
53
|
-
if (!(attr.key in events[ev.type])) {
|
|
54
|
-
events[ev.type][attr.key] = [];
|
|
55
|
-
}
|
|
56
|
-
events[ev.type][attr.key].push(attr.value);
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
return events;
|
|
60
|
-
}
|
|
61
|
-
EventsByType.parse = parse;
|
|
62
|
-
})(EventsByType = exports.EventsByType || (exports.EventsByType = {}));
|
|
63
|
-
var TxLog = /** @class */ (function () {
|
|
64
|
-
function TxLog(msg_index, log, events) {
|
|
65
|
-
this.msg_index = msg_index;
|
|
66
|
-
this.log = log;
|
|
67
|
-
this.events = events;
|
|
68
|
-
this.eventsByType = EventsByType.parse(this.events);
|
|
69
|
-
}
|
|
70
|
-
TxLog.fromData = function (data) {
|
|
71
|
-
return new TxLog(data.msg_index, data.log, data.events.map(function (e) {
|
|
72
|
-
return {
|
|
73
|
-
type: e.type,
|
|
74
|
-
attributes: e.attributes.map(function (attr) {
|
|
75
|
-
return {
|
|
76
|
-
key: attr.key,
|
|
77
|
-
value: attr.value,
|
|
78
|
-
};
|
|
79
|
-
}),
|
|
80
|
-
};
|
|
81
|
-
}));
|
|
82
|
-
};
|
|
83
|
-
TxLog.prototype.toData = function () {
|
|
84
|
-
var _a = this, msg_index = _a.msg_index, log = _a.log, events = _a.events;
|
|
85
|
-
return {
|
|
86
|
-
msg_index: msg_index,
|
|
87
|
-
log: log,
|
|
88
|
-
events: events,
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
TxLog.fromProto = function (proto) {
|
|
92
|
-
return new TxLog(proto.msgIndex, proto.log, proto.events.map(function (e) {
|
|
93
|
-
return {
|
|
94
|
-
type: e.type,
|
|
95
|
-
attributes: e.attributes.map(function (attr) {
|
|
96
|
-
return {
|
|
97
|
-
key: attr.key,
|
|
98
|
-
value: attr.value,
|
|
99
|
-
};
|
|
100
|
-
}),
|
|
101
|
-
};
|
|
102
|
-
}));
|
|
103
|
-
};
|
|
104
|
-
TxLog.prototype.toProto = function () {
|
|
105
|
-
var _a = this, msg_index = _a.msg_index, log = _a.log, events = _a.events;
|
|
106
|
-
return abci_1.ABCIMessageLog.fromPartial({
|
|
107
|
-
msgIndex: msg_index,
|
|
108
|
-
log: log,
|
|
109
|
-
events: events,
|
|
110
|
-
});
|
|
111
|
-
};
|
|
112
|
-
return TxLog;
|
|
113
|
-
}());
|
|
114
|
-
exports.TxLog = TxLog;
|
|
115
|
-
//# sourceMappingURL=TxInfo.js.map
|
package/dist/core/TxInfo.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version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ACL,GAAG,EAAE,IAAI,CAAC,GAAG;wBACb,KAAK,EAAE,IAAI,CAAC,KAAK;qBAClB,CAAC;gBACJ,CAAC,CAAC;aACH,CAAC;QACJ,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;IAEM,uBAAO,GAAd;QACQ,IAAA,KAA6B,IAAI,EAA/B,SAAS,eAAA,EAAE,GAAG,SAAA,EAAE,MAAM,YAAS,CAAC;QACxC,OAAO,qBAAiB,CAAC,WAAW,CAAC;YACnC,QAAQ,EAAE,SAAS;YACnB,GAAG,EAAE,GAAG;YACR,MAAM,QAAA;SACP,CAAC,CAAC;IACL,CAAC;IACH,YAAC;AAAD,CAAC,AAhED,IAgEC;AAhEY,sBAAK"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ValConsAddress } from './bech32';
|
|
2
|
-
import { ValConsPublicKey } from './PublicKey';
|
|
3
|
-
export interface ValidatorSet {
|
|
4
|
-
validators: DelegateValidator[];
|
|
5
|
-
}
|
|
6
|
-
export interface DelegateValidator {
|
|
7
|
-
address: ValConsAddress;
|
|
8
|
-
pub_key: ValConsPublicKey.Data;
|
|
9
|
-
proposer_priority: string;
|
|
10
|
-
voting_power: string;
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ValidatorSet.js","sourceRoot":"","sources":["../../src/core/ValidatorSet.ts"],"names":[],"mappings":""}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { JSONSerializable } from '../../util/json';
|
|
2
|
-
import { Coins } from '../Coins';
|
|
3
|
-
import { BaseAccount } from './BaseAccount';
|
|
4
|
-
import { BaseVestingAccount as BaseVestingAccount_pb } from '@initia/initia.proto/cosmos/vesting/v1beta1/vesting';
|
|
5
|
-
import { PublicKey } from '../PublicKey';
|
|
6
|
-
/**
|
|
7
|
-
* Holds information about a Account which has vesting information.
|
|
8
|
-
*/
|
|
9
|
-
export declare class BaseVestingAccount extends JSONSerializable<BaseVestingAccount.Amino, BaseVestingAccount.Data, BaseVestingAccount.Proto> {
|
|
10
|
-
base_account: BaseAccount;
|
|
11
|
-
original_vesting: Coins;
|
|
12
|
-
delegated_free: Coins;
|
|
13
|
-
delegated_vesting: Coins;
|
|
14
|
-
end_time: number;
|
|
15
|
-
/**
|
|
16
|
-
*
|
|
17
|
-
* @param BaseAccount account information
|
|
18
|
-
* @param original_vesting initial vesting amount
|
|
19
|
-
* @param delegated_free
|
|
20
|
-
* @param delegated_vesting
|
|
21
|
-
* @param end_time -not used-
|
|
22
|
-
* @param vesting_schedules Entries that make up vesting
|
|
23
|
-
*/
|
|
24
|
-
constructor(base_account: BaseAccount, original_vesting: Coins, delegated_free: Coins, delegated_vesting: Coins, end_time: number);
|
|
25
|
-
getAccountNumber(): number;
|
|
26
|
-
getSequenceNumber(): number;
|
|
27
|
-
getPublicKey(): PublicKey | null;
|
|
28
|
-
toAmino(): BaseVestingAccount.Amino;
|
|
29
|
-
static fromAmino(amino: BaseVestingAccount.Amino): BaseVestingAccount;
|
|
30
|
-
toData(): BaseVestingAccount.Data;
|
|
31
|
-
static fromData(data: BaseVestingAccount.Data): BaseVestingAccount;
|
|
32
|
-
toProto(): BaseVestingAccount.Proto;
|
|
33
|
-
static fromProto(proto: BaseVestingAccount.Proto): BaseVestingAccount;
|
|
34
|
-
}
|
|
35
|
-
export declare namespace BaseVestingAccount {
|
|
36
|
-
interface AminoValue {
|
|
37
|
-
base_account: BaseAccount.AminoValue;
|
|
38
|
-
original_vesting: Coins.Amino;
|
|
39
|
-
delegated_free: Coins.Amino;
|
|
40
|
-
delegated_vesting: Coins.Amino;
|
|
41
|
-
end_time: string;
|
|
42
|
-
}
|
|
43
|
-
interface Amino {
|
|
44
|
-
type: 'cosmos-sdk/BaseVestingAccount';
|
|
45
|
-
value: AminoValue;
|
|
46
|
-
}
|
|
47
|
-
interface DataValue {
|
|
48
|
-
base_account: BaseAccount.DataValue;
|
|
49
|
-
original_vesting: Coins.Amino;
|
|
50
|
-
delegated_free: Coins.Amino;
|
|
51
|
-
delegated_vesting: Coins.Amino;
|
|
52
|
-
end_time: string;
|
|
53
|
-
}
|
|
54
|
-
interface Data extends DataValue {
|
|
55
|
-
'@type': '/cosmos.vesting.v1beta1.BaseVestingAccount';
|
|
56
|
-
}
|
|
57
|
-
type Proto = BaseVestingAccount_pb;
|
|
58
|
-
}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
-
};
|
|
31
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
exports.BaseVestingAccount = void 0;
|
|
33
|
-
var json_1 = require("../../util/json");
|
|
34
|
-
var Coins_1 = require("../Coins");
|
|
35
|
-
var BaseAccount_1 = require("./BaseAccount");
|
|
36
|
-
var vesting_1 = require("@initia/initia.proto/cosmos/vesting/v1beta1/vesting");
|
|
37
|
-
var long_1 = __importDefault(require("long"));
|
|
38
|
-
/**
|
|
39
|
-
* Holds information about a Account which has vesting information.
|
|
40
|
-
*/
|
|
41
|
-
var BaseVestingAccount = /** @class */ (function (_super) {
|
|
42
|
-
__extends(BaseVestingAccount, _super);
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
* @param BaseAccount account information
|
|
46
|
-
* @param original_vesting initial vesting amount
|
|
47
|
-
* @param delegated_free
|
|
48
|
-
* @param delegated_vesting
|
|
49
|
-
* @param end_time -not used-
|
|
50
|
-
* @param vesting_schedules Entries that make up vesting
|
|
51
|
-
*/
|
|
52
|
-
function BaseVestingAccount(base_account, original_vesting, delegated_free, delegated_vesting, end_time) {
|
|
53
|
-
var _this = _super.call(this) || this;
|
|
54
|
-
_this.base_account = base_account;
|
|
55
|
-
_this.original_vesting = original_vesting;
|
|
56
|
-
_this.delegated_free = delegated_free;
|
|
57
|
-
_this.delegated_vesting = delegated_vesting;
|
|
58
|
-
_this.end_time = end_time;
|
|
59
|
-
return _this;
|
|
60
|
-
}
|
|
61
|
-
BaseVestingAccount.prototype.getAccountNumber = function () {
|
|
62
|
-
return this.base_account.account_number;
|
|
63
|
-
};
|
|
64
|
-
BaseVestingAccount.prototype.getSequenceNumber = function () {
|
|
65
|
-
return this.base_account.sequence;
|
|
66
|
-
};
|
|
67
|
-
BaseVestingAccount.prototype.getPublicKey = function () {
|
|
68
|
-
return this.base_account.public_key;
|
|
69
|
-
};
|
|
70
|
-
BaseVestingAccount.prototype.toAmino = function () {
|
|
71
|
-
undefined;
|
|
72
|
-
var _a = this, base_account = _a.base_account, original_vesting = _a.original_vesting, delegated_free = _a.delegated_free, delegated_vesting = _a.delegated_vesting, end_time = _a.end_time;
|
|
73
|
-
return {
|
|
74
|
-
type: 'cosmos-sdk/BaseVestingAccount',
|
|
75
|
-
value: {
|
|
76
|
-
base_account: base_account.toAmino().value,
|
|
77
|
-
delegated_free: delegated_free.toAmino(),
|
|
78
|
-
delegated_vesting: delegated_vesting.toAmino(),
|
|
79
|
-
end_time: end_time.toFixed(),
|
|
80
|
-
original_vesting: original_vesting.toAmino(),
|
|
81
|
-
},
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
BaseVestingAccount.fromAmino = function (amino) {
|
|
85
|
-
var base_account = BaseAccount_1.BaseAccount.fromAmino({
|
|
86
|
-
type: 'cosmos-sdk/BaseAccount',
|
|
87
|
-
value: amino.value.base_account,
|
|
88
|
-
});
|
|
89
|
-
return new BaseVestingAccount(base_account, Coins_1.Coins.fromAmino(amino.value.original_vesting), Coins_1.Coins.fromAmino(amino.value.delegated_free), Coins_1.Coins.fromAmino(amino.value.delegated_vesting), Number.parseInt(amino.value.end_time));
|
|
90
|
-
};
|
|
91
|
-
BaseVestingAccount.prototype.toData = function () {
|
|
92
|
-
var _a = this, base_account = _a.base_account, original_vesting = _a.original_vesting, delegated_free = _a.delegated_free, delegated_vesting = _a.delegated_vesting, end_time = _a.end_time;
|
|
93
|
-
return {
|
|
94
|
-
'@type': '/cosmos.vesting.v1beta1.BaseVestingAccount',
|
|
95
|
-
base_account: base_account.toData(),
|
|
96
|
-
delegated_free: delegated_free.toData(),
|
|
97
|
-
delegated_vesting: delegated_vesting.toData(),
|
|
98
|
-
end_time: end_time.toFixed(),
|
|
99
|
-
original_vesting: original_vesting.toData(),
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
BaseVestingAccount.fromData = function (data) {
|
|
103
|
-
var base_account = BaseAccount_1.BaseAccount.fromData(__assign({ '@type': '/cosmos.auth.v1beta1.BaseAccount' }, data.base_account));
|
|
104
|
-
return new BaseVestingAccount(base_account, Coins_1.Coins.fromData(data.original_vesting), Coins_1.Coins.fromData(data.delegated_free), Coins_1.Coins.fromData(data.delegated_vesting), Number.parseInt(data.end_time));
|
|
105
|
-
};
|
|
106
|
-
BaseVestingAccount.prototype.toProto = function () {
|
|
107
|
-
var _a = this, base_account = _a.base_account, original_vesting = _a.original_vesting, delegated_free = _a.delegated_free, delegated_vesting = _a.delegated_vesting, end_time = _a.end_time;
|
|
108
|
-
return vesting_1.BaseVestingAccount.fromPartial({
|
|
109
|
-
baseAccount: base_account.toProto(),
|
|
110
|
-
delegatedFree: delegated_free.toProto(),
|
|
111
|
-
delegatedVesting: delegated_vesting.toProto(),
|
|
112
|
-
endTime: long_1.default.fromNumber(end_time),
|
|
113
|
-
originalVesting: original_vesting.toProto(),
|
|
114
|
-
});
|
|
115
|
-
};
|
|
116
|
-
BaseVestingAccount.fromProto = function (proto) {
|
|
117
|
-
var baseAccount = BaseAccount_1.BaseAccount.fromProto(proto.baseAccount);
|
|
118
|
-
return new BaseVestingAccount(baseAccount, Coins_1.Coins.fromProto(proto.originalVesting), Coins_1.Coins.fromProto(proto.delegatedFree), Coins_1.Coins.fromProto(proto.delegatedVesting), proto.endTime.toNumber());
|
|
119
|
-
};
|
|
120
|
-
return BaseVestingAccount;
|
|
121
|
-
}(json_1.JSONSerializable));
|
|
122
|
-
exports.BaseVestingAccount = BaseVestingAccount;
|
|
123
|
-
//# sourceMappingURL=BaseVestingAccount.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BaseVestingAccount.js","sourceRoot":"","sources":["../../../src/core/auth/BaseVestingAccount.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wCAAmD;AACnD,kCAAiC;AACjC,6CAA4C;AAE5C,+EAAkH;AAClH,8CAAwB;AAGxB;;GAEG;AACH;IAAwC,sCAIvC;IACC;;;;;;;;OAQG;IACH,4BACS,YAAyB,EACzB,gBAAuB,EACvB,cAAqB,EACrB,iBAAwB,EACxB,QAAgB;QALz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F,CAAC;QAET,OAAO,4BAAqB,CAAC,WAAW,CAAC;YACvC,WAAW,EAAE,YAAY,CAAC,OAAO,EAAE;YACnC,aAAa,EAAE,cAAc,CAAC,OAAO,EAAE;YACvC,gBAAgB,EAAE,iBAAiB,CAAC,OAAO,EAAE;YAC7C,OAAO,EAAE,cAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;YAClC,eAAe,EAAE,gBAAgB,CAAC,OAAO,EAAE;SAC5C,CAAC,CAAC;IACL,CAAC;IAEa,4BAAS,GAAvB,UAAwB,KAA+B;QACrD,IAAM,WAAW,GAAG,yBAAW,CAAC,SAAS,CACvC,KAAK,CAAC,WAA6B,CACpC,CAAC;QAEF,OAAO,IAAI,kBAAkB,CAC3B,WAAW,EACX,aAAK,CAAC,SAAS,CAAC,KAAK,CAAC,eAAe,CAAC,EACtC,aAAK,CAAC,SAAS,CAAC,KAAK,CAAC,aAAa,CAAC,EACpC,aAAK,CAAC,SAAS,CAAC,KAAK,CAAC,gBAAgB,CAAC,EACvC,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,CACzB,CAAC;IACJ,CAAC;IACH,yBAAC;AAAD,CAAC,AA1ID,CAAwC,uBAAgB,GA0IvD;AA1IY,gDAAkB"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { JSONSerializable } from '../../util/json';
|
|
2
|
-
import { BaseVestingAccount } from './BaseVestingAccount';
|
|
3
|
-
import { PublicKey } from '../PublicKey';
|
|
4
|
-
import { ContinuousVestingAccount as ContinuousVestingAccount_pb } from '@initia/initia.proto/cosmos/vesting/v1beta1/vesting';
|
|
5
|
-
import { Any } from '@initia/initia.proto/google/protobuf/any';
|
|
6
|
-
/**
|
|
7
|
-
* ContinuousVestingAccount implements the VestingAccount interface. It
|
|
8
|
-
* continuously vests by unlocking coins linearly with respect to time.
|
|
9
|
-
*/
|
|
10
|
-
export declare class ContinuousVestingAccount extends JSONSerializable<ContinuousVestingAccount.Amino, ContinuousVestingAccount.Data, ContinuousVestingAccount.Proto> {
|
|
11
|
-
base_vesting_account: BaseVestingAccount;
|
|
12
|
-
start_time: number;
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
* @param base_vesting_account account information
|
|
16
|
-
* @param start_time vesting start time
|
|
17
|
-
*/
|
|
18
|
-
constructor(base_vesting_account: BaseVestingAccount, start_time: number);
|
|
19
|
-
getAccountNumber(): number;
|
|
20
|
-
getSequenceNumber(): number;
|
|
21
|
-
getPublicKey(): PublicKey | null;
|
|
22
|
-
toAmino(): ContinuousVestingAccount.Amino;
|
|
23
|
-
static fromAmino(data: ContinuousVestingAccount.Amino): ContinuousVestingAccount;
|
|
24
|
-
toData(): ContinuousVestingAccount.Data;
|
|
25
|
-
static fromData(data: ContinuousVestingAccount.Data): ContinuousVestingAccount;
|
|
26
|
-
toProto(): ContinuousVestingAccount.Proto;
|
|
27
|
-
static fromProto(ContinuousVestingAccountProto: ContinuousVestingAccount.Proto): ContinuousVestingAccount;
|
|
28
|
-
packAny(): Any;
|
|
29
|
-
static unpackAny(pubkeyAny: Any): ContinuousVestingAccount;
|
|
30
|
-
}
|
|
31
|
-
export declare namespace ContinuousVestingAccount {
|
|
32
|
-
interface Amino {
|
|
33
|
-
type: 'cosmos-sdk/ContinuousVestingAccount';
|
|
34
|
-
value: {
|
|
35
|
-
base_vesting_account: BaseVestingAccount.AminoValue;
|
|
36
|
-
start_time: string;
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
interface Data {
|
|
40
|
-
'@type': '/cosmos.vesting.v1beta1.ContinuousVestingAccount';
|
|
41
|
-
base_vesting_account: BaseVestingAccount.DataValue;
|
|
42
|
-
start_time: string;
|
|
43
|
-
}
|
|
44
|
-
type Proto = ContinuousVestingAccount_pb;
|
|
45
|
-
}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
-
};
|
|
31
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
exports.ContinuousVestingAccount = void 0;
|
|
33
|
-
var json_1 = require("../../util/json");
|
|
34
|
-
var BaseVestingAccount_1 = require("./BaseVestingAccount");
|
|
35
|
-
var long_1 = __importDefault(require("long"));
|
|
36
|
-
var vesting_1 = require("@initia/initia.proto/cosmos/vesting/v1beta1/vesting");
|
|
37
|
-
var any_1 = require("@initia/initia.proto/google/protobuf/any");
|
|
38
|
-
/**
|
|
39
|
-
* ContinuousVestingAccount implements the VestingAccount interface. It
|
|
40
|
-
* continuously vests by unlocking coins linearly with respect to time.
|
|
41
|
-
*/
|
|
42
|
-
var ContinuousVestingAccount = /** @class */ (function (_super) {
|
|
43
|
-
__extends(ContinuousVestingAccount, _super);
|
|
44
|
-
/**
|
|
45
|
-
*
|
|
46
|
-
* @param base_vesting_account account information
|
|
47
|
-
* @param start_time vesting start time
|
|
48
|
-
*/
|
|
49
|
-
function ContinuousVestingAccount(base_vesting_account, start_time) {
|
|
50
|
-
var _this = _super.call(this) || this;
|
|
51
|
-
_this.base_vesting_account = base_vesting_account;
|
|
52
|
-
_this.start_time = start_time;
|
|
53
|
-
return _this;
|
|
54
|
-
}
|
|
55
|
-
ContinuousVestingAccount.prototype.getAccountNumber = function () {
|
|
56
|
-
return this.base_vesting_account.getAccountNumber();
|
|
57
|
-
};
|
|
58
|
-
ContinuousVestingAccount.prototype.getSequenceNumber = function () {
|
|
59
|
-
return this.base_vesting_account.getSequenceNumber();
|
|
60
|
-
};
|
|
61
|
-
ContinuousVestingAccount.prototype.getPublicKey = function () {
|
|
62
|
-
return this.base_vesting_account.base_account.public_key;
|
|
63
|
-
};
|
|
64
|
-
ContinuousVestingAccount.prototype.toAmino = function () {
|
|
65
|
-
var _a = this, base_vesting_account = _a.base_vesting_account, start_time = _a.start_time;
|
|
66
|
-
return {
|
|
67
|
-
type: 'cosmos-sdk/ContinuousVestingAccount',
|
|
68
|
-
value: {
|
|
69
|
-
base_vesting_account: base_vesting_account.toAmino().value,
|
|
70
|
-
start_time: start_time.toFixed(),
|
|
71
|
-
},
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
ContinuousVestingAccount.fromAmino = function (data) {
|
|
75
|
-
var base_vesting_account = BaseVestingAccount_1.BaseVestingAccount.fromAmino({
|
|
76
|
-
type: 'cosmos-sdk/BaseVestingAccount',
|
|
77
|
-
value: data.value.base_vesting_account,
|
|
78
|
-
});
|
|
79
|
-
return new ContinuousVestingAccount(base_vesting_account, Number.parseInt(data.value.start_time));
|
|
80
|
-
};
|
|
81
|
-
ContinuousVestingAccount.prototype.toData = function () {
|
|
82
|
-
var _a = this, base_vesting_account = _a.base_vesting_account, start_time = _a.start_time;
|
|
83
|
-
return {
|
|
84
|
-
'@type': '/cosmos.vesting.v1beta1.ContinuousVestingAccount',
|
|
85
|
-
base_vesting_account: base_vesting_account.toData(),
|
|
86
|
-
start_time: start_time.toFixed(),
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
ContinuousVestingAccount.fromData = function (data) {
|
|
90
|
-
var base_vesting_account = BaseVestingAccount_1.BaseVestingAccount.fromData(__assign({ '@type': '/cosmos.vesting.v1beta1.BaseVestingAccount' }, data.base_vesting_account));
|
|
91
|
-
return new ContinuousVestingAccount(base_vesting_account, Number.parseInt(data.start_time));
|
|
92
|
-
};
|
|
93
|
-
ContinuousVestingAccount.prototype.toProto = function () {
|
|
94
|
-
var _a = this, base_vesting_account = _a.base_vesting_account, start_time = _a.start_time;
|
|
95
|
-
return vesting_1.ContinuousVestingAccount.fromPartial({
|
|
96
|
-
baseVestingAccount: base_vesting_account.toProto(),
|
|
97
|
-
startTime: long_1.default.fromNumber(start_time),
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
ContinuousVestingAccount.fromProto = function (ContinuousVestingAccountProto) {
|
|
101
|
-
var baseVestingAccount = BaseVestingAccount_1.BaseVestingAccount.fromProto(ContinuousVestingAccountProto.baseVestingAccount);
|
|
102
|
-
return new ContinuousVestingAccount(baseVestingAccount, ContinuousVestingAccountProto.startTime.toNumber());
|
|
103
|
-
};
|
|
104
|
-
ContinuousVestingAccount.prototype.packAny = function () {
|
|
105
|
-
return any_1.Any.fromPartial({
|
|
106
|
-
typeUrl: '/cosmos.vesting.v1beta1.ContinuousVestingAccount',
|
|
107
|
-
value: vesting_1.ContinuousVestingAccount.encode(this.toProto()).finish(),
|
|
108
|
-
});
|
|
109
|
-
};
|
|
110
|
-
ContinuousVestingAccount.unpackAny = function (pubkeyAny) {
|
|
111
|
-
return ContinuousVestingAccount.fromProto(vesting_1.ContinuousVestingAccount.decode(pubkeyAny.value));
|
|
112
|
-
};
|
|
113
|
-
return ContinuousVestingAccount;
|
|
114
|
-
}(json_1.JSONSerializable));
|
|
115
|
-
exports.ContinuousVestingAccount = ContinuousVestingAccount;
|
|
116
|
-
//# sourceMappingURL=ContinuousVestingAccount.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContinuousVestingAccount.js","sourceRoot":"","sources":["../../../src/core/auth/ContinuousVestingAccount.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wCAAmD;AACnD,2DAA0D;AAC1D,8CAAwB;AAIxB,+EAA8H;AAC9H,gEAA+D;AAE/D;;;GAGG;AACH;IAA8C,4CAI7C;IACC;;;;OAIG;IACH,kCACS,oBAAwC,EACxC,UAAkB;QAF3B,YAIE,iBAAO,SACR;QAJQ,0BAAoB,GAApB,oBAAoB,CAAoB;QACxC,gBAAU,GAAV,UAAU,CAAQ;;IAG3B,CAAC;IAEM,mDAAgB,GAAvB;QACE,OAAO,IAAI,CAAC,oBAAoB,CAAC,gBAAgB,EAAE,CAAC;IACtD,CAAC;IAEM,oDAAiB,GAAxB;QACE,OAAO,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,EAAE,CAAC;IACvD,CAAC;IAEM,+CAAY,GAAnB;QACE,OAAO,IAAI,CAAC,oBAAoB,CAAC,YAAY,CAAC,UAAU,CAAC;IAC3D,CAAC;IAEM,0CAAO,GAAd;QACQ,IAAA,KAAuC,IAAI,EAAzC,oBAAoB,0BAAA,EAAE,UAAU,gBAAS,CAAC;QAClD,OAAO;YACL,IAAI,EAAE,qCAAqC;YAC3C,KAAK,EAAE;gBACL,oBAAoB,EAAE,oBAAoB,CAAC,OAAO,EAAE,CAAC,KAAK;gBAC1D,UAAU,EAAE,UAAU,CAAC,OAAO,EAAE;aACjC;SACF,CAAC;IACJ,CAAC;IAEa,kCAAS,GAAvB,UACE,IAAoC;QAEpC,IAAM,oBAAoB,GAAG,uCAAkB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CACnD,CAAC;IACJ,CAAC;IAEM,0CAAO,GAAd;QACE,OAAO,SAAG,CAAC,WAAW,CAAC;YACrB,OAAO,EAAE,kDAAkD;YAC3D,KAAK,EAAE,kCAA2B,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;SACnE,CAAC,CAAC;IACL,CAAC;IAEa,kCAAS,GAAvB,UAAwB,SAAc;QACpC,OAAO,wBAAwB,CAAC,SAAS,CACvC,kCAA2B,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CACpD,CAAC;IACJ,CAAC;IACH,+BAAC;AAAD,CAAC,AA9GD,CAA8C,uBAAgB,GA8G7D;AA9GY,4DAAwB"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { JSONSerializable } from '../../util/json';
|
|
2
|
-
import { BaseVestingAccount } from './BaseVestingAccount';
|
|
3
|
-
import { PublicKey } from '../PublicKey';
|
|
4
|
-
import { DelayedVestingAccount as DelayedVestingAccount_pb } from '@initia/initia.proto/cosmos/vesting/v1beta1/vesting';
|
|
5
|
-
import { Any } from '@initia/initia.proto/google/protobuf/any';
|
|
6
|
-
/**
|
|
7
|
-
* DelayedVestingAccount implements the VestingAccount interface. It vests all
|
|
8
|
-
* coins after a specific time, but non prior. In other words, it keeps them
|
|
9
|
-
* locked until a specified time.
|
|
10
|
-
*/
|
|
11
|
-
export declare class DelayedVestingAccount extends JSONSerializable<DelayedVestingAccount.Amino, DelayedVestingAccount.Data, DelayedVestingAccount.Proto> {
|
|
12
|
-
base_vesting_account: BaseVestingAccount;
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
* @param base_vesting_account account information
|
|
16
|
-
*/
|
|
17
|
-
constructor(base_vesting_account: BaseVestingAccount);
|
|
18
|
-
getAccountNumber(): number;
|
|
19
|
-
getSequenceNumber(): number;
|
|
20
|
-
getPublicKey(): PublicKey | null;
|
|
21
|
-
toAmino(): DelayedVestingAccount.Amino;
|
|
22
|
-
static fromAmino(data: DelayedVestingAccount.Amino): DelayedVestingAccount;
|
|
23
|
-
toData(): DelayedVestingAccount.Data;
|
|
24
|
-
static fromData(data: DelayedVestingAccount.Data): DelayedVestingAccount;
|
|
25
|
-
toProto(): DelayedVestingAccount.Proto;
|
|
26
|
-
static fromProto(DelayedVestingAccountProto: DelayedVestingAccount.Proto): DelayedVestingAccount;
|
|
27
|
-
packAny(): Any;
|
|
28
|
-
static unpackAny(pubkeyAny: Any): DelayedVestingAccount;
|
|
29
|
-
}
|
|
30
|
-
export declare namespace DelayedVestingAccount {
|
|
31
|
-
interface Amino {
|
|
32
|
-
type: 'cosmos-sdk/DelayedVestingAccount';
|
|
33
|
-
value: {
|
|
34
|
-
base_vesting_account: BaseVestingAccount.AminoValue;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
interface Data {
|
|
38
|
-
'@type': '/cosmos.vesting.v1beta1.DelayedVestingAccount';
|
|
39
|
-
base_vesting_account: BaseVestingAccount.DataValue;
|
|
40
|
-
}
|
|
41
|
-
type Proto = DelayedVestingAccount_pb;
|
|
42
|
-
}
|