@unicitylabs/sphere-sdk 0.17.2-dev.2 → 0.17.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/dist/connect/index.cjs +7 -4
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.d.cts +4 -0
- package/dist/connect/index.d.ts +4 -0
- package/dist/connect/index.js +7 -4
- package/dist/connect/index.js.map +1 -1
- package/dist/core/index.cjs +69 -22
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +2 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +69 -22
- package/dist/core/index.js.map +1 -1
- package/dist/impl/browser/connect/index.cjs +1 -1
- package/dist/impl/browser/connect/index.cjs.map +1 -1
- package/dist/impl/browser/connect/index.js +1 -1
- package/dist/impl/browser/connect/index.js.map +1 -1
- package/dist/impl/wallet-api-v2/index.cjs +3 -0
- package/dist/impl/wallet-api-v2/index.cjs.map +1 -1
- package/dist/impl/wallet-api-v2/index.js +3 -0
- package/dist/impl/wallet-api-v2/index.js.map +1 -1
- package/dist/index.cjs +88 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -1
- package/dist/index.d.ts +22 -1
- package/dist/index.js +85 -22
- package/dist/index.js.map +1 -1
- package/dist/modules/payments-v2/index.cjs +40 -6
- package/dist/modules/payments-v2/index.cjs.map +1 -1
- package/dist/modules/payments-v2/index.d.cts +22 -1
- package/dist/modules/payments-v2/index.d.ts +22 -1
- package/dist/modules/payments-v2/index.js +37 -6
- package/dist/modules/payments-v2/index.js.map +1 -1
- package/dist/token-engine/index.cjs +67 -21
- package/dist/token-engine/index.cjs.map +1 -1
- package/dist/token-engine/index.d.cts +28 -4
- package/dist/token-engine/index.d.ts +28 -4
- package/dist/token-engine/index.js +64 -21
- package/dist/token-engine/index.js.map +1 -1
- package/package.json +1 -1
package/dist/connect/index.d.cts
CHANGED
|
@@ -755,6 +755,8 @@ interface NftMetadata {
|
|
|
755
755
|
readonly external_url: string | null;
|
|
756
756
|
readonly attributes: readonly NftAttribute[];
|
|
757
757
|
readonly collection: string | null;
|
|
758
|
+
/** The collection the item claims: 1–64 bytes as even-length hex (decoded lowercase). Never verified here. */
|
|
759
|
+
readonly collection_id: string | null;
|
|
758
760
|
}
|
|
759
761
|
type NftContent = NftMetadata | NftMedia | NftLink;
|
|
760
762
|
|
|
@@ -773,6 +775,8 @@ interface WireNftMetadata {
|
|
|
773
775
|
readonly external_url: string | null;
|
|
774
776
|
readonly attributes: readonly NftAttribute[];
|
|
775
777
|
readonly collection: string | null;
|
|
778
|
+
/** Hex, passed through unchanged; `encodeNftContent` judges its value. */
|
|
779
|
+
readonly collection_id: string | null;
|
|
776
780
|
}
|
|
777
781
|
type WireNftContent = WireNftMetadata | WireNftMedia | NftLink;
|
|
778
782
|
/** A type alias, not an interface, so a typed value passes as `ConnectClient.intent` params. */
|
package/dist/connect/index.d.ts
CHANGED
|
@@ -755,6 +755,8 @@ interface NftMetadata {
|
|
|
755
755
|
readonly external_url: string | null;
|
|
756
756
|
readonly attributes: readonly NftAttribute[];
|
|
757
757
|
readonly collection: string | null;
|
|
758
|
+
/** The collection the item claims: 1–64 bytes as even-length hex (decoded lowercase). Never verified here. */
|
|
759
|
+
readonly collection_id: string | null;
|
|
758
760
|
}
|
|
759
761
|
type NftContent = NftMetadata | NftMedia | NftLink;
|
|
760
762
|
|
|
@@ -773,6 +775,8 @@ interface WireNftMetadata {
|
|
|
773
775
|
readonly external_url: string | null;
|
|
774
776
|
readonly attributes: readonly NftAttribute[];
|
|
775
777
|
readonly collection: string | null;
|
|
778
|
+
/** Hex, passed through unchanged; `encodeNftContent` judges its value. */
|
|
779
|
+
readonly collection_id: string | null;
|
|
776
780
|
}
|
|
777
781
|
type WireNftContent = WireNftMetadata | WireNftMedia | NftLink;
|
|
778
782
|
/** A type alias, not an interface, so a typed value passes as `ConnectClient.intent` params. */
|
package/dist/connect/index.js
CHANGED
|
@@ -405,7 +405,7 @@ function checkCompatibility(input) {
|
|
|
405
405
|
}
|
|
406
406
|
|
|
407
407
|
// connect/version.ts
|
|
408
|
-
var SDK_VERSION = "0.17.2
|
|
408
|
+
var SDK_VERSION = "0.17.2";
|
|
409
409
|
|
|
410
410
|
// connect/permissions.ts
|
|
411
411
|
var PERMISSION_SCOPES = {
|
|
@@ -2059,7 +2059,8 @@ var METADATA_FIELDS = [
|
|
|
2059
2059
|
"animation_url",
|
|
2060
2060
|
"external_url",
|
|
2061
2061
|
"attributes",
|
|
2062
|
-
"collection"
|
|
2062
|
+
"collection",
|
|
2063
|
+
"collection_id"
|
|
2063
2064
|
];
|
|
2064
2065
|
var MEDIA_FIELDS = ["kind", "media_type", "bytes"];
|
|
2065
2066
|
var LINK_FIELDS = ["kind", "media_type", "uri", "sha256"];
|
|
@@ -2091,7 +2092,8 @@ function metadataToWire(metadata) {
|
|
|
2091
2092
|
animation_url: mediaRefToWire(metadata.animation_url, "content.animation_url"),
|
|
2092
2093
|
external_url: metadata.external_url,
|
|
2093
2094
|
attributes: metadata.attributes.map(({ trait_type, value }) => ({ trait_type, value })),
|
|
2094
|
-
collection: metadata.collection
|
|
2095
|
+
collection: metadata.collection,
|
|
2096
|
+
collection_id: metadata.collection_id
|
|
2095
2097
|
};
|
|
2096
2098
|
}
|
|
2097
2099
|
function nftContentToWire(content) {
|
|
@@ -2174,7 +2176,8 @@ function metadataFromWire(record) {
|
|
|
2174
2176
|
animation_url: mediaRefFromWire(record.animation_url, "content.animation_url"),
|
|
2175
2177
|
external_url: optionalStringAt(record, "content", "external_url"),
|
|
2176
2178
|
attributes: attributesFromWire(record.attributes, "content.attributes"),
|
|
2177
|
-
collection: optionalStringAt(record, "content", "collection")
|
|
2179
|
+
collection: optionalStringAt(record, "content", "collection"),
|
|
2180
|
+
collection_id: optionalStringAt(record, "content", "collection_id")
|
|
2178
2181
|
};
|
|
2179
2182
|
}
|
|
2180
2183
|
function nftContentFromWire(wire) {
|