Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
generated post conditions
export interface PostConditionFungible {
principal:
| {
typeId: 1;
}
| {
typeId: 2;
/**
* Raw data is stored in instances of the Buffer class.
* A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
* Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
*/
address: {
version: number;
bytes: number[];
};
}
| {
typeId: 3;
/**
* Raw data is stored in instances of the Buffer class.
* A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
* Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
*/
address: {
version: number;
bytes: number[];
};
contractName: string;
};
conditionCode: 1 | 2 | 3 | 4 | 5;
amount: string;
assetInfoId: 1;
}
export interface PostConditionNonFungible {
principal:
| {
typeId: 1;
}
| {
typeId: 2;
/**
* Raw data is stored in instances of the Buffer class.
* A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
* Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
*/
address: {
version: number;
bytes: number[];
};
}
| {
typeId: 3;
/**
* Raw data is stored in instances of the Buffer class.
* A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
* Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
*/
address: {
version: number;
bytes: number[];
};
contractName: string;
};
/**
* 10 = Sent, 11 = NotSent
*/
conditionCode: 10 | 11;
amount: string;
assetInfoId: 2;
assetValue: number;
asset: {
assetName: string;
contractAddress: string;
contractName: string;
};
}
export interface PostConditionStx {
principal:
| {
typeId: 1;
}
| {
typeId: 2;
/**
* Raw data is stored in instances of the Buffer class.
* A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
* Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
*/
address: {
version: number;
bytes: number[];
};
}
| {
typeId: 3;
/**
* Raw data is stored in instances of the Buffer class.
* A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
* Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
*/
address: {
version: number;
bytes: number[];
};
contractName: string;
};
conditionCode: 1 | 2 | 3 | 4 | 5;
amount: string;
assetInfoId: 0;
}
export type PostCondition = PostConditionStx | PostConditionFungible | PostConditionNonFungible;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment