graz 0.0.43 → 0.0.44-alpha.2
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/cli/index.mjs +141 -0
- package/dist/index.d.ts +585 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +21 -22
- package/stubs/chains-generated.ts.stub +20 -0
- package/stubs/chains-index.ts.stub +41 -0
- package/chains/index.js.stub +0 -30
- package/chains/index.mjs.stub +0 -20
- package/cli.mjs +0 -219
- package/compiled/p-map/index.d.ts +0 -121
- package/compiled/p-map/index.mjs +0 -1
- package/compiled/p-map/index.mjs.d.ts +0 -123
package/dist/index.d.ts
CHANGED
|
@@ -1039,4 +1039,588 @@ declare const useGrazEvents: () => null;
|
|
|
1039
1039
|
*/
|
|
1040
1040
|
declare const GrazEvents: FC;
|
|
1041
1041
|
|
|
1042
|
-
|
|
1042
|
+
/**
|
|
1043
|
+
* Asset lists are a similar mechanism to allow frontends and other UIs to fetch metadata
|
|
1044
|
+
* associated with Cosmos SDK denoms, especially for assets sent over IBC.
|
|
1045
|
+
*/
|
|
1046
|
+
interface AssetList {
|
|
1047
|
+
$schema?: string;
|
|
1048
|
+
assets: Asset[];
|
|
1049
|
+
chain_name: string;
|
|
1050
|
+
}
|
|
1051
|
+
interface Asset {
|
|
1052
|
+
/**
|
|
1053
|
+
* [OPTIONAL] The address of the asset. Only required for type_asset : cw20, snip20
|
|
1054
|
+
*/
|
|
1055
|
+
address?: string;
|
|
1056
|
+
/**
|
|
1057
|
+
* The base unit of the asset. Must be in denom_units.
|
|
1058
|
+
*/
|
|
1059
|
+
base: string;
|
|
1060
|
+
/**
|
|
1061
|
+
* [OPTIONAL] The coingecko id to fetch asset data from coingecko v3 api. See
|
|
1062
|
+
* https://api.coingecko.com/api/v3/coins/list
|
|
1063
|
+
*/
|
|
1064
|
+
coingecko_id?: string;
|
|
1065
|
+
denom_units: DenomUnit[];
|
|
1066
|
+
/**
|
|
1067
|
+
* [OPTIONAL] A short description of the asset
|
|
1068
|
+
*/
|
|
1069
|
+
description?: string;
|
|
1070
|
+
/**
|
|
1071
|
+
* The human friendly unit of the asset. Must be in denom_units.
|
|
1072
|
+
*/
|
|
1073
|
+
display: string;
|
|
1074
|
+
/**
|
|
1075
|
+
* [OPTIONAL] IBC Channel between src and dst between chain
|
|
1076
|
+
*/
|
|
1077
|
+
ibc?: Ibc;
|
|
1078
|
+
images?: AssetImage[];
|
|
1079
|
+
keywords?: string[];
|
|
1080
|
+
logo_URIs?: AssetLogoURIs;
|
|
1081
|
+
/**
|
|
1082
|
+
* The project name of the asset. For example Bitcoin.
|
|
1083
|
+
*/
|
|
1084
|
+
name: string;
|
|
1085
|
+
/**
|
|
1086
|
+
* The symbol of an asset. For example BTC.
|
|
1087
|
+
*/
|
|
1088
|
+
symbol: string;
|
|
1089
|
+
/**
|
|
1090
|
+
* The origin of the asset, starting with the index, and capturing all transitions in form
|
|
1091
|
+
* and location.
|
|
1092
|
+
*/
|
|
1093
|
+
traces?: Trace[];
|
|
1094
|
+
/**
|
|
1095
|
+
* [OPTIONAL] The potential options for type of asset. By default, assumes sdk.coin
|
|
1096
|
+
*/
|
|
1097
|
+
type_asset?: TypeAsset;
|
|
1098
|
+
}
|
|
1099
|
+
interface DenomUnit {
|
|
1100
|
+
aliases?: string[];
|
|
1101
|
+
denom: string;
|
|
1102
|
+
exponent: number;
|
|
1103
|
+
}
|
|
1104
|
+
/**
|
|
1105
|
+
* [OPTIONAL] IBC Channel between src and dst between chain
|
|
1106
|
+
*/
|
|
1107
|
+
interface Ibc {
|
|
1108
|
+
dst_channel: string;
|
|
1109
|
+
source_channel: string;
|
|
1110
|
+
source_denom: string;
|
|
1111
|
+
}
|
|
1112
|
+
interface AssetImage {
|
|
1113
|
+
png?: string;
|
|
1114
|
+
svg?: string;
|
|
1115
|
+
theme?: Theme;
|
|
1116
|
+
}
|
|
1117
|
+
interface Theme {
|
|
1118
|
+
primary_color_hex?: string;
|
|
1119
|
+
}
|
|
1120
|
+
interface AssetLogoURIs {
|
|
1121
|
+
png?: string;
|
|
1122
|
+
svg?: string;
|
|
1123
|
+
}
|
|
1124
|
+
interface Trace {
|
|
1125
|
+
chain?: TraceChain;
|
|
1126
|
+
counterparty: Counterparty;
|
|
1127
|
+
/**
|
|
1128
|
+
* The entity offering the service. E.g., 'Gravity Bridge' [Network] or 'Tether' [Company].
|
|
1129
|
+
*/
|
|
1130
|
+
provider?: string;
|
|
1131
|
+
type: TraceType;
|
|
1132
|
+
}
|
|
1133
|
+
interface TraceChain {
|
|
1134
|
+
/**
|
|
1135
|
+
* The chain's IBC transfer channel(, e.g., 'channel-1').
|
|
1136
|
+
*/
|
|
1137
|
+
channel_id?: string;
|
|
1138
|
+
/**
|
|
1139
|
+
* The contract address where the transition takes place, where applicable. E.g., The
|
|
1140
|
+
* Ethereum contract that locks up the asset while it's minted on another chain.
|
|
1141
|
+
*/
|
|
1142
|
+
contract?: string;
|
|
1143
|
+
/**
|
|
1144
|
+
* The port/channel/denom input string that generates the 'ibc/...' denom.
|
|
1145
|
+
*/
|
|
1146
|
+
path?: string;
|
|
1147
|
+
/**
|
|
1148
|
+
* The port used to transfer IBC assets; often 'transfer', but sometimes varies, e.g., for
|
|
1149
|
+
* outgoing cw20 transfers.
|
|
1150
|
+
*/
|
|
1151
|
+
port?: string;
|
|
1152
|
+
}
|
|
1153
|
+
interface Counterparty {
|
|
1154
|
+
/**
|
|
1155
|
+
* The base unit of the asset on its source platform. E.g., when describing ATOM from Cosmos
|
|
1156
|
+
* Hub, specify 'uatom', NOT 'atom' nor 'ATOM'; base units are unique per platform.
|
|
1157
|
+
*/
|
|
1158
|
+
base_denom: string;
|
|
1159
|
+
/**
|
|
1160
|
+
* The name of the counterparty chain. (must match exactly the chain name used in the Chain
|
|
1161
|
+
* Registry)
|
|
1162
|
+
*
|
|
1163
|
+
* The chain or platform from which the asset originates. E.g., 'cosmoshub', 'ethereum',
|
|
1164
|
+
* 'forex', or 'nasdaq'
|
|
1165
|
+
*/
|
|
1166
|
+
chain_name: string;
|
|
1167
|
+
/**
|
|
1168
|
+
* The counterparty IBC transfer channel(, e.g., 'channel-1').
|
|
1169
|
+
*/
|
|
1170
|
+
channel_id?: string;
|
|
1171
|
+
/**
|
|
1172
|
+
* The contract address where the transition takes place, where applicable. E.g., The
|
|
1173
|
+
* Ethereum contract that locks up the asset while it's minted on another chain.
|
|
1174
|
+
*/
|
|
1175
|
+
contract?: string;
|
|
1176
|
+
/**
|
|
1177
|
+
* The port used to transfer IBC assets; often 'transfer', but sometimes varies, e.g., for
|
|
1178
|
+
* outgoing cw20 transfers.
|
|
1179
|
+
*/
|
|
1180
|
+
port?: string;
|
|
1181
|
+
}
|
|
1182
|
+
declare enum TraceType {
|
|
1183
|
+
Bridge = "bridge",
|
|
1184
|
+
Ibc = "ibc",
|
|
1185
|
+
IbcCw20 = "ibc-cw20",
|
|
1186
|
+
LiquidStake = "liquid-stake",
|
|
1187
|
+
Synthetic = "synthetic",
|
|
1188
|
+
Wrapped = "wrapped"
|
|
1189
|
+
}
|
|
1190
|
+
/**
|
|
1191
|
+
* [OPTIONAL] The potential options for type of asset. By default, assumes sdk.coin
|
|
1192
|
+
*/
|
|
1193
|
+
declare enum TypeAsset {
|
|
1194
|
+
Cw20 = "cw20",
|
|
1195
|
+
Erc20 = "erc20",
|
|
1196
|
+
Ics20 = "ics20",
|
|
1197
|
+
SDKCoin = "sdk.coin",
|
|
1198
|
+
Snip20 = "snip20",
|
|
1199
|
+
Snip25 = "snip25"
|
|
1200
|
+
}
|
|
1201
|
+
/**
|
|
1202
|
+
* Cosmos Chain.json is a metadata file that contains information about a cosmos sdk based
|
|
1203
|
+
* chain.
|
|
1204
|
+
*/
|
|
1205
|
+
interface Chain {
|
|
1206
|
+
$schema?: string;
|
|
1207
|
+
alternative_slip44s?: number[];
|
|
1208
|
+
apis?: Apis;
|
|
1209
|
+
/**
|
|
1210
|
+
* Used to override the bech32_prefix for specific uses.
|
|
1211
|
+
*/
|
|
1212
|
+
bech32_config?: Bech32Config;
|
|
1213
|
+
/**
|
|
1214
|
+
* The default prefix for the human-readable part of addresses that identifies the coin
|
|
1215
|
+
* type. Must be registered with SLIP-0173. E.g., 'cosmos'
|
|
1216
|
+
*/
|
|
1217
|
+
bech32_prefix: string;
|
|
1218
|
+
chain_id: string;
|
|
1219
|
+
chain_name: string;
|
|
1220
|
+
codebase?: Codebase;
|
|
1221
|
+
daemon_name?: string;
|
|
1222
|
+
explorers?: Explorer[];
|
|
1223
|
+
extra_codecs?: ExtraCodec[];
|
|
1224
|
+
fees?: Fees;
|
|
1225
|
+
images?: ChainImage[];
|
|
1226
|
+
key_algos?: KeyAlgo[];
|
|
1227
|
+
keywords?: string[];
|
|
1228
|
+
logo_URIs?: ChainLogoURIs;
|
|
1229
|
+
network_type?: NetworkType;
|
|
1230
|
+
node_home?: string;
|
|
1231
|
+
peers?: Peers;
|
|
1232
|
+
pretty_name?: string;
|
|
1233
|
+
slip44?: number;
|
|
1234
|
+
staking?: Staking;
|
|
1235
|
+
status?: Status;
|
|
1236
|
+
update_link?: string;
|
|
1237
|
+
website?: string;
|
|
1238
|
+
}
|
|
1239
|
+
interface Apis {
|
|
1240
|
+
"evm-http-jsonrpc"?: Api[];
|
|
1241
|
+
grpc?: Api[];
|
|
1242
|
+
"grpc-web"?: Api[];
|
|
1243
|
+
rest?: Api[];
|
|
1244
|
+
rpc?: Api[];
|
|
1245
|
+
wss?: Api[];
|
|
1246
|
+
}
|
|
1247
|
+
interface Api {
|
|
1248
|
+
address: string;
|
|
1249
|
+
archive?: boolean;
|
|
1250
|
+
provider?: string;
|
|
1251
|
+
}
|
|
1252
|
+
/**
|
|
1253
|
+
* Used to override the bech32_prefix for specific uses.
|
|
1254
|
+
*/
|
|
1255
|
+
interface Bech32Config {
|
|
1256
|
+
/**
|
|
1257
|
+
* e.g., 'cosmos'
|
|
1258
|
+
*/
|
|
1259
|
+
bech32PrefixAccAddr?: string;
|
|
1260
|
+
/**
|
|
1261
|
+
* e.g., 'cosmospub'
|
|
1262
|
+
*/
|
|
1263
|
+
bech32PrefixAccPub?: string;
|
|
1264
|
+
/**
|
|
1265
|
+
* e.g., 'cosmosvalcons'
|
|
1266
|
+
*/
|
|
1267
|
+
bech32PrefixConsAddr?: string;
|
|
1268
|
+
/**
|
|
1269
|
+
* e.g., 'cosmosvalconspub'
|
|
1270
|
+
*/
|
|
1271
|
+
bech32PrefixConsPub?: string;
|
|
1272
|
+
/**
|
|
1273
|
+
* e.g., 'cosmosvaloper'
|
|
1274
|
+
*/
|
|
1275
|
+
bech32PrefixValAddr?: string;
|
|
1276
|
+
/**
|
|
1277
|
+
* e.g., 'cosmosvaloperpub'
|
|
1278
|
+
*/
|
|
1279
|
+
bech32PrefixValPub?: string;
|
|
1280
|
+
}
|
|
1281
|
+
interface Codebase {
|
|
1282
|
+
binaries?: CodebaseBinaries;
|
|
1283
|
+
compatible_versions?: string[];
|
|
1284
|
+
consensus?: CodebaseConsensus;
|
|
1285
|
+
cosmos_sdk_version?: string;
|
|
1286
|
+
cosmwasm_enabled?: boolean;
|
|
1287
|
+
/**
|
|
1288
|
+
* Relative path to the cosmwasm directory. ex. $HOME/.juno/data/wasm
|
|
1289
|
+
*/
|
|
1290
|
+
cosmwasm_path?: string;
|
|
1291
|
+
cosmwasm_version?: string;
|
|
1292
|
+
genesis?: Genesis;
|
|
1293
|
+
git_repo?: string;
|
|
1294
|
+
ibc_go_version?: string;
|
|
1295
|
+
/**
|
|
1296
|
+
* List of IBC apps (usually corresponding to a ICS standard) which have been enabled on the
|
|
1297
|
+
* network.
|
|
1298
|
+
*/
|
|
1299
|
+
ics_enabled?: ICSEnabled[];
|
|
1300
|
+
recommended_version?: string;
|
|
1301
|
+
versions?: Version[];
|
|
1302
|
+
}
|
|
1303
|
+
interface CodebaseBinaries {
|
|
1304
|
+
"darwin/amd64"?: string;
|
|
1305
|
+
"darwin/arm64"?: string;
|
|
1306
|
+
"linux/amd64"?: string;
|
|
1307
|
+
"linux/arm64"?: string;
|
|
1308
|
+
"windows/amd64"?: string;
|
|
1309
|
+
}
|
|
1310
|
+
interface CodebaseConsensus {
|
|
1311
|
+
type: ConsensusType;
|
|
1312
|
+
version?: string;
|
|
1313
|
+
}
|
|
1314
|
+
declare enum ConsensusType {
|
|
1315
|
+
Cometbft = "cometbft",
|
|
1316
|
+
Tendermint = "tendermint"
|
|
1317
|
+
}
|
|
1318
|
+
interface Genesis {
|
|
1319
|
+
genesis_url: string;
|
|
1320
|
+
name?: string;
|
|
1321
|
+
}
|
|
1322
|
+
/**
|
|
1323
|
+
* IBC app or ICS standard.
|
|
1324
|
+
*/
|
|
1325
|
+
declare enum ICSEnabled {
|
|
1326
|
+
Ics201 = "ics20-1",
|
|
1327
|
+
Ics271 = "ics27-1",
|
|
1328
|
+
Mauth = "mauth"
|
|
1329
|
+
}
|
|
1330
|
+
interface Version {
|
|
1331
|
+
binaries?: VersionBinaries;
|
|
1332
|
+
compatible_versions?: string[];
|
|
1333
|
+
consensus?: VersionConsensus;
|
|
1334
|
+
cosmos_sdk_version?: string;
|
|
1335
|
+
cosmwasm_enabled?: boolean;
|
|
1336
|
+
/**
|
|
1337
|
+
* Relative path to the cosmwasm directory. ex. $HOME/.juno/data/wasm
|
|
1338
|
+
*/
|
|
1339
|
+
cosmwasm_path?: string;
|
|
1340
|
+
cosmwasm_version?: string;
|
|
1341
|
+
/**
|
|
1342
|
+
* Block Height
|
|
1343
|
+
*/
|
|
1344
|
+
height?: number;
|
|
1345
|
+
ibc_go_version?: string;
|
|
1346
|
+
/**
|
|
1347
|
+
* List of IBC apps (usually corresponding to a ICS standard) which have been enabled on the
|
|
1348
|
+
* network.
|
|
1349
|
+
*/
|
|
1350
|
+
ics_enabled?: ICSEnabled[];
|
|
1351
|
+
/**
|
|
1352
|
+
* Official Upgrade Name
|
|
1353
|
+
*/
|
|
1354
|
+
name: string;
|
|
1355
|
+
/**
|
|
1356
|
+
* [Optional] Name of the following version
|
|
1357
|
+
*/
|
|
1358
|
+
next_version_name?: string;
|
|
1359
|
+
/**
|
|
1360
|
+
* Proposal that will officially signal community acceptance of the upgrade.
|
|
1361
|
+
*/
|
|
1362
|
+
proposal?: number;
|
|
1363
|
+
recommended_version?: string;
|
|
1364
|
+
/**
|
|
1365
|
+
* Git Upgrade Tag
|
|
1366
|
+
*/
|
|
1367
|
+
tag?: string;
|
|
1368
|
+
}
|
|
1369
|
+
interface VersionBinaries {
|
|
1370
|
+
"darwin/amd64"?: string;
|
|
1371
|
+
"darwin/arm64"?: string;
|
|
1372
|
+
"linux/amd64"?: string;
|
|
1373
|
+
"linux/arm64"?: string;
|
|
1374
|
+
"windows/amd64"?: string;
|
|
1375
|
+
}
|
|
1376
|
+
interface VersionConsensus {
|
|
1377
|
+
type: ConsensusType;
|
|
1378
|
+
version?: string;
|
|
1379
|
+
}
|
|
1380
|
+
interface Explorer {
|
|
1381
|
+
account_page?: string;
|
|
1382
|
+
kind?: string;
|
|
1383
|
+
tx_page?: string;
|
|
1384
|
+
url?: string;
|
|
1385
|
+
}
|
|
1386
|
+
declare enum ExtraCodec {
|
|
1387
|
+
Ethermint = "ethermint",
|
|
1388
|
+
Injective = "injective"
|
|
1389
|
+
}
|
|
1390
|
+
interface Fees {
|
|
1391
|
+
fee_tokens: FeeToken[];
|
|
1392
|
+
}
|
|
1393
|
+
interface FeeToken {
|
|
1394
|
+
average_gas_price?: number;
|
|
1395
|
+
denom: string;
|
|
1396
|
+
fixed_min_gas_price?: number;
|
|
1397
|
+
gas_costs?: GasCosts;
|
|
1398
|
+
high_gas_price?: number;
|
|
1399
|
+
low_gas_price?: number;
|
|
1400
|
+
}
|
|
1401
|
+
interface GasCosts {
|
|
1402
|
+
cosmos_send?: number;
|
|
1403
|
+
ibc_transfer?: number;
|
|
1404
|
+
}
|
|
1405
|
+
interface ChainImage {
|
|
1406
|
+
png?: string;
|
|
1407
|
+
svg?: string;
|
|
1408
|
+
theme?: Theme;
|
|
1409
|
+
}
|
|
1410
|
+
declare enum KeyAlgo {
|
|
1411
|
+
Ed25519 = "ed25519",
|
|
1412
|
+
Ethsecp256K1 = "ethsecp256k1",
|
|
1413
|
+
Secp256K1 = "secp256k1",
|
|
1414
|
+
Sr25519 = "sr25519"
|
|
1415
|
+
}
|
|
1416
|
+
interface ChainLogoURIs {
|
|
1417
|
+
png?: string;
|
|
1418
|
+
svg?: string;
|
|
1419
|
+
}
|
|
1420
|
+
declare enum NetworkType {
|
|
1421
|
+
Devnet = "devnet",
|
|
1422
|
+
Mainnet = "mainnet",
|
|
1423
|
+
Testnet = "testnet"
|
|
1424
|
+
}
|
|
1425
|
+
interface Peers {
|
|
1426
|
+
persistent_peers?: PersistentPeer[];
|
|
1427
|
+
seeds?: PersistentPeer[];
|
|
1428
|
+
}
|
|
1429
|
+
interface PersistentPeer {
|
|
1430
|
+
address: string;
|
|
1431
|
+
id: string;
|
|
1432
|
+
provider?: string;
|
|
1433
|
+
}
|
|
1434
|
+
interface Staking {
|
|
1435
|
+
lock_duration?: LockDuration;
|
|
1436
|
+
staking_tokens: StakingToken[];
|
|
1437
|
+
}
|
|
1438
|
+
interface LockDuration {
|
|
1439
|
+
/**
|
|
1440
|
+
* The number of blocks for which the staked tokens are locked.
|
|
1441
|
+
*/
|
|
1442
|
+
blocks?: number;
|
|
1443
|
+
/**
|
|
1444
|
+
* The approximate time for which the staked tokens are locked.
|
|
1445
|
+
*/
|
|
1446
|
+
time?: string;
|
|
1447
|
+
}
|
|
1448
|
+
interface StakingToken {
|
|
1449
|
+
denom: string;
|
|
1450
|
+
}
|
|
1451
|
+
declare enum Status {
|
|
1452
|
+
Killed = "killed",
|
|
1453
|
+
Live = "live",
|
|
1454
|
+
Upcoming = "upcoming"
|
|
1455
|
+
}
|
|
1456
|
+
interface IbcDataSchema {
|
|
1457
|
+
$schema?: string;
|
|
1458
|
+
chain_1: IbcDataSchemaChain;
|
|
1459
|
+
chain_2: IbcDataSchemaChain;
|
|
1460
|
+
channels: Channel[];
|
|
1461
|
+
}
|
|
1462
|
+
/**
|
|
1463
|
+
* Top level IBC data pertaining to the chain. `chain_1` and `chain_2` should be in
|
|
1464
|
+
* alphabetical order.
|
|
1465
|
+
*/
|
|
1466
|
+
interface IbcDataSchemaChain {
|
|
1467
|
+
chain_name: string;
|
|
1468
|
+
/**
|
|
1469
|
+
* The client ID on the corresponding chain representing the other chain's light client.
|
|
1470
|
+
*/
|
|
1471
|
+
client_id: string;
|
|
1472
|
+
/**
|
|
1473
|
+
* The connection ID on the corresponding chain representing a connection to the other chain.
|
|
1474
|
+
*/
|
|
1475
|
+
connection_id: string;
|
|
1476
|
+
}
|
|
1477
|
+
interface Channel {
|
|
1478
|
+
chain_1: ChannelChain;
|
|
1479
|
+
chain_2: ChannelChain;
|
|
1480
|
+
/**
|
|
1481
|
+
* Human readable description of the channel.
|
|
1482
|
+
*/
|
|
1483
|
+
description?: string;
|
|
1484
|
+
/**
|
|
1485
|
+
* Determines if packets from a sending module must be 'ordered' or 'unordered'.
|
|
1486
|
+
*/
|
|
1487
|
+
ordering: Ordering;
|
|
1488
|
+
/**
|
|
1489
|
+
* Human readable key:value pairs that help describe and distinguish channels.
|
|
1490
|
+
*/
|
|
1491
|
+
tags?: Tags;
|
|
1492
|
+
/**
|
|
1493
|
+
* IBC Version
|
|
1494
|
+
*/
|
|
1495
|
+
version: string;
|
|
1496
|
+
}
|
|
1497
|
+
interface ChannelChain {
|
|
1498
|
+
/**
|
|
1499
|
+
* The channel ID on the corresponding chain's connection representing a channel on the
|
|
1500
|
+
* other chain.
|
|
1501
|
+
*/
|
|
1502
|
+
channel_id: string;
|
|
1503
|
+
/**
|
|
1504
|
+
* The IBC port ID which a relevant module binds to on the corresponding chain.
|
|
1505
|
+
*/
|
|
1506
|
+
port_id: string;
|
|
1507
|
+
}
|
|
1508
|
+
/**
|
|
1509
|
+
* Determines if packets from a sending module must be 'ordered' or 'unordered'.
|
|
1510
|
+
*/
|
|
1511
|
+
declare enum Ordering {
|
|
1512
|
+
Ordered = "ordered",
|
|
1513
|
+
Unordered = "unordered"
|
|
1514
|
+
}
|
|
1515
|
+
/**
|
|
1516
|
+
* Human readable key:value pairs that help describe and distinguish channels.
|
|
1517
|
+
*/
|
|
1518
|
+
interface Tags {
|
|
1519
|
+
dex?: string;
|
|
1520
|
+
preferred?: boolean;
|
|
1521
|
+
/**
|
|
1522
|
+
* String that helps describe non-dex use cases ex: interchain accounts(ICA).
|
|
1523
|
+
*/
|
|
1524
|
+
properties?: string;
|
|
1525
|
+
status?: Status;
|
|
1526
|
+
[property: string]: any;
|
|
1527
|
+
}
|
|
1528
|
+
interface MemoKeysSchema {
|
|
1529
|
+
$schema?: string;
|
|
1530
|
+
memo_keys: MemoKey[];
|
|
1531
|
+
}
|
|
1532
|
+
interface MemoKey {
|
|
1533
|
+
description: string;
|
|
1534
|
+
git_repo: string;
|
|
1535
|
+
key: string;
|
|
1536
|
+
memo: Record<string, any>;
|
|
1537
|
+
[property: string]: any;
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
/**
|
|
1541
|
+
* Helper function to define chain.
|
|
1542
|
+
*
|
|
1543
|
+
* This function does not do anything special else than providing type safety
|
|
1544
|
+
* when defining chain information.
|
|
1545
|
+
*
|
|
1546
|
+
* @example
|
|
1547
|
+
* ```ts
|
|
1548
|
+
* import { defineAsset } from "graz";
|
|
1549
|
+
*
|
|
1550
|
+
* const atom = defineAsset({
|
|
1551
|
+
* base: "uatom",
|
|
1552
|
+
* display: "atom",
|
|
1553
|
+
* symbol: "ATOM",
|
|
1554
|
+
* ...
|
|
1555
|
+
* });
|
|
1556
|
+
* ```
|
|
1557
|
+
*/
|
|
1558
|
+
declare const defineAsset: <T extends Asset>(asset: T) => T;
|
|
1559
|
+
/**
|
|
1560
|
+
* Helper function to define chains asset list.
|
|
1561
|
+
*
|
|
1562
|
+
* This function does not do anything special else than providing type safety
|
|
1563
|
+
* when defining chain information.
|
|
1564
|
+
*
|
|
1565
|
+
* @example
|
|
1566
|
+
* ```ts
|
|
1567
|
+
* import { defineAssetList } from "graz";
|
|
1568
|
+
*
|
|
1569
|
+
* const assetlist = defineAssetList({
|
|
1570
|
+
* chain_name: "cosmoshub",
|
|
1571
|
+
* assets: [...]
|
|
1572
|
+
* });
|
|
1573
|
+
* ```
|
|
1574
|
+
*/
|
|
1575
|
+
declare const defineAssetList: <T extends AssetList>(assetlist: T) => T;
|
|
1576
|
+
/**
|
|
1577
|
+
* Helper function to define chain with registry compliant type.
|
|
1578
|
+
*
|
|
1579
|
+
* This function does not do anything special else than providing type safety
|
|
1580
|
+
* when defining chain information.
|
|
1581
|
+
*
|
|
1582
|
+
* @example
|
|
1583
|
+
* ```ts
|
|
1584
|
+
* import { defineRegistryChain } from "graz";
|
|
1585
|
+
*
|
|
1586
|
+
* const cosmoshub = defineRegistryChain({
|
|
1587
|
+
* chain_name: "cosmoshub",
|
|
1588
|
+
* chain_id: "cosmoshub-4",
|
|
1589
|
+
* ...
|
|
1590
|
+
* });
|
|
1591
|
+
* ```
|
|
1592
|
+
*/
|
|
1593
|
+
declare const defineRegistryChain: <T extends Chain>(chain: T) => T;
|
|
1594
|
+
|
|
1595
|
+
/**
|
|
1596
|
+
* Function to convert chain object from registry to Keplr's {@link ChainInfo} object.
|
|
1597
|
+
*
|
|
1598
|
+
* Note that every chain generated in `graz/chains` already has {@link ChainInfo}.
|
|
1599
|
+
* (e.g. `import chainInfo from "graz/chains/cosmoshub"`).
|
|
1600
|
+
*
|
|
1601
|
+
* @example
|
|
1602
|
+
* ```ts
|
|
1603
|
+
* import { registryToChainInfo } from "graz";
|
|
1604
|
+
*
|
|
1605
|
+
* import chain from "graz/chains/cosmoshub/chain";
|
|
1606
|
+
* import assetlist from "graz/chains/cosmoshub/assetlist";
|
|
1607
|
+
*
|
|
1608
|
+
* const chainInfo = registryToChainInfo({ chain, assetlist });
|
|
1609
|
+
* const chainInfoFromAsset = registryToChainInfo({ chain, assets: assetlist.assets });
|
|
1610
|
+
* ```
|
|
1611
|
+
*
|
|
1612
|
+
*/
|
|
1613
|
+
declare const registryToChainInfo: (args: RegistryToChainInfoArgs) => ChainInfo;
|
|
1614
|
+
type MapEndpointGetters<T extends string> = Record<`get${Capitalize<T>}Endpoint`, (chain: Chain) => string>;
|
|
1615
|
+
type RegistryToChainInfoArgs = Partial<MapEndpointGetters<"rpc" | "rest">> & ({
|
|
1616
|
+
chain: Chain;
|
|
1617
|
+
assetlists: AssetList[];
|
|
1618
|
+
} | {
|
|
1619
|
+
chain: Chain;
|
|
1620
|
+
assetlist: AssetList;
|
|
1621
|
+
} | {
|
|
1622
|
+
chain: Chain;
|
|
1623
|
+
assets: Asset[];
|
|
1624
|
+
});
|
|
1625
|
+
|
|
1626
|
+
export { AccountData, Api, Apis, Asset, AssetImage, AssetList, AssetLogoURIs, Bech32Config, Chain, ChainImage, ChainInfoWithPath, ChainLogoURIs, Channel, ChannelChain, Codebase, CodebaseBinaries, CodebaseConsensus, ConfigureGrazArgs, ConnectArgs, ConnectResult, Connector, ConsensusType, Counterparty, CreateClientArgs, CreateQueryClient, CreateSigningClientArgs, DenomUnit, Dictionary, ExecuteContractArgs, ExecuteContractMutationArgs, Explorer, ExtraCodec, FeeToken, Fees, GasCosts, Genesis, GetWalletConnectParams, GrazAdapter, GrazChain, GrazEvents, GrazProvider, GrazProviderProps, ICSEnabled, Ibc, IbcDataSchema, IbcDataSchemaChain, InstantiateContractArgs, InstantiateContractMutationArgs, KeyAlgo, LockDuration, Maybe, MemoKey, MemoKeysSchema, NetworkType, Ordering, Peers, PersistentPeer, ReconnectArgs, SendIbcTokensArgs, SendTokensArgs, Staking, StakingToken, Status, SuggestChainAndConnectArgs, Tags, Theme, Trace, TraceChain, TraceType, TypeAsset, UseAccountArgs, UseConnectChainArgs, UseExecuteContractArgs, UseInstantiateContractArgs, UseQueryClient, UseSuggestChainAndConnectArgs, UseSuggestChainArgs, Version, VersionBinaries, VersionConsensus, WALLET_TYPES, Wallet, WalletType, checkWallet, clearRecentChain, configureGraz, connect, createClients, createQueryClient, createSigningClients, defineAsset, defineAssetList, defineChain, defineChainInfo, defineChains, defineRegistryChain, disconnect, executeContract, getActiveChainCurrency, getAvailableWallets, getBalanceStaked, getBalances, getCosmostation, getKeplr, getLeap, getQueryRaw, getQuerySmart, getRecentChain, getWCCosmostation, getWCKeplr, getWCLeap, getWallet, getWalletConnect, instantiateContract, mainnetChains, mainnetChainsArray, reconnect, registryToChainInfo, sendIbcTokens, sendTokens, suggestChain, suggestChainAndConnect, testnetChains, testnetChainsArray, useAccount, useActiveChain, useActiveChainCurrency, useActiveChainValidators, useActiveWalletType, useBalance, useBalanceStaked, useBalances, useCheckWallet, useClients, useConnect, useDisconnect, useExecuteContract, useGrazEvents, useInstantiateContract, useOfflineSigners, useQueryClient, useQueryRaw, useQuerySmart, useRecentChain, useSendIbcTokens, useSendTokens, useSigners, useSigningClients, useSuggestChain, useSuggestChainAndConnect };
|