0

I am using DAML-on-Fabric (running DAML based on Hyperledger Fabric).

When I login with Alice and issue a IOU, the app shows PartyNotKnownOnLedger (Party not known on ledger).

How do I fix this?

stefanobaghino
  • 11,253
  • 4
  • 35
  • 63
Ethan Hu
  • 33
  • 3

1 Answers1

1

As of DAML 0.13.52, the sandbox shipped in the SDK implicitly "allocates" parties for you. This is usually not the case when using actual distributed ledgers (such as Hyperledger Fabric).

To allocate the party, you can either use the SDK assistant daml ledger allocate-parties command or apply the allocateParty function using DAML script (documentation here).

Alternatively, apps from other languages can use the AllocateParty RPC in the PartyManagementService in the Ledger API. The Ledger API has available bindings in Java and Scala; there is no available wrapper for the PartyManagementService but you can use the raw gRPC-generated code to use them (more on the Ledger API here).

Since the Ledger API is defined with gRPC you can use any other language with gRPC support (more on the topic here).

stefanobaghino
  • 11,253
  • 4
  • 35
  • 63
  • 1
    Thank you for your explanation. I resolved this issue by running 'daml ledger allocate-parties' in the root of quickstart – Ethan Hu Feb 21 '20 at 07:46