ipfs storage for images and other nontext items. for use with etica - runs on etica network and currencys
https://collect.etica-stats.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
749 B
25 lines
749 B
"use strict"; |
|
Object.defineProperty(exports, "__esModule", { value: true }); |
|
exports.StringCoder = void 0; |
|
const utf8_js_1 = require("../../utils/utf8.js"); |
|
const typed_js_1 = require("../typed.js"); |
|
const bytes_js_1 = require("./bytes.js"); |
|
/** |
|
* @_ignore |
|
*/ |
|
class StringCoder extends bytes_js_1.DynamicBytesCoder { |
|
constructor(localName) { |
|
super("string", localName); |
|
} |
|
defaultValue() { |
|
return ""; |
|
} |
|
encode(writer, _value) { |
|
return super.encode(writer, (0, utf8_js_1.toUtf8Bytes)(typed_js_1.Typed.dereference(_value, "string"))); |
|
} |
|
decode(reader) { |
|
return (0, utf8_js_1.toUtf8String)(super.decode(reader)); |
|
} |
|
} |
|
exports.StringCoder = StringCoder; |
|
//# sourceMappingURL=string.js.map
|