diff --git a/server/package-lock.json b/server/package-lock.json index ec080ce..6b1f6e1 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -9,7 +9,7 @@ "version": "0.1.0-alpha.1", "license": "ISC", "dependencies": { - "@hyperledger/firefly-sdk": "^0.1.0-alpha.4", + "@hyperledger/firefly-sdk": "^0.1.0-alpha.5", "body-parser": "^1.20.0", "class-transformer": "^0.3.1", "class-validator": "^0.12.2", @@ -855,9 +855,9 @@ "dev": true }, "node_modules/@hyperledger/firefly-sdk": { - "version": "0.1.0-alpha.4", - "resolved": "https://registry.npmjs.org/@hyperledger/firefly-sdk/-/firefly-sdk-0.1.0-alpha.4.tgz", - "integrity": "sha512-8C7LQpsQPvpzWJBNE1uBpVSzCrwzSZXC1gTObPsaLyPskLutMaaesU4YQPWtg2Jy9UdRd3zhSuz3AWr6FZn7bw==", + "version": "0.1.0-alpha.5", + "resolved": "https://registry.npmjs.org/@hyperledger/firefly-sdk/-/firefly-sdk-0.1.0-alpha.5.tgz", + "integrity": "sha512-MK2jhY76Fi0vp5uT4DA8bihar7eEPLJZ4BuSH2+RDONLJIHIwiawNWqxCyMtQOXgTYTc5zsNSvE+TWWI4Zgsvg==", "dependencies": { "axios": "^0.26.1", "form-data": "^4.0.0", @@ -11355,9 +11355,9 @@ "dev": true }, "@hyperledger/firefly-sdk": { - "version": "0.1.0-alpha.4", - "resolved": "https://registry.npmjs.org/@hyperledger/firefly-sdk/-/firefly-sdk-0.1.0-alpha.4.tgz", - "integrity": "sha512-8C7LQpsQPvpzWJBNE1uBpVSzCrwzSZXC1gTObPsaLyPskLutMaaesU4YQPWtg2Jy9UdRd3zhSuz3AWr6FZn7bw==", + "version": "0.1.0-alpha.5", + "resolved": "https://registry.npmjs.org/@hyperledger/firefly-sdk/-/firefly-sdk-0.1.0-alpha.5.tgz", + "integrity": "sha512-MK2jhY76Fi0vp5uT4DA8bihar7eEPLJZ4BuSH2+RDONLJIHIwiawNWqxCyMtQOXgTYTc5zsNSvE+TWWI4Zgsvg==", "requires": { "axios": "^0.26.1", "form-data": "^4.0.0", diff --git a/server/package.json b/server/package.json index 1ae0333..5fc3d59 100644 --- a/server/package.json +++ b/server/package.json @@ -26,7 +26,7 @@ }, "homepage": "https://github.com/hyperledger/firefly-sandbox#readme", "dependencies": { - "@hyperledger/firefly-sdk": "^0.1.0-alpha.4", + "@hyperledger/firefly-sdk": "^0.1.0-alpha.5", "body-parser": "^1.20.0", "class-transformer": "^0.3.1", "class-validator": "^0.12.2", diff --git a/server/src/controllers/contracts.ts b/server/src/controllers/contracts.ts index 1b5a4fa..f920bf2 100644 --- a/server/src/controllers/contracts.ts +++ b/server/src/controllers/contracts.ts @@ -43,7 +43,7 @@ export class ContractsController { ? await firefly.generateContractInterface({ name: body.name, version: body.version, - input: { abi: body.schema }, + input: { abi: body.schema } as any, }) : body.schema; const result = await firefly.createContractInterface(ffi); @@ -64,7 +64,7 @@ export class ContractsController { }, location: { address: body.address, - }, + } as any, }); return { type: 'message', id: api.message }; } @@ -84,7 +84,7 @@ export class ContractsController { const apis = await firefly.getContractAPIs(); return apis.map((api) => ({ name: api.name, - address: api.location?.address, + address: (api.location as any)?.address, urls: api.urls, })); } @@ -100,7 +100,7 @@ export class ContractsController { const ffi = await firefly.getContractInterface(api.interface.id, true); return { name: api.name, - address: api.location?.address, + address: (api.location as any)?.address, urls: api.urls, events: ffi.events?.map((e) => ({ pathname: e.pathname })), }; @@ -119,7 +119,7 @@ export class ContractsController { id: l.id, name: l.name, topic: l.topic, - address: l.location.address, + address: (l.location as any)?.address, eventName: l.event.name, })); } @@ -137,7 +137,7 @@ export class ContractsController { id: listener.id, name: listener.name, topic: listener.topic, - address: listener.location.address, + address: listener.location, eventName: listener.event.name, }; } diff --git a/server/src/controllers/datatypes.ts b/server/src/controllers/datatypes.ts index 13888af..500abae 100644 --- a/server/src/controllers/datatypes.ts +++ b/server/src/controllers/datatypes.ts @@ -33,7 +33,7 @@ export class DatatypesController { @Param('name') name: string, @Param('version') version: string, ): Promise { - const datatype = await firefly.getDatatype({ name, version }); + const datatype = await firefly.getDatatype(name, version); if (datatype === undefined) { throw new NotFoundError(); } @@ -51,10 +51,11 @@ export class DatatypesController { @OpenAPI({ summary: 'Creates and broadcasts a new datatype' }) async createDatatype(@Body() body: DatatypeInterface): Promise { // See DatatypesTemplateController and keep template code up to date. - const datatype = await firefly.createDatatype( - { name: body.name, version: body.version }, - body.schema, - ); + const datatype = await firefly.createDatatype({ + name: body.name, + version: body.version, + value: body.schema, + }); return { type: 'datatype', id: datatype.id }; } } diff --git a/server/src/controllers/tokens.ts b/server/src/controllers/tokens.ts index d3bc825..f1dab7c 100644 --- a/server/src/controllers/tokens.ts +++ b/server/src/controllers/tokens.ts @@ -36,6 +36,9 @@ export class TokensController { name: body.name, symbol: body.symbol, type: body.type, + config: { + address: body.address, + }, }); return { type: 'token_pool', id: pool.id }; } @@ -122,6 +125,9 @@ export class TokensTemplateController { name: <%= ${q('name')} %>, symbol: <%= ${q('symbol')} %>, type: <%= ${q('type')} %>, + config: { + address: <%= ${q('address')} %> + } }); return { type: 'token_pool', id: pool.id }; `); diff --git a/server/src/interfaces.ts b/server/src/interfaces.ts index 6513662..b9afcbf 100644 --- a/server/src/interfaces.ts +++ b/server/src/interfaces.ts @@ -1,16 +1,13 @@ -import { FireFlyTokenPoolType } from '@hyperledger/firefly-sdk'; import { ArrayNotEmpty, IsDefined, IsEnum, IsInstance, - IsInt, IsNumberString, IsObject, IsOptional, IsString, IsUUID, - Min, } from 'class-validator'; import { JSONSchema } from 'class-validator-jsonschema'; @@ -94,6 +91,11 @@ export class Verifier { value: string; } +export class TokenConfig { + @IsString() + address: string; +} + export class TokenPoolInput { @IsString() name: string; @@ -101,8 +103,15 @@ export class TokenPoolInput { @IsString() symbol: string; - @IsEnum(FireFlyTokenPoolType) - type: FireFlyTokenPoolType; + @IsString() + type: 'fungible' | 'nonfungible'; + + @IsOptional() + config?: TokenConfig; + + @IsString() + @IsOptional() + address?: string; } export class TokenPool extends TokenPoolInput { @@ -114,9 +123,8 @@ export class TokenMint { @IsString() pool: string; - @IsInt() - @Min(0) - amount: number; + @IsString() + amount: string; } export class TokenBurn extends TokenMint { @@ -190,10 +198,10 @@ export class ContractAPI { export class ContractAPIURLs { @IsString() - openapi: string; + openapi?: string; @IsString() - ui: string; + ui?: string; } export class ContractAPILookup { diff --git a/server/test/common.test.ts b/server/test/common.test.ts index 3381391..e202618 100644 --- a/server/test/common.test.ts +++ b/server/test/common.test.ts @@ -1,8 +1,8 @@ import * as request from 'supertest'; import FireFly, { - FireFlyOrganization, - FireFlyStatus, - FireFlyVerifier, + FireFlyOrganizationResponse, + FireFlyStatusResponse, + FireFlyVerifierResponse, } from '@hyperledger/firefly-sdk'; import server from '../src/server'; import { firefly } from '../src/clients/firefly'; @@ -12,7 +12,10 @@ const mockFireFly = firefly as jest.MockedObject; describe('Common Operations', () => { test('List organizations', async () => { - const orgs = [{ id: 'org1' } as FireFlyOrganization, { id: 'org2' } as FireFlyOrganization]; + const orgs = [ + { id: 'org1' } as FireFlyOrganizationResponse, + { id: 'org2' } as FireFlyOrganizationResponse, + ]; mockFireFly.getOrganizations.mockResolvedValueOnce(orgs); @@ -25,8 +28,11 @@ describe('Common Operations', () => { }); test('List organizations without self', async () => { - const status = { org: { id: 'org1' } } as FireFlyStatus; - const orgs = [{ id: 'org1' } as FireFlyOrganization, { id: 'org2' } as FireFlyOrganization]; + const status = { org: { id: 'org1' } } as FireFlyStatusResponse; + const orgs = [ + { id: 'org1' } as FireFlyOrganizationResponse, + { id: 'org2' } as FireFlyOrganizationResponse, + ]; mockFireFly.getStatus.mockResolvedValueOnce(status); mockFireFly.getOrganizations.mockResolvedValueOnce(orgs); @@ -41,7 +47,7 @@ describe('Common Operations', () => { }); test('Get self', async () => { - const status = { org: { id: 'org1' } } as FireFlyStatus; + const status = { org: { id: 'org1' } } as FireFlyStatusResponse; mockFireFly.getStatus.mockResolvedValueOnce(status); @@ -51,8 +57,8 @@ describe('Common Operations', () => { }); test('List verifiers', async () => { - const orgs = [{ id: 'org1', did: 'did:org1' } as FireFlyOrganization]; - const verifiers = [{ identity: 'org1', value: '0x123' } as FireFlyVerifier]; + const orgs = [{ id: 'org1', did: 'did:org1' } as FireFlyOrganizationResponse]; + const verifiers = [{ identity: 'org1', value: '0x123' } as FireFlyVerifierResponse]; mockFireFly.getOrganizations.mockResolvedValueOnce(orgs); mockFireFly.getVerifiers.mockResolvedValueOnce(verifiers); diff --git a/server/test/contracts.test.ts b/server/test/contracts.test.ts index b16b298..765a284 100644 --- a/server/test/contracts.test.ts +++ b/server/test/contracts.test.ts @@ -1,8 +1,8 @@ import * as request from 'supertest'; import FireFly, { - FireFlyContractAPI, - FireFlyContractInterface, - FireFlyContractListener, + FireFlyContractAPIResponse, + FireFlyContractInterfaceResponse, + FireFlyContractListenerResponse, } from '@hyperledger/firefly-sdk'; import server from '../src/server'; import { firefly } from '../src/clients/firefly'; @@ -31,7 +31,7 @@ describe('Smart Contracts', () => { name: 'my-contract', version: '1.0', message: 'msg1', - } as FireFlyContractInterface; + } as FireFlyContractInterfaceResponse; mockFireFly.createContractInterface.mockResolvedValueOnce(int); @@ -55,7 +55,7 @@ describe('Smart Contracts', () => { name: 'my-contract', version: '1.0', message: 'msg1', - } as FireFlyContractInterface; + } as FireFlyContractInterfaceResponse; mockFireFly.generateContractInterface.mockResolvedValueOnce(int); mockFireFly.createContractInterface.mockResolvedValueOnce(int); @@ -84,7 +84,7 @@ describe('Smart Contracts', () => { const api = { name: 'my-api', message: 'msg1', - } as FireFlyContractAPI; + } as FireFlyContractAPIResponse; mockFireFly.createContractAPI.mockResolvedValueOnce(api); @@ -100,6 +100,7 @@ describe('Smart Contracts', () => { name: 'my-api', }); }); + test('Get contract Interfaces', async () => { const int = [ { @@ -112,7 +113,7 @@ describe('Smart Contracts', () => { description: '', version: '1.1', }, - ] as FireFlyContractInterface[]; + ] as FireFlyContractInterfaceResponse[]; mockFireFly.getContractInterfaces.mockResolvedValueOnce(int); @@ -130,12 +131,12 @@ describe('Smart Contracts', () => { openapi: 'openapi-url', ui: 'ui-url', }, - } as FireFlyContractAPI; + } as FireFlyContractAPIResponse; const int = { name: 'my-contract', version: '1.0', message: 'msg1', - } as FireFlyContractInterface; + } as FireFlyContractInterfaceResponse; mockFireFly.getContractAPI.mockResolvedValueOnce(api); mockFireFly.getContractInterface.mockResolvedValueOnce(int); @@ -166,13 +167,13 @@ describe('Smart Contracts', () => { openapi: 'openapi-url', ui: 'ui-url', }, - } as FireFlyContractAPI; + } as FireFlyContractAPIResponse; const listener = { id: 'listener1', topic: 'my-app', - location: { address: '0x123' }, + location: { address: '0x123' } as any, event: { name: 'event1' }, - } as FireFlyContractListener; + } as FireFlyContractListenerResponse; mockFireFly.getContractAPI.mockResolvedValueOnce(api); mockFireFly.getContractListeners.mockResolvedValueOnce([listener]); @@ -201,9 +202,9 @@ describe('Smart Contracts', () => { const listener = { id: 'listener1', topic: 'my-app', - location: { address: '0x123' }, + location: '0x123', event: { name: 'Changed' }, - } as FireFlyContractListener; + } as FireFlyContractListenerResponse; mockFireFly.createContractAPIListener.mockResolvedValueOnce(listener); diff --git a/server/test/datatypes.test.ts b/server/test/datatypes.test.ts index 852acbd..b7dcd2b 100644 --- a/server/test/datatypes.test.ts +++ b/server/test/datatypes.test.ts @@ -1,5 +1,5 @@ import * as request from 'supertest'; -import FireFly, { FireFlyDatatype } from '@hyperledger/firefly-sdk'; +import FireFly, { FireFlyDatatypeResponse } from '@hyperledger/firefly-sdk'; import server from '../src/server'; import { firefly } from '../src/clients/firefly'; import { DatatypeInterface } from '../src/interfaces'; @@ -26,7 +26,7 @@ const SAMPLE_SCHEMA = { const baseDatatypeRes = { id: 'datatype1', validator: 'json', - value: SAMPLE_SCHEMA, + value: JSON.stringify(SAMPLE_SCHEMA), created: '4/18/2022', hash: '0x123', message: 'abc-def', @@ -46,7 +46,7 @@ describe('Datatypes', () => { version: '1.0', id: 'datatype1', ...baseDatatypeRes, - }; + } as FireFlyDatatypeResponse; mockFireFly.createDatatype.mockResolvedValueOnce(datatypeResponse); @@ -56,13 +56,11 @@ describe('Datatypes', () => { .expect(202) .expect({ type: 'datatype', id: 'datatype1' }); - expect(mockFireFly.createDatatype).toHaveBeenCalledWith( - { - name: 'my-datatype', - version: '1.0', - }, - SAMPLE_SCHEMA, - ); + expect(mockFireFly.createDatatype).toHaveBeenCalledWith({ + name: 'my-datatype', + version: '1.0', + value: SAMPLE_SCHEMA, + }); }); test('Get datatypes', async () => { @@ -77,7 +75,7 @@ describe('Datatypes', () => { version: '2.0', ...baseDatatypeRes, }, - ] as FireFlyDatatype[]; + ] as FireFlyDatatypeResponse[]; mockFireFly.getDatatypes.mockResolvedValueOnce(req); @@ -85,12 +83,17 @@ describe('Datatypes', () => { .get('/api/datatypes') .expect(200) .expect([ - { id: 'datatype1', name: 'my-datatype', version: '1.0', schema: SAMPLE_SCHEMA }, + { + id: 'datatype1', + name: 'my-datatype', + version: '1.0', + schema: JSON.stringify(SAMPLE_SCHEMA), + }, { id: 'datatype1', name: 'my-datatype-2', version: '2.0', - schema: SAMPLE_SCHEMA, + schema: JSON.stringify(SAMPLE_SCHEMA), }, ]); }); @@ -100,13 +103,18 @@ describe('Datatypes', () => { name: 'my-datatype', version: '1.0', ...baseDatatypeRes, - } as FireFlyDatatype; + } as FireFlyDatatypeResponse; mockFireFly.getDatatype.mockResolvedValueOnce(req); await request(server) .get('/api/datatypes/my-datatype/1.0') .expect(200) - .expect({ id: 'datatype1', name: 'my-datatype', version: '1.0', schema: SAMPLE_SCHEMA }); + .expect({ + id: 'datatype1', + name: 'my-datatype', + version: '1.0', + schema: JSON.stringify(SAMPLE_SCHEMA), + }); }); }); diff --git a/server/test/messages.test.ts b/server/test/messages.test.ts index 97f484e..87906bc 100644 --- a/server/test/messages.test.ts +++ b/server/test/messages.test.ts @@ -1,5 +1,5 @@ import * as request from 'supertest'; -import FireFly, { FireFlyDataRef, FireFlyMessage } from '@hyperledger/firefly-sdk'; +import FireFly, { FireFlyDataResponse, FireFlyMessageResponse } from '@hyperledger/firefly-sdk'; import server from '../src/server'; import { firefly } from '../src/clients/firefly'; import { BroadcastValue, PrivateValue } from '../src/interfaces'; @@ -16,7 +16,7 @@ describe('Messages', () => { }; const msg = { header: { id: 'msg1' }, - } as FireFlyMessage; + } as FireFlyMessageResponse; mockFireFly.sendBroadcast.mockResolvedValueOnce(msg); @@ -36,10 +36,10 @@ describe('Messages', () => { test('Broadcast with blob', async () => { const data = { id: 'data1', - } as FireFlyDataRef; + } as FireFlyDataResponse; const msg = { header: { id: 'msg1' }, - } as FireFlyMessage; + } as FireFlyMessageResponse; mockFireFly.uploadDataBlob.mockResolvedValueOnce(data); mockFireFly.sendBroadcast.mockResolvedValueOnce(msg); @@ -67,7 +67,7 @@ describe('Messages', () => { }; const msg = { header: { id: 'msg1' }, - } as FireFlyMessage; + } as FireFlyMessageResponse; mockFireFly.sendPrivateMessage.mockResolvedValueOnce(msg); @@ -90,10 +90,10 @@ describe('Messages', () => { test('Private with blob', async () => { const data = { id: 'data1', - } as FireFlyDataRef; + } as FireFlyDataResponse; const msg = { header: { id: 'msg1' }, - } as FireFlyMessage; + } as FireFlyMessageResponse; mockFireFly.uploadDataBlob.mockResolvedValueOnce(data); mockFireFly.sendPrivateMessage.mockResolvedValueOnce(msg); diff --git a/server/test/tokens.template.test.ts b/server/test/tokens.template.test.ts index 4a16599..1da704f 100644 --- a/server/test/tokens.template.test.ts +++ b/server/test/tokens.template.test.ts @@ -15,6 +15,7 @@ describe('Templates: Tokens', () => { name: 'pool1', symbol: 'P1', type: 'fungible', + address: undefined, }), ).toBe( formatTemplate(` @@ -22,6 +23,9 @@ describe('Templates: Tokens', () => { name: 'pool1', symbol: 'P1', type: 'fungible', + config: { + address: 'undefined' + } }); return { type: 'token_pool', id: pool.id }; `), diff --git a/server/test/tokens.test.ts b/server/test/tokens.test.ts index 606de49..9275404 100644 --- a/server/test/tokens.test.ts +++ b/server/test/tokens.test.ts @@ -1,9 +1,8 @@ import * as request from 'supertest'; import FireFly, { - FireFlyTokenBalance, - FireFlyTokenPool, - FireFlyTokenPoolType, - FireFlyTokenTransfer, + FireFlyTokenBalanceFilter, + FireFlyTokenPoolResponse, + FireFlyTokenTransferResponse, } from '@hyperledger/firefly-sdk'; import server from '../src/server'; import { firefly } from '../src/clients/firefly'; @@ -14,7 +13,10 @@ const mockFireFly = firefly as jest.MockedObject; describe('Tokens', () => { test('List token pools', async () => { - const pools = [{ id: 'pool1' } as FireFlyTokenPool, { id: 'pool2' } as FireFlyTokenPool]; + const pools = [ + { id: 'pool1' } as FireFlyTokenPoolResponse, + { id: 'pool2' } as FireFlyTokenPoolResponse, + ]; mockFireFly.getTokenPools.mockResolvedValueOnce(pools); @@ -30,12 +32,12 @@ describe('Tokens', () => { const req: TokenPoolInput = { name: 'my-pool', symbol: 'P1', - type: FireFlyTokenPoolType.FUNGIBLE, + type: 'fungible', }; const pool = { id: 'pool1', tx: { id: 'tx1' }, - } as FireFlyTokenPool; + } as FireFlyTokenPoolResponse; mockFireFly.createTokenPool.mockResolvedValueOnce(pool); @@ -49,18 +51,19 @@ describe('Tokens', () => { name: 'my-pool', symbol: 'P1', type: 'fungible', + config: {}, }); }); test('Mint tokens', async () => { const req: TokenMint = { pool: 'my-pool', - amount: 10, + amount: '10', }; const transfer = { localId: 'transfer1', tx: { id: 'tx1' }, - } as FireFlyTokenTransfer; + } as FireFlyTokenTransferResponse; mockFireFly.mintTokens.mockResolvedValueOnce(transfer); @@ -72,19 +75,19 @@ describe('Tokens', () => { expect(mockFireFly.mintTokens).toHaveBeenCalledWith({ pool: 'my-pool', - amount: 10, + amount: '10', }); }); test('Burn tokens', async () => { const req: TokenBurn = { pool: 'my-pool', - amount: 1, + amount: '1', }; const transfer = { localId: 'transfer1', tx: { id: 'tx1' }, - } as FireFlyTokenTransfer; + } as FireFlyTokenTransferResponse; mockFireFly.burnTokens.mockResolvedValueOnce(transfer); @@ -96,20 +99,20 @@ describe('Tokens', () => { expect(mockFireFly.burnTokens).toHaveBeenCalledWith({ pool: 'my-pool', - amount: 1, + amount: '1', }); }); test('Transfer tokens', async () => { const req: TokenTransfer = { pool: 'my-pool', - amount: 1, + amount: '1', to: '0x111', }; const transfer = { localId: 'transfer1', tx: { id: 'tx1' }, - } as FireFlyTokenTransfer; + } as FireFlyTokenTransferResponse; mockFireFly.transferTokens.mockResolvedValueOnce(transfer); @@ -121,15 +124,17 @@ describe('Tokens', () => { expect(mockFireFly.transferTokens).toHaveBeenCalledWith({ pool: 'my-pool', - amount: 1, + amount: '1', to: '0x111', }); }); test('Get balances', async () => { - const balances = [{ key: '0x123', balance: '1', pool: 'pool1' } as FireFlyTokenBalance]; + const balances = [{ key: '0x123', balance: '1', pool: 'pool1' } as FireFlyTokenBalanceFilter]; - mockFireFly.getTokenPool.mockResolvedValueOnce({ name: 'pool-name' } as FireFlyTokenPool); + mockFireFly.getTokenPool.mockResolvedValueOnce({ + name: 'pool-name', + } as FireFlyTokenPoolResponse); mockFireFly.getTokenBalances.mockResolvedValueOnce(balances); await request(server) diff --git a/ui/package-lock.json b/ui/package-lock.json index 1b55316..df92d60 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -20,6 +20,7 @@ "@types/react": "^17.0.43", "@types/react-dom": "^17.0.14", "dayjs": "^1.11.0", + "ethereumjs-util": "^7.1.4", "i18next": "^21.6.14", "react": "^17.0.2", "react-copy-to-clipboard": "^5.0.4", @@ -30,7 +31,6 @@ "react-router": "^6.2.2", "react-router-dom": "^6.2.2", "react-scripts": "5.0.0", - "react-split-pane": "^0.1.92", "react-syntax-highlighter": "^15.5.0", "reconnecting-websocket": "^4.4.0", "typescript": "^4.6.3", @@ -3839,6 +3839,14 @@ "@babel/types": "^7.3.0" } }, + "node_modules/@types/bn.js": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", + "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/body-parser": { "version": "1.19.2", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", @@ -4001,6 +4009,14 @@ "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" }, + "node_modules/@types/pbkdf2": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", + "integrity": "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/prettier": { "version": "2.4.4", "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.4.tgz", @@ -4096,6 +4112,14 @@ "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" }, + "node_modules/@types/secp256k1": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.3.tgz", + "integrity": "sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/serve-index": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/@types/serve-index/-/serve-index-1.9.1.tgz", @@ -5263,6 +5287,14 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "node_modules/base-x": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", + "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, "node_modules/batch": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", @@ -5306,11 +5338,21 @@ "node": ">=8" } }, + "node_modules/blakejs": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", + "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==" + }, "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, + "node_modules/bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==" + }, "node_modules/body-parser": { "version": "1.19.2", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.2.tgz", @@ -5416,11 +5458,29 @@ "unload": "2.2.0" } }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, "node_modules/browser-process-hrtime": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==" }, + "node_modules/browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dependencies": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "node_modules/browserslist": { "version": "4.20.2", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.2.tgz", @@ -5449,6 +5509,24 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, "node_modules/bser": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", @@ -5467,6 +5545,11 @@ "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==" }, + "node_modules/buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + }, "node_modules/builtin-modules": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", @@ -5687,6 +5770,15 @@ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==" }, + "node_modules/cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "node_modules/cjs-module-lexer": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", @@ -6020,6 +6112,31 @@ "node": ">=8" } }, + "node_modules/create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -6884,6 +7001,25 @@ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.103.tgz", "integrity": "sha512-c/uKWR1Z/W30Wy/sx3dkZoj4BijbXX85QKWu9jJfjho3LBAXNEGAEW3oWiGb+dotA6C6BzCTxL2/aLes7jlUeg==" }, + "node_modules/elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "node_modules/emittery": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", @@ -7711,6 +7847,43 @@ "node": ">= 0.6" } }, + "node_modules/ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dependencies": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "node_modules/ethereumjs-util": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.4.tgz", + "integrity": "sha512-p6KmuPCX4mZIqsQzXfmSx9Y0l2hqf+VkAiwSisW3UKUFdk8ZkAt+AYaor83z2nSi6CU2zSsXMlD80hAbNEGM0A==", + "dependencies": { + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "rlp": "^2.2.4" + }, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/eventemitter3": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", @@ -7724,6 +7897,15 @@ "node": ">=0.8.x" } }, + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, "node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -8582,6 +8764,47 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hash-base/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, "node_modules/hast-util-parse-selector": { "version": "2.2.5", "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz", @@ -8631,6 +8854,16 @@ "@babel/runtime": "^7.7.6" } }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "node_modules/hoist-non-react-statics": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", @@ -11428,6 +11661,20 @@ "node": ">=4.0" } }, + "node_modules/keccak": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.2.tgz", + "integrity": "sha512-PyKKjkH53wDMLGrvmRGSNWgmSxZOUqbnXwKL9tmgbFYA1iAYqW21kfR7mZXV0MlESiefxQQE9X9fTa3X+2MPDQ==", + "hasInstallScript": true, + "dependencies": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -11651,6 +11898,16 @@ "remove-accents": "0.4.2" } }, + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, "node_modules/mdn-data": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", @@ -11841,6 +12098,11 @@ "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -11936,6 +12198,11 @@ "tslib": "^2.0.3" } }, + "node_modules/node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" + }, "node_modules/node-forge": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", @@ -11944,6 +12211,16 @@ "node": ">= 6.13.0" } }, + "node_modules/node-gyp-build": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.4.0.tgz", + "integrity": "sha512-amJnQCcgtRVw9SvoebO3BKGESClrfXGCUTX9hSn1OuGQTQBOZmVd0Z0OlecpuRksKvbsUqALE8jls/ErClAPuQ==", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -12402,6 +12679,21 @@ "node": ">=8" } }, + "node_modules/pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "dependencies": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + }, + "engines": { + "node": ">=0.12" + } + }, "node_modules/performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", @@ -14225,11 +14517,6 @@ "react": "^17.0.0" } }, - "node_modules/react-lifecycles-compat": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", - "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" - }, "node_modules/react-query": { "version": "3.34.19", "resolved": "https://registry.npmjs.org/react-query/-/react-query-3.34.19.tgz", @@ -14373,28 +14660,6 @@ "node": ">=10" } }, - "node_modules/react-split-pane": { - "version": "0.1.92", - "resolved": "https://registry.npmjs.org/react-split-pane/-/react-split-pane-0.1.92.tgz", - "integrity": "sha512-GfXP1xSzLMcLJI5BM36Vh7GgZBpy+U/X0no+VM3fxayv+p1Jly5HpMofZJraeaMl73b3hvlr+N9zJKvLB/uz9w==", - "dependencies": { - "prop-types": "^15.7.2", - "react-lifecycles-compat": "^3.0.4", - "react-style-proptype": "^3.2.2" - }, - "peerDependencies": { - "react": "^16.0.0-0", - "react-dom": "^16.0.0-0" - } - }, - "node_modules/react-style-proptype": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/react-style-proptype/-/react-style-proptype-3.2.2.tgz", - "integrity": "sha512-ywYLSjNkxKHiZOqNlso9PZByNEY+FTyh3C+7uuziK0xFXu9xzdyfHwg4S9iyiRRoPCR4k2LqaBBsWVmSBwCWYQ==", - "dependencies": { - "prop-types": "^15.5.4" - } - }, "node_modules/react-syntax-highlighter": { "version": "15.5.0", "resolved": "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-15.5.0.tgz", @@ -14786,6 +15051,26 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/rlp": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", + "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", + "dependencies": { + "bn.js": "^5.2.0" + }, + "bin": { + "rlp": "bin/rlp" + } + }, "node_modules/rollup": { "version": "2.70.1", "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.70.1.tgz", @@ -14970,6 +15255,25 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" + }, + "node_modules/secp256k1": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.3.tgz", + "integrity": "sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==", + "hasInstallScript": true, + "dependencies": { + "elliptic": "^6.5.4", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", @@ -15111,11 +15415,28 @@ "node": ">= 0.8.0" } }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -19806,6 +20127,14 @@ "@babel/types": "^7.3.0" } }, + "@types/bn.js": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", + "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", + "requires": { + "@types/node": "*" + } + }, "@types/body-parser": { "version": "1.19.2", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", @@ -19968,6 +20297,14 @@ "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" }, + "@types/pbkdf2": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", + "integrity": "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==", + "requires": { + "@types/node": "*" + } + }, "@types/prettier": { "version": "2.4.4", "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.4.tgz", @@ -20063,6 +20400,14 @@ "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" }, + "@types/secp256k1": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.3.tgz", + "integrity": "sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w==", + "requires": { + "@types/node": "*" + } + }, "@types/serve-index": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/@types/serve-index/-/serve-index-1.9.1.tgz", @@ -20927,6 +21272,14 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "base-x": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", + "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, "batch": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", @@ -20958,11 +21311,21 @@ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" }, + "blakejs": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", + "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==" + }, "bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==" + }, "body-parser": { "version": "1.19.2", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.2.tgz", @@ -21058,11 +21421,29 @@ "unload": "2.2.0" } }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, "browser-process-hrtime": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==" }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "browserslist": { "version": "4.20.2", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.2.tgz", @@ -21075,6 +21456,24 @@ "picocolors": "^1.0.0" } }, + "bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", + "requires": { + "base-x": "^3.0.2" + } + }, + "bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "requires": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, "bser": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", @@ -21093,6 +21492,11 @@ "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==" }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + }, "builtin-modules": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", @@ -21239,6 +21643,15 @@ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==" }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "cjs-module-lexer": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", @@ -21496,6 +21909,31 @@ "yaml": "^1.7.2" } }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -22126,6 +22564,27 @@ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.103.tgz", "integrity": "sha512-c/uKWR1Z/W30Wy/sx3dkZoj4BijbXX85QKWu9jJfjho3LBAXNEGAEW3oWiGb+dotA6C6BzCTxL2/aLes7jlUeg==" }, + "elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "requires": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + } + } + }, "emittery": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", @@ -22715,6 +23174,40 @@ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, + "ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "requires": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "ethereumjs-util": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.4.tgz", + "integrity": "sha512-p6KmuPCX4mZIqsQzXfmSx9Y0l2hqf+VkAiwSisW3UKUFdk8ZkAt+AYaor83z2nSi6CU2zSsXMlD80hAbNEGM0A==", + "requires": { + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "rlp": "^2.2.4" + } + }, "eventemitter3": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", @@ -22725,6 +23218,15 @@ "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, "execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -23338,6 +23840,32 @@ "has-symbols": "^1.0.2" } }, + "hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "requires": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + } + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, "hast-util-parse-selector": { "version": "2.2.5", "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz", @@ -23373,6 +23901,16 @@ "@babel/runtime": "^7.7.6" } }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "hoist-non-react-statics": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", @@ -25366,6 +25904,16 @@ "object.assign": "^4.1.2" } }, + "keccak": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.2.tgz", + "integrity": "sha512-PyKKjkH53wDMLGrvmRGSNWgmSxZOUqbnXwKL9tmgbFYA1iAYqW21kfR7mZXV0MlESiefxQQE9X9fTa3X+2MPDQ==", + "requires": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0", + "readable-stream": "^3.6.0" + } + }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -25543,6 +26091,16 @@ "remove-accents": "0.4.2" } }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, "mdn-data": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", @@ -25678,6 +26236,11 @@ "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -25755,11 +26318,21 @@ "tslib": "^2.0.3" } }, + "node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" + }, "node-forge": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==" }, + "node-gyp-build": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.4.0.tgz", + "integrity": "sha512-amJnQCcgtRVw9SvoebO3BKGESClrfXGCUTX9hSn1OuGQTQBOZmVd0Z0OlecpuRksKvbsUqALE8jls/ErClAPuQ==" + }, "node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -26085,6 +26658,18 @@ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" }, + "pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", @@ -27263,11 +27848,6 @@ "mersenne-twister": "^1.1.0" } }, - "react-lifecycles-compat": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", - "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" - }, "react-query": { "version": "3.34.19", "resolved": "https://registry.npmjs.org/react-query/-/react-query-3.34.19.tgz", @@ -27365,24 +27945,6 @@ } } }, - "react-split-pane": { - "version": "0.1.92", - "resolved": "https://registry.npmjs.org/react-split-pane/-/react-split-pane-0.1.92.tgz", - "integrity": "sha512-GfXP1xSzLMcLJI5BM36Vh7GgZBpy+U/X0no+VM3fxayv+p1Jly5HpMofZJraeaMl73b3hvlr+N9zJKvLB/uz9w==", - "requires": { - "prop-types": "^15.7.2", - "react-lifecycles-compat": "^3.0.4", - "react-style-proptype": "^3.2.2" - } - }, - "react-style-proptype": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/react-style-proptype/-/react-style-proptype-3.2.2.tgz", - "integrity": "sha512-ywYLSjNkxKHiZOqNlso9PZByNEY+FTyh3C+7uuziK0xFXu9xzdyfHwg4S9iyiRRoPCR4k2LqaBBsWVmSBwCWYQ==", - "requires": { - "prop-types": "^15.5.4" - } - }, "react-syntax-highlighter": { "version": "15.5.0", "resolved": "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-15.5.0.tgz", @@ -27667,6 +28229,23 @@ "glob": "^7.1.3" } }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "rlp": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", + "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", + "requires": { + "bn.js": "^5.2.0" + } + }, "rollup": { "version": "2.70.1", "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.70.1.tgz", @@ -27783,6 +28362,21 @@ "ajv-keywords": "^3.5.2" } }, + "scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" + }, + "secp256k1": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.3.tgz", + "integrity": "sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==", + "requires": { + "elliptic": "^6.5.4", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + } + }, "select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", @@ -27912,11 +28506,25 @@ "send": "0.17.2" } }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, "setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", diff --git a/ui/package.json b/ui/package.json index 92948b5..0f92452 100644 --- a/ui/package.json +++ b/ui/package.json @@ -15,6 +15,7 @@ "@types/react": "^17.0.43", "@types/react-dom": "^17.0.14", "dayjs": "^1.11.0", + "ethereumjs-util": "^7.1.4", "i18next": "^21.6.14", "react": "^17.0.2", "react-copy-to-clipboard": "^5.0.4", @@ -25,7 +26,6 @@ "react-router": "^6.2.2", "react-router-dom": "^6.2.2", "react-scripts": "5.0.0", - "react-split-pane": "^0.1.92", "react-syntax-highlighter": "^15.5.0", "reconnecting-websocket": "^4.4.0", "typescript": "^4.6.3", diff --git a/ui/src/components/Buttons/MessageTypeGroup.tsx b/ui/src/components/Buttons/MessageTypeGroup.tsx index 2f98bc7..a76f712 100644 --- a/ui/src/components/Buttons/MessageTypeGroup.tsx +++ b/ui/src/components/Buttons/MessageTypeGroup.tsx @@ -26,6 +26,7 @@ export const DEFAULT_MESSAGE_JSON = { interface Props { message: string | undefined; jsonValue: string | undefined; + recipients?: string[] | undefined; fileName?: string; onSetMessage: any; onSetFileName?: any; @@ -38,6 +39,7 @@ export const MessageTypeGroup: React.FC = ({ message, jsonValue, fileName, + recipients, onSetMessage, onSetFileName, onSetJsonValue, @@ -51,7 +53,11 @@ export const MessageTypeGroup: React.FC = ({ useEffect(() => { if (activeForm.indexOf('blob') < 0) { + if (!message && !jsonValue) { + onSetMessage(DEFAULT_MESSAGE_STRING); + } setMessageType(message ? POST_BODY_TYPE.STRING : POST_BODY_TYPE.JSON); + checkMissingFields(); } else { const file: any = document.querySelector('input[type="file"]'); setPayloadMissingFields(!file.files[0] ? true : false); @@ -60,15 +66,21 @@ export const MessageTypeGroup: React.FC = ({ useEffect(() => { if (getTemplateCategory(activeForm) !== 'messages') return; + checkMissingFields(); + }, [message, jsonValue, messageType, fileName, recipients]); + + const checkMissingFields = () => { if ( + (activeForm.includes('private') && recipients?.length === 0) || (!message && messageType === POST_BODY_TYPE.STRING) || (!jsonValue && messageType === POST_BODY_TYPE.JSON) || (messageType === POST_BODY_TYPE.FILE && !fileName) ) { setPayloadMissingFields(true); - return; + } else { + setPayloadMissingFields(false); } - }, [message, jsonValue]); + }; const handleMessageTypeChange = ( _: React.MouseEvent, @@ -81,19 +93,25 @@ export const MessageTypeGroup: React.FC = ({ switch (newAlignment) { case POST_BODY_TYPE.NONE: onSetMessage(undefined); - setActiveForm(activeForm.replace('blob', '')); + if (activeForm.includes('blob')) { + setActiveForm(activeForm.replace('blob', '')); + } return; case POST_BODY_TYPE.STRING: onSetJsonValue(undefined); - setPayloadMissingFields(false); + checkMissingFields(); onSetMessage(DEFAULT_MESSAGE_STRING); - setActiveForm(activeForm.replace('blob', '')); + if (activeForm.includes('blob')) { + setActiveForm(activeForm.replace('blob', '')); + } return; case POST_BODY_TYPE.JSON: onSetMessage(undefined); - setPayloadMissingFields(false); + checkMissingFields(); onSetJsonValue(JSON.stringify(DEFAULT_MESSAGE_JSON, null, 2)); - setActiveForm(activeForm.replace('blob', '')); + if (activeForm.includes('blob')) { + setActiveForm(activeForm.replace('blob', '')); + } return; case POST_BODY_TYPE.FILE: onSetMessage(undefined); diff --git a/ui/src/components/Forms/BroadcastForm.tsx b/ui/src/components/Forms/BroadcastForm.tsx index 3827a08..79d6bc4 100644 --- a/ui/src/components/Forms/BroadcastForm.tsx +++ b/ui/src/components/Forms/BroadcastForm.tsx @@ -10,7 +10,7 @@ import { } from '../Buttons/MessageTypeGroup'; export const BroadcastForm: React.FC = () => { - const { jsonPayload, setJsonPayload, activeForm, setPayloadMissingFields } = + const { jsonPayload, setJsonPayload, activeForm } = useContext(ApplicationContext); const { t } = useTranslation(); @@ -23,7 +23,6 @@ export const BroadcastForm: React.FC = () => { useEffect(() => { if (!activeForm.includes('broadcast')) return; const { jsonValue: jsonCurValue } = jsonPayload as any; - setPayloadMissingFields(!message); setJsonPayload({ topic: topics, tag, diff --git a/ui/src/components/Forms/BurnForm.tsx b/ui/src/components/Forms/BurnForm.tsx index fff7a7f..8d23505 100644 --- a/ui/src/components/Forms/BurnForm.tsx +++ b/ui/src/components/Forms/BurnForm.tsx @@ -37,7 +37,7 @@ export const BurnForm: React.FC = () => { setPayloadMissingFields(!amount || !pool || (!isFungible() && !tokenIndex)); setJsonPayload({ pool: pool?.name, - amount, + amount: amount.toString(), tokenIndex: tokenIndex?.toString(), }); }, [pool, amount, tokenIndex, activeForm]); diff --git a/ui/src/components/Forms/Contracts/RegisterContractApiForm.tsx b/ui/src/components/Forms/Contracts/RegisterContractApiForm.tsx index fc9b8dc..b4365db 100644 --- a/ui/src/components/Forms/Contracts/RegisterContractApiForm.tsx +++ b/ui/src/components/Forms/Contracts/RegisterContractApiForm.tsx @@ -27,9 +27,7 @@ export const RegisterContractApiForm: React.FC = () => { const [contractInterfaces, setContractInterfaces] = useState< IContractInterface[] >([]); - const [contractInterfaceIdx, setContractInterfaceIdx] = useState< - number | null - >(); + const [contractInterfaceIdx, setContractInterfaceIdx] = useState(0); const [name, setName] = useState(''); const [contractAddress, setContractAddress] = useState(''); @@ -40,12 +38,8 @@ export const RegisterContractApiForm: React.FC = () => { setPayloadMissingFields(!name || !contractAddress); setJsonPayload({ name, - interfaceName: contractInterfaceIdx - ? contractInterfaces[contractInterfaceIdx]?.name - : '', - interfaceVersion: contractInterfaceIdx - ? contractInterfaces[contractInterfaceIdx]?.version - : '', + interfaceName: contractInterfaces[contractInterfaceIdx]?.name || '', + interfaceVersion: contractInterfaces[contractInterfaceIdx]?.version || '', address: contractAddress, }); }, [name, contractInterfaceIdx, contractAddress, activeForm]); diff --git a/ui/src/components/Forms/Datatypes/DefineDatatypeForm.tsx b/ui/src/components/Forms/Datatypes/DefineDatatypeForm.tsx new file mode 100644 index 0000000..78c0ada --- /dev/null +++ b/ui/src/components/Forms/Datatypes/DefineDatatypeForm.tsx @@ -0,0 +1,116 @@ +import { FormControl, Grid, TextField } from '@mui/material'; +import { useContext, useEffect, useState } from 'react'; +import { useTranslation } from 'react-i18next'; +import { ApplicationContext } from '../../../contexts/ApplicationContext'; +import { DEFAULT_SPACING } from '../../../theme'; +import { TUTORIALS } from '../../../constants/TutorialSections'; +import { isJsonString } from '../../../utils/strings'; + +const DEFAULT_DATATYPE_SCHEMA = { + $id: 'https://example.com/person.schema.json', + $schema: 'https://json-schema.org/draft/2020-12/schema', + title: 'Person', + type: 'object', + properties: { + id: { + type: 'string', + description: 'The unique identifier for the person.', + }, + name: { + type: 'string', + description: "The person's last name.", + }, + age: { + type: 'integer', + description: "The person's age in years.", + }, + isEnrolled: { + type: 'boolean', + description: "The person's enrollment in the program", + }, + rating: { + type: 'number', + description: + "The person's overall score in the program (e.g. 87.5, 100).", + }, + }, +}; + +export const DefineDatatypeForm: React.FC = () => { + const { setJsonPayload, activeForm, setPayloadMissingFields } = + useContext(ApplicationContext); + const { t } = useTranslation(); + + const [name, setName] = useState(''); + const [version, setVersion] = useState(''); + const [schema, setSchema] = useState(DEFAULT_DATATYPE_SCHEMA); + const [schemaString, setSchemaString] = useState( + JSON.stringify(DEFAULT_DATATYPE_SCHEMA, null, 2) + ); + + useEffect(() => { + if (activeForm !== TUTORIALS.DATATYPE) { + setName(''); + setVersion(''); + return; + } + setPayloadMissingFields(!schema || !name || !version); + setJsonPayload({ + name, + version, + schema, + }); + }, [schema, name, version, activeForm]); + + useEffect(() => { + if (isJsonString(schemaString)) { + setSchema(JSON.parse(schemaString)); + setPayloadMissingFields(!schemaString); + } + }, [schemaString]); + + return ( + + + + + { + setName(e.target.value); + }} + /> + + + + + { + setVersion(e.target.value); + }} + /> + + + + + setSchemaString(e.target.value)} + /> + + + + ); +}; diff --git a/ui/src/components/Forms/MintForm.tsx b/ui/src/components/Forms/MintForm.tsx index 059389a..ee93bbd 100644 --- a/ui/src/components/Forms/MintForm.tsx +++ b/ui/src/components/Forms/MintForm.tsx @@ -46,13 +46,13 @@ export const MintForm: React.FC = () => { if (!message) { setJsonPayload({ pool: pool?.name, - amount: amount, + amount: amount.toString(), }); return; } setJsonPayload({ pool: pool?.name, - amount: amount, + amount: amount.toString(), message: { data: [ { diff --git a/ui/src/components/Forms/PoolForm.tsx b/ui/src/components/Forms/PoolForm.tsx index ba90cd6..3744d14 100644 --- a/ui/src/components/Forms/PoolForm.tsx +++ b/ui/src/components/Forms/PoolForm.tsx @@ -19,21 +19,24 @@ export const PoolForm: React.FC = () => { const [name, setName] = useState(''); const [symbol, setSymbol] = useState(''); + const [address, setAddress] = useState(); const [type, setType] = useState<'fungible' | 'nonfungible'>('fungible'); useEffect(() => { if (activeForm !== TUTORIALS.POOL) { setName(''); setSymbol(''); + setAddress(''); return; } - setPayloadMissingFields(!name || !symbol ? true : false); + setPayloadMissingFields(!name || !symbol); setJsonPayload({ - name: name, - symbol: symbol, - type: type, + name, + symbol, + type, + address, }); - }, [name, symbol, type, activeForm]); + }, [name, symbol, type, address, activeForm]); const handleNameChange = (event: React.ChangeEvent) => { setName(event.target.value); @@ -87,6 +90,17 @@ export const PoolForm: React.FC = () => { + + { + setAddress(event?.target.value); + }} + /> + diff --git a/ui/src/components/Forms/PrivateForm.tsx b/ui/src/components/Forms/PrivateForm.tsx index c359a03..837f0bc 100644 --- a/ui/src/components/Forms/PrivateForm.tsx +++ b/ui/src/components/Forms/PrivateForm.tsx @@ -27,7 +27,7 @@ interface NetworkIdentity { } export const PrivateForm: React.FC = () => { - const { jsonPayload, setJsonPayload, activeForm, setPayloadMissingFields } = + const { jsonPayload, setJsonPayload, activeForm } = useContext(ApplicationContext); const { t } = useTranslation(); const [message, setMessage] = useState(DEFAULT_MESSAGE_STRING); @@ -61,7 +61,6 @@ export const PrivateForm: React.FC = () => { if (!activeForm.includes('private')) { return; } - setPayloadMissingFields(recipients.length === 0); const { jsonValue: jsonCurValue } = jsonPayload as any; setJsonPayload({ topic: topics, @@ -120,6 +119,7 @@ export const PrivateForm: React.FC = () => { message={message} jsonValue={jsonValue} fileName={fileName} + recipients={recipients} onSetMessage={(msg: string) => setMessage(msg)} onSetFileName={(file: string) => { setFileName(file); diff --git a/ui/src/components/Forms/TransferForm.tsx b/ui/src/components/Forms/TransferForm.tsx index fcf2008..a683670 100644 --- a/ui/src/components/Forms/TransferForm.tsx +++ b/ui/src/components/Forms/TransferForm.tsx @@ -1,13 +1,11 @@ import { + Autocomplete, Button, FormControl, Grid, InputLabel, - ListItemText, MenuItem, - OutlinedInput, Select, - SelectChangeEvent, TextField, Typography, } from '@mui/material'; @@ -47,7 +45,7 @@ export const TransferForm: React.FC = () => { ); setJsonPayload({ pool: pool?.name, - amount, + amount: amount.toString(), tokenIndex: tokenIndex?.toString(), to: recipient, }); @@ -69,9 +67,7 @@ export const TransferForm: React.FC = () => { fetchCatcher(`${FF_Paths.verifiers}`) .then((verifiersRes: IVerifiers[]) => { - const verifiers = verifiersRes.filter( - (v) => v.did !== selfIdentity?.did - ); + const verifiers = verifiersRes; setTokenVerifiers(verifiers); if (verifiers.length > 0) { setRecipient(verifiers[0].value); @@ -127,15 +123,6 @@ export const TransferForm: React.FC = () => { setTokenIndex(event.target.value); }; - const handleRecipientChange = ( - event: SelectChangeEvent - ) => { - const { - target: { value }, - } = event; - setRecipient(value); - }; - return ( @@ -178,24 +165,19 @@ export const TransferForm: React.FC = () => { {/* Recipient Select box */} - {t('tokenRecipient')} - + /> diff --git a/ui/src/components/Panels/FFVerticalPanel.tsx b/ui/src/components/Panels/FFVerticalPanel.tsx new file mode 100644 index 0000000..7544ef3 --- /dev/null +++ b/ui/src/components/Panels/FFVerticalPanel.tsx @@ -0,0 +1,20 @@ +import { Grid, useTheme } from '@mui/material'; + +export const FFVerticalPanel: React.FC = ({ children }) => { + const theme = useTheme(); + + return ( + + {children} + + ); +}; diff --git a/ui/src/constants/FF_Paths.ts b/ui/src/constants/FF_Paths.ts index c1657c5..28618d5 100644 --- a/ui/src/constants/FF_Paths.ts +++ b/ui/src/constants/FF_Paths.ts @@ -51,9 +51,9 @@ export const FF_Paths = { dataBlobById: (id: string) => `/data/${id}/blob`, dataMessagesById: (id: string) => `/data/${id}/messages`, // Datatype - datatypes: '/datatypes', + datatypes: '/api/datatypes', datatypesByNameVersion: (name: string, version: string) => - `/datatypes/${name}/${version}`, + `/api/datatypes/${name}/${version}`, events: '/events', eventsById: (eventId: string) => `/events/${eventId}`, // Groups diff --git a/ui/src/constants/TutorialSections.tsx b/ui/src/constants/TutorialSections.tsx index cef3f62..07582ef 100644 --- a/ui/src/constants/TutorialSections.tsx +++ b/ui/src/constants/TutorialSections.tsx @@ -10,6 +10,7 @@ import { DefineInterfaceForm } from '../components/Forms/Contracts/DefineInterfa import { DeployContractForm } from '../components/Forms/Contracts/DeployContractForm'; import { RegisterContractApiForm } from '../components/Forms/Contracts/RegisterContractApiForm'; import { RegisterContractApiListenerForm } from '../components/Forms/Contracts/RegisterContractApiListenerForm'; +import { DefineDatatypeForm } from '../components/Forms/Datatypes/DefineDatatypeForm'; export enum TUTORIALS { BROADCAST = 'broadcast', @@ -21,6 +22,7 @@ export enum TUTORIALS { DEFINE_CONTRACT_INTERFACE = 'interface', REGISTER_CONTRACT_API = 'api', REGISTER_CONTRACT_API_LISTENER = 'listener', + DATATYPE = 'datatypes', } export enum TUTORIAL_CATEGORIES { @@ -51,6 +53,15 @@ export const TutorialSections: ITutorialSection[] = [ shortInfo: 'privateShortInfo', title: 'privateTitle', }, + { + id: TUTORIALS.DATATYPE, + docsURL: + 'https://hyperledger.github.io/firefly/gettingstarted/define_datatype.html', + endpoint: FF_Paths.datatypes, + form: , + shortInfo: 'createDatatypeInfo', + title: 'createDatatypeTitle', + }, ], }, { diff --git a/ui/src/interfaces/api.ts b/ui/src/interfaces/api.ts index f04e42a..3d63cd3 100644 --- a/ui/src/interfaces/api.ts +++ b/ui/src/interfaces/api.ts @@ -71,13 +71,11 @@ export interface IContractListener { export interface IDatatype { id: string; message: string; - validator: string; + validator: 'json' | 'none' | 'definition'; namespace: string; name: string; version: string; - hash: string; - created: string; - value?: any; + schema: any; } export interface IEvent { diff --git a/ui/src/pages/Home/views/Dashboard.tsx b/ui/src/pages/Home/views/Dashboard.tsx index e1823ae..1aa0614 100644 --- a/ui/src/pages/Home/views/Dashboard.tsx +++ b/ui/src/pages/Home/views/Dashboard.tsx @@ -1,54 +1,23 @@ import { Grid } from '@mui/material'; -import { useTheme } from '@mui/material/styles'; -import SplitPane from 'react-split-pane'; -import { DEFAULT_PADDING } from '../../../theme'; +import { FFVerticalPanel } from '../../../components/Panels/FFVerticalPanel'; import { LeftPane } from './LeftPane'; import { MiddlePane } from './MiddlePane'; import { RightPane } from './RightPane'; export const HomeDashboard: () => JSX.Element = () => { - const theme = useTheme(); - - const styles = { - background: theme.palette.background.paper, - width: '2px', - cursor: 'col-resize', - margin: '0', - height: '100%', - }; - return ( <> -
- - - - -
- -
- - - - -
-
-
-
+ + + + + + + + + + + ); }; diff --git a/ui/src/pages/Home/views/LeftPane.tsx b/ui/src/pages/Home/views/LeftPane.tsx index 4ee581b..da9f63f 100644 --- a/ui/src/pages/Home/views/LeftPane.tsx +++ b/ui/src/pages/Home/views/LeftPane.tsx @@ -50,7 +50,7 @@ export const LeftPane = () => { return ( <> -
+ {/* Tabs */} {tutorialTabs.map((tt, idx) => { @@ -64,40 +64,38 @@ export const LeftPane = () => { ); })} - - - {currentStateMap[tabIdx] && ( - - {currentStateMap[tabIdx]} - - - )} - {TutorialSections.filter( - (section) => section.title === tutorialTabs[tabIdx].title - ).map((ts, idx) => { - return ( - - - {ts.tutorials.map((tutorial, idx) => { - return ( - - - - ); - })} - + + {currentStateMap[tabIdx] && ( + + {currentStateMap[tabIdx]} + + + )} + {TutorialSections.filter( + (section) => section.title === tutorialTabs[tabIdx].title + ).map((ts, idx) => { + return ( + + + {ts.tutorials.map((tutorial, idx) => { + return ( + + + + ); + })} - ); - })} - + + ); + })} -
+
); }; diff --git a/ui/src/pages/Home/views/MiddlePane.tsx b/ui/src/pages/Home/views/MiddlePane.tsx index 1bca2ed..cd3e409 100644 --- a/ui/src/pages/Home/views/MiddlePane.tsx +++ b/ui/src/pages/Home/views/MiddlePane.tsx @@ -29,6 +29,9 @@ const getTutorials = (tutorialTitle: string) => { }; export const getTemplateCategory = (activeForm: string) => { + if (activeForm === 'datatypes') { + return 'datatypes'; + } const messagingForms = getTutorials(TUTORIAL_CATEGORIES.MESSAGING); if (messagingForms?.includes(activeForm)) { return 'messages'; @@ -68,8 +71,10 @@ export const MiddlePane = () => { return; } const templateCategory = getTemplateCategory(activeForm); - - fetch(`/api/${templateCategory}/template/${activeForm}`, { + const templateEndpoint = `/api/${templateCategory}/template${ + activeForm !== 'datatypes' ? `/${activeForm}` : '' + }`; + fetch(templateEndpoint, { method: 'GET', headers: { 'Content-Type': 'application/json', @@ -88,8 +93,7 @@ export const MiddlePane = () => { }, [activeForm]); useEffect(() => { - const payload: any = jsonPayload; - if (template && templateName === activeForm && payload) { + if (template && templateName === activeForm && jsonPayload) { buildCodeBlock(template); } }, [template, templateName, jsonPayload]); @@ -184,7 +188,7 @@ export const MiddlePane = () => { padding: DEFAULT_PADDING, }} > - + {t('serverResponse')} diff --git a/ui/src/theme.tsx b/ui/src/theme.tsx index a0cf9ff..a387949 100644 --- a/ui/src/theme.tsx +++ b/ui/src/theme.tsx @@ -81,5 +81,22 @@ export const themeOptions: ThemeOptions = { }, }, }, + MuiCssBaseline: { + styleOverrides: { + body: { + overflow: 'overlay', + scrollbarColor: '#12171d', + '&::-webkit-scrollbar, & *::-webkit-scrollbar': { + cursor: 'pointer', + backgroundColor: '#12171d', + }, + '&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb': { + borderRadius: 8, + backgroundColor: '#1e242a', + border: '3px solid #12171d', + }, + }, + }, + }, }, }; diff --git a/ui/src/translations/en.json b/ui/src/translations/en.json index 03526c3..128d8f8 100644 --- a/ui/src/translations/en.json +++ b/ui/src/translations/en.json @@ -24,6 +24,7 @@ "connected": "Connected", "connectedToFirefly": "Listening for events from backend", "connector": "Connector", + "contractAddress": "Contract Address", "contractAddressHelperText": "The contract address on your blockchain", "contractApi": "Contract API", "contractApiConfirmed": "Contract API Confirmed", @@ -32,11 +33,14 @@ "contractInterfaceTitle": "Define a Contract Interface", "contracts": "Contracts", "copyCode": "Copy Code", + "createDatatypeInfo": "Datatypes are broadcast to the network so everybody refers to the same JSON schema when validating their data.", + "createDatatypeTitle": "Define a Datatype", "dashboard": "Dashboard", "datatypeConfirmed": "Datatype Confirmed", "datatypeID": "Datatype ID", "datatypeShortInfo": "Datatypes are broadcasts to the network so everybody refers to the same JSON schema when validating their data", "datatypeTitle": "Send a Broadcast Message", + "datatypes": "Datatypes", "defineContractInterfaceInfo": "Upload the interface of your contract, describing all its methods and events, in either FFI or Solidity JSON ABI format", "deployContractInfo": "Follow the link on each step to compile and deploy a contract on your blockchain", "deployContractTitle": "Deploy a Contract", @@ -76,6 +80,7 @@ "name": "Name", "namespaceConfirmed": "Namespace Confirmed", "noConnectors": "No Token Connectors", + "noDatatypes": "No Datatypes", "nonfungible": "Non-Fungible", "notConnected": "Not Connected", "notConnectedToFirefly": "Not listening for events from backend",