From 8d703e580b1a0602a1706d27a2d8e1dd1aa77f44 Mon Sep 17 00:00:00 2001 From: zramsay Date: Wed, 11 Jan 2023 12:21:31 -0500 Subject: [PATCH 1/9] src: sed s/CNS/Registry/g (error msgs) --- src/cmds/cns-cmds/account-cmds/get.ts | 6 +++--- src/cmds/cns-cmds/auction-cmds/bid-cmds/commit.ts | 6 +++--- src/cmds/cns-cmds/auction-cmds/bid-cmds/reveal.ts | 6 +++--- src/cmds/cns-cmds/auction-cmds/get.ts | 6 +++--- src/cmds/cns-cmds/authority-cmds/bond-cmds/set.ts | 6 +++--- src/cmds/cns-cmds/authority-cmds/reserve.ts | 6 +++--- src/cmds/cns-cmds/authority-cmds/whois.ts | 6 +++--- src/cmds/cns-cmds/bond-cmds/associate.ts | 6 +++--- src/cmds/cns-cmds/bond-cmds/cancel.ts | 6 +++--- src/cmds/cns-cmds/bond-cmds/create.ts | 6 +++--- src/cmds/cns-cmds/bond-cmds/dissociate.ts | 6 +++--- src/cmds/cns-cmds/bond-cmds/get.ts | 6 +++--- src/cmds/cns-cmds/bond-cmds/list.ts | 6 +++--- src/cmds/cns-cmds/bond-cmds/records-cmds/dissociate.ts | 6 +++--- src/cmds/cns-cmds/bond-cmds/records-cmds/reassociate.ts | 6 +++--- src/cmds/cns-cmds/bond-cmds/refill.ts | 6 +++--- src/cmds/cns-cmds/bond-cmds/withdraw.ts | 6 +++--- src/cmds/cns-cmds/name-cmds/delete.ts | 6 +++--- src/cmds/cns-cmds/name-cmds/lookup.ts | 6 +++--- src/cmds/cns-cmds/name-cmds/resolve.ts | 6 +++--- src/cmds/cns-cmds/name-cmds/set.ts | 6 +++--- src/cmds/cns-cmds/record-cmds/get.ts | 6 +++--- src/cmds/cns-cmds/record-cmds/list.ts | 6 +++--- src/cmds/cns-cmds/record-cmds/publish.ts | 6 +++--- src/cmds/cns-cmds/status.ts | 8 ++++---- src/cmds/cns-cmds/tokens-cmds/send.ts | 6 +++--- src/cmds/cns.ts | 2 +- 27 files changed, 80 insertions(+), 80 deletions(-) diff --git a/src/cmds/cns-cmds/account-cmds/get.ts b/src/cmds/cns-cmds/account-cmds/get.ts index da3486d..10b0214 100644 --- a/src/cmds/cns-cmds/account-cmds/get.ts +++ b/src/cmds/cns-cmds/account-cmds/get.ts @@ -13,9 +13,9 @@ export const handler = async (argv: Arguments) => { const { services: { cns: cnsConfig } } = getConfig(argv.config as string) const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); - assert(restEndpoint, 'Invalid CNS REST endpoint.'); - assert(gqlEndpoint, 'Invalid CNS GQL endpoint.'); - assert(chainId, 'Invalid CNS Chain ID.'); + assert(restEndpoint, 'Invalid Registry REST endpoint.'); + assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); + assert(chainId, 'Invalid Registry Chain ID.'); if (!address && privateKey) { address = new Account(Buffer.from(privateKey, 'hex')).getCosmosAddress(); diff --git a/src/cmds/cns-cmds/auction-cmds/bid-cmds/commit.ts b/src/cmds/cns-cmds/auction-cmds/bid-cmds/commit.ts index a9c6527..94f8fb5 100644 --- a/src/cmds/cns-cmds/auction-cmds/bid-cmds/commit.ts +++ b/src/cmds/cns-cmds/auction-cmds/bid-cmds/commit.ts @@ -23,10 +23,10 @@ export const handler = async (argv: Arguments) => { const { services: { cns: cnsConfig } } = getConfig(argv.config as string) const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); - assert(restEndpoint, 'Invalid CNS REST endpoint.'); - assert(gqlEndpoint, 'Invalid CNS GQL endpoint.'); + assert(restEndpoint, 'Invalid Registry REST endpoint.'); + assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); - assert(chainId, 'Invalid CNS Chain ID.'); + assert(chainId, 'Invalid Registry Chain ID.'); const account = new Account(Buffer.from(privateKey, 'hex')); const bidderAddress = account.formattedCosmosAddress; diff --git a/src/cmds/cns-cmds/auction-cmds/bid-cmds/reveal.ts b/src/cmds/cns-cmds/auction-cmds/bid-cmds/reveal.ts index f7290d9..796ff49 100644 --- a/src/cmds/cns-cmds/auction-cmds/bid-cmds/reveal.ts +++ b/src/cmds/cns-cmds/auction-cmds/bid-cmds/reveal.ts @@ -18,10 +18,10 @@ export const handler = async (argv: Arguments) => { const { services: { cns: cnsConfig } } = getConfig(argv.config as string) const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); - assert(restEndpoint, 'Invalid CNS REST endpoint.'); - assert(gqlEndpoint, 'Invalid CNS GQL endpoint.'); + assert(restEndpoint, 'Invalid Registry REST endpoint.'); + assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); - assert(chainId, 'Invalid CNS Chain ID.'); + assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); const fee = getGasAndFees(argv, cnsConfig); diff --git a/src/cmds/cns-cmds/auction-cmds/get.ts b/src/cmds/cns-cmds/auction-cmds/get.ts index 00f3bc9..c859a49 100644 --- a/src/cmds/cns-cmds/auction-cmds/get.ts +++ b/src/cmds/cns-cmds/auction-cmds/get.ts @@ -14,9 +14,9 @@ export const handler = async (argv: Arguments) => { const { services: { cns: cnsConfig } } = getConfig(config as string) const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig); - assert(restEndpoint, 'Invalid CNS REST endpoint.'); - assert(gqlEndpoint, 'Invalid CNS GQL endpoint.'); - assert(chainId, 'Invalid CNS Chain ID.'); + assert(restEndpoint, 'Invalid Registry REST endpoint.'); + assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); + assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); const result = await registry.getAuctionsByIds([id as string]); diff --git a/src/cmds/cns-cmds/authority-cmds/bond-cmds/set.ts b/src/cmds/cns-cmds/authority-cmds/bond-cmds/set.ts index 2bf39cd..6a97b51 100644 --- a/src/cmds/cns-cmds/authority-cmds/bond-cmds/set.ts +++ b/src/cmds/cns-cmds/authority-cmds/bond-cmds/set.ts @@ -16,10 +16,10 @@ export const handler = async (argv: Arguments) => { const { services: { cns: cnsConfig } } = getConfig(argv.config as string) const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); - assert(restEndpoint, 'Invalid CNS REST endpoint.'); - assert(gqlEndpoint, 'Invalid CNS GQL endpoint.'); + assert(restEndpoint, 'Invalid Registry REST endpoint.'); + assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); - assert(chainId, 'Invalid CNS Chain ID.'); + assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); const fee = getGasAndFees(argv, cnsConfig); diff --git a/src/cmds/cns-cmds/authority-cmds/reserve.ts b/src/cmds/cns-cmds/authority-cmds/reserve.ts index 7bedf23..02988b6 100644 --- a/src/cmds/cns-cmds/authority-cmds/reserve.ts +++ b/src/cmds/cns-cmds/authority-cmds/reserve.ts @@ -22,10 +22,10 @@ export const handler = async (argv: Arguments) => { const { services: { cns: cnsConfig } } = getConfig(argv.config as string) const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); - assert(restEndpoint, 'Invalid CNS REST endpoint.'); - assert(gqlEndpoint, 'Invalid CNS GQL endpoint.'); + assert(restEndpoint, 'Invalid Registry REST endpoint.'); + assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); - assert(chainId, 'Invalid CNS Chain ID.'); + assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); const fee = getGasAndFees(argv, cnsConfig); diff --git a/src/cmds/cns-cmds/authority-cmds/whois.ts b/src/cmds/cns-cmds/authority-cmds/whois.ts index 118f24c..90dfb1f 100644 --- a/src/cmds/cns-cmds/authority-cmds/whois.ts +++ b/src/cmds/cns-cmds/authority-cmds/whois.ts @@ -14,9 +14,9 @@ export const handler = async (argv: Arguments) => { const { services: { cns: cnsConfig } } = getConfig(argv.config as string) const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig); - assert(restEndpoint, 'Invalid CNS REST endpoint.'); - assert(gqlEndpoint, 'Invalid CNS GQL endpoint.'); - assert(chainId, 'Invalid CNS Chain ID.'); + assert(restEndpoint, 'Invalid Registry REST endpoint.'); + assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); + assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); const result = await registry.lookupAuthorities([name], true); diff --git a/src/cmds/cns-cmds/bond-cmds/associate.ts b/src/cmds/cns-cmds/bond-cmds/associate.ts index 5f20a2f..75dd289 100644 --- a/src/cmds/cns-cmds/bond-cmds/associate.ts +++ b/src/cmds/cns-cmds/bond-cmds/associate.ts @@ -22,10 +22,10 @@ export const handler = async (argv: Arguments) => { const { services: { cns: cnsConfig } } = getConfig(argv.config as string) const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); - assert(restEndpoint, 'Invalid CNS REST endpoint.'); - assert(gqlEndpoint, 'Invalid CNS GQL endpoint.'); + assert(restEndpoint, 'Invalid Registry REST endpoint.'); + assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); - assert(chainId, 'Invalid CNS Chain ID.'); + assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); const fee = getGasAndFees(argv, cnsConfig); diff --git a/src/cmds/cns-cmds/bond-cmds/cancel.ts b/src/cmds/cns-cmds/bond-cmds/cancel.ts index dda59ef..8b520df 100644 --- a/src/cmds/cns-cmds/bond-cmds/cancel.ts +++ b/src/cmds/cns-cmds/bond-cmds/cancel.ts @@ -14,10 +14,10 @@ export const handler = async (argv: Arguments) => { const { services: { cns: cnsConfig } } = getConfig(argv.config as string) const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); - assert(restEndpoint, 'Invalid CNS REST endpoint.'); - assert(gqlEndpoint, 'Invalid CNS GQL endpoint.'); + assert(restEndpoint, 'Invalid Registry REST endpoint.'); + assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); - assert(chainId, 'Invalid CNS Chain ID.'); + assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); const fee = getGasAndFees(argv, cnsConfig); diff --git a/src/cmds/cns-cmds/bond-cmds/create.ts b/src/cmds/cns-cmds/bond-cmds/create.ts index 8479446..de99f60 100644 --- a/src/cmds/cns-cmds/bond-cmds/create.ts +++ b/src/cmds/cns-cmds/bond-cmds/create.ts @@ -27,10 +27,10 @@ export const handler = async (argv: Arguments) => { const { services: { cns: cnsConfig } } = getConfig(config as string) const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); - assert(restEndpoint, 'Invalid CNS REST endpoint.'); - assert(gqlEndpoint, 'Invalid CNS GQL endpoint.'); + assert(restEndpoint, 'Invalid Registry REST endpoint.'); + assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); - assert(chainId, 'Invalid CNS Chain ID.'); + assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); const fee = getGasAndFees(argv, cnsConfig); diff --git a/src/cmds/cns-cmds/bond-cmds/dissociate.ts b/src/cmds/cns-cmds/bond-cmds/dissociate.ts index 76d9185..7e0b475 100644 --- a/src/cmds/cns-cmds/bond-cmds/dissociate.ts +++ b/src/cmds/cns-cmds/bond-cmds/dissociate.ts @@ -14,10 +14,10 @@ export const handler = async (argv: Arguments) => { const { services: { cns: cnsConfig } } = getConfig(argv.config as string) const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); - assert(restEndpoint, 'Invalid CNS REST endpoint.'); - assert(gqlEndpoint, 'Invalid CNS GQL endpoint.'); + assert(restEndpoint, 'Invalid Registry REST endpoint.'); + assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); - assert(chainId, 'Invalid CNS Chain ID.'); + assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); const fee = getGasAndFees(argv, cnsConfig); diff --git a/src/cmds/cns-cmds/bond-cmds/get.ts b/src/cmds/cns-cmds/bond-cmds/get.ts index ad2af5c..9cb83a5 100644 --- a/src/cmds/cns-cmds/bond-cmds/get.ts +++ b/src/cmds/cns-cmds/bond-cmds/get.ts @@ -14,9 +14,9 @@ export const handler = async (argv: Arguments) => { const { services: { cns: cnsConfig } } = getConfig(config as string) const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig); - assert(restEndpoint, 'Invalid CNS REST endpoint.'); - assert(gqlEndpoint, 'Invalid CNS GQL endpoint.'); - assert(chainId, 'Invalid CNS Chain ID.'); + assert(restEndpoint, 'Invalid Registry REST endpoint.'); + assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); + assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); diff --git a/src/cmds/cns-cmds/bond-cmds/list.ts b/src/cmds/cns-cmds/bond-cmds/list.ts index 965fa79..beff4cc 100644 --- a/src/cmds/cns-cmds/bond-cmds/list.ts +++ b/src/cmds/cns-cmds/bond-cmds/list.ts @@ -17,9 +17,9 @@ export const builder = { export const handler = async (argv: Arguments) => { const { services: { cns: cnsConfig } } = getConfig(argv.config as string) const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig); - assert(restEndpoint, 'Invalid CNS REST endpoint.'); - assert(gqlEndpoint, 'Invalid CNS GQL endpoint.'); - assert(chainId, 'Invalid CNS Chain ID.'); + assert(restEndpoint, 'Invalid Registry REST endpoint.'); + assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); + assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); diff --git a/src/cmds/cns-cmds/bond-cmds/records-cmds/dissociate.ts b/src/cmds/cns-cmds/bond-cmds/records-cmds/dissociate.ts index 136e4d4..341f365 100644 --- a/src/cmds/cns-cmds/bond-cmds/records-cmds/dissociate.ts +++ b/src/cmds/cns-cmds/bond-cmds/records-cmds/dissociate.ts @@ -20,10 +20,10 @@ export const handler = async (argv: Arguments) => { const { services: { cns: cnsConfig } } = getConfig(argv.config as string) const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); - assert(restEndpoint, 'Invalid CNS REST endpoint.'); - assert(gqlEndpoint, 'Invalid CNS GQL endpoint.'); + assert(restEndpoint, 'Invalid Registry REST endpoint.'); + assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); - assert(chainId, 'Invalid CNS Chain ID.'); + assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); const fee = getGasAndFees(argv, cnsConfig); diff --git a/src/cmds/cns-cmds/bond-cmds/records-cmds/reassociate.ts b/src/cmds/cns-cmds/bond-cmds/records-cmds/reassociate.ts index 4e909e1..1fe897c 100644 --- a/src/cmds/cns-cmds/bond-cmds/records-cmds/reassociate.ts +++ b/src/cmds/cns-cmds/bond-cmds/records-cmds/reassociate.ts @@ -25,10 +25,10 @@ export const handler = async (argv: Arguments) => { const { services: { cns: cnsConfig } } = getConfig(argv.config as string) const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); - assert(restEndpoint, 'Invalid CNS REST endpoint.'); - assert(gqlEndpoint, 'Invalid CNS GQL endpoint.'); + assert(restEndpoint, 'Invalid Registry REST endpoint.'); + assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); - assert(chainId, 'Invalid CNS Chain ID.'); + assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); const fee = getGasAndFees(argv, cnsConfig); diff --git a/src/cmds/cns-cmds/bond-cmds/refill.ts b/src/cmds/cns-cmds/bond-cmds/refill.ts index 0a23269..e8f4827 100644 --- a/src/cmds/cns-cmds/bond-cmds/refill.ts +++ b/src/cmds/cns-cmds/bond-cmds/refill.ts @@ -28,10 +28,10 @@ export const handler = async (argv: Arguments) => { const { services: { cns: cnsConfig } } = getConfig(argv.config as string) const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); - assert(restEndpoint, 'Invalid CNS REST endpoint.'); - assert(gqlEndpoint, 'Invalid CNS GQL endpoint.'); + assert(restEndpoint, 'Invalid Registry REST endpoint.'); + assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); - assert(chainId, 'Invalid CNS Chain ID.'); + assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); const fee = getGasAndFees(argv, cnsConfig); diff --git a/src/cmds/cns-cmds/bond-cmds/withdraw.ts b/src/cmds/cns-cmds/bond-cmds/withdraw.ts index 1060e23..cc46a5c 100644 --- a/src/cmds/cns-cmds/bond-cmds/withdraw.ts +++ b/src/cmds/cns-cmds/bond-cmds/withdraw.ts @@ -28,10 +28,10 @@ export const handler = async (argv: Arguments) => { const { services: { cns: cnsConfig } } = getConfig(argv.config as string) const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); - assert(restEndpoint, 'Invalid CNS REST endpoint.'); - assert(gqlEndpoint, 'Invalid CNS GQL endpoint.'); + assert(restEndpoint, 'Invalid Registry REST endpoint.'); + assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); - assert(chainId, 'Invalid CNS Chain ID.'); + assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); const fee = getGasAndFees(argv, cnsConfig); diff --git a/src/cmds/cns-cmds/name-cmds/delete.ts b/src/cmds/cns-cmds/name-cmds/delete.ts index 32ff8f9..e099def 100644 --- a/src/cmds/cns-cmds/name-cmds/delete.ts +++ b/src/cmds/cns-cmds/name-cmds/delete.ts @@ -14,10 +14,10 @@ export const handler = async (argv: Arguments) => { const { services: { cns: cnsConfig } } = getConfig(argv.config as string) const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); - assert(restEndpoint, 'Invalid CNS REST endpoint.'); - assert(gqlEndpoint, 'Invalid CNS GQL endpoint.'); + assert(restEndpoint, 'Invalid Registry REST endpoint.'); + assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); - assert(chainId, 'Invalid CNS Chain ID.'); + assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); const fee = getGasAndFees(argv, cnsConfig); diff --git a/src/cmds/cns-cmds/name-cmds/lookup.ts b/src/cmds/cns-cmds/name-cmds/lookup.ts index 492f760..edbcbd1 100644 --- a/src/cmds/cns-cmds/name-cmds/lookup.ts +++ b/src/cmds/cns-cmds/name-cmds/lookup.ts @@ -20,9 +20,9 @@ export const handler = async (argv: Arguments) => { const { services: { cns: cnsConfig } } = getConfig(argv.config as string) const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig); - assert(restEndpoint, 'Invalid CNS REST endpoint.'); - assert(gqlEndpoint, 'Invalid CNS GQL endpoint.'); - assert(chainId, 'Invalid CNS Chain ID.'); + assert(restEndpoint, 'Invalid Registry REST endpoint.'); + assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); + assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); const result = await registry.lookupNames([name], argv.history as boolean); diff --git a/src/cmds/cns-cmds/name-cmds/resolve.ts b/src/cmds/cns-cmds/name-cmds/resolve.ts index c6b651c..10b1d4d 100644 --- a/src/cmds/cns-cmds/name-cmds/resolve.ts +++ b/src/cmds/cns-cmds/name-cmds/resolve.ts @@ -14,9 +14,9 @@ export const handler = async (argv: Arguments) => { const { services: { cns: cnsConfig } } = getConfig(argv.config as string) const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig); - assert(restEndpoint, 'Invalid CNS REST endpoint.'); - assert(gqlEndpoint, 'Invalid CNS GQL endpoint.'); - assert(chainId, 'Invalid CNS Chain ID.'); + assert(restEndpoint, 'Invalid Registry REST endpoint.'); + assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); + assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); diff --git a/src/cmds/cns-cmds/name-cmds/set.ts b/src/cmds/cns-cmds/name-cmds/set.ts index addb989..8f76dc4 100644 --- a/src/cmds/cns-cmds/name-cmds/set.ts +++ b/src/cmds/cns-cmds/name-cmds/set.ts @@ -16,10 +16,10 @@ export const handler = async (argv: Arguments) => { const { services: { cns: cnsConfig } } = getConfig(argv.config as string) const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); - assert(restEndpoint, 'Invalid CNS REST endpoint.'); - assert(gqlEndpoint, 'Invalid CNS GQL endpoint.'); + assert(restEndpoint, 'Invalid Registry REST endpoint.'); + assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); - assert(chainId, 'Invalid CNS Chain ID.'); + assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); const fee = getGasAndFees(argv, cnsConfig); diff --git a/src/cmds/cns-cmds/record-cmds/get.ts b/src/cmds/cns-cmds/record-cmds/get.ts index 9d0fc81..7a9cd0a 100644 --- a/src/cmds/cns-cmds/record-cmds/get.ts +++ b/src/cmds/cns-cmds/record-cmds/get.ts @@ -14,9 +14,9 @@ export const handler = async (argv: Arguments) => { const { services: { cns: cnsConfig } } = getConfig(config as string) const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig); - assert(restEndpoint, 'Invalid CNS REST endpoint.'); - assert(gqlEndpoint, 'Invalid CNS GQL endpoint.'); - assert(chainId, 'Invalid CNS Chain ID.'); + assert(restEndpoint, 'Invalid Registry REST endpoint.'); + assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); + assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); const result = await registry.getRecordsByIds([id as string]); diff --git a/src/cmds/cns-cmds/record-cmds/list.ts b/src/cmds/cns-cmds/record-cmds/list.ts index d29ea02..a8731e7 100644 --- a/src/cmds/cns-cmds/record-cmds/list.ts +++ b/src/cmds/cns-cmds/record-cmds/list.ts @@ -29,9 +29,9 @@ export const handler = async (argv: Arguments) => { const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig); const { type, name, bondId, all } = argv; - assert(restEndpoint, 'Invalid CNS REST endpoint.'); - assert(gqlEndpoint, 'Invalid CNS GQL endpoint.'); - assert(chainId, 'Invalid CNS Chain ID.'); + assert(restEndpoint, 'Invalid Registry REST endpoint.'); + assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); + assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); diff --git a/src/cmds/cns-cmds/record-cmds/publish.ts b/src/cmds/cns-cmds/record-cmds/publish.ts index 8944bc8..deb03a4 100644 --- a/src/cmds/cns-cmds/record-cmds/publish.ts +++ b/src/cmds/cns-cmds/record-cmds/publish.ts @@ -22,11 +22,11 @@ export const handler = async (argv: Arguments) => { const { services: { cns: cnsConfig } } = getConfig(config as string) const { restEndpoint, gqlEndpoint, userKey, bondId, chainId } = getConnectionInfo(argv, cnsConfig); - assert(restEndpoint, 'Invalid CNS REST endpoint.'); - assert(gqlEndpoint, 'Invalid CNS GQL endpoint.'); + assert(restEndpoint, 'Invalid Registry REST endpoint.'); + assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(userKey, 'Invalid User Key.'); assert(bondId, 'Invalid Bond ID.'); - assert(chainId, 'Invalid CNS Chain ID.'); + assert(chainId, 'Invalid Registry Chain ID.'); let file = null; if (filename) { diff --git a/src/cmds/cns-cmds/status.ts b/src/cmds/cns-cmds/status.ts index 80d7640..c22a565 100644 --- a/src/cmds/cns-cmds/status.ts +++ b/src/cmds/cns-cmds/status.ts @@ -6,14 +6,14 @@ import { getConfig, getConnectionInfo } from '../../util'; export const command = 'status'; -export const desc = 'Get CNS status.'; +export const desc = 'Get Registry status.'; export const handler = async (argv: Arguments) => { const { services: { cns } } = getConfig(argv.config as string) const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cns); - assert(restEndpoint, 'Invalid CNS REST endpoint.'); - assert(gqlEndpoint, 'Invalid CNS GQL endpoint.'); - assert(chainId, 'Invalid CNS Chain ID.'); + assert(restEndpoint, 'Invalid Registry REST endpoint.'); + assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); + assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); diff --git a/src/cmds/cns-cmds/tokens-cmds/send.ts b/src/cmds/cns-cmds/tokens-cmds/send.ts index 1262d41..c19f293 100644 --- a/src/cmds/cns-cmds/tokens-cmds/send.ts +++ b/src/cmds/cns-cmds/tokens-cmds/send.ts @@ -28,10 +28,10 @@ export const handler = async (argv: Arguments) => { const { services: { cns: cnsConfig } } = getConfig(argv.config as string) const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); - assert(restEndpoint, 'Invalid CNS REST endpoint.'); - assert(gqlEndpoint, 'Invalid CNS GQL endpoint.'); + assert(restEndpoint, 'Invalid Registry REST endpoint.'); + assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); - assert(chainId, 'Invalid CNS Chain ID.'); + assert(chainId, 'Invalid Registry Chain ID.'); const account = new Account(Buffer.from(privateKey, 'hex')); const fromAddress = account.formattedCosmosAddress; diff --git a/src/cmds/cns.ts b/src/cmds/cns.ts index 3255ad0..5548242 100644 --- a/src/cmds/cns.ts +++ b/src/cmds/cns.ts @@ -2,7 +2,7 @@ import yargs from 'yargs'; export const command = 'cns'; -export const desc = 'CNS tools'; +export const desc = 'Laconic Registry Tools'; exports.builder = (yargs: yargs.Argv) => { return yargs -- 2.45.2 From 312bdb6b392fd02fd92cb5fc259bcac3c4ff5cf7 Mon Sep 17 00:00:00 2001 From: zramsay Date: Wed, 11 Jan 2023 12:29:03 -0500 Subject: [PATCH 2/9] sed s/crn/lrn/g --- README.md | 10 +++++----- src/cmds/cns-cmds/name-cmds/delete.ts | 5 +++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d769c5c..303478e 100644 --- a/README.md +++ b/README.md @@ -324,13 +324,13 @@ $ laconic cns authority reserve kube.laconic --owner ethm1vc62ysqu504at932jjq8pw Set name: ```bash -$ laconic cns name set crn://laconic/watcher/erc20 bafyreic3auqajvgszh3vfjsouew2rsctswukc346dmlf273ln4g6iyyhba +$ laconic cns name set lrn://laconic/watcher/erc20 bafyreic3auqajvgszh3vfjsouew2rsctswukc346dmlf273ln4g6iyyhba ``` Lookup name information: ```bash -$ laconic cns name lookup crn://laconic/watcher/erc20 +$ laconic cns name lookup lrn://laconic/watcher/erc20 [ { "latest": { @@ -344,7 +344,7 @@ $ laconic cns name lookup crn://laconic/watcher/erc20 Resolve name: ```bash -$ laconic cns name resolve crn://laconic/watcher/erc20 +$ laconic cns name resolve lrn://laconic/watcher/erc20 [ { "id": "bafyreic3auqajvgszh3vfjsouew2rsctswukc346dmlf273ln4g6iyyhba", @@ -385,9 +385,9 @@ $ laconic cns name resolve crn://laconic/watcher/erc20 Delete name: ```bash -$ laconic cns name delete crn://laconic/watcher/erc20 +$ laconic cns name delete lrn://laconic/watcher/erc20 -$ laconic cns name resolve crn://laconic/watcher/erc20 +$ laconic cns name resolve lrn://laconic/watcher/erc20 [ null ] diff --git a/src/cmds/cns-cmds/name-cmds/delete.ts b/src/cmds/cns-cmds/name-cmds/delete.ts index e099def..d033af6 100644 --- a/src/cmds/cns-cmds/name-cmds/delete.ts +++ b/src/cmds/cns-cmds/name-cmds/delete.ts @@ -20,8 +20,13 @@ export const handler = async (argv: Arguments) => { assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); +<<<<<<< HEAD const fee = getGasAndFees(argv, cnsConfig); const result = await registry.deleteName({ crn: name }, privateKey, fee); +======= + const fee = getGasAndFees(argv, registryConfig); + const result = await registry.deleteName({ lrn: name }, privateKey, fee); +>>>>>>> 10b20d7 (sed s/crn/lrn/g) console.log(JSON.stringify(result, undefined, 2)); } -- 2.45.2 From 8795f43979172efcfb163c737d1ea70c4990ab1e Mon Sep 17 00:00:00 2001 From: zramsay Date: Wed, 11 Jan 2023 12:31:06 -0500 Subject: [PATCH 3/9] sed s/cns/registry/g --- README.md | 64 +++++++++++++++++++++++----------------------- config.example.yml | 2 +- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 303478e..833fd68 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# laconic-cns-client +# laconic-registry-client CLI utility written in TS, used to interact with laconicd. Depends on [laconic-sdk](https://github.com/cerc-io/laconic-sdk). @@ -30,7 +30,7 @@ The `gas` and `fees` can be set to some default values in the config, and can be Example: ```bash -$ laconic cns bond create --type aphoton --quantity 1000000000 --gas 200000 --fees 200000aphoton +$ laconic registry bond create --type aphoton --quantity 1000000000 --gas 200000 --fees 200000aphoton ``` ## Operations @@ -40,7 +40,7 @@ These commands require a `config.yml` file present in the current working direct Get node status: ```bash -$ laconic cns status +$ laconic registry status { "version": "0.3.0", "node": { @@ -74,7 +74,7 @@ $ laconic cns status Get account details: ```bash -$ laconic cns account get --address ethm133y09mveksh76uc99h4rl38nd033tk4e3y2z52 +$ laconic registry account get --address ethm133y09mveksh76uc99h4rl38nd033tk4e3y2z52 [ { "address": "ethm133y09mveksh76uc99h4rl38nd033tk4e3y2z52", @@ -94,7 +94,7 @@ $ laconic cns account get --address ethm133y09mveksh76uc99h4rl38nd033tk4e3y2z52 Send tokens: ```bash -$ laconic cns tokens send --address ethm1vc62ysqu504at932jjq8pwrqgjt67rx6ggn5yu --type aphoton --quantity 1000000000 +$ laconic registry tokens send --address ethm1vc62ysqu504at932jjq8pwrqgjt67rx6ggn5yu --type aphoton --quantity 1000000000 [ { "address": "ethm1lfekr7gvqtnhpp2kwdc6u2n569cqsp4ww0m4y8", @@ -147,7 +147,7 @@ record: Publish record (see below for commands to create/query bonds): ```bash -$ laconic cns record publish --filename watcher.yml --bond-id 58508984500aa2ed18e059fa8203b40fbc9828e3bfa195361335c4e4524c4785 +$ laconic registry record publish --filename watcher.yml --bond-id 58508984500aa2ed18e059fa8203b40fbc9828e3bfa195361335c4e4524c4785 { id: 'bafyreic3auqajvgszh3vfjsouew2rsctswukc346dmlf273ln4g6iyyhba' } ``` @@ -155,7 +155,7 @@ $ laconic cns record publish --filename watcher.yml --bond-id 58508984500aa2ed18 Get record: ```bash -$ laconic cns record get --id bafyreic3auqajvgszh3vfjsouew2rsctswukc346dmlf273ln4g6iyyhba +$ laconic registry record get --id bafyreic3auqajvgszh3vfjsouew2rsctswukc346dmlf273ln4g6iyyhba [ { "id": "bafyreic3auqajvgszh3vfjsouew2rsctswukc346dmlf273ln4g6iyyhba", @@ -196,19 +196,19 @@ $ laconic cns record get --id bafyreic3auqajvgszh3vfjsouew2rsctswukc346dmlf273ln List records: ```bash -$ laconic cns record list +$ laconic registry record list ``` Reserve authority: ```bash -$ laconic cns authority reserve laconic +$ laconic registry authority reserve laconic ``` Check authority information: ```bash -$ laconic cns authority whois laconic +$ laconic registry authority whois laconic [ { "ownerAddress": "", @@ -254,7 +254,7 @@ $ laconic cns authority whois laconic Get authority auction info: ```bash -$ laconic cns auction get 0294fb2e3659c347b53a6faf4bef041fd934f0f3ab13df6d2468d5d63abacd48 +$ laconic registry auction get 0294fb2e3659c347b53a6faf4bef041fd934f0f3ab13df6d2468d5d63abacd48 [ { "id": "0294fb2e3659c347b53a6faf4bef041fd934f0f3ab13df6d2468d5d63abacd48", @@ -292,7 +292,7 @@ $ laconic cns auction get 0294fb2e3659c347b53a6faf4bef041fd934f0f3ab13df6d2468d5 Commit an auction bid: ```bash -$ laconic cns auction bid commit 0294fb2e3659c347b53a6faf4bef041fd934f0f3ab13df6d2468d5d63abacd48 25000000 aphoton +$ laconic registry auction bid commit 0294fb2e3659c347b53a6faf4bef041fd934f0f3ab13df6d2468d5d63abacd48 25000000 aphoton Reveal file: ./out/bafyreiay2rccax64yn4ljhvzvm3jkbebvzheyucuma5jlbpzpzd5i5gjuy.json ``` @@ -300,37 +300,37 @@ Reveal file: ./out/bafyreiay2rccax64yn4ljhvzvm3jkbebvzheyucuma5jlbpzpzd5i5gjuy.j Reveal an auction bid: ```bash -$ laconic cns auction bid reveal 0294fb2e3659c347b53a6faf4bef041fd934f0f3ab13df6d2468d5d63abacd48 ./out/bafyreiay2rccax64yn4ljhvzvm3jkbebvzheyucuma5jlbpzpzd5i5gjuy.json +$ laconic registry auction bid reveal 0294fb2e3659c347b53a6faf4bef041fd934f0f3ab13df6d2468d5d63abacd48 ./out/bafyreiay2rccax64yn4ljhvzvm3jkbebvzheyucuma5jlbpzpzd5i5gjuy.json ``` Set authority bond (after winning auction): ```bash -$ laconic cns authority bond set laconic 58508984500aa2ed18e059fa8203b40fbc9828e3bfa195361335c4e4524c4785 +$ laconic registry authority bond set laconic 58508984500aa2ed18e059fa8203b40fbc9828e3bfa195361335c4e4524c4785 ``` Create sub-authority (same owner as parent authority): ```bash -$ laconic cns authority reserve echo.laconic +$ laconic registry authority reserve echo.laconic ``` Create sub-authority (custom owner for sub-authority): ```bash -$ laconic cns authority reserve kube.laconic --owner ethm1vc62ysqu504at932jjq8pwrqgjt67rx6ggn5yu +$ laconic registry authority reserve kube.laconic --owner ethm1vc62ysqu504at932jjq8pwrqgjt67rx6ggn5yu ``` Set name: ```bash -$ laconic cns name set lrn://laconic/watcher/erc20 bafyreic3auqajvgszh3vfjsouew2rsctswukc346dmlf273ln4g6iyyhba +$ laconic registry name set lrn://laconic/watcher/erc20 bafyreic3auqajvgszh3vfjsouew2rsctswukc346dmlf273ln4g6iyyhba ``` Lookup name information: ```bash -$ laconic cns name lookup lrn://laconic/watcher/erc20 +$ laconic registry name lookup lrn://laconic/watcher/erc20 [ { "latest": { @@ -344,7 +344,7 @@ $ laconic cns name lookup lrn://laconic/watcher/erc20 Resolve name: ```bash -$ laconic cns name resolve lrn://laconic/watcher/erc20 +$ laconic registry name resolve lrn://laconic/watcher/erc20 [ { "id": "bafyreic3auqajvgszh3vfjsouew2rsctswukc346dmlf273ln4g6iyyhba", @@ -385,9 +385,9 @@ $ laconic cns name resolve lrn://laconic/watcher/erc20 Delete name: ```bash -$ laconic cns name delete lrn://laconic/watcher/erc20 +$ laconic registry name delete lrn://laconic/watcher/erc20 -$ laconic cns name resolve lrn://laconic/watcher/erc20 +$ laconic registry name resolve lrn://laconic/watcher/erc20 [ null ] @@ -396,13 +396,13 @@ $ laconic cns name resolve lrn://laconic/watcher/erc20 Create bond: ```bash -$ laconic cns bond create --type aphoton --quantity 1000 +$ laconic registry bond create --type aphoton --quantity 1000 ``` List bonds: ```bash -$ laconic cns bond list +$ laconic registry bond list [ { "id": "58508984500aa2ed18e059fa8203b40fbc9828e3bfa195361335c4e4524c4785", @@ -430,7 +430,7 @@ $ laconic cns bond list Get bond: ```bash -$ laconic cns bond get --id 58508984500aa2ed18e059fa8203b40fbc9828e3bfa195361335c4e4524c4785 +$ laconic registry bond get --id 58508984500aa2ed18e059fa8203b40fbc9828e3bfa195361335c4e4524c4785 [ { "id": "58508984500aa2ed18e059fa8203b40fbc9828e3bfa195361335c4e4524c4785", @@ -448,7 +448,7 @@ $ laconic cns bond get --id 58508984500aa2ed18e059fa8203b40fbc9828e3bfa195361335 Query bonds by owner: ```bash -$ laconic cns bond list --owner ethm1lfekr7gvqtnhpp2kwdc6u2n569cqsp4ww0m4y8 +$ laconic registry bond list --owner ethm1lfekr7gvqtnhpp2kwdc6u2n569cqsp4ww0m4y8 [ { "id": "58508984500aa2ed18e059fa8203b40fbc9828e3bfa195361335c4e4524c4785", @@ -476,41 +476,41 @@ $ laconic cns bond list --owner ethm1lfekr7gvqtnhpp2kwdc6u2n569cqsp4ww0m4y8 Refill bond: ```bash -$ laconic cns bond refill --id 58508984500aa2ed18e059fa8203b40fbc9828e3bfa195361335c4e4524c4785 --type aphoton --quantity 1000 +$ laconic registry bond refill --id 58508984500aa2ed18e059fa8203b40fbc9828e3bfa195361335c4e4524c4785 --type aphoton --quantity 1000 ``` Withdraw funds from bond: ```bash -$ laconic cns bond withdraw --id 58508984500aa2ed18e059fa8203b40fbc9828e3bfa195361335c4e4524c4785 --type aphoton --quantity 500 +$ laconic registry bond withdraw --id 58508984500aa2ed18e059fa8203b40fbc9828e3bfa195361335c4e4524c4785 --type aphoton --quantity 500 ``` Cancel bond: ```bash -$ laconic cns bond cancel --id 58508984500aa2ed18e059fa8203b40fbc9828e3bfa195361335c4e4524c4785 +$ laconic registry bond cancel --id 58508984500aa2ed18e059fa8203b40fbc9828e3bfa195361335c4e4524c4785 ``` Associate bond (with record): ```bash -$ laconic cns bond associate --id bafyreic3auqajvgszh3vfjsouew2rsctswukc346dmlf273ln4g6iyyhba --bond-id 5c40abd336ae1561f2a1b55be73b12f5a083080bf879b4c9288d182d238badb0 +$ laconic registry bond associate --id bafyreic3auqajvgszh3vfjsouew2rsctswukc346dmlf273ln4g6iyyhba --bond-id 5c40abd336ae1561f2a1b55be73b12f5a083080bf879b4c9288d182d238badb0 ``` Disassociate bond (from record): ```bash -$ laconic cns bond dissociate --id bafyreic3auqajvgszh3vfjsouew2rsctswukc346dmlf273ln4g6iyyhba +$ laconic registry bond dissociate --id bafyreic3auqajvgszh3vfjsouew2rsctswukc346dmlf273ln4g6iyyhba ``` Dissociate all records from bond: ```bash -$ laconic cns bond records dissociate --bond-id 5c40abd336ae1561f2a1b55be73b12f5a083080bf879b4c9288d182d238badb0 +$ laconic registry bond records dissociate --bond-id 5c40abd336ae1561f2a1b55be73b12f5a083080bf879b4c9288d182d238badb0 ``` Reassociate records (switch bond): ```bash -$ laconic cns bond records reassociate --old-bond-id 5c40abd336ae1561f2a1b55be73b12f5a083080bf879b4c9288d182d238badb0 --new-bond-id 3e11c61f179897e4b12e9b63de35d36f88ac146755e7a28ce0bcdd07cf3a03ae +$ laconic registry bond records reassociate --old-bond-id 5c40abd336ae1561f2a1b55be73b12f5a083080bf879b4c9288d182d238badb0 --new-bond-id 3e11c61f179897e4b12e9b63de35d36f88ac146755e7a28ce0bcdd07cf3a03ae ``` diff --git a/config.example.yml b/config.example.yml index b96ee87..a424c65 100644 --- a/config.example.yml +++ b/config.example.yml @@ -1,5 +1,5 @@ services: - cns: + registry: restEndpoint: 'http://localhost:1317' gqlEndpoint: 'http://localhost:9473/api' userKey: -- 2.45.2 From d6833ff9fab999311a57a7546919dde55ae6960e Mon Sep 17 00:00:00 2001 From: zramsay Date: Wed, 11 Jan 2023 12:33:03 -0500 Subject: [PATCH 4/9] rename src/cmds/cns* -> src/cmds/registry --- src/cmds/{cns-cmds => registry-cmds}/account-cmds/get.ts | 0 src/cmds/{cns-cmds => registry-cmds}/account.ts | 0 .../{cns-cmds => registry-cmds}/auction-cmds/bid-cmds/commit.ts | 0 .../{cns-cmds => registry-cmds}/auction-cmds/bid-cmds/reveal.ts | 0 src/cmds/{cns-cmds => registry-cmds}/auction-cmds/bid.ts | 0 src/cmds/{cns-cmds => registry-cmds}/auction-cmds/get.ts | 0 src/cmds/{cns-cmds => registry-cmds}/auction.ts | 0 .../{cns-cmds => registry-cmds}/authority-cmds/bond-cmds/set.ts | 0 src/cmds/{cns-cmds => registry-cmds}/authority-cmds/bond.ts | 0 src/cmds/{cns-cmds => registry-cmds}/authority-cmds/reserve.ts | 0 src/cmds/{cns-cmds => registry-cmds}/authority-cmds/whois.ts | 0 src/cmds/{cns-cmds => registry-cmds}/authority.ts | 0 src/cmds/{cns-cmds => registry-cmds}/bond-cmds/associate.ts | 0 src/cmds/{cns-cmds => registry-cmds}/bond-cmds/cancel.ts | 0 src/cmds/{cns-cmds => registry-cmds}/bond-cmds/create.ts | 0 src/cmds/{cns-cmds => registry-cmds}/bond-cmds/dissociate.ts | 0 src/cmds/{cns-cmds => registry-cmds}/bond-cmds/get.ts | 0 src/cmds/{cns-cmds => registry-cmds}/bond-cmds/list.ts | 0 .../bond-cmds/records-cmds/dissociate.ts | 0 .../bond-cmds/records-cmds/reassociate.ts | 0 src/cmds/{cns-cmds => registry-cmds}/bond-cmds/records.ts | 0 src/cmds/{cns-cmds => registry-cmds}/bond-cmds/refill.ts | 0 src/cmds/{cns-cmds => registry-cmds}/bond-cmds/withdraw.ts | 0 src/cmds/{cns-cmds => registry-cmds}/bond.ts | 0 src/cmds/{cns-cmds => registry-cmds}/name-cmds/delete.ts | 0 src/cmds/{cns-cmds => registry-cmds}/name-cmds/lookup.ts | 0 src/cmds/{cns-cmds => registry-cmds}/name-cmds/resolve.ts | 0 src/cmds/{cns-cmds => registry-cmds}/name-cmds/set.ts | 0 src/cmds/{cns-cmds => registry-cmds}/name.ts | 0 src/cmds/{cns-cmds => registry-cmds}/record-cmds/get.ts | 0 src/cmds/{cns-cmds => registry-cmds}/record-cmds/list.ts | 0 src/cmds/{cns-cmds => registry-cmds}/record-cmds/publish.ts | 0 src/cmds/{cns-cmds => registry-cmds}/record.ts | 0 src/cmds/{cns-cmds => registry-cmds}/status.ts | 0 src/cmds/{cns-cmds => registry-cmds}/tokens-cmds/send.ts | 0 src/cmds/{cns-cmds => registry-cmds}/tokens.ts | 0 src/cmds/{cns.ts => registry.ts} | 0 37 files changed, 0 insertions(+), 0 deletions(-) rename src/cmds/{cns-cmds => registry-cmds}/account-cmds/get.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/account.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/auction-cmds/bid-cmds/commit.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/auction-cmds/bid-cmds/reveal.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/auction-cmds/bid.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/auction-cmds/get.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/auction.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/authority-cmds/bond-cmds/set.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/authority-cmds/bond.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/authority-cmds/reserve.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/authority-cmds/whois.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/authority.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/bond-cmds/associate.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/bond-cmds/cancel.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/bond-cmds/create.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/bond-cmds/dissociate.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/bond-cmds/get.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/bond-cmds/list.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/bond-cmds/records-cmds/dissociate.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/bond-cmds/records-cmds/reassociate.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/bond-cmds/records.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/bond-cmds/refill.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/bond-cmds/withdraw.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/bond.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/name-cmds/delete.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/name-cmds/lookup.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/name-cmds/resolve.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/name-cmds/set.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/name.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/record-cmds/get.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/record-cmds/list.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/record-cmds/publish.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/record.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/status.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/tokens-cmds/send.ts (100%) rename src/cmds/{cns-cmds => registry-cmds}/tokens.ts (100%) rename src/cmds/{cns.ts => registry.ts} (100%) diff --git a/src/cmds/cns-cmds/account-cmds/get.ts b/src/cmds/registry-cmds/account-cmds/get.ts similarity index 100% rename from src/cmds/cns-cmds/account-cmds/get.ts rename to src/cmds/registry-cmds/account-cmds/get.ts diff --git a/src/cmds/cns-cmds/account.ts b/src/cmds/registry-cmds/account.ts similarity index 100% rename from src/cmds/cns-cmds/account.ts rename to src/cmds/registry-cmds/account.ts diff --git a/src/cmds/cns-cmds/auction-cmds/bid-cmds/commit.ts b/src/cmds/registry-cmds/auction-cmds/bid-cmds/commit.ts similarity index 100% rename from src/cmds/cns-cmds/auction-cmds/bid-cmds/commit.ts rename to src/cmds/registry-cmds/auction-cmds/bid-cmds/commit.ts diff --git a/src/cmds/cns-cmds/auction-cmds/bid-cmds/reveal.ts b/src/cmds/registry-cmds/auction-cmds/bid-cmds/reveal.ts similarity index 100% rename from src/cmds/cns-cmds/auction-cmds/bid-cmds/reveal.ts rename to src/cmds/registry-cmds/auction-cmds/bid-cmds/reveal.ts diff --git a/src/cmds/cns-cmds/auction-cmds/bid.ts b/src/cmds/registry-cmds/auction-cmds/bid.ts similarity index 100% rename from src/cmds/cns-cmds/auction-cmds/bid.ts rename to src/cmds/registry-cmds/auction-cmds/bid.ts diff --git a/src/cmds/cns-cmds/auction-cmds/get.ts b/src/cmds/registry-cmds/auction-cmds/get.ts similarity index 100% rename from src/cmds/cns-cmds/auction-cmds/get.ts rename to src/cmds/registry-cmds/auction-cmds/get.ts diff --git a/src/cmds/cns-cmds/auction.ts b/src/cmds/registry-cmds/auction.ts similarity index 100% rename from src/cmds/cns-cmds/auction.ts rename to src/cmds/registry-cmds/auction.ts diff --git a/src/cmds/cns-cmds/authority-cmds/bond-cmds/set.ts b/src/cmds/registry-cmds/authority-cmds/bond-cmds/set.ts similarity index 100% rename from src/cmds/cns-cmds/authority-cmds/bond-cmds/set.ts rename to src/cmds/registry-cmds/authority-cmds/bond-cmds/set.ts diff --git a/src/cmds/cns-cmds/authority-cmds/bond.ts b/src/cmds/registry-cmds/authority-cmds/bond.ts similarity index 100% rename from src/cmds/cns-cmds/authority-cmds/bond.ts rename to src/cmds/registry-cmds/authority-cmds/bond.ts diff --git a/src/cmds/cns-cmds/authority-cmds/reserve.ts b/src/cmds/registry-cmds/authority-cmds/reserve.ts similarity index 100% rename from src/cmds/cns-cmds/authority-cmds/reserve.ts rename to src/cmds/registry-cmds/authority-cmds/reserve.ts diff --git a/src/cmds/cns-cmds/authority-cmds/whois.ts b/src/cmds/registry-cmds/authority-cmds/whois.ts similarity index 100% rename from src/cmds/cns-cmds/authority-cmds/whois.ts rename to src/cmds/registry-cmds/authority-cmds/whois.ts diff --git a/src/cmds/cns-cmds/authority.ts b/src/cmds/registry-cmds/authority.ts similarity index 100% rename from src/cmds/cns-cmds/authority.ts rename to src/cmds/registry-cmds/authority.ts diff --git a/src/cmds/cns-cmds/bond-cmds/associate.ts b/src/cmds/registry-cmds/bond-cmds/associate.ts similarity index 100% rename from src/cmds/cns-cmds/bond-cmds/associate.ts rename to src/cmds/registry-cmds/bond-cmds/associate.ts diff --git a/src/cmds/cns-cmds/bond-cmds/cancel.ts b/src/cmds/registry-cmds/bond-cmds/cancel.ts similarity index 100% rename from src/cmds/cns-cmds/bond-cmds/cancel.ts rename to src/cmds/registry-cmds/bond-cmds/cancel.ts diff --git a/src/cmds/cns-cmds/bond-cmds/create.ts b/src/cmds/registry-cmds/bond-cmds/create.ts similarity index 100% rename from src/cmds/cns-cmds/bond-cmds/create.ts rename to src/cmds/registry-cmds/bond-cmds/create.ts diff --git a/src/cmds/cns-cmds/bond-cmds/dissociate.ts b/src/cmds/registry-cmds/bond-cmds/dissociate.ts similarity index 100% rename from src/cmds/cns-cmds/bond-cmds/dissociate.ts rename to src/cmds/registry-cmds/bond-cmds/dissociate.ts diff --git a/src/cmds/cns-cmds/bond-cmds/get.ts b/src/cmds/registry-cmds/bond-cmds/get.ts similarity index 100% rename from src/cmds/cns-cmds/bond-cmds/get.ts rename to src/cmds/registry-cmds/bond-cmds/get.ts diff --git a/src/cmds/cns-cmds/bond-cmds/list.ts b/src/cmds/registry-cmds/bond-cmds/list.ts similarity index 100% rename from src/cmds/cns-cmds/bond-cmds/list.ts rename to src/cmds/registry-cmds/bond-cmds/list.ts diff --git a/src/cmds/cns-cmds/bond-cmds/records-cmds/dissociate.ts b/src/cmds/registry-cmds/bond-cmds/records-cmds/dissociate.ts similarity index 100% rename from src/cmds/cns-cmds/bond-cmds/records-cmds/dissociate.ts rename to src/cmds/registry-cmds/bond-cmds/records-cmds/dissociate.ts diff --git a/src/cmds/cns-cmds/bond-cmds/records-cmds/reassociate.ts b/src/cmds/registry-cmds/bond-cmds/records-cmds/reassociate.ts similarity index 100% rename from src/cmds/cns-cmds/bond-cmds/records-cmds/reassociate.ts rename to src/cmds/registry-cmds/bond-cmds/records-cmds/reassociate.ts diff --git a/src/cmds/cns-cmds/bond-cmds/records.ts b/src/cmds/registry-cmds/bond-cmds/records.ts similarity index 100% rename from src/cmds/cns-cmds/bond-cmds/records.ts rename to src/cmds/registry-cmds/bond-cmds/records.ts diff --git a/src/cmds/cns-cmds/bond-cmds/refill.ts b/src/cmds/registry-cmds/bond-cmds/refill.ts similarity index 100% rename from src/cmds/cns-cmds/bond-cmds/refill.ts rename to src/cmds/registry-cmds/bond-cmds/refill.ts diff --git a/src/cmds/cns-cmds/bond-cmds/withdraw.ts b/src/cmds/registry-cmds/bond-cmds/withdraw.ts similarity index 100% rename from src/cmds/cns-cmds/bond-cmds/withdraw.ts rename to src/cmds/registry-cmds/bond-cmds/withdraw.ts diff --git a/src/cmds/cns-cmds/bond.ts b/src/cmds/registry-cmds/bond.ts similarity index 100% rename from src/cmds/cns-cmds/bond.ts rename to src/cmds/registry-cmds/bond.ts diff --git a/src/cmds/cns-cmds/name-cmds/delete.ts b/src/cmds/registry-cmds/name-cmds/delete.ts similarity index 100% rename from src/cmds/cns-cmds/name-cmds/delete.ts rename to src/cmds/registry-cmds/name-cmds/delete.ts diff --git a/src/cmds/cns-cmds/name-cmds/lookup.ts b/src/cmds/registry-cmds/name-cmds/lookup.ts similarity index 100% rename from src/cmds/cns-cmds/name-cmds/lookup.ts rename to src/cmds/registry-cmds/name-cmds/lookup.ts diff --git a/src/cmds/cns-cmds/name-cmds/resolve.ts b/src/cmds/registry-cmds/name-cmds/resolve.ts similarity index 100% rename from src/cmds/cns-cmds/name-cmds/resolve.ts rename to src/cmds/registry-cmds/name-cmds/resolve.ts diff --git a/src/cmds/cns-cmds/name-cmds/set.ts b/src/cmds/registry-cmds/name-cmds/set.ts similarity index 100% rename from src/cmds/cns-cmds/name-cmds/set.ts rename to src/cmds/registry-cmds/name-cmds/set.ts diff --git a/src/cmds/cns-cmds/name.ts b/src/cmds/registry-cmds/name.ts similarity index 100% rename from src/cmds/cns-cmds/name.ts rename to src/cmds/registry-cmds/name.ts diff --git a/src/cmds/cns-cmds/record-cmds/get.ts b/src/cmds/registry-cmds/record-cmds/get.ts similarity index 100% rename from src/cmds/cns-cmds/record-cmds/get.ts rename to src/cmds/registry-cmds/record-cmds/get.ts diff --git a/src/cmds/cns-cmds/record-cmds/list.ts b/src/cmds/registry-cmds/record-cmds/list.ts similarity index 100% rename from src/cmds/cns-cmds/record-cmds/list.ts rename to src/cmds/registry-cmds/record-cmds/list.ts diff --git a/src/cmds/cns-cmds/record-cmds/publish.ts b/src/cmds/registry-cmds/record-cmds/publish.ts similarity index 100% rename from src/cmds/cns-cmds/record-cmds/publish.ts rename to src/cmds/registry-cmds/record-cmds/publish.ts diff --git a/src/cmds/cns-cmds/record.ts b/src/cmds/registry-cmds/record.ts similarity index 100% rename from src/cmds/cns-cmds/record.ts rename to src/cmds/registry-cmds/record.ts diff --git a/src/cmds/cns-cmds/status.ts b/src/cmds/registry-cmds/status.ts similarity index 100% rename from src/cmds/cns-cmds/status.ts rename to src/cmds/registry-cmds/status.ts diff --git a/src/cmds/cns-cmds/tokens-cmds/send.ts b/src/cmds/registry-cmds/tokens-cmds/send.ts similarity index 100% rename from src/cmds/cns-cmds/tokens-cmds/send.ts rename to src/cmds/registry-cmds/tokens-cmds/send.ts diff --git a/src/cmds/cns-cmds/tokens.ts b/src/cmds/registry-cmds/tokens.ts similarity index 100% rename from src/cmds/cns-cmds/tokens.ts rename to src/cmds/registry-cmds/tokens.ts diff --git a/src/cmds/cns.ts b/src/cmds/registry.ts similarity index 100% rename from src/cmds/cns.ts rename to src/cmds/registry.ts -- 2.45.2 From 8eb86556b2dd2de19fcf99a3b4dfc2317fbad538 Mon Sep 17 00:00:00 2001 From: zramsay Date: Wed, 11 Jan 2023 12:36:31 -0500 Subject: [PATCH 5/9] last --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 833fd68..9d79f05 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ CLI utility written in TS, used to interact with laconicd. Depends on [laconic-s ## Account Setup -Registering records in CNS requires an account. To get account private key run: +Registering records in the Laconic Registry requires an account. To get account private key run: ```bash $ laconicd keys export mykey --unarmored-hex --unsafe -- 2.45.2 From 1788c1e4c3b7ad615458fdb7e37a6147ce2d0841 Mon Sep 17 00:00:00 2001 From: zramsay Date: Wed, 11 Jan 2023 12:47:49 -0500 Subject: [PATCH 6/9] still need lrn (upstream?) --- src/cmds/registry-cmds/name-cmds/delete.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/cmds/registry-cmds/name-cmds/delete.ts b/src/cmds/registry-cmds/name-cmds/delete.ts index d033af6..e099def 100644 --- a/src/cmds/registry-cmds/name-cmds/delete.ts +++ b/src/cmds/registry-cmds/name-cmds/delete.ts @@ -20,13 +20,8 @@ export const handler = async (argv: Arguments) => { assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); -<<<<<<< HEAD const fee = getGasAndFees(argv, cnsConfig); const result = await registry.deleteName({ crn: name }, privateKey, fee); -======= - const fee = getGasAndFees(argv, registryConfig); - const result = await registry.deleteName({ lrn: name }, privateKey, fee); ->>>>>>> 10b20d7 (sed s/crn/lrn/g) console.log(JSON.stringify(result, undefined, 2)); } -- 2.45.2 From e0bb3ae3af4746b3e5ff845a39809f5174f69f31 Mon Sep 17 00:00:00 2001 From: zramsay Date: Wed, 11 Jan 2023 12:55:47 -0500 Subject: [PATCH 7/9] rename command and directory --- src/cmds/registry.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmds/registry.ts b/src/cmds/registry.ts index 5548242..e665a62 100644 --- a/src/cmds/registry.ts +++ b/src/cmds/registry.ts @@ -1,6 +1,6 @@ import yargs from 'yargs'; -export const command = 'cns'; +export const command = 'registry'; export const desc = 'Laconic Registry Tools'; @@ -17,7 +17,7 @@ exports.builder = (yargs: yargs.Argv) => { 'gas': { type: 'string' }, 'fees': { type: 'string' } }) - .commandDir('cns-cmds') + .commandDir('registry-cmds') .demandCommand() .help() } -- 2.45.2 From 1d473180735839f38bdc2b21c30cb2a25f0bf36b Mon Sep 17 00:00:00 2001 From: zramsay Date: Wed, 11 Jan 2023 13:00:00 -0500 Subject: [PATCH 8/9] cns -> lns to avoid variable collision --- src/cmds/registry-cmds/account-cmds/get.ts | 4 ++-- src/cmds/registry-cmds/auction-cmds/bid-cmds/commit.ts | 6 +++--- src/cmds/registry-cmds/auction-cmds/bid-cmds/reveal.ts | 6 +++--- src/cmds/registry-cmds/auction-cmds/get.ts | 4 ++-- src/cmds/registry-cmds/authority-cmds/bond-cmds/set.ts | 6 +++--- src/cmds/registry-cmds/authority-cmds/reserve.ts | 6 +++--- src/cmds/registry-cmds/authority-cmds/whois.ts | 4 ++-- src/cmds/registry-cmds/bond-cmds/associate.ts | 6 +++--- src/cmds/registry-cmds/bond-cmds/cancel.ts | 6 +++--- src/cmds/registry-cmds/bond-cmds/create.ts | 6 +++--- src/cmds/registry-cmds/bond-cmds/dissociate.ts | 6 +++--- src/cmds/registry-cmds/bond-cmds/get.ts | 4 ++-- src/cmds/registry-cmds/bond-cmds/list.ts | 4 ++-- src/cmds/registry-cmds/bond-cmds/records-cmds/dissociate.ts | 6 +++--- .../registry-cmds/bond-cmds/records-cmds/reassociate.ts | 6 +++--- src/cmds/registry-cmds/bond-cmds/refill.ts | 6 +++--- src/cmds/registry-cmds/bond-cmds/withdraw.ts | 6 +++--- src/cmds/registry-cmds/name-cmds/delete.ts | 6 +++--- src/cmds/registry-cmds/name-cmds/lookup.ts | 4 ++-- src/cmds/registry-cmds/name-cmds/resolve.ts | 4 ++-- src/cmds/registry-cmds/name-cmds/set.ts | 6 +++--- src/cmds/registry-cmds/record-cmds/get.ts | 4 ++-- src/cmds/registry-cmds/record-cmds/list.ts | 4 ++-- src/cmds/registry-cmds/record-cmds/publish.ts | 6 +++--- src/cmds/registry-cmds/status.ts | 4 ++-- src/cmds/registry-cmds/tokens-cmds/send.ts | 6 +++--- 26 files changed, 68 insertions(+), 68 deletions(-) diff --git a/src/cmds/registry-cmds/account-cmds/get.ts b/src/cmds/registry-cmds/account-cmds/get.ts index 10b0214..18403c0 100644 --- a/src/cmds/registry-cmds/account-cmds/get.ts +++ b/src/cmds/registry-cmds/account-cmds/get.ts @@ -11,8 +11,8 @@ export const desc = 'Get account.'; export const handler = async (argv: Arguments) => { let address = argv.address as string; - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(chainId, 'Invalid Registry Chain ID.'); diff --git a/src/cmds/registry-cmds/auction-cmds/bid-cmds/commit.ts b/src/cmds/registry-cmds/auction-cmds/bid-cmds/commit.ts index 94f8fb5..678b5c0 100644 --- a/src/cmds/registry-cmds/auction-cmds/bid-cmds/commit.ts +++ b/src/cmds/registry-cmds/auction-cmds/bid-cmds/commit.ts @@ -21,8 +21,8 @@ export const handler = async (argv: Arguments) => { assert(quantity, 'Invalid token quantity.'); assert(denom, 'Invalid token type.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); @@ -40,7 +40,7 @@ export const handler = async (argv: Arguments) => { fs.writeFileSync(revealFilePath, JSON.stringify(reveal, undefined, 2)); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.commitBid({ auctionId, commitHash }, privateKey, fee); console.log(JSON.stringify(result, undefined, 2)); diff --git a/src/cmds/registry-cmds/auction-cmds/bid-cmds/reveal.ts b/src/cmds/registry-cmds/auction-cmds/bid-cmds/reveal.ts index 796ff49..2134b27 100644 --- a/src/cmds/registry-cmds/auction-cmds/bid-cmds/reveal.ts +++ b/src/cmds/registry-cmds/auction-cmds/bid-cmds/reveal.ts @@ -16,15 +16,15 @@ export const handler = async (argv: Arguments) => { assert(auctionId, 'Invalid auction ID.'); assert(filePath, 'Invalid reveal file path.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const reveal = fs.readFileSync(path.resolve(filePath)); const result = await registry.revealBid({ auctionId, reveal: reveal.toString('hex') }, privateKey, fee); diff --git a/src/cmds/registry-cmds/auction-cmds/get.ts b/src/cmds/registry-cmds/auction-cmds/get.ts index c859a49..88f0615 100644 --- a/src/cmds/registry-cmds/auction-cmds/get.ts +++ b/src/cmds/registry-cmds/auction-cmds/get.ts @@ -12,8 +12,8 @@ export const handler = async (argv: Arguments) => { const { id, config } = argv; assert(id, 'Invalid auction ID.'); - const { services: { cns: cnsConfig } } = getConfig(config as string) - const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(config as string) + const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(chainId, 'Invalid Registry Chain ID.'); diff --git a/src/cmds/registry-cmds/authority-cmds/bond-cmds/set.ts b/src/cmds/registry-cmds/authority-cmds/bond-cmds/set.ts index 6a97b51..cbc16d3 100644 --- a/src/cmds/registry-cmds/authority-cmds/bond-cmds/set.ts +++ b/src/cmds/registry-cmds/authority-cmds/bond-cmds/set.ts @@ -14,15 +14,15 @@ export const handler = async (argv: Arguments) => { assert(name, 'Invalid authority name.'); assert(bondId, 'Invalid Bond ID.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.setAuthorityBond({ name, bondId }, privateKey, fee); console.log(JSON.stringify(result, undefined, 2)); } diff --git a/src/cmds/registry-cmds/authority-cmds/reserve.ts b/src/cmds/registry-cmds/authority-cmds/reserve.ts index 02988b6..9f1336e 100644 --- a/src/cmds/registry-cmds/authority-cmds/reserve.ts +++ b/src/cmds/registry-cmds/authority-cmds/reserve.ts @@ -20,15 +20,15 @@ export const handler = async (argv: Arguments) => { const owner = argv.owner as string; assert(name, 'Invalid authority name.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.reserveAuthority({ name, owner }, privateKey, fee); console.log(JSON.stringify(result, undefined, 2)); diff --git a/src/cmds/registry-cmds/authority-cmds/whois.ts b/src/cmds/registry-cmds/authority-cmds/whois.ts index 90dfb1f..a07ef60 100644 --- a/src/cmds/registry-cmds/authority-cmds/whois.ts +++ b/src/cmds/registry-cmds/authority-cmds/whois.ts @@ -12,8 +12,8 @@ export const handler = async (argv: Arguments) => { const name = argv.name as string; assert(name, 'Invalid authority name.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(chainId, 'Invalid Registry Chain ID.'); diff --git a/src/cmds/registry-cmds/bond-cmds/associate.ts b/src/cmds/registry-cmds/bond-cmds/associate.ts index 75dd289..ea2e27d 100644 --- a/src/cmds/registry-cmds/bond-cmds/associate.ts +++ b/src/cmds/registry-cmds/bond-cmds/associate.ts @@ -20,15 +20,15 @@ export const handler = async (argv: Arguments) => { assert(id, 'Invalid Record ID.'); assert(bondId, 'Invalid Bond ID.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.associateBond({ recordId: id, bondId }, privateKey, fee); console.log(JSON.stringify(result, undefined, 2)); } diff --git a/src/cmds/registry-cmds/bond-cmds/cancel.ts b/src/cmds/registry-cmds/bond-cmds/cancel.ts index 8b520df..c07b382 100644 --- a/src/cmds/registry-cmds/bond-cmds/cancel.ts +++ b/src/cmds/registry-cmds/bond-cmds/cancel.ts @@ -12,15 +12,15 @@ export const handler = async (argv: Arguments) => { const id = argv.id as string assert(id, 'Invalid Bond ID.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.cancelBond({ id }, privateKey, fee); console.log(JSON.stringify(result, undefined, 2)); } diff --git a/src/cmds/registry-cmds/bond-cmds/create.ts b/src/cmds/registry-cmds/bond-cmds/create.ts index de99f60..26a1e12 100644 --- a/src/cmds/registry-cmds/bond-cmds/create.ts +++ b/src/cmds/registry-cmds/bond-cmds/create.ts @@ -25,15 +25,15 @@ export const handler = async (argv: Arguments) => { assert(denom, 'Invalid Type.'); assert(amount, 'Invalid Quantity.'); - const { services: { cns: cnsConfig } } = getConfig(config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.createBond({ denom, amount }, privateKey, fee); console.log(verbose ? JSON.stringify(result, undefined, 2) : result.data); } diff --git a/src/cmds/registry-cmds/bond-cmds/dissociate.ts b/src/cmds/registry-cmds/bond-cmds/dissociate.ts index 7e0b475..ef42c42 100644 --- a/src/cmds/registry-cmds/bond-cmds/dissociate.ts +++ b/src/cmds/registry-cmds/bond-cmds/dissociate.ts @@ -12,15 +12,15 @@ export const handler = async (argv: Arguments) => { const id = argv.id as string; assert(id, 'Invalid Record ID.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.dissociateBond({ recordId: id }, privateKey, fee); console.log(JSON.stringify(result, undefined, 2)); } diff --git a/src/cmds/registry-cmds/bond-cmds/get.ts b/src/cmds/registry-cmds/bond-cmds/get.ts index 9cb83a5..36e45ba 100644 --- a/src/cmds/registry-cmds/bond-cmds/get.ts +++ b/src/cmds/registry-cmds/bond-cmds/get.ts @@ -12,8 +12,8 @@ export const handler = async (argv: Arguments) => { const { id, config } = argv; console.assert(id, 'Bond Id is required.'); - const { services: { cns: cnsConfig } } = getConfig(config as string) - const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(config as string) + const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(chainId, 'Invalid Registry Chain ID.'); diff --git a/src/cmds/registry-cmds/bond-cmds/list.ts b/src/cmds/registry-cmds/bond-cmds/list.ts index beff4cc..864e317 100644 --- a/src/cmds/registry-cmds/bond-cmds/list.ts +++ b/src/cmds/registry-cmds/bond-cmds/list.ts @@ -15,8 +15,8 @@ export const builder = { } export const handler = async (argv: Arguments) => { - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(chainId, 'Invalid Registry Chain ID.'); diff --git a/src/cmds/registry-cmds/bond-cmds/records-cmds/dissociate.ts b/src/cmds/registry-cmds/bond-cmds/records-cmds/dissociate.ts index 341f365..ede0e5e 100644 --- a/src/cmds/registry-cmds/bond-cmds/records-cmds/dissociate.ts +++ b/src/cmds/registry-cmds/bond-cmds/records-cmds/dissociate.ts @@ -18,15 +18,15 @@ export const handler = async (argv: Arguments) => { const bondId = argv.bondId as string; assert(bondId, 'Invalid Bond ID.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.dissociateRecords({ bondId }, privateKey, fee); console.log(JSON.stringify(result, undefined, 2)); } diff --git a/src/cmds/registry-cmds/bond-cmds/records-cmds/reassociate.ts b/src/cmds/registry-cmds/bond-cmds/records-cmds/reassociate.ts index 1fe897c..fb1aa92 100644 --- a/src/cmds/registry-cmds/bond-cmds/records-cmds/reassociate.ts +++ b/src/cmds/registry-cmds/bond-cmds/records-cmds/reassociate.ts @@ -23,15 +23,15 @@ export const handler = async (argv: Arguments) => { assert(oldBondId, 'Invalid Old Bond ID.'); assert(newBondId, 'Invalid New Bond ID.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.reassociateRecords({ oldBondId, newBondId }, privateKey, fee); console.log(JSON.stringify(result, undefined, 2)); } diff --git a/src/cmds/registry-cmds/bond-cmds/refill.ts b/src/cmds/registry-cmds/bond-cmds/refill.ts index e8f4827..72ed6fe 100644 --- a/src/cmds/registry-cmds/bond-cmds/refill.ts +++ b/src/cmds/registry-cmds/bond-cmds/refill.ts @@ -26,15 +26,15 @@ export const handler = async (argv: Arguments) => { assert(denom, 'Invalid Type.'); assert(amount, 'Invalid Quantity.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.refillBond({ id, denom, amount }, privateKey, fee); console.log(JSON.stringify(result, undefined, 2)); } diff --git a/src/cmds/registry-cmds/bond-cmds/withdraw.ts b/src/cmds/registry-cmds/bond-cmds/withdraw.ts index cc46a5c..74ca63f 100644 --- a/src/cmds/registry-cmds/bond-cmds/withdraw.ts +++ b/src/cmds/registry-cmds/bond-cmds/withdraw.ts @@ -26,15 +26,15 @@ export const handler = async (argv: Arguments) => { assert(denom, 'Invalid Type.'); assert(amount, 'Invalid Quantity.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.withdrawBond({ id, denom, amount }, privateKey, fee); console.log(JSON.stringify(result, undefined, 2)); } diff --git a/src/cmds/registry-cmds/name-cmds/delete.ts b/src/cmds/registry-cmds/name-cmds/delete.ts index e099def..c1259f2 100644 --- a/src/cmds/registry-cmds/name-cmds/delete.ts +++ b/src/cmds/registry-cmds/name-cmds/delete.ts @@ -12,15 +12,15 @@ export const handler = async (argv: Arguments) => { const name = argv.name as string; assert(name, 'Invalid Name.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.deleteName({ crn: name }, privateKey, fee); console.log(JSON.stringify(result, undefined, 2)); diff --git a/src/cmds/registry-cmds/name-cmds/lookup.ts b/src/cmds/registry-cmds/name-cmds/lookup.ts index edbcbd1..6baaa7e 100644 --- a/src/cmds/registry-cmds/name-cmds/lookup.ts +++ b/src/cmds/registry-cmds/name-cmds/lookup.ts @@ -18,8 +18,8 @@ export const handler = async (argv: Arguments) => { const name = argv.name as string; assert(name, 'Invalid Name.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(chainId, 'Invalid Registry Chain ID.'); diff --git a/src/cmds/registry-cmds/name-cmds/resolve.ts b/src/cmds/registry-cmds/name-cmds/resolve.ts index 10b1d4d..64c17c1 100644 --- a/src/cmds/registry-cmds/name-cmds/resolve.ts +++ b/src/cmds/registry-cmds/name-cmds/resolve.ts @@ -12,8 +12,8 @@ export const handler = async (argv: Arguments) => { const name = argv.name as string; assert(name, 'Invalid Name.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(chainId, 'Invalid Registry Chain ID.'); diff --git a/src/cmds/registry-cmds/name-cmds/set.ts b/src/cmds/registry-cmds/name-cmds/set.ts index 8f76dc4..5bb49f4 100644 --- a/src/cmds/registry-cmds/name-cmds/set.ts +++ b/src/cmds/registry-cmds/name-cmds/set.ts @@ -14,15 +14,15 @@ export const handler = async (argv: Arguments) => { assert(name, 'Invalid Name.'); assert(id, 'Invalid Record ID.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.setName({ crn: name, cid: id }, privateKey, fee); console.log(JSON.stringify(result, undefined, 2)); diff --git a/src/cmds/registry-cmds/record-cmds/get.ts b/src/cmds/registry-cmds/record-cmds/get.ts index 7a9cd0a..669ec70 100644 --- a/src/cmds/registry-cmds/record-cmds/get.ts +++ b/src/cmds/registry-cmds/record-cmds/get.ts @@ -12,8 +12,8 @@ export const handler = async (argv: Arguments) => { const { id, config } = argv; assert(id, 'Invalid Record ID.'); - const { services: { cns: cnsConfig } } = getConfig(config as string) - const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(config as string) + const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(chainId, 'Invalid Registry Chain ID.'); diff --git a/src/cmds/registry-cmds/record-cmds/list.ts b/src/cmds/registry-cmds/record-cmds/list.ts index a8731e7..014d0ae 100644 --- a/src/cmds/registry-cmds/record-cmds/list.ts +++ b/src/cmds/registry-cmds/record-cmds/list.ts @@ -25,8 +25,8 @@ export const builder = { } export const handler = async (argv: Arguments) => { - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, lnsConfig); const { type, name, bondId, all } = argv; assert(restEndpoint, 'Invalid Registry REST endpoint.'); diff --git a/src/cmds/registry-cmds/record-cmds/publish.ts b/src/cmds/registry-cmds/record-cmds/publish.ts index deb03a4..d0612a4 100644 --- a/src/cmds/registry-cmds/record-cmds/publish.ts +++ b/src/cmds/registry-cmds/record-cmds/publish.ts @@ -19,8 +19,8 @@ export const builder = { export const handler = async (argv: Arguments) => { const { txKey, filename, verbose, config } = argv; - const { services: { cns: cnsConfig } } = getConfig(config as string) - const { restEndpoint, gqlEndpoint, userKey, bondId, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(config as string) + const { restEndpoint, gqlEndpoint, userKey, bondId, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); @@ -37,7 +37,7 @@ export const handler = async (argv: Arguments) => { const { record } = await yaml.load(fs.readFileSync(file, 'utf-8')) as any; const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.setRecord({ privateKey: userKey, record, bondId }, txKey as string, fee); console.log(verbose ? JSON.stringify(result, undefined, 2) : result.data); diff --git a/src/cmds/registry-cmds/status.ts b/src/cmds/registry-cmds/status.ts index c22a565..ac2e01a 100644 --- a/src/cmds/registry-cmds/status.ts +++ b/src/cmds/registry-cmds/status.ts @@ -9,8 +9,8 @@ export const command = 'status'; export const desc = 'Get Registry status.'; export const handler = async (argv: Arguments) => { - const { services: { cns } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cns); + const { services: { lns } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, lns); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(chainId, 'Invalid Registry Chain ID.'); diff --git a/src/cmds/registry-cmds/tokens-cmds/send.ts b/src/cmds/registry-cmds/tokens-cmds/send.ts index c19f293..5c49a32 100644 --- a/src/cmds/registry-cmds/tokens-cmds/send.ts +++ b/src/cmds/registry-cmds/tokens-cmds/send.ts @@ -26,8 +26,8 @@ export const handler = async (argv: Arguments) => { assert(denom, 'Invalid Type.'); assert(amount, 'Invalid Quantity.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); @@ -37,7 +37,7 @@ export const handler = async (argv: Arguments) => { const fromAddress = account.formattedCosmosAddress; const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); await registry.sendCoins({ denom, amount, destinationAddress }, privateKey, fee); const result = await registry.getAccounts([fromAddress, destinationAddress]); console.log(JSON.stringify(result, undefined, 2)); -- 2.45.2 From b3735ab7bfec29b2cbe34b20f536455ae99f5321 Mon Sep 17 00:00:00 2001 From: zramsay Date: Wed, 11 Jan 2023 13:01:24 -0500 Subject: [PATCH 9/9] revert readme to lrn --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9d79f05..3e21dc6 100644 --- a/README.md +++ b/README.md @@ -324,13 +324,13 @@ $ laconic registry authority reserve kube.laconic --owner ethm1vc62ysqu504at932j Set name: ```bash -$ laconic registry name set lrn://laconic/watcher/erc20 bafyreic3auqajvgszh3vfjsouew2rsctswukc346dmlf273ln4g6iyyhba +$ laconic registry name set crn://laconic/watcher/erc20 bafyreic3auqajvgszh3vfjsouew2rsctswukc346dmlf273ln4g6iyyhba ``` Lookup name information: ```bash -$ laconic registry name lookup lrn://laconic/watcher/erc20 +$ laconic registry name lookup crn://laconic/watcher/erc20 [ { "latest": { @@ -344,7 +344,7 @@ $ laconic registry name lookup lrn://laconic/watcher/erc20 Resolve name: ```bash -$ laconic registry name resolve lrn://laconic/watcher/erc20 +$ laconic registry name resolve crn://laconic/watcher/erc20 [ { "id": "bafyreic3auqajvgszh3vfjsouew2rsctswukc346dmlf273ln4g6iyyhba", @@ -385,9 +385,9 @@ $ laconic registry name resolve lrn://laconic/watcher/erc20 Delete name: ```bash -$ laconic registry name delete lrn://laconic/watcher/erc20 +$ laconic registry name delete crn://laconic/watcher/erc20 -$ laconic registry name resolve lrn://laconic/watcher/erc20 +$ laconic registry name resolve crn://laconic/watcher/erc20 [ null ] -- 2.45.2