Skip to content

Commit

Permalink
feat: export missed method
Browse files Browse the repository at this point in the history
  • Loading branch information
eruizgar91 committed Apr 24, 2024
1 parent 74e1149 commit e899601
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nevermined-io/sdk",
"version": "3.0.0-rc17",
"version": "3.0.0-rc18",
"description": "Javascript SDK for connecting with Nevermined Data Platform ",
"main": "./dist/node/sdk.js",
"typings": "./dist/node/sdk.d.ts",
Expand Down
7 changes: 0 additions & 7 deletions src/nevermined/NvmApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,16 +171,9 @@ export class NvmApp {
ENTRYPOINT_ADDRESS_V06,
config.zeroDevProjectId,
)

// const zerodevAccountSigner = zerodevProvider.getAccountSigner()
this.userAccount = await NvmAccount.fromZeroDevSigner(kernelClient)
// this.zeroDevSignerAccount = smartAccountSigner
// this.useZeroDevSigner = true
} else if (account instanceof NvmAccount) {
// TODO Review ZeroDev integration as part of the NvmAccount
this.userAccount = account
// this.zeroDevSignerAccount = account
// this.useZeroDevSigner = true
} else {
this.userAccount = this.fullSDK.accounts.getAccount(account)
}
Expand Down
2 changes: 1 addition & 1 deletion src/nevermined/utils/JwtUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class EthSignJWT extends SignJWT {
}

const value = {
from: await account.getAddress(),
from: account.getId(),
message: eip712Data.message,
token: decoder.decode(data),
}
Expand Down
6 changes: 2 additions & 4 deletions src/nevermined/utils/SignatureUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ export class SignatureUtils extends Instantiable {
typeof account === 'string' ? this.nevermined.accounts.getAccount(account) : account

if (nvmAccount.isZeroDev()) {
const signature = await nvmAccount.getAccountSigner().signTypedData({
const signature = await nvmAccount.getKernelClient().signTypedData({
domain,
types: types as any,
types: types,
message: value,
primaryType: 'Nevermined',
})
Expand Down Expand Up @@ -76,8 +76,6 @@ export class SignatureUtils extends Instantiable {

if (nvmAccount.isZeroDev()) {
return await nvmAccount.getAccountSigner().signTransaction({ data: tx })
// TODO: Implement ZeroDev signing
return `0x`
} else if (nvmAccount.accountType.signerType === 'local') {
return (nvmAccount.getAccountSigner() as LocalAccount).signTransaction({
data: tx,
Expand Down
5 changes: 5 additions & 0 deletions src/nevermined/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
export {
BlockchainViemUtils,
checkContractExists,
deployContractInstance,
didToTokenId,
encodeBytes32String,
formatEther,
formatUnits,
getBytes,
getChecksumAddress,
getContractInstance,
getInputsOfFunction,
getInputsOfFunctionFormatted,
getKernelClient,
getSignatureOfFunction,
isValidAddress,
keccak256,
Expand All @@ -19,6 +23,7 @@ export {
makeWallets,
parseEther,
parseUnits,
searchAbiEvent,
searchAbiFunction,
zeroPadValue,
} from './BlockchainViemUtils'
Expand Down

0 comments on commit e899601

Please sign in to comment.