Gnosis Safe Tx Service API client & associated tooling

Overview

Safe Transaction Service API Client

Using the SDK

Instantiate an API client

use safe_sdk::SafeClient;

/// From a chain id, by looking up hardcoded endpoints
let client = SafeClient::by_chain_id(1);

/// From mainnet ethereum
let client = SafeClient::ethereum();

/// From an endpoint/chain ID pair
let service = safe_sdk::networks::TxService { url: "". chain_id: 0};
let client = SafeClient::new(service);

Instantiate a signing client

use safe_sdk::SigningClient;

/// From an ethers signer
let client = SigningClient::try_from_signer(ethers_signer);

/// From ethereum with an ethers signer
/// overrides the chain_id of the signer
let client = SigningClient::ethereum(ethers_signer);

/// From a service and signer
let service = safe_sdk::networks::TxService { url: "". chain_id: 0};
let client = SigningClient::with_service_and_signer(service, ethers_signer);

/// From an existing SafeClient
let client = safe_client.with_signer(ethers_signer);

Common Safe Actions

use safe_sdk::rpc::info::SafeInfoResponse;

/// Read info
let info: SafeInfoResponse = client.safe_info(safe_address).await?;
dbg!(&info.nonce); // u64 of on-chain Nonce
dbg!(&info.owners) // vec of addresses

/// Get next available nonce
let next_nonce = client.next_nonce(safe_address).await?;

/// Get SAFE msig tx history
let history = client.msig_history_builder().query(safe_address).await?;

/// Get SAFE msig tx history by nonce range
let history = client.msig_history_builder()
    .min_nonce(15)
    .max_nonce(25)
    .query(safe_address)
    .await?;

Dispatch

let tx =

TODOs & Rough Edges

  • Most endpoints are not implemented yet. This SDK prioritizes automated TX submission, NOT full API implementation.
  • Many params/types are not yet implemented.
  • API documentation is incomplete and we don't know the function of some properties.
  • Better integration with ethers
    • More implementations of From<X> for MetaTransactionData
  • Some properties are stringly typed, and should be turned into enums (but again we don't know what they do lol)
  • Refine the API Response type, and the get/post macros to suck less
You might also like...
Unified directories for different use cases of an application, providing standard directories for local development, when run as service or when run by a user.

UniDirs Unified directories for different use cases of an application, providing standard directories for local development, when run as service or wh

Bitcoin Push Notification Service (BPNS) allows you to receive notifications of Bitcoin transactions of your non-custodial wallets on a provider of your choice, all while respecting your privacy

Bitcoin Push Notification Service (BPNS) Description Bitcoin Push Notification Service (BPNS) allows you to receive notifications of Bitcoin transacti

Onlyfans-type web service based on TOR with maximum privacy features.

onionfans Onlyfans-type web service based on TOR with maximum privacy features. Features "Vanishing" single-use feed CDN links Landing page No JavaScr

An easily deployable service to monitor mission-critical SPL token accounts
An easily deployable service to monitor mission-critical SPL token accounts

Vault watcher Monitoring critical spl-token accounts in real time Table of contents Introduction Usage Configuration Configuration examples Grafana In

An efficient, robust, and generalized batch submission service for rollup stacks written in pure rust.
An efficient, robust, and generalized batch submission service for rollup stacks written in pure rust.

archon is an efficient, robust, and generalized batch submission service for rollup stacks written in pure rust. Note Archon is primarily tested again

a simple rust service for Scheduling commands execution on time basis, an easy alternative to cron

Tasker A Simple crate which provides a service and a configuration API for genrating commands based tasks ,on time basis. Installation build from sour

Safe, fast, small crypto using Rust

THE SOFTWARE IS PROVIDED "AS IS" AND BRIAN SMITH AND THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES

Usable, easy and safe pure-Rust crypto

orion About Orion is a cryptography library written in pure Rust. It aims to provide easy and usable crypto while trying to minimize the use of unsafe

A safe implementation of the secure remote password authentication and key-exchange protocol (SRP), SRP6a and legacy are as features available.

Secure Remote Password (SRP 6 / 6a) A safe implementation of the secure remote password authentication and key-exchange protocol (SRP version 6a). Ver

Owner
Nomad
Nomad
Tooling for the simple-package-paths Nix RFC

Implementation Index the tree for references. If .git exists, use ls-tree equivalent Check the validity of the pkgs/unit directory Should only contain

Nixpkgs Architecture Team 3 Jan 18, 2023
Manage lockfiles in PKGBUILDs for upstreams that don't ship them, `updpkgsums` for dependency trees (Arch Linux tooling)

updlockfiles Manage lockfiles for packages that don't ship any upstream. Like updpkgsums but for 3rd party dependency trees. If you're not actively ma

null 11 Oct 27, 2022
Authenticated Encryption with Associated Data Algorithms: high-level encryption ciphers

RustCrypto: Authenticated Encryption with Associated Data (AEAD) Algorithms Collection of Authenticated Encryption with Associated Data (AEAD) algorit

Rust Crypto 457 Jan 4, 2023
Rust API Client for ImageKit.io a file storage and image processing service

Rust API Client for ImageKit.io a file storage and image processing service Usage You must retrieve your Public and Private Keys from the ImageKit Dev

Esteban Borai 4 Jul 31, 2022
🐰 Rust client library for the Leap Edge socket service

leap_edge_rs Utility library for connecting and receiving events from Leap Edge. Used for Channels and Pipe. Installation Add this to your Cargo.toml:

Hop 9 Sep 7, 2022
binance API client

bian-rs 币安API Rust async SDK 完成情况 接口 现货 U本位合约 币本位合约 欧式期权 http ?? 开发中 ?? ?? 开发中 未开始 websocket ?? 开发中 ?? ?? 开发中 未开始 使用 在 Cargo.toml 中添加依赖 [dependencies]

null 28 Nov 13, 2022
A smart-contract api and client for revm

revmup A smart contract and client API for revm. Features: Auto-generate contracts that interact directly with revm without needing ethers provider Co

Dave Bryson 17 Aug 6, 2023
A file storage service

hashfs A file storage service How to use it? Start up the service at terminal # You can specify the storage root path and access domain when you start

null 17 Dec 18, 2021
Smart Contract for Terra Name Service

TERRA NAME SERVICE CONTRACTS Terra Name Service is to create easy-to-remember names for your Terra address like ‘dokwon.ust’ instead of ‘terra1...whez

null 12 Nov 23, 2022
All the data an IC app needs to make seamless experiences, accessible directly on the IC. DAB is an open internet service for NFT, Token, Canister, and Dapp registries.

DAB ?? Overview An Internet Computer open internet service for data. All the data an IC app needs to make a seamless experience, accessible directly o

Psychedelic 58 Oct 6, 2022