dag_signMetagraphDataTransaction

Sends a new data transaction to the selected metagraph and returns signatures in the response.

Parameters

Name
Type
Description

MetagraphId

String

The metagraph id.

Data

Object<any>

The transaction data object.

SignDataTransactionResponse

type SignDataTransactionResponse = {
  hash: string;
  feeHash?: string;
  signature: string;
  feeSignature?: string;
};

Return Type

Object<SignDataTransactionResponse> - An object that includes transaction hash, fee hash (optional), signature and feeSignature (optional)

Example

await provider.request({
  method: "dag_signMetagraphDataTransaction",
  params: [
    "DAG1ocZbNdp8GYAktqwjVyCRR1CpqaUQNi82gUwk",
    {
      MintCollection: {
        name: "One collection"
      }
    }
  ],
});

//  { 
//    hash: "2d9fe9bad17debed7c903f22b74aac8af270daea7995dd099a58d6b201547169", 
//    feeHash: "0a5feeeac5a0c62f776c9b4bd887c77caf495c331c94fa5d43d7a2bbf24e3ef1",
//    signature: "3045022100b35798008516373fcc6eef75fe8e322ce8fe0dccc4802b052f3ddc7c6b5dc2900220154cac1e4f3e7d9a64f4ed9d2a518221b273fe782f037a5842725054f1c62280",
//    feeSignature: "5432022100b35798008516373fcc6eef75fe8e322ce8fe0dccc4802b052f3ddc7c6b5dc2900220154cac1e4f3e7d9a64f4ed9d2a518221b273fe782f037a5842725054f1c62280"
//  }

Last updated

Was this helpful?