Skip to content

Commit

Permalink
fix: added push for hackers code to sdk (#376)
Browse files Browse the repository at this point in the history
* fix: added push for hackers code to sdk

* fix: added .env.sample
  • Loading branch information
Aman035 authored May 10, 2023
1 parent 6b72ff4 commit c7b4f72
Show file tree
Hide file tree
Showing 16 changed files with 1,766 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -287,5 +287,4 @@ buck-out/
/
packages/restapi/yarn.lock
yarn.lock
packages/restapi/tests/.env
packages/restapi/.env
*.env
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"mocha": "^10.2.0",
"mocha-typescript": "^1.1.17",
"moment": "^2.29.4",
"openpgp": "^5.8.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-is": "17.0.2",
Expand All @@ -47,6 +48,7 @@
"tiny-invariant": "^1.2.0",
"ts-mocha": "^10.0.0",
"tslib": "^2.3.0",
"unique-names-generator": "^4.7.1",
"uuid": "^9.0.0"
},
"devDependencies": {
Expand All @@ -58,6 +60,7 @@
"@nrwl/jest": "14.1.7",
"@nrwl/js": "14.1.7",
"@nrwl/linter": "14.1.7",
"@nrwl/node": "14.1.7",
"@nrwl/react": "14.1.7",
"@nrwl/react-native": "14.1.7",
"@nrwl/web": "14.1.7",
Expand Down
38 changes: 38 additions & 0 deletions packages/examples/sdk-backend-node/.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# WALLET PRIVATE KEY
WALLET_PRIVATE_KEY=your_channel_key

# ENVIRONMENT OF PUSH NETWORK - prod, staging OR dev
PUSH_NODE_NETWORK=staging

# TO ENABLE API RESPONSES TO BE SHOWN OR HIDDEN - true OR false
SHOW_API_RESPONSE=false

# NFT CONTRACT ADDRESS
NFT_CONTRACT_ADDRESS_1=your_nft_contract_address

# NFT CHAIN ID
NFT_CHAIN_ID_1=your_nft_chain_id

# NFT TOKEN ID
NFT_TOKEN_ID_1=your_nft_token_id

# NFT HOLDER WALLET PRIVATE KEY
NFT_HOLDER_WALLET_PRIVATE_KEY_1=your_nft_holder_wallet_private_key

# NFT PROFILE WALLET PASSWORD
NFT_PROFILE_PASSWORD_1=your_nft_profile_password

# NFT CONTRACT ADDRESS
NFT_CONTRACT_ADDRESS_2=your_nft_contract_address

# NFT CHAIN ID
NFT_CHAIN_ID_2=your_nft_chain_id

# NFT TOKEN ID
NFT_TOKEN_ID_2=your_nft_token_id

# NFT HOLDER WALLET PRIVATE KEY
NFT_HOLDER_WALLET_PRIVATE_KEY_2=your_nft_holder_wallet_private_key

# NFT PROFILE WALLET PASSWORD
NFT_PROFILE_PASSWORD_2=your_nft_profile_password
18 changes: 18 additions & 0 deletions packages/examples/sdk-backend-node/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": ["../../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
]
}
16 changes: 16 additions & 0 deletions packages/examples/sdk-backend-node/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* eslint-disable */
export default {
displayName: 'examples-sdk-backend-node',
preset: '../../../jest.preset.js',
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
testEnvironment: 'node',
transform: {
'^.+\\.[tj]s$': 'ts-jest',
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../../coverage/packages/examples/sdk-backend-node',
};
52 changes: 52 additions & 0 deletions packages/examples/sdk-backend-node/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/examples/sdk-backend-node/src",
"projectType": "application",
"targets": {
"build": {
"executor": "@nrwl/node:webpack",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/examples/sdk-backend-node",
"main": "packages/examples/sdk-backend-node/src/main.ts",
"tsConfig": "packages/examples/sdk-backend-node/tsconfig.app.json",
"assets": ["packages/examples/sdk-backend-node/src/assets"]
},
"configurations": {
"production": {
"optimization": true,
"extractLicenses": true,
"inspect": false,
"fileReplacements": [
{
"replace": "packages/examples/sdk-backend-node/src/environments/environment.ts",
"with": "packages/examples/sdk-backend-node/src/environments/environment.prod.ts"
}
]
}
}
},
"serve": {
"executor": "@nrwl/node:node",
"options": {
"buildTarget": "examples-sdk-backend-node:build"
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["packages/examples/sdk-backend-node/**/*.ts"]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/packages/examples/sdk-backend-node"],
"options": {
"jestConfig": "packages/examples/sdk-backend-node/jest.config.ts",
"passWithNoTests": true
}
}
},
"tags": []
}
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const environment = {
production: true,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const environment = {
production: false,
};
Loading

0 comments on commit c7b4f72

Please sign in to comment.