Skip to content

Commit

Permalink
remove client from connector, bump v
Browse files Browse the repository at this point in the history
  • Loading branch information
lukachi committed Mar 11, 2024
1 parent bff1c50 commit 3c6737d
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 72 deletions.
3 changes: 1 addition & 2 deletions packages/connector/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rarimo/rarime-connector",
"version": "2.1.0-rc.10",
"version": "2.1.0-rc.11",
"description": "Facilitates interaction between a DApp and RariMe MetaMask snap",
"repository": {
"type": "git",
Expand Down Expand Up @@ -46,7 +46,6 @@
"@cosmjs/amino": "^0.32.2",
"@cosmjs/proto-signing": "^0.32.2",
"@ethersproject/providers": "5.7.2",
"@rarimo/client": "^2.0.0",
"compare-versions": "^6.1.0",
"ethers": "5.7.2",
"long": "^5.2.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/connector/src/version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "2.1.0-rc.10"
"version": "2.1.0-rc.11"
}
33 changes: 0 additions & 33 deletions packages/connector/src/wallet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import type {
DirectSignResponse,
OfflineDirectSigner,
} from '@cosmjs/proto-signing';
import type { RarimoClient } from '@rarimo/client';
import { makeRarimoClient, makeWallet } from '@rarimo/client';
import type { SignDoc } from 'cosmjs-types/cosmos/tx/v1beta1/tx';
import { BigNumber } from 'ethers';

Expand Down Expand Up @@ -153,37 +151,6 @@ export class RarimeWallet
}
}

export const getRarimoClient = async (
injectedWallet: RarimeWallet,
): Promise<RarimoClient> => {
const chainInfo = CHAINS[injectedWallet.chainId];

const client = makeRarimoClient({
rpcUrl: chainInfo.rpc!,
apiUrl: chainInfo.rest!,
prefix: 'rarimo',
chainName: chainInfo.chainName,
chainIconUrl: chainInfo.chainSymbolImageUrl,
currency: {
denom: chainInfo.stakeCurrency!.coinDenom,
minDenom: chainInfo.stakeCurrency!.coinMinimalDenom,
decimals: chainInfo.stakeCurrency!.coinDecimals,
},
gasPrice: {
amount: 0,
steps: {
low: chainInfo.feeCurrencies[0].gasPriceStep!.low,
average: chainInfo.feeCurrencies[0].gasPriceStep!.average,
high: chainInfo.feeCurrencies[0].gasPriceStep!.high,
},
},
});

await client.connect(makeWallet(injectedWallet));

return client;
};

// export const createWallet = (chainId: string) => {};

