js-moi-utils
Version:
Collection of utility functions used in js-moi-sdk.
188 lines (181 loc) • 3.85 kB
text/typescript
export const logicSchema = {
kind: "struct",
fields: {
manifest: {
kind: "bytes"
},
logic_id: {
kind: "string"
},
callsite: {
kind: "string"
},
calldata: {
kind: "bytes"
},
interface: {
kind: "map",
fields: {
keys: {
kind: "string"
},
values: {
kind: "string"
}
}
}
}
}
export const participantCreateSchema = {
kind: "struct",
fields: {
address: {
kind: "bytes"
},
amount: {
kind: "integer"
}
}
}
export const assetCreateSchema = {
kind: "struct",
fields: {
symbol: {
kind: "string"
},
supply: {
kind: "integer"
},
standard: {
kind: "integer"
},
dimension: {
kind: "integer"
},
is_stateful: {
kind: "bool"
},
is_logical: {
kind: "bool"
},
logic_payload: logicSchema
}
}
export const assetActionSchema = {
kind: "struct",
fields: {
benefactor: {
kind: "bytes"
},
beneficiary: {
kind: "bytes"
},
asset_id: {
kind: "string"
},
amount: {
kind: "integer"
}
}
}
export const assetSupplySchema = {
kind: "struct",
fields: {
asset_id: {
kind: "string"
},
amount: {
kind: "integer"
}
}
}
export const ixObjectSchema = {
kind: "struct",
fields: {
sender: {
kind: "bytes"
},
payer: {
kind: "bytes"
},
nonce: {
kind: "integer"
},
fuel_price: {
kind: "integer"
},
fuel_limit: {
kind: "integer"
},
funds: {
kind: "array",
fields: {
values: {
kind: "struct",
fields: {
asset_id: {
kind: "string"
},
amount: {
kind: "integer"
}
}
}
}
},
ix_operations: {
kind: "array",
fields: {
values: {
kind: "struct",
fields: {
type: {
kind: "integer"
},
payload: {
kind: "bytes"
}
}
}
}
},
participants: {
kind: "array",
fields: {
values: {
kind: "struct",
fields: {
address: {
kind: "bytes"
},
lock_type: {
kind: "integer"
}
}
}
}
},
perception: {
kind: "bytes"
},
preferences: {
kind: "struct",
fields: {
compute: {
kind: "bytes"
},
consensus: {
kind: "bytes"
}
}
}
}
}
export const builtInLogEventSchema = {
kind: "struct",
fields: {
value: {
kind: "string"
}
}
}