@sentio/sdk 2.15.6 → 2.15.7-rc.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/lib/move/abstract-move-coder.js +2 -2
- package/lib/move/abstract-move-coder.js.map +1 -1
- package/lib/move/ts-type.test.js.map +1 -1
- package/lib/move/types.js +4 -6
- package/lib/move/types.js.map +1 -1
- package/lib/sui/builtin/0x2.d.ts +35 -0
- package/lib/sui/builtin/0x2.js +40 -1
- package/lib/sui/builtin/0x2.js.map +1 -1
- package/lib/sui/builtin/0x3.d.ts +68 -0
- package/lib/sui/builtin/0x3.js +43 -1
- package/lib/sui/builtin/0x3.js.map +1 -1
- package/lib/sui/move-types.js +1 -1
- package/lib/sui/move-types.js.map +1 -1
- package/package.json +3 -3
- package/src/move/abstract-move-coder.ts +2 -2
- package/src/move/types.ts +6 -6
- package/src/sui/abis/0x2.json +500 -0
- package/src/sui/abis/0x3.json +357 -111
- package/src/sui/builtin/0x2.ts +93 -1
- package/src/sui/builtin/0x3.ts +127 -1
- package/src/sui/move-types.ts +1 -1
package/lib/sui/move-types.js
CHANGED
@@ -61,7 +61,7 @@ export function toTypeDescriptor(normalizedType) {
|
|
61
61
|
return new TypeDescriptor(qname, args);
|
62
62
|
}
|
63
63
|
if ('Vector' in normalizedType) {
|
64
|
-
return new TypeDescriptor('
|
64
|
+
return new TypeDescriptor('Vector', [toTypeDescriptor(normalizedType.Vector)]);
|
65
65
|
}
|
66
66
|
if ('TypeParameter' in normalizedType) {
|
67
67
|
return new TypeDescriptor('T' + normalizedType.TypeParameter);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"move-types.js","sourceRoot":"","sources":["../../src/sui/move-types.ts"],"names":[],"mappings":"AAOA,OAAO,EAEL,8BAA8B,GAI/B,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAI3D,MAAM,UAAU,gBAAgB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,EAAE,CAAC,gBAAgB,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;KAC/E;IACD,IAAI,eAAe,IAAI,cAAc,EAAE;QACrC,OAAO,IAAI,cAAc,CAAC,GAAG,GAAG,cAAc,CAAC,aAAa,CAAC,CAAA;KAC9D;IAED,IAAI,WAAW,IAAI,cAAc,EAAE;QACjC,MAAM,GAAG,GAAG,gBAAgB,CAAC,cAAc,CAAC,SAAS,CAAC,CAAA;QACtD,GAAG,CAAC,SAAS,GAAG,IAAI,CAAA;QACpB,OAAO,GAAG,CAAA;KACX;IAED,IAAI,kBAAkB,IAAI,cAAc,EAAE;QACxC,MAAM,GAAG,GAAG,gBAAgB,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAA;QAC7D,GAAG,CAAC,SAAS,GAAG,IAAI,CAAA;QACpB,GAAG,CAAC,OAAO,GAAG,IAAI,CAAA;QAClB,OAAO,GAAG,CAAA;KACX;IAED,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAA;AACxC,CAAC","sourcesContent":["import type {\n SuiMoveNormalizedField,\n SuiMoveNormalizedFunction,\n SuiMoveNormalizedModule,\n SuiMoveNormalizedStruct,\n SuiMoveNormalizedType,\n} from '@mysten/sui.js'\nimport {\n InternalMoveFunction,\n InternalMoveFunctionVisibility,\n InternalMoveModule,\n InternalMoveStruct,\n InternalMoveStructField,\n} from '../move/internal-models.js'\nimport { SPLITTER, TypeDescriptor } from '../move/index.js'\n\nexport type { SuiAddress } from '@mysten/sui.js'\n\nexport function toInternalModule(module: SuiMoveNormalizedModule): InternalMoveModule {\n return {\n address: module.address,\n exposedFunctions: Object.entries(module.exposedFunctions).map(([n, f]) => toInternalFunction(n, f)),\n name: module.name,\n structs: Object.entries(module.structs).map(([n, s]) => toInternalStruct(n, s)),\n }\n}\n\nexport function toInternalFunction(name: string, func: SuiMoveNormalizedFunction): InternalMoveFunction {\n let visibility\n switch (func.visibility) {\n case 'Private':\n visibility = InternalMoveFunctionVisibility.PRIVATE\n break\n case 'Public':\n visibility = InternalMoveFunctionVisibility.PUBLIC\n break\n case 'Friend':\n visibility = InternalMoveFunctionVisibility.FRIEND\n break\n default:\n throw Error('No visibility for function' + name)\n }\n return {\n typeParams: func.typeParameters.map((p: any) => {\n return { constraints: p.abilities }\n }),\n isEntry: func.isEntry,\n name: name,\n params: func.parameters.map(toTypeDescriptor),\n return: func.return.map(toTypeDescriptor),\n visibility: visibility,\n }\n}\n\nexport function toInternalStruct(name: string, struct: SuiMoveNormalizedStruct): InternalMoveStruct {\n return {\n abilities: struct.abilities.abilities,\n fields: struct.fields.map(toInternalField),\n typeParams: struct.typeParameters.map((p: any) => {\n return { constraints: p.constraints.abilities }\n }),\n isNative: false,\n name: name,\n }\n}\n\nexport function toInternalField(module: SuiMoveNormalizedField): InternalMoveStructField {\n return {\n name: module.name,\n type: toTypeDescriptor(module.type),\n }\n}\n\nexport function toTypeDescriptor(normalizedType: SuiMoveNormalizedType): TypeDescriptor {\n if (typeof normalizedType === 'string') {\n return new TypeDescriptor(normalizedType)\n }\n\n if ('Struct' in normalizedType) {\n const qname = [normalizedType.Struct.address, normalizedType.Struct.module, normalizedType.Struct.name].join(\n SPLITTER\n )\n\n const args = normalizedType.Struct.typeArguments.map(toTypeDescriptor)\n\n return new TypeDescriptor(qname, args)\n }\n\n if ('Vector' in normalizedType) {\n return new TypeDescriptor('
|
1
|
+
{"version":3,"file":"move-types.js","sourceRoot":"","sources":["../../src/sui/move-types.ts"],"names":[],"mappings":"AAOA,OAAO,EAEL,8BAA8B,GAI/B,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAI3D,MAAM,UAAU,gBAAgB,CAAC,MAA+B;IAC9D,OAAO;QACL,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,gBAAgB,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,GAAG,CAA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AAG,cAAc,CAAC,aAAa,CAAC,CAAA;KAC9D;IAED,IAAI,WAAW,IAAI,cAAc,EAAE;QACjC,MAAM,GAAG,GAAG,gBAAgB,CAAC,cAAc,CAAC,SAAS,CAAC,CAAA;QACtD,GAAG,CAAC,SAAS,GAAG,IAAI,CAAA;QACpB,OAAO,GAAG,CAAA;KACX;IAED,IAAI,kBAAkB,IAAI,cAAc,EAAE;QACxC,MAAM,GAAG,GAAG,gBAAgB,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAA;QAC7D,GAAG,CAAC,SAAS,GAAG,IAAI,CAAA;QACpB,GAAG,CAAC,OAAO,GAAG,IAAI,CAAA;QAClB,OAAO,GAAG,CAAA;KACX;IAED,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAA;AACxC,CAAC","sourcesContent":["import type {\n SuiMoveNormalizedField,\n SuiMoveNormalizedFunction,\n SuiMoveNormalizedModule,\n SuiMoveNormalizedStruct,\n SuiMoveNormalizedType,\n} from '@mysten/sui.js'\nimport {\n InternalMoveFunction,\n InternalMoveFunctionVisibility,\n InternalMoveModule,\n InternalMoveStruct,\n InternalMoveStructField,\n} from '../move/internal-models.js'\nimport { SPLITTER, TypeDescriptor } from '../move/index.js'\n\nexport type { SuiAddress } from '@mysten/sui.js'\n\nexport function toInternalModule(module: SuiMoveNormalizedModule): InternalMoveModule {\n return {\n address: module.address,\n exposedFunctions: Object.entries(module.exposedFunctions).map(([n, f]) => toInternalFunction(n, f)),\n name: module.name,\n structs: Object.entries(module.structs).map(([n, s]) => toInternalStruct(n, s)),\n }\n}\n\nexport function toInternalFunction(name: string, func: SuiMoveNormalizedFunction): InternalMoveFunction {\n let visibility\n switch (func.visibility) {\n case 'Private':\n visibility = InternalMoveFunctionVisibility.PRIVATE\n break\n case 'Public':\n visibility = InternalMoveFunctionVisibility.PUBLIC\n break\n case 'Friend':\n visibility = InternalMoveFunctionVisibility.FRIEND\n break\n default:\n throw Error('No visibility for function' + name)\n }\n return {\n typeParams: func.typeParameters.map((p: any) => {\n return { constraints: p.abilities }\n }),\n isEntry: func.isEntry,\n name: name,\n params: func.parameters.map(toTypeDescriptor),\n return: func.return.map(toTypeDescriptor),\n visibility: visibility,\n }\n}\n\nexport function toInternalStruct(name: string, struct: SuiMoveNormalizedStruct): InternalMoveStruct {\n return {\n abilities: struct.abilities.abilities,\n fields: struct.fields.map(toInternalField),\n typeParams: struct.typeParameters.map((p: any) => {\n return { constraints: p.constraints.abilities }\n }),\n isNative: false,\n name: name,\n }\n}\n\nexport function toInternalField(module: SuiMoveNormalizedField): InternalMoveStructField {\n return {\n name: module.name,\n type: toTypeDescriptor(module.type),\n }\n}\n\nexport function toTypeDescriptor(normalizedType: SuiMoveNormalizedType): TypeDescriptor {\n if (typeof normalizedType === 'string') {\n return new TypeDescriptor(normalizedType)\n }\n\n if ('Struct' in normalizedType) {\n const qname = [normalizedType.Struct.address, normalizedType.Struct.module, normalizedType.Struct.name].join(\n SPLITTER\n )\n\n const args = normalizedType.Struct.typeArguments.map(toTypeDescriptor)\n\n return new TypeDescriptor(qname, args)\n }\n\n if ('Vector' in normalizedType) {\n return new TypeDescriptor('Vector', [toTypeDescriptor(normalizedType.Vector)])\n }\n if ('TypeParameter' in normalizedType) {\n return new TypeDescriptor('T' + normalizedType.TypeParameter)\n }\n\n if ('Reference' in normalizedType) {\n const res = toTypeDescriptor(normalizedType.Reference)\n res.reference = true\n return res\n }\n\n if ('MutableReference' in normalizedType) {\n const res = toTypeDescriptor(normalizedType.MutableReference)\n res.reference = true\n res.mutable = true\n return res\n }\n\n throw new Error('Unexpected sui type')\n}\n"]}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sentio/sdk",
|
3
|
-
"version": "2.15.
|
3
|
+
"version": "2.15.7-rc.2",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"type": "module",
|
6
6
|
"exports": {
|
@@ -70,8 +70,8 @@
|
|
70
70
|
"typechain": "^8.0.0",
|
71
71
|
"typedoc": "^0.24.1",
|
72
72
|
"yaml": "^2.2.1",
|
73
|
-
"@sentio/protos": "^2.15.
|
74
|
-
"@sentio/runtime": "^2.15.
|
73
|
+
"@sentio/protos": "^2.15.7-rc.2",
|
74
|
+
"@sentio/runtime": "^2.15.7-rc.2"
|
75
75
|
},
|
76
76
|
"peerDependencies": {
|
77
77
|
"tsup": "npm:@sentio/tsup@^6.7.0"
|
@@ -136,7 +136,7 @@ export abstract class AbstractMoveCoder<Network, ModuleType, StructType> {
|
|
136
136
|
}
|
137
137
|
|
138
138
|
// process vector
|
139
|
-
if (type.qname === VECTOR_STR) {
|
139
|
+
if (type.qname.toLowerCase() === VECTOR_STR) {
|
140
140
|
// vector<u8> as hex string
|
141
141
|
if (type.typeArgs[0].qname === 'u8' || type.typeArgs[0].qname === 'U8') {
|
142
142
|
return data
|
@@ -200,7 +200,7 @@ export abstract class AbstractMoveCoder<Network, ModuleType, StructType> {
|
|
200
200
|
}
|
201
201
|
|
202
202
|
// process vector
|
203
|
-
if (type.qname === VECTOR_STR) {
|
203
|
+
if (type.qname.toLowerCase() === VECTOR_STR) {
|
204
204
|
// vector<u8> as hex string
|
205
205
|
if (type.typeArgs[0].qname === 'u8' || type.typeArgs[0].qname === 'U8') {
|
206
206
|
return data
|
package/src/move/types.ts
CHANGED
@@ -82,9 +82,11 @@ export class TypeDescriptor<T = any> {
|
|
82
82
|
console.error('Not expected &')
|
83
83
|
return []
|
84
84
|
}
|
85
|
-
|
86
|
-
|
87
|
-
|
85
|
+
|
86
|
+
if (this.qname.toLowerCase() === VECTOR_STR) {
|
87
|
+
return this.typeArgs[0].dependedTypes()
|
88
|
+
}
|
89
|
+
|
88
90
|
if (BUILTIN_TYPES_SET.has(this.qname.toLowerCase())) {
|
89
91
|
return []
|
90
92
|
}
|
@@ -106,9 +108,7 @@ export class TypeDescriptor<T = any> {
|
|
106
108
|
param.dependedTypes().forEach((t) => types.add(t))
|
107
109
|
}
|
108
110
|
|
109
|
-
|
110
|
-
types.add(this.qname)
|
111
|
-
}
|
111
|
+
types.add(this.qname)
|
112
112
|
|
113
113
|
return Array.from(types)
|
114
114
|
}
|
package/src/sui/abis/0x2.json
CHANGED
@@ -2581,6 +2581,47 @@
|
|
2581
2581
|
}
|
2582
2582
|
]
|
2583
2583
|
},
|
2584
|
+
"supply_immut": {
|
2585
|
+
"visibility": "Public",
|
2586
|
+
"isEntry": false,
|
2587
|
+
"typeParameters": [
|
2588
|
+
{
|
2589
|
+
"abilities": []
|
2590
|
+
}
|
2591
|
+
],
|
2592
|
+
"parameters": [
|
2593
|
+
{
|
2594
|
+
"Reference": {
|
2595
|
+
"Struct": {
|
2596
|
+
"address": "0x2",
|
2597
|
+
"module": "coin",
|
2598
|
+
"name": "TreasuryCap",
|
2599
|
+
"typeArguments": [
|
2600
|
+
{
|
2601
|
+
"TypeParameter": 0
|
2602
|
+
}
|
2603
|
+
]
|
2604
|
+
}
|
2605
|
+
}
|
2606
|
+
}
|
2607
|
+
],
|
2608
|
+
"return": [
|
2609
|
+
{
|
2610
|
+
"Reference": {
|
2611
|
+
"Struct": {
|
2612
|
+
"address": "0x2",
|
2613
|
+
"module": "balance",
|
2614
|
+
"name": "Supply",
|
2615
|
+
"typeArguments": [
|
2616
|
+
{
|
2617
|
+
"TypeParameter": 0
|
2618
|
+
}
|
2619
|
+
]
|
2620
|
+
}
|
2621
|
+
}
|
2622
|
+
}
|
2623
|
+
]
|
2624
|
+
},
|
2584
2625
|
"supply_mut": {
|
2585
2626
|
"visibility": "Public",
|
2586
2627
|
"isEntry": false,
|
@@ -4941,6 +4982,36 @@
|
|
4941
4982
|
"name": "kiosk",
|
4942
4983
|
"friends": [],
|
4943
4984
|
"structs": {
|
4985
|
+
"Borrow": {
|
4986
|
+
"abilities": {
|
4987
|
+
"abilities": []
|
4988
|
+
},
|
4989
|
+
"typeParameters": [],
|
4990
|
+
"fields": [
|
4991
|
+
{
|
4992
|
+
"name": "kiosk_id",
|
4993
|
+
"type": {
|
4994
|
+
"Struct": {
|
4995
|
+
"address": "0x2",
|
4996
|
+
"module": "object",
|
4997
|
+
"name": "ID",
|
4998
|
+
"typeArguments": []
|
4999
|
+
}
|
5000
|
+
}
|
5001
|
+
},
|
5002
|
+
{
|
5003
|
+
"name": "item_id",
|
5004
|
+
"type": {
|
5005
|
+
"Struct": {
|
5006
|
+
"address": "0x2",
|
5007
|
+
"module": "object",
|
5008
|
+
"name": "ID",
|
5009
|
+
"typeArguments": []
|
5010
|
+
}
|
5011
|
+
}
|
5012
|
+
}
|
5013
|
+
]
|
5014
|
+
},
|
4944
5015
|
"Item": {
|
4945
5016
|
"abilities": {
|
4946
5017
|
"abilities": ["Copy", "Drop", "Store"]
|
@@ -4960,6 +5031,43 @@
|
|
4960
5031
|
}
|
4961
5032
|
]
|
4962
5033
|
},
|
5034
|
+
"ItemDelisted": {
|
5035
|
+
"abilities": {
|
5036
|
+
"abilities": ["Copy", "Drop"]
|
5037
|
+
},
|
5038
|
+
"typeParameters": [
|
5039
|
+
{
|
5040
|
+
"constraints": {
|
5041
|
+
"abilities": ["Store", "Key"]
|
5042
|
+
},
|
5043
|
+
"isPhantom": true
|
5044
|
+
}
|
5045
|
+
],
|
5046
|
+
"fields": [
|
5047
|
+
{
|
5048
|
+
"name": "kiosk",
|
5049
|
+
"type": {
|
5050
|
+
"Struct": {
|
5051
|
+
"address": "0x2",
|
5052
|
+
"module": "object",
|
5053
|
+
"name": "ID",
|
5054
|
+
"typeArguments": []
|
5055
|
+
}
|
5056
|
+
}
|
5057
|
+
},
|
5058
|
+
{
|
5059
|
+
"name": "id",
|
5060
|
+
"type": {
|
5061
|
+
"Struct": {
|
5062
|
+
"address": "0x2",
|
5063
|
+
"module": "object",
|
5064
|
+
"name": "ID",
|
5065
|
+
"typeArguments": []
|
5066
|
+
}
|
5067
|
+
}
|
5068
|
+
}
|
5069
|
+
]
|
5070
|
+
},
|
4963
5071
|
"ItemListed": {
|
4964
5072
|
"abilities": {
|
4965
5073
|
"abilities": ["Copy", "Drop"]
|
@@ -5001,6 +5109,47 @@
|
|
5001
5109
|
}
|
5002
5110
|
]
|
5003
5111
|
},
|
5112
|
+
"ItemPurchased": {
|
5113
|
+
"abilities": {
|
5114
|
+
"abilities": ["Copy", "Drop"]
|
5115
|
+
},
|
5116
|
+
"typeParameters": [
|
5117
|
+
{
|
5118
|
+
"constraints": {
|
5119
|
+
"abilities": ["Store", "Key"]
|
5120
|
+
},
|
5121
|
+
"isPhantom": true
|
5122
|
+
}
|
5123
|
+
],
|
5124
|
+
"fields": [
|
5125
|
+
{
|
5126
|
+
"name": "kiosk",
|
5127
|
+
"type": {
|
5128
|
+
"Struct": {
|
5129
|
+
"address": "0x2",
|
5130
|
+
"module": "object",
|
5131
|
+
"name": "ID",
|
5132
|
+
"typeArguments": []
|
5133
|
+
}
|
5134
|
+
}
|
5135
|
+
},
|
5136
|
+
{
|
5137
|
+
"name": "id",
|
5138
|
+
"type": {
|
5139
|
+
"Struct": {
|
5140
|
+
"address": "0x2",
|
5141
|
+
"module": "object",
|
5142
|
+
"name": "ID",
|
5143
|
+
"typeArguments": []
|
5144
|
+
}
|
5145
|
+
}
|
5146
|
+
},
|
5147
|
+
{
|
5148
|
+
"name": "price",
|
5149
|
+
"type": "U64"
|
5150
|
+
}
|
5151
|
+
]
|
5152
|
+
},
|
5004
5153
|
"Kiosk": {
|
5005
5154
|
"abilities": {
|
5006
5155
|
"abilities": ["Store", "Key"]
|
@@ -5178,6 +5327,150 @@
|
|
5178
5327
|
}
|
5179
5328
|
},
|
5180
5329
|
"exposedFunctions": {
|
5330
|
+
"borrow": {
|
5331
|
+
"visibility": "Public",
|
5332
|
+
"isEntry": false,
|
5333
|
+
"typeParameters": [
|
5334
|
+
{
|
5335
|
+
"abilities": ["Store", "Key"]
|
5336
|
+
}
|
5337
|
+
],
|
5338
|
+
"parameters": [
|
5339
|
+
{
|
5340
|
+
"Reference": {
|
5341
|
+
"Struct": {
|
5342
|
+
"address": "0x2",
|
5343
|
+
"module": "kiosk",
|
5344
|
+
"name": "Kiosk",
|
5345
|
+
"typeArguments": []
|
5346
|
+
}
|
5347
|
+
}
|
5348
|
+
},
|
5349
|
+
{
|
5350
|
+
"Reference": {
|
5351
|
+
"Struct": {
|
5352
|
+
"address": "0x2",
|
5353
|
+
"module": "kiosk",
|
5354
|
+
"name": "KioskOwnerCap",
|
5355
|
+
"typeArguments": []
|
5356
|
+
}
|
5357
|
+
}
|
5358
|
+
},
|
5359
|
+
{
|
5360
|
+
"Struct": {
|
5361
|
+
"address": "0x2",
|
5362
|
+
"module": "object",
|
5363
|
+
"name": "ID",
|
5364
|
+
"typeArguments": []
|
5365
|
+
}
|
5366
|
+
}
|
5367
|
+
],
|
5368
|
+
"return": [
|
5369
|
+
{
|
5370
|
+
"Reference": {
|
5371
|
+
"TypeParameter": 0
|
5372
|
+
}
|
5373
|
+
}
|
5374
|
+
]
|
5375
|
+
},
|
5376
|
+
"borrow_mut": {
|
5377
|
+
"visibility": "Public",
|
5378
|
+
"isEntry": false,
|
5379
|
+
"typeParameters": [
|
5380
|
+
{
|
5381
|
+
"abilities": ["Store", "Key"]
|
5382
|
+
}
|
5383
|
+
],
|
5384
|
+
"parameters": [
|
5385
|
+
{
|
5386
|
+
"MutableReference": {
|
5387
|
+
"Struct": {
|
5388
|
+
"address": "0x2",
|
5389
|
+
"module": "kiosk",
|
5390
|
+
"name": "Kiosk",
|
5391
|
+
"typeArguments": []
|
5392
|
+
}
|
5393
|
+
}
|
5394
|
+
},
|
5395
|
+
{
|
5396
|
+
"Reference": {
|
5397
|
+
"Struct": {
|
5398
|
+
"address": "0x2",
|
5399
|
+
"module": "kiosk",
|
5400
|
+
"name": "KioskOwnerCap",
|
5401
|
+
"typeArguments": []
|
5402
|
+
}
|
5403
|
+
}
|
5404
|
+
},
|
5405
|
+
{
|
5406
|
+
"Struct": {
|
5407
|
+
"address": "0x2",
|
5408
|
+
"module": "object",
|
5409
|
+
"name": "ID",
|
5410
|
+
"typeArguments": []
|
5411
|
+
}
|
5412
|
+
}
|
5413
|
+
],
|
5414
|
+
"return": [
|
5415
|
+
{
|
5416
|
+
"MutableReference": {
|
5417
|
+
"TypeParameter": 0
|
5418
|
+
}
|
5419
|
+
}
|
5420
|
+
]
|
5421
|
+
},
|
5422
|
+
"borrow_val": {
|
5423
|
+
"visibility": "Public",
|
5424
|
+
"isEntry": false,
|
5425
|
+
"typeParameters": [
|
5426
|
+
{
|
5427
|
+
"abilities": ["Store", "Key"]
|
5428
|
+
}
|
5429
|
+
],
|
5430
|
+
"parameters": [
|
5431
|
+
{
|
5432
|
+
"MutableReference": {
|
5433
|
+
"Struct": {
|
5434
|
+
"address": "0x2",
|
5435
|
+
"module": "kiosk",
|
5436
|
+
"name": "Kiosk",
|
5437
|
+
"typeArguments": []
|
5438
|
+
}
|
5439
|
+
}
|
5440
|
+
},
|
5441
|
+
{
|
5442
|
+
"Reference": {
|
5443
|
+
"Struct": {
|
5444
|
+
"address": "0x2",
|
5445
|
+
"module": "kiosk",
|
5446
|
+
"name": "KioskOwnerCap",
|
5447
|
+
"typeArguments": []
|
5448
|
+
}
|
5449
|
+
}
|
5450
|
+
},
|
5451
|
+
{
|
5452
|
+
"Struct": {
|
5453
|
+
"address": "0x2",
|
5454
|
+
"module": "object",
|
5455
|
+
"name": "ID",
|
5456
|
+
"typeArguments": []
|
5457
|
+
}
|
5458
|
+
}
|
5459
|
+
],
|
5460
|
+
"return": [
|
5461
|
+
{
|
5462
|
+
"TypeParameter": 0
|
5463
|
+
},
|
5464
|
+
{
|
5465
|
+
"Struct": {
|
5466
|
+
"address": "0x2",
|
5467
|
+
"module": "kiosk",
|
5468
|
+
"name": "Borrow",
|
5469
|
+
"typeArguments": []
|
5470
|
+
}
|
5471
|
+
}
|
5472
|
+
]
|
5473
|
+
},
|
5181
5474
|
"close_and_withdraw": {
|
5182
5475
|
"visibility": "Public",
|
5183
5476
|
"isEntry": false,
|
@@ -5230,6 +5523,46 @@
|
|
5230
5523
|
}
|
5231
5524
|
]
|
5232
5525
|
},
|
5526
|
+
"delist": {
|
5527
|
+
"visibility": "Public",
|
5528
|
+
"isEntry": false,
|
5529
|
+
"typeParameters": [
|
5530
|
+
{
|
5531
|
+
"abilities": ["Store", "Key"]
|
5532
|
+
}
|
5533
|
+
],
|
5534
|
+
"parameters": [
|
5535
|
+
{
|
5536
|
+
"MutableReference": {
|
5537
|
+
"Struct": {
|
5538
|
+
"address": "0x2",
|
5539
|
+
"module": "kiosk",
|
5540
|
+
"name": "Kiosk",
|
5541
|
+
"typeArguments": []
|
5542
|
+
}
|
5543
|
+
}
|
5544
|
+
},
|
5545
|
+
{
|
5546
|
+
"Reference": {
|
5547
|
+
"Struct": {
|
5548
|
+
"address": "0x2",
|
5549
|
+
"module": "kiosk",
|
5550
|
+
"name": "KioskOwnerCap",
|
5551
|
+
"typeArguments": []
|
5552
|
+
}
|
5553
|
+
}
|
5554
|
+
},
|
5555
|
+
{
|
5556
|
+
"Struct": {
|
5557
|
+
"address": "0x2",
|
5558
|
+
"module": "object",
|
5559
|
+
"name": "ID",
|
5560
|
+
"typeArguments": []
|
5561
|
+
}
|
5562
|
+
}
|
5563
|
+
],
|
5564
|
+
"return": []
|
5565
|
+
},
|
5233
5566
|
"has_access": {
|
5234
5567
|
"visibility": "Public",
|
5235
5568
|
"isEntry": false,
|
@@ -5284,6 +5617,36 @@
|
|
5284
5617
|
],
|
5285
5618
|
"return": ["Bool"]
|
5286
5619
|
},
|
5620
|
+
"has_item_with_type": {
|
5621
|
+
"visibility": "Public",
|
5622
|
+
"isEntry": false,
|
5623
|
+
"typeParameters": [
|
5624
|
+
{
|
5625
|
+
"abilities": ["Store", "Key"]
|
5626
|
+
}
|
5627
|
+
],
|
5628
|
+
"parameters": [
|
5629
|
+
{
|
5630
|
+
"Reference": {
|
5631
|
+
"Struct": {
|
5632
|
+
"address": "0x2",
|
5633
|
+
"module": "kiosk",
|
5634
|
+
"name": "Kiosk",
|
5635
|
+
"typeArguments": []
|
5636
|
+
}
|
5637
|
+
}
|
5638
|
+
},
|
5639
|
+
{
|
5640
|
+
"Struct": {
|
5641
|
+
"address": "0x2",
|
5642
|
+
"module": "object",
|
5643
|
+
"name": "ID",
|
5644
|
+
"typeArguments": []
|
5645
|
+
}
|
5646
|
+
}
|
5647
|
+
],
|
5648
|
+
"return": ["Bool"]
|
5649
|
+
},
|
5287
5650
|
"is_listed": {
|
5288
5651
|
"visibility": "Public",
|
5289
5652
|
"isEntry": false,
|
@@ -5984,6 +6347,39 @@
|
|
5984
6347
|
],
|
5985
6348
|
"return": []
|
5986
6349
|
},
|
6350
|
+
"return_val": {
|
6351
|
+
"visibility": "Public",
|
6352
|
+
"isEntry": false,
|
6353
|
+
"typeParameters": [
|
6354
|
+
{
|
6355
|
+
"abilities": ["Store", "Key"]
|
6356
|
+
}
|
6357
|
+
],
|
6358
|
+
"parameters": [
|
6359
|
+
{
|
6360
|
+
"MutableReference": {
|
6361
|
+
"Struct": {
|
6362
|
+
"address": "0x2",
|
6363
|
+
"module": "kiosk",
|
6364
|
+
"name": "Kiosk",
|
6365
|
+
"typeArguments": []
|
6366
|
+
}
|
6367
|
+
}
|
6368
|
+
},
|
6369
|
+
{
|
6370
|
+
"TypeParameter": 0
|
6371
|
+
},
|
6372
|
+
{
|
6373
|
+
"Struct": {
|
6374
|
+
"address": "0x2",
|
6375
|
+
"module": "kiosk",
|
6376
|
+
"name": "Borrow",
|
6377
|
+
"typeArguments": []
|
6378
|
+
}
|
6379
|
+
}
|
6380
|
+
],
|
6381
|
+
"return": []
|
6382
|
+
},
|
5987
6383
|
"set_allow_extensions": {
|
5988
6384
|
"visibility": "Public",
|
5989
6385
|
"isEntry": false,
|
@@ -6051,6 +6447,35 @@
|
|
6051
6447
|
],
|
6052
6448
|
"return": []
|
6053
6449
|
},
|
6450
|
+
"set_owner_custom": {
|
6451
|
+
"visibility": "Public",
|
6452
|
+
"isEntry": false,
|
6453
|
+
"typeParameters": [],
|
6454
|
+
"parameters": [
|
6455
|
+
{
|
6456
|
+
"MutableReference": {
|
6457
|
+
"Struct": {
|
6458
|
+
"address": "0x2",
|
6459
|
+
"module": "kiosk",
|
6460
|
+
"name": "Kiosk",
|
6461
|
+
"typeArguments": []
|
6462
|
+
}
|
6463
|
+
}
|
6464
|
+
},
|
6465
|
+
{
|
6466
|
+
"Reference": {
|
6467
|
+
"Struct": {
|
6468
|
+
"address": "0x2",
|
6469
|
+
"module": "kiosk",
|
6470
|
+
"name": "KioskOwnerCap",
|
6471
|
+
"typeArguments": []
|
6472
|
+
}
|
6473
|
+
}
|
6474
|
+
},
|
6475
|
+
"Address"
|
6476
|
+
],
|
6477
|
+
"return": []
|
6478
|
+
},
|
6054
6479
|
"take": {
|
6055
6480
|
"visibility": "Public",
|
6056
6481
|
"isEntry": false,
|
@@ -6095,6 +6520,35 @@
|
|
6095
6520
|
}
|
6096
6521
|
]
|
6097
6522
|
},
|
6523
|
+
"uid": {
|
6524
|
+
"visibility": "Public",
|
6525
|
+
"isEntry": false,
|
6526
|
+
"typeParameters": [],
|
6527
|
+
"parameters": [
|
6528
|
+
{
|
6529
|
+
"Reference": {
|
6530
|
+
"Struct": {
|
6531
|
+
"address": "0x2",
|
6532
|
+
"module": "kiosk",
|
6533
|
+
"name": "Kiosk",
|
6534
|
+
"typeArguments": []
|
6535
|
+
}
|
6536
|
+
}
|
6537
|
+
}
|
6538
|
+
],
|
6539
|
+
"return": [
|
6540
|
+
{
|
6541
|
+
"Reference": {
|
6542
|
+
"Struct": {
|
6543
|
+
"address": "0x2",
|
6544
|
+
"module": "object",
|
6545
|
+
"name": "UID",
|
6546
|
+
"typeArguments": []
|
6547
|
+
}
|
6548
|
+
}
|
6549
|
+
}
|
6550
|
+
]
|
6551
|
+
},
|
6098
6552
|
"uid_mut": {
|
6099
6553
|
"visibility": "Public",
|
6100
6554
|
"isEntry": false,
|
@@ -11169,6 +11623,52 @@
|
|
11169
11623
|
],
|
11170
11624
|
"return": []
|
11171
11625
|
},
|
11626
|
+
"rules": {
|
11627
|
+
"visibility": "Public",
|
11628
|
+
"isEntry": false,
|
11629
|
+
"typeParameters": [
|
11630
|
+
{
|
11631
|
+
"abilities": []
|
11632
|
+
}
|
11633
|
+
],
|
11634
|
+
"parameters": [
|
11635
|
+
{
|
11636
|
+
"Reference": {
|
11637
|
+
"Struct": {
|
11638
|
+
"address": "0x2",
|
11639
|
+
"module": "transfer_policy",
|
11640
|
+
"name": "TransferPolicy",
|
11641
|
+
"typeArguments": [
|
11642
|
+
{
|
11643
|
+
"TypeParameter": 0
|
11644
|
+
}
|
11645
|
+
]
|
11646
|
+
}
|
11647
|
+
}
|
11648
|
+
}
|
11649
|
+
],
|
11650
|
+
"return": [
|
11651
|
+
{
|
11652
|
+
"Reference": {
|
11653
|
+
"Struct": {
|
11654
|
+
"address": "0x2",
|
11655
|
+
"module": "vec_set",
|
11656
|
+
"name": "VecSet",
|
11657
|
+
"typeArguments": [
|
11658
|
+
{
|
11659
|
+
"Struct": {
|
11660
|
+
"address": "0x1",
|
11661
|
+
"module": "type_name",
|
11662
|
+
"name": "TypeName",
|
11663
|
+
"typeArguments": []
|
11664
|
+
}
|
11665
|
+
}
|
11666
|
+
]
|
11667
|
+
}
|
11668
|
+
}
|
11669
|
+
}
|
11670
|
+
]
|
11671
|
+
},
|
11172
11672
|
"uid": {
|
11173
11673
|
"visibility": "Public",
|
11174
11674
|
"isEntry": false,
|