Static
createCreates a mock DID resolution result for testing purposes.
Static
generateGenerates a dummy authorization
property for a DWN message that only conforms to schema validation.
Static
generateGenerates a dummy authorization
property for a DWN message that only conforms to schema validation.
Static
generateStatic
generateGenerates a valid RecordsWrite that modifies the given an existing write.
Any mutable property is not specified will be automatically mutated.
e.g. if published
is not specified, it will be toggled from the state of the given existing write.
Static
generateOptional
input: GenerateGrantCreateInputStatic
generateStatic
generateStatic
generateGenerates a MessagesSubscribe message for testing.
Optional
input: GenerateMessagesSubscribeInputStatic
generateStatic
generateGenerates a encrypted RecordsWrite message for testing.
Set to true
to attach the symmetric key encrypted by the protocol context derived public key
Set to true
to attach the symmetric key encrypted by the protocol path derived public key
Optional
protocolOptional
protocolProtocol definition used to generate the RecordsWrite.
Must be the RECIPIENT's protocol definition if encryptSymmetricKeyWithProtocolPathDerivedKey
is true,
because the recipient's public keys will be needed to encrypt the symmetric key.
Optional
protocolOptional
recipient?: stringStatic
generateGenerates a ProtocolsConfigure message for testing.
Optional parameters are generated if not given.
Implementation currently uses ProtocolsConfigure.create()
.
Optional
input: GenerateProtocolsConfigureInputStatic
generateGenerates a ProtocolsQuery message for testing.
Optional
input: GenerateProtocolsQueryInputStatic
generateGenerates a RecordsDelete for testing.
Optional
input: GenerateRecordsDeleteInputStatic
generateGenerates a RecordsQuery message for testing.
Optional
input: GenerateRecordsQueryInputStatic
generateGenerates a RecordsSubscribe message for testing.
Optional
input: GenerateRecordsSubscribeInputStatic
generateGenerates a RecordsWrite message for testing.
dataBytes
& dataStream
returned will be undefined
as long as dataCid
or dataSize
is given.
Implementation currently uses RecordsWrite.create()
.
Optional
input: GenerateRecordsWriteInputStatic
randomStatic
randomStatic
randomStatic
randomStatic
randomStatic
randomGenerates a random timestamp. Optionally allows you to set specific non-randomized values for the timestamp.
Optional
options: { Optional
day?: numberOptional
hour?: numberOptional
microsecond?: numberOptional
millisecond?: numberOptional
minute?: numberOptional
month?: numberOptional
second?: numberOptional
year?: numberrandom UTC ISO-8601 timestamp
Utility class for generating data for testing.