@startbahn/startrail-sdk-js 1.30.0-beta.1 → 1.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/startrail-sdk.js +23 -0
- package/package.json +1 -1
- package/types/startrail-sdk-js.d.ts +16 -0
package/dist/startrail-sdk.js
CHANGED
|
@@ -135533,6 +135533,11 @@ class Service {
|
|
|
135533
135533
|
return this._handleTypedSignatureAndMainApiRequest(Object.assign(Object.assign({}, formattedReq), { body: args.isCompressEnabled ? util_1.compressJsonToBuffer(req.body) : req.body, typedDataBody: args.isCompressEnabled ? util_1.compressJsonToBuffer(typedDataProps(req)) : typedDataProps(req) }), httpRequestInfo('/srr/bulk', 'post'));
|
|
135534
135534
|
});
|
|
135535
135535
|
}
|
|
135536
|
+
checkERC2981Royalty(args) {
|
|
135537
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
135538
|
+
return this.tx.sendRequest('post', '/srr/erc2981/checker', { body: args });
|
|
135539
|
+
});
|
|
135540
|
+
}
|
|
135536
135541
|
/**
|
|
135537
135542
|
* Change language on your browser wallet
|
|
135538
135543
|
* @throws Will throw an error
|
|
@@ -135809,6 +135814,24 @@ class Startrail {
|
|
|
135809
135814
|
}
|
|
135810
135815
|
});
|
|
135811
135816
|
}
|
|
135817
|
+
/**
|
|
135818
|
+
* If SRR is already issued, only tokenId is sufficient.
|
|
135819
|
+
* Otherwise, you need to provide metadata and issuerAddress.
|
|
135820
|
+
* Props in metadata are directly referenced to get royalty information.
|
|
135821
|
+
*/
|
|
135822
|
+
checkERC2981Royalty(args) {
|
|
135823
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
135824
|
+
if (this.store.torusStatus.popupInprogress)
|
|
135825
|
+
return false;
|
|
135826
|
+
this.store.switchPopupState();
|
|
135827
|
+
try {
|
|
135828
|
+
return yield this.service.checkERC2981Royalty(args);
|
|
135829
|
+
}
|
|
135830
|
+
finally {
|
|
135831
|
+
this.store.switchPopupState();
|
|
135832
|
+
}
|
|
135833
|
+
});
|
|
135834
|
+
}
|
|
135812
135835
|
/**
|
|
135813
135836
|
* Change language on your browser wallet
|
|
135814
135837
|
* @throws Will throw an error
|
package/package.json
CHANGED
|
@@ -81,6 +81,12 @@ declare module '@startbahn/startrail-sdk-js' {
|
|
|
81
81
|
* @throws Will throw an error
|
|
82
82
|
*/
|
|
83
83
|
bulk(args: Type.Bulk): Promise<Type.ResponseFromBatch | false>;
|
|
84
|
+
/**
|
|
85
|
+
* If SRR is already issued, only tokenId is sufficient.
|
|
86
|
+
* Otherwise, you need to provide metadata and issuerAddress.
|
|
87
|
+
* Props in metadata are directly referenced to get royalty information.
|
|
88
|
+
*/
|
|
89
|
+
checkERC2981Royalty(args: Type.IERC2981RoyaltyRequest): Promise<Type.IERC2981RoyaltyResponse | false>;
|
|
84
90
|
/**
|
|
85
91
|
* Change language on your browser wallet
|
|
86
92
|
* @throws Will throw an error
|
|
@@ -184,6 +190,15 @@ declare module '@startbahn/startrail-sdk-js/types' {
|
|
|
184
190
|
artistAddress: string;
|
|
185
191
|
lockExternalTransfer: boolean;
|
|
186
192
|
}
|
|
193
|
+
export interface IERC2981RoyaltyRequest {
|
|
194
|
+
tokenId?: string;
|
|
195
|
+
metadata?: object;
|
|
196
|
+
issuerAddress?: string;
|
|
197
|
+
}
|
|
198
|
+
export interface IERC2981RoyaltyResponse {
|
|
199
|
+
royaltyReceiver: string | null;
|
|
200
|
+
royaltyBasisPoints: number | null;
|
|
201
|
+
}
|
|
187
202
|
export interface EIP712TypedData {
|
|
188
203
|
types: Record<string, ReadonlyArray<TypedDataField>>;
|
|
189
204
|
primaryType: MetaTxRequestType;
|
|
@@ -684,6 +699,7 @@ declare module '@startbahn/startrail-sdk-js/service' {
|
|
|
684
699
|
addCustomHistoriesToSRRs(args: Type.AddCustomHistoriesToSRRs): Promise<Type.ResponseOfEthStateChange>;
|
|
685
700
|
transferFromWithProvenance(args: Type.TransferFromWithProvenance): Promise<Type.ResponseOfEthStateChange | false>;
|
|
686
701
|
bulk(args: Type.Bulk): Promise<Type.ResponseFromBatch | false>;
|
|
702
|
+
checkERC2981Royalty(args: Type.IERC2981RoyaltyRequest): Promise<Type.IERC2981RoyaltyResponse>;
|
|
687
703
|
/**
|
|
688
704
|
* Change language on your browser wallet
|
|
689
705
|
* @throws Will throw an error
|