forked from cerc-io/laconic-sdk
Compare commits
17
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b73bb3e216 | ||
|
|
f2c7468ba8 | ||
|
|
94920171ae | ||
|
|
2a9223fdd3 | ||
|
|
7ecd3eefa8 | ||
|
|
ee0443b5fa | ||
|
|
3a890ab46c | ||
|
|
b9cb479381 | ||
|
|
fa0a4150bd | ||
|
|
733e4a6cc6 | ||
|
|
8e852ad2ce | ||
|
|
62d47f0c4b | ||
|
|
faf7c18e5c | ||
|
|
fb3edfabd3 | ||
|
|
ff3d70cc0d | ||
|
|
b1d3c83d32 | ||
|
|
b07df23804 |
@@ -1 +1,2 @@
|
|||||||
PRIVATE_KEY=75f719e613d05efab06a3f1dde5250b497723b13d4afa4f8ed80145764e40cf7
|
PRIVATE_KEY=75f719e613d05efab06a3f1dde5250b497723b13d4afa4f8ed80145764e40cf7
|
||||||
|
COSMOS_CHAIN_ID=laconic_9000-1
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
name: Publish npm package to gitea
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
jobs:
|
||||||
|
npm_publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [ 16.x ]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
- run: yarn
|
||||||
|
- name: Run yarn build
|
||||||
|
run: |
|
||||||
|
yarn build
|
||||||
|
- name: Configure git.vdb.to npm registry
|
||||||
|
run: |
|
||||||
|
npm config set registry https://git.vdb.to/api/packages/cerc-io/npm/
|
||||||
|
- name: Authenticate to git.vdb.to registry
|
||||||
|
run: |
|
||||||
|
npm config set -- '//git.vdb.to/api/packages/cerc-io/npm/:_authToken' "${{ secrets.GITEA_PUBLISH_TOKEN }}"
|
||||||
|
- name: npm publish
|
||||||
|
run: |
|
||||||
|
npm publish
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# chiba-clonk-client
|
# laconic-sdk
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
@@ -12,19 +12,19 @@ Follow these steps to run the tests:
|
|||||||
|
|
||||||
- Copy [.env.example](./.env.example) file and create a `.env` file.
|
- Copy [.env.example](./.env.example) file and create a `.env` file.
|
||||||
|
|
||||||
- Clone the [chiba-clonk repo](https://github.com/vulcanize/chiba-clonk) and change to repo directory.
|
- Clone the [laconicd repo](https://github.com/cerc-io/laconicd) and change to repo directory.
|
||||||
|
|
||||||
- Run the chain using `./init.sh`.
|
- Run the chain using `./init.sh`.
|
||||||
|
|
||||||
- Export the private key using:
|
- Export the private key using:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
chibaclonkd keys export mykey --unarmored-hex --unsafe
|
laconicd keys export mykey --unarmored-hex --unsafe
|
||||||
```
|
```
|
||||||
|
|
||||||
- Copy the private key and assign it to variable `PRIVATE_KEY` in the `.env` file.
|
- Copy the private key and assign it to variable `PRIVATE_KEY` in the `.env` file.
|
||||||
|
|
||||||
- Run the tests in chiba-clonk-client repo:
|
- Run the tests in laconic-sdk repo:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
yarn test
|
yarn test
|
||||||
@@ -32,7 +32,7 @@ Follow these steps to run the tests:
|
|||||||
|
|
||||||
- Run the tests with auctions enabled
|
- Run the tests with auctions enabled
|
||||||
|
|
||||||
- In chiba-clonk repo run:
|
- In laconicd repo run:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
TEST_AUCTION_ENABLED=true ./init.sh
|
TEST_AUCTION_ENABLED=true ./init.sh
|
||||||
@@ -41,7 +41,7 @@ Follow these steps to run the tests:
|
|||||||
- Export the private key and change it in `.env` file again using:
|
- Export the private key and change it in `.env` file again using:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
chibaclonkd keys export mykey --unarmored-hex --unsafe
|
laconicd keys export mykey --unarmored-hex --unsafe
|
||||||
```
|
```
|
||||||
|
|
||||||
- Run tests:
|
- Run tests:
|
||||||
@@ -52,7 +52,7 @@ Follow these steps to run the tests:
|
|||||||
|
|
||||||
- Run the tests for record and authority expiry
|
- Run the tests for record and authority expiry
|
||||||
|
|
||||||
- In chiba-clonk repo run:
|
- In laconicd repo run:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
TEST_NAMESERVICE_EXPIRY=true ./init.sh
|
TEST_NAMESERVICE_EXPIRY=true ./init.sh
|
||||||
@@ -61,7 +61,7 @@ Follow these steps to run the tests:
|
|||||||
- Export the private key and change it in `.env` file again using:
|
- Export the private key and change it in `.env` file again using:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
chibaclonkd keys export mykey --unarmored-hex --unsafe
|
laconicd keys export mykey --unarmored-hex --unsafe
|
||||||
```
|
```
|
||||||
|
|
||||||
- Run tests:
|
- Run tests:
|
||||||
@@ -81,7 +81,7 @@ Follow these steps to run the tests:
|
|||||||
failed to execute message; message index: 0: Invalid signature.: unauthorized
|
failed to execute message; message index: 0: Invalid signature.: unauthorized
|
||||||
```
|
```
|
||||||
|
|
||||||
- When sending `setRecord` message, an integer value passed in watcher attributes is parsed as float type in chiba-clonk while [unmarshalling json](https://pkg.go.dev/encoding/json#Unmarshal).
|
- When sending `setRecord` message, an integer value passed in watcher attributes is parsed as float type in laconicd while [unmarshalling json](https://pkg.go.dev/encoding/json#Unmarshal).
|
||||||
|
|
||||||
- `setRecord` message throws error when fileds in [Record](./src/types.ts) message are not assigned.
|
- `setRecord` message throws error when fileds in [Record](./src/types.ts) message are not assigned.
|
||||||
```
|
```
|
||||||
|
|||||||
+14
-6
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "chiba-clonk-client",
|
"name": "@cerc-io/laconic-sdk",
|
||||||
"version": "0.1.0",
|
"version": "0.1.4",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
"repository": "git@github.com:vulcanize/chiba-clonk-client.git",
|
"repository": "git@github.com:cerc-io/laconic-sdk.git",
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "UNLICENSED",
|
"license": "UNLICENSED",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -11,10 +11,11 @@
|
|||||||
"@types/jest": "^27.4.1",
|
"@types/jest": "^27.4.1",
|
||||||
"@types/lodash": "^4.14.181",
|
"@types/lodash": "^4.14.181",
|
||||||
"@types/semver": "^7.3.9",
|
"@types/semver": "^7.3.9",
|
||||||
|
"@types/tiny-secp256k1": "1.0.0",
|
||||||
"dotenv": "^16.0.0",
|
"dotenv": "^16.0.0",
|
||||||
"protoc-gen-ts": "^0.8.5",
|
|
||||||
"google-protobuf": "^3.21.0",
|
"google-protobuf": "^3.21.0",
|
||||||
"jest": "29.0.0",
|
"jest": "29.0.0",
|
||||||
|
"protoc-gen-ts": "^0.8.5",
|
||||||
"ts-jest": "^29.0.2",
|
"ts-jest": "^29.0.2",
|
||||||
"typescript": "^4.6.2"
|
"typescript": "^4.6.2"
|
||||||
},
|
},
|
||||||
@@ -25,8 +26,13 @@
|
|||||||
"@ipld/dag-cbor": "^7.0.1",
|
"@ipld/dag-cbor": "^7.0.1",
|
||||||
"@ipld/dag-json": "^8.0.9",
|
"@ipld/dag-json": "^8.0.9",
|
||||||
"@metamask/eth-sig-util": "^4.0.0",
|
"@metamask/eth-sig-util": "^4.0.0",
|
||||||
|
"@tharsis/address-converter": "^0.1.7",
|
||||||
|
"@tharsis/eip712": "^0.2.1",
|
||||||
|
"@tharsis/proto": "^0.1.16",
|
||||||
|
"@tharsis/provider": "^0.2.4",
|
||||||
|
"@tharsis/transactions": "^0.2.2",
|
||||||
"axios": "^0.26.1",
|
"axios": "^0.26.1",
|
||||||
"bip32": "^3.0.1",
|
"bip32": "3.0.1",
|
||||||
"bip39": "^3.0.4",
|
"bip39": "^3.0.4",
|
||||||
"canonical-json": "^0.0.4",
|
"canonical-json": "^0.0.4",
|
||||||
"ethers": "^5.6.2",
|
"ethers": "^5.6.2",
|
||||||
@@ -37,9 +43,11 @@
|
|||||||
"js-yaml": "^3.14.1",
|
"js-yaml": "^3.14.1",
|
||||||
"jsonschema": "^1.4.0",
|
"jsonschema": "^1.4.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
|
"multiformats": "^9.5.4",
|
||||||
"node-yaml": "^4.0.1",
|
"node-yaml": "^4.0.1",
|
||||||
|
"secp256k1": "^4.0.1",
|
||||||
"semver": "^7.3.5",
|
"semver": "^7.3.5",
|
||||||
"tiny-secp256k1": "^2.2.1"
|
"tiny-secp256k1": "^1.1.6"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "jest --runInBand --verbose",
|
"test": "jest --runInBand --verbose",
|
||||||
|
|||||||
+3
-3
@@ -16,7 +16,7 @@ const auctionTests = (numBidders = 3) => {
|
|||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
console.log('Running auction tests with num bidders', numBidders);
|
console.log('Running auction tests with num bidders', numBidders);
|
||||||
|
|
||||||
registry = new Registry(restEndpoint, gqlEndpoint, chainId);
|
registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('Setup bidder accounts', async () => {
|
test('Setup bidder accounts', async () => {
|
||||||
@@ -30,7 +30,7 @@ const auctionTests = (numBidders = 3) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('Reserve authority.', async () => {
|
test('Reserve authority.', async () => {
|
||||||
authorityName = `chiba-clonk-${Date.now()}`;
|
authorityName = `laconic-${Date.now()}`;
|
||||||
await registry.reserveAuthority({ name: authorityName }, accounts[0].privateKey, fee);
|
await registry.reserveAuthority({ name: authorityName }, accounts[0].privateKey, fee);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ if (!process.env.TEST_AUCTIONS_ENABLED) {
|
|||||||
test('skipping auction tests', () => {});
|
test('skipping auction tests', () => {});
|
||||||
} else {
|
} else {
|
||||||
/**
|
/**
|
||||||
Running these tests requires name auctions enabled. In chiba-clonk repo run:
|
Running these tests requires name auctions enabled. In laconicd repo run:
|
||||||
|
|
||||||
TEST_AUCTION_ENABLED=true ./init.sh
|
TEST_AUCTION_ENABLED=true ./init.sh
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,7 @@ const bondTests = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
registry = new Registry(restEndpoint, gqlEndpoint, chainId);
|
registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('Create bond.', async () => {
|
test('Create bond.', async () => {
|
||||||
|
|||||||
+3
-3
@@ -10,7 +10,7 @@ const registryTests = () => {
|
|||||||
let registry: Registry;
|
let registry: Registry;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
registry = new Registry(restEndpoint, gqlEndpoint, chainId);
|
registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -32,14 +32,14 @@ const registryTests = () => {
|
|||||||
test('Get account balance.', async() => {
|
test('Get account balance.', async() => {
|
||||||
const mnenonic1 = Account.generateMnemonic();
|
const mnenonic1 = Account.generateMnemonic();
|
||||||
const otherAccount = await Account.generateFromMnemonic(mnenonic1);
|
const otherAccount = await Account.generateFromMnemonic(mnenonic1);
|
||||||
await registry.sendCoins({ denom: 'aphoton', amount: '10000000000000000000000000', destinationAddress: otherAccount.formattedCosmosAddress }, privateKey, fee);
|
await registry.sendCoins({ denom: 'aphoton', amount: '100000000', destinationAddress: otherAccount.formattedCosmosAddress }, privateKey, fee);
|
||||||
|
|
||||||
const [accountObj] = await registry.getAccounts([otherAccount.formattedCosmosAddress]);
|
const [accountObj] = await registry.getAccounts([otherAccount.formattedCosmosAddress]);
|
||||||
expect(accountObj).toBeDefined();
|
expect(accountObj).toBeDefined();
|
||||||
expect(accountObj.address).toBe(otherAccount.formattedCosmosAddress);
|
expect(accountObj.address).toBe(otherAccount.formattedCosmosAddress);
|
||||||
const [{ type, quantity }] = accountObj.balance
|
const [{ type, quantity }] = accountObj.balance
|
||||||
expect(type).toBe('aphoton');
|
expect(type).toBe('aphoton');
|
||||||
expect(quantity).toBe('10000000000000000000000000');
|
expect(quantity).toBe('100000000');
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+9
-7
@@ -53,7 +53,9 @@ import {
|
|||||||
MessageMsgRevealBid
|
MessageMsgRevealBid
|
||||||
} from './messages/auction';
|
} from './messages/auction';
|
||||||
|
|
||||||
const DEFAULT_WRITE_ERROR = 'Unable to write to chiba-clonk.';
|
export const DEFAULT_CHAIN_ID = 'laconic_9000-1';
|
||||||
|
|
||||||
|
const DEFAULT_WRITE_ERROR = 'Unable to write to laconicd.';
|
||||||
|
|
||||||
// Parse Tx response from cosmos-sdk.
|
// Parse Tx response from cosmos-sdk.
|
||||||
export const parseTxResponse = (result: any, parseResponse?: (data: string) => any) => {
|
export const parseTxResponse = (result: any, parseResponse?: (data: string) => any) => {
|
||||||
@@ -119,21 +121,21 @@ export class Registry {
|
|||||||
return errorMessage || DEFAULT_WRITE_ERROR;
|
return errorMessage || DEFAULT_WRITE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(restUrl: string, gqlUrl: string, chainId: string) {
|
constructor(gqlUrl: string, restUrl: string = "", chainId: string = DEFAULT_CHAIN_ID) {
|
||||||
if (!isUrl(restUrl)) {
|
|
||||||
throw new Error('Path to a REST endpoint should be provided.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isUrl(gqlUrl)) {
|
if (!isUrl(gqlUrl)) {
|
||||||
throw new Error('Path to a GQL endpoint should be provided.');
|
throw new Error('Path to a GQL endpoint should be provided.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (restUrl && !isUrl(restUrl)) {
|
||||||
|
throw new Error('REST endpoint is not a URL string.');
|
||||||
|
}
|
||||||
|
|
||||||
this._endpoints = {
|
this._endpoints = {
|
||||||
rest: restUrl,
|
rest: restUrl,
|
||||||
gql: gqlUrl
|
gql: gqlUrl
|
||||||
};
|
};
|
||||||
|
|
||||||
this._client = new RegistryClient(restUrl, gqlUrl);
|
this._client = new RegistryClient(gqlUrl, restUrl);
|
||||||
this._chainID = chainId;
|
this._chainID = chainId;
|
||||||
|
|
||||||
this._chain = {
|
this._chain = {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ const nameserviceExpiryTests = () => {
|
|||||||
let recordExpiryTime: Date;
|
let recordExpiryTime: Date;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
registry = new Registry(restEndpoint, gqlEndpoint, chainId);
|
registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
|
|
||||||
// Create bond.
|
// Create bond.
|
||||||
bondId = await registry.getNextBondId(privateKey);
|
bondId = await registry.getNextBondId(privateKey);
|
||||||
@@ -50,7 +50,7 @@ const nameserviceExpiryTests = () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
test('Reserve authority and set bond', async () => {
|
test('Reserve authority and set bond', async () => {
|
||||||
authorityName = `chiba-clonk-${Date.now()}`;
|
authorityName = `laconic-${Date.now()}`;
|
||||||
await registry.reserveAuthority({ name: authorityName }, privateKey, fee);
|
await registry.reserveAuthority({ name: authorityName }, privateKey, fee);
|
||||||
await registry.setAuthorityBond({ name: authorityName, bondId }, privateKey, fee);
|
await registry.setAuthorityBond({ name: authorityName, bondId }, privateKey, fee);
|
||||||
const [authority] = await registry.lookupAuthorities([authorityName]);
|
const [authority] = await registry.lookupAuthorities([authorityName]);
|
||||||
@@ -102,7 +102,7 @@ if (!process.env.TEST_NAMESERVICE_EXPIRY) {
|
|||||||
test('skipping nameservice expiry tests', () => {});
|
test('skipping nameservice expiry tests', () => {});
|
||||||
} else {
|
} else {
|
||||||
/**
|
/**
|
||||||
Running these tests requires timers to be set. In chiba-clonk repo run:
|
Running these tests requires timers to be set. In laconicd repo run:
|
||||||
|
|
||||||
TEST_NAMESERVICE_EXPIRY=true ./init.sh
|
TEST_NAMESERVICE_EXPIRY=true ./init.sh
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -25,7 +25,7 @@ const namingTests = () => {
|
|||||||
let crn: string;
|
let crn: string;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
registry = new Registry(restEndpoint, gqlEndpoint, chainId);
|
registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
|
|
||||||
// Create bond.
|
// Create bond.
|
||||||
bondId = await registry.getNextBondId(privateKey);
|
bondId = await registry.getNextBondId(privateKey);
|
||||||
@@ -47,7 +47,7 @@ const namingTests = () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('Reserve authority.', async () => {
|
test('Reserve authority.', async () => {
|
||||||
authorityName = `chiba-clonk-${Date.now()}`;
|
authorityName = `laconic-${Date.now()}`;
|
||||||
await registry.reserveAuthority({ name: authorityName }, privateKey, fee);
|
await registry.reserveAuthority({ name: authorityName }, privateKey, fee);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -122,15 +122,14 @@ export class RegistryClient {
|
|||||||
/**
|
/**
|
||||||
* New Client.
|
* New Client.
|
||||||
*/
|
*/
|
||||||
constructor(restEndpoint: string, gqlEndpoint: string) {
|
constructor(gqlEndpoint: string, restEndpoint: string) {
|
||||||
assert(restEndpoint);
|
assert(gqlEndpoint);
|
||||||
|
|
||||||
this._restEndpoint = restEndpoint;
|
|
||||||
|
|
||||||
this._graph = graphqlClient(gqlEndpoint, {
|
this._graph = graphqlClient(gqlEndpoint, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
asJSON: true
|
asJSON: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this._restEndpoint = restEndpoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@ describe('Querying', () => {
|
|||||||
let bondId: string;
|
let bondId: string;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
registry = new Registry(restEndpoint, gqlEndpoint, chainId);
|
registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
bondId = await provisionBondId(registry, privateKey, fee);
|
bondId = await provisionBondId(registry, privateKey, fee);
|
||||||
|
|
||||||
const publishNewWatcherVersion = async () => {
|
const publishNewWatcherVersion = async () => {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import yaml from 'node-yaml';
|
|||||||
import semver from 'semver';
|
import semver from 'semver';
|
||||||
import { Fee } from '@tharsis/transactions';
|
import { Fee } from '@tharsis/transactions';
|
||||||
|
|
||||||
import { Registry } from '../index';
|
import { DEFAULT_CHAIN_ID, Registry } from '../index';
|
||||||
|
|
||||||
export const ensureUpdatedConfig = async (path: string) => {
|
export const ensureUpdatedConfig = async (path: string) => {
|
||||||
const conf = await yaml.read(path);
|
const conf = await yaml.read(path);
|
||||||
@@ -37,14 +37,14 @@ export const getConfig = () => {
|
|||||||
assert(process.env.PRIVATE_KEY);
|
assert(process.env.PRIVATE_KEY);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
chainId: process.env.COSMOS_CHAIN_ID || 'chibaclonk_9000-1',
|
chainId: process.env.COSMOS_CHAIN_ID || DEFAULT_CHAIN_ID,
|
||||||
privateKey: process.env.PRIVATE_KEY,
|
privateKey: process.env.PRIVATE_KEY,
|
||||||
restEndpoint: process.env.CHIBA_CLONK_REST_ENDPOINT || 'http://localhost:1317',
|
restEndpoint: process.env.LACONICD_REST_ENDPOINT || 'http://localhost:1317',
|
||||||
gqlEndpoint: process.env.CHIBA_CLONK_GQL_ENDPOINT || 'http://localhost:9473/api',
|
gqlEndpoint: process.env.LACONICD_GQL_ENDPOINT || 'http://localhost:9473/api',
|
||||||
fee: {
|
fee: {
|
||||||
amount: '20',
|
amount: '30',
|
||||||
denom: 'aphoton',
|
denom: 'aphoton',
|
||||||
gas: '200000',
|
gas: '300000',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ const utilTests = () => {
|
|||||||
let watcherId: string;
|
let watcherId: string;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
registry = new Registry(restEndpoint, gqlEndpoint, chainId);
|
registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
|
|
||||||
// Create bond.
|
// Create bond.
|
||||||
bondId = await registry.getNextBondId(privateKey);
|
bondId = await registry.getNextBondId(privateKey);
|
||||||
|
|||||||
@@ -1169,6 +1169,13 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c"
|
resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c"
|
||||||
integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==
|
integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==
|
||||||
|
|
||||||
|
"@types/tiny-secp256k1@1.0.0":
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/tiny-secp256k1/-/tiny-secp256k1-1.0.0.tgz#0c8fde0dfd320c9d089907e37805d67a346ad991"
|
||||||
|
integrity sha512-IW3dFGNyVkVLC1MCMogVWQaKH/ZtjPQdOW9c3X128o5lVpFYNsq/l3Qo1pV7sfTmvDzWEXR3QTxg1TMy1pyaAQ==
|
||||||
|
dependencies:
|
||||||
|
"@types/node" "*"
|
||||||
|
|
||||||
"@types/yargs-parser@*":
|
"@types/yargs-parser@*":
|
||||||
version "21.0.0"
|
version "21.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b"
|
resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b"
|
||||||
@@ -1331,7 +1338,14 @@ big-integer@1.6.36:
|
|||||||
resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.36.tgz#78631076265d4ae3555c04f85e7d9d2f3a071a36"
|
resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.36.tgz#78631076265d4ae3555c04f85e7d9d2f3a071a36"
|
||||||
integrity sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg==
|
integrity sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg==
|
||||||
|
|
||||||
bip32@^3.0.1:
|
bindings@^1.3.0:
|
||||||
|
version "1.5.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df"
|
||||||
|
integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==
|
||||||
|
dependencies:
|
||||||
|
file-uri-to-path "1.0.0"
|
||||||
|
|
||||||
|
bip32@3.0.1:
|
||||||
version "3.0.1"
|
version "3.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/bip32/-/bip32-3.0.1.tgz#1d1121469cce6e910e0ec3a5a1990dd62687e2a3"
|
resolved "https://registry.yarnpkg.com/bip32/-/bip32-3.0.1.tgz#1d1121469cce6e910e0ec3a5a1990dd62687e2a3"
|
||||||
integrity sha512-Uhpp9aEx3iyiO7CpbNGFxv9WcMIVdGoHG04doQ5Ln0u60uwDah7jUSc3QMV/fSZGm/Oo01/OeAmYevXV+Gz5jQ==
|
integrity sha512-Uhpp9aEx3iyiO7CpbNGFxv9WcMIVdGoHG04doQ5Ln0u60uwDah7jUSc3QMV/fSZGm/Oo01/OeAmYevXV+Gz5jQ==
|
||||||
@@ -1670,7 +1684,7 @@ electron-to-chromium@^1.4.251:
|
|||||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.266.tgz#b2ce973eedbff309e2b98d1ed348e447bd4681fe"
|
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.266.tgz#b2ce973eedbff309e2b98d1ed348e447bd4681fe"
|
||||||
integrity sha512-saJTYECxUSv7eSpnXw0XIEvUkP9x4s/x2mm3TVX7k4rIFS6f5TjBih1B5h437WzIhHQjid+d8ouQzPQskMervQ==
|
integrity sha512-saJTYECxUSv7eSpnXw0XIEvUkP9x4s/x2mm3TVX7k4rIFS6f5TjBih1B5h437WzIhHQjid+d8ouQzPQskMervQ==
|
||||||
|
|
||||||
elliptic@6.5.4, elliptic@^6.5.2, elliptic@^6.5.3, elliptic@^6.5.4:
|
elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3, elliptic@^6.5.4:
|
||||||
version "6.5.4"
|
version "6.5.4"
|
||||||
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb"
|
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb"
|
||||||
integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==
|
integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==
|
||||||
@@ -1871,6 +1885,11 @@ fb-watchman@^2.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
bser "2.1.1"
|
bser "2.1.1"
|
||||||
|
|
||||||
|
file-uri-to-path@1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd"
|
||||||
|
integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==
|
||||||
|
|
||||||
fill-range@^7.0.1:
|
fill-range@^7.0.1:
|
||||||
version "7.0.1"
|
version "7.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
|
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
|
||||||
@@ -2738,6 +2757,11 @@ multiformats@^9.5.4:
|
|||||||
resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-9.6.4.tgz#5dce1f11a407dbb69aa612cb7e5076069bb759ca"
|
resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-9.6.4.tgz#5dce1f11a407dbb69aa612cb7e5076069bb759ca"
|
||||||
integrity sha512-fCCB6XMrr6CqJiHNjfFNGT0v//dxOBMrOMqUIzpPc/mmITweLEyhvMpY9bF+jZ9z3vaMAau5E8B68DW77QMXkg==
|
integrity sha512-fCCB6XMrr6CqJiHNjfFNGT0v//dxOBMrOMqUIzpPc/mmITweLEyhvMpY9bF+jZ9z3vaMAau5E8B68DW77QMXkg==
|
||||||
|
|
||||||
|
nan@^2.13.2:
|
||||||
|
version "2.17.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/nan/-/nan-2.17.0.tgz#c0150a2368a182f033e9aa5195ec76ea41a199cb"
|
||||||
|
integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==
|
||||||
|
|
||||||
natural-compare@^1.4.0:
|
natural-compare@^1.4.0:
|
||||||
version "1.4.0"
|
version "1.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
|
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
|
||||||
@@ -3252,12 +3276,16 @@ test-exclude@^6.0.0:
|
|||||||
glob "^7.1.4"
|
glob "^7.1.4"
|
||||||
minimatch "^3.0.4"
|
minimatch "^3.0.4"
|
||||||
|
|
||||||
tiny-secp256k1@^2.2.1:
|
tiny-secp256k1@^1.1.6:
|
||||||
version "2.2.1"
|
version "1.1.6"
|
||||||
resolved "https://registry.yarnpkg.com/tiny-secp256k1/-/tiny-secp256k1-2.2.1.tgz#a61d4791b7031aa08a9453178a131349c3e10f9b"
|
resolved "https://registry.yarnpkg.com/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz#7e224d2bee8ab8283f284e40e6b4acb74ffe047c"
|
||||||
integrity sha512-/U4xfVqnVxJXN4YVsru0E6t5wVncu2uunB8+RVR40fYUxkKYUPS10f+ePQZgFBoE/Jbf9H1NBveupF2VmB58Ng==
|
integrity sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA==
|
||||||
dependencies:
|
dependencies:
|
||||||
uint8array-tools "0.0.7"
|
bindings "^1.3.0"
|
||||||
|
bn.js "^4.11.8"
|
||||||
|
create-hmac "^1.1.7"
|
||||||
|
elliptic "^6.4.0"
|
||||||
|
nan "^2.13.2"
|
||||||
|
|
||||||
tmpl@1.0.5:
|
tmpl@1.0.5:
|
||||||
version "1.0.5"
|
version "1.0.5"
|
||||||
@@ -3320,11 +3348,6 @@ typescript@^4.6.2:
|
|||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.2.tgz#fe12d2727b708f4eef40f51598b3398baa9611d4"
|
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.2.tgz#fe12d2727b708f4eef40f51598b3398baa9611d4"
|
||||||
integrity sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==
|
integrity sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==
|
||||||
|
|
||||||
uint8array-tools@0.0.7:
|
|
||||||
version "0.0.7"
|
|
||||||
resolved "https://registry.yarnpkg.com/uint8array-tools/-/uint8array-tools-0.0.7.tgz#a7a2bb5d8836eae2fade68c771454e6a438b390d"
|
|
||||||
integrity sha512-vrrNZJiusLWoFWBqz5Y5KMCgP9W9hnjZHzZiZRT8oNAkq3d5Z5Oe76jAvVVSRh4U8GGR90N2X1dWtrhvx6L8UQ==
|
|
||||||
|
|
||||||
update-browserslist-db@^1.0.9:
|
update-browserslist-db@^1.0.9:
|
||||||
version "1.0.9"
|
version "1.0.9"
|
||||||
resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz#2924d3927367a38d5c555413a7ce138fc95fcb18"
|
resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz#2924d3927367a38d5c555413a7ce138fc95fcb18"
|
||||||
|
|||||||
Reference in New Issue
Block a user