project init
53
.gitignore
vendored
Executable file
@ -0,0 +1,53 @@
|
||||
#/////////////////////////////////////////////////////////////////////////////
|
||||
# Fireball Projects
|
||||
#/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/library/
|
||||
/temp/
|
||||
/local/
|
||||
/build/
|
||||
|
||||
#/////////////////////////////////////////////////////////////////////////////
|
||||
# npm files
|
||||
#/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
npm-debug.log
|
||||
node_modules/
|
||||
|
||||
#/////////////////////////////////////////////////////////////////////////////
|
||||
# Logs and databases
|
||||
#/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
*.log
|
||||
*.sql
|
||||
*.sqlite
|
||||
|
||||
#/////////////////////////////////////////////////////////////////////////////
|
||||
# files for debugger
|
||||
#/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
*.sln
|
||||
*.csproj
|
||||
*.pidb
|
||||
*.unityproj
|
||||
*.suo
|
||||
|
||||
#/////////////////////////////////////////////////////////////////////////////
|
||||
# OS generated files
|
||||
#/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
.DS_Store
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
|
||||
#/////////////////////////////////////////////////////////////////////////////
|
||||
# WebStorm files
|
||||
#/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
.idea/
|
||||
|
||||
#//////////////////////////
|
||||
# VS Code files
|
||||
#//////////////////////////
|
||||
|
||||
.vscode/
|
7
assets/comp.meta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "f144cceb-96ca-47ad-9724-42266194ead7",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
||||
}
|
7
assets/comp/wallet.meta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "9f73afae-ff07-4550-9234-e9d4ae69a5b5",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
||||
}
|
7
assets/comp/wallet/prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "ef1863ae-389d-49b6-ac4b-ca1fc3c50bca",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
||||
}
|
419
assets/comp/wallet/prefab/OneToken.prefab
Normal file
@ -0,0 +1,419 @@
|
||||
[
|
||||
{
|
||||
"__type__": "cc.Prefab",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"data": {
|
||||
"__id__": 1
|
||||
},
|
||||
"optimizationPolicy": 0,
|
||||
"asyncLoadAssets": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "OneToken",
|
||||
"_objFlags": 0,
|
||||
"_parent": null,
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 2
|
||||
},
|
||||
{
|
||||
"__id__": 5
|
||||
},
|
||||
{
|
||||
"__id__": 8
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_level": 4,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 11
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 12
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 153,
|
||||
"g": 153,
|
||||
"b": 153,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 450,
|
||||
"height": 60
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_position": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": -30,
|
||||
"z": 0
|
||||
},
|
||||
"_scale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_rotationX": 0,
|
||||
"_rotationY": 0,
|
||||
"_quat": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "icon",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_level": 5,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 3
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 4
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 40,
|
||||
"height": 40
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_position": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -190,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_scale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_rotationX": 0,
|
||||
"_rotationY": 0,
|
||||
"_quat": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "8cdb44ac-a3f6-449f-b354-7cd48cf84061"
|
||||
},
|
||||
"_type": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_state": 0,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "1a8x2zZmNOU6glyFKwUfHp",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "nameLabel",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_level": 5,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 6
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 7
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 75.04,
|
||||
"height": 40
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0.5
|
||||
},
|
||||
"_position": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -162,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_scale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_rotationX": 0,
|
||||
"_rotationY": 0,
|
||||
"_quat": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Label",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 5
|
||||
},
|
||||
"_enabled": true,
|
||||
"_useOriginalSize": false,
|
||||
"_string": "name",
|
||||
"_N$string": "name",
|
||||
"_fontSize": 30,
|
||||
"_lineHeight": 40,
|
||||
"_enableWrapText": true,
|
||||
"_N$file": null,
|
||||
"_isSystemFontUsed": true,
|
||||
"_spacingX": 0,
|
||||
"_batchAsBitmap": false,
|
||||
"_N$horizontalAlign": 0,
|
||||
"_N$verticalAlign": 1,
|
||||
"_N$fontFamily": "Arial",
|
||||
"_N$overflow": 0,
|
||||
"_N$cacheMode": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "7efChFqAdDMrznOWA5RJF0",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "countLabel",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_level": 5,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 9
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 108.44,
|
||||
"height": 40
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 1,
|
||||
"y": 0.5
|
||||
},
|
||||
"_position": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 203,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_scale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_rotationX": 0,
|
||||
"_rotationY": 0,
|
||||
"_quat": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Label",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 8
|
||||
},
|
||||
"_enabled": true,
|
||||
"_useOriginalSize": false,
|
||||
"_string": "1000.00",
|
||||
"_N$string": "1000.00",
|
||||
"_fontSize": 30,
|
||||
"_lineHeight": 40,
|
||||
"_enableWrapText": true,
|
||||
"_N$file": null,
|
||||
"_isSystemFontUsed": true,
|
||||
"_spacingX": 0,
|
||||
"_batchAsBitmap": false,
|
||||
"_N$horizontalAlign": 2,
|
||||
"_N$verticalAlign": 1,
|
||||
"_N$fontFamily": "Arial",
|
||||
"_N$overflow": 0,
|
||||
"_N$cacheMode": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "65w39W/ddIsLb50QRubYhg",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "13d3eb87-b218-4fb7-b7c2-31e8a58b67bc"
|
||||
},
|
||||
"_type": 1,
|
||||
"_sizeMode": 0,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_state": 0,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "adoQSiLjZG56t5GXVWQvlL",
|
||||
"sync": false
|
||||
}
|
||||
]
|
7
assets/comp/wallet/prefab/OneToken.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "e4b00542-5961-4a6a-8ae5-c19d30ac84a2",
|
||||
"optimizationPolicy": "AUTO",
|
||||
"asyncLoadAssets": false,
|
||||
"subMetas": {}
|
||||
}
|
7
assets/comp/wallet/res.meta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "2933f1f0-3de5-4375-99e3-750e7f2e8606",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
||||
}
|
7
assets/comp/wallet/res/icon.meta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "960f8817-cb80-4635-9dd4-8cc70307d954",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
||||
}
|
BIN
assets/comp/wallet/res/icon/add.png
Normal file
After Width: | Height: | Size: 951 B |
31
assets/comp/wallet/res/icon/add.png.meta
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
"ver": "2.2.0",
|
||||
"uuid": "5d7aa856-f6f4-4878-b307-986516648a6a",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"subMetas": {
|
||||
"add": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "126a1482-ff16-42b2-80c1-08139e0edf8d",
|
||||
"rawTextureUuid": "5d7aa856-f6f4-4878-b307-986516648a6a",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 24,
|
||||
"trimY": 24,
|
||||
"width": 80,
|
||||
"height": 80,
|
||||
"rawWidth": 128,
|
||||
"rawHeight": 128,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
BIN
assets/comp/wallet/res/icon/close.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
31
assets/comp/wallet/res/icon/close.png.meta
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
"ver": "2.2.0",
|
||||
"uuid": "ef9db67c-48b8-416b-866c-2a780bef80cf",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"subMetas": {
|
||||
"close": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "94a5022b-77d8-4fca-b843-c7b59add72aa",
|
||||
"rawTextureUuid": "ef9db67c-48b8-416b-866c-2a780bef80cf",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 16,
|
||||
"trimY": 16,
|
||||
"width": 96,
|
||||
"height": 96,
|
||||
"rawWidth": 128,
|
||||
"rawHeight": 128,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
BIN
assets/comp/wallet/res/icon/copy.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
31
assets/comp/wallet/res/icon/copy.png.meta
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
"ver": "2.2.0",
|
||||
"uuid": "c004a194-b7b4-4c5c-8b6b-855739da133f",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"subMetas": {
|
||||
"copy": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "869b55b4-83b1-4079-90af-065929a68091",
|
||||
"rawTextureUuid": "c004a194-b7b4-4c5c-8b6b-855739da133f",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 12,
|
||||
"trimY": 8,
|
||||
"width": 104,
|
||||
"height": 112,
|
||||
"rawWidth": 128,
|
||||
"rawHeight": 128,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
BIN
assets/comp/wallet/res/icon/double_up.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
31
assets/comp/wallet/res/icon/double_up.png.meta
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
"ver": "2.2.0",
|
||||
"uuid": "8a9603da-9b8e-41f9-848d-27ab30ec59ff",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"subMetas": {
|
||||
"double_up": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "e71bbd95-6094-4a78-a21f-8dd541e27b48",
|
||||
"rawTextureUuid": "8a9603da-9b8e-41f9-848d-27ab30ec59ff",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": -0.5,
|
||||
"trimX": 7,
|
||||
"trimY": 8,
|
||||
"width": 114,
|
||||
"height": 113,
|
||||
"rawWidth": 128,
|
||||
"rawHeight": 128,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
BIN
assets/comp/wallet/res/icon/line-box.png
Normal file
After Width: | Height: | Size: 110 B |
31
assets/comp/wallet/res/icon/line-box.png.meta
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
"ver": "2.2.0",
|
||||
"uuid": "fdbe13ad-5ddc-4d62-b96e-7df532ae6266",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"subMetas": {
|
||||
"line-box": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "13d3eb87-b218-4fb7-b7c2-31e8a58b67bc",
|
||||
"rawTextureUuid": "fdbe13ad-5ddc-4d62-b96e-7df532ae6266",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 8,
|
||||
"height": 8,
|
||||
"rawWidth": 8,
|
||||
"rawHeight": 8,
|
||||
"borderTop": 2,
|
||||
"borderBottom": 2,
|
||||
"borderLeft": 2,
|
||||
"borderRight": 2,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
BIN
assets/comp/wallet/res/icon/receive.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
31
assets/comp/wallet/res/icon/receive.png.meta
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
"ver": "2.2.0",
|
||||
"uuid": "949b4c91-671a-4ec6-b130-787de356daf1",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"subMetas": {
|
||||
"receive": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "9d45be9b-55e3-49dd-96a5-fb7ad4c79c78",
|
||||
"rawTextureUuid": "949b4c91-671a-4ec6-b130-787de356daf1",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": -4,
|
||||
"trimX": 14,
|
||||
"trimY": 14,
|
||||
"width": 100,
|
||||
"height": 108,
|
||||
"rawWidth": 128,
|
||||
"rawHeight": 128,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
BIN
assets/comp/wallet/res/icon/send.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
31
assets/comp/wallet/res/icon/send.png.meta
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
"ver": "2.2.0",
|
||||
"uuid": "73b175e1-8624-4d58-8804-5e979f0ba085",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"subMetas": {
|
||||
"send": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "56e425df-a75c-4ca1-8da0-7cdffff60677",
|
||||
"rawTextureUuid": "73b175e1-8624-4d58-8804-5e979f0ba085",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 20,
|
||||
"trimY": 20,
|
||||
"width": 88,
|
||||
"height": 88,
|
||||
"rawWidth": 128,
|
||||
"rawHeight": 128,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
7
assets/comp/wallet/scripts.meta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "e4b9b10a-9cf9-4d6f-b25f-8ab33e1f57f6",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
||||
}
|
82
assets/comp/wallet/scripts/JCWallet.ts
Normal file
@ -0,0 +1,82 @@
|
||||
import { singleton } from "./decorator/singleton.decorator";
|
||||
import Web3 = require('./lib/web3.min');
|
||||
import sth = require("./lib/ethSigUtil");
|
||||
import { ZError } from "./common/ZError";
|
||||
|
||||
@singleton
|
||||
export default class JCWallet {
|
||||
web3: Web3 = null
|
||||
wallet: any = null
|
||||
password: string = '111111'
|
||||
|
||||
constructor() {
|
||||
this.web3 = new Web3('https://rpc-testnet.kcc.network')
|
||||
this.wallet = this.web3.eth.accounts.wallet.load(this.password)
|
||||
if (!this.wallet) {
|
||||
this.wallet = this.web3.eth.accounts.wallet;
|
||||
let key = '0xa6c4354fb93a55fb67117969a12465209395ec31089fea9e6e061f873b87a473'
|
||||
this.wallet.add(key);
|
||||
this.web3.eth.accounts.wallet.save(this.password);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public saveLocal() {
|
||||
|
||||
}
|
||||
|
||||
public loadLocal() {
|
||||
|
||||
}
|
||||
|
||||
public saveRemove() {
|
||||
|
||||
}
|
||||
|
||||
public loadRemote() {
|
||||
|
||||
}
|
||||
|
||||
public currentAccount() {
|
||||
return this.wallet[0];
|
||||
}
|
||||
|
||||
public accounts() {
|
||||
|
||||
}
|
||||
|
||||
public importAccount(privateKey: string) {
|
||||
|
||||
}
|
||||
|
||||
public async getBalance(address?: string) {
|
||||
console.log('get balance: ', address);
|
||||
if (!address) {
|
||||
let accountData = this.wallet[0]
|
||||
if (!accountData) {
|
||||
throw new ZError(10, 'no account found')
|
||||
}
|
||||
address = accountData.address
|
||||
}
|
||||
|
||||
let balance = await this.web3.eth.getBalance(address);
|
||||
return balance
|
||||
}
|
||||
|
||||
public signTypedData(signObj: any) {
|
||||
const account = this.currentAccount()
|
||||
return ethSigUtil.signTypedData({
|
||||
data: signObj,
|
||||
privateKey: Buffer.from(account.privateKey.replace('0x', ''), 'hex'),
|
||||
version: 'V4'
|
||||
})
|
||||
}
|
||||
|
||||
public recoverTypedSignature(signObj: any, signature: string) {
|
||||
return ethSigUtil.recoverTypedSignature({
|
||||
data: signObj,
|
||||
signature,
|
||||
version: 'V4'
|
||||
})
|
||||
}
|
||||
}
|
9
assets/comp/wallet/scripts/JCWallet.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "ff10ee2a-0cf1-4774-9f12-8b0c5459da3a",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
7
assets/comp/wallet/scripts/common.meta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "d462a5b3-fca1-43c8-a89d-9ed539177939",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
||||
}
|
12
assets/comp/wallet/scripts/common/ZError.ts
Normal file
@ -0,0 +1,12 @@
|
||||
export class ZError implements Error {
|
||||
code: string;
|
||||
statusCode?: number;
|
||||
message: string;
|
||||
name: string;
|
||||
|
||||
|
||||
constructor(statusCode: number, message: string) {
|
||||
this.statusCode = statusCode;
|
||||
this.message = message;
|
||||
}
|
||||
}
|
9
assets/comp/wallet/scripts/common/ZError.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "c488b44b-1241-40e8-b77f-fedc4e92b36a",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
45
assets/comp/wallet/scripts/common/chain.util.ts
Normal file
@ -0,0 +1,45 @@
|
||||
|
||||
/**
|
||||
* change price with customer decimals to bigNum with 18 decimals
|
||||
* @param {number} price
|
||||
* @param {number} decimals
|
||||
* @return {string}
|
||||
*/
|
||||
export function parsePrice(price: number, decimals: number) {
|
||||
const n = 19 - decimals
|
||||
return price + new Array(n).join('0')
|
||||
}
|
||||
|
||||
/**
|
||||
* format price with customer decimals to string for display
|
||||
* @param {number | string} price
|
||||
* @param {number} decimals
|
||||
* @param {number} fixed
|
||||
* @return {number | string}
|
||||
*/
|
||||
export function formatPrice(price: number|string, decimals?: number, fixed = 2) {
|
||||
if (!decimals) {
|
||||
return price
|
||||
}
|
||||
let str = price + ''
|
||||
const length = str.length
|
||||
str = str.padStart(decimals, '0')
|
||||
if (decimals >= length) {
|
||||
str = '0.' + str
|
||||
} else {
|
||||
const pos = length - decimals
|
||||
str = str.slice(0, pos) + '.' + str.slice(pos)
|
||||
}
|
||||
str = str.slice(0, str.lastIndexOf('.') + fixed + 1)
|
||||
return str
|
||||
// return str.replace(/0+$/, '').replace(/\.+$/, '')
|
||||
}
|
||||
|
||||
/**
|
||||
* number to hex string
|
||||
* @param {number} chainId
|
||||
* @return {string}
|
||||
*/
|
||||
export function toHexChainId(chainId: number) {
|
||||
return '0x' + chainId.toString(16)
|
||||
}
|
9
assets/comp/wallet/scripts/common/chain.util.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "95ae72cd-ee43-460d-aa81-cf3d66af83bd",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
7
assets/comp/wallet/scripts/data.meta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "58954fc3-3931-42c1-93a2-67b48b5fab06",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
||||
}
|
278
assets/comp/wallet/scripts/data/allchain.ts
Normal file
@ -0,0 +1,278 @@
|
||||
export const AllChains = [
|
||||
{
|
||||
name: 'Ethereum Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://rpc.ankr.com/eth',
|
||||
id: 1,
|
||||
symbol: 'ETH',
|
||||
explorerurl: 'https://etherscan.io'
|
||||
},
|
||||
{
|
||||
name: 'Ethereum Ropsten Testnet RPC',
|
||||
type: 'Testnet',
|
||||
rpc: 'https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161',
|
||||
id: 3,
|
||||
symbol: 'ETH',
|
||||
explorerurl: 'https://ropsten.etherscan.io'
|
||||
},
|
||||
{
|
||||
name: 'Ethereum Rinkeby Testnet RPC',
|
||||
type: 'Testnet',
|
||||
rpc: 'https://rinkey.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161',
|
||||
id: 4,
|
||||
symbol: 'ETH',
|
||||
explorerurl: 'https://rinkey.etherscan.io'
|
||||
},
|
||||
{
|
||||
name: 'Ethereum Goerli Testnet RPC',
|
||||
type: 'Testnet',
|
||||
rpc: 'https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161',
|
||||
id: 5,
|
||||
symbol: 'ETH',
|
||||
explorerurl: 'https://goerli.etherscan.io'
|
||||
},
|
||||
{
|
||||
name: 'Ethereum Kovan Testnet RPC',
|
||||
type: 'Testnet',
|
||||
rpc: 'https://kovan.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161',
|
||||
id: 6,
|
||||
symbol: 'ETH',
|
||||
explorerurl: 'https://kovan.etherscan.io'
|
||||
},
|
||||
{
|
||||
name: 'Ubiq Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://rpc.octano.dev/',
|
||||
id: 8,
|
||||
symbol: 'UBQ',
|
||||
explorerurl: 'https://ubiqscan.io/'
|
||||
},
|
||||
{
|
||||
name: 'Elastos ETH Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://api.elastos.io/eth',
|
||||
id: 20,
|
||||
symbol: 'ELA',
|
||||
explorerurl: 'https://explorer.elaeth.io/'
|
||||
},
|
||||
{
|
||||
name: 'Cronos Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://evm-cronos.crypto.org',
|
||||
id: 25,
|
||||
symbol: 'CRO',
|
||||
explorerurl: 'https://cronos.crypto.org/explorer/'
|
||||
},
|
||||
{
|
||||
name: 'Telos EVM Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://mainnet.telos.net/evm',
|
||||
id: 40,
|
||||
symbol: 'TLOS',
|
||||
explorerurl: 'https://telos.net/'
|
||||
},
|
||||
{
|
||||
name: 'Binance Smart Chain',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://rpc.ankr.com/bsc',
|
||||
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAwIiBoZWlnaHQ9IjI1MDAiIHZpZXdCb3g9IjAgMCAyMDAwIDIwMDAiPjxnIGZpbGw9IiNmM2JhMmYiPjxwYXRoIGQ9Ik02MTEuNTkgODQwLjQybDM4OC40LTM4OC4zOSAzODguNiAzODguNTkgMjI2LTIyNkw5OTkuOTkgMCAzODUuNiA2MTQuNDJsMjI1Ljk5IDIyNk0uMDA2IDk5OS45NjlsMjI2LjAwNy0yMjYuMDA3IDIyNS45OTIgMjI1Ljk5M0wyMjYgMTIyNS45NnpNNjExLjU5IDExNTkuNThsMzg4LjQgMzg4LjM5IDM4OC41OS0zODguNTggMjI2LjEyIDIyNS44OC0uMTEuMTJMOTk5Ljk5IDIwMDBsLTYxNC40MS02MTQuNC0uMzItLjMyIDIyNi4zMy0yMjUuN00xNTQ4LjAxMyAxMDAwLjA5M2wyMjYuMDA3LTIyNi4wMDYgMjI1Ljk5MiAyMjUuOTkyLTIyNi4wMDYgMjI2LjAwN3oiLz48cGF0aCBkPSJNMTIyOS4yMiA5OTkuODhoLjFMOTk5Ljk5IDc3MC41NSA4MzAuNTEgOTQwLjAzaC0uMDFsLTE5LjQ3IDE5LjQ4LTQwLjE2IDQwLjE3LS4zMi4zMS4zMi4zMyAyMjkuMTIgMjI5LjEzIDIyOS4zMy0yMjkuMzMuMTEtLjEzLS4yMS0uMTEiLz48L2c+PC9zdmc+',
|
||||
id: 56,
|
||||
symbol: 'BNB',
|
||||
explorerurl: 'https://bscscan.com'
|
||||
},
|
||||
{
|
||||
name: 'OKExChain Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://exchainrpc.okex.org',
|
||||
id: 66,
|
||||
symbol: 'OKT',
|
||||
explorerurl: 'https://www.oklink.com/okexchain'
|
||||
},
|
||||
{
|
||||
name: 'Hoo Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://http-mainnet.hoosmartchain.com',
|
||||
id: 70,
|
||||
symbol: 'HOO',
|
||||
explorerurl: 'https://hooscan.com'
|
||||
},
|
||||
{
|
||||
name: 'Binance Smart Chain Testnet RPC',
|
||||
type: 'Testnet',
|
||||
rpc: 'https://data-seed-prebsc-1-s1.binance.org:8545/',
|
||||
id: 97,
|
||||
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAwIiBoZWlnaHQ9IjI1MDAiIHZpZXdCb3g9IjAgMCAyMDAwIDIwMDAiPjxnIGZpbGw9IiNmM2JhMmYiPjxwYXRoIGQ9Ik02MTEuNTkgODQwLjQybDM4OC40LTM4OC4zOSAzODguNiAzODguNTkgMjI2LTIyNkw5OTkuOTkgMCAzODUuNiA2MTQuNDJsMjI1Ljk5IDIyNk0uMDA2IDk5OS45NjlsMjI2LjAwNy0yMjYuMDA3IDIyNS45OTIgMjI1Ljk5M0wyMjYgMTIyNS45NnpNNjExLjU5IDExNTkuNThsMzg4LjQgMzg4LjM5IDM4OC41OS0zODguNTggMjI2LjEyIDIyNS44OC0uMTEuMTJMOTk5Ljk5IDIwMDBsLTYxNC40MS02MTQuNC0uMzItLjMyIDIyNi4zMy0yMjUuN00xNTQ4LjAxMyAxMDAwLjA5M2wyMjYuMDA3LTIyNi4wMDYgMjI1Ljk5MiAyMjUuOTkyLTIyNi4wMDYgMjI2LjAwN3oiLz48cGF0aCBkPSJNMTIyOS4yMiA5OTkuODhoLjFMOTk5Ljk5IDc3MC41NSA4MzAuNTEgOTQwLjAzaC0uMDFsLTE5LjQ3IDE5LjQ4LTQwLjE2IDQwLjE3LS4zMi4zMS4zMi4zMyAyMjkuMTIgMjI5LjEzIDIyOS4zMy0yMjkuMzMuMTEtLjEzLS4yMS0uMTEiLz48L2c+PC9zdmc+',
|
||||
symbol: 'BNB',
|
||||
explorerurl: 'https://testnet.bscscan.com'
|
||||
},
|
||||
{
|
||||
name: 'xDai Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://rpc.xdaichain.com/',
|
||||
id: 100,
|
||||
symbol: 'XDAI',
|
||||
explorerurl: 'https://blockscout.com/xdai/mainnet/'
|
||||
},
|
||||
{
|
||||
name: 'Fuse Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://rpc.fuse.io',
|
||||
id: 122,
|
||||
symbol: 'FUSE',
|
||||
explorerurl: 'https://explorer.fuse.io/'
|
||||
},
|
||||
{
|
||||
name: 'HECO Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://http-mainnet-node.huobichain.com/',
|
||||
id: 128,
|
||||
symbol: 'HT',
|
||||
explorerurl: 'https://hecoinfo.com/'
|
||||
},
|
||||
{
|
||||
name: 'Matic Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://polygon-rpc.com',
|
||||
id: 137,
|
||||
symbol: 'MATIC',
|
||||
explorerurl: 'https://explorer.matic.network/'
|
||||
},
|
||||
{
|
||||
name: 'Fantom Opera Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://rpc.ftm.tools/',
|
||||
id: 250,
|
||||
symbol: 'FTM',
|
||||
explorerurl: 'https://ftmscan.com'
|
||||
},
|
||||
{
|
||||
name: 'HECO Testnet RPC',
|
||||
type: 'Testnet',
|
||||
rpc: 'https://http-testnet.hecochain.com',
|
||||
id: 256,
|
||||
symbol: 'HT',
|
||||
explorerurl: 'https://testnet.hecoinfo.com/'
|
||||
},
|
||||
{
|
||||
name: 'KCC Mainnet',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://rpc-mainnet.kcc.network',
|
||||
id: 321,
|
||||
logo: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI0LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMiAzMiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzIgMzI7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbC1ydWxlOmV2ZW5vZGQ7Y2xpcC1ydWxlOmV2ZW5vZGQ7ZmlsbDojMDA5M0REO30KCS5zdDF7ZmlsbC1ydWxlOmV2ZW5vZGQ7Y2xpcC1ydWxlOmV2ZW5vZGQ7ZmlsbDojRkZGRkZGO30KPC9zdHlsZT4KPGc+Cgk8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxNiIgY3k9IjE2IiByPSIxNiIvPgoJPHBhdGggY2xhc3M9InN0MSIgZD0iTTEzLjUsMTZsNS4yLDUuM0wyMiwxOGMwLjYtMC42LDEuNS0wLjYsMiwwYzAsMCwwLDAsMCwwYzAuNiwwLjYsMC42LDEuNiwwLDIuMmwtNC4zLDQuNAoJCWMtMC42LDAuNi0xLjUsMC42LTIuMSwwYzAsMCwwLDAsMCwwbC02LjItNi40VjIyYzAsMC44LTAuNywxLjUtMS41LDEuNWMtMC44LDAtMS41LTAuNy0xLjUtMS41VjEwYzAtMC44LDAuNy0xLjUsMS41LTEuNQoJCWMwLjgsMCwxLjUsMC43LDEuNSwxLjV2My44bDYuMi02LjRjMC42LTAuNiwxLjUtMC42LDIuMSwwYzAsMCwwLDAsMCwwbDQuMyw0LjRjMC42LDAuNiwwLjYsMS42LDAsMi4yYy0wLjYsMC42LTEuNSwwLjYtMiwwCgkJYzAsMCwwLDAsMCwwbC0zLjMtMy40TDEzLjUsMTZ6IE0xOC43LDE0LjVjMC44LDAsMS41LDAuNywxLjUsMS41cy0wLjcsMS41LTEuNSwxLjVzLTEuNS0wLjctMS41LTEuNQoJCUMxNy4yLDE1LjIsMTcuOSwxNC41LDE4LjcsMTQuNXoiLz4KPC9nPgo8L3N2Zz4K',
|
||||
symbol: 'KCS',
|
||||
explorerurl: 'https://scan.kcc.network'
|
||||
},
|
||||
{
|
||||
name: 'KCC Testnet',
|
||||
type: 'Testnet',
|
||||
logo: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI0LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMiAzMiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzIgMzI7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbC1ydWxlOmV2ZW5vZGQ7Y2xpcC1ydWxlOmV2ZW5vZGQ7ZmlsbDojMDA5M0REO30KCS5zdDF7ZmlsbC1ydWxlOmV2ZW5vZGQ7Y2xpcC1ydWxlOmV2ZW5vZGQ7ZmlsbDojRkZGRkZGO30KPC9zdHlsZT4KPGc+Cgk8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxNiIgY3k9IjE2IiByPSIxNiIvPgoJPHBhdGggY2xhc3M9InN0MSIgZD0iTTEzLjUsMTZsNS4yLDUuM0wyMiwxOGMwLjYtMC42LDEuNS0wLjYsMiwwYzAsMCwwLDAsMCwwYzAuNiwwLjYsMC42LDEuNiwwLDIuMmwtNC4zLDQuNAoJCWMtMC42LDAuNi0xLjUsMC42LTIuMSwwYzAsMCwwLDAsMCwwbC02LjItNi40VjIyYzAsMC44LTAuNywxLjUtMS41LDEuNWMtMC44LDAtMS41LTAuNy0xLjUtMS41VjEwYzAtMC44LDAuNy0xLjUsMS41LTEuNQoJCWMwLjgsMCwxLjUsMC43LDEuNSwxLjV2My44bDYuMi02LjRjMC42LTAuNiwxLjUtMC42LDIuMSwwYzAsMCwwLDAsMCwwbDQuMyw0LjRjMC42LDAuNiwwLjYsMS42LDAsMi4yYy0wLjYsMC42LTEuNSwwLjYtMiwwCgkJYzAsMCwwLDAsMCwwbC0zLjMtMy40TDEzLjUsMTZ6IE0xOC43LDE0LjVjMC44LDAsMS41LDAuNywxLjUsMS41cy0wLjcsMS41LTEuNSwxLjVzLTEuNS0wLjctMS41LTEuNQoJCUMxNy4yLDE1LjIsMTcuOSwxNC41LDE4LjcsMTQuNXoiLz4KPC9nPgo8L3N2Zz4K',
|
||||
rpc: 'https://rpc-testnet.kcc.network',
|
||||
id: 322,
|
||||
symbol: 'tKCS',
|
||||
explorerurl: 'https://scan-testnet.kcc.network'
|
||||
},
|
||||
{
|
||||
name: 'Moonriver Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://rpc.moonriver.moonbeam.network',
|
||||
id: 1285,
|
||||
symbol: 'MOVR',
|
||||
explorerurl: 'https://blockscout.moonriver.moonbeam.network/'
|
||||
},
|
||||
{
|
||||
name: 'Fantom Testnet RPC',
|
||||
type: 'Testnet',
|
||||
rpc: 'https://rpc.testnet.fantom.network/',
|
||||
id: 4002,
|
||||
symbol: 'FTM',
|
||||
explorerurl: 'https://testnet.ftmscan.com'
|
||||
},
|
||||
{
|
||||
name: 'IoTeX Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://babel-api.mainnet.iotex.io',
|
||||
id: 4689,
|
||||
symbol: 'IOTEX',
|
||||
explorerurl: 'https://iotexscan.io/'
|
||||
},
|
||||
{
|
||||
name: 'Nahmii Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://l2.nahmii.io/',
|
||||
id: 5551,
|
||||
symbol: 'ETH',
|
||||
explorerurl: 'https://explorer.nahmii.io/'
|
||||
},
|
||||
{
|
||||
name: 'Nahmii Testnet RPC',
|
||||
type: 'Testnet',
|
||||
rpc: 'https://l2.testnet.nahmii.io/',
|
||||
id: 5553,
|
||||
symbol: 'ETH',
|
||||
explorerurl: 'https://explorer.testnet.nahmii.io/'
|
||||
},
|
||||
{
|
||||
name: 'Arbitrum Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://rpc.ankr.com/arbitrum',
|
||||
id: 42161,
|
||||
symbol: 'ETH',
|
||||
explorerurl: 'https://arbiscan.io/'
|
||||
},
|
||||
{
|
||||
name: 'Celo Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://rpc.ankr.com/celo',
|
||||
id: 42220,
|
||||
symbol: 'CELO',
|
||||
explorerurl: 'https://celoscan.com'
|
||||
},
|
||||
{
|
||||
name: 'Avalanche C Chain Local RPC',
|
||||
type: 'Testnet',
|
||||
rpc: 'https://localhost:9650/ext/bc/C/rpc',
|
||||
id: 43112,
|
||||
symbol: 'AVAX',
|
||||
explorerurl: 'https://snowtrace.io'
|
||||
},
|
||||
{
|
||||
name: 'Avalanche FUJI Testnet RPC',
|
||||
type: 'Testnet',
|
||||
rpc: 'https://api.avax-test.network/ext/bc/C/rpc',
|
||||
id: 43113,
|
||||
symbol: 'AVAX',
|
||||
explorerurl: 'https://testnet.explorer.avax.network/'
|
||||
},
|
||||
{
|
||||
name: 'Avalanche C Chain Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://rpc.ankr.com/avalanche',
|
||||
id: 43114,
|
||||
symbol: 'AVAX',
|
||||
explorerurl: 'https://snowtrace.io'
|
||||
},
|
||||
{
|
||||
name: 'Matic Testnet RPC',
|
||||
type: 'Testnet',
|
||||
rpc: 'https://rpc-mumbai.maticvigil.com',
|
||||
id: 80001,
|
||||
symbol: 'MATIC',
|
||||
explorerurl: 'https://mumbai.polygonscan.com/'
|
||||
},
|
||||
{
|
||||
name: 'Harmony Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://api.harmony.one/',
|
||||
id: 1666600000,
|
||||
symbol: 'ONE',
|
||||
explorerurl: 'https://explorer.harmony.one'
|
||||
},
|
||||
{
|
||||
name: 'Harmony Testnet RPC',
|
||||
type: 'Testnet',
|
||||
rpc: 'https://api.s0.b.hmny.io/',
|
||||
id: 1666700000,
|
||||
symbol: 'ONE',
|
||||
explorerurl: 'https://explorer.harmony.one'
|
||||
}
|
||||
]
|
9
assets/comp/wallet/scripts/data/allchain.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "bae84892-34a3-4f4d-a1e2-c3b47806e4a9",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
7
assets/comp/wallet/scripts/decorator.meta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "9d77bead-1e56-42d5-9996-91059048b822",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
||||
}
|
21
assets/comp/wallet/scripts/decorator/AutoUpdateUI.ts
Normal file
@ -0,0 +1,21 @@
|
||||
/**
|
||||
* 配合updateUI和isAlter, 用于监控有此decorator的property的值,
|
||||
* 如果值有变化, 则自动更新UI
|
||||
*/
|
||||
export function ZMonitor() {
|
||||
return function(target: Object, propertyKey: string) {
|
||||
const getter = function() {
|
||||
return this[`_${propertyKey}`];
|
||||
};
|
||||
const setter = function(newVal: string) {
|
||||
if (this[`_${propertyKey}`] !== newVal) {
|
||||
this['isAlter'] = true;
|
||||
this[`_${propertyKey}`] = newVal;
|
||||
}
|
||||
};
|
||||
Object.defineProperty(target, propertyKey, {
|
||||
get: getter,
|
||||
set: setter
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "bc3b0e46-e153-4b17-b5a1-9bd4952df424",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
27
assets/comp/wallet/scripts/decorator/singleton.decorator.ts
Normal file
@ -0,0 +1,27 @@
|
||||
/**
|
||||
* @singleton
|
||||
* class Test {}
|
||||
* new Test() === new Test() // returns `true`
|
||||
* const TestSingleton = singleton(Test)
|
||||
* new TestSingleton() === new TestSingleton() //returns 'true'
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line symbol-description
|
||||
export const SINGLETON_KEY = Symbol()
|
||||
|
||||
export type Singleton<T extends new (...args: any[]) => any> = T & {
|
||||
[SINGLETON_KEY]: T extends new (...args: any[]) => infer I ? I : never
|
||||
}
|
||||
export const singleton = <T extends new (...args: any[]) => any>(classTarget: T) =>
|
||||
new Proxy(classTarget, {
|
||||
construct(target: Singleton<T>, argumentsList, newTarget) {
|
||||
// Skip proxy for children
|
||||
if (target.prototype !== newTarget.prototype) {
|
||||
return Reflect.construct(target, argumentsList, newTarget)
|
||||
}
|
||||
if (!target[SINGLETON_KEY]) {
|
||||
target[SINGLETON_KEY] = Reflect.construct(target, argumentsList, newTarget)
|
||||
}
|
||||
return target[SINGLETON_KEY]
|
||||
}
|
||||
})
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "03eb9cbf-b0e2-4128-a3bb-147159793404",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
7
assets/comp/wallet/scripts/lib.meta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "5097e805-d460-4791-91f1-c2caaf16d502",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
||||
}
|
12
assets/comp/wallet/scripts/lib/Http.ts
Normal file
@ -0,0 +1,12 @@
|
||||
export function GET(url: string) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState == 4 && (xhr.status >= 200 && xhr.status < 400)) {
|
||||
resolve && resolve(xhr.responseText);
|
||||
}
|
||||
};
|
||||
xhr.open("GET", url, true);
|
||||
xhr.send();
|
||||
})
|
||||
}
|
9
assets/comp/wallet/scripts/lib/Http.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "3fd4a9e7-ebbb-4d0a-abe3-c9d657942143",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
11825
assets/comp/wallet/scripts/lib/ethSigUtil.js
Normal file
9
assets/comp/wallet/scripts/lib/ethSigUtil.js.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "254018f3-11ff-450c-b733-80d8a973d7f7",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
42858
assets/comp/wallet/scripts/lib/web3.min.js
vendored
Normal file
9
assets/comp/wallet/scripts/lib/web3.min.js.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "d54ec34f-6095-47eb-9d65-363d784a6abf",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": false,
|
||||
"loadPluginInNative": false,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
7
assets/comp/wallet/scripts/ui.meta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "34b2a874-212a-4add-98c6-57720ac25873",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
||||
}
|
21
assets/comp/wallet/scripts/ui/ButtonGroup.ts
Normal file
@ -0,0 +1,21 @@
|
||||
const {ccclass, property} = cc._decorator;
|
||||
import TextBtn from "./TextBtn";
|
||||
import WalletBase from "./WallerBase";
|
||||
|
||||
@ccclass
|
||||
export default class ButtonGroup extends WalletBase {
|
||||
@property({
|
||||
type: [TextBtn]
|
||||
})
|
||||
btns: TextBtn[];
|
||||
|
||||
// LIFE-CYCLE CALLBACKS:
|
||||
|
||||
// onLoad () {}
|
||||
|
||||
start () {
|
||||
|
||||
}
|
||||
|
||||
// update (dt) {}
|
||||
}
|
9
assets/comp/wallet/scripts/ui/ButtonGroup.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "efb2638d-7d6a-473c-ae17-f23fde178543",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
21
assets/comp/wallet/scripts/ui/NftList.ts
Normal file
@ -0,0 +1,21 @@
|
||||
const {ccclass, property} = cc._decorator;
|
||||
|
||||
@ccclass
|
||||
export default class NftList extends cc.Component {
|
||||
|
||||
@property(cc.Label)
|
||||
label: cc.Label = null;
|
||||
|
||||
@property
|
||||
text: string = 'hello';
|
||||
|
||||
// LIFE-CYCLE CALLBACKS:
|
||||
|
||||
// onLoad () {}
|
||||
|
||||
start () {
|
||||
|
||||
}
|
||||
|
||||
// update (dt) {}
|
||||
}
|
9
assets/comp/wallet/scripts/ui/NftList.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "d8e74e0b-048a-4178-a94e-9bd2af6fa5bb",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
44
assets/comp/wallet/scripts/ui/TextBtn.ts
Normal file
@ -0,0 +1,44 @@
|
||||
|
||||
import { ZMonitor } from "../decorator/AutoUpdateUI";
|
||||
import WalletBase from "./WallerBase";
|
||||
|
||||
const {ccclass, property} = cc._decorator;
|
||||
|
||||
@ccclass
|
||||
export default class TextBtn extends WalletBase {
|
||||
|
||||
@property(cc.Label)
|
||||
titleLabel: cc.Label = null;
|
||||
|
||||
@property(cc.Node)
|
||||
border: cc.Node = null;
|
||||
|
||||
@ZMonitor()
|
||||
@property
|
||||
title: string = '';
|
||||
|
||||
@ZMonitor()
|
||||
@property
|
||||
selected: boolean = false;
|
||||
|
||||
@property({
|
||||
type: [cc.Color]
|
||||
})
|
||||
colors = [cc.Color.GRAY, cc.Color.GREEN]
|
||||
|
||||
// LIFE-CYCLE CALLBACKS:
|
||||
|
||||
// onLoad () {}
|
||||
|
||||
start () {
|
||||
this.updateUI()
|
||||
}
|
||||
|
||||
updateUI() {
|
||||
super.updateUI()
|
||||
this.titleLabel.string = this.title
|
||||
let color = this.selected ? this.colors[1] : this.colors[0];
|
||||
this.titleLabel.node.color = color
|
||||
this.border.color = color
|
||||
}
|
||||
}
|
9
assets/comp/wallet/scripts/ui/TextBtn.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "7b631846-e55c-44bb-a75e-492a81a78075",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
21
assets/comp/wallet/scripts/ui/TokenList.ts
Normal file
@ -0,0 +1,21 @@
|
||||
const {ccclass, property} = cc._decorator;
|
||||
|
||||
@ccclass
|
||||
export default class TokenList extends cc.Component {
|
||||
|
||||
@property(cc.Label)
|
||||
label: cc.Label = null;
|
||||
|
||||
@property
|
||||
text: string = 'hello';
|
||||
|
||||
// LIFE-CYCLE CALLBACKS:
|
||||
|
||||
// onLoad () {}
|
||||
|
||||
start () {
|
||||
|
||||
}
|
||||
|
||||
// update (dt) {}
|
||||
}
|
9
assets/comp/wallet/scripts/ui/TokenList.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "b34035cd-252d-4e5f-a16e-aa2f71f574a5",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
16
assets/comp/wallet/scripts/ui/WallerBase.ts
Normal file
@ -0,0 +1,16 @@
|
||||
const {ccclass, property} = cc._decorator;
|
||||
|
||||
@ccclass
|
||||
export default class WalletBase extends cc.Component {
|
||||
|
||||
isAlter = false
|
||||
|
||||
update (dt) {
|
||||
if (this.isAlter) {
|
||||
this.updateUI()
|
||||
}
|
||||
}
|
||||
updateUI() {
|
||||
this.isAlter = false
|
||||
}
|
||||
}
|
9
assets/comp/wallet/scripts/ui/WallerBase.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "8a7b03b0-a94b-4aaa-baac-2cd602849c4f",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
62
assets/comp/wallet/scripts/ui/WalletInfo.ts
Normal file
@ -0,0 +1,62 @@
|
||||
import { formatPrice } from "../common/chain.util";
|
||||
import { ZMonitor } from "../decorator/AutoUpdateUI";
|
||||
import JCWallet from "../JCWallet";
|
||||
import WalletBase from "./WallerBase";
|
||||
|
||||
const {ccclass, property} = cc._decorator;
|
||||
|
||||
@ccclass
|
||||
export default class WalletInfo extends WalletBase {
|
||||
|
||||
@property(cc.Label)
|
||||
addressLabel: cc.Label = null;
|
||||
|
||||
@property(cc.Label)
|
||||
balanceLabel: cc.Label = null;
|
||||
|
||||
@ZMonitor()
|
||||
accountId: string = '';
|
||||
|
||||
@ZMonitor()
|
||||
balance: string = ''
|
||||
|
||||
private wallet: JCWallet
|
||||
|
||||
// LIFE-CYCLE CALLBACKS:
|
||||
|
||||
// onLoad () {}
|
||||
|
||||
start () {
|
||||
this.wallet = new JCWallet()
|
||||
this.accountId = this.wallet.currentAccount().address
|
||||
this.updateUI()
|
||||
this.wallet.getBalance()
|
||||
.then(v => {
|
||||
console.log('update balance: ', v);
|
||||
this.balance = v + ''
|
||||
})
|
||||
}
|
||||
|
||||
// update (dt) {}
|
||||
updateUI(): void {
|
||||
super.updateUI()
|
||||
this.addressLabel.string = this.formatAddress()
|
||||
this.balanceLabel.string = this.formatMoney()
|
||||
}
|
||||
|
||||
formatAddress() {
|
||||
if (this.accountId.length >= 10) {
|
||||
return this.accountId.substring(0, 8) + '...' + this.accountId.substring(this.accountId.length - 8)
|
||||
} else if (this.accountId.length > 0 && this.accountId.length < 10) {
|
||||
return this.accountId
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
formatMoney() {
|
||||
console.log('update balance: ', this.balance)
|
||||
let money = formatPrice(this.balance, 18, 4)
|
||||
return `${money} KCS`;
|
||||
}
|
||||
}
|
9
assets/comp/wallet/scripts/ui/WalletInfo.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "3fe0a37d-8ec1-43e7-ba4c-845b1eafe8ef",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
21
assets/comp/wallet/scripts/ui/WalletMainPanel.ts
Normal file
@ -0,0 +1,21 @@
|
||||
import WalletBase from "./WallerBase";
|
||||
|
||||
const {ccclass, property} = cc._decorator;
|
||||
|
||||
@ccclass
|
||||
export default class WalletMainPanel extends WalletBase {
|
||||
|
||||
// LIFE-CYCLE CALLBACKS:
|
||||
|
||||
// onLoad () {}
|
||||
|
||||
start () {
|
||||
|
||||
}
|
||||
|
||||
// update (dt) {}
|
||||
|
||||
hideWallet() {
|
||||
this.node.active = false
|
||||
}
|
||||
}
|
9
assets/comp/wallet/scripts/ui/WalletMainPanel.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "594f2589-b0ac-4ce4-8ddd-765563ab5a93",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
7
assets/resources.meta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "462a62f5-0f6c-4870-b6e8-4aab484dbc7e",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
||||
}
|
3347
assets/resources/cacert.pem
Normal file
5
assets/resources/cacert.pem.meta
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "1.0.0",
|
||||
"uuid": "9f44f4f7-6ac5-4e47-8057-4299c956e358",
|
||||
"subMetas": {}
|
||||
}
|
7
assets/scenes.meta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "deec8441-a621-4f10-949d-4103565be584",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
||||
}
|
9266
assets/scenes/main.fire
Normal file
7
assets/scenes/main.fire.meta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "05b529fc-da20-4b22-8530-53eef09b4379",
|
||||
"asyncLoadAssets": false,
|
||||
"autoReleaseAssets": false,
|
||||
"subMetas": {}
|
||||
}
|
7
assets/scripts.meta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "9edb91d8-319f-40b9-8b38-3ddbb730d2d6",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
||||
}
|
32
assets/scripts/ZDebug.js
Normal file
@ -0,0 +1,32 @@
|
||||
const COLORS = {
|
||||
'log': '#2E7A21',
|
||||
'warn': '#F7B27D',
|
||||
'info': '#168CEC',
|
||||
'error': '#FB2330',
|
||||
'debug': '#E4FF06'
|
||||
}
|
||||
/**
|
||||
* 带颜色console.log替换工具
|
||||
* 使用方法: 在全局或第一个载入的class中
|
||||
* import {Debugger} from './ZDebug'
|
||||
* let de = Debugger(this)
|
||||
* console.log = de.log;
|
||||
*/
|
||||
export const Debugger = function(){
|
||||
var debug = {}
|
||||
if (CC_DEBUG) {
|
||||
for (var m in console)
|
||||
if (typeof console[m] == 'function') {
|
||||
let color = COLORS[m] || COLORS['info']
|
||||
// let className = this.__classname__
|
||||
let className = Math.random() | 0 +''
|
||||
debug[m] = console[m].bind(window.console, `%c${Date.now()}`, `color: #000; background: ${color}`)
|
||||
}
|
||||
|
||||
}else{
|
||||
for (var m in console)
|
||||
if (typeof console[m] == 'function')
|
||||
debug[m] = function(){}
|
||||
}
|
||||
return debug
|
||||
}
|
9
assets/scripts/ZDebug.js.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "71fbd59f-7d0a-4a6a-ae74-dafbb833a664",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
7
assets/scripts/blockchain.meta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "6f070276-1c5c-47b3-97f0-f6f69fef1c0f",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
||||
}
|
278
assets/scripts/blockchain/allchain.js
Normal file
@ -0,0 +1,278 @@
|
||||
export const AllChains = [
|
||||
{
|
||||
name: 'Ethereum Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://rpc.ankr.com/eth',
|
||||
id: 1,
|
||||
symbol: 'ETH',
|
||||
explorerurl: 'https://etherscan.io'
|
||||
},
|
||||
{
|
||||
name: 'Ethereum Ropsten Testnet RPC',
|
||||
type: 'Testnet',
|
||||
rpc: 'https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161',
|
||||
id: 3,
|
||||
symbol: 'ETH',
|
||||
explorerurl: 'https://ropsten.etherscan.io'
|
||||
},
|
||||
{
|
||||
name: 'Ethereum Rinkeby Testnet RPC',
|
||||
type: 'Testnet',
|
||||
rpc: 'https://rinkey.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161',
|
||||
id: 4,
|
||||
symbol: 'ETH',
|
||||
explorerurl: 'https://rinkey.etherscan.io'
|
||||
},
|
||||
{
|
||||
name: 'Ethereum Goerli Testnet RPC',
|
||||
type: 'Testnet',
|
||||
rpc: 'https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161',
|
||||
id: 5,
|
||||
symbol: 'ETH',
|
||||
explorerurl: 'https://goerli.etherscan.io'
|
||||
},
|
||||
{
|
||||
name: 'Ethereum Kovan Testnet RPC',
|
||||
type: 'Testnet',
|
||||
rpc: 'https://kovan.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161',
|
||||
id: 6,
|
||||
symbol: 'ETH',
|
||||
explorerurl: 'https://kovan.etherscan.io'
|
||||
},
|
||||
{
|
||||
name: 'Ubiq Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://rpc.octano.dev/',
|
||||
id: 8,
|
||||
symbol: 'UBQ',
|
||||
explorerurl: 'https://ubiqscan.io/'
|
||||
},
|
||||
{
|
||||
name: 'Elastos ETH Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://api.elastos.io/eth',
|
||||
id: 20,
|
||||
symbol: 'ELA',
|
||||
explorerurl: 'https://explorer.elaeth.io/'
|
||||
},
|
||||
{
|
||||
name: 'Cronos Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://evm-cronos.crypto.org',
|
||||
id: 25,
|
||||
symbol: 'CRO',
|
||||
explorerurl: 'https://cronos.crypto.org/explorer/'
|
||||
},
|
||||
{
|
||||
name: 'Telos EVM Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://mainnet.telos.net/evm',
|
||||
id: 40,
|
||||
symbol: 'TLOS',
|
||||
explorerurl: 'https://telos.net/'
|
||||
},
|
||||
{
|
||||
name: 'Binance Smart Chain',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://rpc.ankr.com/bsc',
|
||||
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAwIiBoZWlnaHQ9IjI1MDAiIHZpZXdCb3g9IjAgMCAyMDAwIDIwMDAiPjxnIGZpbGw9IiNmM2JhMmYiPjxwYXRoIGQ9Ik02MTEuNTkgODQwLjQybDM4OC40LTM4OC4zOSAzODguNiAzODguNTkgMjI2LTIyNkw5OTkuOTkgMCAzODUuNiA2MTQuNDJsMjI1Ljk5IDIyNk0uMDA2IDk5OS45NjlsMjI2LjAwNy0yMjYuMDA3IDIyNS45OTIgMjI1Ljk5M0wyMjYgMTIyNS45NnpNNjExLjU5IDExNTkuNThsMzg4LjQgMzg4LjM5IDM4OC41OS0zODguNTggMjI2LjEyIDIyNS44OC0uMTEuMTJMOTk5Ljk5IDIwMDBsLTYxNC40MS02MTQuNC0uMzItLjMyIDIyNi4zMy0yMjUuN00xNTQ4LjAxMyAxMDAwLjA5M2wyMjYuMDA3LTIyNi4wMDYgMjI1Ljk5MiAyMjUuOTkyLTIyNi4wMDYgMjI2LjAwN3oiLz48cGF0aCBkPSJNMTIyOS4yMiA5OTkuODhoLjFMOTk5Ljk5IDc3MC41NSA4MzAuNTEgOTQwLjAzaC0uMDFsLTE5LjQ3IDE5LjQ4LTQwLjE2IDQwLjE3LS4zMi4zMS4zMi4zMyAyMjkuMTIgMjI5LjEzIDIyOS4zMy0yMjkuMzMuMTEtLjEzLS4yMS0uMTEiLz48L2c+PC9zdmc+',
|
||||
id: 56,
|
||||
symbol: 'BNB',
|
||||
explorerurl: 'https://bscscan.com'
|
||||
},
|
||||
{
|
||||
name: 'OKExChain Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://exchainrpc.okex.org',
|
||||
id: 66,
|
||||
symbol: 'OKT',
|
||||
explorerurl: 'https://www.oklink.com/okexchain'
|
||||
},
|
||||
{
|
||||
name: 'Hoo Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://http-mainnet.hoosmartchain.com',
|
||||
id: 70,
|
||||
symbol: 'HOO',
|
||||
explorerurl: 'https://hooscan.com'
|
||||
},
|
||||
{
|
||||
name: 'Binance Smart Chain Testnet RPC',
|
||||
type: 'Testnet',
|
||||
rpc: 'https://data-seed-prebsc-1-s1.binance.org:8545/',
|
||||
id: 97,
|
||||
logo: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAwIiBoZWlnaHQ9IjI1MDAiIHZpZXdCb3g9IjAgMCAyMDAwIDIwMDAiPjxnIGZpbGw9IiNmM2JhMmYiPjxwYXRoIGQ9Ik02MTEuNTkgODQwLjQybDM4OC40LTM4OC4zOSAzODguNiAzODguNTkgMjI2LTIyNkw5OTkuOTkgMCAzODUuNiA2MTQuNDJsMjI1Ljk5IDIyNk0uMDA2IDk5OS45NjlsMjI2LjAwNy0yMjYuMDA3IDIyNS45OTIgMjI1Ljk5M0wyMjYgMTIyNS45NnpNNjExLjU5IDExNTkuNThsMzg4LjQgMzg4LjM5IDM4OC41OS0zODguNTggMjI2LjEyIDIyNS44OC0uMTEuMTJMOTk5Ljk5IDIwMDBsLTYxNC40MS02MTQuNC0uMzItLjMyIDIyNi4zMy0yMjUuN00xNTQ4LjAxMyAxMDAwLjA5M2wyMjYuMDA3LTIyNi4wMDYgMjI1Ljk5MiAyMjUuOTkyLTIyNi4wMDYgMjI2LjAwN3oiLz48cGF0aCBkPSJNMTIyOS4yMiA5OTkuODhoLjFMOTk5Ljk5IDc3MC41NSA4MzAuNTEgOTQwLjAzaC0uMDFsLTE5LjQ3IDE5LjQ4LTQwLjE2IDQwLjE3LS4zMi4zMS4zMi4zMyAyMjkuMTIgMjI5LjEzIDIyOS4zMy0yMjkuMzMuMTEtLjEzLS4yMS0uMTEiLz48L2c+PC9zdmc+',
|
||||
symbol: 'BNB',
|
||||
explorerurl: 'https://testnet.bscscan.com'
|
||||
},
|
||||
{
|
||||
name: 'xDai Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://rpc.xdaichain.com/',
|
||||
id: 100,
|
||||
symbol: 'XDAI',
|
||||
explorerurl: 'https://blockscout.com/xdai/mainnet/'
|
||||
},
|
||||
{
|
||||
name: 'Fuse Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://rpc.fuse.io',
|
||||
id: 122,
|
||||
symbol: 'FUSE',
|
||||
explorerurl: 'https://explorer.fuse.io/'
|
||||
},
|
||||
{
|
||||
name: 'HECO Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://http-mainnet-node.huobichain.com/',
|
||||
id: 128,
|
||||
symbol: 'HT',
|
||||
explorerurl: 'https://hecoinfo.com/'
|
||||
},
|
||||
{
|
||||
name: 'Matic Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://polygon-rpc.com',
|
||||
id: 137,
|
||||
symbol: 'MATIC',
|
||||
explorerurl: 'https://explorer.matic.network/'
|
||||
},
|
||||
{
|
||||
name: 'Fantom Opera Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://rpc.ftm.tools/',
|
||||
id: 250,
|
||||
symbol: 'FTM',
|
||||
explorerurl: 'https://ftmscan.com'
|
||||
},
|
||||
{
|
||||
name: 'HECO Testnet RPC',
|
||||
type: 'Testnet',
|
||||
rpc: 'https://http-testnet.hecochain.com',
|
||||
id: 256,
|
||||
symbol: 'HT',
|
||||
explorerurl: 'https://testnet.hecoinfo.com/'
|
||||
},
|
||||
{
|
||||
name: 'KCC Mainnet',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://rpc-mainnet.kcc.network',
|
||||
id: 321,
|
||||
logo: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI0LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMiAzMiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzIgMzI7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbC1ydWxlOmV2ZW5vZGQ7Y2xpcC1ydWxlOmV2ZW5vZGQ7ZmlsbDojMDA5M0REO30KCS5zdDF7ZmlsbC1ydWxlOmV2ZW5vZGQ7Y2xpcC1ydWxlOmV2ZW5vZGQ7ZmlsbDojRkZGRkZGO30KPC9zdHlsZT4KPGc+Cgk8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxNiIgY3k9IjE2IiByPSIxNiIvPgoJPHBhdGggY2xhc3M9InN0MSIgZD0iTTEzLjUsMTZsNS4yLDUuM0wyMiwxOGMwLjYtMC42LDEuNS0wLjYsMiwwYzAsMCwwLDAsMCwwYzAuNiwwLjYsMC42LDEuNiwwLDIuMmwtNC4zLDQuNAoJCWMtMC42LDAuNi0xLjUsMC42LTIuMSwwYzAsMCwwLDAsMCwwbC02LjItNi40VjIyYzAsMC44LTAuNywxLjUtMS41LDEuNWMtMC44LDAtMS41LTAuNy0xLjUtMS41VjEwYzAtMC44LDAuNy0xLjUsMS41LTEuNQoJCWMwLjgsMCwxLjUsMC43LDEuNSwxLjV2My44bDYuMi02LjRjMC42LTAuNiwxLjUtMC42LDIuMSwwYzAsMCwwLDAsMCwwbDQuMyw0LjRjMC42LDAuNiwwLjYsMS42LDAsMi4yYy0wLjYsMC42LTEuNSwwLjYtMiwwCgkJYzAsMCwwLDAsMCwwbC0zLjMtMy40TDEzLjUsMTZ6IE0xOC43LDE0LjVjMC44LDAsMS41LDAuNywxLjUsMS41cy0wLjcsMS41LTEuNSwxLjVzLTEuNS0wLjctMS41LTEuNQoJCUMxNy4yLDE1LjIsMTcuOSwxNC41LDE4LjcsMTQuNXoiLz4KPC9nPgo8L3N2Zz4K',
|
||||
symbol: 'KCS',
|
||||
explorerurl: 'https://scan.kcc.network'
|
||||
},
|
||||
{
|
||||
name: 'KCC Testnet',
|
||||
type: 'Testnet',
|
||||
logo: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI0LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMiAzMiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzIgMzI7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbC1ydWxlOmV2ZW5vZGQ7Y2xpcC1ydWxlOmV2ZW5vZGQ7ZmlsbDojMDA5M0REO30KCS5zdDF7ZmlsbC1ydWxlOmV2ZW5vZGQ7Y2xpcC1ydWxlOmV2ZW5vZGQ7ZmlsbDojRkZGRkZGO30KPC9zdHlsZT4KPGc+Cgk8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxNiIgY3k9IjE2IiByPSIxNiIvPgoJPHBhdGggY2xhc3M9InN0MSIgZD0iTTEzLjUsMTZsNS4yLDUuM0wyMiwxOGMwLjYtMC42LDEuNS0wLjYsMiwwYzAsMCwwLDAsMCwwYzAuNiwwLjYsMC42LDEuNiwwLDIuMmwtNC4zLDQuNAoJCWMtMC42LDAuNi0xLjUsMC42LTIuMSwwYzAsMCwwLDAsMCwwbC02LjItNi40VjIyYzAsMC44LTAuNywxLjUtMS41LDEuNWMtMC44LDAtMS41LTAuNy0xLjUtMS41VjEwYzAtMC44LDAuNy0xLjUsMS41LTEuNQoJCWMwLjgsMCwxLjUsMC43LDEuNSwxLjV2My44bDYuMi02LjRjMC42LTAuNiwxLjUtMC42LDIuMSwwYzAsMCwwLDAsMCwwbDQuMyw0LjRjMC42LDAuNiwwLjYsMS42LDAsMi4yYy0wLjYsMC42LTEuNSwwLjYtMiwwCgkJYzAsMCwwLDAsMCwwbC0zLjMtMy40TDEzLjUsMTZ6IE0xOC43LDE0LjVjMC44LDAsMS41LDAuNywxLjUsMS41cy0wLjcsMS41LTEuNSwxLjVzLTEuNS0wLjctMS41LTEuNQoJCUMxNy4yLDE1LjIsMTcuOSwxNC41LDE4LjcsMTQuNXoiLz4KPC9nPgo8L3N2Zz4K',
|
||||
rpc: 'https://rpc-testnet.kcc.network',
|
||||
id: 322,
|
||||
symbol: 'tKCS',
|
||||
explorerurl: 'https://scan-testnet.kcc.network'
|
||||
},
|
||||
{
|
||||
name: 'Moonriver Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://rpc.moonriver.moonbeam.network',
|
||||
id: 1285,
|
||||
symbol: 'MOVR',
|
||||
explorerurl: 'https://blockscout.moonriver.moonbeam.network/'
|
||||
},
|
||||
{
|
||||
name: 'Fantom Testnet RPC',
|
||||
type: 'Testnet',
|
||||
rpc: 'https://rpc.testnet.fantom.network/',
|
||||
id: 4002,
|
||||
symbol: 'FTM',
|
||||
explorerurl: 'https://testnet.ftmscan.com'
|
||||
},
|
||||
{
|
||||
name: 'IoTeX Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://babel-api.mainnet.iotex.io',
|
||||
id: 4689,
|
||||
symbol: 'IOTEX',
|
||||
explorerurl: 'https://iotexscan.io/'
|
||||
},
|
||||
{
|
||||
name: 'Nahmii Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://l2.nahmii.io/',
|
||||
id: 5551,
|
||||
symbol: 'ETH',
|
||||
explorerurl: 'https://explorer.nahmii.io/'
|
||||
},
|
||||
{
|
||||
name: 'Nahmii Testnet RPC',
|
||||
type: 'Testnet',
|
||||
rpc: 'https://l2.testnet.nahmii.io/',
|
||||
id: 5553,
|
||||
symbol: 'ETH',
|
||||
explorerurl: 'https://explorer.testnet.nahmii.io/'
|
||||
},
|
||||
{
|
||||
name: 'Arbitrum Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://rpc.ankr.com/arbitrum',
|
||||
id: 42161,
|
||||
symbol: 'ETH',
|
||||
explorerurl: 'https://arbiscan.io/'
|
||||
},
|
||||
{
|
||||
name: 'Celo Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://rpc.ankr.com/celo',
|
||||
id: 42220,
|
||||
symbol: 'CELO',
|
||||
explorerurl: 'https://celoscan.com'
|
||||
},
|
||||
{
|
||||
name: 'Avalanche C Chain Local RPC',
|
||||
type: 'Testnet',
|
||||
rpc: 'https://localhost:9650/ext/bc/C/rpc',
|
||||
id: 43112,
|
||||
symbol: 'AVAX',
|
||||
explorerurl: 'https://snowtrace.io'
|
||||
},
|
||||
{
|
||||
name: 'Avalanche FUJI Testnet RPC',
|
||||
type: 'Testnet',
|
||||
rpc: 'https://api.avax-test.network/ext/bc/C/rpc',
|
||||
id: 43113,
|
||||
symbol: 'AVAX',
|
||||
explorerurl: 'https://testnet.explorer.avax.network/'
|
||||
},
|
||||
{
|
||||
name: 'Avalanche C Chain Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://rpc.ankr.com/avalanche',
|
||||
id: 43114,
|
||||
symbol: 'AVAX',
|
||||
explorerurl: 'https://snowtrace.io'
|
||||
},
|
||||
{
|
||||
name: 'Matic Testnet RPC',
|
||||
type: 'Testnet',
|
||||
rpc: 'https://rpc-mumbai.maticvigil.com',
|
||||
id: 80001,
|
||||
symbol: 'MATIC',
|
||||
explorerurl: 'https://mumbai.polygonscan.com/'
|
||||
},
|
||||
{
|
||||
name: 'Harmony Mainnet RPC',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://api.harmony.one/',
|
||||
id: 1666600000,
|
||||
symbol: 'ONE',
|
||||
explorerurl: 'https://explorer.harmony.one'
|
||||
},
|
||||
{
|
||||
name: 'Harmony Testnet RPC',
|
||||
type: 'Testnet',
|
||||
rpc: 'https://api.s0.b.hmny.io/',
|
||||
id: 1666700000,
|
||||
symbol: 'ONE',
|
||||
explorerurl: 'https://explorer.harmony.one'
|
||||
}
|
||||
]
|
9
assets/scripts/blockchain/allchain.js.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "2e06e986-08b9-4628-8a00-5fb7c018812f",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
71
assets/scripts/blockchain/chain.js
Normal file
@ -0,0 +1,71 @@
|
||||
import {AllChains} from './allchain'
|
||||
|
||||
export class BlockChain{
|
||||
|
||||
constructor() {
|
||||
this.rpc= {}
|
||||
for (const d of AllChains) {
|
||||
const id = d.id
|
||||
this.rpc[id] = d.rpc
|
||||
}
|
||||
}
|
||||
|
||||
async connectWallet() {
|
||||
this.provider = await this.connectWalletConnect()
|
||||
if (!this.provider) {
|
||||
return
|
||||
}
|
||||
this.web3 = new Web3(this.provider)
|
||||
const chainId = await this.web3.eth.getChainId()
|
||||
this.subscribeToEvents()
|
||||
}
|
||||
|
||||
async connectWalletConnect() {
|
||||
const provider = new WalletConnectProvider.default({
|
||||
infuraId: 'e7743d46923911fa8850619b7a7f6d9d',
|
||||
rpc: this.rpc
|
||||
})
|
||||
try {
|
||||
await provider.enable()
|
||||
} catch (err) {
|
||||
console.log('connect to wallet connect error: ', err)
|
||||
await Promise.reject(err)
|
||||
}
|
||||
|
||||
return provider
|
||||
}
|
||||
|
||||
subscribeToEvents = () => {
|
||||
// Subscribe to accounts change
|
||||
this.provider.on('accountsChanged', async(accounts) => {
|
||||
console.log('accountsChanged: ', accounts)
|
||||
if (accounts && accounts.length > 0) {
|
||||
this.accountId = accounts[0]
|
||||
}
|
||||
})
|
||||
|
||||
this.provider.on('wc_uri_change', async(uri) => {
|
||||
console.log('wc_uri_change: ', uri)
|
||||
jsb.reflection.callStaticMethod(
|
||||
'org/cocos2dx/javascript/AppActivity',
|
||||
'connectwallet',
|
||||
'(Ljava/lang/String;)V',
|
||||
uri
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
// Subscribe to chainId change
|
||||
this.provider.on('chainChanged', async(chainId) => {
|
||||
console.log('chainChanged', chainId)
|
||||
const chainIdNum = parseInt(chainId)
|
||||
this.chainId = chainIdNum
|
||||
// this.saveProvider()
|
||||
})
|
||||
|
||||
// Subscribe to session disconnection
|
||||
this.provider.on('disconnect', (err) => {
|
||||
console.log('disconnect', err)
|
||||
})
|
||||
}
|
||||
}
|
9
assets/scripts/blockchain/chain.js.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "74fe6ec2-161e-416f-b80e-f97851a9167d",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
259
assets/scripts/blockchain/chainComp.js
Normal file
@ -0,0 +1,259 @@
|
||||
//require('./plugin/zclient')
|
||||
|
||||
const EIP721_DOMAIN_DATA = [
|
||||
{ name: "name", type: "string" },
|
||||
{ name: "version", type: "string" },
|
||||
];
|
||||
/**
|
||||
* 1. 监听事件,
|
||||
* wc_uri_change: 生成二维码或者android选择钱包
|
||||
* client_connect: 连接成功
|
||||
* 2. 调用connectWallet(), 注意: 如果本地有保存session, 那么会直接抛出client_connect事件
|
||||
* 3. 在收到client_connect事件后, 调用signForLogin获取签名
|
||||
*
|
||||
*/
|
||||
cc.Class({
|
||||
extends: cc.Component,
|
||||
|
||||
properties: {
|
||||
loginTips: {
|
||||
default: "This signature is only used for verify your account",
|
||||
tooltip: 'Tip message show on wallet when sign login message',
|
||||
},
|
||||
showLog: {
|
||||
default: true,
|
||||
tooltip: "Show debug log?",
|
||||
}
|
||||
},
|
||||
|
||||
start() {
|
||||
cc.changChainResult = function(resultStr) {
|
||||
console.log(resultStr);
|
||||
try {
|
||||
let result = JSON.parse(resultStr)
|
||||
console.log(result)
|
||||
} catch(err) {
|
||||
console.log('result parse json error: ', err)
|
||||
}
|
||||
}
|
||||
if (this.showLog) {
|
||||
// this.log = console.log.bind(window.console, '%c[ChainComp] ', `color: #000; background: #3ABAC9`, ...arguments);
|
||||
this.log = console.log.bind(window.console, '[ChainComp] ', ...arguments);
|
||||
} else {
|
||||
this.log = () => {}
|
||||
}
|
||||
console.log('start, typeof window:'+ (typeof window !== "undefined") +' addEventListener: '+ (typeof window.addEventListener !== "undefined"))
|
||||
console.log(localStorage.getItem('walletconnect'))
|
||||
|
||||
var pemUrl = cc.url.raw("resources/cacert.pem");
|
||||
if (cc.loader.md5Pipe) {
|
||||
pemUrl = cc.loader.md5Pipe.transformURL(pemUrl);
|
||||
}
|
||||
// add cc.ws for zclient
|
||||
// zclient use cc.ws for check is current env is ccc
|
||||
cc.ws = (url) => {
|
||||
if (cc.sys.platform === cc.sys.ANDROID) {
|
||||
this.log(
|
||||
`: create websocket with ${url}, CA file: ${pemUrl}`
|
||||
);
|
||||
return new WebSocket(url, null, pemUrl);
|
||||
} else {
|
||||
this.log(`: create websocket for ${url}`);
|
||||
return new WebSocket(url);
|
||||
}
|
||||
};
|
||||
},
|
||||
onDestroy() {
|
||||
this.connector.off("connect");
|
||||
this.connector.off("session_update");
|
||||
this.connector.off("disconnect");
|
||||
this.connector.off("need_to_wallet");
|
||||
},
|
||||
_buildSingMsg(nonce) {
|
||||
nonce += "";
|
||||
const signMsg = {
|
||||
tips: this.loginTips,
|
||||
nonce,
|
||||
};
|
||||
|
||||
const signObj = {
|
||||
types: {
|
||||
EIP712Domain: EIP721_DOMAIN_DATA,
|
||||
set: [
|
||||
{ name: "tips", type: "string" },
|
||||
{ name: "nonce", type: "string" },
|
||||
],
|
||||
},
|
||||
primaryType: "set",
|
||||
domain: {
|
||||
name: "Auth",
|
||||
version: "1",
|
||||
},
|
||||
message: signMsg,
|
||||
};
|
||||
return signObj;
|
||||
},
|
||||
_subscribeToEvents(connector) {
|
||||
// Subscribe to connection events
|
||||
connector.on("connect", (error, payload) => {
|
||||
if (error) {
|
||||
this.node.emit("client_error", error);
|
||||
return;
|
||||
}
|
||||
|
||||
// Get provided accounts and chainId
|
||||
const { accounts, chainId } = payload.params[0];
|
||||
this.account = accounts[0];
|
||||
this.chainId = chainId;
|
||||
this.log("connect", accounts, chainId);
|
||||
this.node.emit("client_connect", { account: accounts[0], chainId });
|
||||
});
|
||||
|
||||
connector.on('need_to_wallet', (error, payload) => {
|
||||
setTimeout(()=> {
|
||||
this.jumpNativeWallet();
|
||||
}, 2000)
|
||||
});
|
||||
|
||||
connector.on("session_update", (error, payload) => {
|
||||
if (error) {
|
||||
this.node.emit("client_error", error);
|
||||
return;
|
||||
}
|
||||
|
||||
// Get updated accounts and chainId
|
||||
const { accounts, chainId } = payload.params[0];
|
||||
this.account = accounts[0];
|
||||
this.chainId = chainId;
|
||||
this.log("session_update", accounts, chainId);
|
||||
this.node.emit("client_session_update", {
|
||||
account: accounts[0],
|
||||
chainId,
|
||||
});
|
||||
});
|
||||
|
||||
connector.on("disconnect", (error, payload) => {
|
||||
if (error) {
|
||||
this.node.emit("client_error", error);
|
||||
return;
|
||||
}
|
||||
// Delete connector
|
||||
this.log("disconnect");
|
||||
this.node.emit("client_disconnet");
|
||||
});
|
||||
},
|
||||
/**
|
||||
* bind this method to login button
|
||||
*/
|
||||
// async connectWallet() {
|
||||
// const connector = zclient.WalletConnect.getInstance({
|
||||
// bridge: "https://bridge.walletconnect.org",
|
||||
// });
|
||||
// this.connector = connector;
|
||||
// cc.wc = connector;
|
||||
// this._subscribeToEvents(connector);
|
||||
// // Check if connection is already established
|
||||
// if (!connector.connected) {
|
||||
// // create new session
|
||||
// await connector.createSession()
|
||||
// this.log("wc uri: " + connector.uri);
|
||||
// this.node.emit("wc_uri_change", connector.uri);
|
||||
// setTimeout(()=> {
|
||||
// this.callNativeWallet(connector.uri);
|
||||
// }, 5000)
|
||||
|
||||
|
||||
// } else {
|
||||
// this.log("already connected. wc uri:" + connector.uri);
|
||||
// this.account = connector.accounts[0];
|
||||
// this.chainId = connector.chainId;
|
||||
// this.node.emit("wc_uri_change", connector.uri);
|
||||
// this.node.emit("client_connect", {
|
||||
// account: this.account,
|
||||
// chainId: this.chainId,
|
||||
// });
|
||||
// }
|
||||
// },
|
||||
connectWallet() {
|
||||
jsb.reflection.callStaticMethod("org.cocos2dx.javascript.AppActivity", "connectwallet", "(Ljava/lang/String;)V", 'sth');
|
||||
},
|
||||
callNativeWallet(url) {
|
||||
jsb.reflection.callStaticMethod("org.cocos2dx.javascript.AppActivity", "connectWallet", "(Ljava/lang/String;)V", url);
|
||||
},
|
||||
changeChain() {
|
||||
let param = {chainId: '0x141'}
|
||||
jsb.reflection.callStaticMethod("org.cocos2dx.javascript.AppActivity", "changeChain", "(Ljava/lang/String;)V", JSON.stringify(param));
|
||||
},
|
||||
addChain() {
|
||||
let params = {
|
||||
chainId: "0x141",
|
||||
chainName: "KCC Mainnet",
|
||||
nativeCurrency: {
|
||||
name: "kccToken",
|
||||
symbol: "KCS",
|
||||
decimals: 18
|
||||
},
|
||||
blockExplorerUrls: ["https://explorer.kcc.io/en"],
|
||||
rpcUrls: ["https://rpc-mainnet.kcc.network"]
|
||||
}
|
||||
jsb.reflection.callStaticMethod("org.cocos2dx.javascript.AppActivity", "addChain", "(Ljava/lang/String;)V", JSON.stringify(params));
|
||||
},
|
||||
jumpNativeWallet() {
|
||||
this.log('jump to wallet')
|
||||
jsb.reflection.callStaticMethod("org.cocos2dx.javascript.AppActivity", "connectwallet", "(Ljava/lang/String;)V", `wc:${cc.wc.handshakeTopic}@${cc.wc.version}`);
|
||||
},
|
||||
/**
|
||||
* 断开连接, 并清除本地保存的session
|
||||
*/
|
||||
disconnect() {
|
||||
return this.connector.rejectSession();
|
||||
},
|
||||
/**
|
||||
* 获取签名, 须在client_connect事件后才能执行
|
||||
* @param {*} nonce
|
||||
* @returns
|
||||
*/
|
||||
signForLogin(nonce) {
|
||||
// console.log(`sign: ${this.connector.connected}`)
|
||||
// if (!this.connector || !this.connector.connected) {
|
||||
// return false;
|
||||
// }
|
||||
// // let signObj = this._buildSingMsg(nonce);
|
||||
// // let params = [this.account, JSON.stringify(signObj)];
|
||||
// // this.connector.signTypedData(params).then((signature)=> {
|
||||
// // this.log("signature: " + signature);
|
||||
// // return { signature, tips: this.loginTips };
|
||||
// // })
|
||||
// let signObj = [this.account, '0xc1912fee45d61c87cc5ea59dae311904cd86b84fee17cc96966216f811ce6a79']
|
||||
// this.connector.signMessage(signObj).then((signature)=> {
|
||||
// this.log("signature: " + signature);
|
||||
// return { signature, tips: this.loginTips };
|
||||
// })
|
||||
var nonce = (Math.random() * 10000 | 0)+'';
|
||||
var signData = {
|
||||
types: {
|
||||
EIP712Domain: [
|
||||
{ name: 'name', type: 'string' },
|
||||
{ name: 'version', type: 'string' },
|
||||
],
|
||||
set: [
|
||||
{ name: 'tips', type: 'string' },
|
||||
{ name: 'nonce', type: 'string' },
|
||||
],
|
||||
},
|
||||
primaryType: 'set',
|
||||
domain: { name: 'Auth', version: '1' },
|
||||
message: {
|
||||
tips: 'sign request',
|
||||
nonce: nonce,
|
||||
},
|
||||
};
|
||||
|
||||
jsb.reflection.callStaticMethod("org.cocos2dx.javascript.AppActivity", "signApp", "(Ljava/lang/String;)V", `${JSON.stringify(signData)}`);
|
||||
},
|
||||
|
||||
testSign() {
|
||||
const nonce = (Math.random() * 100000) | 0;
|
||||
this.signForLogin(nonce);
|
||||
},
|
||||
});
|
9
assets/scripts/blockchain/chainComp.js.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "7273c9b3-aec4-47e4-85f6-bd641331bc27",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
7
assets/scripts/blockchain/plugin.meta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "01920842-a16a-4f86-9095-6b9d1b9cac5b",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
||||
}
|
1
assets/scripts/blockchain/plugin/regenerator-runtime.js
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "1239ade2-21c2-42b1-9449-1c69360bb44f",
|
||||
"isPlugin": true,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": true,
|
||||
"subMetas": {}
|
||||
}
|
2
assets/scripts/blockchain/plugin/zclient.js
Normal file
9
assets/scripts/blockchain/plugin/zclient.js.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "402c853b-bc58-476a-86bc-5765eafd8fc1",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
96
assets/scripts/main.js
Normal file
@ -0,0 +1,96 @@
|
||||
var Web3 = require('web3.min')
|
||||
cc.Class({
|
||||
extends: cc.Component,
|
||||
|
||||
properties: {
|
||||
webview: cc.WebView,
|
||||
debugText: cc.Label,
|
||||
noLog: false
|
||||
},
|
||||
|
||||
async start() {
|
||||
console.log('main')
|
||||
let web3 = new Web3('https://rpc-testnet.kcc.network');
|
||||
// let web2 = new Web3('https://rpc-testnet.kcc.network');
|
||||
// let key = '0xa6c4354fb93a55fb67117969a12465209395ec31089fea9e6e061f873b87a473'
|
||||
// web3.eth.accounts.wallet.load('111111');
|
||||
// web3.eth.accounts.wallet.add(key);
|
||||
// web3.eth.accounts.wallet.save('111111');
|
||||
// let account = web3.eth.accounts.privateKeyToAccount(key);
|
||||
// console.log('new account: ')
|
||||
// console.log(JSON.stringify(account));
|
||||
// let encryptData = web3.eth.accounts.encrypt(account.privateKey, '111111');
|
||||
// console.log('encrypt data: ' );
|
||||
// console.log(JSON.stringify(encryptData));
|
||||
// let privateKey = web3.eth.accounts.decrypt(encryptData, '111111');
|
||||
// console.log('decrypt data: ');
|
||||
// console.log(JSON.stringify(privateKey));
|
||||
// let balance = await web3.eth.getBalance(privateKey.address);
|
||||
// console.log(`balance: ${balance}`);
|
||||
|
||||
// console.log(typeof exports, typeof module, typeof define);
|
||||
// this.webview.node.on("loaded", this.callback, this);
|
||||
// this.bindWebToMe();
|
||||
// this.onClickLogin();
|
||||
// var pemUrl = cc.url.raw('resources/walletconnect.cer')
|
||||
|
||||
},
|
||||
|
||||
connectWallet() {
|
||||
jsb.reflection.callStaticMethod("org.cocos2dx.javascript.AppActivity", "connectWallet");
|
||||
},
|
||||
|
||||
testSign() {
|
||||
|
||||
},
|
||||
|
||||
disconnect() {
|
||||
|
||||
},
|
||||
|
||||
// update (dt) {},
|
||||
onClickLogin() {
|
||||
let url = "https://www.cebg.games/nativelogin?a=login";
|
||||
this.setDebugText(url);
|
||||
this.webview.url = url;
|
||||
},
|
||||
cocosToWeb() {
|
||||
this.webview.node.active = true;
|
||||
},
|
||||
|
||||
bindWebToMe() {
|
||||
var scheme = "nativechain";
|
||||
//这里是移动端, 接收web传过来的消息
|
||||
function jsCallback(target, url) {
|
||||
// 这里的返回值是内部页面的 URL 数值,需要自行解析自己需要的数据。
|
||||
var str = url.replace(scheme + "://", "");
|
||||
str = decodeURIComponent(str);
|
||||
let data = JSON.parse(str);
|
||||
// webview target
|
||||
console.log(JSON.stringify(data));
|
||||
}
|
||||
this.webview.setJavascriptInterfaceScheme(scheme);
|
||||
this.webview.setOnJSCallback(jsCallback);
|
||||
},
|
||||
callback(event) {
|
||||
console.log("webview on loaded");
|
||||
console.log(event);
|
||||
this.cocosToWeb();
|
||||
},
|
||||
|
||||
onWebFinishLoad: function (sender, event, customEventData) {
|
||||
if (event === cc.WebView.EventType.LOADED) {
|
||||
this.setDebugText("----webView---loaded---finish!!----");
|
||||
this.cocosToWeb();
|
||||
} else if (event === cc.WebView.EventType.LOADING) {
|
||||
this.setDebugText("----webView---loading----");
|
||||
} else if (event === cc.WebView.EventType.ERROR) {
|
||||
this.setDebugText("----webView---load---error----");
|
||||
}
|
||||
},
|
||||
|
||||
setDebugText(str) {
|
||||
console.log("DEBUG:", str);
|
||||
this.debugText.string = str;
|
||||
},
|
||||
});
|
9
assets/scripts/main.js.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "7dbf8a47-001f-4edb-bb30-d85963ff2e5a",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
7
assets/scripts/wallet.meta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "d85c213e-8347-4928-a93f-dc2999a8acc7",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
||||
}
|
78
assets/scripts/wallet/WalletController.ts
Normal file
@ -0,0 +1,78 @@
|
||||
import JCWallet from "../../comp/wallet/scripts/JCWallet";
|
||||
import sth = require("../../comp/wallet/scripts/lib/ethSigUtil");
|
||||
import { GET } from "../../comp/wallet/scripts/lib/Http";
|
||||
|
||||
const {ccclass, property} = cc._decorator;
|
||||
|
||||
const EIP721_DOMAIN_DATA = [
|
||||
{ name: 'name', type: 'string' },
|
||||
{ name: 'version', type: 'string' }
|
||||
]
|
||||
|
||||
|
||||
@ccclass
|
||||
export default class WalletController extends cc.Component {
|
||||
|
||||
private wallet: JCWallet
|
||||
|
||||
@property(cc.Node)
|
||||
private walletNode: cc.Node = null
|
||||
|
||||
// LIFE-CYCLE CALLBACKS:
|
||||
|
||||
// onLoad () {}
|
||||
|
||||
start () {
|
||||
this.walletNode.active = false;
|
||||
this.wallet = new JCWallet();
|
||||
console.log(this.wallet.currentAccount());
|
||||
}
|
||||
|
||||
// update (dt) {}
|
||||
testShowWallet() {
|
||||
this.walletNode.active = !this.walletNode.active
|
||||
}
|
||||
|
||||
async testSign() {
|
||||
// const nonce = Math.random() * 100000 | 0
|
||||
let account = this.wallet.currentAccount()
|
||||
let nonceUrlBase = 'https://market.cebg.games/webapp/index.php?c=Market&a=getNonce'
|
||||
let nonceUrl = `${nonceUrlBase}&account=${account.address}&net_id=322`
|
||||
let res = await GET(nonceUrl);
|
||||
let obj: any = {}
|
||||
obj = JSON.parse(res as string);
|
||||
const nonce = obj.nonce;
|
||||
console.log(res);
|
||||
const tips:string = 'signrequest'
|
||||
const signMsg = {
|
||||
tips,
|
||||
nonce
|
||||
}
|
||||
|
||||
const signObj = {
|
||||
types: {
|
||||
EIP712Domain: EIP721_DOMAIN_DATA,
|
||||
set: [
|
||||
{ name: 'tips', type: 'string' },
|
||||
{ name: 'nonce', type: 'string' }
|
||||
]
|
||||
},
|
||||
primaryType: 'set',
|
||||
domain: {
|
||||
name: 'Auth',
|
||||
version: '1'
|
||||
},
|
||||
message: signMsg
|
||||
}
|
||||
|
||||
let result = this.wallet.signTypedData(signObj)
|
||||
let resultAddress = this.wallet.recoverTypedSignature(signObj, result)
|
||||
console.log(`source address: ${account.address}`)
|
||||
console.log(`target address: ${resultAddress}`)
|
||||
console.log(`is same: ${account.address.toLowerCase() == resultAddress}`)
|
||||
let loginUrlBase = 'https://market.cebg.games/webapp/index.php?c=Market&a=auth'
|
||||
let loginUrl = `${loginUrlBase}&account=${account.address}&nonce=${nonce}&signature=${result}&tips=${tips.replaceAll('\ ', '+')}&net_id=322`
|
||||
let resLogin = await GET(loginUrl);
|
||||
console.log(resLogin);
|
||||
}
|
||||
}
|
9
assets/scripts/wallet/WalletController.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "87650c00-0709-4d03-a0aa-065400e7f07d",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
25085
creator.d.ts
vendored
Normal file
15
jsconfig.json
Executable file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es6",
|
||||
"module": "commonjs",
|
||||
"experimentalDecorators": true
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
".vscode",
|
||||
"library",
|
||||
"local",
|
||||
"settings",
|
||||
"temp"
|
||||
]
|
||||
}
|
7
project.json
Executable file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"engine": "cocos-creator-js",
|
||||
"packages": "packages",
|
||||
"name": "TestChain",
|
||||
"id": "a5cfd15d-8ef8-4620-9d33-562f85f39e89",
|
||||
"version": "2.0.10"
|
||||
}
|
50
settings/builder.json
Normal file
@ -0,0 +1,50 @@
|
||||
{
|
||||
"android-instant": {
|
||||
"REMOTE_SERVER_ROOT": "",
|
||||
"host": "",
|
||||
"pathPattern": "",
|
||||
"recordPath": "",
|
||||
"scheme": "https",
|
||||
"skipRecord": false
|
||||
},
|
||||
"appBundle": false,
|
||||
"baidugame": {
|
||||
"REMOTE_SERVER_ROOT": "",
|
||||
"appid": "testappid",
|
||||
"orientation": "portrait",
|
||||
"subContext": ""
|
||||
},
|
||||
"encryptJs": false,
|
||||
"excludeScenes": [],
|
||||
"fb-instant-games": {},
|
||||
"includeSDKBox": false,
|
||||
"inlineSpriteFrames": true,
|
||||
"inlineSpriteFrames_native": true,
|
||||
"md5Cache": true,
|
||||
"mergeStartScene": false,
|
||||
"optimizeHotUpdate": true,
|
||||
"orientation": {
|
||||
"landscapeLeft": false,
|
||||
"landscapeRight": false,
|
||||
"portrait": true,
|
||||
"upsideDown": false
|
||||
},
|
||||
"packageName": "org.cocos2d.TestChain",
|
||||
"qqplay": {
|
||||
"REMOTE_SERVER_ROOT": "",
|
||||
"orientation": "portrait",
|
||||
"zip": false
|
||||
},
|
||||
"startScene": "05b529fc-da20-4b22-8530-53eef09b4379",
|
||||
"title": "TestChain",
|
||||
"webOrientation": "auto",
|
||||
"wechatgame": {
|
||||
"REMOTE_SERVER_ROOT": "",
|
||||
"appid": "wx6ac3f5090a6b99c5",
|
||||
"orientation": "portrait",
|
||||
"separate_engine": false,
|
||||
"subContext": ""
|
||||
},
|
||||
"xxteaKey": "5d3547cc-e724-47",
|
||||
"zipCompressJs": true
|
||||
}
|
56
settings/project.json
Normal file
@ -0,0 +1,56 @@
|
||||
{
|
||||
"assets-sort-type": "name",
|
||||
"collision-matrix": [
|
||||
[
|
||||
true
|
||||
]
|
||||
],
|
||||
"design-resolution-height": 512,
|
||||
"design-resolution-width": 1024,
|
||||
"excluded-modules": [
|
||||
"ParticleSystem",
|
||||
"TiledMap",
|
||||
"Spine Skeleton",
|
||||
"DragonBones",
|
||||
"MotionStreak",
|
||||
"Widget",
|
||||
"ProgressBar",
|
||||
"ScrollBar",
|
||||
"ScrollView",
|
||||
"Toggle",
|
||||
"PageView",
|
||||
"PageViewIndicator",
|
||||
"VideoPlayer",
|
||||
"Audio",
|
||||
"AudioSource",
|
||||
"Animation",
|
||||
"Collider",
|
||||
"Action",
|
||||
"Physics",
|
||||
"NodePool"
|
||||
],
|
||||
"facebook": {
|
||||
"appID": "",
|
||||
"audience": {
|
||||
"enable": false
|
||||
},
|
||||
"enable": false,
|
||||
"live": {
|
||||
"enable": false
|
||||
}
|
||||
},
|
||||
"fit-height": false,
|
||||
"fit-width": true,
|
||||
"group-list": [
|
||||
"default"
|
||||
],
|
||||
"last-module-event-record-time": 1655089658036,
|
||||
"simulator-orientation": false,
|
||||
"simulator-resolution": {
|
||||
"height": 640,
|
||||
"width": 960
|
||||
},
|
||||
"use-customize-simulator": true,
|
||||
"use-project-simulator-setting": false,
|
||||
"start-scene": "current"
|
||||
}
|
586
settings/services.json
Normal file
@ -0,0 +1,586 @@
|
||||
{
|
||||
"services": [
|
||||
{
|
||||
"service_id": "315",
|
||||
"service_name": "易盾",
|
||||
"service_icon": "https://download.cocos.com/CocosUdc/client/ba8776b5e3/c14b56b30d2b156c2682cb820c7f55b1.png",
|
||||
"service_desc": "为开发者提供游戏包体加固及游戏反外挂能力,开发者构建过程中自助完成SDK集成、构建完成后一键式进行包体加固,开发者无需再为游戏安全防护进行额外开发工作,可以专注于游戏业务,轻松搭建游戏防御体系。支持全平台:Android、iOS、H5。",
|
||||
"service_title": "提供游戏包体加固、反外挂一站式服务",
|
||||
"service_guide_url": "https://service.cocos.com/document/zh/neteaseyidun.html",
|
||||
"service_sample_url": "https://github.com/CocosService/neteaseDemo",
|
||||
"service_dev_url": "https://service.cocos.com/serviceConsole/jump?client_id=315&app_id=<app_id>&language=zh",
|
||||
"service_type": "3",
|
||||
"service_type_zh": "公司和个人游戏",
|
||||
"support_platform": [
|
||||
"安卓",
|
||||
"iOS"
|
||||
],
|
||||
"package_download_url": "https://download.cocos.com/CocosUdc/plugins/service-neteaseyidun/0.5.3_5.0.4_1.7.1.3.zip",
|
||||
"package_version_desc": "<p><strong>更新日期:</strong> 2021/11/15<br />\n<strong>更新说明:</strong><br />\n1.改为 WEBVIEW 的方式打开注册页面取代浏览器<br />\n2.注册时自动帮助用户填写公司名称和手机号等字段(由用户 Cocos 账号获取)<br />\n",
|
||||
"service_component_name": "service-neteaseyidun",
|
||||
"package_versions": [
|
||||
"0.5.2_5.0.4_1.7.1.3",
|
||||
"0.5.3_5.0.4_1.7.1.3"
|
||||
],
|
||||
"build_platform": [],
|
||||
"require_verify": 1,
|
||||
"service_price": "",
|
||||
"service_protocol": "游戏首次开启该服务时,Cocos会后台通知服务方为游戏开通服务并初始化参数,服务方根据需要可能会获取您的Cocos账户信息,包括账户基本资料、游戏基本资料、账户余额等,点击确认开通按钮即视为您同意该服务访问您的账户信息,详见<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_User_Service_Agreement_cn_20200904.html'>《Cocos用户服务协议》</a>和<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_Privacy_Policy_cn_20200904.html'>《Cocos隐私政策》</a>",
|
||||
"service_group": "",
|
||||
"service_group_id": "",
|
||||
"not_service": false
|
||||
},
|
||||
{
|
||||
"service_id": "235",
|
||||
"service_name": "Cocos Analytics",
|
||||
"service_icon": "https://download.cocos.com/CocosUdc/client/dae922b126/1eb776afa85e5ae6dd17fd1939a12948.png",
|
||||
"service_desc": "帮助管理者、产品、运营、开发等多角色,精准有效了解产品情况,更高效的获取目标客户,实现业务增长。",
|
||||
"service_title": "精准了解游戏的新增、活跃、留存、付费等数据",
|
||||
"service_guide_url": "https://n-analytics.cocos.com/docs",
|
||||
"service_sample_url": "https://github.com/CocosService/cocosAnalyticsDemo",
|
||||
"service_dev_url": "https://service.cocos.com/serviceConsole/jump?client_id=235&app_id=<app_id>&language=zh",
|
||||
"service_type": "3",
|
||||
"service_type_zh": "公司和个人游戏",
|
||||
"support_platform": [
|
||||
"安卓",
|
||||
"iOS",
|
||||
"H5"
|
||||
],
|
||||
"package_download_url": "https://download.cocos.com/CocosUdc/plugins/service-analytics/1.3.7_2.2.1.zip",
|
||||
"package_version_desc": "<p><strong>更新日期:</strong> 2020/11/25<br />\n<strong>更新说明:</strong><br />\n1.在渠道不匹配的情况下,仅提示、不覆盖用户选择的渠道。<br />\n",
|
||||
"service_component_name": "service-analytics",
|
||||
"package_versions": [
|
||||
"1.0.0_1.0.5",
|
||||
"1.1.2_2.0.0",
|
||||
"1.1.3_2.0.1",
|
||||
"1.1.4_2.0.1",
|
||||
"1.1.5_2.0.1",
|
||||
"1.1.6_2.0.1_2.0.2",
|
||||
"1.1.7_2.0.3",
|
||||
"1.2.0_2.1.0",
|
||||
"1.2.3_2.1.1",
|
||||
"1.2.5_2.1.1",
|
||||
"1.2.6_2.1.1",
|
||||
"1.2.7_2.1.2",
|
||||
"1.2.8_2.1.3",
|
||||
"1.2.9_2.2.0",
|
||||
"1.3.5_2.2.1",
|
||||
"1.3.7_2.2.1"
|
||||
],
|
||||
"build_platform": [],
|
||||
"require_verify": 0,
|
||||
"service_price": "",
|
||||
"service_protocol": "游戏首次开启该服务时,Cocos会后台通知服务方为游戏开通服务并初始化参数,服务方根据需要可能会获取您的Cocos账户信息,包括账户基本资料、游戏基本资料、账户余额等,点击确认开通按钮即视为您同意该服务访问您的账户信息,详见<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_User_Service_Agreement_cn_20200904.html'>《Cocos用户服务协议》</a>和<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_Privacy_Policy_cn_20200904.html'>《Cocos隐私政策》</a>",
|
||||
"service_group": "",
|
||||
"service_group_id": "",
|
||||
"not_service": false
|
||||
},
|
||||
{
|
||||
"service_id": "242",
|
||||
"service_name": "Agora RTC",
|
||||
"service_icon": "https://download.cocos.com/CocosUdc/client/0ed3b350b5/273952d155b4cdb72d2b1bc61de91ade.png",
|
||||
"service_desc": "稳定、低耗、76ms超低延时、全球200+数据中心覆盖;变声器、超高音质、听声辩位等丰富玩法极速接入;全平台支持:Android、iOS、Web。",
|
||||
"service_title": "游戏内置实时音视频",
|
||||
"service_guide_url": "https://service.cocos.com/document/zh/agora.html",
|
||||
"service_sample_url": "https://github.com/AgoraIO-Community/Agora-Cocos-Quickstart/tree/master/CocosCreator",
|
||||
"service_dev_url": "https://service.cocos.com/serviceConsole/jump?client_id=242&app_id=<app_id>&language=zh",
|
||||
"service_type": "3",
|
||||
"service_type_zh": "公司和个人游戏",
|
||||
"support_platform": [
|
||||
"安卓",
|
||||
"iOS",
|
||||
"H5"
|
||||
],
|
||||
"package_download_url": "https://download.cocos.com/CocosUdc/plugins/service-agora/1.3.2_3.4.6_3.6.2.zip",
|
||||
"package_version_desc": "<p><strong>更新日期:</strong> 2021/08/19<br />\n<strong>更新说明:</strong><br />\n修复iOS15不兼容问题<br />\n",
|
||||
"service_component_name": "service-agora",
|
||||
"package_versions": [
|
||||
"1.0.1_2.2.3.20_2.5.2",
|
||||
"1.0.2_2.2.3.20_2.5.2",
|
||||
"1.1.0_2.2.3.20_2.5.2",
|
||||
"1.2.1_3.1.2",
|
||||
"1.3.1_3.1",
|
||||
"1.3.2_3.4.6_3.6.2"
|
||||
],
|
||||
"build_platform": [],
|
||||
"require_verify": 1,
|
||||
"service_price": "该服务按使用量计费,为开发者提供一定的免费额度,超出免费额度将进行收费,详情请看 <a href='https://cloud.tencent.com/document/product/876/18864'><font color='#dddddd'>计费规则</font></a>,所产生的费用将从您的<a href='https://service.cocos.com/console/#/surplus'> <font color='#DDDDDD'> Cocos 账户余额 </font></a>代扣。",
|
||||
"service_protocol": "游戏首次开启该服务时,Cocos会后台通知服务方为游戏开通服务并初始化参数,服务方根据需要可能会获取您的Cocos账户信息,包括账户基本资料、游戏基本资料、账户余额等,点击确认开通按钮即视为您同意该服务访问您的账户信息,详见<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_User_Service_Agreement_cn_20200904.html'>《Cocos用户服务协议》</a>和<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_Privacy_Policy_cn_20200904.html'>《Cocos隐私政策》</a>",
|
||||
"service_group": "",
|
||||
"service_group_id": "",
|
||||
"not_service": false
|
||||
},
|
||||
{
|
||||
"service_id": "278",
|
||||
"service_name": "Cocos SDKHub",
|
||||
"service_icon": "https://download.cocos.com/CocosUdc/client/dae922b126/63f4169359e77ff35d9287c1a9506efb.png",
|
||||
"service_desc": "帮助游戏快速集成渠道SDK",
|
||||
"service_title": "帮助游戏快速集成渠道SDK",
|
||||
"service_guide_url": "https://service.cocos.com/document/zh/sdkhub.html",
|
||||
"service_sample_url": "https://github.com/CocosService/sdkhubDemo",
|
||||
"service_dev_url": "",
|
||||
"service_type": "3",
|
||||
"service_type_zh": "公司和个人游戏",
|
||||
"support_platform": [
|
||||
"安卓"
|
||||
],
|
||||
"package_download_url": "https://download.cocos.com/CocosUdc/plugins/service-sdkhub/0.6.9_0.1.1.zip",
|
||||
"package_version_desc": "<p><strong>更新日期:</strong> 2021/07/30<br />\n<strong>更新说明:</strong><br />\n1.升级 Android min version 至 21<br />\n",
|
||||
"service_component_name": "service-sdkhub",
|
||||
"package_versions": [
|
||||
"0.6.1_0.1.0",
|
||||
"0.6.2_0.1.0",
|
||||
"0.6.4_0.1.1",
|
||||
"0.6.5_0.1.1",
|
||||
"0.6.6_0.1.1",
|
||||
"0.6.8_0.1.1",
|
||||
"0.6.9_0.1.1"
|
||||
],
|
||||
"build_platform": [],
|
||||
"require_verify": 0,
|
||||
"service_price": "",
|
||||
"service_protocol": "游戏首次开启该服务时,Cocos会后台通知服务方为游戏开通服务并初始化参数,服务方根据需要可能会获取您的Cocos账户信息,包括账户基本资料、游戏基本资料、账户余额等,点击确认开通按钮即视为您同意该服务访问您的账户信息,详见<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_User_Service_Agreement_cn_20200904.html'>《Cocos用户服务协议》</a>和<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_Privacy_Policy_cn_20200904.html'>《Cocos隐私政策》</a>",
|
||||
"service_group": "",
|
||||
"service_group_id": "",
|
||||
"not_service": false
|
||||
},
|
||||
{
|
||||
"service_id": "301",
|
||||
"service_name": "定位服务",
|
||||
"service_icon": "https://download.cocos.com/CocosUdc/client/e8b3ed0ab3/11e7f4732119ae233a205ec417cfa43d.png",
|
||||
"service_desc": "华为定位服务(HUAWEI Location Kit)采用GPS、Wi-Fi、基站等多途径的混合定位模式进行定位,赋予应用开发者快速、精准地获取用户位置信息的能力。当前主要能力包含三个部分:融合定位、活动识别和地理围栏。",
|
||||
"service_title": "赋予应用开发者快速、精准地获取用户位置信息的能力",
|
||||
"service_guide_url": "https://service.cocos.com/document/zh/hms-location.html",
|
||||
"service_sample_url": "https://github.com/CocosService/HUAWEIDemo",
|
||||
"service_dev_url": "https://service.cocos.com/serviceConsole/jump?client_id=301&app_id=<app_id>&language=zh",
|
||||
"service_type": "3",
|
||||
"service_type_zh": "公司和个人游戏",
|
||||
"support_platform": [
|
||||
"安卓"
|
||||
],
|
||||
"package_download_url": "https://download.cocos.com/CocosUdc/plugins/service-hmslocation/0.5.9_6.4.0.zip",
|
||||
"package_version_desc": "<p>升级定位工具包版本。<br />\n",
|
||||
"service_component_name": "service-hmslocation",
|
||||
"package_versions": [
|
||||
"0.5.6_4.0.4",
|
||||
"0.5.8_5.0.2",
|
||||
"0.5.9_6.4.0"
|
||||
],
|
||||
"build_platform": [],
|
||||
"require_verify": 0,
|
||||
"service_price": "",
|
||||
"service_protocol": "游戏首次开启该服务时,Cocos会后台通知服务方为游戏开通服务并初始化参数,服务方根据需要可能会获取您的Cocos账户信息,包括账户基本资料、游戏基本资料、账户余额等,点击确认开通按钮即视为您同意该服务访问您的账户信息,详见<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_User_Service_Agreement_cn_20200904.html'>《Cocos用户服务协议》</a>和<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_Privacy_Policy_cn_20200904.html'>《Cocos隐私政策》</a>",
|
||||
"service_group": "HUAWEI HMS Core",
|
||||
"service_group_id": "",
|
||||
"not_service": false
|
||||
},
|
||||
{
|
||||
"service_id": "302",
|
||||
"service_name": "分析服务",
|
||||
"service_icon": "https://download.cocos.com/CocosUdc/client/e8b3ed0ab3/b134fdbad8be336fb4bbcaef240c99c2.png",
|
||||
"service_desc": "分析服务(Analytics Kit)预置大量分析模型,可帮助您清晰地了解用户的行为方式,从而实现用户、产品、内容的深度洞察,让您实现基于数据驱动的运营,可以就应用营销和产品优化制定明智的决策。",
|
||||
"service_title": "预置大量分析模型,可帮助您清晰地了解用户的行为方式",
|
||||
"service_guide_url": "https://service.cocos.com/document/zh/hms-analytics.html",
|
||||
"service_sample_url": "https://github.com/CocosService/HUAWEIDemo",
|
||||
"service_dev_url": "https://service.cocos.com/serviceConsole/jump?client_id=302&app_id=<app_id>&language=zh",
|
||||
"service_type": "3",
|
||||
"service_type_zh": "公司和个人游戏",
|
||||
"support_platform": [
|
||||
"安卓"
|
||||
],
|
||||
"package_download_url": "https://download.cocos.com/CocosUdc/plugins/service-hmsanalytics/0.5.9_6.4.1.302.zip",
|
||||
"package_version_desc": "<p>升级分析工具包版本。<br />\n",
|
||||
"service_component_name": "service-hmsanalytics",
|
||||
"package_versions": [
|
||||
"0.5.3_5.0.1",
|
||||
"0.5.5_5.0.5.301",
|
||||
"0.5.7_5.0.5.301",
|
||||
"0.5.8_5.0.5.301",
|
||||
"0.5.9_6.4.1.302"
|
||||
],
|
||||
"build_platform": [],
|
||||
"require_verify": 0,
|
||||
"service_price": "",
|
||||
"service_protocol": "游戏首次开启该服务时,Cocos会后台通知服务方为游戏开通服务并初始化参数,服务方根据需要可能会获取您的Cocos账户信息,包括账户基本资料、游戏基本资料、账户余额等,点击确认开通按钮即视为您同意该服务访问您的账户信息,详见<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_User_Service_Agreement_cn_20200904.html'>《Cocos用户服务协议》</a>和<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_Privacy_Policy_cn_20200904.html'>《Cocos隐私政策》</a>",
|
||||
"service_group": "HUAWEI HMS Core",
|
||||
"service_group_id": "",
|
||||
"not_service": false
|
||||
},
|
||||
{
|
||||
"service_id": "303",
|
||||
"service_name": "性能管理",
|
||||
"service_icon": "https://download.cocos.com/CocosUdc/client/e8b3ed0ab3/46053c315d7c023d22b87fb78fa03e0d.png",
|
||||
"service_desc": "性能管理(APM,App Performance Management)服务提供分钟级应用性能监控能力,开发者可以在AGC查看和分析APM收集到的应用性能数据,从而全面了解所开发应用的性能特点,快速精准修复应用存在的性能问题,持续提升应用的用户体验。",
|
||||
"service_title": "提供分钟级应用性能监控能力,收集应用性能数据",
|
||||
"service_guide_url": "https://service.cocos.com/document/zh/agc-apm.html",
|
||||
"service_sample_url": "https://github.com/CocosService/HUAWEIDemo",
|
||||
"service_dev_url": "https://service.cocos.com/serviceConsole/jump?client_id=303&app_id=<app_id>&language=zh",
|
||||
"service_type": "3",
|
||||
"service_type_zh": "公司和个人游戏",
|
||||
"support_platform": [
|
||||
"安卓"
|
||||
],
|
||||
"package_download_url": "https://download.cocos.com/CocosUdc/plugins/service-agcapms/0.5.6_1.5.2.300.zip",
|
||||
"package_version_desc": "<p>1、更新 AGC SDK 版本到 v1.6.0.300<br />\n",
|
||||
"service_component_name": "service-agcapms",
|
||||
"package_versions": [
|
||||
"0.5.1_1.3.1",
|
||||
"0.5.2_1.3.1.300",
|
||||
"0.5.3_1.5.2.300",
|
||||
"0.5.4_1.5.2.300",
|
||||
"0.5.6_1.5.2.300"
|
||||
],
|
||||
"build_platform": [],
|
||||
"require_verify": 0,
|
||||
"service_price": "",
|
||||
"service_protocol": "游戏首次开启该服务时,Cocos会后台通知服务方为游戏开通服务并初始化参数,服务方根据需要可能会获取您的Cocos账户信息,包括账户基本资料、游戏基本资料、账户余额等,点击确认开通按钮即视为您同意该服务访问您的账户信息,详见<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_User_Service_Agreement_cn_20200904.html'>《Cocos用户服务协议》</a>和<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_Privacy_Policy_cn_20200904.html'>《Cocos隐私政策》</a>",
|
||||
"service_group": "HUAWEI AppGallery Connect",
|
||||
"service_group_id": "1001",
|
||||
"not_service": false
|
||||
},
|
||||
{
|
||||
"service_id": "304",
|
||||
"service_name": "认证服务",
|
||||
"service_icon": "https://download.cocos.com/CocosUdc/client/e8b3ed0ab3/87fab3ee7098640a3a6bcaf9b6d41f31.png",
|
||||
"service_desc": "AppGallery Connect认证服务支持多种认证方式,并与其他Serverless服务紧密集成,您可以通过简单的规则定义来保护您的用户的数据安全。",
|
||||
"service_title": "基于预构建的托管式认证系统,更有效率地保护您的移动和Web用户的数据安全。",
|
||||
"service_guide_url": "https://service.cocos.com/document/zh/agc-auth.html",
|
||||
"service_sample_url": "https://github.com/CocosService/HUAWEIDemo",
|
||||
"service_dev_url": "https://service.cocos.com/serviceConsole/jump?client_id=304&app_id=<app_id>&language=zh",
|
||||
"service_type": "3",
|
||||
"service_type_zh": "公司和个人游戏",
|
||||
"support_platform": [
|
||||
"安卓"
|
||||
],
|
||||
"package_download_url": "https://download.cocos.com/CocosUdc/plugins/service-agcauth/0.5.6_1.6.0.300.zip",
|
||||
"package_version_desc": "<p>1、更新 AGC SDK 版本到 v1.6.0.300<br />\n2、更新 service SDK 版本到 v1.6.0.300<br />\n",
|
||||
"service_component_name": "service-agcauth",
|
||||
"package_versions": [
|
||||
"0.5.1_1.3.1",
|
||||
"0.5.2_1.4.1.300",
|
||||
"0.5.3_1.4.1.300",
|
||||
"0.5.6_1.6.0.300"
|
||||
],
|
||||
"build_platform": [],
|
||||
"require_verify": 0,
|
||||
"service_price": "",
|
||||
"service_protocol": "游戏首次开启该服务时,Cocos会后台通知服务方为游戏开通服务并初始化参数,服务方根据需要可能会获取您的Cocos账户信息,包括账户基本资料、游戏基本资料、账户余额等,点击确认开通按钮即视为您同意该服务访问您的账户信息,详见<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_User_Service_Agreement_cn_20200904.html'>《Cocos用户服务协议》</a>和<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_Privacy_Policy_cn_20200904.html'>《Cocos隐私政策》</a>",
|
||||
"service_group": "HUAWEI AppGallery Connect",
|
||||
"service_group_id": "1001",
|
||||
"not_service": false
|
||||
},
|
||||
{
|
||||
"service_id": "305",
|
||||
"service_name": "崩溃服务",
|
||||
"service_icon": "https://download.cocos.com/CocosUdc/client/e8b3ed0ab3/8ea2f92ed25f2b15c194f1687d55f53e.png",
|
||||
"service_desc": "崩溃服务是一个轻量级崩溃分析服务,它为您提供了 Crash SDK,可以零代码快速集成。您可以通过崩溃报告了解您的应用崩溃情况,我们提供最近 1 小时的实时报告,您可以实时监测应用质量",
|
||||
"service_title": "实时数据报告,多维度分析,快速解决崩溃问题。",
|
||||
"service_guide_url": "https://service.cocos.com/document/zh/agc-crash.html",
|
||||
"service_sample_url": "https://github.com/CocosService/HUAWEIDemo",
|
||||
"service_dev_url": "https://service.cocos.com/serviceConsole/jump?client_id=305&app_id=<app_id>&language=zh",
|
||||
"service_type": "3",
|
||||
"service_type_zh": "公司和个人游戏",
|
||||
"support_platform": [
|
||||
"安卓"
|
||||
],
|
||||
"package_download_url": "https://download.cocos.com/CocosUdc/plugins/service-agccrash/0.5.8_1.6.0.300.zip",
|
||||
"package_version_desc": "<p>1、更新 AGC SDK 版本到 v1.6.0.300<br />\n2、更新 service SDK 版本到 v1.6.0.300<br />\n",
|
||||
"service_component_name": "service-agccrash",
|
||||
"package_versions": [
|
||||
"0.5.3_1.3.2",
|
||||
"0.5.5_1.4.1.300",
|
||||
"0.5.8_1.6.0.300"
|
||||
],
|
||||
"build_platform": [],
|
||||
"require_verify": 0,
|
||||
"service_price": "",
|
||||
"service_protocol": "游戏首次开启该服务时,Cocos会后台通知服务方为游戏开通服务并初始化参数,服务方根据需要可能会获取您的Cocos账户信息,包括账户基本资料、游戏基本资料、账户余额等,点击确认开通按钮即视为您同意该服务访问您的账户信息,详见<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_User_Service_Agreement_cn_20200904.html'>《Cocos用户服务协议》</a>和<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_Privacy_Policy_cn_20200904.html'>《Cocos隐私政策》</a>",
|
||||
"service_group": "HUAWEI AppGallery Connect",
|
||||
"service_group_id": "1001",
|
||||
"not_service": false
|
||||
},
|
||||
{
|
||||
"service_id": "306",
|
||||
"service_name": "App Linking",
|
||||
"service_icon": "https://download.cocos.com/CocosUdc/client/e8b3ed0ab3/c6f540a4b1f061a3aa552e1875dd8bc2.png",
|
||||
"service_desc": "App Linking是一种无论应用是否已经安装都可以按照所需方式工作的跨平台链接,创建App Linking后将链接地址多渠道分发,用户点击链接后即可跳转到链接指定的内容,有长链接和短链接之分。",
|
||||
"service_title": "跨平台深度链接直达应用内内容,推动应用增长。",
|
||||
"service_guide_url": "https://service.cocos.com/document/zh/agc-applinking.html",
|
||||
"service_sample_url": "https://github.com/CocosService/HUAWEIDemo",
|
||||
"service_dev_url": "https://service.cocos.com/serviceConsole/jump?client_id=306&app_id=<app_id>&language=zh",
|
||||
"service_type": "3",
|
||||
"service_type_zh": "公司和个人游戏",
|
||||
"support_platform": [
|
||||
"安卓"
|
||||
],
|
||||
"package_download_url": "https://download.cocos.com/CocosUdc/plugins/service-agcapplinking/0.6.2_1.6.0.300.zip",
|
||||
"package_version_desc": "<p>1、更新 AGC SDK 版本到 v1.6.0.300<br />\n2、更新 service SDK 版本到 v1.6.0.300<br />\n",
|
||||
"service_component_name": "service-agcapplinking",
|
||||
"package_versions": [
|
||||
"0.5.2_1.3.2",
|
||||
"0.5.4_1.3.2",
|
||||
"0.5.7_1.4.1.300",
|
||||
"0.5.9_1.4.1.300",
|
||||
"0.6.0_1.4.2.301",
|
||||
"0.6.2_1.6.0.300"
|
||||
],
|
||||
"build_platform": [],
|
||||
"require_verify": 0,
|
||||
"service_price": "",
|
||||
"service_protocol": "游戏首次开启该服务时,Cocos会后台通知服务方为游戏开通服务并初始化参数,服务方根据需要可能会获取您的Cocos账户信息,包括账户基本资料、游戏基本资料、账户余额等,点击确认开通按钮即视为您同意该服务访问您的账户信息,详见<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_User_Service_Agreement_cn_20200904.html'>《Cocos用户服务协议》</a>和<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_Privacy_Policy_cn_20200904.html'>《Cocos隐私政策》</a>",
|
||||
"service_group": "HUAWEI AppGallery Connect",
|
||||
"service_group_id": "1001",
|
||||
"not_service": false
|
||||
},
|
||||
{
|
||||
"service_id": "307",
|
||||
"service_name": "应用内消息",
|
||||
"service_icon": "https://download.cocos.com/CocosUdc/client/e8b3ed0ab3/8d648e354363686963ad739c5ae31113.png",
|
||||
"service_desc": "应用内消息服务(App Messaging),实现用户使用应用时,向活跃用户发送有针对性的消息来鼓励用户使用应用的关键功能,从而吸引这些用户。例如,通过应用内消息,您可以鼓励用户订阅、给出某个关卡的通过提示,或者推荐某个餐厅活动。",
|
||||
"service_title": "基于用户使用情境发送上下文相关消息,增强用户粘性。",
|
||||
"service_guide_url": "https://service.cocos.com/document/zh/agc-appmessaging.html",
|
||||
"service_sample_url": "https://github.com/CocosService/HUAWEIDemo",
|
||||
"service_dev_url": "https://service.cocos.com/serviceConsole/jump?client_id=307&app_id=<app_id>&language=zh",
|
||||
"service_type": "3",
|
||||
"service_type_zh": "公司和个人游戏",
|
||||
"support_platform": [
|
||||
"安卓"
|
||||
],
|
||||
"package_download_url": "https://download.cocos.com/CocosUdc/plugins/service-agcappmessaging/0.6.0_1.6.0.300.zip",
|
||||
"package_version_desc": "<p>1、更新 AGC SDK 版本到 v1.6.0.300<br />\n2、更新 service SDK 版本到 v1.6.0.300<br />\n",
|
||||
"service_component_name": "service-agcappmessaging",
|
||||
"package_versions": [
|
||||
"0.5.2_1.4.0",
|
||||
"0.5.3_1.4.0",
|
||||
"0.5.3_1.4.0",
|
||||
"0.5.6_1.4.2.301",
|
||||
"0.6.0_1.6.0.300"
|
||||
],
|
||||
"build_platform": [],
|
||||
"require_verify": 0,
|
||||
"service_price": "",
|
||||
"service_protocol": "游戏首次开启该服务时,Cocos会后台通知服务方为游戏开通服务并初始化参数,服务方根据需要可能会获取您的Cocos账户信息,包括账户基本资料、游戏基本资料、账户余额等,点击确认开通按钮即视为您同意该服务访问您的账户信息,详见<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_User_Service_Agreement_cn_20200904.html'>《Cocos用户服务协议》</a>和<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_Privacy_Policy_cn_20200904.html'>《Cocos隐私政策》</a>",
|
||||
"service_group": "HUAWEI AppGallery Connect",
|
||||
"service_group_id": "1001",
|
||||
"not_service": false
|
||||
},
|
||||
{
|
||||
"service_id": "308",
|
||||
"service_name": "远程配置",
|
||||
"service_icon": "https://download.cocos.com/CocosUdc/client/e8b3ed0ab3/cb1415def30cb297a226334a4c8866c1.png",
|
||||
"service_desc": "AppGallery Connect远程配置服务提供了在线的配置项管理能力,可以实现应用在线更改行为和外观,而无需用户下载应用更新。",
|
||||
"service_title": "无需升级引用,也可灵活修改应用的行为和外观",
|
||||
"service_guide_url": "https://service.cocos.com/document/zh/agc-remote.html",
|
||||
"service_sample_url": "https://github.com/CocosService/HUAWEIDemo",
|
||||
"service_dev_url": "https://service.cocos.com/serviceConsole/jump?client_id=308&app_id=<app_id>&language=zh",
|
||||
"service_type": "3",
|
||||
"service_type_zh": "公司和个人游戏",
|
||||
"support_platform": [
|
||||
"安卓"
|
||||
],
|
||||
"package_download_url": "https://download.cocos.com/CocosUdc/plugins/service-agcremoteconfig/0.5.3_1.6.0.300.zip",
|
||||
"package_version_desc": "<p>1、更新 AGC SDK 版本到 v1.6.0.300<br />\n2、更新 service SDK 版本到 v1.6.0.300<br />\n",
|
||||
"service_component_name": "service-agcremoteconfig",
|
||||
"package_versions": [
|
||||
"0.5.0_1.4.0",
|
||||
"0.5.1_1.4.1.300",
|
||||
"0.5.3_1.6.0.300"
|
||||
],
|
||||
"build_platform": [],
|
||||
"require_verify": 0,
|
||||
"service_price": "",
|
||||
"service_protocol": "游戏首次开启该服务时,Cocos会后台通知服务方为游戏开通服务并初始化参数,服务方根据需要可能会获取您的Cocos账户信息,包括账户基本资料、游戏基本资料、账户余额等,点击确认开通按钮即视为您同意该服务访问您的账户信息,详见<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_User_Service_Agreement_cn_20200904.html'>《Cocos用户服务协议》</a>和<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_Privacy_Policy_cn_20200904.html'>《Cocos隐私政策》</a>",
|
||||
"service_group": "HUAWEI AppGallery Connect",
|
||||
"service_group_id": "1001",
|
||||
"not_service": false
|
||||
},
|
||||
{
|
||||
"service_id": "309",
|
||||
"service_name": "云存储",
|
||||
"service_icon": "https://download.cocos.com/CocosUdc/client/e8b3ed0ab3/477f8cf2c59e70144f7c7060fa8710df.png",
|
||||
"service_desc": "云存储是专为开发者打造的可伸缩、免维护的云端存储服务,您可以用于存储图片、音频、视频或其他由用户生成的内容。",
|
||||
"service_title": "跨平台提供高效经济的文件上传下载服务",
|
||||
"service_guide_url": "https://service.cocos.com/document/zh/agc-cloudstorage.html",
|
||||
"service_sample_url": "https://github.com/CocosService/HUAWEIDemo",
|
||||
"service_dev_url": "https://service.cocos.com/serviceConsole/jump?client_id=309&app_id=<app_id>&language=zh",
|
||||
"service_type": "3",
|
||||
"service_type_zh": "公司和个人游戏",
|
||||
"support_platform": [
|
||||
"安卓"
|
||||
],
|
||||
"package_download_url": "https://download.cocos.com/CocosUdc/plugins/service-agcstorage/0.5.4_1.4.0.100.zip",
|
||||
"package_version_desc": "<p>1、更新 AGC SDK 版本到 v1.6.0.300<br />\n",
|
||||
"service_component_name": "service-agcstorage",
|
||||
"package_versions": [
|
||||
"0.5.1_1.3.0.300",
|
||||
"0.5.2_1.3.1.100",
|
||||
"0.5.4_1.4.0.100"
|
||||
],
|
||||
"build_platform": [],
|
||||
"require_verify": 0,
|
||||
"service_price": "",
|
||||
"service_protocol": "游戏首次开启该服务时,Cocos会后台通知服务方为游戏开通服务并初始化参数,服务方根据需要可能会获取您的Cocos账户信息,包括账户基本资料、游戏基本资料、账户余额等,点击确认开通按钮即视为您同意该服务访问您的账户信息,详见<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_User_Service_Agreement_cn_20200904.html'>《Cocos用户服务协议》</a>和<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_Privacy_Policy_cn_20200904.html'>《Cocos隐私政策》</a>",
|
||||
"service_group": "HUAWEI AppGallery Connect",
|
||||
"service_group_id": "1001",
|
||||
"not_service": false
|
||||
},
|
||||
{
|
||||
"service_id": "311",
|
||||
"service_name": "云数据库",
|
||||
"service_icon": "https://download.cocos.com/CocosUdc/client/e8b3ed0ab3/dd6263d489cf79ef7cc4ec8e59f5ca17.png",
|
||||
"service_desc": "Cloud DB 是一款端云协同的数据库产品,提供端云数据的协同管理、统一的数据模型和丰富的数据管理 API 接口等能力。在保证数据的可用性、可靠性、一致性,以及安全等特性基础上,能够实现数据在客户端和云端之间的无缝同步,并为应用提供离线支持,以帮助开发者快速构建端云、多端协同的应用。",
|
||||
"service_title": "安全可信的数据管理服务",
|
||||
"service_guide_url": "https://service.cocos.com/document/zh/agc-clouddb.html",
|
||||
"service_sample_url": "https://github.com/CocosService/HUAWEIDemo",
|
||||
"service_dev_url": "https://service.cocos.com/serviceConsole/jump?client_id=311&app_id=<app_id>&language=zh",
|
||||
"service_type": "3",
|
||||
"service_type_zh": "公司和个人游戏",
|
||||
"support_platform": [
|
||||
"安卓"
|
||||
],
|
||||
"package_download_url": "https://download.cocos.com/CocosUdc/plugins/service-agcclouddb/0.5.7_1.2.3.301.zip",
|
||||
"package_version_desc": "<p>1、更新 AGC SDK 版本到 v1.6.0.300<br />\n",
|
||||
"service_component_name": "service-agcclouddb",
|
||||
"package_versions": [
|
||||
"0.5.1_1.2.1.301",
|
||||
"0.5.3_1.2.3.301",
|
||||
"0.5.4_1.2.3.301",
|
||||
"0.5.5_1.2.3.301",
|
||||
"0.5.7_1.2.3.301"
|
||||
],
|
||||
"build_platform": [],
|
||||
"require_verify": 0,
|
||||
"service_price": "",
|
||||
"service_protocol": "游戏首次开启该服务时,Cocos会后台通知服务方为游戏开通服务并初始化参数,服务方根据需要可能会获取您的Cocos账户信息,包括账户基本资料、游戏基本资料、账户余额等,点击确认开通按钮即视为您同意该服务访问您的账户信息,详见<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_User_Service_Agreement_cn_20200904.html'>《Cocos用户服务协议》</a>和<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_Privacy_Policy_cn_20200904.html'>《Cocos隐私政策》</a>",
|
||||
"service_group": "HUAWEI AppGallery Connect",
|
||||
"service_group_id": "1001",
|
||||
"not_service": false
|
||||
},
|
||||
{
|
||||
"service_id": "312",
|
||||
"service_name": "云函数",
|
||||
"service_icon": "https://download.cocos.com/CocosUdc/client/e8b3ed0ab3/49138efdcfe5f9653331651da51ce838.png",
|
||||
"service_desc": "云函数是一项 Serverless 计算服务,提供 FaaS(Function as a Service)能力,可以帮助开发者大幅简化应用开发与运维相关的事务,降低应用功能的实现门槛,快速构建业务能力。",
|
||||
"service_title": "事件驱动的函数计算平台,保证高可用与伸缩,让您便捷运行代码而无需管理服务器。",
|
||||
"service_guide_url": "https://service.cocos.com/document/zh/agc-cloudfunc.html",
|
||||
"service_sample_url": "https://github.com/CocosService/HUAWEIDemo",
|
||||
"service_dev_url": "https://service.cocos.com/serviceConsole/jump?client_id=312&app_id=<app_id>&language=zh",
|
||||
"service_type": "3",
|
||||
"service_type_zh": "公司和个人游戏",
|
||||
"support_platform": [
|
||||
"安卓"
|
||||
],
|
||||
"package_download_url": "https://download.cocos.com/CocosUdc/plugins/service-agcfunction/0.5.2_1.6.0.300.zip",
|
||||
"package_version_desc": "<p>1、更新 AGC SDK 版本到 v1.6.0.300<br />\n2、更新 service SDK 版本到 v1.6.0.300<br />\n",
|
||||
"service_component_name": "service-agcfunction",
|
||||
"package_versions": [
|
||||
"0.5.0_1.4.1.300",
|
||||
"0.5.2_1.6.0.300"
|
||||
],
|
||||
"build_platform": [],
|
||||
"require_verify": 0,
|
||||
"service_price": "",
|
||||
"service_protocol": "游戏首次开启该服务时,Cocos会后台通知服务方为游戏开通服务并初始化参数,服务方根据需要可能会获取您的Cocos账户信息,包括账户基本资料、游戏基本资料、账户余额等,点击确认开通按钮即视为您同意该服务访问您的账户信息,详见<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_User_Service_Agreement_cn_20200904.html'>《Cocos用户服务协议》</a>和<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_Privacy_Policy_cn_20200904.html'>《Cocos隐私政策》</a>",
|
||||
"service_group": "HUAWEI AppGallery Connect",
|
||||
"service_group_id": "1001",
|
||||
"not_service": false
|
||||
},
|
||||
{
|
||||
"service_id": "314",
|
||||
"service_name": "TradPlus",
|
||||
"service_icon": "https://download.cocos.com/CocosUdc/client/b2b8742053/43934b13863aeea3b3af8c24946d9309.png",
|
||||
"service_desc": "TradPlus 聚合广告平台,为开发者提供专业、便捷和高效的广告变现解决方案。集成了40+ 国内外主流广告平台,支持自动优化、Bidding、用户级数据报表、交叉推广等功能。TradPlus 提供完善的广告漏斗模型,帮助开发者透视广告变现全过程,精准优化广告变现每个环节,实现广告收益最大化。",
|
||||
"service_title": "聚合广告平台,一站聚合,高效变现",
|
||||
"service_guide_url": "https://service.cocos.com/document/zh/tradplusad.html",
|
||||
"service_sample_url": "https://github.com/CocosService/tradplusDemo",
|
||||
"service_dev_url": "https://service.cocos.com/serviceConsole/jump?client_id=314&app_id=<app_id>&language=zh",
|
||||
"service_type": "3",
|
||||
"service_type_zh": "公司和个人游戏",
|
||||
"support_platform": [
|
||||
"安卓",
|
||||
"iOS"
|
||||
],
|
||||
"package_download_url": "https://download.cocos.com/CocosUdc/plugins/service-tradplusad/0.5.5_6.4.4.1_5.7.1.zip",
|
||||
"package_version_desc": "<p><strong>更新日期:</strong> 2021/07/20<br />\n<strong>更新说明:</strong><br />\n修复构建iOS平台时,如果服务处于禁用状态会报错的问题。<br />\n",
|
||||
"service_component_name": "service-tradplusad",
|
||||
"package_versions": [
|
||||
"0.5.3_6.4.4.1_5.7.1",
|
||||
"0.5.5_6.4.4.1_5.7.1"
|
||||
],
|
||||
"build_platform": [],
|
||||
"require_verify": 0,
|
||||
"service_price": "",
|
||||
"service_protocol": "游戏首次开启该服务时,Cocos会后台通知服务方为游戏开通服务并初始化参数,服务方根据需要可能会获取您的Cocos账户信息,包括账户基本资料、游戏基本资料、账户余额等,点击确认开通按钮即视为您同意该服务访问您的账户信息,详见<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_User_Service_Agreement_cn_20200904.html'>《Cocos用户服务协议》</a>和<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_Privacy_Policy_cn_20200904.html'>《Cocos隐私政策》</a>",
|
||||
"service_group": "",
|
||||
"service_group_id": "",
|
||||
"not_service": false
|
||||
},
|
||||
{
|
||||
"service_id": "351",
|
||||
"service_name": "FrontJS",
|
||||
"service_icon": "https://download.cocos.com/CocosUdc/client/4b80de6d6b/0bc144d702f68e557ffa73aead1a14f1.png",
|
||||
"service_desc": "通过 FrontJS SDK 的集成监测应用 Cocos Creator 引擎层面上的脚本异常、网络请求、页面停留、以及UI卡顿等指标,提供异常报告、警报通知及可视化等功能。\n",
|
||||
"service_title": "蒲公英 FrontJS 崩溃分析性能监测服务",
|
||||
"service_guide_url": "https://service.cocos.com/document/zh/frontjs.html",
|
||||
"service_sample_url": "",
|
||||
"service_dev_url": "https://service.cocos.com/serviceConsole/jump?client_id=351&app_id=<app_id>&language=zh",
|
||||
"service_type": "3",
|
||||
"service_type_zh": "公司和个人游戏",
|
||||
"support_platform": [
|
||||
"安卓",
|
||||
"iOS",
|
||||
"H5",
|
||||
"小游戏"
|
||||
],
|
||||
"package_download_url": "https://download.cocos.com/CocosUdc/plugins/service-frontjs/1.1.3_1.1.3.zip",
|
||||
"package_version_desc": "<p><strong>更新日期:</strong> 2021/06/04<br />\n<strong>更新说明:</strong><br />\n1.修正华为快游戏平台 UA 问题<br />\n2.完善本地化设置<br />\n3.对于小游戏平台提示添加合法 Request 域名<br />\n4.增强内网环境判断<br />\n",
|
||||
"service_component_name": "service-frontjs",
|
||||
"package_versions": [
|
||||
"1.0.1_1.0.1",
|
||||
"1.1.0_1.1.0",
|
||||
"1.1.3_1.1.3"
|
||||
],
|
||||
"build_platform": [],
|
||||
"require_verify": 0,
|
||||
"service_price": "",
|
||||
"service_protocol": "游戏首次开启该服务时,Cocos会后台通知服务方为游戏开通服务并初始化参数,服务方根据需要可能会获取您的Cocos账户信息,包括账户基本资料、游戏基本资料、账户余额等,点击确认开通按钮即视为您同意该服务访问您的账户信息,详见<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_User_Service_Agreement_cn_20200904.html'>《Cocos用户服务协议》</a>和<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_Privacy_Policy_cn_20200904.html'>《Cocos隐私政策》</a>",
|
||||
"service_group": "",
|
||||
"service_group_id": "",
|
||||
"not_service": false
|
||||
},
|
||||
{
|
||||
"service_id": "7",
|
||||
"service_name": "AnySDK",
|
||||
"service_icon": "https://download.cocos.com/CocosUdc/client/872b94af2e/3ba1fcf9029140cf08d95813e387d04a.png",
|
||||
"service_desc": "<font color=red>AnySDK计划关停公告</font> http://www.anysdk.com/2019/05/2203\n<em>强烈建议新用户或新的游戏不要再开通和使用 AnySDK</em> https://forum.cocos.com/t/creator2-0-10-ios-sdk/79061/10\n",
|
||||
"service_title": "游戏快速接入第三方SDK的解决方案",
|
||||
"service_guide_url": "http://docs.anysdk.com",
|
||||
"service_sample_url": "http://github.com/AnySDK",
|
||||
"service_dev_url": "https://service.cocos.com/serviceConsole/jump?client_id=7&app_id=<app_id>&language=zh",
|
||||
"service_type": "2",
|
||||
"service_type_zh": "仅支持公司游戏",
|
||||
"support_platform": [
|
||||
"安卓",
|
||||
"iOS",
|
||||
"H5"
|
||||
],
|
||||
"package_download_url": "https://download.cocos.com/CocosUdc/plugins/service-anysdk/1.0.1_2.2.5.zip",
|
||||
"package_version_desc": "<p><strong>更新日期:</strong> 2019/3/7\n<strong>更新说明:</strong>\n1、修复 Creator 2.0.x 系列版本 2.0.7 以上因调用 cc.game.restart(); 而导致的 AnySDK 调用失败的错误</p>",
|
||||
"service_component_name": "service-anysdk",
|
||||
"package_versions": [
|
||||
"1.0.1_2.2.5"
|
||||
],
|
||||
"build_platform": [],
|
||||
"require_verify": 0,
|
||||
"service_price": "",
|
||||
"service_protocol": "游戏首次开启该服务时,Cocos会后台通知服务方为游戏开通服务并初始化参数,服务方根据需要可能会获取您的Cocos账户信息,包括账户基本资料、游戏基本资料、账户余额等,点击确认开通按钮即视为您同意该服务访问您的账户信息,详见<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_User_Service_Agreement_cn_20200904.html'>《Cocos用户服务协议》</a>和<a href='https://download.cocos.com/CocosUdc/agreement/Cocos_Privacy_Policy_cn_20200904.html'>《Cocos隐私政策》</a>",
|
||||
"service_group": "",
|
||||
"service_group_id": "",
|
||||
"not_service": false
|
||||
}
|
||||
],
|
||||
"game": {
|
||||
"name": "未知游戏",
|
||||
"appid": "UNKNOW"
|
||||
}
|
||||
}
|
17
tsconfig.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [ "dom", "es5", "es2015.promise" ],
|
||||
"target": "es5",
|
||||
"experimentalDecorators": true,
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"library",
|
||||
"local",
|
||||
"temp",
|
||||
"build",
|
||||
"settings"
|
||||
]
|
||||
}
|