export * from './consts';
Expand Down
2 changes: 1 addition & 1 deletion packages/snap/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rarimo/rarime",
"version": "2.1.0-rc.10",
"version": "2.1.0-rc.11",
"description": "RariMe is a MetaMask Snap that safely holds any of your credentials and allows you to prove your identity without revealing any personal data. Powered by Rarimo Protocol and Zero-Knowledge Proof technology.",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions packages/snap/snap.manifest.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"version": "2.1.0-rc.10",
"version": "2.1.0-rc.11",
"description": "Securely store and manage all of your identity credentials. Use them across chains with ZK-protected privacy guarantees.",
"proposedName": "RariMe",
"repository": {
"type": "git",
"url": "https://github.com/rarimo/rarime.git"
},
"source": {
"shasum": "+ANpKO1aF8Hc5HfAnrP3gDJpG7lbSSkZuvH1W2SWNZ8=",
"shasum": "fecmKwHeh2PhIlEXjJeokKs3u5DVvt+xSiqeNPXSJCg=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/zkp-iden3/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rarimo/zkp-iden3",
"version": "2.1.0-rc.10",
"version": "2.1.0-rc.11",
"description": "Tools that generate zero-knowledge proofs for the Iden3 protocol.",
"repository": {
"type": "git",
Expand Down
63 changes: 31 additions & 32 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5748,7 +5748,6 @@ __metadata:
"@cosmjs/proto-signing": "npm:^0.32.2"
"@ethersproject/providers": "npm:5.7.2"
"@keplr-wallet/types": "npm:^0.12.72"
"@rarimo/client": "npm:^2.0.0"
"@swc/cli": "npm:^0.1.62"
"@swc/core": "npm:1.3.53"
"@swc/jest": "npm:^0.2.26"
Expand Down Expand Up @@ -7889,7 +7888,7 @@ __metadata:
languageName: node
linkType: hard

"available-typed-arrays@npm:^1.0.6, available-typed-arrays@npm:^1.0.7":
"available-typed-arrays@npm:^1.0.7":
version: 1.0.7
resolution: "available-typed-arrays@npm:1.0.7"
dependencies:
Expand Down Expand Up @@ -8742,9 +8741,9 @@ __metadata:
linkType: hard

"caniuse-lite@npm:^1.0.30001587":
version: 1.0.30001596
resolution: "caniuse-lite@npm:1.0.30001596"
checksum: 10c0/60589001c7d9bb89e2bf08f1aeadd09c867e41661b1fd2c1d562ca8e67a9f645f7dd9572aeca7ffdfff37a4e17ccf6a4cfdd29dde5a7454f5f08f5f372345d13
version: 1.0.30001597
resolution: "caniuse-lite@npm:1.0.30001597"
checksum: 10c0/32dc315ffafacc8167286c95b05f41b3ce2818314ea913ffed6ceb7b58c64c38365ec250114d1ecceac34f1c77e5af089479e54b160c4a89b88fd25a98851b78
languageName: node
linkType: hard

Expand Down Expand Up @@ -8814,11 +8813,11 @@ __metadata:
linkType: hard

"cborg@npm:^4.0.0":
version: 4.1.0
resolution: "cborg@npm:4.1.0"
version: 4.1.1
resolution: "cborg@npm:4.1.1"
bin:
cborg: lib/bin.js
checksum: 10c0/b1e2fac1034bfc6111cde11da0efe734f09dbc4d18e9e27437c9bab0acdb14df8196bd5c6a10cacc6475a198b49de25a593439bc566e8695ec6f7bc8b8ecea3d
checksum: 10c0/dea9970cde573a30e810c92a9a7fe51fd36709276ac9f2d62ccb58e28039d63dbe4af0ebad3b9018160048836db648e9b5bfcb6f882f4bf4898e1295b4ea1225
languageName: node
linkType: hard

Expand Down Expand Up @@ -9836,7 +9835,7 @@ __metadata:
languageName: node
linkType: hard

"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.2, define-data-property@npm:^1.1.4":
"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.4":
version: 1.1.4
resolution: "define-data-property@npm:1.1.4"
dependencies:
Expand Down Expand Up @@ -11745,7 +11744,7 @@ __metadata:
languageName: node
linkType: hard

"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2, get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4":
"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4":
version: 1.2.4
resolution: "get-intrinsic@npm:1.2.4"
dependencies:
Expand Down Expand Up @@ -12116,7 +12115,7 @@ __metadata:
languageName: node
linkType: hard

"has-property-descriptors@npm:^1.0.0, has-property-descriptors@npm:^1.0.1, has-property-descriptors@npm:^1.0.2":
"has-property-descriptors@npm:^1.0.0, has-property-descriptors@npm:^1.0.2":
version: 1.0.2
resolution: "has-property-descriptors@npm:1.0.2"
dependencies:
Expand All @@ -12139,7 +12138,7 @@ __metadata:
languageName: node
linkType: hard

"has-tostringtag@npm:^1.0.0, has-tostringtag@npm:^1.0.1, has-tostringtag@npm:^1.0.2":
"has-tostringtag@npm:^1.0.0, has-tostringtag@npm:^1.0.2":
version: 1.0.2
resolution: "has-tostringtag@npm:1.0.2"
dependencies:
Expand Down Expand Up @@ -12194,11 +12193,11 @@ __metadata:
linkType: hard

"hasown@npm:^2.0.0, hasown@npm:^2.0.1":
version: 2.0.1
resolution: "hasown@npm:2.0.1"
version: 2.0.2
resolution: "hasown@npm:2.0.2"
dependencies:
function-bind: "npm:^1.1.2"
checksum: 10c0/9e27e70e8e4204f4124c8f99950d1ba2b1f5174864fd39ff26da190f9ea6488c1b3927dcc64981c26d1f637a971783c9489d62c829d393ea509e6f1ba20370bb
checksum: 10c0/3769d434703b8ac66b209a4cca0737519925bbdb61dd887f93a16372b14694c63ff4e797686d87c90f08168e81082248b9b028bad60d4da9e0d1148766f56eb9
languageName: node
linkType: hard

Expand Down Expand Up @@ -16736,14 +16735,14 @@ __metadata:
linkType: hard

"safe-array-concat@npm:^1.1.0":
version: 1.1.0
resolution: "safe-array-concat@npm:1.1.0"
version: 1.1.2
resolution: "safe-array-concat@npm:1.1.2"
dependencies:
call-bind: "npm:^1.0.5"
get-intrinsic: "npm:^1.2.2"
call-bind: "npm:^1.0.7"
get-intrinsic: "npm:^1.2.4"
has-symbols: "npm:^1.0.3"
isarray: "npm:^2.0.5"
checksum: 10c0/833d3d950fc7507a60075f9bfaf41ec6dac7c50c7a9d62b1e6b071ecc162185881f92e594ff95c1a18301c881352dd6fd236d56999d5819559db7b92da9c28af
checksum: 10c0/12f9fdb01c8585e199a347eacc3bae7b5164ae805cdc8c6707199dbad5b9e30001a50a43c4ee24dc9ea32dbb7279397850e9208a7e217f4d8b1cf5d90129dec9
languageName: node
linkType: hard

Expand Down Expand Up @@ -16951,16 +16950,16 @@ __metadata:
linkType: hard

"set-function-length@npm:^1.2.1":
version: 1.2.1
resolution: "set-function-length@npm:1.2.1"
version: 1.2.2
resolution: "set-function-length@npm:1.2.2"
dependencies:
define-data-property: "npm:^1.1.2"
define-data-property: "npm:^1.1.4"
es-errors: "npm:^1.3.0"
function-bind: "npm:^1.1.2"
get-intrinsic: "npm:^1.2.3"
get-intrinsic: "npm:^1.2.4"
gopd: "npm:^1.0.1"
has-property-descriptors: "npm:^1.0.1"
checksum: 10c0/1927e296599f2c04d210c1911f1600430a5e49e04a6d8bb03dca5487b95a574da9968813a2ced9a774bd3e188d4a6208352c8f64b8d4674cdb021dca21e190ca
has-property-descriptors: "npm:^1.0.2"
checksum: 10c0/82850e62f412a258b71e123d4ed3873fa9377c216809551192bb6769329340176f109c2eeae8c22a8d386c76739855f78e8716515c818bcaef384b51110f0f3c
languageName: node
linkType: hard

Expand Down Expand Up @@ -19037,15 +19036,15 @@ __metadata:
linkType: hard

"which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.2":
version: 1.1.14
resolution: "which-typed-array@npm:1.1.14"
version: 1.1.15
resolution: "which-typed-array@npm:1.1.15"
dependencies:
available-typed-arrays: "npm:^1.0.6"
call-bind: "npm:^1.0.5"
available-typed-arrays: "npm:^1.0.7"
call-bind: "npm:^1.0.7"
for-each: "npm:^0.3.3"
gopd: "npm:^1.0.1"
has-tostringtag: "npm:^1.0.1"
checksum: 10c0/0960f1e77807058819451b98c51d4cd72031593e8de990b24bd3fc22e176f5eee22921d68d852297c786aec117689f0423ed20aa4fde7ce2704d680677891f56
has-tostringtag: "npm:^1.0.2"
checksum: 10c0/4465d5348c044032032251be54d8988270e69c6b7154f8fcb2a47ff706fe36f7624b3a24246b8d9089435a8f4ec48c1c1025c5d6b499456b9e5eff4f48212983
languageName: node
linkType: hard

Expand Down

0 comments on commit 3c6737d

Please sign in to comment.