client
): AgreementClient
Name | Type |
---|---|
client | SpaceportSDK |
AgreementClient
params
): Promise
<CreateAndSignResponse
>
Creates a user (if they don’t exist) and signs an agreement in one step.
This method calls the server-side endpoint which handles user creation and agreement signing.
Request sequencing is handled by the server.
Name | Type | Description |
---|---|---|
params | CreateAndSignParams | The parameters for creating and signing an agreement |
Promise
<CreateAndSignResponse
>
An object containing the job ID and success status
smartLicense
): Object
Prepares the signing details object based on a smart license template.
This helps guide the user in providing the correct information for the licenseeSigningDetails.
Name | Type | Description |
---|---|---|
smartLicense | SmartLicense | The smart license object. |
Object
An object containing suggested structures for details and files metadata.
Name | Type |
---|---|
requiredDetails | Record <string , unknown > |
requiredFilesMetadata | Record <string , unknown > |
agreementId
): Promise
<unknown
>
Gets agreement data.
Name | Type | Description |
---|---|---|
agreementId | bigint | The ID of the agreement. |
Promise
<unknown
>
Agreement data or throws error if not found.
agreementId
, docSignatureParams
, licensorSignatureParams
, docURI
): Promise
<{ transactionHash
: `0x${string}` }>
Accept an agreement proposal as a licensor.
Name | Type | Description |
---|---|---|
agreementId | bigint | - |
docSignatureParams | SignatureParams | Signature over the document |
licensorSignatureParams | SignatureParams | Licensor’s personal signature |
docURI | string | URI pointing to the agreement document |
Promise
<{ transactionHash
: `0x${string}` }>
An object with the transaction identifier.
data
): Promise
<{ transactionHash
: `0x${string}` }>
Batch sign multiple agreements at once.
Name | Type | Description |
---|---|---|
data | Object | Object containing arrays of listing IDs, signatures and document URIs |
data.listingIds | bigint [] | - |
data.docSignatures | SignatureParams [] | - |
data.personalSignatures | SignatureParams [] | - |
data.docURIs | string [] | - |
Promise
<{ transactionHash
: `0x${string}` }>
An object with the transaction identifier.
data
): Promise
<{ transactionHash
: `0x${string}` }>
Batch accept multiple agreements at once.
Name | Type | Description |
---|---|---|
data | Object | Object containing arrays of agreement IDs, signatures and document URIs |
data.agreementIds | bigint [] | - |
data.docSignatures | SignatureParams [] | - |
data.personalSignatures | SignatureParams [] | - |
data.docURIs | string [] | - |
Promise
<{ transactionHash
: `0x${string}` }>
An object with the transaction identifier.
params?
): Promise
<GetAgreementsResponse
>
Get agreements for the current user or a specific user
Name | Type | Description |
---|---|---|
params | GetAgreementsParams | Query parameters for filtering agreements |
Promise
<GetAgreementsResponse
>
Promise resolving to agreements response
params
): Promise
<GetAgreementAssetsResponse
>
Get assets for a specific agreement
Name | Type | Description |
---|---|---|
params | GetAgreementAssetsParams | Parameters including agreement ID |
Promise
<GetAgreementAssetsResponse
>
Promise resolving to agreement assets response