@startbahn/startrail-sdk-js 1.20.0 → 1.22.0-beta.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startbahn/startrail-sdk-js",
3
- "version": "1.20.0",
3
+ "version": "1.22.0-beta.2",
4
4
  "description": "Startrail Api for JS SDK",
5
5
  "main": "dist/startrail-sdk.js",
6
6
  "unpkg": "dist/startrail-sdk.js",
@@ -53,7 +53,7 @@
53
53
  "webpack-dev-server": "^3.10.3"
54
54
  },
55
55
  "dependencies": {
56
- "@toruslabs/torus-embed": "^1.11.0",
56
+ "@toruslabs/torus-embed": "^1.13.2",
57
57
  "axios": "^0.19.0",
58
58
  "globalthis": "^1.0.1"
59
59
  },
@@ -39,6 +39,17 @@ declare module '@startbahn/startrail-sdk-js' {
39
39
  * @throws Will throw an error
40
40
  */
41
41
  createSRR(args: Type.CreateSRR): Promise<Type.ResponseOfEthStateChange | false>;
42
+ /**
43
+ * Update SRR metadata
44
+ * @todo Replace with EIP-712 signing format
45
+ * @throws Will throw an error
46
+ */
47
+ updateMetadata(args: Type.UpdateMetadata): Promise<Type.ResponseOfEthStateChange | false>;
48
+ /**
49
+ * Convert metadata according to the latest version schema
50
+ * @throws Will throw an error
51
+ */
52
+ convertMetadata(args: Type.ConvertMetadata): Promise<Type.ResponseOfConvertMetadata>;
42
53
  /**
43
54
  * Creates and sends a batch of SRRs to be issued
44
55
  * @throws Will throw an error
@@ -83,6 +94,9 @@ declare module '@startbahn/startrail-sdk-js/types' {
83
94
  tokenIds: string[];
84
95
  customHistoryIds: string[];
85
96
  }
97
+ export interface AdditionalMetadataParams {
98
+ externalUrl?: string;
99
+ }
86
100
  export interface AuthAction {
87
101
  login: boolean;
88
102
  signup: boolean;
@@ -110,6 +124,11 @@ declare module '@startbahn/startrail-sdk-js/types' {
110
124
  hashFlag?: boolean;
111
125
  body: object;
112
126
  }
127
+ export interface ConvertMetadata {
128
+ tokenId: string;
129
+ metadata: object;
130
+ additionalParams?: AdditionalMetadataParams;
131
+ }
113
132
  export interface CreateSRR extends CreateSRRForRequest, Pick<HTTPHeadersForStartrailLUW, 'startrailLUWContractAddress'> {
114
133
  }
115
134
  export interface CreateSRRBatch extends Pick<HTTPHeadersForStartrailLUW, 'startrailLUWContractAddress'> {
@@ -119,6 +138,7 @@ declare module '@startbahn/startrail-sdk-js/types' {
119
138
  isPrimaryIssuer: boolean;
120
139
  metadata: object;
121
140
  artistAddress: string;
141
+ lockExternalTransfer?: boolean;
122
142
  }
123
143
  export interface WordsDeterminedByCondition {
124
144
  authLabel: {
@@ -288,7 +308,7 @@ declare module '@startbahn/startrail-sdk-js/types' {
288
308
  channelNonce?: string;
289
309
  requestData: object;
290
310
  }
291
- export interface updateMetadataByTokenId extends Pick<HTTPHeadersForStartrailLUW, 'startrailLUWContractAddress'> {
311
+ export interface UpdateMetadata extends Pick<HTTPHeadersForStartrailLUW, 'startrailLUWContractAddress'> {
292
312
  tokenId: string;
293
313
  metadata: object;
294
314
  }
@@ -304,6 +324,11 @@ declare module '@startbahn/startrail-sdk-js/types' {
304
324
  body: object;
305
325
  }
306
326
  export type RequestMethod = 'post' | 'put' | 'get' | 'delete';
327
+ export interface ResponseOfConvertMetadata {
328
+ metadata: object;
329
+ isConverted: boolean;
330
+ message: string | null;
331
+ }
307
332
  export interface ResponseOfEthStateChange {
308
333
  txReceiptId: number;
309
334
  }
@@ -583,6 +608,16 @@ declare module '@startbahn/startrail-sdk-js/service' {
583
608
  * @throws Will throw an error
584
609
  */
585
610
  createSRR(args: Type.CreateSRR): Promise<Type.ResponseOfEthStateChange>;
611
+ /**
612
+ * Update SRR metadata by tokenId
613
+ * @throws Will throw an error
614
+ */
615
+ updateMetadata(args: Type.UpdateMetadata): Promise<Type.ResponseOfEthStateChange | false>;
616
+ /**
617
+ * Convert metadata according to the latest version schema
618
+ * @throws Will throw an error
619
+ */
620
+ convertMetadata(args: Type.ConvertMetadata): Promise<Type.ResponseOfConvertMetadata>;
586
621
  /**
587
622
  * Creates and sends a batch of SRRs to be issued providing the same SRRs as /bulk/typedData to prove the same merkle root
588
623
  * @throws Will throw an error