wowok 1.5.45 → 1.5.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wowok",
3
- "version": "1.5.45",
3
+ "version": "1.5.47",
4
4
  "description": "Create, collaborate, and transact on your own terms with the AI-driven web3 collaboration protocol.",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
package/src/entity.ts CHANGED
@@ -2,7 +2,7 @@ import { Protocol, FnCallType, TxbObject, ResourceAddress, PermissionObject, Res
2
2
  import { IsValidDesription, IsValidAddress, IsValidName, isValidHttpUrl, Bcs, IsValidArray, } from './utils';
3
3
  import { ERROR, Errors } from './exception';
4
4
  import { Resource } from './resource';
5
- import { type TransactionResult, Transaction as TransactionBlock } from '@mysten/sui/transactions';
5
+ import { Transaction as TransactionBlock } from '@mysten/sui/transactions';
6
6
 
7
7
  export interface Safer {
8
8
  name: string;
@@ -80,7 +80,7 @@ export class Entity {
80
80
  }
81
81
 
82
82
  update(info: Entity_Info) {
83
- if (!IsValidName(info.name)) ERROR(Errors.IsValidName, 'update');
83
+ if (info?.name && !IsValidName(info.name)) ERROR(Errors.IsValidName, 'update');
84
84
  if (info?.description && !IsValidDesription(info.description)) ERROR(Errors.IsValidDesription, 'update');
85
85
  if (info?.avatar && !isValidHttpUrl(info.avatar)) ERROR(Errors.isValidHttpUrl, 'update:avatar');
86
86
  if (info?.twitter && !IsValidName(info.twitter)) ERROR(Errors.IsValidName, 'update:twitter');
package/src/protocol.ts CHANGED
@@ -221,7 +221,7 @@ const TESTNET = {
221
221
  }
222
222
  */
223
223
  const TESTNET = {
224
- wowok: "0x5cfe867c71e4e65bbe3a1214567926a5fef8b4206f7f219bb7446bd9630f528f",
224
+ wowok: "0xd36b203d88f99d8b76b8f870de848e45fed72b31e0732bbfc2445b7c058bc999",
225
225
  wowok_origin:'0x5cfe867c71e4e65bbe3a1214567926a5fef8b4206f7f219bb7446bd9630f528f' ,
226
226
  base: '0xcabc5d750dfacb78550b812531598e02fd83650a0ea804fe48767ecca9e46b51',
227
227
  base_origin: '0xcabc5d750dfacb78550b812531598e02fd83650a0ea804fe48767ecca9e46b51',
package/src/resource.ts CHANGED
@@ -47,14 +47,13 @@ export class Resource {
47
47
  });
48
48
  }
49
49
  add(name:string, object:string[] | TransactionResult[]) {
50
- if (object.length === 0) return ;
51
- var bString = false;
52
-
50
+ var bString = true;
53
51
  if (!IsValidName(name)) ERROR(Errors.IsValidName, 'add.name');
54
52
  if (!IsValidArray(object, (item:any) => {
55
53
  if (typeof(item) === 'string') {
56
- bString = true;
57
54
  return IsValidAddress(item)
55
+ } else {
56
+ bString = false;
58
57
  }
59
58
  return true;
60
59
  })) {