Catalog npm
Back to packageRELEASE DETAILS

4.0.3

npm

@0xsambtc/protocol-kit

SDK that facilitates the interaction with Safe Smart Accounts

ethereumsafesdksmart accountwallet
Published19 Jul 2024
Direct dependencies28
Transitive dependenciesNot calculated

README

Current package documentation

Protocol Kit

npm Version GitHub Release GitHub

Software development kit that facilitates the interaction with Safe Smart Accounts using a TypeScript interface. This Kit can be used to create new Safe accounts, update the configuration of existing Safes, create and execute transactions, among other features.

Table of contents

Documentation

Head to the Protocol Kit docs to learn more about how to use this SDK.

Installation

Install the package with yarn or npm:

yarn add @safe-global/protocol-kit
npm install @safe-global/protocol-kit

Quick Start

  • provider: You can set an EIP-1193 compatible provider or an HTTP/WebSocket RPC URL.
  • signer: This is an optional parameter. It should be the provider's address you want to use or a private key. If not set, it will try to fetch a connected account from the provider.

Loading an already deployed Safe, using the safeAddress property:

import Safe from '@safe-global/protocol-kit'

const protocolKit = await Safe.init({
  provider,
  signer,
  safeAddress
})

Initialization of an undeployed Safe using the predictedSafe property. Because Safes are deployed in a deterministic way, passing a predictedSafe will allow to initialize the SDK with the Safe configuration and use it to some extent before it's deployed:

import Safe, { PredictedSafeProps } from '@safe-global/protocol-kit'

const predictedSafe: PredictedSafeProps = {
  safeAccountConfig,
  safeDeploymentConfig
}

const protocolKit = await Safe.init({
  provider,
  signer,
  predictedSafe
})

Need Help or Have Questions?

If you have any doubts, questions, or need assistance, feel free to reach out! Here you will find how to get support.

Contributing

Please read our contribution guidelines before submitting any changes. We appreciate your help! 🙌

License

This library is released under MIT.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 28

Native requirements
28 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
@noble/hashes
Environment
{
  "local_name": "@noble/hashes",
  "alias": false,
  "peer_metadata": null
}
^1.3.3runtime
@safe-global/safe-core-sdk-types
Environment
{
  "local_name": "@safe-global/safe-core-sdk-types",
  "alias": false,
  "peer_metadata": null
}
^5.0.3runtime
@safe-global/safe-deployments
Environment
{
  "local_name": "@safe-global/safe-deployments",
  "alias": false,
  "peer_metadata": null
}
^1.37.1runtime
abitype
Environment
{
  "local_name": "abitype",
  "alias": false,
  "peer_metadata": null
}
^1.0.2runtime
ethereumjs-util
Environment
{
  "local_name": "ethereumjs-util",
  "alias": false,
  "peer_metadata": null
}
^7.1.5runtime
ethers
Environment
{
  "local_name": "ethers",
  "alias": false,
  "peer_metadata": null
}
^6.13.1runtime
semver
Environment
{
  "local_name": "semver",
  "alias": false,
  "peer_metadata": null
}
^7.6.2runtime
@gnosis.pm/safe-contracts
Environment
{
  "local_name": "@gnosis.pm/safe-contracts-v1.3.0",
  "alias": true,
  "peer_metadata": null
}
npm:@gnosis.pm/safe-contracts@1.3.0development
@nomicfoundation/hardhat-ethers
Environment
{
  "local_name": "@nomicfoundation/hardhat-ethers",
  "alias": false,
  "peer_metadata": null
}
^3.0.6development
@openzeppelin/contracts
Environment
{
  "local_name": "@openzeppelin/contracts",
  "alias": false,
  "peer_metadata": null
}
^2.5.1development
@safe-global/safe-contracts
Environment
{
  "local_name": "@safe-global/safe-contracts-v1.4.1",
  "alias": true,
  "peer_metadata": null
}
npm:@safe-global/safe-contracts@1.4.1development
@types/chai
Environment
{
  "local_name": "@types/chai",
  "alias": false,
  "peer_metadata": null
}
^4.3.16development
@types/chai-as-promised
Environment
{
  "local_name": "@types/chai-as-promised",
  "alias": false,
  "peer_metadata": null
}
^7.1.8development
@types/mocha
Environment
{
  "local_name": "@types/mocha",
  "alias": false,
  "peer_metadata": null
}
^10.0.6development
@types/semver
Environment
{
  "local_name": "@types/semver",
  "alias": false,
  "peer_metadata": null
}
^7.5.8development
@types/yargs
Environment
{
  "local_name": "@types/yargs",
  "alias": false,
  "peer_metadata": null
}
^17.0.32development
chai
Environment
{
  "local_name": "chai",
  "alias": false,
  "peer_metadata": null
}
^4.3.10development
chai-as-promised
Environment
{
  "local_name": "chai-as-promised",
  "alias": false,
  "peer_metadata": null
}
^7.1.1development
dotenv
Environment
{
  "local_name": "dotenv",
  "alias": false,
  "peer_metadata": null
}
^16.4.5development
hardhat
Environment
{
  "local_name": "hardhat",
  "alias": false,
  "peer_metadata": null
}
^2.19.3development
hardhat-deploy
Environment
{
  "local_name": "hardhat-deploy",
  "alias": false,
  "peer_metadata": null
}
^0.11.45development
hardhat-deploy-ethers
Environment
{
  "local_name": "hardhat-deploy-ethers",
  "alias": false,
  "peer_metadata": null
}
^0.4.2development
mocha
Environment
{
  "local_name": "mocha",
  "alias": false,
  "peer_metadata": null
}
^10.2.0development
nyc
Environment
{
  "local_name": "nyc",
  "alias": false,
  "peer_metadata": null
}
^15.1.0development
tsconfig-paths
Environment
{
  "local_name": "tsconfig-paths",
  "alias": false,
  "peer_metadata": null
}
^4.2.0development
viem
Environment
{
  "local_name": "viem",
  "alias": false,
  "peer_metadata": null
}
^2.15.1development
web3
Environment
{
  "local_name": "web3",
  "alias": false,
  "peer_metadata": null
}
^4.7.0development
yargs
Environment
{
  "local_name": "yargs",
  "alias": false,
  "peer_metadata": null
}
^17.7.2development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-fJyvtmlb/qseuzDopE4/y0eZP6BqxcOe0P9KleqRd1XZZsxxmdZOJgNgj9MlwndGomovY7HMfwey3qBoE5biPA==",
  "shasum": "eb286d4718485c962e3272e2276fac6ebfe59b8d",
  "tarball": "https://registry.npmjs.org/@0xsambtc/protocol-kit/-/protocol-kit-4.0.3.tgz",
  "fileCount": 220,
  "unpackedSize": 794998,
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIHiOJPuX0yxjCWkZIVP4sI5c7a/REymnjh8akGA08LDYAiEAmma+MlETgPOyLWKAII1yQtLzRcUJdwG5R5S6I3auMTA="
    }
  ]
}

Repository

PENDING
0xsambtc/safe-core-sdk

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 09:38 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:658d080c801548a2d474d451d31a9ce162d9960223d3593caac263cbdb191a4f

Other collected versions

View all collected versions →