Skip to content

Commit

Permalink
change branch to main
Browse files Browse the repository at this point in the history
  • Loading branch information
ALPAC-4 committed Mar 27, 2024
1 parent caee683 commit a302d93
Show file tree
Hide file tree
Showing 8 changed files with 92 additions and 157 deletions.
2 changes: 1 addition & 1 deletion _package/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@initia/initia-registry-types",
"version": "0.0.9",
"version": "0.0.10",
"description": "The package provides TypeScript type definitions and Zod integration for initia-registry.",
"types": "./dist/types/index.d.ts",
"exports": {
Expand Down
8 changes: 4 additions & 4 deletions _package/src/zods/AssetList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,15 @@ export const AssetListSchema = z
.string()
.regex(
new RegExp(
"^https://raw\\.githubusercontent\\.com/initia-labs/initia-registry/main/(|testnets/|devnets/)[a-z0-9]+/images/.+\\.png$"
"^https://raw\\.githubusercontent\\.com/initia-labs/initia-registry/.+\\.png$"
)
)
.optional(),
svg: z
.string()
.regex(
new RegExp(
"^https://raw\\.githubusercontent\\.com/initia-labs/initia-registry/main/(|testnets/|devnets/)[a-z0-9]+/images/.+\\.svg$"
"^https://raw\\.githubusercontent\\.com/initia-labs/initia-registry/.+\\.svg$"
)
)
.optional(),
Expand Down Expand Up @@ -251,15 +251,15 @@ export const AssetListSchema = z
.string()
.regex(
new RegExp(
"^https://raw\\.githubusercontent\\.com/initia-labs/initia-registry/main/(|testnets/|devnets/)[a-z0-9]+/images/.+\\.png$"
"^https://raw\\.githubusercontent\\.com/initia-labs/initia-registry/.+\\.png$"
)
)
.optional(),
svg: z
.string()
.regex(
new RegExp(
"^https://raw\\.githubusercontent\\.com/initia-labs/initia-registry/main/(|testnets/|devnets/)[a-z0-9]+/images/.+\\.svg$"
"^https://raw\\.githubusercontent\\.com/initia-labs/initia-registry/.+\\.svg$"
)
)
.optional(),
Expand Down
149 changes: 43 additions & 106 deletions assetlist.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
"title": "Asset Lists",
"description": "Asset lists are a similar mechanism to allow frontends and other UIs to fetch metadata associated with Cosmos SDK denoms, especially for assets sent over IBC.",
"type": "object",
"required": [
"chain_name",
"assets"
],
"required": ["chain_name", "assets"],
"properties": {
"$schema": {
"type": "string",
Expand All @@ -28,13 +25,7 @@
"$defs": {
"asset": {
"type": "object",
"required": [
"denom_units",
"base",
"display",
"name",
"symbol"
],
"required": ["denom_units", "base", "display", "name", "symbol"],
"properties": {
"description": {
"type": "string",
Expand Down Expand Up @@ -95,11 +86,7 @@
"ibc": {
"type": "object",
"description": "[OPTIONAL] IBC Channel between src and dst between chain",
"required": [
"source_channel",
"dst_channel",
"source_denom"
],
"required": ["source_channel", "dst_channel", "source_denom"],
"properties": {
"source_channel": {
"type": "string"
Expand All @@ -119,12 +106,12 @@
"png": {
"type": "string",
"format": "uri-reference",
"pattern": "^https://raw\\.githubusercontent\\.com/initia-labs/initia-registry/mahalo-2/(|testnets/|devnets/)[a-z0-9]+/images/.+\\.png$"
"pattern": "^https://raw\\.githubusercontent\\.com/initia-labs/initia-registry/.+\\.png$"
},
"svg": {
"type": "string",
"format": "uri-reference",
"pattern": "^https://raw\\.githubusercontent\\.com/initia-labs/initia-registry/mahalo-2/(|testnets/|devnets/)[a-z0-9]+/images/.+\\.svg$"
"pattern": "^https://raw\\.githubusercontent\\.com/initia-labs/initia-registry/.+\\.svg$"
}
},
"additionalProperties": false
Expand All @@ -140,19 +127,19 @@
"png": {
"type": "string",
"format": "uri-reference",
"pattern": "^https://raw\\.githubusercontent\\.com/initia-labs/initia-registry/mahalo-2/(|testnets/|devnets/)[a-z0-9]+/images/.+\\.png$"
"pattern": "^https://raw\\.githubusercontent\\.com/initia-labs/initia-registry/.+\\.png$"
},
"svg": {
"type": "string",
"format": "uri-reference",
"pattern": "^https://raw\\.githubusercontent\\.com/initia-labs/initia-registry/mahalo-2/(|testnets/|devnets/)[a-z0-9]+/images/.+\\.svg$"
"pattern": "^https://raw\\.githubusercontent\\.com/initia-labs/initia-registry/.+\\.svg$"
},
"theme": {
"type": "object",
"properties": {
"primary_color_hex": {
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$"
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$"
},
"circle": {
"type": "boolean"
Expand Down Expand Up @@ -184,31 +171,20 @@
},
"additionalProperties": false,
"if": {
"required": [
"type_asset"
],
"required": ["type_asset"],
"properties": {
"type_asset": {
"enum": [
"erc20",
"cw20",
"snip20"
]
"enum": ["erc20", "cw20", "snip20"]
}
}
},
"then": {
"required": [
"address"
]
"required": ["address"]
}
},
"denom_unit": {
"type": "object",
"required": [
"denom",
"exponent"
],
"required": ["denom", "exponent"],
"properties": {
"denom": {
"type": "string"
Expand All @@ -229,9 +205,7 @@
"pointer": {
"type": "object",
"description": "The (primary) key used to identify an object within the Chain Registry.",
"required": [
"chain_name"
],
"required": ["chain_name"],
"properties": {
"chain_name": {
"type": "string",
Expand All @@ -246,48 +220,35 @@
},
"ibc_transition": {
"type": "object",
"required": [
"type",
"counterparty",
"chain"
],
"required": ["type", "counterparty", "chain"],
"properties": {
"type": {
"type": "string",
"enum": [
"ibc"
]
"enum": ["ibc"]
},
"counterparty": {
"type": "object",
"required": [
"chain_name",
"base_denom",
"channel_id"
],
"properties": {
"chain_name": {
"type": "string",
"description": "The name of the counterparty chain. (must match exactly the chain name used in the Chain Registry)"
},
"base_denom": {
"type": "string",
"description": "The base unit of the asset on its source platform. E.g., when describing ATOM from Cosmos Hub, specify 'uatom', NOT 'atom' nor 'ATOM'; base units are unique per platform."
},
"channel_id": {
"type": "string",
"pattern": "^channel-\\d+$",
"description": "The counterparty IBC transfer channel(, e.g., 'channel-1')."
}
"type": "object",
"required": ["chain_name", "base_denom", "channel_id"],
"properties": {
"chain_name": {
"type": "string",
"description": "The name of the counterparty chain. (must match exactly the chain name used in the Chain Registry)"
},
"additionalProperties": false
"base_denom": {
"type": "string",
"description": "The base unit of the asset on its source platform. E.g., when describing ATOM from Cosmos Hub, specify 'uatom', NOT 'atom' nor 'ATOM'; base units are unique per platform."
},
"channel_id": {
"type": "string",
"pattern": "^channel-\\d+$",
"description": "The counterparty IBC transfer channel(, e.g., 'channel-1')."
}
},
"additionalProperties": false
},
"chain": {
"type": "object",
"required": [
"channel_id",
"path"
],
"required": ["channel_id", "path"],
"properties": {
"channel_id": {
"type": "string",
Expand All @@ -296,7 +257,7 @@
},
"path": {
"type": "string",
"description": "The port/channel/denom input string that generates the 'ibc/...' denom."
"description": "The port/channel/denom input string that generates the 'ibc/...' denom."
}
},
"additionalProperties": false
Expand All @@ -306,26 +267,15 @@
},
"ibc_cw20_transition": {
"type": "object",
"required": [
"type",
"counterparty",
"chain"
],
"required": ["type", "counterparty", "chain"],
"properties": {
"type": {
"type": "string",
"enum": [
"ibc-cw20"
]
"enum": ["ibc-cw20"]
},
"counterparty": {
"type": "object",
"required": [
"chain_name",
"base_denom",
"port",
"channel_id"
],
"required": ["chain_name", "base_denom", "port", "channel_id"],
"properties": {
"chain_name": {
"type": "string",
Expand All @@ -349,11 +299,7 @@
},
"chain": {
"type": "object",
"required": [
"port",
"channel_id",
"path"
],
"required": ["port", "channel_id", "path"],
"properties": {
"port": {
"type": "string",
Expand All @@ -366,7 +312,7 @@
},
"path": {
"type": "string",
"description": "The port/channel/denom input string that generates the 'ibc/...' denom."
"description": "The port/channel/denom input string that generates the 'ibc/...' denom."
}
},
"additionalProperties": false
Expand All @@ -376,11 +322,7 @@
},
"non_ibc_transition": {
"type": "object",
"required": [
"type",
"counterparty",
"provider"
],
"required": ["type", "counterparty", "provider"],
"properties": {
"type": {
"type": "string",
Expand All @@ -395,10 +337,7 @@
},
"counterparty": {
"type": "object",
"required": [
"chain_name",
"base_denom"
],
"required": ["chain_name", "base_denom"],
"properties": {
"chain_name": {
"type": "string",
Expand All @@ -416,9 +355,7 @@
},
"chain": {
"type": "object",
"required": [
"contract"
],
"required": ["contract"],
"properties": {
"contract": {
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion chain.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@
},
"description": "[Optional] The list of denoms that are supported by the OPinit bridge."
},
"miniwasm_tx_threshold": {
"free_tx_threshold": {
"type": "array",
"items": {
"type": "object",
Expand Down
Loading

0 comments on commit a302d93

Please sign in to comment.