├── .gitignore ├── private-data-transfer-cli ├── .gitignore ├── tsconfig.json ├── README.md ├── package.json ├── src │ ├── index.ts │ └── firefly.ts └── package-lock.json ├── fungible-to-nonfungible ├── .gitignore ├── package.json ├── .vscode │ └── launch.json ├── src │ ├── constants.ts │ └── main.ts ├── README.md ├── package-lock.json └── tsconfig.json ├── CHANGELOG.md ├── private-data-transfer-ui ├── .prettierrc.json ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── manifest.json │ └── index.html ├── src │ ├── setupTests.js │ ├── index.tsx │ ├── index.css │ ├── App.css │ ├── firefly.ts │ └── App.tsx ├── .gitignore ├── .eslintrc.js ├── tsconfig.json ├── README.md └── package.json ├── CODEOWNERS ├── combined └── mint-token-on-public-ethereum-network │ ├── sample-setup-overview.jpg │ ├── sample-contract │ ├── artifacts │ │ └── contracts │ │ │ └── FireFlySample.sol │ │ │ ├── FireFlySampleToken.dbg.json │ │ │ └── FireFlySampleToken.json │ ├── package.json │ ├── tsconfig.json │ ├── hardhat.config.ts │ ├── hardhat.config.js │ ├── scripts │ │ ├── deploy.ts │ │ └── deploy.js │ ├── contracts │ │ └── FireFlySample.sol │ └── README.md │ ├── tsconfig.json │ ├── package.json │ ├── src │ └── main.ts │ ├── README.md │ ├── build │ └── main.js │ └── package-lock.json ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── README.md ├── MAINTAINERS.md ├── SECURITY.md └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | **/.DS_Store 2 | **/node_modules -------------------------------------------------------------------------------- /private-data-transfer-cli/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | build/ 3 | -------------------------------------------------------------------------------- /fungible-to-nonfungible/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | build 3 | node_modules -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | The changelog will be updated on the next release -------------------------------------------------------------------------------- /private-data-transfer-ui/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true 3 | } 4 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: Apache-2.0 2 | 3 | - @hyperledger/firefly-samples-maintainers 4 | -------------------------------------------------------------------------------- /private-data-transfer-ui/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /private-data-transfer-ui/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly-samples/HEAD/private-data-transfer-ui/public/favicon.ico -------------------------------------------------------------------------------- /combined/mint-token-on-public-ethereum-network/sample-setup-overview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly-samples/HEAD/combined/mint-token-on-public-ethereum-network/sample-setup-overview.jpg -------------------------------------------------------------------------------- /private-data-transfer-ui/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "FireFly Private Data Transfer", 3 | "name": "FireFly Private Data Transfer", 4 | "icons": [], 5 | "start_url": ".", 6 | "display": "standalone" 7 | } 8 | -------------------------------------------------------------------------------- /combined/mint-token-on-public-ethereum-network/sample-contract/artifacts/contracts/FireFlySample.sol/FireFlySampleToken.dbg.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-dbg-1", 3 | "buildInfo": "../../build-info/27eb37c7975c994cdc9fac2b47d904c7.json" 4 | } 5 | -------------------------------------------------------------------------------- /combined/mint-token-on-public-ethereum-network/sample-contract/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hardhat-project", 3 | "devDependencies": { 4 | "@nomicfoundation/hardhat-toolbox": "^1.0.2", 5 | "hardhat": "^2.10.2", 6 | "@openzeppelin/contracts": "^4.7.3" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /private-data-transfer-ui/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /private-data-transfer-ui/src/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | 6 | ReactDOM.render( 7 | 8 | 9 | , 10 | document.getElementById('root') 11 | ); 12 | -------------------------------------------------------------------------------- /combined/mint-token-on-public-ethereum-network/sample-contract/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2020", 4 | "module": "commonjs", 5 | "esModuleInterop": true, 6 | "forceConsistentCasingInFileNames": true, 7 | "strict": true, 8 | "skipLibCheck": true 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /combined/mint-token-on-public-ethereum-network/sample-contract/hardhat.config.ts: -------------------------------------------------------------------------------- 1 | import { HardhatUserConfig } from "hardhat/config"; 2 | import "@nomicfoundation/hardhat-toolbox"; 3 | 4 | const config: HardhatUserConfig = { 5 | solidity: "0.8.9", 6 | defaultNetwork: "firefly-polygon", 7 | networks: { 8 | "firefly-polygon": { 9 | url: "http://localhost:5100", 10 | }, 11 | }, 12 | }; 13 | 14 | export default config; 15 | -------------------------------------------------------------------------------- /combined/mint-token-on-public-ethereum-network/sample-contract/hardhat.config.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | require("@nomicfoundation/hardhat-toolbox"); 4 | var config = { 5 | solidity: "0.8.9", 6 | defaultNetwork: "firefly-polygon", 7 | networks: { 8 | "firefly-polygon": { 9 | url: "http://localhost:5100", 10 | }, 11 | }, 12 | }; 13 | exports.default = config; 14 | -------------------------------------------------------------------------------- /private-data-transfer-ui/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | react-app-env.d.ts 21 | 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | -------------------------------------------------------------------------------- /private-data-transfer-ui/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: [ 3 | 'react-app', // Create React App base settings 4 | 'eslint:recommended', // recommended ESLint rules 5 | 'plugin:@typescript-eslint/recommended', // recommended rules from @typescript-eslint/eslint-plugin 6 | 'plugin:prettier/recommended', // Enables eslint-plugin-prettier and eslint-config-prettier. This will display Prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array. 7 | ], 8 | }; 9 | -------------------------------------------------------------------------------- /private-data-transfer-cli/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "module": "commonjs", 5 | "lib": ["es6"], 6 | "allowJs": true, 7 | "outDir": "build", 8 | "rootDir": "src", 9 | "strict": true, 10 | "sourceMap": true, 11 | "strictNullChecks": true, 12 | "noImplicitAny": true, 13 | "esModuleInterop": true, 14 | "resolveJsonModule": true, 15 | "noUnusedLocals": true, 16 | "noUnusedParameters": true, 17 | "skipLibCheck": true 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /fungible-to-nonfungible/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fungible-to-nonfungible", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "clean": "rm -rf ./build", 9 | "build": "npm run clean && tsc", 10 | "start": "npm run build && node ./build/main.js" 11 | }, 12 | "author": "", 13 | "license": "ISC", 14 | "dependencies": { 15 | "@hyperledger/firefly-sdk": "^1.2.7", 16 | "typescript": "^5.0.4" 17 | } 18 | } -------------------------------------------------------------------------------- /private-data-transfer-ui/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | background: #eee; 9 | } 10 | 11 | code { 12 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 13 | monospace; 14 | } 15 | 16 | h1 { 17 | margin: 0; 18 | font-size: 1.8em; 19 | } 20 | -------------------------------------------------------------------------------- /combined/mint-token-on-public-ethereum-network/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "commonjs", 5 | "lib": ["es6"], 6 | "allowJs": true, 7 | "outDir": "build", 8 | "rootDir": "src", 9 | "strict": true, 10 | "noImplicitAny": true, 11 | "esModuleInterop": true, 12 | "resolveJsonModule": true 13 | }, 14 | "exclude": [ 15 | "node_modules", 16 | "sample-contract", 17 | "build" 18 | ], 19 | } -------------------------------------------------------------------------------- /fungible-to-nonfungible/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "node", 9 | "request": "launch", 10 | "name": "Launch Program", 11 | "skipFiles": ["/**"], 12 | "program": "${workspaceFolder}/src/main.ts", 13 | "outFiles": ["${workspaceFolder}/**/*.js"] 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /combined/mint-token-on-public-ethereum-network/sample-contract/scripts/deploy.ts: -------------------------------------------------------------------------------- 1 | import { ethers } from "hardhat"; 2 | 3 | async function main() { 4 | const SampleFTContract = await ethers.getContractFactory("FireflySample"); 5 | const contract = await SampleFTContract.deploy(); 6 | 7 | await contract.deployed(); 8 | 9 | console.log(`Contract deployed to ${contract.address}`); 10 | } 11 | 12 | // We recommend this pattern to be able to use async/await everywhere 13 | // and properly handle errors. 14 | main().catch((error) => { 15 | console.error(error); 16 | process.exitCode = 1; 17 | }); 18 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | Code of Conduct Guidelines 2 | ========================== 3 | 4 | Please review the Hyperledger [Code of 5 | Conduct](https://wiki.hyperledger.org/community/hyperledger-project-code-of-conduct) 6 | before participating. It is important that we keep things civil. 7 | 8 | This work is licensed under a Creative Commons Attribution 4.0 International License. -------------------------------------------------------------------------------- /private-data-transfer-ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "esModuleInterop": true, 8 | "allowSyntheticDefaultImports": true, 9 | "strict": true, 10 | "forceConsistentCasingInFileNames": true, 11 | "noFallthroughCasesInSwitch": true, 12 | "module": "esnext", 13 | "moduleResolution": "node", 14 | "resolveJsonModule": true, 15 | "isolatedModules": true, 16 | "noEmit": true, 17 | "jsx": "react-jsx" 18 | }, 19 | "include": ["src"] 20 | } 21 | -------------------------------------------------------------------------------- /private-data-transfer-cli/README.md: -------------------------------------------------------------------------------- 1 | # Private Data Transfer CLI 2 | 3 | This sample contains a simple CLI application that demonstrates the private 4 | data transfer flow on FireFly. 5 | 6 | ## Setup 7 | 8 | To run the application, you will require a 2-party FireFly system running 9 | locally on ports 5000-5001. The easiest way to set this up is with the 10 | [FireFly CLI](https://github.com/hyperledger/firefly-cli): 11 | 12 | ``` 13 | ff init data-transfer 2 14 | ff start data-transfer 15 | ``` 16 | 17 | ## Running 18 | 19 | Once the FireFly stack is ready, set up and run the sample with: 20 | 21 | ``` 22 | npm install 23 | npm start 24 | ``` 25 | -------------------------------------------------------------------------------- /private-data-transfer-ui/README.md: -------------------------------------------------------------------------------- 1 | # Private Data Transfer UI 2 | 3 | This sample contains a frontend (React) application that demonstrates the private 4 | data transfer flow on FireFly. 5 | 6 | ## Setup 7 | 8 | To run the application, you will require a 3-party FireFly system running 9 | locally on ports 5000-5002. The easiest way to set this up is with the 10 | [FireFly CLI](https://github.com/hyperledger/firefly-cli): 11 | 12 | ``` 13 | ff init data-transfer 3 14 | ff start data-transfer 15 | ``` 16 | 17 | ## Running 18 | 19 | Once the FireFly stack is ready, set up and run the sample with: 20 | 21 | ``` 22 | npm install 23 | npm start 24 | ``` 25 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | 3 | We welcome contributions to the FireFly Project in many forms, and 4 | there's always plenty to do! 5 | 6 | Please visit the 7 | [contributors guide](https://hyperledger.github.io/firefly/contributors/contributors.html) in the 8 | docs to learn how to make contributions to this exciting project. 9 | 10 | This work is licensed under a Creative Commons Attribution 4.0 International License. 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FireFly Samples 2 | 3 | This repository contains sample applications built on top of [FireFly](https://github.com/hyperledger/firefly) using [firefly-sdk](https://github.com/hyperledger/firefly-sdk-nodejs). Use the links below to try out the samples. 4 | 5 | Function specific samples: 6 | 7 | - The simplest examples to start with are [private-data-transfer-cli](private-data-transfer-cli), which 8 | implements a basic CLI workflow, and [private-data-transfer-ui](private-data-transfer-ui), which 9 | implements the same flow in a React frontend app. 10 | 11 | Combined samples: 12 | - [Listen to Firefly events and mint tokens on public ethereum network](./combined/mint-token-on-public-ethereum-network) 13 | -------------------------------------------------------------------------------- /private-data-transfer-ui/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 13 | 14 | 15 | FireFly Private Data Transfer 16 | 17 | 18 | You need to enable JavaScript to run this app. 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /private-data-transfer-ui/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /combined/mint-token-on-public-ethereum-network/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mint-token-on-polygon-testnet", 3 | "version": "1.0.0", 4 | "description": "This sample contains a frontend (React) application that demonstrates minting an ERC20 token using FireFly on a public ethereum based blockchain network.", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "build": "tsc", 9 | "prestart": "npm run build", 10 | "start": "node build/main.js" 11 | }, 12 | "author": "", 13 | "license": "ISC", 14 | "dependencies": { 15 | "@hyperledger/firefly-sdk": "^1.2.7" 16 | }, 17 | "devDependencies": { 18 | "@types/node": "^18.15.11", 19 | "@types/ws": "^8.5.4", 20 | "typescript": "^5.0.3" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /MAINTAINERS.md: -------------------------------------------------------------------------------- 1 | # Maintainers 2 | 3 | The following is the list of current maintainers this repo: 4 | 5 | | Name | GitHub | Email | LFID | 6 | | ----------------- | --------------- | ---------------------------- | ----------------- | 7 | | Andrew Richardson | awrichar | andrew.richardson@kaleido.io | Andrew.Richardson | 8 | | Alex Shorsher | shorsher | alex.shorsher@kaleido.io | shorsher | 9 | | Peter Broadhurst | peterbroadhurst | peter.broadhurst@kaleido.io | peterbroadhurst | 10 | 11 | This list is to be kept up to date as maintainers are added or removed. 12 | 13 | For the full list of maintainers across all repos, the expectations of a maintainer and the process for becoming a maintainer, please see the [FireFly Maintainers page on the Hyperledger Wiki](https://wiki.hyperledger.org/display/FIR/Maintainers). 14 | -------------------------------------------------------------------------------- /combined/mint-token-on-public-ethereum-network/sample-contract/contracts/FireFlySample.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.9; 3 | 4 | import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; 5 | import "@openzeppelin/contracts/access/Ownable.sol"; 6 | import "@openzeppelin/contracts/utils/Counters.sol"; 7 | 8 | contract FireFlySampleToken is ERC20, Ownable { 9 | using Counters for Counters.Counter; 10 | 11 | Counters.Counter private _tokenIdCounter; 12 | 13 | mapping(address => bool) private minted; 14 | mapping(address => bool) private received; 15 | 16 | constructor() ERC20("Firefly Sample Token", "FS") {} 17 | 18 | function mint(address to, uint256 amount) external { 19 | _mint(to, amount); 20 | } 21 | 22 | function burn(address from, uint256 amount) external { 23 | require(from == _msgSender(), "ERC20NoData: caller is not owner"); 24 | _burn(from, amount); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /fungible-to-nonfungible/src/constants.ts: -------------------------------------------------------------------------------- 1 | // Copyright © 2023 Kaleido, Inc. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | export const FIREFLY_URL = 18 | process.env["FIREFLY_URL"] || "http://localhost:5000"; 19 | export const FUNGIBLE_POOL_ID = process.env["FUNGIBLE_POOL_ID"]; 20 | export const NONFUNGIBLE_POOL_ID = process.env["NONFUNGIBLE_POOL_ID"]; 21 | export const FIREFLY_ADDRESS = process.env["FIREFLY_ADDRESS"]; 22 | export const NFT_COST = 10; 23 | -------------------------------------------------------------------------------- /private-data-transfer-cli/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "private-data-transfer-cli", 3 | "version": "1.0.0", 4 | "description": "Sample FireFly application demonstrating a simple data transfer", 5 | "main": "./build/index.js", 6 | "scripts": { 7 | "clean": "rimraf ./build", 8 | "build": "npm run clean && tsc", 9 | "start": "ts-node src/index.ts", 10 | "test": "echo \"Error: no test specified\" && exit 1" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git+https://github.com/hyperledger/firefly-samples.git" 15 | }, 16 | "author": "", 17 | "license": "Apache-2.0", 18 | "bugs": { 19 | "url": "https://github.com/hyperledger/firefly-samples/issues" 20 | }, 21 | "homepage": "https://github.com/hyperledger/firefly-samples#readme", 22 | "dependencies": { 23 | "axios": "^1.8.3", 24 | "ts-node": "^10.0.0", 25 | "typescript": "^4.3.2", 26 | "ws": "^7.4.6" 27 | }, 28 | "devDependencies": { 29 | "@types/node": "^15.6.1", 30 | "@types/ws": "^7.4.4", 31 | "rimraf": "^3.0.2" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Hyperledger Security Policy 2 | 3 | ## Reporting a Security Bug 4 | 5 | If you think you have discovered a security issue in any of the Hyperledger projects, we'd love to 6 | hear from you. We will take all security bugs seriously and if confirmed upon investigation we will 7 | patch it within a reasonable amount of time and release a public security bulletin discussing the 8 | impact and credit the discoverer. 9 | 10 | There are two ways to report a security bug. The easiest is to email a description of the flaw and 11 | any related information (e.g. reproduction steps, version) to 12 | [security at hyperledger dot org](mailto:security@hyperledger.org). 13 | 14 | The other way is to file a confidential security bug in our 15 | [JIRA bug tracking system](https://jira.hyperledger.org). Be sure to set the “Security Level” to 16 | “Security issue”. 17 | 18 | The process by which the Hyperledger Security Team handles security bugs is documented further in 19 | our [Defect Response page](https://wiki.hyperledger.org/display/SEC/Defect+Response) on our 20 | [wiki](https://wiki.hyperledger.org). -------------------------------------------------------------------------------- /private-data-transfer-cli/src/index.ts: -------------------------------------------------------------------------------- 1 | import { FireFly, FireFlyListener, FireFlyData } from "./firefly"; 2 | 3 | const TIMEOUT = 15 * 1000; 4 | 5 | const dataValues = (data: FireFlyData[]) => data.map(d => d.value); 6 | 7 | async function main() { 8 | const firefly1 = new FireFly(5000); 9 | const firefly2 = new FireFly(5001); 10 | const ws1 = new FireFlyListener(5000); 11 | const ws2 = new FireFlyListener(5001); 12 | await ws1.ready(); 13 | await ws2.ready(); 14 | 15 | const sendData: FireFlyData[] = [ 16 | { value: 'Hello' }, 17 | { value: 'World' }, 18 | ]; 19 | 20 | // Note: this is currently performing broadcast (not private transfer) 21 | // TODO: use private transfer 22 | console.log(`Broadcasting data values from firefly1: ${dataValues(sendData)}`); 23 | await firefly1.sendBroadcast(sendData); 24 | 25 | const receivedMessage = await ws2.firstMessageOfType('message_confirmed', TIMEOUT); 26 | if (receivedMessage === undefined) { 27 | throw new Error('No message received'); 28 | } 29 | 30 | const receivedData = await firefly2.retrieveData(receivedMessage.message.data); 31 | console.log(`Received data value on firefly2: ${dataValues(receivedData)}`); 32 | 33 | ws1.close(); 34 | ws2.close(); 35 | } 36 | 37 | main().catch(err => { 38 | console.error(`Failed to run: ${err}`); 39 | }); 40 | -------------------------------------------------------------------------------- /private-data-transfer-ui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "private-data-transfer-ui", 3 | "version": "0.1.0", 4 | "description": "Sample FireFly application demonstrating a simple data transfer", 5 | "dependencies": { 6 | "@material-ui/core": "^4.11.4", 7 | "@material-ui/icons": "^4.11.2", 8 | "@testing-library/jest-dom": "^5.16.0", 9 | "@testing-library/react": "^16.0.0", 10 | "@testing-library/user-event": "^14.0.0", 11 | "axios": "^0.21.1", 12 | "dayjs": "^1.10.5", 13 | "react": "^17.0.2", 14 | "react-dom": "^17.0.2", 15 | "react-scripts": "5.0.0", 16 | "reconnecting-websocket": "^4.4.0", 17 | "typescript": "^4.3.2" 18 | }, 19 | "scripts": { 20 | "start": "react-scripts start", 21 | "build": "react-scripts build", 22 | "test": "react-scripts test", 23 | "eject": "react-scripts eject", 24 | "lint": "eslint .", 25 | "format": "prettier --write ." 26 | }, 27 | "eslintConfig": { 28 | "extends": [ 29 | "react-app", 30 | "react-app/jest" 31 | ] 32 | }, 33 | "browserslist": { 34 | "production": [ 35 | ">0.2%", 36 | "not dead", 37 | "not op_mini all" 38 | ], 39 | "development": [ 40 | "last 1 chrome version", 41 | "last 1 firefox version", 42 | "last 1 safari version" 43 | ] 44 | }, 45 | "devDependencies": { 46 | "@types/jest": "^26.0.23", 47 | "@types/node": "^15.12.2", 48 | "@types/react": "^17.0.9", 49 | "@types/react-dom": "^17.0.6", 50 | "eslint-config-prettier": "^8.3.0", 51 | "eslint-plugin-prettier": "^3.4.0", 52 | "prettier": "^2.3.1" 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /private-data-transfer-cli/src/firefly.ts: -------------------------------------------------------------------------------- 1 | import axios, { AxiosInstance } from 'axios'; 2 | import WebSocket from 'ws'; 3 | 4 | export interface FireFlyData { 5 | value: string; 6 | } 7 | 8 | export interface FireFlyDataIdentifier { 9 | id: string; 10 | hash: string; 11 | } 12 | 13 | export interface FireFlyMessage { 14 | id: string; 15 | type: string; 16 | message: { 17 | data: FireFlyDataIdentifier[]; 18 | } 19 | } 20 | 21 | export class FireFlyListener { 22 | private ws: WebSocket; 23 | private connected: Promise; 24 | private messages: FireFlyMessage[] = []; 25 | 26 | constructor(port: number, ns = 'default') { 27 | this.ws = new WebSocket(`ws://localhost:${port}/ws?namespace=${ns}&ephemeral&autoack`); 28 | this.connected = new Promise(resolve => { 29 | this.ws.on('open', resolve); 30 | this.ws.on('message', (data: string) => { 31 | this.messages.push(JSON.parse(data)); 32 | }); 33 | }); 34 | } 35 | 36 | ready() { 37 | return this.connected; 38 | } 39 | 40 | close() { 41 | this.ws.close(); 42 | } 43 | 44 | async firstMessageOfType(type: string, timeout: number) { 45 | const expire = Date.now() + timeout; 46 | while (Date.now() < expire) { 47 | for (const message of this.messages) { 48 | if (message.type === type) { 49 | return message; 50 | } 51 | } 52 | await new Promise(resolve => setTimeout(resolve, 100)); 53 | } 54 | return undefined; 55 | } 56 | } 57 | 58 | export class FireFly { 59 | private rest: AxiosInstance; 60 | private ns = 'default'; 61 | 62 | constructor(port: number) { 63 | this.rest = axios.create({ baseURL: `http://localhost:${port}/api/v1` }); 64 | } 65 | 66 | async sendBroadcast(data: FireFlyData[]) { 67 | await this.rest.post(`/namespaces/${this.ns}/messages/broadcast`, { data }); 68 | } 69 | 70 | retrieveData(data: FireFlyDataIdentifier[]) { 71 | return Promise.all(data.map(d => 72 | this.rest.get(`/namespaces/${this.ns}/data/${d.id}`) 73 | .then(response => response.data))); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /fungible-to-nonfungible/README.md: -------------------------------------------------------------------------------- 1 | # Fungible to Non-Fungible Token Swap 2 | 3 | This sample app illustrates a very trivial token swap implemented in a FireFly App. It uses two contracts, an ERC-20 (fungible) and an ERC-721 (non-fungible) contract. 4 | 5 |  6 | 7 | 1. Any wallet can send a certain number of ERC-20 tokens to the FireFly wallet address. 8 | 1. FireFly will see the token transfer event on the blockchain and track it 9 | 1. FireFly will then notify the sample app over a WebSocket connection 10 | 1. If the amount is sufficient, the sample app will call FireFly's Mint API to send a new NFT to the original wallet that sent the ERC-20 tokens 11 | 1. FireFly will call the mint function on the ERC-721 contract 12 | 1. The new NFT will show up in the wallet app 13 | 14 | ## Setup 15 | 16 | Before you can run this sample you will need: 17 | 18 | - A FireFly stack up and running using a public blockchain 19 | - Another wallet app connected to this same blockchain 20 | - An ERC-20 and ERC-721 contract deployed to the chain 21 | - A Token Pool created for each contract in FireFly 22 | - Node.js installed on your dev machine 23 | 24 | ## Configuring the sample 25 | 26 | Export the following environment variables and set them to the ID for each Token Pool you created above: 27 | 28 | ```bash 29 | export FUNGIBLE_POOL_ID="" 30 | export NONFUNGIBLE_POOL_ID="" 31 | ``` 32 | 33 | Export the following environment variable and set it to your FireFly signing address: 34 | 35 | ```bash 36 | export FIREFLY_ADDRESS="" 37 | ``` 38 | 39 | To find out your FireFly signing address you can run: 40 | 41 | ```bash 42 | ff accounts list | grep address 43 | ``` 44 | 45 | ## Building and running the sample 46 | 47 | At this point you should be able to run: 48 | 49 | ``` 50 | npm install 51 | ``` 52 | 53 | ``` 54 | npm start 55 | ``` 56 | 57 | ## Using the sample 58 | 59 | If you don't have any ERC-20 tokens in another wallet for the contract that you're using, you will need to mint/transfer some tokens to another wallet. 60 | 61 | Then if you transfer 10 tokens back to FireFly, you should see the sample app mint an NFT in exchange. 62 | -------------------------------------------------------------------------------- /fungible-to-nonfungible/src/main.ts: -------------------------------------------------------------------------------- 1 | // Copyright © 2023 Kaleido, Inc. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | import FireFly, { FireFlySubscriptionBase } from "@hyperledger/firefly-sdk"; 18 | import { 19 | FIREFLY_URL, 20 | FUNGIBLE_POOL_ID, 21 | FIREFLY_ADDRESS, 22 | NFT_COST, 23 | NONFUNGIBLE_POOL_ID, 24 | } from "./constants"; 25 | 26 | // Create an instance of the FireFly SDK 27 | const firefly = new FireFly({ host: FIREFLY_URL }); 28 | 29 | // Create a subscription that only gives us events for confirmed token transfers 30 | const sub: FireFlySubscriptionBase = { 31 | filter: { 32 | events: "token_transfer_confirmed", 33 | }, 34 | }; 35 | 36 | // Listen for events and run the callback function when a new event arrives 37 | firefly.listen(sub, async (socket, event) => { 38 | // Make sure this was a transfer of fungible tokens to my FireFly node 39 | if ( 40 | event.tokenTransfer?.pool === FUNGIBLE_POOL_ID && 41 | event.tokenTransfer?.to === FIREFLY_ADDRESS 42 | ) { 43 | // Convert the amount of tokens transferred to a number so we can do math 44 | const amount = Number(event.tokenTransfer?.amount) / Math.pow(10, 18); 45 | const purchaser = event.tokenTransfer?.from; 46 | console.log(`received ${amount} from ${purchaser}`); 47 | // If the amount was greater than the defined cost for the NFT, mint a new NFT to the original sender 48 | if (amount >= NFT_COST) { 49 | await firefly.mintTokens({ 50 | pool: NONFUNGIBLE_POOL_ID, 51 | amount: "1", 52 | to: purchaser, 53 | }); 54 | console.log(`minted an nft to ${purchaser}`); 55 | } 56 | } 57 | }); 58 | 59 | // Wait for ctrl+c to exit the app 60 | process.on("SIGINT", function () { 61 | console.log("\nclosed"); 62 | process.exit(0); 63 | }); 64 | console.log("running\npress ctrl+c to exit"); 65 | process.stdin.resume(); 66 | -------------------------------------------------------------------------------- /combined/mint-token-on-public-ethereum-network/src/main.ts: -------------------------------------------------------------------------------- 1 | // Copyright © 2023 Kaleido, Inc. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | import FireFly, { FireFlySubscriptionBase } from "@hyperledger/firefly-sdk"; 18 | 19 | let totalMinted = 0; 20 | let MAX_TOTAL_MINTED = 2; 21 | if ( 22 | !process.env.ACCOUNT_ADDRESS || 23 | !process.env.ACCOUNT_ADDRESS.startsWith("0x") 24 | ) { 25 | console.log( 26 | "ACCOUNT_ADDRESS must be set to a valid eth address, you should use the account of your local Firefly stack." 27 | ); 28 | process.exit(1); 29 | } 30 | 31 | /** 32 | * Main firefly SDK example code START 33 | * This sample code demonstrate how to listen to firefly events using filters 34 | * and mint tokens whenever the selected event satisfy our check 35 | */ 36 | 37 | const firefly = new FireFly({ host: "http://localhost:5000" }); 38 | const sub: FireFlySubscriptionBase = { 39 | filter: { 40 | events: "token_transfer_confirmed", // filter on confirmed transfers only 41 | }, 42 | }; 43 | // example code for listening to an event using Firefly SDK 44 | firefly.listen(sub, async (socket, event) => { 45 | // received a token transfer confirmed event 46 | // now we can do something 47 | // 1. let's figure out more information about this transfer 48 | const operations = await firefly.getOperations({ 49 | tx: event.tx, 50 | type: "token_transfer", 51 | }); 52 | if (operations.length > 0) { 53 | console.log(`Retrieved operation: ${JSON.stringify(operations[0].input)}`); 54 | // 2. if the transfer is made to our account address 55 | // do a random thing, e.g. mint the same amount again if the transfer is a mint... 56 | if ( 57 | operations[0].input?.to?.toLowerCase() === process.env.ACCOUNT_ADDRESS && 58 | operations[0].input?.type === "mint" 59 | ) { 60 | console.log("Mint event detected, minting another token..."); 61 | await firefly.mintTokens({ 62 | amount: operations[0].input?.amount, 63 | idempotencyKey: operations[0].input?.localId, 64 | pool: operations[0].input?.pool, 65 | }); 66 | totalMinted++; 67 | } 68 | } 69 | }); 70 | 71 | /** 72 | * Main firefly SDK example code END 73 | */ 74 | 75 | function wait() { 76 | if (totalMinted < MAX_TOTAL_MINTED) { 77 | setTimeout(wait, 5000); 78 | console.log( 79 | `Waiting for more tokens to be minted..., total token minted during the run: ${totalMinted}` 80 | ); 81 | } else { 82 | console.log( 83 | `Exiting the application with ${totalMinted}/${MAX_TOTAL_MINTED} minted.` 84 | ); 85 | process.exit(0); 86 | } 87 | } 88 | wait(); 89 | -------------------------------------------------------------------------------- /combined/mint-token-on-public-ethereum-network/sample-contract/README.md: -------------------------------------------------------------------------------- 1 | ## Create the sample ERC-20 token contract 2 | 3 | _This instruction is based on the 2022 Hyperledger workshop created by [Nicko Guyer](https://github.com/nguyer) for creating NFT, you can find the original version [here](https://github.com/nguyer/global-forum-2022-firefly-workshop)_ 4 | 5 | You can either use the [contract in this repo](../contracts/FireFlySample.sol) as a starting point, or you can create your own. The [Open Zeppelin Contracts Wizard](https://docs.openzeppelin.com/contracts/4.x/wizard) is a great starting point if you want to create your own contract. 6 | ### Compile your contract 7 | 8 | If you're using this git repo, you can run: 9 | 10 | ``` 11 | npm install 12 | npx hardhat compile 13 | ``` 14 | 15 | This will create a directory structure under `artifacts` which will contain a `.json` file containing the ABI and the EVM bytecode for your contract. 16 | 17 | ## Deploy your contract 18 | 19 | You will need the `.json` file that your compiler generated in the previous step. If you used hardhat to compile a contract in this project, it will be at [./artifacts/contracts/FireflySample.sol/FireflySampleToken.json](./artifacts/contracts/FireflySample.sol/FireflySampleToken.json) 20 | 21 | If you compiled your contract with Remix, the `.json` file will be under the `artifacts` directory. Copy the contents of this file to a file on your local file system. 22 | 23 | Follow the [deploy custom smart contract example](https://hyperledger.github.io/firefly/tutorials/custom_contracts/ethereum.html#contract-deployment) to deploy your smart contract. Take a note of the smart contract address and you will need to replace `0x4C4706aDE858c1D182FBdD1A8A29353b7455b678` with that address for the instructions below. 24 | 25 | It's a good idea to search for your contract address on [Polygonscan](https://mumbai.polygonscan.com/) to find out what block number in which the contract was constructed. You will need this for the next step. 26 | 27 | ## Create a Token Pool 28 | 29 | To index our token and track mint / transfer events we are going to create a Token Pool in FireFly. 30 | 31 | Navigate to the FireFly Sandbox at: [http://127.0.0.1:5109](http://127.0.0.1:5109). On the Tokens tab fill in the following details to **Create a Token Pool**: 32 | 33 | | Field | Value | 34 | | -------------------- | --------------------------------------------------------------------- | 35 | | **Pool Name** | `FireflySample` | 36 | | **Pool Symbol** | (leave blank) | 37 | | **Type** | Fungible | 38 | | **Contract address** | `0x4C4706aDE858c1D182FBdD1A8A29353b7455b678` | 39 | | **Block number** | `` | 40 | 41 | ## Mint a token to your wallet 42 | 43 | Before you do this step, make sure you have the sample application running following instructions [here](../README.md#running) 44 | 45 | After you have the sample application running, you can use the [Firefly Sandbox Mint Token tab](http://127.0.0.1:5109/home?action=tokens.mint) to mint a Fungible token using the registered token pool `FireflySample`. 46 | 47 | 48 | -------------------------------------------------------------------------------- /private-data-transfer-ui/src/firefly.ts: -------------------------------------------------------------------------------- 1 | // Copyright © 2021 Kaleido, Inc. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | import axios, { AxiosInstance } from 'axios'; 18 | 19 | export interface FireFlyDataSend { 20 | value: string; 21 | } 22 | 23 | export interface FireFlyData extends FireFlyDataSend { 24 | id: string; 25 | } 26 | 27 | export interface FireFlyDataIdentifier { 28 | id: string; 29 | hash: string; 30 | } 31 | 32 | export interface FireFlyMessage { 33 | header: { 34 | id: string; 35 | author: string; 36 | created: string; 37 | }; 38 | local: boolean; 39 | data: FireFlyDataIdentifier[]; 40 | } 41 | 42 | export interface FireFlyMessageInput { 43 | data: FireFlyDataSend[]; 44 | group: { 45 | name?: string; 46 | members: FireFlyMemberInput[]; 47 | }; 48 | } 49 | 50 | export interface FireFlyMemberInput { 51 | identity: string; 52 | } 53 | 54 | export interface FireFlyOrganization { 55 | name: string; 56 | identity: string; 57 | } 58 | 59 | export interface FireFlyMessageEvent { 60 | type: string; 61 | message: FireFlyMessage; 62 | } 63 | 64 | export interface FireFlyStatus { 65 | defaults: { 66 | namespace: string; 67 | }; 68 | node: { 69 | registered: boolean; 70 | name: string; 71 | }; 72 | org: { 73 | registered: boolean; 74 | name: string; 75 | identity: string; 76 | }; 77 | } 78 | 79 | export class FireFly { 80 | private rest: AxiosInstance; 81 | private ns = 'default'; 82 | 83 | constructor(host: string) { 84 | this.rest = axios.create({ baseURL: `${host}/api/v1` }); 85 | } 86 | 87 | async sendBroadcast(data: FireFlyDataSend[]): Promise { 88 | await this.rest.post(`/namespaces/${this.ns}/messages/broadcast`, { data }); 89 | } 90 | 91 | async sendPrivate(privateMessage: FireFlyMessageInput): Promise { 92 | await this.rest.post( 93 | `/namespaces/${this.ns}/messages/private`, 94 | privateMessage 95 | ); 96 | } 97 | 98 | async getMessages(limit: number): Promise { 99 | const response = await this.rest.get( 100 | `/namespaces/${this.ns}/messages?limit=${limit}&type=private&type=broadcast` 101 | ); 102 | return response.data; 103 | } 104 | 105 | async getStatus(): Promise { 106 | const response = await this.rest.get(`/status`); 107 | return response.data; 108 | } 109 | 110 | async getOrgs(): Promise { 111 | const response = await this.rest.get( 112 | `/network/organizations` 113 | ); 114 | return response.data; 115 | } 116 | 117 | retrieveData(data: FireFlyDataIdentifier[]): Promise { 118 | return Promise.all( 119 | data.map((d) => 120 | this.rest 121 | .get(`/namespaces/${this.ns}/data/${d.id}`) 122 | .then((response) => response.data) 123 | ) 124 | ); 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /combined/mint-token-on-public-ethereum-network/sample-contract/scripts/deploy.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 3 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 4 | return new (P || (P = Promise))(function (resolve, reject) { 5 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 6 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 7 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 8 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 9 | }); 10 | }; 11 | var __generator = (this && this.__generator) || function (thisArg, body) { 12 | var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; 13 | return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; 14 | function verb(n) { return function (v) { return step([n, v]); }; } 15 | function step(op) { 16 | if (f) throw new TypeError("Generator is already executing."); 17 | while (g && (g = 0, op[0] && (_ = 0)), _) try { 18 | if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; 19 | if (y = 0, t) op = [op[0] & 2, t.value]; 20 | switch (op[0]) { 21 | case 0: case 1: t = op; break; 22 | case 4: _.label++; return { value: op[1], done: false }; 23 | case 5: _.label++; y = op[1]; op = [0]; continue; 24 | case 7: op = _.ops.pop(); _.trys.pop(); continue; 25 | default: 26 | if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } 27 | if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } 28 | if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } 29 | if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } 30 | if (t[2]) _.ops.pop(); 31 | _.trys.pop(); continue; 32 | } 33 | op = body.call(thisArg, _); 34 | } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } 35 | if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; 36 | } 37 | }; 38 | Object.defineProperty(exports, "__esModule", { value: true }); 39 | var hardhat_1 = require("hardhat"); 40 | function main() { 41 | return __awaiter(this, void 0, void 0, function () { 42 | var SampleFTContract, contract; 43 | return __generator(this, function (_a) { 44 | switch (_a.label) { 45 | case 0: return [4 /*yield*/, hardhat_1.ethers.getContractFactory("FireflySample")]; 46 | case 1: 47 | SampleFTContract = _a.sent(); 48 | return [4 /*yield*/, SampleFTContract.deploy()]; 49 | case 2: 50 | contract = _a.sent(); 51 | return [4 /*yield*/, contract.deployed()]; 52 | case 3: 53 | _a.sent(); 54 | console.log("Contract deployed to ".concat(contract.address)); 55 | return [2 /*return*/]; 56 | } 57 | }); 58 | }); 59 | } 60 | // We recommend this pattern to be able to use async/await everywhere 61 | // and properly handle errors. 62 | main().catch(function (error) { 63 | console.error(error); 64 | process.exitCode = 1; 65 | }); 66 | -------------------------------------------------------------------------------- /combined/mint-token-on-public-ethereum-network/README.md: -------------------------------------------------------------------------------- 1 | # Mint Token on Polygon Testnet 2 | 3 | This sample includes a Node.js application that demonstrates how to mint more ERC20 tokens when a mint event is detected on a public Ethereum-based blockchain network. It demonstrates 2 key features of the [FireFly Node.js SDK](https://github.com/hyperledger/firefly-sdk-nodejs): subscribing to blockchain events, and submitting new blockchain transactions. 4 | 5 | The core logic for this sample can be found [here](https://github.com/kaleido-io/firefly-samples/blob/combined-sample/combined/mint-token-on-public-ethereum-network/src/firefly-client.ts?plain%3D1#L37-L69): 6 | 7 | ```javascript 8 | const firefly = new FireFly({ host: "http://localhost:5000" }); 9 | const sub: FireFlySubscriptionBase = { 10 | filter: { 11 | events: "token_transfer_confirmed", // filter on confirmed transfers only 12 | }, 13 | }; 14 | // example code for listening to an event using Firefly SDK 15 | firefly.listen(sub, async (socket, event) => { 16 | // received a token transfer confirmed event 17 | // now we can do something 18 | // 1. let's figure out more information about this transfer 19 | const operations = await firefly.getOperations({ 20 | tx: event.tx, 21 | type: "token_transfer", 22 | }); 23 | if (operations.length > 0) { 24 | console.log(`Retrieved operation: ${JSON.stringify(operations[0].input)}`); 25 | // 2. if the transfer is made to our account address 26 | // do a random thing, e.g. mint the same amount again if the transfer is a mint... 27 | if ( 28 | operations[0].input?.to?.toLowerCase() === process.env.ACCOUNT_ADDRESS && 29 | operations[0].input?.type === "mint" 30 | ) { 31 | console.log("Mint the same token again to get us into a loop"); 32 | await firefly.mintTokens({ 33 | amount: operations[0].input?.amount, 34 | idempotencyKey: operations[0].input?.localId, 35 | pool: operations[0].input?.pool, 36 | }); 37 | totalMinted++; 38 | } 39 | } 40 | }); 41 | ``` 42 | 43 | The diagram below provides an overview of the steps required to set up a FireFly local stack that connects to the Polygon Testnet. 44 | 45 | You will use both the [FireFly CLI](https://github.com/hyperledger/firefly-cli) and the [FireFly Sandbox UI](https://github.com/hyperledger/firefly-sandbox) to complete this process. Once you have completed the setup, you can run a sample Node.js application that will automatically mint tokens in a loop after you have manually minted a token using the Sandbox UI. 46 | 47 |  48 | 49 | ## Setup 50 | 51 | To run the application, you will need to have the following setup: 52 | 53 | 1. A local Firefly stack that is running in gateway mode and is targeting the Polygon Testnet. You can follow the instructions provided in [this tutorial](https://hyperledger.github.io/firefly/tutorials/chains/polygon_testnet.html#polygon-testnet) to set up the stack. 54 | 2. The Firefly stack needs to be configured with a token pool. You can read more about token pools [here](https://hyperledger.github.io/firefly/tutorials/tokens/#what-is-a-pool). They provide common set of functions to interact with different variants of smart contract token implementations. They also index the smart contract for a token, allowing you to subscribe to events relating to token transfers and query account balances. 55 | - For this sample there are two options available to create a FireFly token pool: 56 | - You can use the pre-deployed ERC20 smart contract address `0x4C4706aDE858c1D182FBdD1A8A29353b7455b678` on the Polygon Mumbai test net, which has been set up to be mintable by any account. If you choose this option, you should follow the steps outlined in the "Create a Token Pool" section of [the README.md file in the sample-contract directory](./sample-contract/README.md#create-a-token-pool). 57 | - Alternatively, you can deploy your own smart contract for an ERC20 token by following all the steps provided in the [./sample-contract](./sample-contract) directory. 58 | 59 | ## Running 60 | 61 | Once the FireFly stack is ready, run the sample node.js app with: 62 | 63 | ``` 64 | # make sure you are running the commands below in the same directory of this Readme file 65 | # for example: cd combined/mint-token-on-public-ethereum-network 66 | export ACCOUNT_ADDRESS=$(ff accounts list polygon | jq -r '.[0].address') && echo "ACCOUNT_ADDRESS is now set to $ACCOUNT_ADDRESS" 67 | npm install 68 | npm start 69 | ``` 70 | -------------------------------------------------------------------------------- /combined/mint-token-on-public-ethereum-network/build/main.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | // Copyright © 2023 Kaleido, Inc. 3 | // 4 | // SPDX-License-Identifier: Apache-2.0 5 | // 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | // 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | // 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 18 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 19 | return new (P || (P = Promise))(function (resolve, reject) { 20 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 21 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 22 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 23 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 24 | }); 25 | }; 26 | var __generator = (this && this.__generator) || function (thisArg, body) { 27 | var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; 28 | return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; 29 | function verb(n) { return function (v) { return step([n, v]); }; } 30 | function step(op) { 31 | if (f) throw new TypeError("Generator is already executing."); 32 | while (g && (g = 0, op[0] && (_ = 0)), _) try { 33 | if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; 34 | if (y = 0, t) op = [op[0] & 2, t.value]; 35 | switch (op[0]) { 36 | case 0: case 1: t = op; break; 37 | case 4: _.label++; return { value: op[1], done: false }; 38 | case 5: _.label++; y = op[1]; op = [0]; continue; 39 | case 7: op = _.ops.pop(); _.trys.pop(); continue; 40 | default: 41 | if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } 42 | if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } 43 | if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } 44 | if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } 45 | if (t[2]) _.ops.pop(); 46 | _.trys.pop(); continue; 47 | } 48 | op = body.call(thisArg, _); 49 | } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } 50 | if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; 51 | } 52 | }; 53 | var __importDefault = (this && this.__importDefault) || function (mod) { 54 | return (mod && mod.__esModule) ? mod : { "default": mod }; 55 | }; 56 | Object.defineProperty(exports, "__esModule", { value: true }); 57 | var firefly_sdk_1 = __importDefault(require("@hyperledger/firefly-sdk")); 58 | var totalMinted = 0; 59 | var MAX_TOTAL_MINTED = 2; 60 | if (!process.env.ACCOUNT_ADDRESS || 61 | !process.env.ACCOUNT_ADDRESS.startsWith("0x")) { 62 | console.log("ACCOUNT_ADDRESS must be set to a valid eth address, you should use the account of your local Firefly stack."); 63 | process.exit(1); 64 | } 65 | /** 66 | * Main firefly SDK example code START 67 | * This sample code demonstrate how to listen to firefly events using filters 68 | * and mint tokens whenever the selected event satisfy our check 69 | */ 70 | var firefly = new firefly_sdk_1.default({ host: "http://localhost:5000" }); 71 | var sub = { 72 | filter: { 73 | events: "token_transfer_confirmed", // filter on confirmed transfers only 74 | }, 75 | }; 76 | // example code for listening to an event using Firefly SDK 77 | firefly.listen(sub, function (socket, event) { return __awaiter(void 0, void 0, void 0, function () { 78 | var operations; 79 | var _a, _b, _c, _d, _e, _f; 80 | return __generator(this, function (_g) { 81 | switch (_g.label) { 82 | case 0: return [4 /*yield*/, firefly.getOperations({ 83 | tx: event.tx, 84 | type: "token_transfer", 85 | })]; 86 | case 1: 87 | operations = _g.sent(); 88 | if (!(operations.length > 0)) return [3 /*break*/, 3]; 89 | console.log("Retrieved operation: ".concat(JSON.stringify(operations[0].input))); 90 | if (!(((_b = (_a = operations[0].input) === null || _a === void 0 ? void 0 : _a.to) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === process.env.ACCOUNT_ADDRESS && 91 | ((_c = operations[0].input) === null || _c === void 0 ? void 0 : _c.type) === "mint")) return [3 /*break*/, 3]; 92 | console.log("Mint event detected, minting another token..."); 93 | return [4 /*yield*/, firefly.mintTokens({ 94 | amount: (_d = operations[0].input) === null || _d === void 0 ? void 0 : _d.amount, 95 | idempotencyKey: (_e = operations[0].input) === null || _e === void 0 ? void 0 : _e.localId, 96 | pool: (_f = operations[0].input) === null || _f === void 0 ? void 0 : _f.pool, 97 | })]; 98 | case 2: 99 | _g.sent(); 100 | totalMinted++; 101 | _g.label = 3; 102 | case 3: return [2 /*return*/]; 103 | } 104 | }); 105 | }); }); 106 | /** 107 | * Main firefly SDK example code END 108 | */ 109 | function wait() { 110 | if (totalMinted < MAX_TOTAL_MINTED) { 111 | setTimeout(wait, 5000); 112 | console.log("Waiting for more tokens to be minted..., total token minted during the run: ".concat(totalMinted)); 113 | } 114 | else { 115 | console.log("Exiting the application with ".concat(totalMinted, "/").concat(MAX_TOTAL_MINTED, " minted.")); 116 | process.exit(0); 117 | } 118 | } 119 | wait(); 120 | -------------------------------------------------------------------------------- /fungible-to-nonfungible/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fungible-to-nonfungible", 3 | "version": "1.0.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "fungible-to-nonfungible", 9 | "version": "1.0.0", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@hyperledger/firefly-sdk": "^1.2.7", 13 | "typescript": "^5.0.4" 14 | } 15 | }, 16 | "node_modules/@hyperledger/firefly-sdk": { 17 | "version": "1.2.7", 18 | "resolved": "https://registry.npmjs.org/@hyperledger/firefly-sdk/-/firefly-sdk-1.2.7.tgz", 19 | "integrity": "sha512-V1o1ifvTv2phlnhyJwNuDs/iy7AZ+xZvavsrqHCcC4kt7nESjw/2iFB1xuPFNh0gfXzJj4jOUqygxqwvc+KwdA==", 20 | "dependencies": { 21 | "axios": "^0.26.1", 22 | "form-data": "^4.0.0", 23 | "ws": "^8.5.0" 24 | } 25 | }, 26 | "node_modules/asynckit": { 27 | "version": "0.4.0", 28 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 29 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" 30 | }, 31 | "node_modules/axios": { 32 | "version": "0.26.1", 33 | "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", 34 | "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", 35 | "dependencies": { 36 | "follow-redirects": "^1.14.8" 37 | } 38 | }, 39 | "node_modules/combined-stream": { 40 | "version": "1.0.8", 41 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 42 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 43 | "dependencies": { 44 | "delayed-stream": "~1.0.0" 45 | }, 46 | "engines": { 47 | "node": ">= 0.8" 48 | } 49 | }, 50 | "node_modules/delayed-stream": { 51 | "version": "1.0.0", 52 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 53 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", 54 | "engines": { 55 | "node": ">=0.4.0" 56 | } 57 | }, 58 | "node_modules/follow-redirects": { 59 | "version": "1.15.2", 60 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", 61 | "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", 62 | "funding": [ 63 | { 64 | "type": "individual", 65 | "url": "https://github.com/sponsors/RubenVerborgh" 66 | } 67 | ], 68 | "engines": { 69 | "node": ">=4.0" 70 | }, 71 | "peerDependenciesMeta": { 72 | "debug": { 73 | "optional": true 74 | } 75 | } 76 | }, 77 | "node_modules/form-data": { 78 | "version": "4.0.0", 79 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", 80 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", 81 | "dependencies": { 82 | "asynckit": "^0.4.0", 83 | "combined-stream": "^1.0.8", 84 | "mime-types": "^2.1.12" 85 | }, 86 | "engines": { 87 | "node": ">= 6" 88 | } 89 | }, 90 | "node_modules/mime-db": { 91 | "version": "1.52.0", 92 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 93 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 94 | "engines": { 95 | "node": ">= 0.6" 96 | } 97 | }, 98 | "node_modules/mime-types": { 99 | "version": "2.1.35", 100 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 101 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 102 | "dependencies": { 103 | "mime-db": "1.52.0" 104 | }, 105 | "engines": { 106 | "node": ">= 0.6" 107 | } 108 | }, 109 | "node_modules/typescript": { 110 | "version": "5.0.4", 111 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", 112 | "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==", 113 | "bin": { 114 | "tsc": "bin/tsc", 115 | "tsserver": "bin/tsserver" 116 | }, 117 | "engines": { 118 | "node": ">=12.20" 119 | } 120 | }, 121 | "node_modules/ws": { 122 | "version": "8.13.0", 123 | "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", 124 | "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", 125 | "engines": { 126 | "node": ">=10.0.0" 127 | }, 128 | "peerDependencies": { 129 | "bufferutil": "^4.0.1", 130 | "utf-8-validate": ">=5.0.2" 131 | }, 132 | "peerDependenciesMeta": { 133 | "bufferutil": { 134 | "optional": true 135 | }, 136 | "utf-8-validate": { 137 | "optional": true 138 | } 139 | } 140 | } 141 | }, 142 | "dependencies": { 143 | "@hyperledger/firefly-sdk": { 144 | "version": "1.2.7", 145 | "resolved": "https://registry.npmjs.org/@hyperledger/firefly-sdk/-/firefly-sdk-1.2.7.tgz", 146 | "integrity": "sha512-V1o1ifvTv2phlnhyJwNuDs/iy7AZ+xZvavsrqHCcC4kt7nESjw/2iFB1xuPFNh0gfXzJj4jOUqygxqwvc+KwdA==", 147 | "requires": { 148 | "axios": "^0.26.1", 149 | "form-data": "^4.0.0", 150 | "ws": "^8.5.0" 151 | } 152 | }, 153 | "asynckit": { 154 | "version": "0.4.0", 155 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 156 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" 157 | }, 158 | "axios": { 159 | "version": "0.26.1", 160 | "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", 161 | "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", 162 | "requires": { 163 | "follow-redirects": "^1.14.8" 164 | } 165 | }, 166 | "combined-stream": { 167 | "version": "1.0.8", 168 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 169 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 170 | "requires": { 171 | "delayed-stream": "~1.0.0" 172 | } 173 | }, 174 | "delayed-stream": { 175 | "version": "1.0.0", 176 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 177 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" 178 | }, 179 | "follow-redirects": { 180 | "version": "1.15.2", 181 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", 182 | "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" 183 | }, 184 | "form-data": { 185 | "version": "4.0.0", 186 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", 187 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", 188 | "requires": { 189 | "asynckit": "^0.4.0", 190 | "combined-stream": "^1.0.8", 191 | "mime-types": "^2.1.12" 192 | } 193 | }, 194 | "mime-db": { 195 | "version": "1.52.0", 196 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 197 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" 198 | }, 199 | "mime-types": { 200 | "version": "2.1.35", 201 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 202 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 203 | "requires": { 204 | "mime-db": "1.52.0" 205 | } 206 | }, 207 | "typescript": { 208 | "version": "5.0.4", 209 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", 210 | "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==" 211 | }, 212 | "ws": { 213 | "version": "8.13.0", 214 | "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", 215 | "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", 216 | "requires": {} 217 | } 218 | } 219 | } 220 | -------------------------------------------------------------------------------- /combined/mint-token-on-public-ethereum-network/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mint-token-on-polygon-testnet", 3 | "version": "1.0.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "mint-token-on-polygon-testnet", 9 | "version": "1.0.0", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@hyperledger/firefly-sdk": "^1.2.7" 13 | }, 14 | "devDependencies": { 15 | "@types/node": "^18.15.11", 16 | "@types/ws": "^8.5.4", 17 | "typescript": "^5.0.3" 18 | } 19 | }, 20 | "node_modules/@hyperledger/firefly-sdk": { 21 | "version": "1.2.7", 22 | "resolved": "https://registry.npmjs.org/@hyperledger/firefly-sdk/-/firefly-sdk-1.2.7.tgz", 23 | "integrity": "sha512-V1o1ifvTv2phlnhyJwNuDs/iy7AZ+xZvavsrqHCcC4kt7nESjw/2iFB1xuPFNh0gfXzJj4jOUqygxqwvc+KwdA==", 24 | "dependencies": { 25 | "axios": "^0.26.1", 26 | "form-data": "^4.0.0", 27 | "ws": "^8.5.0" 28 | } 29 | }, 30 | "node_modules/@types/node": { 31 | "version": "18.15.11", 32 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz", 33 | "integrity": "sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==", 34 | "dev": true 35 | }, 36 | "node_modules/@types/ws": { 37 | "version": "8.5.4", 38 | "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz", 39 | "integrity": "sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==", 40 | "dev": true, 41 | "dependencies": { 42 | "@types/node": "*" 43 | } 44 | }, 45 | "node_modules/asynckit": { 46 | "version": "0.4.0", 47 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 48 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" 49 | }, 50 | "node_modules/axios": { 51 | "version": "0.26.1", 52 | "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", 53 | "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", 54 | "dependencies": { 55 | "follow-redirects": "^1.14.8" 56 | } 57 | }, 58 | "node_modules/combined-stream": { 59 | "version": "1.0.8", 60 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 61 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 62 | "dependencies": { 63 | "delayed-stream": "~1.0.0" 64 | }, 65 | "engines": { 66 | "node": ">= 0.8" 67 | } 68 | }, 69 | "node_modules/delayed-stream": { 70 | "version": "1.0.0", 71 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 72 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", 73 | "engines": { 74 | "node": ">=0.4.0" 75 | } 76 | }, 77 | "node_modules/follow-redirects": { 78 | "version": "1.15.2", 79 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", 80 | "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", 81 | "funding": [ 82 | { 83 | "type": "individual", 84 | "url": "https://github.com/sponsors/RubenVerborgh" 85 | } 86 | ], 87 | "engines": { 88 | "node": ">=4.0" 89 | }, 90 | "peerDependenciesMeta": { 91 | "debug": { 92 | "optional": true 93 | } 94 | } 95 | }, 96 | "node_modules/form-data": { 97 | "version": "4.0.0", 98 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", 99 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", 100 | "dependencies": { 101 | "asynckit": "^0.4.0", 102 | "combined-stream": "^1.0.8", 103 | "mime-types": "^2.1.12" 104 | }, 105 | "engines": { 106 | "node": ">= 6" 107 | } 108 | }, 109 | "node_modules/mime-db": { 110 | "version": "1.52.0", 111 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 112 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 113 | "engines": { 114 | "node": ">= 0.6" 115 | } 116 | }, 117 | "node_modules/mime-types": { 118 | "version": "2.1.35", 119 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 120 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 121 | "dependencies": { 122 | "mime-db": "1.52.0" 123 | }, 124 | "engines": { 125 | "node": ">= 0.6" 126 | } 127 | }, 128 | "node_modules/typescript": { 129 | "version": "5.0.3", 130 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.3.tgz", 131 | "integrity": "sha512-xv8mOEDnigb/tN9PSMTwSEqAnUvkoXMQlicOb0IUVDBSQCgBSaAAROUZYy2IcUy5qU6XajK5jjjO7TMWqBTKZA==", 132 | "dev": true, 133 | "bin": { 134 | "tsc": "bin/tsc", 135 | "tsserver": "bin/tsserver" 136 | }, 137 | "engines": { 138 | "node": ">=12.20" 139 | } 140 | }, 141 | "node_modules/ws": { 142 | "version": "8.13.0", 143 | "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", 144 | "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", 145 | "engines": { 146 | "node": ">=10.0.0" 147 | }, 148 | "peerDependencies": { 149 | "bufferutil": "^4.0.1", 150 | "utf-8-validate": ">=5.0.2" 151 | }, 152 | "peerDependenciesMeta": { 153 | "bufferutil": { 154 | "optional": true 155 | }, 156 | "utf-8-validate": { 157 | "optional": true 158 | } 159 | } 160 | } 161 | }, 162 | "dependencies": { 163 | "@hyperledger/firefly-sdk": { 164 | "version": "1.2.7", 165 | "resolved": "https://registry.npmjs.org/@hyperledger/firefly-sdk/-/firefly-sdk-1.2.7.tgz", 166 | "integrity": "sha512-V1o1ifvTv2phlnhyJwNuDs/iy7AZ+xZvavsrqHCcC4kt7nESjw/2iFB1xuPFNh0gfXzJj4jOUqygxqwvc+KwdA==", 167 | "requires": { 168 | "axios": "^0.26.1", 169 | "form-data": "^4.0.0", 170 | "ws": "^8.5.0" 171 | } 172 | }, 173 | "@types/node": { 174 | "version": "18.15.11", 175 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz", 176 | "integrity": "sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==", 177 | "dev": true 178 | }, 179 | "@types/ws": { 180 | "version": "8.5.4", 181 | "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz", 182 | "integrity": "sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==", 183 | "dev": true, 184 | "requires": { 185 | "@types/node": "*" 186 | } 187 | }, 188 | "asynckit": { 189 | "version": "0.4.0", 190 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 191 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" 192 | }, 193 | "axios": { 194 | "version": "0.26.1", 195 | "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", 196 | "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", 197 | "requires": { 198 | "follow-redirects": "^1.14.8" 199 | } 200 | }, 201 | "combined-stream": { 202 | "version": "1.0.8", 203 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 204 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 205 | "requires": { 206 | "delayed-stream": "~1.0.0" 207 | } 208 | }, 209 | "delayed-stream": { 210 | "version": "1.0.0", 211 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 212 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" 213 | }, 214 | "follow-redirects": { 215 | "version": "1.15.2", 216 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", 217 | "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" 218 | }, 219 | "form-data": { 220 | "version": "4.0.0", 221 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", 222 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", 223 | "requires": { 224 | "asynckit": "^0.4.0", 225 | "combined-stream": "^1.0.8", 226 | "mime-types": "^2.1.12" 227 | } 228 | }, 229 | "mime-db": { 230 | "version": "1.52.0", 231 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 232 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" 233 | }, 234 | "mime-types": { 235 | "version": "2.1.35", 236 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 237 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 238 | "requires": { 239 | "mime-db": "1.52.0" 240 | } 241 | }, 242 | "typescript": { 243 | "version": "5.0.3", 244 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.3.tgz", 245 | "integrity": "sha512-xv8mOEDnigb/tN9PSMTwSEqAnUvkoXMQlicOb0IUVDBSQCgBSaAAROUZYy2IcUy5qU6XajK5jjjO7TMWqBTKZA==", 246 | "dev": true 247 | }, 248 | "ws": { 249 | "version": "8.13.0", 250 | "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", 251 | "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", 252 | "requires": {} 253 | } 254 | } 255 | } 256 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. -------------------------------------------------------------------------------- /fungible-to-nonfungible/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Visit https://aka.ms/tsconfig to read more about this file */ 4 | 5 | /* Projects */ 6 | // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ 7 | // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ 8 | // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ 9 | // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ 10 | // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ 11 | // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ 12 | 13 | /* Language and Environment */ 14 | "target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, 15 | // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ 16 | // "jsx": "preserve", /* Specify what JSX code is generated. */ 17 | // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ 18 | // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ 19 | // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ 20 | // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ 21 | // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ 22 | // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ 23 | // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ 24 | // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ 25 | // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ 26 | 27 | /* Modules */ 28 | "module": "commonjs" /* Specify what module code is generated. */, 29 | "rootDir": "./src" /* Specify the root folder within your source files. */, 30 | // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ 31 | // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ 32 | // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ 33 | // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ 34 | // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ 35 | // "types": [], /* Specify type package names to be included without being referenced in a source file. */ 36 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 37 | // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ 38 | // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ 39 | // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ 40 | // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ 41 | // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ 42 | // "resolveJsonModule": true, /* Enable importing .json files. */ 43 | // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ 44 | // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ 45 | 46 | /* JavaScript Support */ 47 | // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ 48 | // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ 49 | // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ 50 | 51 | /* Emit */ 52 | // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ 53 | // "declarationMap": true, /* Create sourcemaps for d.ts files. */ 54 | // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ 55 | "sourceMap": true /* Create source map files for emitted JavaScript files. */, 56 | // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ 57 | // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ 58 | "outDir": "./build" /* Specify an output folder for all emitted files. */, 59 | // "removeComments": true, /* Disable emitting comments. */ 60 | // "noEmit": true, /* Disable emitting files from a compilation. */ 61 | // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ 62 | // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ 63 | // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ 64 | // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ 65 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 66 | // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ 67 | // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ 68 | // "newLine": "crlf", /* Set the newline character for emitting files. */ 69 | // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ 70 | // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ 71 | // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ 72 | // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ 73 | // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ 74 | // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ 75 | 76 | /* Interop Constraints */ 77 | // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ 78 | // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ 79 | // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ 80 | "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */, 81 | // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ 82 | "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, 83 | 84 | /* Type Checking */ 85 | "strict": true /* Enable all strict type-checking options. */, 86 | // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ 87 | // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ 88 | // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ 89 | // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ 90 | // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ 91 | // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ 92 | // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ 93 | // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ 94 | // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ 95 | // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ 96 | // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ 97 | // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ 98 | // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ 99 | // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ 100 | // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ 101 | // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ 102 | // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ 103 | // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ 104 | 105 | /* Completeness */ 106 | // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ 107 | "skipLibCheck": true /* Skip type checking all .d.ts files. */ 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /private-data-transfer-ui/src/App.tsx: -------------------------------------------------------------------------------- 1 | // Copyright © 2021 Kaleido, Inc. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | import { 18 | Box, 19 | Button, 20 | FormControl, 21 | FormControlLabel, 22 | Checkbox, 23 | FormLabel, 24 | FormGroup, 25 | Grid, 26 | makeStyles, 27 | MenuItem, 28 | Paper, 29 | Select, 30 | Snackbar, 31 | Switch, 32 | Table, 33 | TableBody, 34 | TableCell, 35 | TableHead, 36 | TableRow, 37 | TextField, 38 | } from '@material-ui/core'; 39 | import { useCallback, useEffect, useRef, useState } from 'react'; 40 | import { 41 | FireFly, 42 | FireFlyData, 43 | FireFlyMemberInput, 44 | FireFlyMessage, 45 | FireFlyMessageEvent, 46 | FireFlyOrganization, 47 | } from './firefly'; 48 | import ReconnectingWebsocket from 'reconnecting-websocket'; 49 | import dayjs from 'dayjs'; 50 | 51 | const MEMBERS = [ 52 | 'http://localhost:5000', 53 | 'http://localhost:5001', 54 | 'http://localhost:5002', 55 | ]; 56 | const MAX_MESSAGES = 25; 57 | const DATE_FORMAT = 'MM/DD/YYYY h:mm:ss A'; 58 | 59 | interface MessageRow { 60 | message: FireFlyMessage; 61 | data: FireFlyData[]; 62 | } 63 | 64 | function App(): JSX.Element { 65 | const classes = useStyles(); 66 | const [messages, setMessages] = useState([]); 67 | const [messageText, setMessageText] = useState(''); 68 | const [selectedMember, setSelectedMember] = useState(0); 69 | const firefly = useRef(null); 70 | const ws = useRef(null); 71 | const [isPrivate, setIsPrivate] = useState(false); 72 | const [orgs, setOrgs] = useState([]); 73 | const [pickedOrgs, setPickedOrgs] = useState<{ [oName: string]: boolean }>( 74 | {} 75 | ); 76 | const [selfOrg, setSelfOrg] = useState(''); 77 | const [confirmationMessage, setConfirmationMessage] = useState(''); 78 | 79 | const load = useCallback(async () => { 80 | const host = MEMBERS[selectedMember]; 81 | console.log(`Loading data from ${host}`); 82 | 83 | firefly.current = new FireFly(host); 84 | const messages = await firefly.current.getMessages(MAX_MESSAGES); 85 | const rows: MessageRow[] = []; 86 | for (const message of messages) { 87 | rows.push({ 88 | message, 89 | data: await firefly.current.retrieveData(message.data), 90 | }); 91 | } 92 | setMessages(rows); 93 | 94 | const orgs = await firefly.current.getOrgs(); 95 | setOrgs(orgs); 96 | 97 | const status = await firefly.current.getStatus(); 98 | setSelfOrg(status?.org?.name || ''); 99 | 100 | const wsHost = MEMBERS[selectedMember].replace('http', 'ws'); 101 | if (ws.current !== null) { 102 | ws.current.close(); 103 | } 104 | ws.current = new ReconnectingWebsocket( 105 | `${wsHost}/ws?namespace=default&ephemeral&autoack` 106 | ); 107 | ws.current.onopen = () => { 108 | console.log('Websocket connected'); 109 | }; 110 | ws.current.onmessage = (message) => { 111 | const data: FireFlyMessageEvent = JSON.parse(message.data); 112 | if (data.type === 'message_confirmed') { 113 | load(); 114 | } 115 | }; 116 | ws.current.onerror = (err) => { 117 | console.error(err); 118 | }; 119 | }, [selectedMember]); 120 | 121 | const orgName = (message: MessageRow) => { 122 | const identity = message.message.header.author; 123 | const org = orgs?.find((o) => o.identity === identity); 124 | let name = org ? org.name : identity; 125 | if (message.message.local) { 126 | name = `${name} (self)`; 127 | } 128 | return name; 129 | }; 130 | 131 | const MessageList = (options: MessageListOptions) => { 132 | const { messages } = options; 133 | const classes = useStyles(); 134 | 135 | const rows = []; 136 | for (const message of messages) { 137 | const date = dayjs(message.message.header.created); 138 | rows.push( 139 | 140 | {date.format(DATE_FORMAT)} 141 | {orgName(message)} 142 | 143 | 144 | 145 | {message.data 146 | .map((d) => JSON.stringify(d?.value || '', null, 2)) 147 | .join(', ')} 148 | 149 | 150 | 151 | 152 | ); 153 | } 154 | 155 | return ( 156 | 157 | 158 | 159 | Time 160 | From 161 | Data 162 | 163 | 164 | {rows} 165 | 166 | ); 167 | }; 168 | 169 | useEffect(() => { 170 | load(); 171 | }, [load]); 172 | 173 | return ( 174 | 175 | 176 | 177 | 178 | { 182 | event.preventDefault(); 183 | try { 184 | if (messageText === '') { 185 | return; 186 | } 187 | if (isPrivate) { 188 | const recipients: FireFlyMemberInput[] = []; 189 | pickedOrgs[selfOrg] = true; 190 | for (const oName in pickedOrgs) { 191 | if (pickedOrgs[oName]) { 192 | recipients.push({ identity: oName }); 193 | } 194 | } 195 | await firefly.current?.sendPrivate({ 196 | data: [ 197 | { 198 | value: messageText, 199 | }, 200 | ], 201 | group: { 202 | members: recipients, 203 | }, 204 | }); 205 | } else { 206 | await firefly.current?.sendBroadcast([ 207 | { 208 | value: messageText, 209 | }, 210 | ]); 211 | } 212 | setConfirmationMessage('Message sent'); 213 | } catch (err) { 214 | setConfirmationMessage(`Error: ${err}`); 215 | } 216 | setMessageText(''); 217 | }} 218 | > 219 | Send Message 220 | 221 | setIsPrivate(!isPrivate)} 227 | /> 228 | } 229 | label={ 230 | isPrivate 231 | ? 'Choose recipients' 232 | : 'Broadcast to the whole network' 233 | } 234 | className={classes.formControl} 235 | /> 236 | 237 | {isPrivate && ( 238 | 239 | 243 | Pick recipients 244 | 245 | {orgs.map((o, i) => ( 246 | { 253 | console.log(e.target); 254 | setPickedOrgs({ 255 | ...pickedOrgs, 256 | [e.target.value]: e.target.checked, 257 | }); 258 | }} 259 | name={o.name} 260 | value={o.name} 261 | /> 262 | } 263 | label={ 264 | o.name === selfOrg 265 | ? `${o.name}/${o.identity} (self)` 266 | : `${o.name}/${o.identity}` 267 | } 268 | /> 269 | ))} 270 | 271 | 272 | 273 | )} 274 | 275 | 276 | setMessageText(event.target.value)} 281 | /> 282 | 283 | 284 | 285 | 286 | Submit 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | Last {MAX_MESSAGES} Messages Received 297 | 298 | 299 | 300 | 301 | 302 | 303 | { 306 | console.log(`Set selected member ${event.target.value}`); 307 | setSelectedMember(event.target.value as number); 308 | }} 309 | > 310 | {MEMBERS.map((m, i) => ( 311 | 312 | {m} 313 | 314 | ))} 315 | 316 | 317 | 318 | 319 | 320 | 321 | setConfirmationMessage('')} 330 | /> 331 | 332 | ); 333 | } 334 | 335 | interface MessageListOptions { 336 | messages: MessageRow[]; 337 | } 338 | 339 | const useStyles = makeStyles((theme) => ({ 340 | root: { 341 | padding: theme.spacing(2), 342 | }, 343 | paper: { 344 | padding: theme.spacing(2), 345 | }, 346 | formControl: { 347 | marginTop: theme.spacing(2), 348 | }, 349 | formControlRight: { 350 | marginTop: theme.spacing(2), 351 | float: 'right', 352 | }, 353 | selectEmpty: { 354 | marginTop: theme.spacing(2), 355 | }, 356 | upload: { 357 | display: 'none', 358 | }, 359 | clearFix: { 360 | clear: 'both', 361 | }, 362 | scrollRight: { 363 | overflowX: 'scroll', 364 | [theme.breakpoints.up('xs')]: { 365 | maxWidth: 150, 366 | }, 367 | [theme.breakpoints.up('md')]: { 368 | maxWidth: 350, 369 | }, 370 | [theme.breakpoints.up('xl')]: { 371 | maxWidth: 450, 372 | }, 373 | }, 374 | })); 375 | 376 | export default App; 377 | -------------------------------------------------------------------------------- /combined/mint-token-on-public-ethereum-network/sample-contract/artifacts/contracts/FireFlySample.sol/FireFlySampleToken.json: -------------------------------------------------------------------------------- 1 | { 2 | "_format": "hh-sol-artifact-1", 3 | "contractName": "FireFlySampleToken", 4 | "sourceName": "contracts/FireFlySample.sol", 5 | "abi": [ 6 | { 7 | "inputs": [], 8 | "stateMutability": "nonpayable", 9 | "type": "constructor" 10 | }, 11 | { 12 | "anonymous": false, 13 | "inputs": [ 14 | { 15 | "indexed": true, 16 | "internalType": "address", 17 | "name": "owner", 18 | "type": "address" 19 | }, 20 | { 21 | "indexed": true, 22 | "internalType": "address", 23 | "name": "spender", 24 | "type": "address" 25 | }, 26 | { 27 | "indexed": false, 28 | "internalType": "uint256", 29 | "name": "value", 30 | "type": "uint256" 31 | } 32 | ], 33 | "name": "Approval", 34 | "type": "event" 35 | }, 36 | { 37 | "anonymous": false, 38 | "inputs": [ 39 | { 40 | "indexed": true, 41 | "internalType": "address", 42 | "name": "previousOwner", 43 | "type": "address" 44 | }, 45 | { 46 | "indexed": true, 47 | "internalType": "address", 48 | "name": "newOwner", 49 | "type": "address" 50 | } 51 | ], 52 | "name": "OwnershipTransferred", 53 | "type": "event" 54 | }, 55 | { 56 | "anonymous": false, 57 | "inputs": [ 58 | { 59 | "indexed": true, 60 | "internalType": "address", 61 | "name": "from", 62 | "type": "address" 63 | }, 64 | { 65 | "indexed": true, 66 | "internalType": "address", 67 | "name": "to", 68 | "type": "address" 69 | }, 70 | { 71 | "indexed": false, 72 | "internalType": "uint256", 73 | "name": "value", 74 | "type": "uint256" 75 | } 76 | ], 77 | "name": "Transfer", 78 | "type": "event" 79 | }, 80 | { 81 | "inputs": [ 82 | { 83 | "internalType": "address", 84 | "name": "owner", 85 | "type": "address" 86 | }, 87 | { 88 | "internalType": "address", 89 | "name": "spender", 90 | "type": "address" 91 | } 92 | ], 93 | "name": "allowance", 94 | "outputs": [ 95 | { 96 | "internalType": "uint256", 97 | "name": "", 98 | "type": "uint256" 99 | } 100 | ], 101 | "stateMutability": "view", 102 | "type": "function" 103 | }, 104 | { 105 | "inputs": [ 106 | { 107 | "internalType": "address", 108 | "name": "spender", 109 | "type": "address" 110 | }, 111 | { 112 | "internalType": "uint256", 113 | "name": "amount", 114 | "type": "uint256" 115 | } 116 | ], 117 | "name": "approve", 118 | "outputs": [ 119 | { 120 | "internalType": "bool", 121 | "name": "", 122 | "type": "bool" 123 | } 124 | ], 125 | "stateMutability": "nonpayable", 126 | "type": "function" 127 | }, 128 | { 129 | "inputs": [ 130 | { 131 | "internalType": "address", 132 | "name": "account", 133 | "type": "address" 134 | } 135 | ], 136 | "name": "balanceOf", 137 | "outputs": [ 138 | { 139 | "internalType": "uint256", 140 | "name": "", 141 | "type": "uint256" 142 | } 143 | ], 144 | "stateMutability": "view", 145 | "type": "function" 146 | }, 147 | { 148 | "inputs": [ 149 | { 150 | "internalType": "address", 151 | "name": "from", 152 | "type": "address" 153 | }, 154 | { 155 | "internalType": "uint256", 156 | "name": "amount", 157 | "type": "uint256" 158 | } 159 | ], 160 | "name": "burn", 161 | "outputs": [], 162 | "stateMutability": "nonpayable", 163 | "type": "function" 164 | }, 165 | { 166 | "inputs": [], 167 | "name": "decimals", 168 | "outputs": [ 169 | { 170 | "internalType": "uint8", 171 | "name": "", 172 | "type": "uint8" 173 | } 174 | ], 175 | "stateMutability": "view", 176 | "type": "function" 177 | }, 178 | { 179 | "inputs": [ 180 | { 181 | "internalType": "address", 182 | "name": "spender", 183 | "type": "address" 184 | }, 185 | { 186 | "internalType": "uint256", 187 | "name": "subtractedValue", 188 | "type": "uint256" 189 | } 190 | ], 191 | "name": "decreaseAllowance", 192 | "outputs": [ 193 | { 194 | "internalType": "bool", 195 | "name": "", 196 | "type": "bool" 197 | } 198 | ], 199 | "stateMutability": "nonpayable", 200 | "type": "function" 201 | }, 202 | { 203 | "inputs": [ 204 | { 205 | "internalType": "address", 206 | "name": "spender", 207 | "type": "address" 208 | }, 209 | { 210 | "internalType": "uint256", 211 | "name": "addedValue", 212 | "type": "uint256" 213 | } 214 | ], 215 | "name": "increaseAllowance", 216 | "outputs": [ 217 | { 218 | "internalType": "bool", 219 | "name": "", 220 | "type": "bool" 221 | } 222 | ], 223 | "stateMutability": "nonpayable", 224 | "type": "function" 225 | }, 226 | { 227 | "inputs": [ 228 | { 229 | "internalType": "address", 230 | "name": "to", 231 | "type": "address" 232 | }, 233 | { 234 | "internalType": "uint256", 235 | "name": "amount", 236 | "type": "uint256" 237 | } 238 | ], 239 | "name": "mint", 240 | "outputs": [], 241 | "stateMutability": "nonpayable", 242 | "type": "function" 243 | }, 244 | { 245 | "inputs": [], 246 | "name": "name", 247 | "outputs": [ 248 | { 249 | "internalType": "string", 250 | "name": "", 251 | "type": "string" 252 | } 253 | ], 254 | "stateMutability": "view", 255 | "type": "function" 256 | }, 257 | { 258 | "inputs": [], 259 | "name": "owner", 260 | "outputs": [ 261 | { 262 | "internalType": "address", 263 | "name": "", 264 | "type": "address" 265 | } 266 | ], 267 | "stateMutability": "view", 268 | "type": "function" 269 | }, 270 | { 271 | "inputs": [], 272 | "name": "renounceOwnership", 273 | "outputs": [], 274 | "stateMutability": "nonpayable", 275 | "type": "function" 276 | }, 277 | { 278 | "inputs": [], 279 | "name": "symbol", 280 | "outputs": [ 281 | { 282 | "internalType": "string", 283 | "name": "", 284 | "type": "string" 285 | } 286 | ], 287 | "stateMutability": "view", 288 | "type": "function" 289 | }, 290 | { 291 | "inputs": [], 292 | "name": "totalSupply", 293 | "outputs": [ 294 | { 295 | "internalType": "uint256", 296 | "name": "", 297 | "type": "uint256" 298 | } 299 | ], 300 | "stateMutability": "view", 301 | "type": "function" 302 | }, 303 | { 304 | "inputs": [ 305 | { 306 | "internalType": "address", 307 | "name": "to", 308 | "type": "address" 309 | }, 310 | { 311 | "internalType": "uint256", 312 | "name": "amount", 313 | "type": "uint256" 314 | } 315 | ], 316 | "name": "transfer", 317 | "outputs": [ 318 | { 319 | "internalType": "bool", 320 | "name": "", 321 | "type": "bool" 322 | } 323 | ], 324 | "stateMutability": "nonpayable", 325 | "type": "function" 326 | }, 327 | { 328 | "inputs": [ 329 | { 330 | "internalType": "address", 331 | "name": "from", 332 | "type": "address" 333 | }, 334 | { 335 | "internalType": "address", 336 | "name": "to", 337 | "type": "address" 338 | }, 339 | { 340 | "internalType": "uint256", 341 | "name": "amount", 342 | "type": "uint256" 343 | } 344 | ], 345 | "name": "transferFrom", 346 | "outputs": [ 347 | { 348 | "internalType": "bool", 349 | "name": "", 350 | "type": "bool" 351 | } 352 | ], 353 | "stateMutability": "nonpayable", 354 | "type": "function" 355 | }, 356 | { 357 | "inputs": [ 358 | { 359 | "internalType": "address", 360 | "name": "newOwner", 361 | "type": "address" 362 | } 363 | ], 364 | "name": "transferOwnership", 365 | "outputs": [], 366 | "stateMutability": "nonpayable", 367 | "type": "function" 368 | } 369 | ], 370 | "bytecode": "0x60806040523480156200001157600080fd5b506040518060400160405280601481526020017f46697265666c792053616d706c6520546f6b656e0000000000000000000000008152506040518060400160405280600281526020017f4653000000000000000000000000000000000000000000000000000000000000815250816003908051906020019062000096929190620001a6565b508060049080519060200190620000af929190620001a6565b505050620000d2620000c6620000d860201b60201c565b620000e060201b60201c565b620002bb565b600033905090565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b828054620001b49062000285565b90600052602060002090601f016020900481019282620001d8576000855562000224565b82601f10620001f357805160ff191683800117855562000224565b8280016001018555821562000224579182015b828111156200022357825182559160200191906001019062000206565b5b50905062000233919062000237565b5090565b5b808211156200025257600081600090555060010162000238565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200029e57607f821691505b60208210811415620002b557620002b462000256565b5b50919050565b611c6180620002cb6000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063715018a611610097578063a457c2d711610066578063a457c2d71461029d578063a9059cbb146102cd578063dd62ed3e146102fd578063f2fde38b1461032d57610100565b8063715018a61461023b5780638da5cb5b1461024557806395d89b41146102635780639dc29fac1461028157610100565b8063313ce567116100d3578063313ce567146101a157806339509351146101bf57806340c10f19146101ef57806370a082311461020b57610100565b806306fdde0314610105578063095ea7b31461012357806318160ddd1461015357806323b872dd14610171575b600080fd5b61010d610349565b60405161011a91906111c3565b60405180910390f35b61013d6004803603810190610138919061127e565b6103db565b60405161014a91906112d9565b60405180910390f35b61015b6103fe565b6040516101689190611303565b60405180910390f35b61018b6004803603810190610186919061131e565b610408565b60405161019891906112d9565b60405180910390f35b6101a9610437565b6040516101b6919061138d565b60405180910390f35b6101d960048036038101906101d4919061127e565b610440565b6040516101e691906112d9565b60405180910390f35b6102096004803603810190610204919061127e565b610477565b005b610225600480360381019061022091906113a8565b610485565b6040516102329190611303565b60405180910390f35b6102436104cd565b005b61024d6104e1565b60405161025a91906113e4565b60405180910390f35b61026b61050b565b60405161027891906111c3565b60405180910390f35b61029b6004803603810190610296919061127e565b61059d565b005b6102b760048036038101906102b2919061127e565b610620565b6040516102c491906112d9565b60405180910390f35b6102e760048036038101906102e2919061127e565b610697565b6040516102f491906112d9565b60405180910390f35b610317600480360381019061031291906113ff565b6106ba565b6040516103249190611303565b60405180910390f35b610347600480360381019061034291906113a8565b610741565b005b6060600380546103589061146e565b80601f01602080910402602001604051908101604052809291908181526020018280546103849061146e565b80156103d15780601f106103a6576101008083540402835291602001916103d1565b820191906000526020600020905b8154815290600101906020018083116103b457829003601f168201915b5050505050905090565b6000806103e66107c5565b90506103f38185856107cd565b600191505092915050565b6000600254905090565b6000806104136107c5565b9050610420858285610998565b61042b858585610a24565b60019150509392505050565b60006012905090565b60008061044b6107c5565b905061046c81858561045d85896106ba565b61046791906114cf565b6107cd565b600191505092915050565b6104818282610ca5565b5050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6104d5610e05565b6104df6000610e83565b565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606004805461051a9061146e565b80601f01602080910402602001604051908101604052809291908181526020018280546105469061146e565b80156105935780601f1061056857610100808354040283529160200191610593565b820191906000526020600020905b81548152906001019060200180831161057657829003601f168201915b5050505050905090565b6105a56107c5565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610612576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060990611571565b60405180910390fd5b61061c8282610f49565b5050565b60008061062b6107c5565b9050600061063982866106ba565b90508381101561067e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067590611603565b60405180910390fd5b61068b82868684036107cd565b60019250505092915050565b6000806106a26107c5565b90506106af818585610a24565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610749610e05565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156107b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107b090611695565b60405180910390fd5b6107c281610e83565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561083d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161083490611727565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156108ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108a4906117b9565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161098b9190611303565b60405180910390a3505050565b60006109a484846106ba565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610a1e5781811015610a10576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a0790611825565b60405180910390fd5b610a1d84848484036107cd565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610a94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a8b906118b7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b04576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610afb90611949565b60405180910390fd5b610b0f838383611120565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610b95576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8c906119db565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610c2891906114cf565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610c8c9190611303565b60405180910390a3610c9f848484611125565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0c90611a47565b60405180910390fd5b610d2160008383611120565b8060026000828254610d3391906114cf565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610d8891906114cf565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610ded9190611303565b60405180910390a3610e0160008383611125565b5050565b610e0d6107c5565b73ffffffffffffffffffffffffffffffffffffffff16610e2b6104e1565b73ffffffffffffffffffffffffffffffffffffffff1614610e81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e7890611ab3565b60405180910390fd5b565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610fb9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb090611b45565b60405180910390fd5b610fc582600083611120565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561104b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104290611bd7565b60405180910390fd5b8181036000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600260008282546110a29190611bf7565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516111079190611303565b60405180910390a361111b83600084611125565b505050565b505050565b505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611164578082015181840152602081019050611149565b83811115611173576000848401525b50505050565b6000601f19601f8301169050919050565b60006111958261112a565b61119f8185611135565b93506111af818560208601611146565b6111b881611179565b840191505092915050565b600060208201905081810360008301526111dd818461118a565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611215826111ea565b9050919050565b6112258161120a565b811461123057600080fd5b50565b6000813590506112428161121c565b92915050565b6000819050919050565b61125b81611248565b811461126657600080fd5b50565b60008135905061127881611252565b92915050565b60008060408385031215611295576112946111e5565b5b60006112a385828601611233565b92505060206112b485828601611269565b9150509250929050565b60008115159050919050565b6112d3816112be565b82525050565b60006020820190506112ee60008301846112ca565b92915050565b6112fd81611248565b82525050565b600060208201905061131860008301846112f4565b92915050565b600080600060608486031215611337576113366111e5565b5b600061134586828701611233565b935050602061135686828701611233565b925050604061136786828701611269565b9150509250925092565b600060ff82169050919050565b61138781611371565b82525050565b60006020820190506113a2600083018461137e565b92915050565b6000602082840312156113be576113bd6111e5565b5b60006113cc84828501611233565b91505092915050565b6113de8161120a565b82525050565b60006020820190506113f960008301846113d5565b92915050565b60008060408385031215611416576114156111e5565b5b600061142485828601611233565b925050602061143585828601611233565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061148657607f821691505b6020821081141561149a5761149961143f565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006114da82611248565b91506114e583611248565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561151a576115196114a0565b5b828201905092915050565b7f45524332304e6f446174613a2063616c6c6572206973206e6f74206f776e6572600082015250565b600061155b602083611135565b915061156682611525565b602082019050919050565b6000602082019050818103600083015261158a8161154e565b9050919050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b60006115ed602583611135565b91506115f882611591565b604082019050919050565b6000602082019050818103600083015261161c816115e0565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061167f602683611135565b915061168a82611623565b604082019050919050565b600060208201905081810360008301526116ae81611672565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000611711602483611135565b915061171c826116b5565b604082019050919050565b6000602082019050818103600083015261174081611704565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006117a3602283611135565b91506117ae82611747565b604082019050919050565b600060208201905081810360008301526117d281611796565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b600061180f601d83611135565b915061181a826117d9565b602082019050919050565b6000602082019050818103600083015261183e81611802565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b60006118a1602583611135565b91506118ac82611845565b604082019050919050565b600060208201905081810360008301526118d081611894565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000611933602383611135565b915061193e826118d7565b604082019050919050565b6000602082019050818103600083015261196281611926565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006119c5602683611135565b91506119d082611969565b604082019050919050565b600060208201905081810360008301526119f4816119b8565b9050919050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b6000611a31601f83611135565b9150611a3c826119fb565b602082019050919050565b60006020820190508181036000830152611a6081611a24565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000611a9d602083611135565b9150611aa882611a67565b602082019050919050565b60006020820190508181036000830152611acc81611a90565b9050919050565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000611b2f602183611135565b9150611b3a82611ad3565b604082019050919050565b60006020820190508181036000830152611b5e81611b22565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b6000611bc1602283611135565b9150611bcc82611b65565b604082019050919050565b60006020820190508181036000830152611bf081611bb4565b9050919050565b6000611c0282611248565b9150611c0d83611248565b925082821015611c2057611c1f6114a0565b5b82820390509291505056fea26469706673582212200c0b0d5e42c2e437347bc852898fcb5ed2298d1fd29dafa41d0556b9dc94112e64736f6c63430008090033", 371 | "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063715018a611610097578063a457c2d711610066578063a457c2d71461029d578063a9059cbb146102cd578063dd62ed3e146102fd578063f2fde38b1461032d57610100565b8063715018a61461023b5780638da5cb5b1461024557806395d89b41146102635780639dc29fac1461028157610100565b8063313ce567116100d3578063313ce567146101a157806339509351146101bf57806340c10f19146101ef57806370a082311461020b57610100565b806306fdde0314610105578063095ea7b31461012357806318160ddd1461015357806323b872dd14610171575b600080fd5b61010d610349565b60405161011a91906111c3565b60405180910390f35b61013d6004803603810190610138919061127e565b6103db565b60405161014a91906112d9565b60405180910390f35b61015b6103fe565b6040516101689190611303565b60405180910390f35b61018b6004803603810190610186919061131e565b610408565b60405161019891906112d9565b60405180910390f35b6101a9610437565b6040516101b6919061138d565b60405180910390f35b6101d960048036038101906101d4919061127e565b610440565b6040516101e691906112d9565b60405180910390f35b6102096004803603810190610204919061127e565b610477565b005b610225600480360381019061022091906113a8565b610485565b6040516102329190611303565b60405180910390f35b6102436104cd565b005b61024d6104e1565b60405161025a91906113e4565b60405180910390f35b61026b61050b565b60405161027891906111c3565b60405180910390f35b61029b6004803603810190610296919061127e565b61059d565b005b6102b760048036038101906102b2919061127e565b610620565b6040516102c491906112d9565b60405180910390f35b6102e760048036038101906102e2919061127e565b610697565b6040516102f491906112d9565b60405180910390f35b610317600480360381019061031291906113ff565b6106ba565b6040516103249190611303565b60405180910390f35b610347600480360381019061034291906113a8565b610741565b005b6060600380546103589061146e565b80601f01602080910402602001604051908101604052809291908181526020018280546103849061146e565b80156103d15780601f106103a6576101008083540402835291602001916103d1565b820191906000526020600020905b8154815290600101906020018083116103b457829003601f168201915b5050505050905090565b6000806103e66107c5565b90506103f38185856107cd565b600191505092915050565b6000600254905090565b6000806104136107c5565b9050610420858285610998565b61042b858585610a24565b60019150509392505050565b60006012905090565b60008061044b6107c5565b905061046c81858561045d85896106ba565b61046791906114cf565b6107cd565b600191505092915050565b6104818282610ca5565b5050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6104d5610e05565b6104df6000610e83565b565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606004805461051a9061146e565b80601f01602080910402602001604051908101604052809291908181526020018280546105469061146e565b80156105935780601f1061056857610100808354040283529160200191610593565b820191906000526020600020905b81548152906001019060200180831161057657829003601f168201915b5050505050905090565b6105a56107c5565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610612576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060990611571565b60405180910390fd5b61061c8282610f49565b5050565b60008061062b6107c5565b9050600061063982866106ba565b90508381101561067e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067590611603565b60405180910390fd5b61068b82868684036107cd565b60019250505092915050565b6000806106a26107c5565b90506106af818585610a24565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610749610e05565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156107b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107b090611695565b60405180910390fd5b6107c281610e83565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561083d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161083490611727565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156108ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108a4906117b9565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161098b9190611303565b60405180910390a3505050565b60006109a484846106ba565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610a1e5781811015610a10576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a0790611825565b60405180910390fd5b610a1d84848484036107cd565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610a94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a8b906118b7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b04576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610afb90611949565b60405180910390fd5b610b0f838383611120565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610b95576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8c906119db565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610c2891906114cf565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610c8c9190611303565b60405180910390a3610c9f848484611125565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0c90611a47565b60405180910390fd5b610d2160008383611120565b8060026000828254610d3391906114cf565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610d8891906114cf565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610ded9190611303565b60405180910390a3610e0160008383611125565b5050565b610e0d6107c5565b73ffffffffffffffffffffffffffffffffffffffff16610e2b6104e1565b73ffffffffffffffffffffffffffffffffffffffff1614610e81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e7890611ab3565b60405180910390fd5b565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610fb9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb090611b45565b60405180910390fd5b610fc582600083611120565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561104b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104290611bd7565b60405180910390fd5b8181036000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600260008282546110a29190611bf7565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516111079190611303565b60405180910390a361111b83600084611125565b505050565b505050565b505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611164578082015181840152602081019050611149565b83811115611173576000848401525b50505050565b6000601f19601f8301169050919050565b60006111958261112a565b61119f8185611135565b93506111af818560208601611146565b6111b881611179565b840191505092915050565b600060208201905081810360008301526111dd818461118a565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611215826111ea565b9050919050565b6112258161120a565b811461123057600080fd5b50565b6000813590506112428161121c565b92915050565b6000819050919050565b61125b81611248565b811461126657600080fd5b50565b60008135905061127881611252565b92915050565b60008060408385031215611295576112946111e5565b5b60006112a385828601611233565b92505060206112b485828601611269565b9150509250929050565b60008115159050919050565b6112d3816112be565b82525050565b60006020820190506112ee60008301846112ca565b92915050565b6112fd81611248565b82525050565b600060208201905061131860008301846112f4565b92915050565b600080600060608486031215611337576113366111e5565b5b600061134586828701611233565b935050602061135686828701611233565b925050604061136786828701611269565b9150509250925092565b600060ff82169050919050565b61138781611371565b82525050565b60006020820190506113a2600083018461137e565b92915050565b6000602082840312156113be576113bd6111e5565b5b60006113cc84828501611233565b91505092915050565b6113de8161120a565b82525050565b60006020820190506113f960008301846113d5565b92915050565b60008060408385031215611416576114156111e5565b5b600061142485828601611233565b925050602061143585828601611233565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061148657607f821691505b6020821081141561149a5761149961143f565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006114da82611248565b91506114e583611248565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561151a576115196114a0565b5b828201905092915050565b7f45524332304e6f446174613a2063616c6c6572206973206e6f74206f776e6572600082015250565b600061155b602083611135565b915061156682611525565b602082019050919050565b6000602082019050818103600083015261158a8161154e565b9050919050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b60006115ed602583611135565b91506115f882611591565b604082019050919050565b6000602082019050818103600083015261161c816115e0565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061167f602683611135565b915061168a82611623565b604082019050919050565b600060208201905081810360008301526116ae81611672565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000611711602483611135565b915061171c826116b5565b604082019050919050565b6000602082019050818103600083015261174081611704565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006117a3602283611135565b91506117ae82611747565b604082019050919050565b600060208201905081810360008301526117d281611796565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b600061180f601d83611135565b915061181a826117d9565b602082019050919050565b6000602082019050818103600083015261183e81611802565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b60006118a1602583611135565b91506118ac82611845565b604082019050919050565b600060208201905081810360008301526118d081611894565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000611933602383611135565b915061193e826118d7565b604082019050919050565b6000602082019050818103600083015261196281611926565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006119c5602683611135565b91506119d082611969565b604082019050919050565b600060208201905081810360008301526119f4816119b8565b9050919050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b6000611a31601f83611135565b9150611a3c826119fb565b602082019050919050565b60006020820190508181036000830152611a6081611a24565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000611a9d602083611135565b9150611aa882611a67565b602082019050919050565b60006020820190508181036000830152611acc81611a90565b9050919050565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000611b2f602183611135565b9150611b3a82611ad3565b604082019050919050565b60006020820190508181036000830152611b5e81611b22565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b6000611bc1602283611135565b9150611bcc82611b65565b604082019050919050565b60006020820190508181036000830152611bf081611bb4565b9050919050565b6000611c0282611248565b9150611c0d83611248565b925082821015611c2057611c1f6114a0565b5b82820390509291505056fea26469706673582212200c0b0d5e42c2e437347bc852898fcb5ed2298d1fd29dafa41d0556b9dc94112e64736f6c63430008090033", 372 | "linkReferences": {}, 373 | "deployedLinkReferences": {} 374 | } 375 | -------------------------------------------------------------------------------- /private-data-transfer-cli/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "private-data-transfer-cli", 3 | "version": "1.0.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "private-data-transfer-cli", 9 | "version": "1.0.0", 10 | "license": "Apache-2.0", 11 | "dependencies": { 12 | "axios": "^1.8.3", 13 | "ts-node": "^10.0.0", 14 | "typescript": "^4.3.2", 15 | "ws": "^7.4.6" 16 | }, 17 | "devDependencies": { 18 | "@types/node": "^15.6.1", 19 | "@types/ws": "^7.4.4", 20 | "rimraf": "^3.0.2" 21 | } 22 | }, 23 | "node_modules/@tsconfig/node10": { 24 | "version": "1.0.7", 25 | "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.7.tgz", 26 | "integrity": "sha512-aBvUmXLQbayM4w3A8TrjwrXs4DZ8iduJnuJLLRGdkWlyakCf1q6uHZJBzXoRA/huAEknG5tcUyQxN3A+In5euQ==" 27 | }, 28 | "node_modules/@tsconfig/node12": { 29 | "version": "1.0.7", 30 | "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.7.tgz", 31 | "integrity": "sha512-dgasobK/Y0wVMswcipr3k0HpevxFJLijN03A8mYfEPvWvOs14v0ZlYTR4kIgMx8g4+fTyTFv8/jLCIfRqLDJ4A==" 32 | }, 33 | "node_modules/@tsconfig/node14": { 34 | "version": "1.0.0", 35 | "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.0.tgz", 36 | "integrity": "sha512-RKkL8eTdPv6t5EHgFKIVQgsDapugbuOptNd9OOunN/HAkzmmTnZELx1kNCK0rSdUYGmiFMM3rRQMAWiyp023LQ==" 37 | }, 38 | "node_modules/@tsconfig/node16": { 39 | "version": "1.0.1", 40 | "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.1.tgz", 41 | "integrity": "sha512-FTgBI767POY/lKNDNbIzgAX6miIDBs6NTCbdlDb8TrWovHsSvaVIZDlTqym29C6UqhzwcJx4CYr+AlrMywA0cA==" 42 | }, 43 | "node_modules/@types/node": { 44 | "version": "15.6.1", 45 | "resolved": "https://registry.npmjs.org/@types/node/-/node-15.6.1.tgz", 46 | "integrity": "sha512-7EIraBEyRHEe7CH+Fm1XvgqU6uwZN8Q7jppJGcqjROMT29qhAuuOxYB1uEY5UMYQKEmA5D+5tBnhdaPXSsLONA==" 47 | }, 48 | "node_modules/@types/ws": { 49 | "version": "7.4.4", 50 | "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.4.tgz", 51 | "integrity": "sha512-d/7W23JAXPodQNbOZNXvl2K+bqAQrCMwlh/nuQsPSQk6Fq0opHoPrUw43aHsvSbIiQPr8Of2hkFbnz1XBFVyZQ==", 52 | "dev": true, 53 | "dependencies": { 54 | "@types/node": "*" 55 | } 56 | }, 57 | "node_modules/arg": { 58 | "version": "4.1.3", 59 | "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", 60 | "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" 61 | }, 62 | "node_modules/asynckit": { 63 | "version": "0.4.0", 64 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 65 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", 66 | "license": "MIT" 67 | }, 68 | "node_modules/axios": { 69 | "version": "1.8.3", 70 | "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.3.tgz", 71 | "integrity": "sha512-iP4DebzoNlP/YN2dpwCgb8zoCmhtkajzS48JvwmkSkXvPI3DHc7m+XYL5tGnSlJtR6nImXZmdCuN5aP8dh1d8A==", 72 | "license": "MIT", 73 | "dependencies": { 74 | "follow-redirects": "^1.15.6", 75 | "form-data": "^4.0.0", 76 | "proxy-from-env": "^1.1.0" 77 | } 78 | }, 79 | "node_modules/balanced-match": { 80 | "version": "1.0.2", 81 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 82 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 83 | "dev": true 84 | }, 85 | "node_modules/brace-expansion": { 86 | "version": "1.1.11", 87 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 88 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 89 | "dev": true, 90 | "dependencies": { 91 | "balanced-match": "^1.0.0", 92 | "concat-map": "0.0.1" 93 | } 94 | }, 95 | "node_modules/buffer-from": { 96 | "version": "1.1.1", 97 | "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", 98 | "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" 99 | }, 100 | "node_modules/call-bind-apply-helpers": { 101 | "version": "1.0.2", 102 | "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", 103 | "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", 104 | "license": "MIT", 105 | "dependencies": { 106 | "es-errors": "^1.3.0", 107 | "function-bind": "^1.1.2" 108 | }, 109 | "engines": { 110 | "node": ">= 0.4" 111 | } 112 | }, 113 | "node_modules/combined-stream": { 114 | "version": "1.0.8", 115 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 116 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 117 | "license": "MIT", 118 | "dependencies": { 119 | "delayed-stream": "~1.0.0" 120 | }, 121 | "engines": { 122 | "node": ">= 0.8" 123 | } 124 | }, 125 | "node_modules/concat-map": { 126 | "version": "0.0.1", 127 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 128 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 129 | "dev": true 130 | }, 131 | "node_modules/create-require": { 132 | "version": "1.1.1", 133 | "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", 134 | "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" 135 | }, 136 | "node_modules/delayed-stream": { 137 | "version": "1.0.0", 138 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 139 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", 140 | "license": "MIT", 141 | "engines": { 142 | "node": ">=0.4.0" 143 | } 144 | }, 145 | "node_modules/diff": { 146 | "version": "4.0.2", 147 | "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", 148 | "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", 149 | "engines": { 150 | "node": ">=0.3.1" 151 | } 152 | }, 153 | "node_modules/dunder-proto": { 154 | "version": "1.0.1", 155 | "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", 156 | "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", 157 | "license": "MIT", 158 | "dependencies": { 159 | "call-bind-apply-helpers": "^1.0.1", 160 | "es-errors": "^1.3.0", 161 | "gopd": "^1.2.0" 162 | }, 163 | "engines": { 164 | "node": ">= 0.4" 165 | } 166 | }, 167 | "node_modules/es-define-property": { 168 | "version": "1.0.1", 169 | "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", 170 | "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", 171 | "license": "MIT", 172 | "engines": { 173 | "node": ">= 0.4" 174 | } 175 | }, 176 | "node_modules/es-errors": { 177 | "version": "1.3.0", 178 | "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", 179 | "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", 180 | "license": "MIT", 181 | "engines": { 182 | "node": ">= 0.4" 183 | } 184 | }, 185 | "node_modules/es-object-atoms": { 186 | "version": "1.1.1", 187 | "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", 188 | "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", 189 | "license": "MIT", 190 | "dependencies": { 191 | "es-errors": "^1.3.0" 192 | }, 193 | "engines": { 194 | "node": ">= 0.4" 195 | } 196 | }, 197 | "node_modules/es-set-tostringtag": { 198 | "version": "2.1.0", 199 | "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", 200 | "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", 201 | "license": "MIT", 202 | "dependencies": { 203 | "es-errors": "^1.3.0", 204 | "get-intrinsic": "^1.2.6", 205 | "has-tostringtag": "^1.0.2", 206 | "hasown": "^2.0.2" 207 | }, 208 | "engines": { 209 | "node": ">= 0.4" 210 | } 211 | }, 212 | "node_modules/follow-redirects": { 213 | "version": "1.15.9", 214 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", 215 | "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", 216 | "funding": [ 217 | { 218 | "type": "individual", 219 | "url": "https://github.com/sponsors/RubenVerborgh" 220 | } 221 | ], 222 | "license": "MIT", 223 | "engines": { 224 | "node": ">=4.0" 225 | }, 226 | "peerDependenciesMeta": { 227 | "debug": { 228 | "optional": true 229 | } 230 | } 231 | }, 232 | "node_modules/form-data": { 233 | "version": "4.0.2", 234 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", 235 | "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", 236 | "license": "MIT", 237 | "dependencies": { 238 | "asynckit": "^0.4.0", 239 | "combined-stream": "^1.0.8", 240 | "es-set-tostringtag": "^2.1.0", 241 | "mime-types": "^2.1.12" 242 | }, 243 | "engines": { 244 | "node": ">= 6" 245 | } 246 | }, 247 | "node_modules/fs.realpath": { 248 | "version": "1.0.0", 249 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 250 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 251 | "dev": true 252 | }, 253 | "node_modules/function-bind": { 254 | "version": "1.1.2", 255 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", 256 | "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", 257 | "license": "MIT", 258 | "funding": { 259 | "url": "https://github.com/sponsors/ljharb" 260 | } 261 | }, 262 | "node_modules/get-intrinsic": { 263 | "version": "1.3.0", 264 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", 265 | "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", 266 | "license": "MIT", 267 | "dependencies": { 268 | "call-bind-apply-helpers": "^1.0.2", 269 | "es-define-property": "^1.0.1", 270 | "es-errors": "^1.3.0", 271 | "es-object-atoms": "^1.1.1", 272 | "function-bind": "^1.1.2", 273 | "get-proto": "^1.0.1", 274 | "gopd": "^1.2.0", 275 | "has-symbols": "^1.1.0", 276 | "hasown": "^2.0.2", 277 | "math-intrinsics": "^1.1.0" 278 | }, 279 | "engines": { 280 | "node": ">= 0.4" 281 | }, 282 | "funding": { 283 | "url": "https://github.com/sponsors/ljharb" 284 | } 285 | }, 286 | "node_modules/get-proto": { 287 | "version": "1.0.1", 288 | "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", 289 | "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", 290 | "license": "MIT", 291 | "dependencies": { 292 | "dunder-proto": "^1.0.1", 293 | "es-object-atoms": "^1.0.0" 294 | }, 295 | "engines": { 296 | "node": ">= 0.4" 297 | } 298 | }, 299 | "node_modules/glob": { 300 | "version": "7.1.7", 301 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", 302 | "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", 303 | "dev": true, 304 | "dependencies": { 305 | "fs.realpath": "^1.0.0", 306 | "inflight": "^1.0.4", 307 | "inherits": "2", 308 | "minimatch": "^3.0.4", 309 | "once": "^1.3.0", 310 | "path-is-absolute": "^1.0.0" 311 | }, 312 | "engines": { 313 | "node": "*" 314 | }, 315 | "funding": { 316 | "url": "https://github.com/sponsors/isaacs" 317 | } 318 | }, 319 | "node_modules/gopd": { 320 | "version": "1.2.0", 321 | "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", 322 | "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", 323 | "license": "MIT", 324 | "engines": { 325 | "node": ">= 0.4" 326 | }, 327 | "funding": { 328 | "url": "https://github.com/sponsors/ljharb" 329 | } 330 | }, 331 | "node_modules/has-symbols": { 332 | "version": "1.1.0", 333 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", 334 | "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", 335 | "license": "MIT", 336 | "engines": { 337 | "node": ">= 0.4" 338 | }, 339 | "funding": { 340 | "url": "https://github.com/sponsors/ljharb" 341 | } 342 | }, 343 | "node_modules/has-tostringtag": { 344 | "version": "1.0.2", 345 | "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", 346 | "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", 347 | "license": "MIT", 348 | "dependencies": { 349 | "has-symbols": "^1.0.3" 350 | }, 351 | "engines": { 352 | "node": ">= 0.4" 353 | }, 354 | "funding": { 355 | "url": "https://github.com/sponsors/ljharb" 356 | } 357 | }, 358 | "node_modules/hasown": { 359 | "version": "2.0.2", 360 | "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", 361 | "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", 362 | "license": "MIT", 363 | "dependencies": { 364 | "function-bind": "^1.1.2" 365 | }, 366 | "engines": { 367 | "node": ">= 0.4" 368 | } 369 | }, 370 | "node_modules/inflight": { 371 | "version": "1.0.6", 372 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 373 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 374 | "dev": true, 375 | "dependencies": { 376 | "once": "^1.3.0", 377 | "wrappy": "1" 378 | } 379 | }, 380 | "node_modules/inherits": { 381 | "version": "2.0.4", 382 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 383 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 384 | "dev": true 385 | }, 386 | "node_modules/make-error": { 387 | "version": "1.3.6", 388 | "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", 389 | "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" 390 | }, 391 | "node_modules/math-intrinsics": { 392 | "version": "1.1.0", 393 | "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", 394 | "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", 395 | "license": "MIT", 396 | "engines": { 397 | "node": ">= 0.4" 398 | } 399 | }, 400 | "node_modules/mime-db": { 401 | "version": "1.52.0", 402 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 403 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 404 | "license": "MIT", 405 | "engines": { 406 | "node": ">= 0.6" 407 | } 408 | }, 409 | "node_modules/mime-types": { 410 | "version": "2.1.35", 411 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 412 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 413 | "license": "MIT", 414 | "dependencies": { 415 | "mime-db": "1.52.0" 416 | }, 417 | "engines": { 418 | "node": ">= 0.6" 419 | } 420 | }, 421 | "node_modules/minimatch": { 422 | "version": "3.0.4", 423 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 424 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 425 | "dev": true, 426 | "dependencies": { 427 | "brace-expansion": "^1.1.7" 428 | }, 429 | "engines": { 430 | "node": "*" 431 | } 432 | }, 433 | "node_modules/once": { 434 | "version": "1.4.0", 435 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 436 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 437 | "dev": true, 438 | "dependencies": { 439 | "wrappy": "1" 440 | } 441 | }, 442 | "node_modules/path-is-absolute": { 443 | "version": "1.0.1", 444 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 445 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 446 | "dev": true, 447 | "engines": { 448 | "node": ">=0.10.0" 449 | } 450 | }, 451 | "node_modules/proxy-from-env": { 452 | "version": "1.1.0", 453 | "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", 454 | "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", 455 | "license": "MIT" 456 | }, 457 | "node_modules/rimraf": { 458 | "version": "3.0.2", 459 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", 460 | "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", 461 | "dev": true, 462 | "dependencies": { 463 | "glob": "^7.1.3" 464 | }, 465 | "bin": { 466 | "rimraf": "bin.js" 467 | }, 468 | "funding": { 469 | "url": "https://github.com/sponsors/isaacs" 470 | } 471 | }, 472 | "node_modules/source-map": { 473 | "version": "0.6.1", 474 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 475 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", 476 | "engines": { 477 | "node": ">=0.10.0" 478 | } 479 | }, 480 | "node_modules/source-map-support": { 481 | "version": "0.5.19", 482 | "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", 483 | "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", 484 | "dependencies": { 485 | "buffer-from": "^1.0.0", 486 | "source-map": "^0.6.0" 487 | } 488 | }, 489 | "node_modules/ts-node": { 490 | "version": "10.0.0", 491 | "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.0.0.tgz", 492 | "integrity": "sha512-ROWeOIUvfFbPZkoDis0L/55Fk+6gFQNZwwKPLinacRl6tsxstTF1DbAcLKkovwnpKMVvOMHP1TIbnwXwtLg1gg==", 493 | "dependencies": { 494 | "@tsconfig/node10": "^1.0.7", 495 | "@tsconfig/node12": "^1.0.7", 496 | "@tsconfig/node14": "^1.0.0", 497 | "@tsconfig/node16": "^1.0.1", 498 | "arg": "^4.1.0", 499 | "create-require": "^1.1.0", 500 | "diff": "^4.0.1", 501 | "make-error": "^1.1.1", 502 | "source-map-support": "^0.5.17", 503 | "yn": "3.1.1" 504 | }, 505 | "bin": { 506 | "ts-node": "dist/bin.js", 507 | "ts-node-cwd": "dist/bin-cwd.js", 508 | "ts-node-script": "dist/bin-script.js", 509 | "ts-node-transpile-only": "dist/bin-transpile.js", 510 | "ts-script": "dist/bin-script-deprecated.js" 511 | }, 512 | "engines": { 513 | "node": ">=12.0.0" 514 | }, 515 | "peerDependencies": { 516 | "@swc/core": ">=1.2.45", 517 | "@swc/wasm": ">=1.2.45", 518 | "@types/node": "*", 519 | "typescript": ">=2.7" 520 | }, 521 | "peerDependenciesMeta": { 522 | "@swc/core": { 523 | "optional": true 524 | }, 525 | "@swc/wasm": { 526 | "optional": true 527 | } 528 | } 529 | }, 530 | "node_modules/typescript": { 531 | "version": "4.3.2", 532 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.2.tgz", 533 | "integrity": "sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==", 534 | "bin": { 535 | "tsc": "bin/tsc", 536 | "tsserver": "bin/tsserver" 537 | }, 538 | "engines": { 539 | "node": ">=4.2.0" 540 | } 541 | }, 542 | "node_modules/wrappy": { 543 | "version": "1.0.2", 544 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 545 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 546 | "dev": true 547 | }, 548 | "node_modules/ws": { 549 | "version": "7.4.6", 550 | "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", 551 | "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", 552 | "engines": { 553 | "node": ">=8.3.0" 554 | }, 555 | "peerDependencies": { 556 | "bufferutil": "^4.0.1", 557 | "utf-8-validate": "^5.0.2" 558 | }, 559 | "peerDependenciesMeta": { 560 | "bufferutil": { 561 | "optional": true 562 | }, 563 | "utf-8-validate": { 564 | "optional": true 565 | } 566 | } 567 | }, 568 | "node_modules/yn": { 569 | "version": "3.1.1", 570 | "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", 571 | "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", 572 | "engines": { 573 | "node": ">=6" 574 | } 575 | } 576 | }, 577 | "dependencies": { 578 | "@tsconfig/node10": { 579 | "version": "1.0.7", 580 | "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.7.tgz", 581 | "integrity": "sha512-aBvUmXLQbayM4w3A8TrjwrXs4DZ8iduJnuJLLRGdkWlyakCf1q6uHZJBzXoRA/huAEknG5tcUyQxN3A+In5euQ==" 582 | }, 583 | "@tsconfig/node12": { 584 | "version": "1.0.7", 585 | "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.7.tgz", 586 | "integrity": "sha512-dgasobK/Y0wVMswcipr3k0HpevxFJLijN03A8mYfEPvWvOs14v0ZlYTR4kIgMx8g4+fTyTFv8/jLCIfRqLDJ4A==" 587 | }, 588 | "@tsconfig/node14": { 589 | "version": "1.0.0", 590 | "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.0.tgz", 591 | "integrity": "sha512-RKkL8eTdPv6t5EHgFKIVQgsDapugbuOptNd9OOunN/HAkzmmTnZELx1kNCK0rSdUYGmiFMM3rRQMAWiyp023LQ==" 592 | }, 593 | "@tsconfig/node16": { 594 | "version": "1.0.1", 595 | "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.1.tgz", 596 | "integrity": "sha512-FTgBI767POY/lKNDNbIzgAX6miIDBs6NTCbdlDb8TrWovHsSvaVIZDlTqym29C6UqhzwcJx4CYr+AlrMywA0cA==" 597 | }, 598 | "@types/node": { 599 | "version": "15.6.1", 600 | "resolved": "https://registry.npmjs.org/@types/node/-/node-15.6.1.tgz", 601 | "integrity": "sha512-7EIraBEyRHEe7CH+Fm1XvgqU6uwZN8Q7jppJGcqjROMT29qhAuuOxYB1uEY5UMYQKEmA5D+5tBnhdaPXSsLONA==" 602 | }, 603 | "@types/ws": { 604 | "version": "7.4.4", 605 | "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.4.tgz", 606 | "integrity": "sha512-d/7W23JAXPodQNbOZNXvl2K+bqAQrCMwlh/nuQsPSQk6Fq0opHoPrUw43aHsvSbIiQPr8Of2hkFbnz1XBFVyZQ==", 607 | "dev": true, 608 | "requires": { 609 | "@types/node": "*" 610 | } 611 | }, 612 | "arg": { 613 | "version": "4.1.3", 614 | "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", 615 | "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" 616 | }, 617 | "asynckit": { 618 | "version": "0.4.0", 619 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 620 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" 621 | }, 622 | "axios": { 623 | "version": "1.8.3", 624 | "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.3.tgz", 625 | "integrity": "sha512-iP4DebzoNlP/YN2dpwCgb8zoCmhtkajzS48JvwmkSkXvPI3DHc7m+XYL5tGnSlJtR6nImXZmdCuN5aP8dh1d8A==", 626 | "requires": { 627 | "follow-redirects": "^1.15.6", 628 | "form-data": "^4.0.0", 629 | "proxy-from-env": "^1.1.0" 630 | } 631 | }, 632 | "balanced-match": { 633 | "version": "1.0.2", 634 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 635 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 636 | "dev": true 637 | }, 638 | "brace-expansion": { 639 | "version": "1.1.11", 640 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 641 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 642 | "dev": true, 643 | "requires": { 644 | "balanced-match": "^1.0.0", 645 | "concat-map": "0.0.1" 646 | } 647 | }, 648 | "buffer-from": { 649 | "version": "1.1.1", 650 | "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", 651 | "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" 652 | }, 653 | "call-bind-apply-helpers": { 654 | "version": "1.0.2", 655 | "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", 656 | "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", 657 | "requires": { 658 | "es-errors": "^1.3.0", 659 | "function-bind": "^1.1.2" 660 | } 661 | }, 662 | "combined-stream": { 663 | "version": "1.0.8", 664 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 665 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 666 | "requires": { 667 | "delayed-stream": "~1.0.0" 668 | } 669 | }, 670 | "concat-map": { 671 | "version": "0.0.1", 672 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 673 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 674 | "dev": true 675 | }, 676 | "create-require": { 677 | "version": "1.1.1", 678 | "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", 679 | "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" 680 | }, 681 | "delayed-stream": { 682 | "version": "1.0.0", 683 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 684 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" 685 | }, 686 | "diff": { 687 | "version": "4.0.2", 688 | "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", 689 | "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" 690 | }, 691 | "dunder-proto": { 692 | "version": "1.0.1", 693 | "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", 694 | "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", 695 | "requires": { 696 | "call-bind-apply-helpers": "^1.0.1", 697 | "es-errors": "^1.3.0", 698 | "gopd": "^1.2.0" 699 | } 700 | }, 701 | "es-define-property": { 702 | "version": "1.0.1", 703 | "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", 704 | "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==" 705 | }, 706 | "es-errors": { 707 | "version": "1.3.0", 708 | "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", 709 | "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==" 710 | }, 711 | "es-object-atoms": { 712 | "version": "1.1.1", 713 | "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", 714 | "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", 715 | "requires": { 716 | "es-errors": "^1.3.0" 717 | } 718 | }, 719 | "es-set-tostringtag": { 720 | "version": "2.1.0", 721 | "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", 722 | "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", 723 | "requires": { 724 | "es-errors": "^1.3.0", 725 | "get-intrinsic": "^1.2.6", 726 | "has-tostringtag": "^1.0.2", 727 | "hasown": "^2.0.2" 728 | } 729 | }, 730 | "follow-redirects": { 731 | "version": "1.15.9", 732 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", 733 | "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==" 734 | }, 735 | "form-data": { 736 | "version": "4.0.2", 737 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", 738 | "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", 739 | "requires": { 740 | "asynckit": "^0.4.0", 741 | "combined-stream": "^1.0.8", 742 | "es-set-tostringtag": "^2.1.0", 743 | "mime-types": "^2.1.12" 744 | } 745 | }, 746 | "fs.realpath": { 747 | "version": "1.0.0", 748 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 749 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 750 | "dev": true 751 | }, 752 | "function-bind": { 753 | "version": "1.1.2", 754 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", 755 | "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" 756 | }, 757 | "get-intrinsic": { 758 | "version": "1.3.0", 759 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", 760 | "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", 761 | "requires": { 762 | "call-bind-apply-helpers": "^1.0.2", 763 | "es-define-property": "^1.0.1", 764 | "es-errors": "^1.3.0", 765 | "es-object-atoms": "^1.1.1", 766 | "function-bind": "^1.1.2", 767 | "get-proto": "^1.0.1", 768 | "gopd": "^1.2.0", 769 | "has-symbols": "^1.1.0", 770 | "hasown": "^2.0.2", 771 | "math-intrinsics": "^1.1.0" 772 | } 773 | }, 774 | "get-proto": { 775 | "version": "1.0.1", 776 | "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", 777 | "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", 778 | "requires": { 779 | "dunder-proto": "^1.0.1", 780 | "es-object-atoms": "^1.0.0" 781 | } 782 | }, 783 | "glob": { 784 | "version": "7.1.7", 785 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", 786 | "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", 787 | "dev": true, 788 | "requires": { 789 | "fs.realpath": "^1.0.0", 790 | "inflight": "^1.0.4", 791 | "inherits": "2", 792 | "minimatch": "^3.0.4", 793 | "once": "^1.3.0", 794 | "path-is-absolute": "^1.0.0" 795 | } 796 | }, 797 | "gopd": { 798 | "version": "1.2.0", 799 | "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", 800 | "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==" 801 | }, 802 | "has-symbols": { 803 | "version": "1.1.0", 804 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", 805 | "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==" 806 | }, 807 | "has-tostringtag": { 808 | "version": "1.0.2", 809 | "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", 810 | "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", 811 | "requires": { 812 | "has-symbols": "^1.0.3" 813 | } 814 | }, 815 | "hasown": { 816 | "version": "2.0.2", 817 | "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", 818 | "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", 819 | "requires": { 820 | "function-bind": "^1.1.2" 821 | } 822 | }, 823 | "inflight": { 824 | "version": "1.0.6", 825 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 826 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 827 | "dev": true, 828 | "requires": { 829 | "once": "^1.3.0", 830 | "wrappy": "1" 831 | } 832 | }, 833 | "inherits": { 834 | "version": "2.0.4", 835 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 836 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 837 | "dev": true 838 | }, 839 | "make-error": { 840 | "version": "1.3.6", 841 | "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", 842 | "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" 843 | }, 844 | "math-intrinsics": { 845 | "version": "1.1.0", 846 | "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", 847 | "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==" 848 | }, 849 | "mime-db": { 850 | "version": "1.52.0", 851 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 852 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" 853 | }, 854 | "mime-types": { 855 | "version": "2.1.35", 856 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 857 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 858 | "requires": { 859 | "mime-db": "1.52.0" 860 | } 861 | }, 862 | "minimatch": { 863 | "version": "3.0.4", 864 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 865 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 866 | "dev": true, 867 | "requires": { 868 | "brace-expansion": "^1.1.7" 869 | } 870 | }, 871 | "once": { 872 | "version": "1.4.0", 873 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 874 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 875 | "dev": true, 876 | "requires": { 877 | "wrappy": "1" 878 | } 879 | }, 880 | "path-is-absolute": { 881 | "version": "1.0.1", 882 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 883 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 884 | "dev": true 885 | }, 886 | "proxy-from-env": { 887 | "version": "1.1.0", 888 | "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", 889 | "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" 890 | }, 891 | "rimraf": { 892 | "version": "3.0.2", 893 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", 894 | "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", 895 | "dev": true, 896 | "requires": { 897 | "glob": "^7.1.3" 898 | } 899 | }, 900 | "source-map": { 901 | "version": "0.6.1", 902 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 903 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" 904 | }, 905 | "source-map-support": { 906 | "version": "0.5.19", 907 | "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", 908 | "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", 909 | "requires": { 910 | "buffer-from": "^1.0.0", 911 | "source-map": "^0.6.0" 912 | } 913 | }, 914 | "ts-node": { 915 | "version": "10.0.0", 916 | "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.0.0.tgz", 917 | "integrity": "sha512-ROWeOIUvfFbPZkoDis0L/55Fk+6gFQNZwwKPLinacRl6tsxstTF1DbAcLKkovwnpKMVvOMHP1TIbnwXwtLg1gg==", 918 | "requires": { 919 | "@tsconfig/node10": "^1.0.7", 920 | "@tsconfig/node12": "^1.0.7", 921 | "@tsconfig/node14": "^1.0.0", 922 | "@tsconfig/node16": "^1.0.1", 923 | "arg": "^4.1.0", 924 | "create-require": "^1.1.0", 925 | "diff": "^4.0.1", 926 | "make-error": "^1.1.1", 927 | "source-map-support": "^0.5.17", 928 | "yn": "3.1.1" 929 | } 930 | }, 931 | "typescript": { 932 | "version": "4.3.2", 933 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.2.tgz", 934 | "integrity": "sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==" 935 | }, 936 | "wrappy": { 937 | "version": "1.0.2", 938 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 939 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 940 | "dev": true 941 | }, 942 | "ws": { 943 | "version": "7.4.6", 944 | "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", 945 | "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", 946 | "requires": {} 947 | }, 948 | "yn": { 949 | "version": "3.1.1", 950 | "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", 951 | "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" 952 | } 953 | } 954 | } 955 | --------------------------------------------------------------------------------
145 | {message.data 146 | .map((d) => JSON.stringify(d?.value || '', null, 2)) 147 | .join(', ')} 148 |