Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Бинарные значения в Data Transaction #3

Closed
bodrych opened this issue Oct 5, 2018 · 3 comments
Closed

Бинарные значения в Data Transaction #3

bodrych opened this issue Oct 5, 2018 · 3 comments

Comments

@bodrych
Copy link

bodrych commented Oct 5, 2018

Было бы здорово, если бы можно было указывать значение бинарного поля в base64 формате

{
  "version" : 1,
  "sender": "3FjTpAg1VbmxSH39YWnfFukAUhxMqmKqTEZ",
  "data": [
    {"key": "blob", "type": "binary", "value": "base64:BzWHaQU"}
  ],
  "fee": 100000
}

(код из документации)

@siemarell
Copy link
Collaborator

For now this library automatically derives types. E.x.

{key:"blob", "value": "base64:BzWHaQU"}

Derived type would be "string". You can convert your base64 string to array before using library "data" function

@bodrych bodrych closed this as completed Oct 31, 2018
@ebceu4
Copy link
Owner

ebceu4 commented Nov 16, 2018

Можно указывать в бинарном просто value должно быть Uint8Array.from([1,2,3])

@siemarell
Copy link
Collaborator

Начиная с версии 2.0 можно указывать:

{"key": "blob", "type": "binary", "value": "base64:BzWHaQU"}

тип не будет автоматически выводиться в таком случае

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants