@initia/initia.js 0.0.12 → 0.0.14
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/core/bech32.d.ts +12 -0
- package/dist/core/bech32.js +22 -0
- package/dist/core/bech32.js.map +1 -1
- package/dist/core/index.d.ts +17 -19
- package/dist/core/index.js +23 -25
- package/dist/core/index.js.map +1 -1
- package/dist/util/index.d.ts +0 -1
- package/dist/util/index.js +0 -1
- package/dist/util/index.js.map +1 -1
- package/package.json +1 -1
package/dist/core/bech32.d.ts
CHANGED
|
@@ -21,6 +21,18 @@ export declare namespace AccAddress {
|
|
|
21
21
|
* @param address validator address
|
|
22
22
|
*/
|
|
23
23
|
function fromValAddress(address: ValAddress): AccAddress;
|
|
24
|
+
/**
|
|
25
|
+
* Converts a account address into a hex address
|
|
26
|
+
*
|
|
27
|
+
* @param address account address
|
|
28
|
+
*/
|
|
29
|
+
function toHex(address: AccAddress): string;
|
|
30
|
+
/**
|
|
31
|
+
* Converts a hex address into an account address
|
|
32
|
+
*
|
|
33
|
+
* @param hexAddress hex address
|
|
34
|
+
*/
|
|
35
|
+
function fromHex(hexAddress: string): AccAddress;
|
|
24
36
|
}
|
|
25
37
|
export declare namespace AccPubKey {
|
|
26
38
|
/**
|
package/dist/core/bech32.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.ValConsAddress = exports.ValPubKey = exports.ValAddress = exports.AccPubKey = exports.AccAddress = void 0;
|
|
4
7
|
var bech32_1 = require("bech32");
|
|
8
|
+
var bech32_converting_1 = __importDefault(require("bech32-converting"));
|
|
5
9
|
function checkPrefixAndLength(prefix, data, length) {
|
|
6
10
|
try {
|
|
7
11
|
var vals = bech32_1.bech32.decode(data);
|
|
@@ -32,6 +36,24 @@ var AccAddress;
|
|
|
32
36
|
return bech32_1.bech32.encode('init', vals.words);
|
|
33
37
|
}
|
|
34
38
|
AccAddress.fromValAddress = fromValAddress;
|
|
39
|
+
/**
|
|
40
|
+
* Converts a account address into a hex address
|
|
41
|
+
*
|
|
42
|
+
* @param address account address
|
|
43
|
+
*/
|
|
44
|
+
function toHex(address) {
|
|
45
|
+
return (0, bech32_converting_1.default)('init').toHex(address);
|
|
46
|
+
}
|
|
47
|
+
AccAddress.toHex = toHex;
|
|
48
|
+
/**
|
|
49
|
+
* Converts a hex address into an account address
|
|
50
|
+
*
|
|
51
|
+
* @param hexAddress hex address
|
|
52
|
+
*/
|
|
53
|
+
function fromHex(hexAddress) {
|
|
54
|
+
return (0, bech32_converting_1.default)('init').toBech32(hexAddress);
|
|
55
|
+
}
|
|
56
|
+
AccAddress.fromHex = fromHex;
|
|
35
57
|
})(AccAddress = exports.AccAddress || (exports.AccAddress = {}));
|
|
36
58
|
var AccPubKey;
|
|
37
59
|
(function (AccPubKey) {
|
package/dist/core/bech32.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bech32.js","sourceRoot":"","sources":["../../src/core/bech32.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bech32.js","sourceRoot":"","sources":["../../src/core/bech32.ts"],"names":[],"mappings":";;;;;;AAAA,iCAAgC;AAChC,wEAA0C;AAiB1C,SAAS,oBAAoB,CAC3B,MAAc,EACd,IAAY,EACZ,MAAc;IAEd,IAAI;QACF,IAAM,IAAI,GAAG,eAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACjC,OAAO,IAAI,CAAC,MAAM,KAAK,MAAM,IAAI,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC;KACxD;IAAC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AoB,CAAC,aAAa,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IACvD,CAAC;IAFe,uBAAQ,WAEvB,CAAA;AACH,CAAC,EATgB,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAS9B"}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -2,24 +2,23 @@ export * from './Block';
|
|
|
2
2
|
export * from './Coin';
|
|
3
3
|
export * from './Coins';
|
|
4
4
|
export * from './Denom';
|
|
5
|
+
export * from './Deposit';
|
|
6
|
+
export * from './Fee';
|
|
5
7
|
export * from './Msg';
|
|
8
|
+
export * from './MultiSignature';
|
|
6
9
|
export * from './PublicKey';
|
|
7
|
-
export * from './
|
|
10
|
+
export * from './SignatureV2';
|
|
8
11
|
export * from './SignDoc';
|
|
9
12
|
export * from './Tx';
|
|
10
13
|
export * from './TxInfo';
|
|
11
14
|
export * from './ValidatorSet';
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './SignatureV2';
|
|
14
|
-
export * from './MultiSignature';
|
|
15
|
+
export * from './bech32';
|
|
15
16
|
export * from './num';
|
|
16
|
-
export * from './auth
|
|
17
|
-
export * from './
|
|
18
|
-
export * from './
|
|
19
|
-
export * from './auth/DelayedVestingAccount';
|
|
20
|
-
export * from './auth/ContinuousVestingAccount';
|
|
21
|
-
export * from './auth/PeriodicVestingAccount';
|
|
17
|
+
export * from './auth';
|
|
18
|
+
export * from './authz/msgs';
|
|
19
|
+
export * from './authz/authorizations';
|
|
22
20
|
export * from './bank/msgs';
|
|
21
|
+
export * from './crisis';
|
|
23
22
|
export * from './distribution/msgs';
|
|
24
23
|
export * from './distribution/proposals';
|
|
25
24
|
export * from './feegrant/msgs';
|
|
@@ -28,8 +27,13 @@ export * from './gov/msgs';
|
|
|
28
27
|
export * from './gov/proposals';
|
|
29
28
|
export * from './gov/Proposal';
|
|
30
29
|
export * from './gov/Vote';
|
|
31
|
-
export * from './
|
|
32
|
-
export * from './
|
|
30
|
+
export * from './ibc/msgs/channel';
|
|
31
|
+
export * from './ibc/msgs/client';
|
|
32
|
+
export * from './ibc/msgs/connection';
|
|
33
|
+
export * from './ibc/applications/transfer';
|
|
34
|
+
export * from './move/msgs';
|
|
35
|
+
export * from './move/proposals';
|
|
36
|
+
export * from './move/MoveCoin';
|
|
33
37
|
export * from './params/proposals';
|
|
34
38
|
export * from './params/ParamChange';
|
|
35
39
|
export * from './slashing/msgs';
|
|
@@ -38,11 +42,5 @@ export * from './staking/Delegation';
|
|
|
38
42
|
export * from './staking/Redelegation';
|
|
39
43
|
export * from './staking/UnbondingDelegation';
|
|
40
44
|
export * from './staking/Validator';
|
|
41
|
-
export * from './vesting';
|
|
42
45
|
export * from './upgrade';
|
|
43
|
-
export * from './
|
|
44
|
-
export * from './ibc/msgs/channel';
|
|
45
|
-
export * from './ibc/msgs/client';
|
|
46
|
-
export * from './ibc/msgs/connection';
|
|
47
|
-
export * from './ibc/applications/transfer';
|
|
48
|
-
export * from './bech32';
|
|
46
|
+
export * from './vesting';
|
package/dist/core/index.js
CHANGED
|
@@ -18,26 +18,27 @@ __exportStar(require("./Block"), exports);
|
|
|
18
18
|
__exportStar(require("./Coin"), exports);
|
|
19
19
|
__exportStar(require("./Coins"), exports);
|
|
20
20
|
__exportStar(require("./Denom"), exports);
|
|
21
|
+
__exportStar(require("./Deposit"), exports);
|
|
22
|
+
__exportStar(require("./Fee"), exports);
|
|
21
23
|
__exportStar(require("./Msg"), exports);
|
|
24
|
+
__exportStar(require("./MultiSignature"), exports);
|
|
22
25
|
__exportStar(require("./PublicKey"), exports);
|
|
23
|
-
__exportStar(require("./
|
|
26
|
+
__exportStar(require("./SignatureV2"), exports);
|
|
24
27
|
__exportStar(require("./SignDoc"), exports);
|
|
25
28
|
__exportStar(require("./Tx"), exports);
|
|
26
29
|
__exportStar(require("./TxInfo"), exports);
|
|
27
30
|
__exportStar(require("./ValidatorSet"), exports);
|
|
28
|
-
__exportStar(require("./
|
|
29
|
-
__exportStar(require("./SignatureV2"), exports);
|
|
30
|
-
__exportStar(require("./MultiSignature"), exports);
|
|
31
|
+
__exportStar(require("./bech32"), exports);
|
|
31
32
|
__exportStar(require("./num"), exports);
|
|
32
33
|
// Auth
|
|
33
|
-
__exportStar(require("./auth
|
|
34
|
-
|
|
35
|
-
__exportStar(require("./
|
|
36
|
-
__exportStar(require("./
|
|
37
|
-
__exportStar(require("./auth/ContinuousVestingAccount"), exports);
|
|
38
|
-
__exportStar(require("./auth/PeriodicVestingAccount"), exports);
|
|
34
|
+
__exportStar(require("./auth"), exports);
|
|
35
|
+
// Authz
|
|
36
|
+
__exportStar(require("./authz/msgs"), exports);
|
|
37
|
+
__exportStar(require("./authz/authorizations"), exports);
|
|
39
38
|
// Bank
|
|
40
39
|
__exportStar(require("./bank/msgs"), exports);
|
|
40
|
+
// Crisis
|
|
41
|
+
__exportStar(require("./crisis"), exports);
|
|
41
42
|
// Distribution
|
|
42
43
|
__exportStar(require("./distribution/msgs"), exports);
|
|
43
44
|
__exportStar(require("./distribution/proposals"), exports);
|
|
@@ -49,9 +50,16 @@ __exportStar(require("./gov/msgs"), exports);
|
|
|
49
50
|
__exportStar(require("./gov/proposals"), exports);
|
|
50
51
|
__exportStar(require("./gov/Proposal"), exports);
|
|
51
52
|
__exportStar(require("./gov/Vote"), exports);
|
|
52
|
-
//
|
|
53
|
-
__exportStar(require("./
|
|
54
|
-
__exportStar(require("./
|
|
53
|
+
// IBC
|
|
54
|
+
__exportStar(require("./ibc/msgs/channel"), exports);
|
|
55
|
+
__exportStar(require("./ibc/msgs/client"), exports);
|
|
56
|
+
__exportStar(require("./ibc/msgs/connection"), exports);
|
|
57
|
+
// IBC-transfer
|
|
58
|
+
__exportStar(require("./ibc/applications/transfer"), exports);
|
|
59
|
+
// MOVE
|
|
60
|
+
__exportStar(require("./move/msgs"), exports);
|
|
61
|
+
__exportStar(require("./move/proposals"), exports);
|
|
62
|
+
__exportStar(require("./move/MoveCoin"), exports);
|
|
55
63
|
// Parameters
|
|
56
64
|
__exportStar(require("./params/proposals"), exports);
|
|
57
65
|
__exportStar(require("./params/ParamChange"), exports);
|
|
@@ -63,18 +71,8 @@ __exportStar(require("./staking/Delegation"), exports);
|
|
|
63
71
|
__exportStar(require("./staking/Redelegation"), exports);
|
|
64
72
|
__exportStar(require("./staking/UnbondingDelegation"), exports);
|
|
65
73
|
__exportStar(require("./staking/Validator"), exports);
|
|
66
|
-
// Vesting
|
|
67
|
-
__exportStar(require("./vesting"), exports);
|
|
68
74
|
// Upgrade
|
|
69
75
|
__exportStar(require("./upgrade"), exports);
|
|
70
|
-
//
|
|
71
|
-
__exportStar(require("./
|
|
72
|
-
// IBC
|
|
73
|
-
__exportStar(require("./ibc/msgs/channel"), exports);
|
|
74
|
-
__exportStar(require("./ibc/msgs/client"), exports);
|
|
75
|
-
__exportStar(require("./ibc/msgs/connection"), exports);
|
|
76
|
-
// IBC-transfer
|
|
77
|
-
__exportStar(require("./ibc/applications/transfer"), exports);
|
|
78
|
-
// bech32 types
|
|
79
|
-
__exportStar(require("./bech32"), exports);
|
|
76
|
+
// Vesting
|
|
77
|
+
__exportStar(require("./vesting"), exports);
|
|
80
78
|
//# sourceMappingURL=index.js.map
|
package/dist/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,yCAAuB;AACvB,0CAAwB;AACxB,0CAAwB;AACxB,wCAAsB;AACtB,8CAA4B;AAC5B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,yCAAuB;AACvB,0CAAwB;AACxB,0CAAwB;AACxB,4CAA0B;AAC1B,wCAAsB;AACtB,wCAAsB;AACtB,mDAAiC;AACjC,8CAA4B;AAC5B,gDAA8B;AAC9B,4CAA0B;AAC1B,uCAAqB;AACrB,2CAAyB;AACzB,iDAA+B;AAC/B,2CAAyB;AACzB,wCAAsB;AAEtB,OAAO;AACP,yCAAuB;AAEvB,QAAQ;AACR,+CAA6B;AAC7B,yDAAuC;AAEvC,OAAO;AACP,8CAA4B;AAE5B,SAAS;AACT,2CAAyB;AAEzB,eAAe;AACf,sDAAoC;AACpC,2DAAyC;AAEzC,WAAW;AACX,kDAAgC;AAChC,wDAAsC;AAEtC,aAAa;AACb,6CAA2B;AAC3B,kDAAgC;AAChC,iDAA+B;AAC/B,6CAA2B;AAE3B,MAAM;AACN,qDAAmC;AACnC,oDAAkC;AAClC,wDAAsC;AAEtC,eAAe;AACf,8DAA4C;AAE5C,OAAO;AACP,8CAA4B;AAC5B,mDAAiC;AACjC,kDAAgC;AAEhC,aAAa;AACb,qDAAmC;AACnC,uDAAqC;AAErC,WAAW;AACX,kDAAgC;AAEhC,UAAU;AACV,iDAA+B;AAC/B,uDAAqC;AACrC,yDAAuC;AACvC,gEAA8C;AAC9C,sDAAoC;AAEpC,UAAU;AACV,4CAA0B;AAE1B,UAAU;AACV,4CAA0B"}
|
package/dist/util/index.d.ts
CHANGED
package/dist/util/index.js
CHANGED
|
@@ -14,7 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./address"), exports);
|
|
18
17
|
__exportStar(require("./hash"), exports);
|
|
19
18
|
__exportStar(require("./contract"), exports);
|
|
20
19
|
__exportStar(require("./bcs"), exports);
|
package/dist/util/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,6CAA2B;AAC3B,wCAAsB"}
|