Skip to content

Commit

Permalink
Prepare for publishing (#11)
Browse files Browse the repository at this point in the history
* chore: change package names to fit AB's NPM name

* chore: fixes to make projects importable
  • Loading branch information
gabspeck authored Oct 31, 2024
1 parent 97bcb66 commit 433a674
Show file tree
Hide file tree
Showing 17 changed files with 476 additions and 41 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": [
"eslint-config-xs"
],
"ignorePatterns": ["dist/"],
"rules": {
"node/no-missing-import": "off",
"react/prop-types": "off",
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"name": "giano",
"packageManager": "[email protected]"
"name": "@appliedblockchain/giano",
"private": true,
"packageManager": "[email protected]",
"devDependencies": {
"tsup": "^8.3.5"
}
}
20 changes: 16 additions & 4 deletions packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
{
"name": "@giano/client",
"name": "@appliedblockchain/giano-client",
"description": "Client code for the Giano contracts",
"version": "1.0.0",
"license": "MIT",
"type": "module",
"scripts": {
"client:build": "tsup src/"
},
"exports": {
".": {
"import": "./dist/index.js",
"default": "./dist/index.cjs"
}
},
"dependencies": {
"@giano/contracts": "workspace:",
"ethers": "^6.13.4",
"@appliedblockchain/giano-contracts": "workspace:",
"@peculiar/asn1-ecc": "^2.3.14",
"@peculiar/asn1-schema": "^2.3.13",
"@peculiar/asn1-ecc": "^2.3.14"
"ethers": "^6.13.4"
},
"devDependencies": {
"tsup": "^8.3.5"
}
}
4 changes: 2 additions & 2 deletions packages/client/src/wallet/walletClient.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Account } from '@giano/contracts/typechain-types';
import { Account__factory } from '@giano/contracts/typechain-types';
import type { Account } from '@appliedblockchain/giano-contracts';
import { Account__factory } from '@appliedblockchain/giano-contracts';
import type { BaseContract, BigNumberish, ContractRunner, ContractTransactionResponse } from 'ethers';

type SendTransactionProps = {
Expand Down
3 changes: 2 additions & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@giano/common",
"name": "@appliedblockchain/giano-common",
"description": "Common code for the Giano packages",
"private": true,
"version": "1.0.0",
"license": "MIT",
"type": "commonjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/contracts/P256.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity ^0.8.23;

/**
* Helper library for external contracts to verify P256 signatures.
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/contracts/WebAuthn.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity ^0.8.23;

import {P256} from "./P256.sol";
import {Base64} from "./Base64.sol";
Expand Down
1 change: 1 addition & 0 deletions packages/contracts/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './typechain-types';
9 changes: 6 additions & 3 deletions packages/contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
{
"name": "@giano/contracts",
"name": "@appliedblockchain/giano-contracts",
"version": "1.0.0",
"license": "MIT",
"type": "commonjs",
"scripts": {
"hh:build": "pnpm hh:compile && tsup index.ts",
"hh:test": "NODE_ENV=test REPORT_GAS=true hardhat test",
"hh:node": "hardhat node",
"hh:deploy": "hardhat ignition deploy ignition/modules/Giano.ts",
"hh:compile": "hardhat compile",
"hh:clean": "hardhat clean"
},
"files": [
"contracts/**/*.sol"
"contracts/**/*.sol",
"dist/**/*"
],
"main": "dist/index",
"devDependencies": {
"@giano/common": "workspace:",
"@appliedblockchain/giano-common": "workspace:",
"@nomicfoundation/hardhat-chai-matchers": "^2.0.2",
"@nomicfoundation/hardhat-ethers": "^3.0.5",
"@nomicfoundation/hardhat-ignition": "^0.15.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/test/Account.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { encodeChallenge, hexToUint8Array } from '@giano/common';
import { encodeChallenge, hexToUint8Array } from '@appliedblockchain/giano-common';
import { loadFixture } from '@nomicfoundation/hardhat-toolbox/network-helpers';
import { expect } from 'chai';
import { ethers, ignition } from 'hardhat';
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/test/ERC721SafeTransferAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { expect } from 'chai';
import type { Contract, TransactionResponse } from 'ethers';
import { ethers, ignition } from 'hardhat';
import ERC721SafeTransferAccountModule from '../ignition/modules/ERC721SafeTransferAccount';
import { ERC721SafeTransferAccountFactory__factory } from '../typechain-types';
import { ERC721SafeTransferAccountFactory__factory } from '..';
import { createKeypair } from './utils';

describe('ERC721SafeTransferAccount', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"resolveJsonModule": true
"resolveJsonModule": true,
}
}
Loading

0 comments on commit 433a674

Please sign in to comment.