Event

Webhook Event.

rpc Event

webhook_api.v1.Event

Webhook Event.

requests EventRequest

webhook_api.v1.EventRequest

FieldTypeDescription
eventEventEvent.
resp, _ := eventConsumerService.Event(ctx, &v1.EventRequest{
  Event: &v1.Event{
    DeliveryDate: "2007-01-02T15:04:05Z",
    EventId: "EVENT_ID",
    EventType: v1.EventType_EVENT_TYPE_UNSPECIFIED,
    OwnerId: "eyJwtHeader.eyJwtPayload.Secret",
    Signature: "SignatureLenVariesByAlgorithm",
    Payload: &v1.Event_WalletCreatedPayload{
      WalletCreatedPayload:&v1.CreateWalletPayload{
      Created: "2006-01-02T15:04:05Z",
      Did: "did:method-name:zDIDMultibase58Encoded",
      Name: "NAME",
    },
    },
  },
})
fmt.Println(resp)
const createwalletpayload = new CreateWalletPayload();
createwalletpayload.setCreated("2006-01-02T15:04:05Z");
createwalletpayload.setDid("did:method-name:zDIDMultibase58Encoded");
createwalletpayload.setName("NAME");
const event = new Event();
event.setDeliveryDate("2007-01-02T15:04:05Z");
event.setEventId("EVENT_ID");
event.setEventType(EventType.EVENT_TYPE_WALLET_CREATED);
event.setOwnerId("eyJwtHeader.eyJwtPayload.Secret");
event.setSignature("SignatureLenVariesByAlgorithm");
event.setWalletCreatedPayload(createwalletpayload);
const eventrequest = new EventRequest();
eventrequest.setEvent(event);

service.event(eventrequest, (err, value:EventResponse|null) => {
    const resp = JSON.stringify(err ? err : value);
    console.log("received ", resp);
})
using System;
using Grpc.Core;
using WebhookApi.V1;

namespace main
{
  class Program
  {
    static void Main(string[] args)
    {
      Channel channel = new Channel("YOUR_WEBHOOK_URL:443", ChannelCredentials.Insecure); 
      var client = new EventConsumerService.EventConsumerServiceClient(channel); 
      var headers = new Metadata();
      var createWalletPayload = new CreateWalletPayload{
        Created = "2006-01-02T15:04:05Z",
        Did = "did:method-name:zDIDMultibase58Encoded",
        Name = "NAME",
      };
      var event = new Event{
        DeliveryDate = "2007-01-02T15:04:05Z",
        EventId = "EVENT_ID",
        EventType = EventType.Event_type_unspecified,
        OwnerId = "eyJwtHeader.eyJwtPayload.Secret",
        Signature = "SignatureLenVariesByAlgorithm",
        WalletCreatedPayload = createWalletPayload,
      };
      var eventRequest = new EventRequest{
        Event = event,
      };
      var reply = client.Event(eventRequest, headers);
      Console.WriteLine("Response: " + reply);
      channel.ShutdownAsync().Wait();
    }
  }
}
package demo;

import io.grpc.Channel;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import webhook_api.v1.EventConsumerServiceGrpc;
import webhook_api.v1.Webhook.CreateWalletPayload;
import webhook_api.v1.Webhook.Event;
import webhook_api.v1.Webhook.EventRequest;
import webhook_api.v1.Webhook.EventResponse;
import webhook_api.v1.Webhook.EventType;

