Signing Nomos Client

Our implementation of the SigningCosmWasmClient

SigningCosmWasmClient is a cosmos provider that has a signer. It can sign messages and send transactions to the blockchain, as well as reading data from it.

We implemented our version of the SigningCosmWasmClient so that any read action in third party apps is forwarded and handled by our application. Our provider has the same exact functions as the original provider.

We do this to wrap every transaction made by a user in a third party app inside the proposal of a multisig transaction. This way if a user makes a transfer, deposit, swap or any kind of action in a third party app, the action will be converted into a multisig proposal.

Interface

We can find the exact same functions in of the SigningCosmWasmClient in our provider.

export declare class SigningNomosClient extends NomosClient implements SigningCosmWasmClientIface {
    readonly registry: Registry;
    readonly broadcastTimeoutMs: number | undefined;
    readonly broadcastPollIntervalMs: number | undefined;
    private readonly signer;
    private readonly aminoTypes;
    private readonly gasPrice;
    protected constructor(cometClient: TendermintClient | undefined, signer: OfflineSigner, options: SigningCosmWasmClientOptions);
    static connectWithSigner(endpoint: string | HttpEndpoint, signer: OfflineSigner, options?: SigningCosmWasmClientOptions): Promise<SigningNomosClient>;
    static createWithSigner(cometClient: TendermintClient, signer: OfflineSigner, options?: SigningCosmWasmClientOptions): Promise<SigningNomosClient>;
    static offline(signer: OfflineSigner, options?: SigningCosmWasmClientOptions): Promise<SigningNomosClient>;
    signAndBroadcast(signerAddress: string, messages: readonly EncodeObject[], fee: StdFee | 'auto' | number, memo?: string): Promise<DeliverTxResponse>;
    instantiate(senderAddress: string, codeId: number, msg: JsonObject, label: string, fee: StdFee | 'auto' | number, options?: InstantiateOptions): Promise<InstantiateResult>;
    updateAdmin(senderAddress: string, contractAddress: string, newAdmin: string, fee: StdFee | 'auto' | number, memo?: string): Promise<ChangeAdminResult>;
    clearAdmin(senderAddress: string, contractAddress: string, fee: StdFee | 'auto' | number, memo?: string): Promise<ChangeAdminResult>;
    migrate(senderAddress: string, contractAddress: string, codeId: number, migrateMsg: JsonObject, fee: StdFee | 'auto' | number, memo?: string): Promise<MigrateResult>;
    execute(senderAddress: string, contractAddress: string, msg: JsonObject, fee: StdFee | 'auto' | number, memo?: string, funds?: readonly Coin[]): Promise<ExecuteResult>;
    executeMultiple(senderAddress: string, instructions: readonly ExecuteInstruction[], fee: StdFee | 'auto' | number, memo?: string): Promise<ExecuteResult>;
    sendTokens(senderAddress: string, recipientAddress: string, amount: readonly Coin[], fee: StdFee | 'auto' | number, memo?: string): Promise<DeliverTxResponse>;
    delegateTokens(delegatorAddress: string, validatorAddress: string, amount: Coin, fee: StdFee | 'auto' | number, memo?: string): Promise<DeliverTxResponse>;
    undelegateTokens(delegatorAddress: string, validatorAddress: string, amount: Coin, fee: StdFee | 'auto' | number, memo?: string): Promise<DeliverTxResponse>;
    withdrawRewards(delegatorAddress: string, validatorAddress: string, fee: StdFee | 'auto' | number, memo?: string): Promise<DeliverTxResponse>;
    signAndBroadcastSync(signerAddress: string, messages: readonly EncodeObject[], fee: StdFee | 'auto' | number, memo?: string): Promise<string>;
    simulate(signerAddress: string, messages: readonly EncodeObject[], memo: string | undefined): Promise<number>;
    upload(senderAddress: string, wasmCode: Uint8Array, fee: StdFee | 'auto' | number, memo?: string, instantiatePermission?: AccessConfig): Promise<UploadResult>;
    instantiate2(senderAddress: string, codeId: number, salt: Uint8Array, msg: JsonObject, label: string, fee: StdFee | 'auto' | number, options?: InstantiateOptions): Promise<InstantiateResult>;
    sign(signerAddress: string, messages: readonly EncodeObject[], fee: StdFee, memo: string, explicitSignerData?: SignerData): Promise<TxRaw>;
    private signAmino;
    private signDirect;
}

Last updated