public class App {
  public static void main(String[] args) {
    ManagedChannel channel = ManagedChannelBuilder
      .forAddress("YOUR_WEBHOOK_URL", 443)
      .usePlaintext()
      .build();
    EventConsumerServiceGrpc.EventConsumerServiceBlockingStub blockStub =
        EventConsumerServiceGrpc.newBlockingStub(channel);
    
    CreateWalletPayload req_CreateWalletPayload =
        CreateWalletPayload.newBuilder()
          .setCreated("2006-01-02T15:04:05Z")
          .setDid("did:method-name:zDIDMultibase58Encoded")
          .setName("NAME")
          .build();
    Event req_Event =
        Event.newBuilder()
          .setDeliveryDate("2007-01-02T15:04:05Z")
          .setEventId("EVENT_ID")
          .setEventType(EventType.EVENT_TYPE_UNSPECIFIED)
          .setOwnerId("eyJwtHeader.eyJwtPayload.Secret")
          .setSignature("SignatureLenVariesByAlgorithm")
          .setWalletCreatedPayload(req_CreateWalletPayload)
          .build();
    EventRequest req_EventRequest =
        EventRequest.newBuilder()
          .setEvent(req_Event)
          .build();
    EventResponse resp = blockStub.event(req_EventRequest);
    System.out.println(resp);
    channel.shutdown();
  }
}
const createwalletpayload = new CreateWalletPayload();
createwalletpayload.setCreated("2006-01-02T15:04:05Z");
createwalletpayload.setDid("did:method-name:zDIDMultibase58Encoded");
createwalletpayload.setName("NAME");
const event = new Event();
event.setDeliveryDate("2007-01-02T15:04:05Z");
event.setEventId("EVENT_ID");
event.setEventType(EventType.EVENT_TYPE_UNSPECIFIED);
event.setOwnerId("eyJwtHeader.eyJwtPayload.Secret");
event.setSignature("SignatureLenVariesByAlgorithm");
event.setWalletCreatedPayload(createwalletpayload);
const eventrequest = new EventRequest();
eventrequest.setEvent(event);

service.event(eventrequest, (err, value) => {
    const resp = JSON.stringify(err ? err : value);
    console.log("received ", resp);
})
extern crate grpc-sdks;
use tonic::transport::Channel;

use grpc-sdks::webhook_api::v1::Event;
use grpc-sdks::webhook_api::v1::EventType;
use grpc-sdks::webhook_api::v1::CreateWalletPayload;
use grpc-sdks::webhook_api::v1::EventRequest;
use grpc-sdks::webhook_api::v1::event_consumer_service_client::EventConsumerServiceClient;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
  let channel = Channel::from_static("YOUR_WEBHOOK_URL")
    .connect()
    .await?;
  let mut client = EventConsumerServiceClient::new(channel); 

  let request = tonic::Request::new(
    EventRequest{
      event: Some(Event{
        created_date: None,
        delivery_date: String::from("2007-01-02T15:04:05Z"),
        event_id: String::from("EVENT_ID"),
        event_type: EventType::EventTypeUnspecified as i32,
        owner_id: String::from("eyJwtHeader.eyJwtPayload.Secret"),
        payload: Some(CreateWalletPayload{
          created: String::from("2006-01-02T15:04:05Z"),
          did: String::from("did:method-name:zDIDMultibase58Encoded"),
          name: String::from("NAME")
        }),
        signature: String::from("SignatureLenVariesByAlgorithm")
      })
    });
// sending request and waiting for response
  let response = client.event(request).await?.into_inner();
  println!("RESPONSE={:?}", response);
  Ok(())
}
package app

import io.grpc.ManagedChannelBuilder
import webhook_api.v1.EventConsumerServiceGrpc
import webhook_api.v1.Webhook.CreateWalletPayload
import webhook_api.v1.Webhook.Event
import webhook_api.v1.Webhook.EventRequest
import webhook_api.v1.Webhook.EventResponse
import webhook_api.v1.Webhook.EventType

fun main() {
    val channel = ManagedChannelBuilder
            .forAddress("YOUR_WEBHOOK_URL", 443)
            .usePlaintext()
            .build()
    var blockStub = EventConsumerServiceGrpc.newBlockingStub(channel)
    
    val req_CreateWalletPayload = CreateWalletPayload.newBuilder()
          .setCreated("2006-01-02T15:04:05Z")
          .setDid("did:method-name:zDIDMultibase58Encoded")
          .setName("NAME")
          .build()
    val req_Event = Event.newBuilder()
          .setDeliveryDate("2007-01-02T15:04:05Z")
          .setEventId("EVENT_ID")
          .setEventType(EventType.EVENT_TYPE_UNSPECIFIED)
          .setOwnerId("eyJwtHeader.eyJwtPayload.Secret")
          .setSignature("SignatureLenVariesByAlgorithm")
          .setWalletCreatedPayload(req_CreateWalletPayload)
          .build()
    val req_EventRequest = EventRequest.newBuilder()
          .setEvent(req_Event)
          .build()
    val resp = blockStub.event(req_EventRequest)
    println(resp)
    channel.shutdown()
}


returns EventResponse

webhook_api.v1.EventResponse

{}